Click or drag to resize
SoVolumeMask Class

Volume mask.

Inheritance Hierarchy

Namespace: OIV.VolumeViz.Nodes
Assembly: OIV.VolumeViz (in OIV.VolumeViz.dll) Version: 10.12.3.0 (10.12.3.0)
Syntax
public class SoVolumeMask : SoVolumeData

The SoVolumeMask type exposes the following members.

Constructors
  NameDescription
Public methodSoVolumeMask

Constructor.

Top
Methods
  NameDescription
Public methodAffectsState

Returns true if a node has an effect on the state during traversal.

(Inherited from SoNode.)
Public methodCallback
(Inherited from SoDataSet.)
Public methodCopy
Calls Copy(false).
(Inherited from SoNode.)
Public methodCopy(Boolean)

Creates and returns an exact copy of the node.

(Inherited from SoNode.)
Public methodCopyFieldValues(SoFieldContainer)
Calls CopyFieldValues(fc, false).
(Inherited from SoFieldContainer.)
Public methodCopyFieldValues(SoFieldContainer, Boolean)

Copies the contents of fc's fields into this object's fields.

(Inherited from SoFieldContainer.)
Public methodDispose
Releases all resources used by SoDisposable.
(Inherited from SoDisposable.)
Public methodDistribute
(Inherited from SoNode.)
Public methodDoAction
(Inherited from SoVolumeData.)
Public methodEditBoxes

Replace all voxels in the region defined by a list of boxes with the specified value.

(Inherited from SoVolumeData.)
Public methodEditSolidShape

Replace all voxels inside the given shape with the specified value.

(Overrides SoVolumeDataEditSolidShape(SoNode, Double).)
Public methodEditSubVolume(SbBox3i32, SoBufferObject)

Replace the contents of a subvolume with the given data.

(Overrides SoVolumeDataEditSubVolume(SbBox3i32, SoBufferObject).)
Public methodEditSubVolume(SbBox3i32, Double)

Replace the contents of a subvolume with the specified value.

(Overrides SoVolumeDataEditSubVolume(SbBox3i32, Double).)
Public methodEditSurfaceShape

Replace all voxels intersecting the polygons or lines defined by the surfaceShape and given thickness with the specified value.

(Overrides SoVolumeDataEditSurfaceShape(SoNode, Single, Double).)
Public methodEditTile(SoLDMTileID, SoBufferObject)

Replaces the contents of a tile with the given data.

(Inherited from SoVolumeData.)
Public methodEditTile(SoLDMTileID, Double)

Replaces the contents of a tile with the specified value.

(Inherited from SoVolumeData.)
Public methodEnableNotify

Notification at this Field Container is enabled (if flag == true) or disabled (if flag == false).

