source: trunk/packages/vizservers/nanovis/protocol-nanovis.txt @ 3464

Last change on this file since 3464 was 3362, checked in by ldelgass, 7 years ago

Merge nanovis2 branch to trunk

  • Property svn:eol-style set to native
File size: 7.7 KB
Line 
1================================================================================
2================================================================================
3Protocol for nanovis render server. 
4
5Commands take the general form of command and arguments using Tcl syntax and are
6terminated by a newline.  Some command arguments expect a Tcl list which can be
7sent by enclosing the list in curly braces to prevent the interpreter from
8splitting the list into multiple arguments.  Likewise, strings with spaces
9should be quoted or enclosed in curly braces.  In the documentation below,
10arguments are indicated by angle brackets and optional arguments are surrounded
11by question marks -- the brackets and question marks are not part of the
12protocol and should not be included in argument strings.  The arguments shown
13in angle brackets should be replaced with a string (where there are fixed
14choices this document indicates valid values by separating them with pipe
15symbols), a list in Tcl syntax, or a numeric value.  Boolean arguments can take
16the form of 0|1, true|false, or yes|no.  Since the protocol commands are
17executed in a Tcl interpreter, Tcl code such as math expressions in expr
18commands enclosed in square brackets are also allowed.  Since the interpreter
19is a "safe" interpreter, some Tcl commands that could cause security issues may
20not be available for use.
21
22Some commands such as the 'flowvis add' commands create Tcl objects within the
23server's interpreter.  The name sent as an argument when adding the object can
24then be used as a protocol command.  For example, the string sent as the <name>
25argument to 'flowvis add' can then be used in place of <flowObj> in the commands
26documented below.  The flow object name also creates a volume name that can
27be used in volume and cutplane commands, but in that case the name is used as
28an argument to the volume or cutplane commands rather than as the command
29itself.
30
31When binary data is to be sent, it should follow the newline after a command
32that indicates incoming data including a byte count argument.
33================================================================================
34================================================================================
35Requests:
36================================================================================
37axis visible <false|true>
38
39grid axiscolor <red> <green> <blue> <?alpha?>
40grid axisname <x|y|z> <name>
41grid linecolor <red> <green> <blue> <?alpha?>
42grid visible <false|true>
43
44camera angle <xAngle> <yAngle> <zAngle>
45camera orient <quatW> <quatX> <quatY> <quatZ>
46camera pan <x> <y>
47camera pos <x> <y> <z>
48camera zoom <factor>
49
50screen <width> <height>
51    Set size of rendered images
52snapshot
53    Render a 2k x 2k image (offscreen buffer)
54
55transfunc define <name> {colors} {alpha}
56          colors => 1 line each of "value r g b"
57          alpha => 1 line each of "value alpha"
58          value => [0,1]
59
60legend <transferfunc name> <width> <height>
61       Request render of transfer function
62
63heightmap data visible <true|false> <volume IDs>
64heightmap data follows <nbytes> <data>
65heightmap linecontour visible <true|false> <volume IDs>
66heightmap linecontour color <red> <green> <blue> <volume IDs>
67heightmap tranfunc <transfer function name> <volume IDs>
68heightmap cull <no/back/front>
69heightmap polygon <wireframe/fill>
70
71flow add <name> <?option value...?>
72         <name> is an object name to use in <flowObj> commands
73         In addition, a volume is added with the same name
74         which can be used in volume and cutplane commands
75         see '<flowObj> configure' for switch options
76flow delete <names>
77flow exists <name>
78flow goto <nSteps>
79flow names <?pattern?>
80flow next
81flow reset
82flow video <token> <?switches...?>
83     -bitrate <val>
84     -format <mpeg|theora|mov>
85     -framerate <val>
86     -height <val>
87     -numframes <val>
88     -width <val>
89
90<flowObj> box add <name> <?switches...?>
91          See '<flowObj> box configure' for switches
92<flowObj> box configure <name> <?switches...?>
93         -color <{r g b a}>
94         -corner1 <{x y z}>
95         -corner2 <{x y z}>
96         -hide <bool>
97         -linewidth <val>
98<flowObj> box delete <?names?>
99<flowObj> box names <?pattern?>
100
101<flowObj> configure <?option value...?>
102          -ambient <val>
103          -arrows <bool>
104          -axis <x|y|z>
105          -diffuse <val>
106          -hide <bool>
107          -opacity <val>
108          -outline <bool>
109          -position <val|%val>
110           val = [0,100], or %val = [0,1]
111          -slice <bool>
112          -specularExp <val>
113          -specularLevel <val>
114          -transferfunction <name>
115          -volume <bool>
116<flowObj> data file <fileName> <numComponents>
117          Load a data file.  fileName is path to file on server
118<flowObj> data follows <nbytes> <numComponents>
119          Send flow data.  Data bytes follow the newline after the command
120<flowObj> legend <w> <h>
121<flowObj> particles add <name> <?switches?>
122          see '<flowObj> particles configure' for switches
123<flowObj> particles configure <name> <?switches?>
124          -axis <x|y|z>
125          -color <{r g b a}>
126          -hide <bool>
127          -position <val|%val>
128           val = [0,100], or %val = [0,1]
129          -size <val>
130
131volume data state <on|off> <?names?>
132volume data follows <size> <tag>
133volume delete <?names?>
134volume exists <name>
135volume names <?pattern?>
136volume outline color <r> <g> <b> <?names?>
137volume outline state|visible <bool> <?names?>
138volume shading ambient <value> <?names?>
139volume shading diffuse <value> <?names?>
140volume shading isosurface <bool> <?names?>
141volume shading opacity <value> <?names?>
142volume shading specularExp <value> <?names?>
143volume shading specularLevel <value> <?names?>
144volume shading transfunc <tfName> <?names?>
145volume state <bool> <?names?>
146
147volume animation volumes <volume IDs>
148volume animation start
149volume animation stop
150volume animation clear
151volume animation capture numframes <filename>
152
153cutplane position <relval> <x|y|z> <?names?>
154         Set the position of a volume cutplane.  Names is
155         an optional list of volume names.
156         relval = [0,1]
157cutplane state <bool> <x|y|z> <?names?>
158         Set the axis (normal) of a volume cutplane.  Names is
159         an optional list of volume names.
160
161up <x|y|z|-x|-y|-z>
162   Set orientation of volumes
163
164
165--- Colormaped Plane (if PLANE_CMD is defined in config.h) ---
166plane active <planeIdx>
167      Set the active plane [0,9], or -1 to disable
168      Plane must first be added and linked
169plane add <planeIdx> <width> <height>
170      followed by image data: w * h floats on stdin
171      planeIdx: [0,9]
172plane link <planeIdx> <transfunc name>
173      Enable a plane for rendering using the given transfer
174      function.  Plane must first be added.
175--- End Colormaped Plane (if PLANE_CMD is defined in config.h) ---
176
177================================================================================
178Replies:
179================================================================================
180nv>legend <volume> <min> <max> <nbytes>
181  (followed by bytes and newline)
182
183nv>image -type image -bytes <nbytes>
184  (followed by bytes -- command _preceded_ by newline)
185
186nv>image -type print -bytes <nbytes>
187  (followed by bytes -- command _preceded_ by newline)
188
189nv>image -type movie -token <token> -bytes <nbytes>
190  (followed by bytes)
191
192nv>data tag <dataobj-tag> min <val> max <val> vmin <val> vmax <val>
193   The min,max data values for the data object and the cumulative volume data
194   min,max over all volumes
195
196================================================================================
197Error Replies:
198================================================================================
199Prefixed with "NanoVis Server Error: "
200Currently not guaranteed to be on a single line
201================================================================================
Note: See TracBrowser for help on using the repository browser.