source: trunk/packages/vizservers/vtkvis/protocol.txt @ 2757

Last change on this file since 2757 was 2757, checked in by ldelgass, 13 years ago

Add volume quality command to adjust relative sampling distance (quality is in
[0,1] range and is used to adjust sample distance relative to volume spacing.
Also first pass at supporting point cloud input to volume renderer.

  • Property svn:eol-style set to native
File size: 18.1 KB
Line 
1================================================================================
2On connection, send 32-bit little endian int indicating memory requirements
3(comsumed by nanoscale server before exec-ing vtkvis)
4================================================================================
5Requests:
6
7screen bgcolor <r> <g> <b>
8screen size <width> <height>
9
10renderer clipplane <axis> <ratio> <direction>
11         Set a user clipping plane, ratio is [0,1] and is always interpreted as
12         0 = min_bound, 1 = max_bound, regardless of direction.  Sign of
13         direction determines normal of clipping plane.  User clip planes do not
14         apply if camera mode is image.
15renderer depthpeel <bool>
16         Set use of depth peeling algorithm for transparency
17renderer light2side <bool>
18         Toggle use of two-sided lighting (controls if backfaces are lit with a
19         flipped normal)
20renderer render
21         Force a new image to be rendered - use for advancing animation
22
23axis color <r> <g> <b>
24     Set color of axis lines, labels, titles, ticks
25axis flymode <mode>
26     <mode> = static_edges|static_triad|outer_edges|furthest_triad|closest_triad
27axis grid <bool>
28axis labels <axis> <bool>
29     Toggle visibility of axis labels
30     <axis> = x|y|z|all
31axis name <axis> <title>
32axis tickpos <position>
33     Set position of ticks on 3D axes (not implemented for 2D axes)
34     <position> = inside|outside|both
35axis ticks <axis> <bool>
36     Toggle visibility of axis tick marks
37     <axis> = x|y|z|all
38axis units <axis> <units>
39     Currently only supported when camera mode is not image mode
40axis visible <axis> <bool>
41     <axis> = x|y|z|all
42     Note: 'all' means all enabled axes.  To force all axes on, set each axis on
43     individually -- however, it is best to let the server determine which of
44     the individual axes are enabled based on the dataset bounds.
45
46camera get
47       Request current camera parameters
48camera mode <mode>
49       <mode> = persp|ortho|image
50camera orient <quatW> <quatX> <quatY> <quatZ>
51       Set scene orientation using a quaternion
52camera ortho <coordMode> <x> <y> <width> <height>
53       <coordMode> = pixel|world
54       Supply bounds of plot area for image camera mode
55camera pan <x> <y>
56       <x,y> viewport coordinates (window center at 0,0).  Positive x pan
57       means pan object to right (camera to left).  Positive y pan means
58       pan object down (camera up).  For example a pan of 0.5, 0.5 would
59       move the object center to the lower right corner of the window
60camera reset <?all?>
61       Option all resets orientation/rotation as well as pan/zoom/clip range
62camera rotate <yaw> <pitch> <roll>
63       Specify relative rotation in Euler angles
64camera set <posX> <posY> <posZ> <focalPtX> <focalPtY> <focalPtZ> <viewUpX> <viewUpY> <viewUpZ>
65       Set camera parameters: camera position, focal point and view up vector
66camera zoom <z>
67       Specify zoom ratio.  z > 1 is a zoom in, z < 1 is zoom out. z = 1
68       resets to default.
69
70colormap add <colorMapName> <colorMap> <opacityMap>
71         colorMap = Tcl list of {value r g b} control points
72         opacityMap = Tcl list of {value alpha} control points
73colormap delete <?colorMapName?>
74
75legend <colormapName> <legendType> <fieldName> <legendTitle> <width> <height> <numLabels> <?datasetName?>
76       Causes legend to be rendered and written back with labels and title
77       (title may be left blank)
78       <legendType> = scalar|vmag|vx|vy|vz
79       <numLabels> Can be zero or more 'tick' value labels
80       If datasetName is omitted, the cumulative data range of all data sets
81       will be used to label the legend -- otherwise, the current setting of
82       'dataset maprange' will be used to determine if the individual dataset
83       range or cumulative range will be used.
84
85dataset add <datasetName> data follows <nbytes>
86dataset color <r> <g> <b> <?datasetName?>
87        Set color of outline bounding box
88dataset delete <?datasetName?>
89dataset getscalar world <x> <y> <z> <datasetName>
90dataset getscalar pixel <x> <y> <datasetName>
91dataset getvector world <x> <y> <z> <datasetName>
92dataset getvector pixel <x> <y> <datasetName>
93        Use pixel for image camera mode
94dataset maprange <val>
95        <val> = all|visible|separate
96        Controls if data range for colormapping and contours is based on
97        cumulative range of all datasets ("all"), only visible datasets
98        ("visible") or each individual dataset ("separate").  Defaults to
99        "all"
100dataset opacity <val> <?datasetName?>
101dataset outline <bool> <?datasetName?>
102        Toggle wireframe outline of dataset's bounding box
103dataset scalar <scalarName> <?datasetName?>
104        Set the active scalar field to plot
105dataset vector <vectorName> <?datasetName?>
106        Set the active vector field to plot
107dataset visible <bool> <?datasetName?>
108
109contour2d add numcontours <n> <?datasetName?>
110          Generate evenly spaced contours including range endpoints.  See also
111          'dataset maprange' command.
112contour2d add contourlist <list> <?datasetName?>
113          list = {isoval1 isoval2 isoval3...}
114contour2d color <r> <g> <b> <?datasetName?>
115          synonym for linecolor
116contour2d delete <?datasetName?>
117contour2d lighting <bool> <?datasetName?>
118contour2d linecolor <r> <g> <b> <?datasetName?>
119          synonym for color
120contour2d linewidth <val> <?datasetName?>
121contour2d opacity <val> <?datasetName?>
122contour2d orient <qw> <qx> <qy> <qz> <?dataSetName?>
123contour2d pos <x> <y> <z> <?dataSetName?>
124contour2d scale <sx> <sy> <sz> <?dataSetName?>
125contour2d visible <bool> <?datasetName?>
126
127contour3d add numcontours <n> <?datasetName?>
128          Generate evenly spaced contours including range endpoints.  See also
129          'dataset maprange' command.
130contour3d add contourlist <list> <?datasetName?>
131          list = {isoval1 isoval2 isoval3...}
132contour3d ccolor r g b <?datasetName?>
133contour3d colormap <colorMapName> <?dataSetName?>
134contour3d delete <?datasetName?>
135contour3d edges <bool> <?datasetName?>
136contour3d lighting <bool> <?datasetName?>
137contour3d linecolor <r> <g> <b> <?datasetName?>
138contour3d linewidth <val> <?datasetName?>
139contour3d opacity <val> <?datasetName?>
140contour3d orient <qw> <qx> <qy> <qz> <?dataSetName?>
141contour3d pos <x> <y> <z> <?dataSetName?>
142contour3d scale <sx> <sy> <sz> <?dataSetName?>
143contour3d visible <bool> <?datasetName?>
144contour3d wireframe <bool> <?datasetName?>
145
146cutplane add <?dataSetName?>
147cutplane axis <axis> <bool> <?dataSetName?>
148         Toggle visibility of the 3 principal axis cutplanes
149cutplane ccolor r g b <?datasetName?>
150         Set color of outline bounding box
151cutplane colormap <colorMapName> <?dataSetName?>
152cutplane colormode <scalar|vmag|vx|vy|vz> <fieldName> <?datasetName?>
153         Set the field used to color the object.  'scalar' uses
154         the active scalar field.  'vmag' uses the magnitude of the current
155         vector field, and 'vx','vy','vz' use the corresponding component of
156         the active vector field.
157cutplane delete <?dataSetName?>
158cutplane edges <bool> <?dataSetName?>
159cutplane lighting <bool> <?dataSetName?>
160cutplane linecolor <r> <g> <b> <?dataSetName?>
161cutplane linewidth <width> <?dataSetName?>
162cutplane opacity <value> <?dataSetName?>
163cutplane orient <qw> <qx> <qy> <qz> <?dataSetName?>
164cutplane outline <bool> <?dataSetName?>
165         Toggle rendering of cutplane outlines
166cutplane pos <x> <y> <z> <?dataSetName?>
167cutplane scale <sx> <sy> <sz> <?dataSetName?>
168cutplane slice axis ratio <?dataSetName?>
169         For 3D data, select a slice along a principle axis of the volume. The
170         ratio is [0,1]
171cutplane visible <bool> <?dataSetName?>
172cutplane wireframe <bool> <?datasetName?>
173
174glyphs add <shape> <?dataSetName?>
175       See 'glyphs shape' for list of shapes
176glyphs ccolor r g b <?datasetName?>
177glyphs colormap <colorMapName> <?dataSetName?>
178glyphs colormode <scalar|vmag|vx|vy|vz|ccolor> <fieldName> <?dataSetName?>
179       Set the color mode: color by scalar field or
180       vector magnitude -- uses the current color map,
181       or ccolor for constant color
182glyphs delete <?dataSetName?>
183glyphs edges <bool> <?datasetName?>
184glyphs gscale <scaleFactor> <?datasetName?>
185       Set glyph scaling factor
186glyphs lighting <bool> <?datasetName?>
187glyphs linecolor <r> <g> <b> <?datasetName?>
188glyphs linewidth <val> <?datasetName?>
189glyphs normscale <bool> <?datasetName?>
190       Control if data values are normalized to [0,1] range before applying
191       glyph scaling factor (gscale)
192glyphs opacity <val> <?datasetName?>
193glyphs orient <qw> <qx> <qy> <qz> <?dataSetName?>
194glyphs pos <x> <y> <z> <?dataSetName?>
195glyphs scale <sx> <sy> <sz> <?dataSetName?>
196glyphs shape <arrow|cone|cube|cylinder|dodecahedron|icosahedron|line|octahedron|sphere|tetrahedron> <?datasetName?>
197glyphs smode <scalar|vmag|vcomp|off> <fieldName> <?dataSetName?>
198       Set the scaling mode: use the scalar field, vector magnitude
199       (uniform scale), vector components, or disable scaling
200glyphs visible <bool> <?datasetName?>
201glyphs wireframe <bool> <?datasetName?>
202
203heightmap add numcontours <n> <heightScale> <?dataSetName?>
204          Generate evenly spaced contours including range endpoints.  See also
205          'dataset maprange' command.
206heightmap add contourlist <list> <heightScale> <?dataSetName?>
207          list = {isoval1 isoval2 isoval3...}
208heightmap colormap <colorMapName> <?dataSetName?>
209heightmap contourlist <list> <?dataSetName?>
210heightmap delete <?dataSetName?>
211heightmap edges <bool> <?dataSetName?>
212heightmap heightscale <value> <?dataSetName?>
213heightmap isolinecolor <r> <g> <b> <?dataSetName?>
214heightmap isolines <bool> <?dataSetName?>
215heightmap isolinewidth <width> <?dataSetName?>
216heightmap lighting <bool> <?dataSetName?>
217heightmap linecolor <r> <g> <b> <?dataSetName?>
218heightmap linewidth <width> <?dataSetName?>
219heightmap numcontours <n> <?dataSetName?>
220heightmap opacity <value> <?dataSetName?>
221heightmap orient <qw> <qx> <qy> <qz> <?dataSetName?>
222heightmap pos <x> <y> <z> <?dataSetName?>
223heightmap scale <sx> <sy> <sz> <?dataSetName?>
224heightmap slice axis ratio <?dataSetName?>
225          For 3D data, select a slice along a principle axis of the volume. The
226          ratio is [0,1]
227heightmap surface <bool> <?dataSetName?>
228          Toggle rendering of colormapped surface (mountain plot or cutplane)
229heightmap visible <bool> <?dataSetName?>
230heightmap wireframe <bool> <?datasetName?>
231
232lic add <?datasetName?>
233lic colormap <colormapName> <?datasetName?>
234lic delete <?datasetName?>
235lic edges <bool> <?datasetName?>
236lic lighting <bool> <?datasetName?>
237lic linecolor <r> <g> <b> <?datasetName?>
238lic linewidth <val> <?datasetName?>
239lic opacity <val> <?datasetName?>
240lic orient <qw> <qx> <qy> <qz> <?dataSetName?>
241lic pos <x> <y> <z> <?dataSetName?>
242lic scale <sx> <sy> <sz> <?dataSetName?>
243lic slice <axis> <ratio> <?datasetName?>
244    For 3D data, select a slice along a principle axis of the volume. The
245    ratio is [0,1]
246lic visible <bool> <?datasetName?>
247
248molecule add <?datasetName?>
249molecule atoms <bool> <?datasetName?>
250         Toggle rendering of atoms
251molecule bonds <bool> <?datasetName?>
252         Toggle rendering of bonds
253molecule colormap <colormapName> <?datasetName?>
254molecule delete <?datasetName?>
255molecule edges <bool> <?datasetName?>
256molecule lighting <bool> <?datasetName?>
257molecule linecolor <r> <g> <b> <?datasetName?>
258molecule linewidth <val> <?datasetName?>
259molecule opacity <val> <?datasetName?>
260molecule orient <qw> <qx> <qy> <qz> <?dataSetName?>
261molecule pos <x> <y> <z> <?dataSetName?>
262molecule rscale <val> <?dataSetName?>
263         Atom radius scaling
264         val = van_der_walls|covalent|atomic|none
265molecule scale <sx> <sy> <sz> <?dataSetName?>
266molecule visible <bool> <?datasetName?>
267molecule wireframe <bool> <?datasetName?>
268
269polydata add <?datasetName?>
270polydata color <r> <g> <b> <?datasetName?>
271polydata delete <?datasetName?>
272polydata edges <bool> <?datasetName?>
273polydata lighting <bool> <?datasetName?>
274polydata linecolor <r> <g> <b> <?datasetName?>
275polydata linewidth <val> <?datasetName?>
276polydata opacity <val> <?datasetName?>
277polydata orient <qw> <qx> <qy> <qz> <?dataSetName?>
278polydata pos <x> <y> <z> <?dataSetName?>
279polydata ptsize <size> <?dataSetName?>
280polydata scale <sx> <sy> <sz> <?dataSetName?>
281polydata visible <bool> <?datasetName?>
282polydata wireframe <bool> <?datasetName?>
283
284pseudocolor add <?datasetName?>
285pseudocolor ccolor r g b <?datasetName?>
286pseudocolor colormap <colormapName> <?datasetName?>
287pseudocolor colormode <scalar|vmag|vx|vy|vz|ccolor> <fieldName> <?datasetName?>
288            Set the field used to color the object.  'ccolor' means to use
289            the constant color defined by the ccolor subcommand.  'scalar' uses
290            the active scalar field.  'vmag' uses the magnitude of the current
291            vector field, and 'vx','vy','vz' use the corresponding component of
292            the active vector field.
293pseudocolor delete <?datasetName?>
294pseudocolor edges <bool> <?datasetName?>
295pseudocolor lighting <bool> <?datasetName?>
296pseudocolor linecolor <r> <g> <b> <?datasetName?>
297pseudocolor linewidth <val> <?datasetName?>
298pseudocolor opacity <val> <?datasetName?>
299pseudocolor orient <qw> <qx> <qy> <qz> <?dataSetName?>
300pseudocolor pos <x> <y> <z> <?dataSetName?>
301pseudocolor scale <sx> <sy> <sz> <?dataSetName?>
302pseudocolor visible <bool> <?datasetName?>
303pseudocolor wireframe <bool> <?datasetName?>
304
305streamlines add <?datasetName?>
306streamlines ccolor <r> <g> <b> <?datasetName?>
307            Set the constant color of streamlines used for color mode 'ccolor'
308streamlines colormap <colormapName> <?datasetName?>
309            Colormap used to color streamlines/tubes/ribbons by vector magnitude
310streamlines colormode <scalar|vmag|vx|vy|vz|ccolor> <fieldName> <?datasetName?>
311            Set the field used to color the streamlines.  'ccolor' means to use
312            the constant color defined by the ccolor subcommand.  'scalar' uses
313            the active scalar field.  'vmag' uses the magnitude of the current
314            vector field, and 'vx','vy','vz' use the corresponding component of
315            the active vector field.
316streamlines delete <?datasetName?>
317streamlines edges <bool> <?datasetName?>
318            Turn on/off edges for tubes, ribbons
319streamlines length <?datasetName?>
320            Set maximum length in world coordinates of streamlines
321streamlines lighting <bool> <?datasetName?>
322streamlines linecolor <r> <g> <b> <?datasetName?>
323            Set color of edges for tubes, ribbons (lines are colored by colormap)
324streamlines lines <?datasetName?>
325            Set rendering type to polylines
326streamlines linewidth <val> <?datasetName?>
327streamlines opacity <val> <?datasetName?>
328streamlines orient <qw> <qx> <qy> <qz> <?dataSetName?>
329streamlines pos <x> <y> <z> <?dataSetName?>
330streamlines ribbons <width> <angle> <?datasetName?>
331            Set rendering type to ribbons, width is minimum half-width, angle is
332            degrees offset from normal orientation
333streamlines scale <sx> <sy> <sz> <?dataSetName?>
334streamlines seed color <r> <g> <b> <?datasetName?>
335streamlines seed disk <centerX> <centerY> <centerZ> <normalX> <normalY> <normalZ> <radius> <innerRadius> <numPoints> <?dataSetName?>
336            Create a disk seed area with optional hole, filled with randomly
337            placed points
338streamlines seed fmesh <numPoints> data follows <nbytes> <?datasetName?>
339            Fill a mesh supplied as a VTK data file with randomly placed points
340streamlines seed fpoly <centerX> <centerY> <centerZ> <normalX> <normalY> <normalZ> <angle> <radius> <numSides> <numPoints> <?dataSetName?>
341            Create a regular n-sided polygonal seed area filled with randomly
342            placed points
343streamlines seed mesh data follows <nbytes> <?datasetName?>
344            Use points of a mesh supplied as a VTK data file
345streamlines seed numpts <?datasetName?>
346            If seeds have been created using 'seed random' or 'seed fmesh',
347            this command can be used to change the number of randomly
348            distributed seeds
349streamlines seed points <?datasetName?>
350            Use points of the streamlines' dataset mesh
351streamlines seed polygon <centerX> <centerY> <centerZ> <normalX> <normalY> <normalZ> <angle> <radius> <numSides> <?dataSetName?>
352            Create seed points from vertices of a regular n-sided polygon
353streamlines seed rake <startX> <startY> <startZ> <endX> <endY> <endZ> <numPoints> <?datasetName?>
354streamlines seed random <numPoints> <?datasetName?>
355            Fill the streamlines' dataset mesh with randomly placed points
356streamlines seed visible <bool> <?datasetName?>
357streamlines tubes <numSides> <radius> <?datasetName?>
358            Set rendering type to tubes, numSides is number of sides of tubes,
359            radius is minimum tube radius
360streamlines visible <bool> <?datasetName?>
361
362volume add <?datasetName?>
363volume colormap <colorMapName> <?datasetName?>
364volume delete <?datasetName?>
365volume lighting <bool> <?datasetName?>
366volume orient <qw> <qx> <qy> <qz> <?dataSetName?>
367volume pos <x> <y> <z> <?dataSetName?>
368volume quality <val> <?datasetName?>
369       val = [0,1]
370volume scale <sx> <sy> <sz> <?dataSetName?>
371volume shading ambient <coeff> <?datasetName?>
372volume shading diffuse <coeff> <?datasetName?>
373volume shading specular <coeff> <power> <?datasetName?>
374volume visible <bool> <?datasetName?>
375
376================================================================================
377Replies:
378
379nv>camera set <posX> <posY> <posZ> <focalPtX> <focalPtY> <focalPtZ> <viewUpX> <viewUpY> <viewUpZ>
380   Reply to "camera get"
381nv>image -type image -bytes <nbytes>
382  <binary RGB data>
383nv>image -type image -bbox {x y w h} -bytes <nbytes>
384  <binary RGB data>
385  The bounding box of the 2D image camera zoom region is supplied
386  Note: The bbox coordinates are in the form used by 'camera ortho world ...':
387  x,y - world coordinate of lower left corner, w,h - width height in world coords
388  This form is currently used only if the camera mode is set to 'image'.
389nv>legend <colormapName> <title> <rmin> <rmax> <nbytes>
390  <binary RGB data>
391nv>dataset scalar world <x> <y> <z> <value> <dataSetName>
392nv>dataset scalar pixel <x> <y> <value> <dataSetName>
393nv>dataset vector world <x> <y> <z> <valueX> <valueY> <valueZ> <dataSetName>
394nv>dataset vector pixel <x> <y> <valueX> <valueY> <valueZ> <dataSetName>
395
396================================================================================
397Errors:
398
399Prefixed with "VtkVis Server Error: "
400Currently not guaranteed to be on a single line
Note: See TracBrowser for help on using the repository browser.