public class SoVolumeMask extends SoVolumeData
SoVolumeData
). A volume mask is itself a data volume consisting of binary values. Zero values are "false" and non-zero values are "true". A large number of masks may be defined simultaneously, using an SoVolumeMask
node for each one, and mask regions may overlap if desired.
SoVolumeMask
is derived from SoVolumeData
. Like SoVolumeData
it accesses its data through an SoVolumeReader
class. I.e. the data may be in a file or in memory (or any data source using a custom volume reader). The mask volume can be any data type, but unsigned byte is currently the most memory efficient representation.
SoVolumeMask
nodes must follow these rules:
SoVolumeMask
nodes must be children of an SoVolumeMaskGroup
node.
SoVolumeData
node and the SoVolumeMaskGroup
nodes must be children of an SoMultiDataSeparator
node.
SoVolumeData
and associated SoVolumeMask
nodes must each have a different value assigned to their dataSetId field (see SoDataSet
). Note that SoVolumeData
and SoVolumeMask
both have a default value of 1 for the dataSetId field, so some ids must be explicitly set.
SoVolumeMask
nodes only affect volume rendering (SoVolumeRender
). They do not affect slice rendering or other VolumeViz primitives.
SoVolumeMask
can be used to clip the data volume on a per-voxel basis. But the mask mechanism is much more powerful than that. Each region can have its own transfer function (color map) using SoTransferFunction
nodes. Each region can also have its own draw style (volume rendering, isosurface or boundary) using SoVolumeDataDrawStyle
nodes. Each region, including the original unmasked volume, is only visible if there exists a transfer function (SoTransferFunction
) with the same id value.
Mask regions:
A single SoVolumeMask
node effectively defines two regions:
Because intersecting regions are allowed, two SoVolumeMask
nodes define (up to) four regions:
Each additional mask defines one additional region (voxels that are true only in that mask).
In addition, if there exists a transfer function with the same id as the original volume (SoVolumeData
node), the color value from that transfer function is combined with the color value from the mask region's transfer function.
Transfer functions:
A separate transfer function can be specified for each of these regions using SoTransferFunction
nodes. The transfer function nodes may be placed under the SoVolumeMaskGroup
node, but this is not required.
NOTE: It is not currently possible to specify a different data range for each mask.
SoTransferFunction
node's
transferFunctionId equal to the mask's
dataSetId . If there is no transfer function with the same id as the mask, then that mask is ignored.
Draw Styles:
A separate draw style can be specified for each mask region and for the intersection voxels (but not for false voxels) using SoVolumeDataDrawStyle
nodes:
SoVolumeDataDrawStyle
nodes under the VolumeMaskGroup, alternating draw style, mask, draw style, mask.
SoVolumeMaskGroup
node in the scene graph.
Data Range:
SoVolumeMask
currently does not support separate data ranges for each mask region. The same SoDataRange
will be applied on all regions.
File format/default:
VolumeMask { }
See also:
SoVolumeDataDrawStyle
, SoVolumeRender
, SoOrthoSlice
, SoObliqueSlice
, SoVolumeReader
, SoVolumeSkin
, SoVolumeMask
, SoVolumeMaskGroup
, SoMultiDataSeparator
SoVolumeData.Axis, SoVolumeData.CoordinateTypes, SoVolumeData.OverMethods, SoVolumeData.StorageHints, SoVolumeData.SubMethods
SoDataSet.DataTypes, SoDataSet.LDMDataModifier
Inventor.ConstructorCommand
AUTO, AVERAGE, CONSTANT, COORDINATES_RECTILINEAR, COORDINATES_UNIFORM, CUBIC, data, dataRGBA, LINEAR, MAX, MEMORY, NEAREST, NONE, storageHint, TEX2D, TEX2D_MULTI, TEX2D_SINGLE, TEX3D, useExtendedData, usePalettedTexture, useSharedPalettedTexture, volumeDataId, VOLUMEPRO, X, Y, Z
allocateResourceOnRender, dataSetId, dataTransform, extent, fileName, FLOAT, ldmResourceParameters, SIGNED_BYTE, SIGNED_INT32, SIGNED_SHORT, texturePrecision, UNSIGNED_BYTE, UNSIGNED_INT32, UNSIGNED_SHORT, useCompressedTexture
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoVolumeMask()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getDefaultValue()
Returns default value of the volume mask.
|
void |
setDefaultValue(boolean defValue)
Set default value of the volume mask.
|
enableAutoSubSampling, enableAutoUnSampling, enableSubSampling, getCoordinateType, getHistogram, getIntMinMax, getPageSize, getRectilinearCoordinates, getSubSamplingLevel, getTexMemorySize, isAutoSubSamplingEnabled, isAutoUnSamplingEnabled, isPaging, isSubSamplingEnabled, loadRegions, reSampling, reSampling, setPageSize, setPageSize, setRGBAData, setSubSamplingLevel, setSubSamplingMethod, setTexMemorySize, subSetting, unSample, updateRegions, voxelToXYZ, voxelToXYZ, XYZToVoxel, XYZToVoxel
dataSize, editBoxes, editSolidShape, editSubVolume, editSubVolume, editSurfaceShape, editTile, editTile, finishEditing, getDataSize, getDataType, getDatumSize, getDimension, getDoubleMinMax, getLdmDataAccess, getLdmManagerAccess, getLDMReader, getMaxNumDataSets, getMinMax, getNodeFrontManager, getNumTimeSteps, getOverlapping, getReader, getTileDimension, getTileManager, getTileVisitor, getVVizGeometry, hasEditedTile, isDataFloat, isDataSigned, isTimeDependent, numSigBits, readTile, redoEditing, resetReader, setLDM, setLDMDataModifier, setLDMReader, setReader, setReader, setTileVisitor, startEditing, undoEditing, writeTile
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com