Coin Logo http://www.sim.no
http://www.coin3d.org

Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

SoVolumeReader Class Reference

#include <VolumeViz/readers/SoVolumeReader.h>

Inheritance diagram for SoVolumeReader:

SoVRVolFileReader List of all members.

Detailed Description

Abstract superclass for all volume data reader classes.


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


Member Function Documentation

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.

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:

Copyright © 1998-2004 by Systems in Motion AS. All rights reserved.

Generated on Fri May 27 07:57:53 2005 for SIMVoleon by Doxygen. 1.4.2