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

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

Add basic VTK structured points reader to nanovis, update copyright dates.

  • Property svn:eol-style set to native
File size: 7.9 KB
3 Copyright (C) 2004-2013  HUBzero Foundation, LLC
6Protocol for nanovis render server. 
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.
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
34When binary data is to be sent, it should follow the newline after a command
35that indicates incoming data including a byte count argument.
40axis visible <false|true>
42grid axiscolor <red> <green> <blue> <?alpha?>
43grid axisname <x|y|z> <name>
44grid linecolor <red> <green> <blue> <?alpha?>
45grid visible <false|true>
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>
55screen bgcolor <r> <g> <b>
56       Set screen background color
57screen size <width> <height>
58       Set size of rendered images
61         Render a 2k x 2k image (offscreen buffer)
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]
68legend <transferfunc name> <width> <height>
69       Request render of transfer function
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>
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 <?pattern?>
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>
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 <?pattern?>
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<flowObj> particles add <name> <?switches?>
130          see '<flowObj> particles configure' for switches
131<flowObj> particles configure <name> <?switches?>
132          -axis <x|y|z>
133          -color <{r g b a}>
134          -hide <bool>
135          -position <val|%val>
136           val = [0,100], or %val = [0,1]
137          -size <val>
139volume data state <on|off> <?names?>
140volume data follows <size> <tag>
141volume delete <?names?>
142volume exists <name>
143volume names <?pattern?>
144volume outline color <r> <g> <b> <?names?>
145volume outline state|visible <bool> <?names?>
146volume shading ambient <value> <?names?>
147volume shading diffuse <value> <?names?>
148volume shading isosurface <bool> <?names?>
149volume shading opacity <value> <?names?>
150volume shading specularExp <value> <?names?>
151volume shading specularLevel <value> <?names?>
152volume shading transfunc <tfName> <?names?>
153volume state <bool> <?names?>
155volume animation volumes <volume IDs>
156volume animation start
157volume animation stop
158volume animation clear
159volume animation capture numframes <filename>
161cutplane position <relval> <x|y|z> <?names?>
162         Set the position of a volume cutplane.  Names is
163         an optional list of volume names.
164         relval = [0,1]
165cutplane state <bool> <x|y|z> <?names?>
166         Set the axis (normal) of a volume cutplane.  Names is
167         an optional list of volume names.
169up <x|y|z|-x|-y|-z>
170   Set orientation of volumes
173--- Colormaped Plane (if PLANE_CMD is defined in config.h) ---
174plane active <planeIdx>
175      Set the active plane [0,9], or -1 to disable
176      Plane must first be added and linked
177plane add <planeIdx> <width> <height>
178      followed by image data: w * h floats on stdin
179      planeIdx: [0,9]
180plane link <planeIdx> <transfunc name>
181      Enable a plane for rendering using the given transfer
182      function.  Plane must first be added.
183--- End Colormaped Plane (if PLANE_CMD is defined in config.h) ---
188nv>legend <volume> <min> <max> <nbytes>
189  (followed by bytes and newline)
191nv>image -type image -bytes <nbytes>
192  (followed by bytes -- command _preceded_ by newline)
194nv>image -type print -bytes <nbytes>
195  (followed by bytes -- command _preceded_ by newline)
197nv>image -type movie -token <token> -bytes <nbytes>
198  (followed by bytes)
200nv>data tag <dataobj-tag> min <val> max <val> vmin <val> vmax <val>
201   The min,max data values for the data object and the cumulative volume data
202   min,max over all volumes
205Error Replies:
207nv>viserror -bytes <nbytes>
208   <multi-line error string of nbytes>
Note: See TracBrowser for help on using the repository browser.