ucd planes - investigation of UCD structures with planar probes

Name

     ucd planes - investigation of UCD structures with planar probes

Summary

     Name	   ucd planes

Type

  mapper

Inputs

   ucd structure
		   colour field (field 1D 3-vector real; optional)
		   contour range (struct ucd_legend_output; optional)
		   upstream transform (optional, invisible, autoconnect)

Outputs

   geometry
		   geometry
		   ucd structure

Parameters

   Name		   Type		  Default
		   Make Sample	   boolean	  off
		   Make UCD	   boolean 	  off
		   XRotation	   float	  0.0
		   YRotation	   float	  0.0
		   ZRotation	   float	  0.0
		   Scale	   float	  1.0
		   Distance	   float	  0.0
		   Probe Type	   choice	  simple
		   ZAxis Data	   choice	  
		   Toggle	   boolean	  off
		   Count	   integer	  1
		   Contours	   integer	  0
		   Offset	   boolean	  off
		   Lo_Val	   float	  0.0
		   Hi_Val	   float	  0.0
		   Contour Data	   choice	  

Description

     The UCD PLANES module supports the interactive sub-sampling of node data
     held within a 3D UCD structure.  The region sampled is selected
     interactively in the region of a transparent 'probe' object.  Several
     different types of probes are supported, all based upon a collection of
     planes.  For each probe type, the sampled region can be output either as
     various forms of geometry, as a UCD structure or as both.  When a geometry
     is output, 2D contours of a scalar data component can be superimposed on
     the sample object.
     
     The selection of probe type is made from the 'Probe Type' choice widget on
     the module's control panel.  Possible probes include a single plane
     (SIMPLE), two and three crossed orthogonal planes (SHEAF and CROSSED) and
     multiple parallel planes (MULTIPLE).  These probe types produce a 'sample'
     that is the same shape as the probe object but is coloured according to a
     scalar component of the structure's nodal data.
     
     In addition, a further probe type (PROJECTED) is supported which uses a
     probe consisting of a single plane just as with the SIMPLE plane probe.
     However, the sample produced is not a simple coloured display of the slice
     plane.  Instead of this, another component of nodal data is used to add
     height to the sample.  This forms a 3D graph of the data on the sampled
     plane.  Axes, tick marks and labels can be automatically generated for the
     graph.  The number of tick marks is controllable.  It is also possible to
     add a flat wire-frame rendering of the sliced UCD mesh to the base of the
     graph.  This makes the perception of surface height clearer.
     
     For all probe types the orientation and position of the probe can be
     controlled in two ways.  The first method is to use the dial widgets on
     the module's control panel.  The XRotation, YRotation and ZRotation
     parameters control the orientation of the plane as three rotations about
     the major axes.  The rotations are applied in the order ZYX.  The Scale
     parameter specifies a uniform scaling factor.  The Distance parameter is a
     positional offset.  Due to the varying make up of the different types of
     probes, some parameters are of limited use with some probe types.  This is
     described in more detail below.
     
     The alternative method of controlling the orientation and position of the
     probe is by direct manipulation of the probe object within the geometry
     viewer.  During direct manipulation the dial parameters are calculated
     from the new transformation matrix for the probe object.  This ensures
     that the dial parameters and the probe's orientation are always mutually
     consistent.
     
     The correspondence between transformation by the dials and by direct
     manipulation is not 1 to 1.  This is because, by default, it is possible
     to translate objects in the geometry viewer in 3D where as there is only
     one dial controlling position of the probe - the Distance dial.
     
     This restriction is fine for those probe types (SIMPLE, MULTIPLE and
     PROJECTED) in which all constituent planes are parallel to each other.  As
     translation parallel to the planes is irrelevant to the definition of the
     probe, translation can be restricted to being in the direction of the
     planes' normals without any loss of generality.  In fact, this is
     desirable as it ensures that the normals always pass through the centre of
     the UCD structure.  With this in mind, translations in the geometry viewer
     for these probe types are restricted to the direction of the probe's
     normal.  This feature can be turned off with a compilation option as it
     does not work well on AVS platforms which are not highly interactive -
     such as an X terminal.
     
     For the SHEAF and CROSSED probe types translation in 3D becomes
     significant.  For these probe types 3D positioning is only possible
     through direct manipulation of the probe object within the geometry viewer
     window or from the geometry viewer's transformation options panel.
     
     The module also supports the generation of line contours across the sample
     surface.  This can be done with all probe types.  In most cases the
     contours are superimposed on the sample object.  This can lead to them
     being obscured.  The 'Offset' toggle allows the contour lines to be offset
     slightly to the front and behind the sample plane so that they can be seen
     clearly.  If the PROJECTED probe type is selected, contours are
     superimposed on the projected surface unless the 'Base' toggle is on.  In
     this case contours are added to the base object instead.
     
     The 'Make UCD' toggle causes a UCD_structure to be output that is
     representative of the sampled region.  The structure is composed of
     UCD_TRIANGLE primitives.  The nodal data vector has the same components as
     the input structure.  Data values are constructed using linear
     interpolation.
