================================================================================ ================================================================================ Protocol for nanovis render server. Commands take the general form of command and arguments using Tcl syntax and are terminated by a newline. Some command arguments expect a Tcl list which can be sent by enclosing the list in curly braces to prevent the interpreter from splitting the list into multiple arguments. Likewise, strings with spaces should be quoted or enclosed in curly braces. In the documentation below, arguments are indicated by angle brackets and optional arguments are surrounded by question marks -- the brackets and question marks are not part of the protocol and should not be included in argument strings. The arguments shown in angle brackets should be replaced with a string (where there are fixed choices this document indicates valid values by separating them with pipe symbols), a list in Tcl syntax, or a numeric value. Boolean arguments can take the form of 0|1, true|false, or yes|no. Since the protocol commands are executed in a Tcl interpreter, Tcl code such as math expressions in expr commands enclosed in square brackets are also allowed. Since the interpreter is a "safe" interpreter, some Tcl commands that could cause security issues may not be available for use. Some commands such as the 'flowvis add' commands create Tcl objects within the server's interpreter. The name sent as an argument when adding the object can then be used as a protocol command. For example, the string sent as the argument to 'flowvis add' can then be used in place of in the commands documented below. The flow object name also creates a volume name that can be used in volume and cutplane commands, but in that case the name is used as an argument to the volume or cutplane commands rather than as the command itself. When binary data is to be sent, it should follow the newline after a command that indicates incoming data including a byte count argument. ================================================================================ ================================================================================ Requests: ================================================================================ axis visible grid axiscolor grid axisname grid linecolor grid visible camera angle camera orient camera pan camera zoom screen Set size of rendered images snapshot Render a 2k x 2k image (offscreen buffer) transfunc define {colors} {alpha} colors => 1 line each of "value r g b" alpha => 1 line each of "value alpha" value => [0,1] legend Request render of transfer function heightmap data visible heightmap data follows heightmap linecontour visible heightmap linecontour color heightmap tranfunc heightmap cull heightmap polygon flow add is an object name to use in commands In addition, a volume is added with the same name which can be used in volume and cutplane commands see ' configure' for switch options flow delete flow exists flow goto flow names flow next flow reset flow video -bitrate -format -framerate -height -numframes -width box add See ' box configure' for switches box configure -color <{r g b a}> -corner1 <{x y z}> -corner2 <{x y z}> -hide -linewidth box delete box names configure -arrows -axis -diffuse -hide -opacity -outline -position val = [0,100], or %val = [0,1] -slice -specular -transferfunction -volume data file Load a data file. fileName is path to file on server data follows Send flow data. Data bytes follow the newline after the command legend particles add see ' particles configure' for switches particles configure -axis -color <{r g b a}> -hide -position val = [0,100], or %val = [0,1] -size volume axis label volume data state volume data follows volume delete volume exists volume names volume outline color volume outline state|visible volume shading diffuse volume shading isosurface volume shading opacity volume shading specular volume shading transfunc volume state volume animation volumes volume animation start volume animation stop volume animation clear volume animation capture numframes cutplane position Set the position of a volume cutplane. Names is an optional list of volume names. relval = [0,1] cutplane state Set the axis (normal) of a volume cutplane. Names is an optional list of volume names. up Set orientation of volumes --- Colormaped Plane (if PLANE_CMD=1 in config.h) --- plane active Set the active plane [0,9], or -1 to disable Plane must first be added and linked plane add followed by image data: w * h floats on stdin planeIdx: [0,9] plane link Enable a plane for rendering using the given transfer function. Plane must first be added. --- End Colormaped Plane (if PLANE_CMD=1 in config.h) --- ================================================================================ Replies: ================================================================================ nv>legend (followed by bytes and newline) nv>image -type image -bytes (followed by bytes -- command _preceded_ by newline) nv>image -type print -bytes (followed by bytes -- command _preceded_ by newline) nv>image -type movie -token -bytes (followed by bytes) ================================================================================ Error Replies: ================================================================================ Prefixed with "NanoVis Server Error: " Currently not guaranteed to be on a single line ================================================================================