Write data in memory More...
#include <VolumeViz/writers/SoVRMemoryWriter.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
SoVRMemoryWriter () | |
virtual SbBool | initialize () |
virtual SbBool | isDataConverted () const |
virtual SbBool | writeSubSlice (int sliceIndex, const SbBox2i32 &subSlice, SoBufferObject *buffer) |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFBufferObject | data |
SoSFVec2s | padding |
This writer is the writer corresponding to SoVRMemoryReader. It writes data in the data buffer. You can manually specify this buffer. Else, a buffer will be created in the initialize() method. This writer does not organize data on tiles (isDataConverted returns FALSE). So you must use the writeSubSlice method and write data slice by slice.
Do not use the writeTile method with this writer.
SoVRMemoryReader can return an instance of this class already configured to write into the same area of memory.
Padding can be used to add zeros around the slice to align them in memory:
____________________ |xxxxxxxxxxx| | |xxxxxxxxxxx| | |xxxxxxxxxxx| | |___________| | | | |__________________| <-----------><-----> slice padding
SoVRMemoryReader SoVolumeWriter SoVRLdmFileWriter
SoVRMemoryWriter::SoVRMemoryWriter | ( | ) |
Constructor.
static SoType SoVRMemoryWriter::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoVolumeWriter.
virtual SoType SoVRMemoryWriter::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoVolumeWriter.
virtual SbBool SoVRMemoryWriter::initialize | ( | ) | [virtual] |
virtual SbBool SoVRMemoryWriter::isDataConverted | ( | ) | const [virtual] |
virtual SbBool SoVRMemoryWriter::writeSubSlice | ( | int | sliceIndex, | |
const SbBox2i32 & | subSlice, | |||
SoBufferObject * | buffer | |||
) | [virtual] |
Writes the data contained in the specified subslice. This function must be called only if isDataConverted() return FALSE.Must be reimplemented in children classes.
Reimplemented from SoVolumeWriter.
Buffer containing data.
If specified, it must be the right size (nbVoxel * dataSize, by taking padding in account). If NULL, it will be allocated in the initialize() method and deleted in destructor. default is NULL.
Padding over x and y dimension, use to align slice data in memory.
default is (0, 0).