AVS Modules ucd line(6) NAME ucd line - interactive sampling of a line of data from a UCD structure SUMMARY Name ucd line Type mapper Inputs ucd structure upstream transform (optional, invisible, autoconnect) Outputs field 1D or 2D, uniform or 1-coord, scalar real geometry Parameters Name Type Default Do Sample boolean off Graph Viewer boolean on Uniform boolean off XRotation float 0.0 YRotation float 0.0 ZRotation float 0.0 YDistance float 0.0 ZDistance float 0.0 Node Data choice DESCRIPTION This module produces an arbitrary line of sampled node data from a 3D UCD mesh and outputs it as a field. This can be a conventional AVS 1D field with irregular 1D coordinates or a 2D field suitable for connection to the graph viewer module. It is also possible to output a uniformly spaced 1D field. The position and orientation of the line is arbitrary and is controllable either by the direct manipulation of a probe object or by manipulating a collection of dial widgets. The probe object consists of two transparent orthogonal planes and a line of intersection which is the sample line. When using the dial widgets on the module's control panel, the XRotation, YRotation and ZRotation parameters control the orientation of the line as three rotations about the major axes applied in the order ZYX. The two Distance parameters are positional offsets along the normals of the two guide planes of the probe. When controlling the orientation and position of the probe by direct manipulation within the geometry viewer, the dial parameters are updated to maintain a consistent state. The sample is obtained by bi-linear interpolation of the node data values along the two transparent planes within the probe object. There is one point on the sample line for every intersected face of the UCD structure. Therefore, by default, the spacing along the line is irregular. If uniform spacing is required, the data is interpolated again to a regularly spaced line. In general, the uniformly spaced data will be less accurate and have more grid points than the irregularly spaced data. INPUTS Structure (required) The input structure is in AVS unstructured cell data (UCD) format. 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 line module informed of any transformations that have been applied to the probe object by direct manipulation within the geometry viewer window. PARAMETERS Do Sample (boolean) By setting this toggle to off the sampling of the UCD structure can be temporarily disabled. Otherwise, a line of data is produced every time the modules inputs are changed or the probe's orientation/ position is altered. Graph Viewer (boolean) By setting this toggle the field output is in a format compatible with the graph viewer module. In this case the output is a 2D uniform field of real scalars which is a list of (x,y) pairs to be plotted in the graph viewer. Otherwise the output is a 1D rectilinear field of real scalars with 1D coordinates. Uniform (boolean) By setting this toggle the field output, which by default is a line of irregularly spaced points, is converted to uniform spacing. In an attempt to preserve accuracy, the number of points in the uniformly spaced field will, in general, be significantly greater than the equivalent irregularly spaced field. When this toggle is set the output is a 1D uniform field of real scalars, regardless of whether the graph viewer toggle is set or not. 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 the geometry viewer's transformation options panel. Should the user wish to numerically specify the rotations in the normal AVS order XYZ, then this is still possible from the transformation options panel. In this case the dials will be updated to show an equivalent orientation in the ZYX order. YDistance The YDistance parameter is an absolute offset of the probe along the normal to the guide plane y=0. ZDistance The ZDistance parameter is an absolute offset of the probe along the normal to the guide plane z=0. Node Data (choice) This parameter allows the selection of a scalar component of data to be sampled along the line. OUTPUTS Sample (field 1D or 2D, uniform or 1-coord, scalar real) The sampled array of data along the line. Probe (geometry) The geometry object that ucd line outputs from the right output port represents the probe object. EXAMPLE In the following network UCD LINE is used to extract a line of data from the UCD structure read in by READ UCD. The line of data is output as a field which is then passed to the graph viewer module. In order for this to work correctly the 'graph viewer' toggle of the UCD LINE module must be on. The other output port from the UCD LINE module is a geometry describing the probe object indicating the position and orientation of the sample line. This requires a frame of reference about which the probe object can be moved. This is provided by the UCD TO GEOM module. In this way the probe object always correctly indicates which region of the UCD structure is being sampled. GENERATE COLORMAP READ UCD | | | |-------(ucd)---------+-----------------| | | | | UCD CONTOUR | | | | | |-----(colour field)----- | -------------| | | | | UCD LINE UCD TO GEOM | | | (field) |-(geometry)-| | | | | GRAPH 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 can process ucd probe's sample output: graph viewer write field Any module that accepts 1D fields. SEE ALSO The module UCD PROBES. 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 line(6)