- All Implemented Interfaces:
public abstract class SoLDMDataTransform extends SoFieldContainerLDM data transform object. This object defines a transform function to be applied to each LDM tile after it is loaded (returned from the volume reader) but before it is stored in system memory (LDM data cache). This allows you to modify the original data (for example, scaling or filtering) before it is displayed. It can also be used to create multiple data sets in memory from a single data set on disk.
- Applies to all volume data.
A data transform can be applied to any type of volume data, not just data loaded from a .ldm format file. Internally all volume data sets are managed by LDM as tiles.
SoVolumeTransformnode also allows a transform function to be applied to each LDM tile, but the transform is applied immediately before the tile is loaded onto the graphics board.
SoVolumeTransformdoes allow the Data Access API to be used in the transform function.
SoDataCompositornode allows a transform function to be applied in the special case where multiple volumes should be combined into a single volume.
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
affect(SbBox3i32 region)Returns true if the transformation affects the specified region.
transformFunction(SoDataSet ds, SbVec3i32 bufferDimension, SoBufferObject bufferToTransform, SbBox3i32 dataBox, int resolutionLevel)Data transform function.
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable, touch
public boolean affect(SbBox3i32 region)Returns true if the transformation affects the specified region. Region is expressed in ijk space. Typically, the region represents a tile and this method is used to know if a tile is affected by this transformation.
public void transformFunction(SoDataSet ds, SbVec3i32 bufferDimension, SoBufferObject bufferToTransform, SbBox3i32 dataBox, int resolutionLevel)Data transform function.
This function allows a tile of data to be transformed after it is loaded, but before it is stored in main memory. It is not currently possible to access other tiles of data (for example using the data access API) from this function. Note that the function will be called from LDM data loader threads, so multiple threads may be executing in this function at the same time (on different tiles). Inputs are:
- The associated data set object the function is calling for. This allows retrieving information such as data type (ds->getDataType()).
- The dimensions of the tile to transform. This defines the size of the buffer and is the same for every tile in a dataset. However tiles on the "outside" of the dataset may be partial tiles and contain less than the full number of actual data values.
- A buffer containing the tile data to transform. The data should be modified "in place" in this buffer.
- The position and extent of the tile in data space (voxel coordinates). For lower resolution tiles (level > 0) the extent of the tile will be larger than the dimensions of the tile (number of values in the tile).
- The tile resolution level. Level 0 is full resolution data.
: This method must be thread safe, and must not make any OpenInventor database modification or notification.