(Inherited from SoFieldContainer.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodFieldsAreEqual

Returns true if this object's fields are exactly equal to fc's fields.

(Inherited from SoFieldContainer.)
Public methodFinishEditing

Terminates an editing transaction.

(Inherited from SoVolumeData.)
Public methodGet

Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.

(Inherited from SoFieldContainer.)
Public methodGetAllFields

Returns a list of fields, including the eventIn's and eventOut's.

(Inherited from SoFieldContainer.)
Public methodGetAlternateRep

This method is called by actions to allow the node to provide an "alternate representation" when appropriate (typically depending on the action type).

(Inherited from SoNode.)
Public methodGetBoundingBox
(Inherited from SoDataSet.)
Public methodGetCenterVolumeBox (Inherited from SoVolumeData.)
Public methodGetCoordinateType
(Inherited from SoVolumeData.)
Public methodGetDataSize

Returns the number of bytes per voxel in VolumeViz.

(Inherited from SoDataSet.)
Public methodGetDataType

Returns the data type.

(Inherited from SoDataSet.)
Public methodGetDatumSize

Returns the number of bytes per voxel.

(Inherited from SoDataSet.)
Public methodGetDefaultValue

Returns default value of the volume mask.

Public methodGetDimension

Returns the data set dimension.

(Inherited from SoDataSet.)
Public methodGetEventIn

Returns a the eventIn with the given name.

(Inherited from SoFieldContainer.)
Public methodGetEventOut

Returns the eventOut with the given name.

(Inherited from SoFieldContainer.)
Public methodGetField

Returns a the field of this object whose name is fieldName.

(Inherited from SoFieldContainer.)
Public methodGetFieldName

Returns the name of the given field in the fieldName argument.

(Inherited from SoFieldContainer.)
Public methodGetFields

Appends references to all of this object's fields to resultList, and returns the number of fields appended.

(Inherited from SoFieldContainer.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetHistogram
Returns the histogram of the volume data. Returns null reference if the requested data is not available.
(Inherited from SoVolumeData.)
Public methodGetLdmDataAccess

Returns a reference to the OIV.LDM.SoLDMDataAccess object.

(Inherited from SoDataSet.)
Public methodGetLDMReader

Returns a pointer to the current data set reader object.

(Inherited from SoDataSet.)
Public methodGetLDMTopoOctree

Returns the LDMTopoOctree used by this OIV.LDM.Nodes.SoDataSet.

(Inherited from SoDataSet.)
Public methodGetMatrix
(Inherited from SoNode.)
Public methodGetMinMax(Double, Double)

Returns min and max values of the data set.

(Inherited from SoVolumeData.)
Public methodGetMinMax(Int64, Int64)

Returns min and max values of the data set data.

(Inherited from SoVolumeData.)
Public methodGetName

Returns the name of an instance.

(Inherited from SoBase.)
Public methodGetOverlapping Obsolete.
(Inherited from SoDataSet.)
Public methodGetPrimitiveCount
(Inherited from SoNode.)
Public methodGetReader Obsolete.

Returns the current data set reader object.

(Inherited from SoDataSet.)
Public methodGetRectilinearCoordinates

Returns a vector describing mapping from uniform space to rectilinear space.

(Inherited from SoVolumeData.)
Public methodGetRenderEngineMode

Returns the supported Render engine mode.

(Inherited from SoNode.)
Public methodGetRenderUnitID
(Inherited from SoVolumeData.)
Public methodGetSizeVolumeBox (Inherited from SoVolumeData.)
Public methodGetStringName (Inherited from SoBase.)
Public methodGetTexMemorySize Obsolete.

Returns the maximum texture memory size to use in mega texels.

(Inherited from SoVolumeData.)
Public methodGetTileDimension

Returns the tile dimension.

(Inherited from SoDataSet.)
Public methodGetTileIDInMemory

Debug purpose only.

(Inherited from SoDataSet.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetVolumeBox (Inherited from SoVolumeData.)
Public methodGetVolumeData
Public methodGLRender
Public methodGLRenderBelowPath
(Inherited from SoNode.)
Public methodGLRenderInPath
(Inherited from SoNode.)
Public methodGLRenderOffPath
(Inherited from SoNode.)
Public methodGrabEventsCleanup
(Inherited from SoNode.)
Public methodGrabEventsSetup
(Inherited from SoNode.)
Public methodHandleEvent
(Inherited from SoDataSet.)
Public methodHasDefaultValues

Returns true if all of the object's fields have their default values.

(Inherited from SoFieldContainer.)
Public methodHasEditedTile

Returns true if DataSet has edited tiles.

(Inherited from SoDataSet.)
Public methodIsBoundingBoxIgnoring

This method is used by getBoundingBox action traversal to know if the current node must be traversed or not, ie the bounding should be ignored.

(Inherited from SoNode.)
Public methodIsDataInMemory

Indicates whether the data attached to a tile is in main memory.

(Inherited from SoDataSet.)
Public methodIsInMemory

Indicates whether a tile is in main memory.

(Inherited from SoDataSet.)
Public methodIsNotifyEnabled

Notification is the process of telling interested objects that this object has changed.

(Inherited from SoFieldContainer.)
Public methodIsOverride

Returns the state of the override flag.

(Inherited from SoNode.)
Public methodIsSynchronizable

Gets the ScaleViz synchronizable state of this object.

(Inherited from SoBase.)
Public methodNumSigBits

Returns the number of significant bits.

(Inherited from SoDataSet.)
Public methodPick
(Inherited from SoDataSet.)
Public methodRayPick
(Inherited from SoNode.)
Public methodReadTile(SoBufferObject, SoLDMTileID, Boolean)

Copies the specified tile into the provided buffer.

(Inherited from SoDataSet.)
Public methodReadTile(SoLDMTileID, SoBufferObject, Boolean)

Copies the specified tile into the provided buffer.

(Inherited from SoDataSet.)
Public methodReadTile(SoLDMTileID, Byte, Boolean) Obsolete.
(Inherited from SoDataSet.)
Public methodRedoEditing

Redo all modifications associated with the specified transaction id.

(Inherited from SoVolumeData.)
Public methodReSampling(SbVec3i32, SoVolumeDataSubMethods) Obsolete.
Calls ReSampling(dimension, subMethod, OIV.VolumeViz.Nodes.SoVolumeData.OverMethods( .SoVolumeData.NONE )).
(Inherited from SoVolumeData.)
Public methodReSampling(SbVec3i32, SoVolumeDataSubMethods, SoVolumeDataOverMethods) Obsolete.

Re-samples the volume down to or up to the given dimension using the sub-sampling method OIV.VolumeViz.Nodes.SoVolumeData.SubMethods and the over-sampling method OIV.VolumeViz.Nodes.SoVolumeData.OverMethods.

(Inherited from SoVolumeData.)
Public methodResetReader
(Inherited from SoDataSet.)
Public methodSaveEditing
Save modifications to a file.
(Inherited from SoDataSet.)
Public methodSaveEditing(Boolean)
Save modifications to a file.
(Inherited from SoDataSet.)
Public methodSaveEditing(Boolean, IListString)
Save modifications to a file.
(Inherited from SoDataSet.)
Public methodSearch
(Inherited from SoNode.)
Public methodSet

Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.

(Inherited from SoFieldContainer.)
Public methodSetDefaultValue

Set default value of the volume mask.

Public methodSetIsReadChar
Public methodSetLDMReader

Sets the LDM volume reader object to use.

(Inherited from SoDataSet.)
Public methodSetName (Inherited from SoBase.)
Public methodSetOverride

Turns the override flag on or off.

(Inherited from SoNode.)
Public methodSetProperties
Public methodSetReader(SoVolumeReader) Obsolete.
Calls SetReader(reader, false).
(Inherited from SoDataSet.)
Public methodSetReader(SoVolumeReader, Boolean) Obsolete.

This method allows the data to be read directly from the disk using the specified subclass of OIV.LDM.Readers.SoVolumeReader.

(Inherited from SoDataSet.)
Public methodSetRGBAData

Force data to be considered as RGBA values.

(Inherited from SoVolumeData.)
Public methodSetSynchronizable

Sets this to be a ScaleViz synchronizable object.

(Inherited from SoBase.)
Public methodSetTexMemorySize Obsolete.

Specifies the maximum texture memory size to use in mega texels.

(Inherited from SoVolumeData.)
Public methodSetToDefaults

Sets all fields in this object to their default values.

(Inherited from SoFieldContainer.)
Public methodStartEditing

Initiate an editing transaction.

(Inherited from SoVolumeData.)
Public methodSubSetting Obsolete.

Extracts the data volume defined by region.

(Inherited from SoVolumeData.)
Public methodToString
Converts this SoBase structure to a human readable string.
(Inherited from SoBase.)
Public methodTouch

Marks an instance as modified, simulating a change to it.

(Inherited from SoNode.)
Public methodUndoEditing

Undo all modifications associated with the specified transaction id.

(Inherited from SoVolumeData.)
Public methodUpdateRegions

Updates regions of the volume that have been modified.

(Inherited from SoVolumeData.)
Public methodUpdateTilesInTextureMemory

Reloads textures corresponding to the given tile IDs.

(Inherited from SoVolumeData.)
Public methodUseFakeData

Creates fake data in buffer.

(Inherited from SoVolumeData.)
Public methodVoxelToXYZ(SbBox3f)

Converts the specified box in voxel coordinates (I,J,K) to geometric coordinates (X,Y,Z).

(Inherited from SoDataSet.)
Public methodVoxelToXYZ(SbVec3f)

Converts the specified point in voxel coordinates (I,J,K) to geometric coordinates (X,Y,Z).

(Inherited from SoDataSet.)
Public methodWrite
(Inherited from SoDataSet.)
Public methodWriteTile

Write the specified tile using the specified writer.

(Inherited from SoDataSet.)
Public methodXYZToVoxel(SbBox3f)

Converts the specified box in geometric coordinates to voxel coordinates.

(Inherited from SoDataSet.)
Public methodXYZToVoxel(SbVec3f)

Converts the specified point in geometric coordinates (X,Y,Z) to voxel coordinates (I,J,K).

(Inherited from SoDataSet.)
Top
Properties
  NameDescription
Public propertyallocateResourceOnRender

Indicates if resource allocation is done only on first render traversal or as soon as the node is created.

(Inherited from SoDataSet.)
Public propertydata

Specifies the volume data, including dimensions, data type and number of significant bits.

(Inherited from SoVolumeData.)
Public propertydataRGBA

Contains true if the volume contains RGBA values rather than scalar values.

(Inherited from SoVolumeData.)
Public propertydataSetId

When using multiple OIV.LDM.Nodes.SoDataSet nodes, the OIV.LDM.Nodes.SoDataSet.dataSetId field uniquely identifies each data set used in the compositing.

(Inherited from SoDataSet.)
Public propertydataTransform

If set to an appropriate OIV.LDM.Nodes.SoLDMDataTransform object, the object's transformFunction method is called after each tile is loaded, but before it is stored in main memory.

(Inherited from SoDataSet.)
Public propertyextent

The real size (extent) of the volume in modeling coordinates.

(Inherited from SoDataSet.)
Public propertyfileName

Indicates the file location containing the data set.

(Inherited from SoDataSet.)
Public propertyIsDisposable
ISafeDisposable interface implementation.
(Inherited from SoDisposable.)
Public propertyLDMDataTransformCallback Obsolete.

If set, the user-defined function is called after each tile is loaded, but before it is stored in main memory.

(Inherited from SoDataSet.)
Public propertyldmResourceParameters

Contains an OIV.LDM.Nodes.SoLDMResourceParameters object which allows you to set LDM resource parameters.

(Inherited from SoDataSet.)
Public propertyReader

Returns the current data set reader object.

(Inherited from SoDataSet.)
Public propertytexturePrecision

For scalar (non-RGBA) data, specifies the size of voxel values on the GPU in bits.

(Inherited from SoDataSet.)
Public propertyundefinedValue

Data with this value won't be rendered.

(Inherited from SoDataSet.)
Public propertyuseCompressedTexture

Controls use of OpenGL lossy texture compression for RGBA data (if available).

(Inherited from SoDataSet.)
Public propertyuseExtendedData

If true, VolumeViz stores an additional copy of each loaded tile.

(Inherited from SoVolumeData.)
Public propertyusePalettedTexture

For a volume containing scalar data values, controls whether scalar values (true) or RGBA values (false) are loaded on the GPU (the name is historical).

(Inherited from SoVolumeData.)
Public propertyUserData
Gets or sets the user data to be contained by the field container.
(Inherited from SoFieldContainer.)
Public propertyuseSharedPalettedTexture

Note: On graphics boards that support programmable shaders, this field is ignored (virtually all graphics boards support programmable shaders).

(Inherited from SoVolumeData.)
Top
Remarks

This node specifies an arbitrary voxel-based region of a volume data set (OIV.VolumeViz.Nodes.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 OIV.VolumeViz.Nodes.SoVolumeMask node for each one, and mask regions may overlap if desired.

OIV.VolumeViz.Nodes.SoVolumeMask is derived from OIV.VolumeViz.Nodes.SoVolumeData. Like OIV.VolumeViz.Nodes.SoVolumeData it accesses its data through an OIV.LDM.Readers.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.

OIV.VolumeViz.Nodes.SoVolumeMask nodes must follow these rules:

OIV.VolumeViz.Nodes.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 OIV.LDM.Nodes.SoTransferFunction nodes. Each region can also have its own draw style (volume rendering, isosurface or boundary) using OIV.VolumeViz.Nodes.SoVolumeDataDrawStyle nodes. Each region, including the original unmasked volume, is only visible if there exists a transfer function (OIV.LDM.Nodes.SoTransferFunction) with the same id value.

Mask regions:

A single OIV.VolumeViz.Nodes.SoVolumeMask node effectively defines two regions:

  • False voxels (where the mask voxel = 0), and

  • True voxels (where is mask voxel != 0).

Because intersecting regions are allowed, two OIV.VolumeViz.Nodes.SoVolumeMask nodes define (up to) four regions:

  • False (where all masks are 0),

  • True only in mask 1,

  • True only in mask 2, and

  • True in more than one mask (intersection region).

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 (OIV.VolumeViz.Nodes.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 OIV.LDM.Nodes.SoTransferFunction nodes. The transfer function nodes may be placed under the OIV.VolumeViz.Nodes.SoVolumeMaskGroup node, but this is not required.

NOTE: It is not currently possible to specify a different data range for each mask.

  • A transfer function is associated with a specific mask (i.e. with the voxels that are true only in that mask), by setting the OIV.LDM.Nodes.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.

  • A transfer function is associated with all "false" voxels (voxels that do not belong to any mask) by setting its transferFunctionId equal to zero. If there is no transfer function with id = 0, then "false" voxels are not rendered.

  • A transfer function is associated with all "intersection" voxels (voxels that belong to more than one mask) by setting its transferFunctionId equal to OIV.VolumeViz.Nodes.SoVolumeMaskGroup.TRANSFERFUNCTION_INTERSECTION_ID. If there is no transfer function with this id value, then intersection voxels (if any) are rendered using the default GRAY color map.

Draw Styles:

A separate draw style can be specified for each mask region and for the intersection voxels (but not for false voxels) using OIV.VolumeViz.Nodes.SoVolumeDataDrawStyle nodes:

  • Unlike transfer functions, a draw style is associated with a mask (voxels that are true only in that mask) by traversal order. In other words, each mask uses the draw style that is current when the mask is traversed. So you need to put OIV.VolumeViz.Nodes.SoVolumeDataDrawStyle nodes under the VolumeMaskGroup, alternating draw style, mask, draw style, mask.

  • A draw style is associated with all "intersection" voxels (voxels that belong to more than one mask) by placing it before the OIV.VolumeViz.Nodes.SoVolumeMaskGroup node in the scene graph.

Data Range:

OIV.VolumeViz.Nodes.SoVolumeMask currently does not support separate data ranges for each mask region. The same OIV.LDM.Nodes.SoDataRange will be applied on all regions.

Note that the inherited undefinedValue field is ignored. Setting it has no effect.

FILE FORMAT/DEFAULT

VolumeMask {
allocateResourceOnRender false
data NODATA 0 0 0 UBYTE 8
dataRGBA false
dataSetId 1
dataTransform NULL
extent -1 -1 -1 1 1 1
fileName ""
texturePrecision 0
undefinedValue NaN
useCompressedTexture true
useExtendedData false
usePalettedTexture true
useSharedPalettedTexture true
}

See Also