Automated Presentation of directory src/exampleCode/volumeRendering/volren-6/doc/text/

HUB | Up | Download | Pheedbak | Tree | Topic | A-Z | Search | Hot | New




     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



     NAME
	  volren - Interactive Volume Renderer

     SYNOPSIS
	  volren [intfopts] -- [volopts] -- object [-- object [...]]

     DESCRIPTION
	  Volume visulization is a powerful technique for displaying
	  and understanding three (and four) dimensional scalar	data
	  sets.	 Such data sets	are common in medicine,	physics,
	  engineering, biology,	and chemistry.	Volume rendering when
	  performed using traditional CPU based	algorithms can take
	  minutes to hours to compute.	However, the real power	of
	  volume visualization is only realized	if it can be done at
	  interactive rates (at	least 10 frames	per second).  Volren
	  is a tool which does this.  It uses a	combination of three
	  dimensional texture mapping and high speed textured polygon
	  rendering found in Silicon Graphics' Indigo2 Impact, Onyx
	  Reality Engine, and Onyx Infinite Reality architectures.

     JUSTIFICATION
	  Nearly every technical discipline deals with three
	  dimensional volumetric data.	By three dimensional
	  volumetric data we mean data that is defined for every point
	  (or at least a dense set of points) in some chunk of 3
	  space.  Mechnical engineering	has volumetric data when
	  dealing with strain on a three dimensional part.  Chemists
	  and molecular	biologists image and synthesize	three
	  dimensional density functions.  Radiologists look at three
	  dimensional CAT (CT) scan data.  Physists look at everything
	  from whole galaxies to minute	particles all of which are
	  defined volumetrically.  The auto industry and aerospace
	  industry study three dimensional wind	flows which can	be
	  viewed volumetrically.  And lastly, weird ephemeral, cloud
	  like renderings are useful for special effects.

     INTERFACE
	  Volren starts	by reading in the slices and displaying	them
	  as it	does so.  Once all slices of all volumes are read in,
	  Volren reformats the data into bricks	so that	it can be
	  loaded into texture memory.  This formatting takes some
	  time.	 Once this has been completed the program displays the
	  data in the rendering	window.

	The Rendering Window
	  There	are twelve supported commands in the Rendering Window.
	  Each one is associated with a	mouse button either with or
	  without either the shift or ctrl key pressed.	 The functions
	  are summarized in the	table below.  More detailed
	  descriptions follow the table.  In the table,	Btn1 is	the
	  left mouse button.  Btn2 and Btn3 are	the middle and right
	  mouse	buttons	respectively.



     Page 1					     (printed 4/23/96)






     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



	       Btn1		 Rotate	World
	       Btn2		 Select	Clip Plane / Translate Point
	       Btn3		 Rotate	Selected Clip Plane
	       Shft Btn1	 Zoom World
	       Shft Btn2	 Place Point
	       Shft Btn3	 Translate Selected Clip Plane
	       Ctrl Btn1	 Rotate	Selected Volume
	       Ctrl Btn2	 XY Translate Selected Volume
	       Ctrl Btn3	 Z Translate Selected Volume
	       Ctrl Shft Btn1	 Scale Selected	Volume

	  The left mouse button	is used	to move	the world (all
	  volumes, geometry, and clip planes).	Pressing and dragging
	  this button rotates the world.  If you release the button
	  while	you are	dragging the world will	continue to spin in
	  the direction	it was last rotating.  The spin	velocity is
	  dictated by the speed	at which the mouse was moving when the
	  button was released.

	  Pressing the middle mouse button selects the nearest plane
	  at the current mouse position.  This allows a	quick, simple
	  way to select	a plane.  This plane will then be affected by
	  all subsequent plane commands	(right mouse).	The current
	  plane	may also be selected via the "Clip Plane" menu item
	  under	the "Select" menu.  The	plane selection	command	only
	  works	when the clip planes are enabled.  If the middle mouse
	  button is pressed while the mouse is on or near a point,
	  vertical motion of the mouse will be used to translate that
	  point	rather than selecting a	plane.

	  The right mouse button is used to rotate the currently
	  selected clip	plane.	The clip plane is moved	just as	the
	  world	is when	the left mouse button is used, via a virtual
	  trackball model.  This command only works if clip planes are
	  enabled.

	  By pressing shift and	the left mouse button, the world can
	  be zoomed.  Dragging the mouse up and	down while holding the
	  left button down will	zoom in	and out.

	  Points may be	placed in three-space by clicking with middle
	  mouse	button while holding shift.  Points may	only be	placed
	  when the clip	planes are shown.  If clip planes are
	  disabled, pressing the middle	mouse button with shift	will
	  cause	generate a warning message.  If	clip planes are
	  enabled, points may be placed	simply by clicking in the
	  Rendering Window on a	clip plane.  A point will be placed in
	  three-space on the nearest clip plane.  Dragging the mouse
	  will cause the point to move,	following the mouse.  The
	  nearest plane	(the one that the point	will be	placed on)
	  will become the selected plane and it	will highlight.	 If
	  the mouse is moved to	a place	outside	all volumes or where



     Page 2					     (printed 4/23/96)






     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



	  no plane exists the point will disappear.  If	the mouse is
	  released at this point then no point will be created.	 To
	  edit points, simply shift middle click on a point already on
	  the screen.  This allows grabbing a point rather then
	  creating a new one.  This feature may	make it	difficult to
	  place	numerous points	near each other.  To force the
	  creation of a	new point, shift middle	click outside the
	  volumes and drag the new point to the	position desired.
	  This method will always create a new point.

	  The currently	selected clip plane can	also be	moved in a
	  constrained fashion.	This constrained move, a translation
	  along	the plane's normal, is affected	by holding shift while
	  pressing the right mouse button.  The	clip plane is moved
	  only up and down along the direction of its normal.  Moving
	  the mouse up and down	while holding the right	button down
	  moves	the plane.  Like clip plane rotation, this works if
	  clip planes are enabled.

	  Holding control and dragging the left	mouse button rotates
	  just the selected volume.  A warning message will be
	  generated if no volume is selected.  This is the way to
	  rotate one volume with respect to others or the world.

	  Dragging the mouse after pressing the	middle button with the
	  control key pressed translates the selected volume.  If no
	  volume is selected the program present a warning message.
	  Dragging the mouse rotates the volume	in the XY plane.

	  Holding control while	pressing the right mouse button	allows
	  translation of the current volume along the Z	axis.  This
	  will fail if no volume is selected.

	  The left mouse button	with both the control and shift	keys
	  depressed will allow scaling of the selected volume.	As
	  with all other volume	controls, this is will beep and
	  display a warning message if no volume is selected.

	The Menus
	  The "File" menu provides the basic control options.  The
	  "Reset State"	menu item can be used to reset Volren to its
	  initial state.  A snapshot of	the current volume rendering
	  can be written to the	disk with the "Snap Image" option.
	  This option causes Volren to generate	an image file of size
	  specified by the '-f'	interface option.  The image is
	  written to the file specified	by the '-F' interface option.
	  The "Close" item closes the window, causing the application
	  to exit only if the colosing window is the last one.	As one
	  might	expect,	the "Exit" menu	item ends the program, closing
	  all windows.

	  The "Option" menu provides access to rendering options,



     Page 3					     (printed 4/23/96)






     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



	  volume options, surface options, and miscellaneous options.

	  The "Rendering" option menu allows toggling of resolution,
	  stereo (if a stereo window has been allocated), perspective,
	  and blending type.  High resolution can be deactivated to
	  provide faster rendering.  Activating	stereo mode enables
	  the "Stereo Separation" slider and allows stereo viewing
	  with stereo in a window.  The	"Field of View"	slider will be
	  enabled whenever perspective rendering is active.  Volren
	  supports two blending	modes, "Over" (back-to-front weighted
	  opacity accumulation)	and "MIP" (maximum intensity
	  projection).

	  The "Volume" option menu allows modification of per volume
	  parameters for the selected volume.  The "Colored" menu item
	  can be used to toggle	between	color and black	and white
	  volume rendering.  Trilinear interpolation will be used when
	  the "Interpolated" menu item is active.  Otherwise, simpler
	  nearest neighbor calculations	will be	done.  Colormap	and
	  alphamap modulation are explained in more detail in the
	  GENERATING LOOKUP TABLES section.

	  The selected surface's parameters can	be modified from the
	  "Surface" option menu.  To generate a	surface	from a
	  collection of	points choose the "Generate" item.  The
	  surface can be rendered with or without lighting and as a
	  mesh or polygonal surface.  These options are	controlled by
	  the "Lighted"	and "Meshed" toggle items.  The	"Textured"
	  toggle item allows for surfaces textured with	three
	  dimensional volume data.

	  Miscellaneous	options	are accessible from the	"Misc."	option
	  submenu.  The	"Clip Plane Looping" menu item controls	loop
	  mode.	 Activating this mode, causes the clip planes to be
	  displayed.  Additionally, the	planes will loop back and
	  forth	through	the volume.  The volume	will not be shown,
	  even if volumes are enabled.	The portions of	the surface
	  and the points that are clipped by the clip planes will only
	  be displayed in volume mode if the "Clip Geometry" menu item
	  is not selected.  If geometry	clipping is enabled and
	  volumes are enabled, then points and surfaces	will be
	  clipped by the clip planes.

	  The "Enable" menu item on the	menu pane allows enabling and
	  disabling of classes of objects and individual objects.
	  Selecting an item in the "Enable Objects" submenu will
	  toggle the display of	all objects of that type.  Individual
	  objects can be enabled and disabled using the	"Enable
	  Volumes", "Enable Surfaces", and "Enable Clip	Planes"
	  submenus.

	  Volumes, surfaces, and clip planes are selected using	the



     Page 4					     (printed 4/23/96)






     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



	  submenus under the "Select" item on the menu pane.

	  The "Transfer" menu provides a list of all the available
	  transfer functions.  It is only enabled when a volume	is
	  selected.  It	is used	to select a transfer function to apply
	  to a volume.	The use	of this	transfer function is described
	  further in GENERATING	LOOKUP TABLES.

	  The "Colormap" and "Alphamap"	menus are used to choose the
	  selected volume's colormap and alphamap.  They are therefore
	  only active when a volume is selected.  GENERATING LOOKUP
	  TABLES describes the use of these tables.

	Lookup Table Window, Buttons, and Sliders
	  The lookup table window, buttons, and	sliders	are only
	  enabled if a volume is selected as they always pertain to a
	  specific volume.  The	lookup table buttons determine the
	  state	of the lookup table window and sliders.	 The lookup
	  table	window always displays the selected volume's data
	  histogram in grey.

	  When the "Transfer" button is	depressed the lookup table
	  window displays the current single-valued transfer function
	  in white.  The sliders will display the names	and values of
	  the selected transfer	function's parameters.

	  The lookup table window will display the selected colormap
	  and alphamap when the	"Color/Alpha" lookup table button is
	  depressed.  The colormap will	be shown as one	red, one
	  green, and one blue line (or possibly	one white line if the
	  red, green, and blue lines overlap and blend together).  The
	  alphamap will	be shown as a white line.  The sliders will
	  display the colormap and alphamap scale and rotate names.
	  Moving the sliders will manipulate these scale and rotate
	  parameters not the current transfer function's parameters.

	  Lastly if the	"Lookup" button	is depressed then the lookup
	  table	window will display the	current	lookup table.  Colors
	  will be drawn	with red, green, and blue lines	and alpha will
	  be drawn with	a white	line.  The sliders will	show the names
	  and values of	the selected transfer function's parameters.

	  The lookup table sliders are described further in the
	  GENERATING LOOKUP TABLES section.

	Status Window
	  The status window at the bottom of the screen	provides
	  feedback during the running of Volren.  It provides warning
	  messages and other feedback.

     GENERATING	LOOKUP TABLES
	  Perhaps the single most important function of	a volume



     Page 5					     (printed 4/23/96)






     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



	  renderer is its ability to provide an	interactive mechanism
	  for classification of	complex	data.  In Volren data is
	  classified by	a lookup table.	 This lookup table is
	  generated by a transfer function and possibly	a colormap and
	  an alphamap.	Each volume can	use a separate transfer
	  function, colormap and alphamap.

	  All transfer functions are controlled	by one to four
	  parameters which have	a different meaning for	each transfer
	  function.  These sliders will	be accessible whenever either
	  of the "Transfer" or the "Lookup" buttons are	depressed in
	  the transfer function	panel at the right side	of the screen.
	  If the "Color/Alpha" button is selected instead then the
	  sliders will control the colormap and	alphamap parameters
	  instead.  These parameters allow scaling and rotation	of the
	  colormap and alphamap.

	Transfer functions
	  Volren supports five transfer	functions.  Each function is
	  one of two types.  Most of the transfer functions are
	  single-valued	and simply modulate the	user-chosen colormap
	  and alphamap.	 These are "single-valued" transfer functions.
	  However some transfer	functions ignore the colormap and
	  alphamap entirely and	specify	the volume lookup table
	  directly.  These are "programmatic" transfer functions.
	  Below	the process used to generate a lookup table from
	  single-valued	and programmatic transfer functions is
	  considered.

	  When a single-valued transfer	function is selected for a
	  volume that volume's lookup table is generated by combining
	  the function with the	volume's selected colormap and
	  alphamap.  If	the volume has the "Modulate Colormap" item
	  active in the	"Volume" option	menu, then the lookup table's
	  colors are specified by multiplying the colormap and the
	  transfer function.  If the "Modulate Colormap" item is not
	  enabled then the lookup table's color	is simply taken	from
	  the colormap selected	for this volume.  The lookup table's
	  alpha	values are generated in	a similar way from the
	  transfer function, the selected alphamap, and	the "Modulate
	  Alphamap" menu item.

	  While	using a	programmatic transfer function,	the "Colormap"
	  and "Alphamap" menu items will be disabled.  Additionally
	  the "Transfer" and "Color/Alpha" lookup table	buttons	will
	  be disabled as well.	Programmatic transfer functions
	  directly specify the color and alpha values to be placed in
	  the lookup table.  These values are generated	from the
	  transfer functions parameters.

	  The five transfer functions currently	available are
	  described below.



     Page 6					     (printed 4/23/96)






     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



	  Window/Level	    This single-valued transfer	function
			    computes a classical window	level
			    function.  Its parameters control its
			    window, level, and its center point
			    height.

	  Triangle	    Another single-valued transfer function,
			    the	triangle computes a triangle function
			    centered at	the location specified by the
			    center parameter.  The width parameter
			    controls the triangle's width and the
			    height controls its	height.

	  Inverse Triangle  Three parameters generate an inverted
			    triangle that defines this single-valued
			    transfer function.

	  Double Triangle   This single-valued transfer	function
			    generates two triangles centered about the
			    location specified by the center
			    parameter.	The width and height control
			    the	size of	the triangles and the final
			    parameter controls the distance between
			    them.

	  Medical	    This is the	only programmatic transfer
			    function currently written.	 This transfer
			    function allows direct control of the
			    opacity of air, fat, tissue, and bone in a
			    volume.  This transfer function is
			    specially tuned for	CT data	sets and is
			    based upon Bob Drebin's work (see 1988
			    Siggraph proceedings page 68).

	  You can create your own colormap, alphamap, and tablemap
	  files	as described below (see	READING	MAP FILES).  Each will
	  appear as a selectable item under one	or both	of the
	  "Colormap" or	"Alphamap" menus.

     OPTIONS
	  Volren is highly configurable	from the command line.
	  Specifying the '-O' flag will	cause it to immediately	print
	  out the compilation options it was created with including
	  the version number and graphics architecture then exit.

	  In standard usage the	command	line is	broken into
	  collections of options.  These configure the interface,
	  other	volume options,	and the	individual objects to be
	  loaded.  Each	of these collections of	options	is terminated
	  on the command line by the special option '--'.

	Interface Options



     Page 7					     (printed 4/23/96)






     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



	  The first set	of options changes the standard	defaults for
	  Volren's user	interface.  These options are:

	  -C colormap	  Load file colormap for use as	a colormap.
			  This flag may	be specified multiple times
			  (see READING MAP FILES below).

	  -A alphamap	  Load file alphamap for use as	an alphamap.
			  This flag may	be specified multiple times
			  (see READING MAP FILES below).

	  -T tablemap	  Load file tablemap for use as	a colormap and
			  an alphamap.	This flag may be specified
			  multiple times (see READING MAP FILES
			  below).

	  -P file	  Load file file and read polygonal geometry
			  data from it.	 See the section READING
			  POLYGON FILES	below.

	  -S count	  The initial number of	slices to draw when
			  rendering the	volume (defaults to 175).

	  -r width height Specify the default width and	height of the
			  Rendering Window.  This can be necessary
			  when using a version of Volren that doesn't
			  have auxilary	buffer support,	but utilizes
			  graphics hardware to accelerate start-up
			  processing.  In these	cases, the window must
			  be forced to at least	the largest X and Y
			  sizes	of the all the volumes to be loaded.

	  -p count	  The maximum number of	hardware clip planes
			  to use (defaults to 6).

	  -e		  Since	stereo mode windows require more
			  resources they will not be allocated by
			  default, resulting in	the inability to
			  utilize stereo mode.	Use this flag to force
			  allocation of	stereo windows (if possible).

	  -a		  Do not modulate the alphamap by the transfer
			  function when	generating the alpha table
			  (see GENERATING LOOKUP TABLES).  The default
			  is to	modulate the alphamap.

	  -m		  Do not modulate the colormap by the transfer
			  function when	generating the color table
			  (see GENERATING LOOKUP TABLES).  The default
			  is to	modulate the colormap.

	  -c obj color	  Specify the color of an object obj.  Color



     Page 8					     (printed 4/23/96)






     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



			  should be a valid X11	color string (for
			  example, "#f00", "#ff0000", or "red").
			  Valid	objects	are:

			  back	      The background color
			  frame	      Each volumes' frame color
			  cframe      The current volume's frame color
			  plane	      Each clip	planes'	color
			  cplane      The current clip plane's color
			  point	      Each points' color
			  cpoint      The current point's color
			  xvec	      The X axis vector's color
			  yvec	      The Y axis vector's color
			  zvec	      The Z axis vector's color
			  upvec	      The up vector's color
			  northvec    The north	vector's color
			  frontpoly   The front	of polygons' color
			  backpoly    The back of polygons' color
			  frontelev   The front	of elevations' color
			  backelev    The back of elevations' color
			  xysurf      The XY surfaces' geometry
			  zsurf	      The Z surfaces' geometry
			  surf#	      The #th surfaces'	geometry

	  -F file	  Used to specify the file to which to write
			  snapshot images.

	  -f width height Specifies the	width and height of any
			  snapshot images generated.

	  -O		  Force	Volren to print	out the	compilation
			  options defined when this version of Volren
			  was compiled.	 The program then immediately
			  exits.

	  -V		  Verbose progress, mostly for debugging
			  purposes.

	  -D level	  Start	up in debug mode level.	 This is
			  useful as some useful	information can	be
			  gleaned about	the data during	the reading
			  process if certain debug modes are enabled.
			  For example, to redisplay the	loaded data
			  after	it is all read in, use debug mode #2
			  for brick by brick updates with pauses and
			  mode #3 for slice by slice updates without
			  pauses.

	Volume Options
	  The next set of options effect the volumetric	data in	the
	  renderer.  These options are:




     Page 9					     (printed 4/23/96)






     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



	  -m count	  Break	each volume into bricks	count slices
			  deep in the Z	dimension.  This will
			  deactivate bricking in X and Y.  In
			  addition, count must be at least 4.

	  -r resample	  Volren now resamples data by default to
			  remove seams.	 This option allows the
			  disabling of this capability.	 Specifying
			  this option with any valid argument resample
			  turns	off volume resampling.	Valid
			  arguments are	{ false, f, no,	n, off }.

	  -f filter	  Specifies a sampling filter to be used
			  during resample (if resampling will occur).
			  The provided filters are:

			  box	      A	2D separable box filter
			  triangle    A	2D separable triangle filter

	  -4		  Force	the creation of	four-bit brick data as
			  well as the default eight-bit	brick data.
			  Not creating four-bit	bricks is now the
			  default to help conserve texture memory in
			  normal cases where both sets of bricks are
			  not needed.

	  -U dir	  Specify which	axis points up.	 Valid choices
			  are {	X, Y, Z	}.

	  -N angle	  Specify the north vector as an angle around
			  the up vector.

	  -V		  Verbose progress (optional).

	  -D level	  Start	up in debug mode level.	 This is
			  useful as some useful	information can	be
			  gleaned about	the data during	the reading
			  process if certain debug modes are enabled.
			  For example, to redisplay the	loaded data
			  after	it is all read in, use debug mode #2
			  for brick by brick updates with pauses and
			  mode #3 for slice by slice updates without
			  pauses.

	Per Object Information
	  Each object given on the command line	has the	following
	  form:

	       objtype [objopts] objinfo

	  Two object types are currently supported, volumes (objtype =
	  volume) and elevations (objtype = elevation).	 If no object



     Page 10					     (printed 4/23/96)






     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



	  type is specified, volume is assumed.	 Each object type has
	  different options (objopts) and required information
	  (objinfo).  These requirements are described below.

	Per Volume Options
	  Each volume specification consists of	two parts.  The	first
	  part is the volume options.  A list of all per volume
	  options is given here:

	  -h		  Toggle the handedness	of the volume.	The
			  default is to	the left, causing sucessive
			  images to be stacked downwards as they are
			  read in.  This option	will cause right
			  handedness to	be used.

	  -X scale	  Specifies the	relative voxel spacing in the
			  X dimension for this volume.

	  -Y scale	  Specifies the	relative voxel spacing in the
			  Y dimension for this volume.

	  -Z scale	  Specifies the	relative voxel spacing in the
			  Z dimension for this volume.

	  -T number	  Specifies the	number of time steps over
			  which	the volume is defined.	By default,
			  volumes are not time variant (number = 1)
			  and will not be animated.

	  -S millisecs	  Specifies the	default	time interval before
			  moving to the	next time step in a time
			  variant volume.  In other words, it
			  specifies the	animation speed	of the
			  volume's time	component (in milliseconds per
			  frame).  The default value is	3000, or 3
			  seconds between time step changes.

	  -e extension	  The file extension for this volume's data
			  files.  The default extension	is ".tiff".

	  -o zoff	  The number of	the first slice	in Z.  This
			  option can be	used to	load only specific
			  spatial (Z) ranges of	non-time variant data
			  volumes or only specific time	(T) ranges of
			  time variant data volumes (see READING
			  VOLUMES below).

	  -O xoff yoff	  The offset of	the lower left corner of each
			  slice.  This option can be used to load
			  subregions of	a volume offset	from the data
			  images' origins (see READING VOLUMES below).




     Page 11					     (printed 4/23/96)






     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



	  The second part of each volume's specification is mandatory.
	  This volume information specifies the	volume's resolution
	  and the location of the data files containing	the volume
	  data.	 The format of this information	is:

	       ex ey ez	data

	  The above format shows that the minimum specification	for a
	  volume includes the volume's resolution (ex ey ez) and file
	  path to the data (data).  For	more information on the	exact
	  use of these parameters see READING VOLUMES below.

	Per Elevation Options
	  Each elevation specification consists	of two parts.  The
	  first	part is	the elevation options.	A list of all per
	  elevation options is given here:

	  -X scale	  Specifies the	relative pixel spacing in the
			  X dimension for this elevation.

	  -Y scale	  Specifies the	relative pixel spacing in the
			  Y dimension for this elevation.

	  -L		  Cause	the elevation not to be	lighted.  The
			  default behavior is to light elevations.

	  -R angle	  Rotate the elevation counter-clockwise by
			  angle	degrees	in the XY plane.

	  -T tx	ty tz	  Translate the	elevation in space by tx, ty,
			  and tz.

	  The second part of each elevation's specification is
	  mandatory.  The format of this information is:

	       [colorimg] elevimg

	  This elevation information specifies a greyscale image
	  (elevimg) used to define the height field that is the
	  elevation and	optionally a color image (colorimg) that will
	  be draped onto this height field.

     READING VOLUMES
	  Volren takes as input	a series of two	dimensional images
	  which	represent slices of a three (or	four) dimensional
	  volume.  With	non-time variant volumes (no '-T' option is
	  specified), files will be accessed for all slices in the
	  range	[0, ez-1], where ez is the value specified as the size
	  of the volume	in the Z dimension (as described in the	per
	  volume options above).  That is, ez files must be opened to
	  define the volume; one for each slice	in the Z dimension.
	  Time variant (four dimensional) volumes are discussed	below.



     Page 12					     (printed 4/23/96)






     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



	Finding	Data Slices
	  Volume slices	(individual files) should be named following
	  this scheme:

	       concat(data, slice, extension)

	  Data is the basename of all the data files as	specified for
	  the given volume in its per volume options.  Each file will
	  have a number, slice,	appended after the basename.  In
	  addition, an extension, extension, will be added at the end
	  of each filename constructed.	 Volren	uses the ImageVision
	  library to read these	files, so they may be of any format
	  supported (try TIFF or SGI) by the installed IL environment
	  (see IL(1)).	The files should be single channel (greyscale
	  or luminance)	and contain eight-bit data.  Additionally,
	  each file should be large enough to facilitate the
	  extraction of	an ex by ey image offset by xoff and yoff
	  pixels in the	X and Y	directions respectively.  Volren will
	  print	a warning if these conditions are not met by any file.

	  Volren will try numerous different filenames when trying to
	  find a specific slice	of data.  This is done to accommodate
	  both variable	and constant width slice fields	in data
	  filenames (test017.tif and test17.tif).  Consider a
	  situation where data is specified as "data/chemical/oxy" and
	  the extension	is ".bw".  Note	that the "." is	included in
	  the extension	specification.	Also, assume that the offset
	  parameter (per volume	option '-o') was not set on the
	  command line.	 It will then default to zero.	When searching
	  for the third	slice (slice 2,	since the first	slice was 0)
	  for example, Volren will try to locate the data in each of
	  the following	files, in order:

	       data/chemical/oxy2.bw
	       data/chemical/oxy02.bw
	       data/chemical/oxy002.bw
	       data/chemical/oxy0002.bw
	       data/chemical/oxy00002.bw
	       data/chemical/oxy000002.bw
	       data/chemical/oxy0000002.bw
	       data/chemical/oxy00000002.bw
	       data/chemical/oxy000000002.bw

	Time Variant Volumes
	  If the volume	is time	variant	then files will	be accessed
	  for slices in	the range [0, ez*et-1] where et	is the size of
	  the time dimension for this volume (the argument to the per
	  volume '-T' option).

	  For example, imagine a 128 (ex) by 128 (ey) by 64 (ez)
	  volume that is defined over 16 (et) time steps.  The 64
	  slices of the	volume cooresponding to	the third time step



     Page 13					     (printed 4/23/96)






     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



	  (time	equals 2, since	the first time step is time equal 0)
	  could	be found in the	files cooresponding to the slice range
	  [128,	191].  This makes it easy to skip the first N time
	  steps	by simply setting the slice offset (per	volume '-o'
	  option) to N times the Z size	of the volume (ez).

     READING MAP FILES
	  Volren uses a	lookup table to	map the	scalar data quanity in
	  each volume into color and opacity to	be composited together
	  during rendering.  These lookup tables are generated from
	  transfer functions and map files read	from disk.  Volren can
	  read and store up to 20 different map	files.	There are
	  three	different types	of map files:  colormaps, alphamaps,
	  and tablemaps.  Each type of map file	has 257	lines.	The
	  first	line contains overall map weights specified as
	  floating point numbers.  Every entry in the map will be
	  scaled by these values.  The remaining 256 lines specify the
	  map, each line containing integers in	the range [0, 255].
	  Colormap files have three entries on each line, one for red,
	  one for green, and one for blue.  Alphamap files have	one
	  entry	on each	line, the alpha	value.	Tablemap files specify
	  both color and alpha values and correspondingly have four
	  entries per line: red, green,	blue, then alpha.  Tablemaps
	  are equivalent to previous versions of Volren's lookup
	  tables.

     READING POLYGON FILES
	  Polygon geometry files are a way of importing	arbitrary
	  three	dimensional geometry into Volren.  The polygon
	  geometry file	format is pretty arbitrarily defined, but it
	  is also very simple.	The format supports two	kinds of
	  objects, disjoint triangles and quadrilateral	strips.

	  Any line beginning with '#' is assumed to be a comment and
	  ignored.  Each piece of data (object count, object type,
	  object part count, or	point) belongs on its own line and
	  should not be	combined with other lines or broken up onto
	  multiple lines.

	  The file begins with the number of objects to	follow in the
	  file (object count).	Following this count are the objects
	  themselves.  Each one	begins with a string defining its
	  type.	 This object type precedes the object part count.
	  Following the	part count are the parts.  Each	part is	made
	  up of	some number of 3D points.  Each	point is three
	  floating point numbers (on the same line!)  The number of
	  points per part is a function	of the object type.  Disjoint
	  triangles require three points per part.  Quadrilateral
	  strips require only two.

	  The format of	the file resembles:




     Page 14					     (printed 4/23/96)






     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



	       | # A demonstration polygon geometry file
	       |
	       | # First is the	number of objects in the file
	       | 3
	       |
	       | # Begin first object
	       | # First is the	object's type
	       |  disjtris
	       | # Next	is the number of parts in the object
	       |  2
	       | # Now the first part (triangle). Since	this object
	       | # is disjoint triangles, we know that each part
	       | # will	contain	three 3D points	(nine floats).
	       |   0.5 0.3 0.2
	       |   0.3 0.6 0.7
	       |   0.4 0.8 0.1
	       | # Now the second part (triangle).
	       |   0.4 0.9 0.7
	       |   0.6 0.3 0.8
	       |   0.9 0.2 0.9
	       | # End first object
	       |
	       | # Begin second	object
	       |  quadstrip
	       |  3
	       | # Quadrilateral strips	have only two 3D points
	       ! # per part.
	       |   0.4 0.2 0.7
	       |   0.6 0.4 0.3
	       |   0.3 0.8 0.2
	       |   0.4 0.5 0.7
	       |   0.9 0.4 0.7
	       |   0.1 0.1 0.9
	       | # End second object
	       |
	       | # Begin third object
	       |  disjtris
	       |  1
	       |   0.8 0.9 0.4
	       |   0.3 0.6 0.3
	       |   0.7 0.4 0.8
	       | # End third object

     USING STEREO
	  Stereo mode is available with	either projection technique,
	  but perspective is better.  The stereo separation may	be
	  adjusted using the "Stereo Separation" slider.  The stereo
	  separation should be increased as you	move further away from
	  the screen.  Note that some monitors can not reach the 120hz
	  used in the "setmon" call that the volume renderer uses to
	  turn on stereo mode.	A monitor which	cannot achieve the
	  120hz	rate will appear scrambled.  The work around for this



     Page 15					     (printed 4/23/96)






     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



	  is to	manually specify the resolution	that Volren will use
	  to setup stereo mode.	 This resolution should	be specified
	  in the VOLREN_STEREO_MONITOR environment variable.  The
	  default value	is "815x611_120s".  Likewise setting the
	  VOLREN_MONO_MONITOR variable specifies the resolution	the
	  renderer returns to when stereo is deactivated.  Its default
	  value	is "1280x1024_60".  Each of these variables is simply
	  passed as an argument	to the setmon(1G) program.  See	its
	  man page for more information	about other resolution options
	  supported by your hardware.

     DEBUG MODES
	  The '-D' switch sets the debug level at startup time.	 The
	  debug	level can be changed interactively by placing the
	  mouse	in the Rendering Window	and hitting the	'+' or '-'
	  keys.	 Additionally, to see Volren render you	can deactivate
	  double buffering using the "Misc." option submenu item
	  "Double Buffering".

     EXAMPLES
	  Example shell	scripts	are provided that run Volren on	a
	  collection of	data sets.  They provide a relatively thorough
	  example of how Volren	works.

     FILES
	  $distribution/demo/*
	       Volren example scripts.
	  $distribution/bin/volren-6*.ogl
	       The volren executable.
	  $distribution/data/*
	       Example data sets.
	  $distribution/data/luts/*
	       Example lookup tables.

     BUGS
	  Volren should	let you	change the colors during a run,	not
	  just on the command line.  It	should probably	support	saving
	  all the parameters associated	with a data set	in a file that
	  it can read and write.

	  Volren should	read inventor file format or something else
	  more portable	than the geometry format it supports now.

	  This man page	probably needs help.  If you want to know more
	  about	this code, it's	applications, or just want to post
	  bugs (er...features),	contact	the maintainer or authors.

     CURRENT MAINTAINER	/ DEVELOPER
	       Todd Kulick, Silicon Graphics
	       kulick@sgi.com

     AUTHORS



     Page 16					     (printed 4/23/96)






     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



	       Brian Cabral, Silicon Graphics
	       cabral@sgi.com

	       Todd Kulick, Silicon Graphics
	       kulick@sgi.com

     CAVEAT
	  Copyright 1994 Silicon Graphics, Inc.	-- All Rights Reserved

	  If the Software is acquired by or on behalf of an entity of
	  government of	 the  United States of America,	the following
	  provision applies: U.	 S.  GOVERNMENT	 RESTRICTED  RIGHTS
	  LEGEND:    Use,   duplication	  or disclosure	of Software by
	  the Government is subject to restrictions as set forth in
	  FAR 52.227-19(c)(2) or  subparagraph	(c)(1)(ii)  of	the
	  Rights  in  Technical	 Data  and  Computer  Software	clause
	  at DFARS 252.227-7013	and/or in similar or successor clauses
	  in the FAR, or the DOD  or  NASA  FAR	Supplement. Unpub-
	  lished- rights reserved under	the Copyright  Laws  of	 the
	  United  States.  Contractor/manufacturer  is SILICON
	  GRAPHICS,  INC.,  2011  N. Shoreline Blvd., Mountain View,
	  CA 94039- 7311.

	  Silicon Graphics, Inc. hereby	grants	to  you	 a  non-
	  exclusive,  non- transferable,  personal, paid-up license to
	  use, modify and distribute the Software solely with SGI
	  computer products.  You must include,	 in all	 copies	 of
	  the  Software	 and  any associated documentation, the
	  copyright notice and restricted rights legend	set forth
	  above.

	  THE SOFTWARE IS PROVIDED  TO	YOU  "AS-IS"  AND  WITHOUT
	  ANY  SUPPORT OBLIGATION  OR  WARRANTY	 OF  ANY KIND,
	  EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT
	  LIMITATION,  ANY  WARRANTY  OF  MERCHANTABILITY  OR FITNESS
	  FOR A	PARTICULAR PURPOSE. IN NO EVENT	SHALL SGI BE LIABLE
	  FOR SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
	  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS	OF USE,	DATA
	  OR PROFITS, WHETHER OR NOT ADVISED OF	THE POSSIBILITY	OF
	  DAMAGE, AND ON ANY THEORY OF	LIABILITY, ARISING  OUT	 OF
	  OR IN	CONNECTION WITH	THE USE	OR PERFORMANCE OF THIS
	  SOFTWARE.

	  You agree that you will not export or	re-export the
	  Software, directly or	 indirectly,  unless  (a)  the	Export
	  Administration of the	U. S.  Department of Commerce
	  explicitly permits the export	or  re-export  of the
	  Software  or	(b)  the  Office  of  Export Licensing of the
	  U. S.	 Department of Commerce	has granted au-thorization to
	  you  in  writing for the  export or re- export the Software.

	  If you fail to fulfill any  of  the  foregoing  obligations,



     Page 17					     (printed 4/23/96)






     VOLREN(1)		    SGI	(1996 Apr. 23)		     VOLREN(1)



	  SGI  may pursue  all	available  legal  remedies  to
	  enforce  these  terms	and conditions,	and SGI	may,  at  any
	  time	after  your  default  hereof, terminate	 the  license
	  and  rights  granted	to  you	hereunder.  You	further	agree
	  that,	if SGI terminates this license for  your  default, you
	  will,	within ten (10)	days after any such termination,
	  deliver to SGI or  render  unusable  all  Software
	  originally  provided	to  you	hereunder and any copies
	  thereof embodied in any medium.














































     Page 18					     (printed 4/23/96)




Files of interest from "src/exampleCode/volumeRendering/volren-6/doc/text" directory

Documentation


Select any combo of files you'd like to send yourself a compressed tar image of. Executables/scripts are indicated with a trailing `*' character. (Depending upon the browser, it may be necessary to hold down the Ctrl key to select/deselect disjoint items.) a compressed tar image of the above-selected items.
OR, ...
a compressed tar image of the entire text directory.

Copyright © 1996, Silicon Graphics, Inc.