public class SoImageDataAdapter extends SoFieldContainer
SoFileDataAdapter
to use data in a file.
SoMemoryDataAdapter
to use data already in memory.
SoProxyDataAdapter
to use a subset of data already in an SoImageDataAdapter
.
SoVolumeReaderAdapter
to use data from an SoVolumeReader
.
NOTE:SoImageDataAdapter
provides access to the image data but does not guarantee that all the data is loaded in memory. Only SoMemoryDataAdapter
is guaranteed to do that. As a result, only an SoMemoryDataAdapter
(or an SoProxyDataAdapter
that is attached to an SoMemoryDataAdapter
) is completely safe to use as input for ImageViz filter engines. Many engines will work with data partially in memory, but some, for example SoImageRegistrationTransform3d
, will only work if the image is completely in memory. See the documentation for the specific engines you are using. Conveniently, the utility method SoImageDataAdapterHelper.getAppropriateAdapter() returns an SoMemoryDataAdapter
object if there is enough memory to load all the data.
See also:
ImageViz Overview
SoFieldContainer
, SbImageDataAdapterHelper
Modifier and Type | Class and Description |
---|---|
static class |
SoImageDataAdapter.Interpretations
Image Interpretation.
|
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
static int |
BINARY
Deprecated.
Use
SoImageDataAdapter.Interpretations.BINARY instead. |
SoSFBox3f |
extent
The
extent and orientation fields define the position, size and orientation of the image in 3D (typicallly the physical space). |
SoSFEnum<SoImageDataAdapter.Interpretations> |
interpretation
Image Interpretation Default is
VALUE . |
static int |
LABEL
Deprecated.
Use
SoImageDataAdapter.Interpretations.LABEL instead. |
SoSFRotation |
orientation |
static int |
VALUE
Deprecated.
Use
SoImageDataAdapter.Interpretations.VALUE instead. |
VERBOSE_LEVEL, ZeroHandle
Modifier and Type | Method and Description |
---|---|
SbVec3f |
getColumnDirection()
Returns the vector in physical coordinate that points from the origin (0,0,0) to the point (0,1,0).
|
SbImageDataAccessor |
getDataAccessor()
Returns an
SbImageDataAccessor . |
SbBox3f |
getExtent()
Returns the extent of the image in 3D.
|
SbImageDataType |
getImageDataType()
Returns the data type of the image.
|
SbMatrix |
getIndexToPhysicalTransformation()
Returns the transformation that maps a position in the image coordinate system to a position in the physical coordinate system.
|
SoImageDataAdapter.Interpretations |
getInterpretation()
Returns the current interpretation of the image.
|
SbVec3f |
getOrigin()
Returns the image origin in 3D.
|
SbVec3f |
getPlaneDirection()
Returns the vector in physical coordinate that points from the origin (0,0,0) to the point (0,0,1).
|
SbVec3f |
getRowDirection()
Returns the vector in physical coordinate that points from the origin (0,0,0) to the point (1,0,0).
|
SbVec4i32 |
getSize()
Returns a vector representing the dimensions of the image data.
|
SbVec3f |
getVoxelSize()
Returns the size of a voxel in 3D.
|
void |
setDirection(SbVec3f rowDirection,
SbVec3f columnsDirection)
Set the direction cosines of rows and columns.
|
void |
setInterpretation(SoImageDataAdapter.Interpretations interpretation)
Sets the interpretation of the image.
|
void |
setOrigin(SbVec3f origin)
Sets the image origin in 3D.
|
void |
setVoxelSize(SbVec3f voxelSize)
Sets the voxel size in 3D.
|
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable, touch
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
@Deprecated public static final int VALUE
SoImageDataAdapter.Interpretations.VALUE
instead.@Deprecated public static final int LABEL
SoImageDataAdapter.Interpretations.LABEL
instead.@Deprecated public static final int BINARY
SoImageDataAdapter.Interpretations.BINARY
instead.public final SoSFEnum<SoImageDataAdapter.Interpretations> interpretation
VALUE
.
This field defines the way the data values in the image should be interpreted. Some engines require their input image to have a specific interpretation type and give an error if the interpretation type is incorrect. Engines automatically set the appropriate interpretation type in their output image(s). The application is responsible for setting the appropriate interpretation type in images created by the application, for example if a mask image is loaded from disk. .public final SoSFBox3f extent
extent
and orientation
fields define the position, size and orientation of the image in 3D (typicallly the physical space).
The extent field defines an axis aligned box in 3D. It has a 'min' corner, which is the image origin, and a 'max' corner. The orientation field defines a rotation around the image origin.
If the image is loaded from a file format that specifies a physical extent and/or orientation (for example DICOM), then these fields are initialized with the information specifies in the image file. If no extent is specified, then the extent field is set to (0, 0, 0, sizeX, sizeY, sizeZ). If no rotation is specified, then the orientation field is set to identity. The application can set either or both of these fields as needed.
The voxel size is the extent divided by the image dimensions (see getSize()
).
public final SoSFRotation orientation
SoImageDataAdapter.extent
public SbVec4i32 getSize()
public SbVec3f getRowDirection()
public SbImageDataType getImageDataType()
public void setDirection(SbVec3f rowDirection, SbVec3f columnsDirection)
In the DICOM standard, this information corresponds to the tag "Image Orientation (Patient) (0020,0037)"
public SoImageDataAdapter.Interpretations getInterpretation()
interpretation
field. .public void setInterpretation(SoImageDataAdapter.Interpretations interpretation)
interpretation
field. .public SbVec3f getVoxelSize()
public SbImageDataAccessor getDataAccessor()
SbImageDataAccessor
.
The SbImageDataAccessor
can be used to access data contained inside this SoImageDataAdapter
.public void setVoxelSize(SbVec3f voxelSize)
public SbMatrix getIndexToPhysicalTransformation()
public SbBox3f getExtent()
extent
field.public SbVec3f getColumnDirection()
public void setOrigin(SbVec3f origin)
extent
. The width and height of the extent are unchanged and therefore the voxel size is unchanged.public SbVec3f getPlaneDirection()
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com