1 | ================================================================================ |
---|
2 | |
---|
3 | Copyright (C) 2004-2013 HUBzero Foundation, LLC |
---|
4 | |
---|
5 | ================================================================================ |
---|
6 | Protocol for nanovis render server. |
---|
7 | |
---|
8 | Commands take the general form of command and arguments using Tcl syntax and are |
---|
9 | terminated by a newline. Some command arguments expect a Tcl list which can be |
---|
10 | sent by enclosing the list in curly braces to prevent the interpreter from |
---|
11 | splitting the list into multiple arguments. Likewise, strings with spaces |
---|
12 | should be quoted or enclosed in curly braces. In the documentation below, |
---|
13 | arguments are indicated by angle brackets and optional arguments are surrounded |
---|
14 | by question marks -- the brackets and question marks are not part of the |
---|
15 | protocol and should not be included in argument strings. The arguments shown |
---|
16 | in angle brackets should be replaced with a string (where there are fixed |
---|
17 | choices this document indicates valid values by separating them with pipe |
---|
18 | symbols), a list in Tcl syntax, or a numeric value. Boolean arguments can take |
---|
19 | the form of 0|1, true|false, or yes|no. Since the protocol commands are |
---|
20 | executed in a Tcl interpreter, Tcl code such as math expressions in expr |
---|
21 | commands enclosed in square brackets are also allowed. Since the interpreter |
---|
22 | is a "safe" interpreter, some Tcl commands that could cause security issues may |
---|
23 | not be available for use. |
---|
24 | |
---|
25 | Some commands such as the 'flowvis add' commands create Tcl objects within the |
---|
26 | server's interpreter. The name sent as an argument when adding the object can |
---|
27 | then be used as a protocol command. For example, the string sent as the <name> |
---|
28 | argument to 'flowvis add' can then be used in place of <flowObj> in the commands |
---|
29 | documented below. The flow object name also creates a volume name that can |
---|
30 | be used in volume and cutplane commands, but in that case the name is used as |
---|
31 | an argument to the volume or cutplane commands rather than as the command |
---|
32 | itself. |
---|
33 | |
---|
34 | When binary data is to be sent, it should follow the newline after a command |
---|
35 | that indicates incoming data including a byte count argument. |
---|
36 | ================================================================================ |
---|
37 | ================================================================================ |
---|
38 | Requests: |
---|
39 | ================================================================================ |
---|
40 | axis visible <false|true> |
---|
41 | |
---|
42 | grid axiscolor <red> <green> <blue> <?alpha?> |
---|
43 | grid axisname <x|y|z> <name> |
---|
44 | grid linecolor <red> <green> <blue> <?alpha?> |
---|
45 | grid visible <false|true> |
---|
46 | |
---|
47 | camera angle <xAngle> <yAngle> <zAngle> |
---|
48 | ** Deprecated, use camera orient ** |
---|
49 | camera orient <quatW> <quatX> <quatY> <quatZ> |
---|
50 | camera pan <x> <y> |
---|
51 | camera pos <x> <y> <z> |
---|
52 | camera reset <?all?> |
---|
53 | camera zoom <factor> |
---|
54 | |
---|
55 | screen bgcolor <r> <g> <b> |
---|
56 | Set screen background color |
---|
57 | screen size <width> <height> |
---|
58 | Set size of rendered images |
---|
59 | |
---|
60 | snapshot |
---|
61 | Render a 2k x 2k image (offscreen buffer) |
---|
62 | |
---|
63 | transfunc 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 | |
---|
68 | legend <transferfunc name> <width> <height> |
---|
69 | Request render of transfer function |
---|
70 | |
---|
71 | heightmap data visible <true|false> <volume IDs> |
---|
72 | heightmap data follows <nbytes> <data> |
---|
73 | heightmap linecontour visible <true|false> <volume IDs> |
---|
74 | heightmap linecontour color <red> <green> <blue> <volume IDs> |
---|
75 | heightmap tranfunc <transfer function name> <volume IDs> |
---|
76 | heightmap cull <no/back/front> |
---|
77 | heightmap polygon <wireframe/fill> |
---|
78 | |
---|
79 | flow 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 |
---|
84 | flow delete <names> |
---|
85 | flow exists <name> |
---|
86 | flow goto <nSteps> |
---|
87 | flow names |
---|
88 | flow next |
---|
89 | flow reset |
---|
90 | flow 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 | |
---|
142 | volume data state <on|off> <?names?> |
---|
143 | volume data follows <size> <tag> |
---|
144 | volume delete <?names?> |
---|
145 | volume exists <name> |
---|
146 | volume names <?pattern?> |
---|
147 | volume outline color <r> <g> <b> <?names?> |
---|
148 | volume outline state|visible <bool> <?names?> |
---|
149 | volume shading ambient <value> <?names?> |
---|
150 | volume shading diffuse <value> <?names?> |
---|
151 | volume shading isosurface <bool> <?names?> |
---|
152 | volume shading opacity <value> <?names?> |
---|
153 | volume shading specularExp <value> <?names?> |
---|
154 | volume shading specularLevel <value> <?names?> |
---|
155 | volume shading transfunc <tfName> <?names?> |
---|
156 | volume state <bool> <?names?> |
---|
157 | |
---|
158 | volume animation volumes <volume IDs> |
---|
159 | volume animation start |
---|
160 | volume animation stop |
---|
161 | volume animation clear |
---|
162 | volume animation capture numframes <filename> |
---|
163 | |
---|
164 | cutplane 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] |
---|
168 | cutplane 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 | |
---|
172 | up <x|y|z|-x|-y|-z> |
---|
173 | Set orientation of volumes |
---|
174 | |
---|
175 | ================================================================================ |
---|
176 | Replies: |
---|
177 | ================================================================================ |
---|
178 | nv>legend <volume> <min> <max> <nbytes> |
---|
179 | (followed by bytes and newline) |
---|
180 | |
---|
181 | nv>image -type image -bytes <nbytes> |
---|
182 | (followed by bytes -- command _preceded_ by newline) |
---|
183 | |
---|
184 | nv>image -type print -bytes <nbytes> |
---|
185 | (followed by bytes -- command _preceded_ by newline) |
---|
186 | |
---|
187 | nv>image -type movie -token <token> -bytes <nbytes> |
---|
188 | (followed by bytes) |
---|
189 | |
---|
190 | nv>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 | ================================================================================ |
---|
195 | Error Replies: |
---|
196 | ================================================================================ |
---|
197 | nv>viserror -bytes <nbytes> |
---|
198 | <multi-line error string of nbytes> |
---|
199 | ================================================================================ |
---|