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.
|
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
static int |
ADD
Deprecated.
Use
SoDataCompositor.PreDefCompositors.ADD instead. |
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.
|
static int |
FLOAT
Deprecated.
Use
SoDataCompositor.DataTypes.FLOAT instead. |
static int |
MINUS
Deprecated.
Use
SoDataCompositor.PreDefCompositors.MINUS instead. |
static int |
MULTIPLY
Deprecated.
Use
SoDataCompositor.PreDefCompositors.MULTIPLY instead. |
static int |
NONE
Deprecated.
Use
SoDataCompositor.PreDefCompositors.NONE instead. |
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).
|
static int |
SIGNED_BYTE
Deprecated.
Use
SoDataCompositor.DataTypes.SIGNED_BYTE instead. |
static int |
SIGNED_INT32
Deprecated.
Use
SoDataCompositor.DataTypes.SIGNED_INT32 instead. |
static int |
SIGNED_SHORT
Deprecated.
Use
SoDataCompositor.DataTypes.SIGNED_SHORT instead. |
static int |
UNSIGNED_BYTE
Deprecated.
Use
SoDataCompositor.DataTypes.UNSIGNED_BYTE instead. |
static int |
UNSIGNED_INT32
Deprecated.
Use
SoDataCompositor.DataTypes.UNSIGNED_INT32 instead. |
static int |
UNSIGNED_SHORT
Deprecated.
Use
SoDataCompositor.DataTypes.UNSIGNED_SHORT instead. |
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.Buffer[] input_buffer,
int[] data_types,
java.nio.Buffer output_buffer)
Deprecated.
use
#compose(SbVec3i, int[], ByteBuffer[], int[], ByteBuffer) instead. |
void |
compose(SbVec3i32 tile_dimension,
int[] dataset_ids,
java.nio.ByteBuffer[] input_buffer,
int[] data_types,
java.nio.ByteBuffer output_buffer)
The compose method can be overridden in a subclass to specify a custom
composition.
Inputs are: tile_dimension specifies the dimension of the tile (same for each data set). dataset_ids is an array of integers giving the id of each data set (set by the SoDataSet.dataSetId field of the SoDataSet
node).
input_buffer is an array of buffers containing the tile of each data
set. |
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, 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
@Deprecated public static final int UNSIGNED_BYTE
SoDataCompositor.DataTypes.UNSIGNED_BYTE
instead.@Deprecated public static final int UNSIGNED_SHORT
SoDataCompositor.DataTypes.UNSIGNED_SHORT
instead.@Deprecated public static final int UNSIGNED_INT32
SoDataCompositor.DataTypes.UNSIGNED_INT32
instead.@Deprecated public static final int SIGNED_BYTE
SoDataCompositor.DataTypes.SIGNED_BYTE
instead.@Deprecated public static final int SIGNED_SHORT
SoDataCompositor.DataTypes.SIGNED_SHORT
instead.@Deprecated public static final int SIGNED_INT32
SoDataCompositor.DataTypes.SIGNED_INT32
instead.@Deprecated public static final int FLOAT
SoDataCompositor.DataTypes.FLOAT
instead.@Deprecated public static final int NONE
SoDataCompositor.PreDefCompositors.NONE
instead.@Deprecated public static final int MINUS
SoDataCompositor.PreDefCompositors.MINUS
instead.@Deprecated public static final int ADD
SoDataCompositor.PreDefCompositors.ADD
instead.@Deprecated public static final int MULTIPLY
SoDataCompositor.PreDefCompositors.MULTIPLY
instead.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)
SoDataSet.dataSetId
field of the SoDataSet
node).convert
is true, the argument
data_types is null and each tile has already been converted to the final
data type (dataType
field) if necessary. Otherwise
(convert
is false) data_types[i] is the data type of
input_buffer[i].dataType
(number of bytes returned by getDataSize()
).public void compose(SbVec3i32 tile_dimension, int[] dataset_ids, java.nio.Buffer[] input_buffer, int[] data_types, java.nio.Buffer output_buffer)
#compose(SbVec3i, int[], ByteBuffer[], int[], ByteBuffer)
instead.public SoDataCompositor.DataTypes getDataType()
public static boolean isDataSigned(SoDataCompositor.DataTypes dataType)
rgbaMode
is true, then the data is considered to be UNSIGNED_INT32 (not signed).public int getNumSigBits()
public int getDataSize()
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 January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com