XT file reader. More...
#include <VolumeViz/readers/SoVRXtFileReader.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
SoVRXtFileReader () | |
virtual ReadError | getDataChar (SbBox3f &size, SoDataSet::DataType &type, SbVec3i32 &dim) |
virtual void | getSubSlice (const SbBox2i32 &subSlice, int sliceNumber, void *data) |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Reader for Total ".xt" data files.
XT is a volume data format defined by Total (www.total.com).
SoVRXtFileReader::SoVRXtFileReader | ( | ) |
static SoType SoVRXtFileReader::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoVolumeReader.
virtual ReadError SoVRXtFileReader::getDataChar | ( | SbBox3f & | size, | |
SoDataSet::DataType & | type, | |||
SbVec3i32 & | dim | |||
) | [virtual] |
Gets the characteristics (file header) of the data volume.
See SoDataSet::setVolumeData().
You can use the convenience method setFilename() to specify the file location, in which case you will not have to open the file yourself. Then you can use the convenience method getBuffer() to read the header in order to get the requested information.
NOTE: We strongly recommend that readers implement this version of getDataChar, introduced in VolumeViz 5.1, because it uses SbVec3i32 for the volume dimension.
Implements SoVolumeReader.
virtual void SoVRXtFileReader::getSubSlice | ( | const SbBox2i32 & | subSlice, | |
int | sliceNumber, | |||
void * | data | |||
) | [virtual] |
Method required by VolumeViz 3.0.
Must copy the rectangular part defined by subSlice of the XY slice sliceNumber to the memory referenced by data. Slices will not always be read sequentially.
subSlice | 2D region of the slice to return. | |
sliceNumber | Slice number on the volume Z axis (first slice is 0). | |
data | Copy the data into this buffer. |
You can use the convenience method getBuffer() to read data from file. Note: setFilename() must have been called previously.
Implements SoVolumeReader.
virtual SoType SoVRXtFileReader::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoVolumeReader.