Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

vlVolData Class Reference

This class will store the 3D data of a vlVolume in different layouts. More...

#include <vlvoldata.h>

Inheritance diagram for vlVolData:

vlVolDataLayoutBase< DataType > vlVolDataLayout< DataType, Layout > vlVolDataLayout< DataType, LayoutType > vlVolDataLayout< DataType, LayoutType > vlVolDataLayout< DataType, vlLayout::Linear > List of all members.

Public Member Functions

virtual ~vlVolData ()
 default destructor

virtual vlDim dim () const
 Returns the dimensions of the 3D data.

virtual vlStep stepping () const
 Returns the stepping in voxel distance along x, y and z axis.

virtual vlUnit units () const
 Returns the actual distance between the voxels along x, y and z.

virtual uint16 bitsPerVoxel () const
 Returns the number of bits that form a voxel.

virtual uint16 bytesPerVoxel () const
 Returns the number of bytes that form a voxel.

virtual uint64 voxelCount () const
 Returns the total number of voxels in the volume = XDim x YDim x ZDim.

virtual vlDataType dataType () const
 Returns the type of the data stored.

virtual const char * typeInfo () const=0
 Returns the type name of the stored data.

virtual vlLayoutType layout () const
 Returns the layout in which the data is stored.

virtual bool isDirty () const
 Returns the state of the dirty flag.

virtual void setDirty (bool dirty)
 Set/Reset the dirty flag.

virtual bool isValid () const=0
 Returns true if the data is valid.

virtual bool clear (const uint8 data=0x00)=0
 Clears the volume data with the given data.

virtual void * getVoxelVoidPtr (const vlPoint3ui &position) const=0
 Returns the pointer to the voxel at the given position.


Protected Member Functions

 vlVolData (const vlDim &dim, const vlDataType dataType, const vlUnit &units, const vlLayoutType layout)
 Constructor - only for derived classes.


Protected Attributes

vlDim m_dim
 dimension for the data along x, y and z

vlStep m_step
 step distance for the data along x, y and z

vlUnit m_units
 Unit size of each voxel.

vlDataType m_dataType
 data type of the stored data

vlLayoutType m_layout
 The layout in which the data is stored.

uint16 m_bitsPerVoxel
 The number of bits and bytes each voxel consumes.

uint16 m_bytesPerVoxel
 The number of bits and bytes each voxel consumes.

bool m_dirty
 Dirty flag - true indicates volume has changed.


Detailed Description

This class is a base class. vlVolDataLayout inherits this class and defines additional API for each data layout. To add a new data layout, subclass vlVolDataLayout.

Author:
Sarang Lakare <sarang@users.sf.net>
See also:
vlVolDataLayout

Definition at line 46 of file vlvoldata.h.


Constructor & Destructor Documentation

vlVolData::~vlVolData  )  [virtual]
 

Definition at line 58 of file vlvoldata.cpp.

vlVolData::vlVolData const vlDim dim,
const vlDataType  dataType,
const vlUnit units,
const vlLayoutType  layout
[protected]
 

Parameters:
dim dimensions of the data to be created.
dataType type of data to be stored.

Definition at line 43 of file vlvoldata.cpp.


Member Function Documentation

uint16 vlVolData::bitsPerVoxel  )  const [virtual]
 

Definition at line 82 of file vlvoldata.cpp.

References m_bitsPerVoxel, and uint16.

Referenced by vlVolume::bitsPerVoxel().

uint16 vlVolData::bytesPerVoxel  )  const [virtual]
 

Definition at line 88 of file vlvoldata.cpp.

References m_bytesPerVoxel, and uint16.

Referenced by vlVolume::bytesPerVoxel().

virtual bool vlVolData::clear const uint8  data = 0x00  )  [pure virtual]
 

Implemented in vlVolDataLayout< DataType, LayoutType >, vlVolDataLayout< DataType, LayoutType >, vlVolDataLayout< DataType, vlLayout::Linear >, vlVolDataLayoutBase< DataType >, and vlVolDataLayout< DataType, Layout >.

Referenced by vlVolume::clear().

vlDataType vlVolData::dataType  )  const [virtual]
 

Definition at line 100 of file vlvoldata.cpp.

References m_dataType, and vlDataType.

Referenced by vlVolume::dataType(), vlVolFioVOX::readData(), vlVolFioSLC::readData(), vlVolFioPPM::readData(), vlVolFioRAW::readData(), vlVolFioPGMVol::readData(), vlVolFiof3d::readData(), vlVolFioDEN::readData(), vlVolume::readSubvolumes(), vlVolume::resize(), vlVolFioVOX::writeData(), vlVolFioRAW::writeData(), vlVolFioPGMVol::writeData(), and vlVolFiof3d::writeData().

vlDim vlVolData::dim  )  const [virtual]
 

Definition at line 64 of file vlvoldata.cpp.

References m_dim.

Referenced by vlVolume::copyDataT(), vlVolume::dim(), vlVolFioVOX::readData(), vlVolFioSLC::readData(), vlVolFioPPM::readData(), vlVolFioRAW::readData(), vlVolFioPGMVol::readData(), vlVolFiof3d::readData(), and vlVolFioDEN::readData().

virtual void* vlVolData::getVoxelVoidPtr const vlPoint3ui position  )  const [pure virtual]
 

This returns a void pointer, so make sure you cast it to the correct type. To avoid type-conflicts, "use iterators".

Parameters:
position location of the voxel in 3D.
Returns:
void * pointer to the memory location of the voxel.

Implemented in vlVolDataLayout< DataType, LayoutType >, vlVolDataLayout< DataType, LayoutType >, vlVolDataLayout< DataType, vlLayout::Linear >, and vlVolDataLayoutBase< DataType >.

Referenced by vlVolume::getVoxelVoidPtr().

bool vlVolData::isDirty  )  const [virtual]
 

Definition at line 112 of file vlvoldata.cpp.

References m_dirty.

Referenced by vlVolume::isDirty().

virtual bool vlVolData::isValid  )  const [pure virtual]
 

Implemented in vlVolDataLayout< DataType, LayoutType >, vlVolDataLayout< DataType, LayoutType >, vlVolDataLayout< DataType, vlLayout::Linear >, vlVolDataLayoutBase< DataType >, and vlVolDataLayout< DataType, Layout >.

Referenced by vlVolume::isValid().

vlLayoutType vlVolData::layout  )  const [virtual]
 

Definition at line 106 of file vlvoldata.cpp.

References m_layout, and vlLayoutType.

Referenced by vlVolume::dataLayout(), and vlVolDataLayoutBase< DataType >::vlVolDataLayoutBase().

void vlVolData::setDirty bool  dirty  )  [virtual]
 

Definition at line 118 of file vlvoldata.cpp.

References m_dirty.

Referenced by vlVolume::setDirty().

vlStep vlVolData::stepping  )  const [virtual]
 

Definition at line 70 of file vlvoldata.cpp.

References m_step.

Referenced by vlVolume::stepping().

virtual const char* vlVolData::typeInfo  )  const [pure virtual]
 

Implemented in vlVolDataLayoutBase< DataType >.

Referenced by vlVolume::getVoxel(), vlVolume::setVoxel(), vlVolume::typeInfo(), vlVolIterBaseConst< DataType >::vlVolIterBaseConst(), and vlVolSpaceIterBaseConst< DataType >::vlVolSpaceIterBaseConst().

vlUnit vlVolData::units  )  const [virtual]
 

Definition at line 76 of file vlvoldata.cpp.

References m_units.

Referenced by vlVolume::resize(), vlVolume::units(), and vlVolDataLayout< DataType, Layout >::vlVolDataLayout().

uint64 vlVolData::voxelCount  )  const [virtual]
 

Definition at line 94 of file vlvoldata.cpp.

References m_dim, uint64, vlTriple< uint16 >::x(), vlTriple< uint16 >::y(), and vlTriple< uint16 >::z().

Referenced by vlVolume::voxelCount().


Member Data Documentation

uint16 vlVolData::m_bitsPerVoxel [protected]
 

Definition at line 123 of file vlvoldata.h.

Referenced by bitsPerVoxel(), and vlVolDataLayout< DataType, LayoutType >::vlVolDataLayout().

uint16 vlVolData::m_bytesPerVoxel [protected]
 

Definition at line 123 of file vlvoldata.h.

Referenced by bytesPerVoxel(), and vlVolDataLayout< DataType, LayoutType >::vlVolDataLayout().

vlDataType vlVolData::m_dataType [protected]
 

Definition at line 117 of file vlvoldata.h.

Referenced by dataType(), and vlVolDataLayout< DataType, LayoutType >::vlVolDataLayout().

vlDim vlVolData::m_dim [protected]
 

Definition at line 108 of file vlvoldata.h.

Referenced by dim(), vlVolDataLayout< DataType, LayoutType >::vlVolDataLayout(), and voxelCount().

bool vlVolData::m_dirty [protected]
 

Definition at line 126 of file vlvoldata.h.

Referenced by isDirty(), and setDirty().

vlLayoutType vlVolData::m_layout [protected]
 

Definition at line 120 of file vlvoldata.h.

Referenced by layout().

vlStep vlVolData::m_step [protected]
 

Definition at line 111 of file vlvoldata.h.

Referenced by stepping().

vlUnit vlVolData::m_units [protected]
 

Definition at line 114 of file vlvoldata.h.

Referenced by units().


The documentation for this class was generated from the following files:
Generated on Fri Mar 18 11:33:20 2005 for OpenVL by doxygen 1.3.3