SIMVoleon  2.1.0
Coin3D volume rendering library
No Matches
SoVolumeReader Class Referenceabstract

Abstract superclass for all volume data reader classes. More...

#include <VolumeViz/readers/SoVolumeReader.h>

Inheritance diagram for SoVolumeReader:

Public Types

enum  CopyPolicy { COPY , NO_COPY , NO_COPY_AND_DELETE }

Public Member Functions

virtual void getDataChar (SbBox3f &size, SoVolumeData::DataType &type, SbVec3s &dim)=0
virtual int getNumSignificantBits (void)
SbVec3s getNumVoxels (SbVec3s realsize, SbVec3s subsamplinglevel) const
SbVec3s getSizeToAllocate (SbVec3s realsize, SbVec3s subsamplinglevel) const
virtual void getSubSlice (SbBox2s &slice, int slicenumber, void *voxels)=0
virtual SbBool getSubVolume (const SbBox3s &volume, const SbVec3s subsamplelevel, void *&voxels)
virtual SbBool getSubVolume (SbBox3s &volume, void *voxels)
virtual SbBool getSubVolumeInfo (SbBox3s &volume, SbVec3s reqsubsamplelevel, SbVec3s &subsamplelevel, SoVolumeReader::CopyPolicy &policy)
int setFilename (const char *filename)
virtual void setUserData (void *data)

Protected Member Functions

int bytesToInt (unsigned char *ptr, int sizeBytes)
int64_t fileSize (void)
void * getBuffer (int64_t offset, unsigned int size)
void swapBytes (int *intPtr, int sizeBytes)

Protected Attributes

void * m_data

Detailed Description

Abstract superclass for all volume data reader classes.

Member Function Documentation

◆ getDataChar()

void SoVolumeReader::getDataChar ( SbBox3f & size,
SoVolumeData::DataType & type,
SbVec3s & dim )
pure virtual

Returns information about the volume data contained in a volume reader. Sub-classes, i.e. the non-abstract readers, need to implement this function.

size is set to the "world size" of the volume, in unit coordinates.

type is set to either SoVolumeData::UNSIGNED_BYTE or SoVolumeData::UNSIGNED_SHORT, to signify that the voxel values are either 8-bit or 16-bit, respectively.

dim gives the volume dimensions in voxel coordinates, i.e. the number of rows, columns and stacks of voxels along the internal 3 coordinate axes of the volume.

Implemented in SoVRVolFileReader.

◆ getSubSlice()

void SoVolumeReader::getSubSlice ( SbBox2s & subslice,
int slicenumber,
void * data )
pure virtual

Extract a subslice from the volume (which may still reside solely on disk). Sub-classes, i.e. the non-abstract readers, need to implement this function.

Implemented in SoVRVolFileReader.

◆ setUserData()

void SoVolumeReader::setUserData ( void * data)

Reimplemented in SoVRVolFileReader.

The documentation for this class was generated from the following files: