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

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

Add protocol to change atom/bond radius scale factor for VTK molecules

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