INPUTS
     Structure (required)
	  The input structure is in AVS's unstructured cell data (UCD) format.
     Colour Field (field 1D 3-vector real, optional)
	  This input is an array of RGB colour values, one for each node of the
	  UCD structure.  Array's of this type are produced by the modules UCD
	  CONTOUR and UCD LEGEND.  It is used to colour the sample geometry.
 
     Contour Range (struct ucd_legend_output, optional)
	  Connecting this port to the 2nd output of the UCD LEGEND module
	  allows the range of contour values to be set using the module's
	  legend widget.  If this is done the data component used to generate
	  contours is also set to that of the UCD LEGEND module.
     Upstream Transform (optional, invisible, autoconnect)
	  When the probe geometry output port is connected to a geometry viewer
	  module or a render geometry module, an automatic upstream connection
	  is made to this port.  This connection is used to keep the UCD PLANES
	  module informed of any transformations that have been applied to the
	  probe object by direct manipulation within the geometry viewer
	  window.
PARAMETERS
     Make Sample (boolean)
	  By setting this toggle to off the generation of the sample object can
	  be temporarily disabled.  Otherwise, a sample geometry is produced
	  every time the modules inputs are changed or the probe's
	  orientation/position is altered.  By default, samples are continually
	  generated while the probe object is being transformed.  This can be
	  disabled with a compilation option so that a sample is only generated
	  once the transformation is complete and the mouse button is released.
     Make UCD (boolean)
	  If this toggle is set a 2D UCD_structure is output cooresponding to
	  the sampled region.  If neither the 'Make Sample' or 'Make UCD'
	  toggles are set, generation of the sample is temporarily suspended.
     XRotation
	  A floating point value between -180 and 180 degrees, indicating the
	  amount of rotation about the x-axis.
     YRotation
	  A floating point value between -180 and 180 degrees, indicating the
	  amount of rotation about the y-axis.
     ZRotation
	  A floating point value between -180 and 180 degrees, indicating the
	  amount of rotation about the z-axis.
	  Note that the rotations are applied in the order ZYX.  This is
	  actually the opposite order to that used in AVS's transformation
	  options panel.  For a SIMPLE single plane probe and other probe types
	  in which all planes are parallel to z=0, this ordering makes more
	  sense.  This is because, the ZRotation parameter does not now effect
	  the orientation of the probe.  The most obvious advantage of this is
	  that, with a PROJECTED plane probe, XRotation and YRotation control
	  the orientation of the single plane probe and ZRotation controls the
	  orientation of the sample with respect to the axes of the 3D graph.
	  For probe types that have planes which are not parallel to z=0, ie
	  SHEAF and CROSSED probe types, all three rotation dials are
	  significant.
	  Should the user wish to numerically specify the rotations in the
	  normal AVS order XYZ, then this is possible from the geometry
	  viewer's transformation options panel.  In this case the dials will
	  be updated to show an equivalent orientation in the ZYX order.
	  Alternatively, user could select the desired orientation by direct
	  manipulation of the probe object in the geometry viewer.
     Scale
	  The scale parameter applies a uniform scaling to the probe type,
	  mimicking the effect of scaling in the geometry viewer.  The only the
	  MULTIPLE and PROJECTED probe types are effected by scaling.  For a
	  multiple plane probe, the scaling parameter effects the spacing
	  between the planes.  For a projected plane probe the scaling
	  parameter effects the height / width ratio of the 3D graph.
     Distance
	  The distance parameter is an absolute offset of the probe along the
	  normal to the plane z=0.  If Distance is set to zero, then the probe
	  will pass through the centre of the UCD structure.  By changing the
	  distance parameter the probe can be made to sweep through the whole
	  UCD structure.
     Probe Type (choice)
	  This parameter allows the selection the type of probe used to sample
	  the UCD data.  The allowable types are SIMPLE, SHEAF, CROSSED,
	  MULTIPLE and PROJECTED as already described.  By simple modification
	  of the module code any collection of planes could be used as probe.
     ZAxis Data (choice)
	  This parameter allows the selection of a scalar component of data to
	  be projected onto the vertical axis of the 3D graph produced by a
	  projected plane probe.  For all other probe types the parameter is
	  invisible.
	  The component's label and units strings are used to generate a title
	  for the 3D graph.  If the component's label begins with 'log' then it
	  is assumed that the ZAxis Data has been mapped by a mapping of the
	  form:
		z -> log(z - inf + 1.0),
	  and the inverse mapping is used to correctly label the graph axes.
	  The lower bound 'inf' used in the mapping defaults to zero but may be
	  specified by including an 'inf = v' clause in the units string.  This
	  clause will not be included in the graph title.  This action can be
	  turned off with a compilation macro.
     Toggle (boolean)
	  This toggle has two purposes depending on the current type of probe.
	  For the SIMPLE probe type the toggle is labelled as 'transform'.  It
	  controls whether or not the position and orientation of the sample
	  geometry is maintained relative to the UCD structure.  If this toggle
	  is on, then transforming the probe plane will also identically
	  transform the sample plane.  Otherwise the plane is always kept
	  orthogonal to the viewer window (the plane z=0) regardless of the
	  actual orientation of the probe.
	  For the PROJECTED probe type the toggle is labelled as 'base'.  In
	  this case it controls whether or not a reference base is added to the
	  3D graph produced as the sample geometry.  The base is actually a
	  flat wire-frame rendering of the 2D slice through the UCD structure.
	  If the base toggle is on, contours are added to the base rather than
	  the projected surface.
	  For other probe types this toggle is invisible.
     Count (integer)
	  This dial also has two purposes depending on the current probe type.
	  For the MULTIPLE probe type this dial is labelled and '# Planes'.
	  As the label suggests, it controls the number of planes in the probe
	  and hence the sample (from 1 to 10).
	  For the PROJECTED probe type the dial is labelled as '# Ticks'.  In
	  this case it controls the number of numerical ticks and labels that
	  appear on the vertical axis of the graph.
	  For other probe types this toggle is invisible.
     Contours (integer)
	  The number of contours to be generated.  The contours are equally
	  spaced between the Lo_Val and Hi_Val parameters.
     Offset (boolean)
	  When contours are superimposed on a solid sample object they become
	  obscured.  This may be overcome by setting the rendering option for
	  the sample object to 'lines', by deleteing the sample object or by
	  using this toggle.  If this toggle is set, two sets of contour lines
	  are generated.  One is offset slightly infront of the plane and one
	  behind.
     Lo_Val (float)
	  The lower bound of the contour values.  This value may also be set by
	  connecting the module to the UCD LEGEND module.
     Hi_Val (float)
	  The upper bound of the contour values.  This value may also be set by
	  connecting the module to the UCD LEGEND module.
     Contour Data (choice)
	  The component of nodal data that is used to generate the contours.
