Image data adapter for in memory data. More...
#include <ImageViz/Nodes/Images/SoMemoryDataAdapter.h>
Public Types | |
enum | LayerOrganization { CONTIGUOUS_PER_PIXEL, CONTIGUOUS_PER_LAYER, CONTIGUOUS_PER_PLANE, CONTIGUOUS_PER_VOLUME } |
Public Member Functions | |
virtual SoType | getTypeId () const |
SoMemoryDataAdapter () | |
SoBufferObject * | getBufferObject () |
Static Public Member Functions | |
static SoType | getClassTypeId () |
static SoMemoryDataAdapter * | createMemoryDataAdapter (const SbVec4i32 &dimension, SbImageDataType imageInfos, LayerOrganization organization, SoBufferObject *data) |
Loads image data from memory. See SoImageDataAdapter for methods to access the data.
extent | 0,0,0, 1,1,1 |
SoImageDataAdapter, SoFileDataAdapter, SoVolumeReaderAdapter
Layer organization.
SoMemoryDataAdapter::SoMemoryDataAdapter | ( | ) |
Default constructor.
Init an image with one voxel unit of one component of type UNSIGNED_BYTE.
Please use createMemoryDataAdapter() to create a Memory adapter from existing block of memory.
static SoMemoryDataAdapter* SoMemoryDataAdapter::createMemoryDataAdapter | ( | const SbVec4i32 & | dimension, | |
SbImageDataType | imageInfos, | |||
LayerOrganization | organization, | |||
SoBufferObject * | data | |||
) | [static] |
Factory method that creates an adapter from an existing block of memory.
Note: An SoMemoryDataAdapter stores its data in CONTIGUOUS_PER_PIXEL. Data may be copied and reorganized if LayerOrganization is not CONTIGUOUS_PER_PIXEL.
dimension | Dimension of the buffer (width, height, depth, timestep). | |
imageInfos | Define the format type of data. | |
organization | Define the organization of layers. | |
data | Buffer object to map. If NULL a buffer is automatically allocated and its values are initialized to 0. |
SoBufferObject* SoMemoryDataAdapter::getBufferObject | ( | ) |
Returns the buffer object containing the image data.
Data are stored line by line, slice by slice, channels in CONTIGUOUS_PER_PIXEL.
static SoType SoMemoryDataAdapter::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoImageDataAdapter.
virtual SoType SoMemoryDataAdapter::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoImageDataAdapter.