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

Last change on this file since 3596 was 3568, checked in by ldelgass, 11 years ago

Fix crash on getting transfer function name, remove unused plane command.

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