public class SoDataCompositor extends SoNode
SoDataCompositor
node allows you to combine multiple data sets in memory instead of having to store the combined data sets on disk. For example, it can be used to visualize the result of the difference between two data sets. Notice: The SoDataCompositor
cannot be used for unary operation (the number of data set used with a data compositor must be stricly greater than one). Unary operation can be performed using the SoLDMDataTransformCB (see SoDataSet
node).
NOTE: This node is only useful in LDM mode.
A number of rules apply to the use of SoDataCompositor
:
SoDataCompositor
node and SoDataSet
nodes must be children of an SoMultiDataSeparator
node (an ordinary SoSeparator
will not work correctly).
SoDataCompositor
node must be inserted before the SoDataSet
nodes in the scene graph.
SoOrthoSlice
, SoVolumeRender
) are allowed between the SoDataSet
nodes that are used for the composition.
SoDataSet
node used for data compositing should not be referenced twice in the scene graph. Another data set node pointing to the same file should rather be instantiated).
SoSeparator
node.
SoSeparator
node.
SoDataSet
nodes used for compositing with SoDataSet
nodes used for normal rendering under the same SoSeparator
.
For example, to realize the difference of two data sets, only the SoDataCompositor
node, the SoDataSet
nodes, and the rendering primitive node must be inserted under the SoMultiDataSeparator
node created to handle the composition.
Each SoDataSet
following the compositor must have the same exact dimensions. However, the data set nodes can have different voxel data types (bytes per voxel). The final voxel data type is specified by the data compositor node through the dataType
field.
If the rgbaMode
field is set to true, then dataType
and numSigBits
are ignored, and the output data is generated as UNSIGNED_INT32 with 32 significant bits.
The SoDataCompositor
node offers different default composition operators (see preDefCompositor
) but it is possible to create a customized operator by subclassing the node and redefining one of the compose
methods. To use the custom operator, the preDefCompositor
field must be set to NONE.
File format/default:
DataCompositor{
dataType | UNSIGNED_BYTE |
numSigBits | 0 |
rgbaMode | false |
preDefCompositor | MINUS |
convert | true |
Action behavior:
SoCallbackAction
, SoGLRenderAction
, SoWriteAction
, SoGetBoundingBoxAction
, SoPickAction
Sets data compositor parameters in the traversal state.
See also:
Modifier and Type | Class and Description |
---|---|
static class |
SoDataCompositor.DataTypes
Supported data types.
|
static class |
SoDataCompositor.PreDefCompositors
Predefined compositor.
|
SoNode.RenderModes
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFBool |
convert
If the convert field is true, LDM will call the compose method after automatically converting data to the final data type if necessary.
|
SoSFEnum<SoDataCompositor.DataTypes> |
dataType
Data type of the final composed buffer.
|
SoSFShort |
numSigBits
Number of significant bits of the final composed datum.
|
SoSFEnum<SoDataCompositor.PreDefCompositors> |
preDefCompositor
Predefined composition method.
|
SoSFBool |
rgbaMode
Final composed buffer contains RGBA values (default is false).
|
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoDataCompositor() |
Modifier and Type | Method and Description |
---|---|
int[] |
compose(int numDataSet,
SbVec3i32 tileDimension,
SoBufferObject[] inputBuffer,
SoBufferObject outputBuffer)
The compose method can be overridden in a subclass to specify a custom composition.
|
void |
compose(SbVec3i32 tile_dimension,
int[] dataset_ids,
java.nio.ByteBuffer[] input_buffer,
int[] data_types,
java.nio.ByteBuffer output_buffer) |
int |
getDataSize()
Returns number of bytes for output datum.
|
SoDataCompositor.DataTypes |
getDataType()
Returns the output data type.
|
int |
getNumSigBits()
Returns the output number of significant bits.
|
static boolean |
isDataSigned(SoDataCompositor.DataTypes dataType)
Returns true if the given data type is a signed integer data type.
|
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, 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, getName, isDisposable, isSynchronizable, setName, setSynchronizable
getNativeResourceHandle
public final SoSFEnum<SoDataCompositor.DataTypes> dataType
rgbaMode
is true, this field is ignored and the output buffer is UNSIGNED_INT32.public final SoSFShort numSigBits
: If rgbaMode
is true, this field is ignored and all 32 bits are significant.
public final SoSFBool rgbaMode
dataType
and numSigBits
fields are ignored and the output data is UNSIGNED_INT32 with 32 significant bits.public final SoSFEnum<SoDataCompositor.PreDefCompositors> preDefCompositor
public final SoSFBool convert
public void compose(SbVec3i32 tile_dimension, int[] dataset_ids, java.nio.ByteBuffer[] input_buffer, int[] data_types, java.nio.ByteBuffer output_buffer)
public int getDataSize()
public static boolean isDataSigned(SoDataCompositor.DataTypes dataType)
rgbaMode
is true, then the data is considered to be UNSIGNED_INT32 (not signed).public SoDataCompositor.DataTypes getDataType()
public int getNumSigBits()
public int[] compose(int numDataSet, SbVec3i32 tileDimension, SoBufferObject[] inputBuffer, SoBufferObject outputBuffer)
SoDataSet
node).
NOTE: For compatibility purposes, if this method is not redefined then the version with void* parameters instead of SoBufferObject* will be used.
Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com