Coin Logo Coin3D is Free Software,
published under the BSD 3-clause license.
https://bitbucket.org/Coin3D/
http://www.kongsberg.com/kogt/
SoVolumeReader Class Referenceabstract

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

#include <VolumeViz/readers/SoVolumeReader.h>

Inheritance diagram for SoVolumeReader:
SoVRVolFileReader

Public Types

enum  CopyPolicy { COPY , NO_COPY , NO_COPY_AND_DELETE }

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

void * m_data

Friends

class SoVolumeReaderP
class SoVolumeData

Detailed Description

Abstract superclass for all volume data reader classes.

Member Function Documentation

◆ setUserData()

void SoVolumeReader::setUserData ( void * data)
virtual

Reimplemented in SoVRVolFileReader.

◆ getDataChar()

virtual 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, needs 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()

virtual 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, needs to implement this function.

Implemented in SoVRVolFileReader.


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