Generic file reader. More...
#include <VolumeViz/readers/SoVRGenericFileReader.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
SoVRGenericFileReader () | |
virtual ReadError | getDataChar (SbBox3f &size, SoDataSet::DataType &type, SbVec3i32 &dim) |
virtual void | getSubSlice (const SbBox2i32 &subSlice, int sliceNumber, void *data) |
void | setDataChar (const SbBox3f &size, const SoDataSet::DataType &type, const SbVec3i32 &dim, int headerSize=0) |
virtual ReaderType | getReaderType () |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Deprecated | |
| |
virtual SoDEPRECATED void | setDataChar (const SbBox3f &size, const SoDataSet::DataType &type, const SbVec3s &dim, int headerSize=0) |
SoDEPRECATED void | setNumTimeSteps (int) |
SoDEPRECATED void | setDataChar (SbBox3f &size, SoDataSet::DataType &type, SbVec3s &smalldim, int headerSize=0) |
Reader for volume data files containing only binary data values or else a fixed size header followed by binary data values.
Many volume data formats that are not directly supported by VolumeViz can be loaded using this reader.
The application must know:
Steps to follow:
SoVRGenericFileReader::SoVRGenericFileReader | ( | ) |
Constructor.
static SoType SoVRGenericFileReader::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoVolumeReader.
virtual ReadError SoVRGenericFileReader::getDataChar | ( | SbBox3f & | size, | |
SoDataSet::DataType & | type, | |||
SbVec3i32 & | dim | |||
) | [inline, virtual] |
Gets the characteristics (file header) of the data volume.
See SoVolumeData. size is the size of the actual volume. type is the type of the data. dim is the dimension of the data.
Implements SoVolumeReader.
virtual ReaderType SoVRGenericFileReader::getReaderType | ( | ) | [inline, virtual] |
Returns the reader type.
Reimplemented from SoVolumeReader.
virtual void SoVRGenericFileReader::getSubSlice | ( | const SbBox2i32 & | subSlice, | |
int | sliceNumber, | |||
void * | data | |||
) | [virtual] |
New method required by VolumeViz 3.0 when using large volume support.
Must copy a rectangular part of an XY slice to the memory specified by data. Slices will not always be read sequentially.
Implements SoVolumeReader.
virtual SoType SoVRGenericFileReader::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoVolumeReader.
SoDEPRECATED void SoVRGenericFileReader::setDataChar | ( | SbBox3f & | size, | |
SoDataSet::DataType & | type, | |||
SbVec3s & | smalldim, | |||
int | headerSize = 0 | |||
) | [inline] |
virtual SoDEPRECATED void SoVRGenericFileReader::setDataChar | ( | const SbBox3f & | size, | |
const SoDataSet::DataType & | type, | |||
const SbVec3s & | dim, | |||
int | headerSize = 0 | |||
) | [inline, virtual] |
void SoVRGenericFileReader::setDataChar | ( | const SbBox3f & | size, | |
const SoDataSet::DataType & | type, | |||
const SbVec3i32 & | dim, | |||
int | headerSize = 0 | |||
) | [inline] |
Since the format is raw data, it is necessary to specify the dimension and data size of the volume.
You can also specify a header size to add support for your own file format.
SoDEPRECATED void SoVRGenericFileReader::setNumTimeSteps | ( | int | ) | [inline] |
Since the format is raw data, it is sometime necessary to specify the number of time steps.