Drishti - User Manual Draft 2.1
Drishti - User Manual Draft 2.1
Drishti is a real-time interactive volume rendering and animation tool developed by the Ajay Limaye
and the team at the ANU supercomputer facilty "VizLab"
(http://anusf.anu.edu.au/anusf_staff/limaye.html)
The Drishti visualisation suite is comprised of two main applications: the Importer, and the
Renderer; with ancillary programs such as the Painter, the Composite utility and Prithvi. This guide
concerns use of the Dristhi Importer and Renderer only. (In versions prior to 2.1 both these
applications can be invoked using the Drishti Launcher utility.)
Importing files
The Drishti renderer is very restricted in the type of volume files it accepts for processing. All volume
data must be in a particular NetCDF format (file extension .pvl.nc.xxx) before the Renderer can work
on it. To aid transformation of other image types to NetCDF, an Importer program is provided. In
principle the Importer can accept a wide variety of standard image file types. For IMBL the ones of
primary concern are TIFF. Importer is supposed to accept standard multi-file image stacks, and single
file raw volume data. In the most recent version of Importer (2.6.3) even 32bit floating point TIFF
files are accepted. In practice the most success importing has been using an image sequence of 16
bit TIFF files. These can be easily created from X-Tract using the Slice Processing form. The importer
also works with old NetCDF files (extension.nc), and other less popular formats. It can also accept
raw data. Reading raw data requires a separate text file stating the dimensions (in x,y,z) the data
type, and number of header bytes.
Beware, the 'files' open facility opens single files not image sequences. The current version (version
2.6.3) will accept single multi-image 16 bit TIF files. If a subdirectory contains nothing but image
sequence files you can import using 'standard image directory' menu choice. Importer does
allows drag and drop operation. Once imported a tool is provided to alter the voxel value
(grayscale) mapping, before saving to the NetCDF format file. A number of additional options are
available at this stage including filtration and rebinning (or sub-sampling).
The .pvl.nc file is actually an .xml header file, can be drag and dropped into the rendering program.
The data itself is contained in associated files called xxx.pvl.nc.001 etc.
Rendering - options
To make best use of the Drishti renderer it's best to use a machine with a graphics card having
OpenGL capability. Once conversion of volume data to NetCDF is complete this file can then be
loaded into the Renderer.
The state of the program can be saved to an .xml file called a ‘project’. This procedure saves the
transfer function and viewing information, along with pointers to the data files. However, don't
assume that by saving the project you can then delete the data files. The project does not save the
data files themselves.
An important feature to note is the swapping between coarse and fine resolution on-screen
rendering (hi-res and lo-res modes). This is achieved by pressing the F2 function key. Rotating,
positioning and mapping operations will work much faster in the low resolution mode.
Mouse controls within the viewport are: left click and hold=rotate, right click and hold=pan, mouse
wheel=zoom.
Whilst moving the object in the viewport the view resolution is deliberately degraded. Once the
movement is stopped the object will be rendered to a higher resolution. To turn this function off
Bounding boxes
In low-resolution mode (press F2 to toggle) you can alter the boundaries of the volume used for
display. This is achieved by left clicking and dragging the diamond shaped grabs on the faces of the
wireframe box, or using the arrow keys for finer adjustments.
Oblique clip planes can be created. Type 'c' whilst the mouse in the viewport. To delete a clip, hover
over red dot and press 'delete'. Cylindrical clipping is also supported. Use spacebar and ?
In hi-res mode, to make bounding box disappear type 'b'.
Renderer Preferences
Under the Preferences tab you can set the quality of the render can be adjusted. There are also
facilities to add axes and labels, etc.
Animation
Paint
The Paint utility is helpful in generating/modifying the masking information for volumes.
Using Dristhi
Mouse viewing control
Use the mouse to move the camera around the object. You can respectively revolve around, zoom and
translate with the three mouse buttons. Left and middle buttons pressed together rotate around the camera
view direction axis Double clicks automates single click actions: A left button double click aligns the closer
axis with the camera (if close enough). A middle button double click fits the zoom of the camera and the
right button re-centers the scene. A left button double click while holding right button pressed defines the
camera Revolve Around Point.
Button(s) Description
Wheel Zooms camera
Left Rotates camera
Left double click Aligns camera
Right Translates camera
Right double click Centers scene
Middle Zooms camera
Middle double click Shows entire scene
Left & Middle Rotates on screen camera
Shift+Left Adds a point
Shift+Middle Zooms on region for camera
Right double click with Left pressed Resets revolve around point
Left double click with Right pressed Sets revolve around point
Left double click with Middle pressed Zooms on pixel
Right double click with Middle pressed Zooms to fit scene
Numerical keys
0 - Set render resolution to normal - image is rendered at full resolution of the render window.
1 - Toggle shadows.
2 - Toggle Red-Cyan anaglyph mode.
(For this and the following. Use Focus Distance slider in Stereo tab within the Preferences panel
under View to change the focus.)
3 - Toggle Red-Blue anaglyph mode.
4 - Toggle Crosseye stereo mode.
5 - Toggle Crosseye stereo mode compatible with 3D TVs - this will create a squashed image by 50%
for each eye. When displayed on 3D capable TV, the images will be stretched out properly.
6 – N/A
7 – N/A
8 - Set render resolution to very low - image is rendered at quarter resolution of the render window.
9 - Set render resolution to low - image is rendered at half resolution of the render window.
? - Toggle information text at the bottom in image window.
Alt+Return - Toggle full screen display.
Alt+f - Toggle between examine and fly mode for camera.
Default is examine mode.
Alt+s - Save single image. If any of the Red-Cyan or Red-Blue anaglyph modes are active, anaglyph
image will be saved. Same goes for image sequences and movies.
Cntrl+c - Copy a snapshot to clipboard.
Cntrl+h - When keyboard focus is any of the editors under "View" menu, show help for that editor.
Cntrl+s - Save project.
Cntrl+y - Redo the last undone camera position/rotation change. Users can perform unlimited redo.
Cntrl+z - Undo last camera position/rotation change. Users can perform unlimited undo.
Esc - Quit Dristhi
Function keys
F2 - Toggle between Hires and Lowres modes.
Home/End/Shift+Left/Shift+Right - Change drag image stepsize.
PageUp/Pagedown/Shift+Up/Shift+Down - Change still image stepsize.
Alpha keys
Spacebar - Bring up command input dialog.
Tab - Bring up dialog for GiLighting.
a - Toggle axis display.
b - Toggle bounding box.
c - Add a clip plane. Clip plane is always added in the center of the volume.
d – Depth cueing - darking of image depending on distance to the viewer. By default depth cueing is
disabled.
e - Toggle use of prune texture to skip rendering empty (transparent) spaces in the data.
g - Toggle mouse grab for widgets - trisets, networks, paths, clip planes, crop, dissect, blend,
displace.
h - Force normal render even for mouse drags. If drag mode is not active, force to use higher
resolution volume even for mouse drags.
j - Toggle use of drag volume for shadow render.
l - Toggle use of drag volume for render.
Mouse
Mouse Shift+Right click - Change rotation pivot.
Normally the rotation pivot is at the centre of the volume. To change that Shift+Right mouse click on
the desired point to set that point as the new rotation pivot. Rotation pivot can be on any geometry
or volume. To reset the rotation pivot, Shift+Right click on empty region on screen.
Mouse left + middle drag - Rotate object about the axis perpendicular to the screen.
Mouse left button drag - Rotate object
Mouse left double click - Align camera.
Mouse middle double click - Centre scene.
Mouse right button drag - Translate camera.
Mouse right double click - Centre object.
Mouse wheel/middle button drag - Zoom camera.
Commands
addplight
Add point/string light source.
If there is a single point then a point light source is added. When multiple points are available then
string light is added. A string light is nothing but multiple light sources at the nodal points on a path.
Once added the light source can be manipulated. Hover over the light source and press space bar to
bring up the parameter dialog for that light source. Users can change light buffer size, light colour,
shadows etc for the light source.
Press DEL while hovering over the light source to remove it. Light sources are animatable.
addrotationanimation
addrotationanimation [x/y/z] [angle] [frames]
Simplest way to add rotation animation to keyframe editor. Two keyframes will be added to the
keyframe editor. First frame with rotation angle 0 and second frame is set at frame number [frames]
with rotation angle set to [angle].
Default value for axis is x-axis, angle is 360 degrees and frames is also 360.
Examples :
addrotationanimation
addrotationanimation y 90 400
addrotationx
addrotationx a
Rotate camera by a degrees about X-axis from its current orientation.
Example :
addrotationx 30
addrotationy
addrotationy a
Rotate camera by a degrees about Y-axis from its current orientation.
addrotationz
addrotationz a
Rotate camera by a degrees about Z-axis from its current orientation.
autospin
autospin [off]
When left mouse button is quickly dragged and released, model goes into auto-spin mode.
autospin off : switch off auto-spin
autospin : switch on auto-spin
backgroundrender
backgroundrender [no]
Toggle rendering to framebuffer object. Default is render to framebuffer object. By rendering to
framebuffer object, the image is drawn and saved properly even when other windows overlap the
render window.
When backgroundrender is switched off, regions of the render window occluded by other
overlapping windows are not drawn, consequently the images may be saved with parts of
overlapping windows.
When users want to save images with transparent background - set the background colour to black
and switch off backgroundrender.
blend
When two points are specified a blend widget can be added. Blend allow users to blend different
transfer functions within the selected region. When the blend widget is visible press spacebar while
hovering on the widget to change blend parameters via a parameter dialog.
caption
Opens up dialog to add caption. Once the captions are added, they can be edited, moved and
animated.
Hover over a caption to activate it and press spacebar to edit text, colour and rotation.
Also when activated and press "c" to specify normalised screen position for the caption - (0,0) is top
left and (1,1) is bottom right corners.
Users can display text embedded with frame number - $#f, time step number in volume - $#v[0-3],
interpolated values - $n(value) and dial - $d(value), within caption.
For $n(v) & $d(v), the values v will be interpolated for inbetween frames. In the case of $n, these
values will be displayed as numbers, where as in the case of $d, these values will be displayed as a
pie (0-360 degrees). The values for pie can be greater than 360 or less than 0 - the pie displayed will
change accordingly. Caption halocolor is used as background and color is used as foreground for the
pie, but these colors flip with the number of complete turns.
Example :
$4f will display frame numbers with padded 0s.
$3v0 will display time step number for volume 0.
$2v1 will display time step number for volume 1.
$d(90) will display quarter dial with halocolor as background.
$d(450) will also display quarter dial with halocolor as foreground.
"Temperature : $n(3.032)" will display "Temperature : 3.03" if "floatprecision" is set to 2.
"Temperature : $n(3.032)" will display "Temperature : 3" if "floatprecision" is set to 0.
If one keyframe has $n(val1) and subsequent keyframe has $n(val2) then the intermediate
frames will have interpolated values between val1 and val2.
clip
When three points are specified a clip plane can be added.
Clip plane allow users to cull regions in the volume. When the clip plane widget is visible press
spacebar while hovering on the widget to change clip plane parameters via a parameter dialog.
colorbar
Adds color legend / colormap to the display.
By default color legend will display colormap from set 0 transfer functions.
Multiple color legends can be added.
The color legend can be moved around using left mouse button. It can be scaled using right mouse
button.
Hover over the colorbar to select and change it.
Press 0,1,.. to change transfer function set.
Press h/v to change the style - horizontal/vertical.
Press DEL to remove it.
countcells
Count the number of isolated regions, as defined by the transfer function. Only those voxels that
have opacity greater than zero according to the current transfer function will be considered for
locating isolated regions.
deselectall
Deselect all selected/active points.
disablegrabpoints
Disable mouse grabbing for points. Mouse grabbing for points will remain disabled till it is switched
on with "enablegrabpoints".
By default mouse grabbing is enabled for points.
When there is many points, it might happen that while draggning the mouse across the screen, a
point might get activated and moved around quite unintentionally. This option is to avoid that.
This option also helps in slightly increasing rendering speeds while rendering large point clouds.
When mouse grabbing is enabled, before each frame is rendered, a search is performed to find any
grabbable object below the current mouse position. Reducing the number of grabbable object will
reduce this search time.
disablevolumeupdates
Do not upload a new texture even when subvolume is changed.
By default, texture is updated whenever subvolume is changed.
displace - When two points are specified a displace widget can be added. Displace allow users to
move parts within the selected region. When the displace widget is visible press spacebar while
hovering on the widget to change displace parameters via a parameter dialog.
Displace can be morphed into crop/dissect/blend/glow.
dissect
When two points are specified a dissect widget can be added. Dissect allow users to cut open
regions in the volume. When the dissect widget is visible press spacebar while hovering on the
widget to change dissect parameters via a parameter dialog.
Dissect can be morphed into crop/blend/glow/displace.
enablegrabpoints
Enable mouse grabbing for points. Mouse grabbing for points will remain enabled till it is switched
off with "disablegrabpoints".
By default mouse grabbing is enabled for points.
enablevolumeupdates
Enable texture updates whenever subvolume is changed.
By default subvolume updates are enabled.
floatprecision
floatprecision value
Sets the precision for displaying floating point numbers - i.e. maximum number of significant digits.
Default value is 2 - i.e. 2 digits after decimal point.
getangle
Given three points calculate angle in degrees.
getsurfacearea
getsurfacearea [tag]
Calculate surface area by counting surface voxels (similar to getvolume). When getsurfacearea is
supplied with tag, only those surface voxels that have the given tag value are counted.
getvolume
getvolume [tag]
Calculate volume by counting voxels that have non-zero opacity, i.e. count voxels that are shown.
When getvolume is supplied with tag, only those voxels that have the given tag value are counted.
Glow
When two points are specified a glow widget can be added. Glow allow users to emissive glow
within the selected region. When the glow widget is visible press spacebar while hovering on the
widget to change glow parameters via a parameter dialog.
Glow can be morphed into crop/dissect/blend/displace.
grid
grid <columns> <rows>
Add a grid using the selected set of points in column mahor fashion. If none of the points is selected,
the grid is created using all the available points. The order of selection of points affects the grid.
Once a grid is created, points used for creating the grid are removed. The grid can be modified after
it has been created - rows or columns of points can be added and removed from the grid. Individual
points on the grid can be moved.
image2volume
Save the volume rendered image seen on the screen as a 3D volume. Only the opacity part will be
saved as volume.
Volumetric data is constructed by saving opacity information for each slice used to create the final
rendered image. The voxel size for the generated volumetric data is decided by the stepsize (which
determines the number of slices used to generate the final rendered image) and scaling of the image
(ie. how close is camera to the scene).
Users can merge multiple volumes, used bricks to translate/rotate/scale parts of data. Essentially
whatever you see on the screen will be saved in the 3D volume.
interpolatevolumes
Interpolatevolumes [no|color|value]
Linearly interpolates color/voxel values between two volumes in double volume. The interpolation
ratio varies between 0.0 and 1.0 : color/val = (1-frc)*volume1 + frc*volume2. This ratio is
automatically determined based on the frame number and the timestep number of the first volume.
At keyframes this value is always 0.0. Default is no interpolation between the volumes.
To toggle visibility of the landmark dialog hover over any of the landmarks and press space bar.
Landmark dialog allows users to calculate and show distances between landmarks, projections on
line as well as plane. Landmark point and text colour and size can be modified.
Users can save landmarks to a text file. Landmarks can be loaded from .landmark file or a .points file
or from a set of points. Landmarks can be reordered. Just reorder the rows in the table for
landmarks and press "Reorder" button at the top left in the dialog to reorder the landmarks.
Enter the landmark name in the "Name" column of the landmark table. Coordinates in the table can
be changed.
-----
To calculate distance between landmarks use the Distances textbox.
Format for this is point pairs separated by comma.
Following show distances between points 1 and 2, 1 and 4, and 3 and 4.
1 2, 1 4, 3 4
To project landmark distances on a line use the Line Projection textbox.
Format for this is 2 coordinates to define line on which the distances are to be projected, followed
by point pairs and text display distance in pixels from default position. Thw two coordinates defining
the line are separated by comma. The line definition is separated from landmark points definition by
semi-colon. The point pairs and distances are separated by comma. For e.g.
0 0 0, 1 0 0 ; 1 2 0, 1 4 10, 3 4 -20
Here first (0 0 0) and (1 0 0) are points on the line on which the landmark points will be projected.
(1 2 0) - 1 and 2 are landmark points and 0 is the deviation of display text.
(1 4 10) - 1 and 4 are landmark points and 10 is the deviation.
(3 4 -20) - 3 and 4 are landmark points and -20 is the deviation.
To project landmark points on a plane use the Plane Projection textbox.
Format for this is 2 coordinates to define plane on which the distances are to be projected, followed
by points. Thw two coordinates defining the plane are separated by comma. The plane definition is
separated from landmark points definition by semi-colon. The points are separated by comma. For
e.g.
200 200 450, 0 0 1 ; 1, 2, 5
Here first (200 200 450) and (0 0 1) define the projection plane. (200 200 450) is a point on the
plane and (0 0 1) is the plane normal. Users can make use of clip plane to show projection plane -
turn on solid color and "grid" option to make clip plane look good. Plane center and normal for the
clip plane can be obtained from the clip plane dialog.
1, 2, 5 are the landmark points that will be projected on the plane.
-----
Landmarks can be moved around using mouse as well as via the dialog.
Individual landmarks can be deleted by hovering over relevant landmark and pressing "DEL" key.
loadbarepoints
Load points from a file. These points will be shown as tiny green dots. Bare points cannot be
selected and edited. They can only be removed all at once.
Example :
4
0.5 1.0 4.0
3.5 1.0 1.0
2.5 1.0 4.0
0.5 1.5 6.0
loadgrid
Load grid from a file. User will be asked for the text file name from which the points will be loaded.
This file must be a text file with number of points in column and row at the top followed by one
point (i.e. 3 values) per line. The file may contain multiple grids, as shown in the example below.
Once created a grid can be edited.
Example :
2 2
34.5303 20.1612 9.31844
41.9833 21.8794 4.20507
26.2442 17.2637 21.2988
35.3462 19.1446 19.023
5 3
271.732 218.195 222.585
295.348 195.691 225.244
324.001 175.675 233.581
365.62 170.704 230.079
412.551 186.984 229.766
288.938 238.488 198.753
305.034 223.429 200.204
334.305 211.594 202.559
358.957 207.566 203.925
397.39 219.637 199.611
308.406 259.479 172.502
331.812 250.454 173.442
350.776 237.703 181.048
373.104 249.167 176.439
397.585 256.729 169.862
loadimage
Load background image from a file. User will be asked for the image file. This image will be drawn for
the background instead of background color.
loadnetwork
Load network file.
loadpath
Load a path from a file. User will be asked for the text file name from which the points will be
loaded. This file must be a text file with number of points at the top followed by one point (i.e. 3
values) per line. The file may contain multiple paths, as shown in the example below.
Once created a path can be edited.
Paths can also use indexed coordinates. In this case the first line should be "#indexed". The next
line specifies the number of points followed by coordinates of each point on a separate line. After
all the points have been specified, list point number for the individual paths on separate line.
Example :
#indexed
8
75.9695 211.301 2.95066
62.4697 211.301 2.98529
82.5082 211.141 18.0185
76.5653 210.904 40.2637
75.5968 210.772 52.5721
64.0969 210.772 52.6016
74.7241 210.244 102.195
76.5653 210.904 40.2637
07
13
012
45673
loadpathgroup
Load paths from a file. All the paths in the file are treated as a single entity. Points cannot be added
or removed from a pathgroup.
Users can also load indexed paths.
More information can be found under loadpath help.
loadply
Load .ply Stanford formatted polygon file.
loadpoints
loadpoints/loadpoint
Load points from a file. User will be asked for the text file name from which the points will be
loaded. This file should specify number of points on a single line followed by all point coordinates
with one point (i.e. 3 values) per line.
Example :
4
0.5 1.0 4.0
3.5 1.0 1.0
2.5 1.0 4.0
0.5 1.5 6.0
loadvector
Load vector field from a text file.
User will be asked for the text file name from which the points and vectors will be loaded. This file
must be a text file with number of points at the top followed by point and vector per line. Each line
must have atleast 4 values and upto 6 values. The first 3 values will be treated as position. The
missing vector values will be filled with 0. Once loaded user can assign colour gradient based on
vector length.
The vectors are treated just as a special case of pathgroups.
Example :
4
10.5 1.0 4.0 0.0 1.0 0.0
13.5 1.0 1.0 0.3 0.5 0.0
12.5 1.0 4.0 0.0 0.8 2.0
10.5 1.5 6.0 0.4 1.3 0.7
Another example (here the missing y & z vector values will be taken as 0.0)
Users can use this format for loading scatter plot data - pos and value.
4
10.5 1.0 4.0 0.9
13.5 1.0 1.0 0.3
12.5 1.0 4.0 1.0
10.5 1.5 6.0 0.4
masktf
masktf [tfset]
Used for creating the empty space skipping volume. This volume is used as a mask. The rendering is
limited to within the non-zero regions of this mask.
During handling of multiple volumes, "mix" influences the rendering of volume specified by the
volume number in the mix command.
The second parameter is volume number. If not specified volume 0 is assumed. Color and opacity
for all volumes below the volume number are not affected - For example when volume number is 1,
color and opacity for volume 0 is not affected.
Default style is "mix no" - volumes are composite in normal way.
When "color" is specified, affected volume is tinged with colors from transfer functions defined for
volume numbers above it. The opacity/transparency is not modulated. Volume numbers above the
affected volume are not rendered.
When "opacity" is specified, transparency for the affected volume is modulated with transparency
from transfer functions defined for volume numbers above it. The color is not modulated. Volume
numbers above the affected volume are not rendered.
When both "color" and "opacity" are specified both of these are modulated for the affected volume.
When "tag" is specified, affected volume is tinged with tag colors. Volume 1 voxel value is used as
tag value to choose appropriate tag color.
Examples :
mix no - switch of the mixing.
mix color - modulate color for volume 0 by the colors from volumes 1,2,...
mop
mop [option] [parameters]
When only mop is specified, command dialog for mop will open up.
More information on the following options available in MOP command dialog.
Supported options :
average
average [chan1] [chan2] [dst] : dst = (chan1 + chan2)/2
blend
blend [off] : switch on/off blend mode.
When blend mode is switched on, the paint tags that users have painted on the data are used as
reference to the transfer functions for blending. Appropriate transfer functions will be blended in
place of tag colors - tag value refers to the transfer function set. If the tag value is greater than the
total number of transfer function sets, then set 0 is chosen.
When multiple volumes are loaded, appropriate transfer functions from different sets are applied to
the volumes with the tag value refering volume 0 transfer functions. In the case of multiple volumes,
user need to take care of choosing appropriate tag values for painting, so that there is no overlap
between transfer function sets.
carve
carve [off] : switch on/off carve mode.
Using carve users can modify values in channel 1. Only the mask values in a spherical region around
mouse cursor and those that have non-zero channel 1 are affected. Channel 1 values are normally
set for non-zero opacity voxels when mask texture gets updated with transfer function change.
When in carve mode, users can remove spherical portions of the data by using shift+left mouse drag.
Normally shift+left mouse click add a point - this normal function is disabled when carving is
switched on. Only mask values that have non-zero channel 1 are carved.
Shift+right (or Ctrl+left) mouse drag will restore mask buffer values in the spherical region defined by
carve radius. Only mask values that have non-zero channel 1 are restored.
Shift+middle (or Alt+left) mouse drag will set mask buffer values in the spherical region defined by
carve radius to 255.
Users can also employ paths and points for carving operations. Path can also be used to patchup big
holes. Points can be used to fillup large empty spaces before shrinkwrap operations.
Mop functions:
carverad
carverad [radius] [decay] : Specify carve radius and decay parameters. Carving allows users
to remove spherical portions of the data by setting mask buffer values to 0 in that region.
chessboard
chessboard [sz]: Chessboard distance transform. The values start with 0 on the surface of
the object and increasing inside the object. Default value for sz is 1. This operation applies
the following protocol :
cityblock
cityblock [sz]: Cityblock distance transform. The values start with 0 on the surface of the
object and increasing inside the object. Default value for sz is 1. This operation applies the
following protocol :
close
close [sz] [chan]: Morphological closing of channel chan - dilate followed by erode dictated
by size parameter. Default value for sz is 1 and chan is 0.
copy
copy [src] [dst] : Copy mask buffer channel src to mask buffer channel dst. src and dst can be
either 0,1,2.
copyfromsaved
copyfromsaved [src] [dst] : Copy savedbuffer channel src to mask buffer channel dst. If
specified, src and dst can be either 0,1,2. If not specified, all channels from savedbuffer are
copied to mask buffer.
copytosaved
copytosaved [src] [dst] : Copy mask buffer channel src to savedbuffer channel dst. If
specified, src and dst can be either 0,1,2. If not specified, all channels from mask buffer are
copied to savedbuffer.
Dilate
dilate [sz] [chan] : Dilate mask buffer channel chan by sz. Default is dilate by 1 for chan 0.
Dilateedge
diateedge [val1] [val2]: Very similar to erode - values near the edge are set to zero based on
current mask values at those positions. User needs to provide two parameters to this
operation which will specify range of values that can be eroded. If only one value is provided
then the range of values is taken as [1, val]. For e.g.
mop dilateedge 100 : erode edge where values are between 1 and 100
mop dilateedge 230 253 : erode edge where values are between 230 and 253
edge
edge [val] [thickness] : Set edges of mask buffer to val. Parameter thickness controls how
thick edge would be. By default val is 0 and thickness is 1. For e.g.
mop edge 0 2 : set 2-voxel thick edge to 0
erode
erode [sz] [chan] : Erode mask buffer channel chan by sz. Default value for sz is 1 and chan is
0.
fusepatch
hatch
hatch [box | grid] [xn] [xd] [yn] [yd] [zn] [zd]
This action etched a box or grid hatching pattern on channel 0 based on "box" or "grid"
option and integer values xn,xd,yn,yd,zn,zd.
zeroit = true;
if (xn > 0 and xd > 0) zeroit .and. (xcoord%xn < xd);
if (yn > 0 and yd > 0) zeroit .and. (ycoord%yn < yd);
if (zn > 0 and zd > 0) zeroit .and. (zcoord%zn < zd);
if (box selected and zeroit is true) then set value to 0;
if (grid selected and zeroit is false) then set value to 0;
histogram
histogram [chan] : Calculate frequency histogram for channel chan. Default value for chan is
2.
invert
invert : Inverts the mask buffer : 255-current mask value.
itk : Apply ITK (Insight Tool Kit) filters. Several filter are implemented. Channel 1 (which
usually stores opacity information) is passed on to the filter. The results are passed back in
channel 2. The filter is performed over the opacity information - users can tweek data in
channel 1 (for e.g. carving) to achieve the required result.
localmax
Find locally maximum values.
Localthickness
localmax : Find locally maximum values.
Masktf
masktf [tf] : Specify which transfer function set to use for generating the mask buffer. If the
"tf" parameter is -1, then contributing transfer functions from all the sets are considered for
generating the empty space skipping mask buffer. -1 is default value, if no value is specified.
For example :
mop masktf -1 - use transfer function from all the sets.
mop masktf 1 - use transfer funtions from set 1 only.
Max
max [ch1] [ch2] : Take maximum of current mask buffer channel ch1 and saved buffer
channel ch2 - behaves as union of current buffer and saved buffer. If specified, ch1 and ch2
can be either 0,1,2. If not specified, all channels are considered.
Maxvalue
maxvalue : Displays maximum buffer value for each channel.
Min
Nop
nop : Dilate mask buffer by 1. This is the default option.
Open
open [sz] [chan] : Morphological opening of channel chan - erode followed by dilate dictated
by size parameter. Default value for sz is 1 and chan is 0.
Paint
paint [off] : switch on/off paint mode. When in paint mode, users can paint tags on the data.
Tags are shown as colours mixed on top of the transfer function. Tag colours are mixed
based on opacity parameter of the colour, which can be set individually for each tag color.
The tag colours are set via Preferences - Tag Colour menu.
Rdilate
rdilate [val] [sz]: Restricted dilate - dilate mask buffer by "sz" only for voxels with value "val".
Default values for sz and val are 1 and 255 resp.
removepatch
removepatch : remove the patches that were added using paths. Patches are usually added
to help contain the interior region during shrinkwrap process.
sat0
sat0 [val] [chan] : Mask value of channel chan less than val will be set to 0. Some mask value
will be greater than 0 but less than 255 for cityblock, thicken or shrinkwrap operations.
Default value for val is 255 and chan is 0
sat1
sat1 [val] [chan] : Mask value of channel chan greater than val will be set to 255. Some mask
value will be greater than 0 but less than 255 for cityblock, thicken or shrinkwrap operations.
Default value for val is 0 and chan is also 0.
Save
save : Save mask buffer to raw file or image. The data will be save as 1-byte per voxel. The
mask value will range from 0 to 255.
Setvalue
setvalue [val] [minval] [maxval] [chan] : If channel chan maskbuffer value lies between
minval and maxval, then set it to val. Default value for chan is 0.
This option can be used to create a shell - for e.g.
apply distance transform : mop cityblock 20
set voxels away from surface to 0 : mop setvalue 0 5 255 - all 5 and above voxel deep are set
to 0
set non-zero voxels to 1 : mop sat1 0 - (or : mop setvalue 255 0 255)
shrink
shrink [sz] [chan] : Erode channel 0 by sz based on values in channel chan. Erosion operation
is only applied at voxels where value of chan is zero. Default value for sz is 10 and chan is 1.
Shrinkwrap
shrinkwrap [sz]: Very similar to close, except erosion starts from the edge of the subvolume
box. Default value for sz is 1. This operation applies following protocol :
thicken current buffer by sz
set 1-voxel thin edges of the bounding box to 0 thicken 0 valued edge by sz
smoothchannel
smoothchannel [chan] : Apply 3x3x3 averaging for mask buffer values in channel "chan".
Only non-zero values are considered for smoothing.
Swap
swap [ch1] [ch2] : Swap mask buffer channel ch1 and savedbuffer channel ch2.
Tag
tag [val] : Set tag value for painting. Value must be between 0 and 255.
Thicken
thicken [sz]: Very similar to dilate - except mask buffer values decrease as one goes into
empty region away from original surface like distance transform. Default value for sz is 1.
Update
update [off] : Switch on/off updating of mask buffer. By default the mask buffer will be
updated every time a transfer function is changed. Users can switch off these updates and
freeze the mask buffer by specifying "off" or "no" for the parameter. If no parameter is
specified the updates will be swithed on. The mask buffer will always be updated whenever
any morphological operaion (listed below) are performed.
For example :
mop update off - to turn of updates to mask buffer.
mop update - to turn on updates for every transfer function change.
Even when updates to the buffer via transfer function changes are switched off, all
morphological operations do update the current buffer. This enables user to perform
multiple operations one after another.
Xor
xor [ch1] [ch2] : XOR mask buffer channel ch1 with savedbuffer channel ch2. Result is stored
in channel ch1 of mask buffer. If specified, ch1 and ch2 can be either 0,1,2. If not specified,
all channels from mask buffer are xored with savedbuffer.
move
move x y z
Move camera from the current position by x,y,z units.
Example : move 50 20 20
movescreenx
movescreenx x
Move camera horizontally as seen by the viewer from the current position by x units.
Example : movescreenx 10
movescreenz
movescreenz z
Move camera in/out as seen by the viewer from the current position by z units.
movex
movex x
Move camera from the current position by x,0,0 units.
Example : movex 50
Movey
movey y
Move camera from the current position by 0,y,0 units.
movez
movez z
Move camera from the current position by 0,0,z units.
opmod
opmod [front op] [back op]
Opacity modifier to modulate opacity of the transfer functions from front to back of the volume.
This modulating factor is multipled to the opacity value. Default value is 1 for both front and back -
i.e. no modulation.
Example :
opmod 1
opmod 0 1 : front slice opacity will be multiplied by 0.
back slice opacity will be multiplied by 1.
In-betweens will be multiplied by linearly interpolated values between 0 and 1.
opmod 0.1 : multiple all opacity values by 0.1
opmod 0.1 0.5 : front slice opacity will be multiplied by 0.1.
back slice opacity will be multiplied by 0.5.
inbetweens will be multiplied by linearly interpolated values between 0.1 and 0.5.
path - Add a path going through the selected set of points. If none of the points is selected, the path
is created through all the available points.
The order of selection of points affects the path.
Once a path is created points used for creating the path are removed. The path can be modified
after it has been created - points can be added, moved and removed from the path.
point
point x y z
pointcolor
Set the point colour for display. A colour dialog will pop via which colour can be selected.
pointsize
pointsize [size]
Set the point size for display.
Default value is 20 pixels.
removebarepoints
Remove all points that were loaded as bare points.
removepoints
removepoints [all | selected]
Removes all points or the selected set of points.
Example :
removepoints all
removepoints selected
rescale
rescale [sampling] [tag]
Similar to reslice, except the data is saved in the original orientation.
User can specify new volume size.
This facility can be used to upscale as well as downscale the volumes along any of the dimensions.
The amount of sampling is governed by the sampling parameter. Default value is 1 - i.e. take every
voxel. Sampling parameter can take real values - for e.g. 0.5 (upscale by factor of 2), 0.25 (upscale
by factor of 4), 2.5 (downsample by factor of 2.5) etc. Values greater than 1 will result in
downscaling the volume and those less than 1 will result in upscaled volume.
User will be asked to check and set new volume size. This facility can be used to upscale as well as
downscale the volumes along any of the dimensions.
Applying this operation to double volumes gives the ability to perform volume calculations such as
A-B, |A-B|, A+B, min(A,B), max(A,B), A*B and A/B, where A and B are voxel value/opacity of
respective volumes.
resetfov - Reset the (vertical) field of view to default value. Default value is 45 degrees.
resetimage - Reset background image. No background image will be drawn, instead the background
color will be used to the fill the background.
Resettempdir
tempdir/resettempdir
Set temporary directory to store temporary files created by the program.
When not set (which is default), these files are stored in the directory where .pvl.nc file resides.
Give "resettempdir" to reset temporary directory.
reslice
reslice [sampling] [tag]
Rotate
rotate x y z a
Rotate camera by a degrees about the axis defined by vector x,y,z. The vector x,y,z is internally
normalized.
Example : rotate 0.1 1.0 0.5 40
Rotatescreenx
rotatescreenx a
Rotate camera by a degrees about horizontal screen axis from its current orientation.
Example :
rotatescreenx 30
rotatescreeny
rotatescreeny a
Rotate camera by a degrees about vertical screen axis from its current orientation.
Rotatescreenz
rotatescreenz a
Rotate camera by a degrees about axis perpendicular to screen from its current orientation.
Rotate
rotatex a
Rotate camera by a degrees about X-axis.
Example : rotatex 30
Rotate
rotatey a
Rotate camera by a degrees about Y-axis.
Rotatez
rotatez a
Rotate camera by a degrees about Z-axis.
Savepath
Save all paths into a file. User will be asked for the text file name into which the path points will be
saved. For each path this file will have number of coordinates at the top followed by point
coordinates.
Scalebar
scalebar [voxels/voxelunit]
Adds scale bar to the display. Multiple scale bars can be added.
By default scalebar will display 100 voxels/voxelunits across. If the dataset has voxelunits specified in
the volume information, then the number is taken in voxelunits (i.e. micron, cm, mm etc), otherwise
it is taken to mean number of voxels.
The scale is correct for orthographic projection.
For perspective projection the scale is correct for the central portion of the object. In perspective
projection, the object scaling will be larger for closer regions than for the away regions. Hence the
scalebar displays the scale that is correct at the center of the object.
Hover over scalebar to activate it.
The scalebar can be moved around.
Press h/v to change the style - horizontal/vertical.
Press u/d/l/r to change the text position - up/down/left/right for appropriate style.
Press DEL to remove it.
Scalebars positions can be animated.
Examples :
scalebar 10 - If voxelunits are specified then the scalebar is drawn such that it shows 10 voxelunits
across otherwise it will be 10 voxels across.
Search
search text
Search keyframes for text within captions. The captions could be either normal caption on screen or
those that are added using paths. If found, first keyframe with given search text within captions is
displayed and current frame is set to that keyframe.
Setfov
setfov fov
Set (vertical) field of view, fov, in degrees. Default value is 45 degrees.
Setlod
setlod lod
Set the highest Level of Detail (lod) to load in hires mode. The highest level of detail is the amount of
subsampling needed to fit the selected subvolume in the available texture memory. Default value is
1 (i.e. no subsampling required - load full resolution whenever possible). The program will
automatically calculate level of detail that is needed taking into account the user defined limit. For
e.g. To set level 3 subsampled volume as the most detailed version : setlod 3
Tempdir
tempdir/resettempdir
Set temporary directory to store temporary files created by the program.
When not set (which is default), these files are stored in the directory where .pvl.nc file resides.
Give "resettempdir" to reset temporary directory.
Texsizereducefraction
texsizereducefraction frc
Translate
translate x y z
Translate camera to the x,y,z position.
Example :
translate 200 250 200
translatex
translatex x
Translate camera to the x,0,0 position.
Example : translatex 200
Translate
translatey y
Translate camera to the 0,y,0 position.
Translatez
translatez z
Translate camera to the 0,0,z position.