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

Last change on this file since 2974 was 2974, checked in by ldelgass, 12 years ago

Remove unused volume axis/bbox labeling from VolumeRenderer?. This feature is
now provided by the Grid. Also remove unused volume/slice mode flags in
VolumeRenderer? since it now uses cutplane information from each Volume object
instead.

  • Property svn:eol-style set to native
File size: 7.5 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(phi)> <yAngle(theta)> <zAngle(psi)>
45camera orient <quatW> <quatX> <quatY> <quatZ>
46camera pan <x> <y>
47camera zoom <factor>
48
49screen <width> <height>
50    Set size of rendered images
51snapshot
52    Render a 2k x 2k image (offscreen buffer)
53
54transfunc define <name> {colors} {alpha}
55          colors => 1 line each of "value r g b"
56          alpha => 1 line each of "value alpha"
57          value => [0,1]
58
59legend <transferfunc name> <width> <height>
60       Request render of transfer function
61
62heightmap data visible <true|false> <volume IDs>
63heightmap data follows <nbytes> <data>
64heightmap linecontour visible <true|false> <volume IDs>
65heightmap linecontour color <red> <green> <blue> <volume IDs>
66heightmap tranfunc <transfer function name> <volume IDs>
67heightmap cull <no/back/front>
68heightmap polygon <wireframe/fill>
69
70flow add <name> <?option value...?>
71         <name> is an object name to use in <flowObj> commands
72         In addition, a volume is added with the same name
73         which can be used in volume and cutplane commands
74         see '<flowObj> configure' for switch options
75flow delete <names>
76flow exists <name>
77flow goto <nSteps>
78flow names <?pattern?>
79flow next
80flow reset
81flow video <token> <?switches...?>
82     -bitrate <val>
83     -format <mpeg|theora|mov>
84     -framerate <val>
85     -height <val>
86     -numframes <val>
87     -width <val>
88
89<flowObj> box add <name> <?switches...?>
90          See '<flowObj> box configure' for switches
91<flowObj> box configure <name> <?switches...?>
92         -color <{r g b a}>
93         -corner1 <{x y z}>
94         -corner2 <{x y z}>
95         -hide <bool>
96         -linewidth <val>
97<flowObj> box delete <?names?>
98<flowObj> box names <?pattern?>
99
100<flowObj> configure <?option value...?>
101          -arrows <bool>
102          -axis <x|y|z>
103          -diffuse <val>
104          -hide <bool>
105          -opacity <val>
106          -outline <bool>
107          -position <val|%val>
108           val = [0,100], or %val = [0,1]
109          -slice <bool>
110          -specular <val>
111          -transferfunction <name>
112          -volume <bool>
113<flowObj> data file <fileName> <numComponents>
114          Load a data file.  fileName is path to file on server
115<flowObj> data follows <nbytes> <numComponents>
116          Send flow data.  Data bytes follow the newline after the command
117<flowObj> legend <w> <h>
118<flowObj> particles add <name> <?switches?>
119          see '<flowObj> particles configure' for switches
120<flowObj> particles configure <name> <?switches?>
121          -axis <x|y|z>
122          -color <{r g b a}>
123          -hide <bool>
124          -position <val|%val>
125           val = [0,100], or %val = [0,1]
126          -size <val>
127
128volume data state <on|off> <?names?>
129volume data follows <size> <tag>
130volume delete <?names?>
131volume exists <name>
132volume names <?pattern?>
133volume outline color <r> <g> <b> <?names?>
134volume outline state|visible <bool> <?names?>
135volume shading diffuse <value> <?names?>
136volume shading isosurface <bool> <?names?>
137volume shading opacity <value> <?names?>
138volume shading specular <value> <?names?>
139volume shading transfunc <tfName> <?names?>
140volume state <bool> <?names?>
141
142volume animation volumes <volume IDs>
143volume animation start
144volume animation stop
145volume animation clear
146volume animation capture numframes <filename>
147
148cutplane position <relval> <x|y|z> <?names?>
149         Set the position of a volume cutplane.  Names is
150         an optional list of volume names.
151         relval = [0,1]
152cutplane state <bool> <x|y|z> <?names?>
153         Set the axis (normal) of a volume cutplane.  Names is
154         an optional list of volume names.
155
156up <x|y|z|-x|-y|-z>
157   Set orientation of volumes
158
159
160--- Colormaped Plane (if PLANE_CMD=1 in config.h) ---
161plane active <planeIdx>
162      Set the active plane [0,9], or -1 to disable
163      Plane must first be added and linked
164plane add <planeIdx> <width> <height>
165      followed by image data: w * h floats on stdin
166      planeIdx: [0,9]
167plane link <planeIdx> <transfunc name>
168      Enable a plane for rendering using the given transfer
169      function.  Plane must first be added.
170--- End Colormaped Plane (if PLANE_CMD=1 in config.h) ---
171
172================================================================================
173Replies:
174================================================================================
175nv>legend <volume> <min> <max> <nbytes>
176  (followed by bytes and newline)
177
178nv>image -type image -bytes <nbytes>
179  (followed by bytes -- command _preceded_ by newline)
180
181nv>image -type print -bytes <nbytes>
182  (followed by bytes -- command _preceded_ by newline)
183
184nv>image -type movie -token <token> -bytes <nbytes>
185  (followed by bytes)
186
187nv>data tag <dataobj-tag> min <val> max <val> vmin <val> vmax <val>
188   The min,max data values for the data object and the cumulative volume data
189   min,max over all volumes
190
191================================================================================
192Error Replies:
193================================================================================
194Prefixed with "NanoVis Server Error: "
195Currently not guaranteed to be on a single line
196================================================================================
Note: See TracBrowser for help on using the repository browser.