A volume object represents a mapping from a three-dimensional array of data to a three-dimensional array of voxel colors, which, when drawn, are projected to two dimensions.
An IDLgrVolume object is an atomic graphic object ; it is one of the basic drawable elements of the IDL Object Graphics system, and it is not a container for other objects.
The IDLgrVolume:: Cleanup procedure method performs all cleanup on the object. IDLgrVolume is described above.
NOTE: Cleanup methods are special lifecycle methods , and as such cannot be called outside the context of object destruction. This means that in most cases, you cannot call the Cleanup method directly. There is one exception to this rule: If you write your own subclass of this class, you can call the Cleanup method from within the Cleanup method of the subclass.
The IDLgrVolume:: ComputeBounds procedure method computes the smallest bounding box that contains all voxels whose opacity lookup is greater than a given opacity value. The BOUNDS property is updated to the computed bounding box. IDLgrVolume is described above.
Set this keyword to the opacity value to be used to determine which voxels are included within the bounding box. All voxels whose opacity lookup is greater than this value will be included. The default value is zero.
Set this keyword to cause the BOUNDS keyword of IDLgrVolume::Init to be reset to contain the entire volume.
Set this keyword to an array of integers which select which volumes to consider when computing the bounding box. A non-zero value selects a volume to be searched. The default is to search all loaded volumes. For example: VOLUMES=[0,1] will cause ComputeBounds to search only the volume loaded in DATA1.
The IDLgrVolume:: GetCTM function method returns the 4 x 4 graphics transform matrix from the current object upward through the graphics tree. IDLgrVolume is described above.
Set this keyword to the object reference of a destination object to specify that the projection matrix for the View object in the current tree be included in the returned transformation matrix. The resulting matrix will transform a point in the data space of the object on which the GetCTM method is called into a normalized coordinate system (-1 to +1 in X, Y, and Z), relative to the View object that contains the volume object.
Set this keyword equal to the object reference to an IDLgrModel object to specify that the returned matrix accumulate from the object on which the GetCTM method is called up to and including the specified model object.
The IDLgrVolume:: GetProperty procedure method retrieves the value of a property or group of properties for the volume. IDLgrVolume is described above.
Any keyword to IDLgrVolume::Init
Set this keyword to a named variable that will contain an anonymous structure containing the values of all of the properties associated with the state of this object. State information about the object includes things like color, range, tick direction, etc., but not image, vertex, or connectivity data, or user values.
Set this keyword equal to a named variable that will contain an object reference to the object that contains this object.
Set his keyword equal to a named variable that will contain an array of integers (one per volume, DATA0, DATA1, etc.) which have the value 1 if volume data has been loaded for that volume and 0 if that volume data is currently undefined.
Set this keyword equal to a named variable that will contain a two-element vector of the form [ xmin , xmax ] that specifies the range of x data coordinates covered by the graphic object.
The IDLgrVolume:: Init function method initializes the volume object. At least one volume method must be specified, via arguments or keywords. IDLgrVolume is described above.
NOTE: Init methods are special lifecycle methods , and as such cannot be called outside the context of object creation. This means that in most cases, you cannot call the Init method directly. There is one exception to this rule: If you write your own subclass of this class, you can call the Init method from within the Init method of the subclass.
Obj = OBJ_NEW('IDLgrVolume' [, vol 0 , vol 1 ] )
Result =
Obj
->
[IDLgrVolume::]
Init(
[vol
0
,
vol
1
]
) (
In a subclass' Init method only
.)
Properties retrievable via IDLgrVolume::GetProperty
Use this keyword to set the color and intensity of the volume's base ambient lighting. Color is specified as an RGB vector. The default is [255, 255, 255]. AMBIENT is applicable only when LIGHTING_MODEL is set.
Set this keyword to a six-element vector of the form [ xmin , ymin , zmin , xmax , ymax , zmax ], which represents the sub-volume to be rendered.
The composite function determines the value of a pixel on the viewing plane by analyzing the voxels falling along the corresponding ray, according to one of the following compositing functions:
dest' = src * srcalpha + dest * (1 - srcalpha)
is used to compute the final pixel color.
dest' = src + dest * ( 1 - srcalpha)
is used to compute the final pixel color. This equation assumes that the color tables have been pre-multiplied by the opacity tables. The accumulated values can be no greater than 255.Set this keyword to a floating point array with dimensions (4, n ) specifying the coefficients of n cutting planes. The cutting plane coefficients are in the form {{ n x , n y , n z , D }, ...} where ( n x ) X +( n y ) Y +( n z ) Z + D > 0, and ( X , Y , Z ) are the voxel coordinates. To clear the cutting planes, set this property to any scalar value (e.g. CUTTING_PLANES = 0). By default, no cutting planes are defined.
Set this keyword to a three-element array of the format ( d x , d y , d z ), which specifies a data volume. Setting this property is the same as including the vol0 argument at creation time. If the data volume dimensions do not match those of any pre-existing data in DATA1, the data in DATA1 will be removed from the object.
Set this keyword to a three-element array of the format ( d x , d y , d z ), which specifies a data volume. Setting this property is the same as including the vol1 argument at creation time. If the data volume dimensions do not match those of any pre-existing data in DATA0, the data in DATA0 will be removed from the object.
Set this keyword to a two-element floating point array [ zbright , zdim ] specifying the near and far Z planes between which depth cueing is in effect. Depth cueing is only honored when drawing to a destination object that uses the RGB color model.
Depth cuing causes an object to appear to fade into the background color of the view object with changes in depth. If the depth of an object is further than zdim (that is, if the object's location in the Z direction is farther from the origin than the value specified by zdim ), the object will be painted in the background color. Similarly, if the object is closer than the value of zbright , the object will appear in its "normal" color. Anywhere in-between, the object will be a blend of the background color and the object color. For example, if the DEPTH_CUE property is set to [-1,1], an object at the depth of 0.0 will appear as a 50% blend of the object color and the view color.
The relationship between Z bright and Z dim determines the result of the rendering:
You can disable depth cueing by setting zbright = zdim . The default is [0.0, 0.0].
Set this keyword to indicate that Trilinear interpolation is to be used to determine the data value for each step on a ray. Setting this keyword improves the quality of images produced, at the cost of more computing time. especially when the volume has low resolution with respect to the size of the viewing plane. Nearest neighbor sampling is used by default.
Set this keyword to use the current lighting model during rendering in conjunction with a local gradient evaluation.
Set this keyword equal to a string containing the name associated with this object. The default is the null string, ' '.
Set this keyword to relocate volume data from the input variables to the volume object, leaving the input variables undefined. Only the DATA0 keyword and the vol0 argument are affected. If this keyword is omitted, the input volume data will be duplicated and a copy will be stored in the object.
Set this keyword to a 256-element byte array to specify an opacity table for DATA0. The default table is the linear ramp.
Set this keyword to a 256-element byte array to specify an opacity table for DATA1. The default table is the linear ramp. This table is used only when VOLUME_SELECT is set equal to 1.
Set this keyword to a three element vector of the form [ x , y , z ] to specify the stepping factor through the voxel matrix.
Set this keyword to a 256 x 3-element byte array to specify an RGB color table for DATA0. The default table is the linear ramp.
Set this keyword to a 256 x 3-element byte array to specify an RGB color table for DATA1. The default table is the linear ramp. This table is used only when VOLUME_SELECT is set equal to 1.
Set this keyword to force the lighting model to use a two-sided voxel gradient. The two-sided gradient is different from the one-sided gradient (default) in that the absolute value of the inner product of the light direction and the surface gradient is used instead of clamping to 0.0 for negative values.
Set this keyword to a value of any type. You can use this "user value" to contain any information you wish. Remember that if you set the user value equal to a pointer or object reference, you should destroy the pointer or object reference explicitly when destroying the object it is a user value of.
Set this keyword to an integer value to select the form of the volume to be rendered. The VOLUME_SELECT keyword is used to modify the
src
and
srcalpha
parameters for the COMPOSITE_FUNCTION keyword (on page
COMPOSITE_FUNCTION (Get, Set)
).
src = RGB_TABLE0[DATA0],
srcalpha = OPACITY_TABLE0[DATA0]
src = (RGB_TABLE0[DATA0]*RGB_TABLE1[DATA1])/256,
srcalpha=(OPACITY_TABLE0[DATA0]*OPACITY_TABLE1[DATA1])/256
Set this keyword to a vector, [ s 0 , s 1 ], of scaling factors used to convert X coordinates from data units to normalized units. The formula for the conversion is as follows:
Normalized X = s 0 + s 1 * Data X
Set this keyword to a vector, [ s 0 , s 1 ], of scaling factors used to convert Y coordinates from data units to normalized units. The formula for the conversion is as follows:
Normalized Y = s 0 + s 1 * Data Y
Set this keyword to clip the rendering to the current Z-buffer and then update the buffer. The default is to not modify the current Z-buffer.
Set this keyword to a vector, [ s 0 , s 1 ], of scaling factors used to convert Z coordinates from data units to normalized units. The formula for the conversion is as follows:
Normalized Z = s 0 + s 1 * Data Z
Set this keyword to skip voxels with an opacity of 0. This keyword can increase the output contrast of MIP (MAXIMUM_INTENSITY) projections by allowing the background to show through. If this keyword is set, voxels with an opacity of zero will not modify the Z-buffer. The default (not setting the keyword) continues to render voxels with an opacity of zero.
The IDLgrVolume:: PickVoxel function method computes the coordinates of the voxel projected to a location specified by the 2D device coordinates point, [ x i , y i ], and the current Z-buffer. The function returns the volume indices as a a vector of three long integers. If the selected point is not within the volume, this function returns [-1,-1,-1]. IDLgrVolume is described above.
The IDLgrWindow object from which the Z-buffer is to be used.
The IDLgrVolume:: SetProperty procedure method sets the value of a property or group of properties for the volume. IDLgrVolume is described above.
Any keyword to IDLgrVolume::Init