OUTPUTS
     Geometry
	  The geometry object that UCD PLANES outputs from the left output port
	  represents the sub-sample of the UCD structure.
     Geometry
	  The geometry object that UCD PLANES outputs from the right output
	  port represents the probe object.
     UCD Structure
	  A UCD_structure cooresponding to the sampled region.  The structure
	  is composed of triangles with coordinates in 3-space.  This means
	  that there may be more than one triangle per cut cell.  A single
	  plane in 2-space can be generated by selecting the SIMPLE probe type
	  and setting the Transform toggle.  When the PROJECTED probe type is
	  selected the surface is projected according to the ZAxis Data
	  component.  All components of the input structure, including vectors,
	  are interpolated and included in the output UCD Structure.

Example

     In	the following network UCD PLANES outputs two geometries which are
     displayed in separate geometry viewer windows.  The left hand port is the
     sample geometry, that is the representation of the data that has been
     sub-sampled from the UCD structure.  This will either be a coloured
     collection of planes or a 3D graph.  The right hand port provides a probe
     object which is a collection of transparent planes.  The UCD TO GEOM
     module is used to provide a frame of reference about which the probe
     object can be moved.  In this way the probe object always correctly
     indicates which region of the UCD structure is being displayed in the

Other

geometry viewer window.
	GENERATE COLORMAP	      READ UCD
		|			  |
		|			  +------(ucd)------|
		|			  |		    |
   	   UCD CONTOUR			  |		    |
		|			  |		    |
		|---(colour field)---+--- | -------------|  |
				     |	  |		 |  |
				   UCD PROBES	      UCD TO GEOM
				     |    |		    |
				     |    |-(geometry)-|    |
				     |		       |    |
			      GEOMETRY VIEWER	   GEOMETRY VIEWER
RELATED	MODULES
     Modules that could	provide	the UCD	structure input:
	  read ucd
	  read everest
	  field	to ucd
	  Any module that outputs a UCD	structure.
     Modules that could	provide	the colour field input:
	  ucd contour
	  ucd legend
     Modules that could provide the colour range input:
	
	  ucd legend
     Modules that could provide the Scale Info input:
	  read everest
     Modules that can process ucd probe's output:
	  geometry viewer
	  Any module that inputs a geometry
	  Any module that inputs a 2D UCD structure.

See also

     The module UCD LINE.

Contacts


Author

-  Jonathan Cox.
     Address -	Department of Computer Science, University of Manchester,
     		Oxford Road, Manchester. M13 9PL. ENGLAND.
     Email   -  coxjp@cs.man.ac.uk
ACKNOWLEDGEMENTS
     Thanks go to the staff of the Computer Graphics Unit of the University of
     Manchester Computer Centre, particularly Steve Larkin and Terry Hewitt,
     for use of their machines and support with AVS.
     The sampling algorithm used within the module was based on the ideas
     presented in Sperry, D. and Kennon, S., "Volume Probes: Interactive Data
     Exploration on Arbitrary Grids," (Proceedings of the 1990 San Diego
     Workshop on Volume Visualization), Computer Graphics, Volume 24, Number 5,
     November 1990, pp. 5-12. ACM SIGGRAPH.
Release	4			    AVS			   	 ucd planes(6)