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

vlVolDataLayout< DataType, vlLayout::Linear > Class Template Reference

This class implements a linear storage layout for the 3D volumetric data. More...

#include <vlvoldata_linear.h>

Inheritance diagram for vlVolDataLayout< DataType, vlLayout::Linear >:

vlVolDataLayoutBase< DataType > vlVolData List of all members.

Public Member Functions

 vlVolDataLayout (const vlDim &dim, const vlUnit &units=vlUnit(1.0, 1.0, 1.0))
 Default constructor.

virtual ~vlVolDataLayout ()
 Default destructor.

DataType getVoxel (const vlPoint3ui &position) const
 Get the voxel value at the given position.

DataType getVoxel (const vlPoint3f &position) const
 Get the voxel value at the given position.

bool setVoxel (vlPoint3ui const &position, DataType const voxel)
 Set the voxel at given position to the given value.

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

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

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

DataType * getVoxelPtr (const vlPoint3ui &position) const
 Returns the pointer to the voxel at the given position.


Protected Member Functions

DataType * dataPtr () const
 Return a const pointer to the stored data.

vlVolInterpolators< DataType,
vlLayout::Linear > * 
ipolatorCollection ()
 Return a pointer to the interpolator collection.

vlVolVoxelOps< DataType, vlLayout::Linear > * voxelOpCollection ()
 Return a pointer to the interpolator collection.


Private Attributes

DataType * m_pData
 pointer to the linear data

vlDim m_dimLimit
 this is dimension-1 in each direction. for speeding up bounds checking - save one subtraction

vlVolInterpolators< DataType,
vlLayout::Linear > * 
m_ipolators
 A collection of interpolators for this layout.

vlVolVoxelOps< DataType, vlLayout::Linear > * m_voxelops
 A collection of voxel ops for this layout.


Friends

class vlVolIterConst< DataType, vlLayout::Linear >
class vlVolIter< DataType, vlLayout::Linear >

Detailed Description

template<typename DataType>
class vlVolDataLayout< DataType, vlLayout::Linear >

The data voxels are stored as a linear array. The data is stored in the X-Y-Z order.

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

Definition at line 59 of file vlvoldata_linear.h.


Constructor & Destructor Documentation

template<typename DataType>
virtual vlVolDataLayout< DataType, vlLayout::Linear >::~vlVolDataLayout  )  [virtual]
 


Member Function Documentation

template<typename DataType>
bool vlVolDataLayout< DataType, vlLayout::Linear >::clear const uint8  data = 0x00  )  [virtual]
 

Implements vlVolDataLayoutBase< DataType >.

template<typename DataType>
DataType* vlVolDataLayout< DataType, vlLayout::Linear >::dataPtr  )  const [inline, protected]
 

Definition at line 107 of file vlvoldata_linear.h.

template<typename DataType>
DataType vlVolDataLayout< DataType, vlLayout::Linear >::getVoxel const vlPoint3f position  )  const [virtual]
 

Implements vlVolDataLayoutBase< DataType >.

template<typename DataType>
DataType vlVolDataLayout< DataType, vlLayout::Linear >::getVoxel const vlPoint3ui position  )  const [virtual]
 

Implements vlVolDataLayoutBase< DataType >.

template<typename DataType>
DataType* vlVolDataLayout< DataType, vlLayout::Linear >::getVoxelPtr const vlPoint3ui position  )  const [virtual]
 

Do not use this unless it is absolutely necessary. Use iterators instead.

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

Implements vlVolDataLayoutBase< DataType >.

template<typename DataType>
void* vlVolDataLayout< DataType, vlLayout::Linear >::getVoxelVoidPtr const vlPoint3ui position  )  const [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.

Reimplemented from vlVolDataLayoutBase< DataType >.

template<typename DataType>
vlVolInterpolators<DataType, vlLayout::Linear>* vlVolDataLayout< DataType, vlLayout::Linear >::ipolatorCollection  )  [inline, protected]
 

Definition at line 110 of file vlvoldata_linear.h.

template<typename DataType>
bool vlVolDataLayout< DataType, vlLayout::Linear >::isValid  )  const [inline, virtual]
 

Implements vlVolDataLayoutBase< DataType >.

Definition at line 82 of file vlvoldata_linear.h.

References vlVolDataLayout< DataType, Layout >::isValid().

template<typename DataType>
bool vlVolDataLayout< DataType, vlLayout::Linear >::setVoxel vlPoint3ui const &  position,
DataType const  voxel
 

template<typename DataType>
vlVolDataLayout< DataType, vlLayout::Linear >::vlVolDataLayout const vlDim dim,
const vlUnit units = vlUnit(1.0, 1.0, 1.0)
 

template<typename DataType>
vlVolVoxelOps<DataType, vlLayout::Linear>* vlVolDataLayout< DataType, vlLayout::Linear >::voxelOpCollection  )  [inline, protected]
 

Definition at line 113 of file vlvoldata_linear.h.


Friends And Related Function Documentation

template<typename DataType>
friend class vlVolIter< DataType, vlLayout::Linear > [friend]
 

Definition at line 64 of file vlvoldata_linear.h.

template<typename DataType>
friend class vlVolIterConst< DataType, vlLayout::Linear > [friend]
 

Definition at line 63 of file vlvoldata_linear.h.


Member Data Documentation

template<typename DataType>
vlDim vlVolDataLayout< DataType, vlLayout::Linear >::m_dimLimit [private]
 

Definition at line 121 of file vlvoldata_linear.h.

template<typename DataType>
vlVolInterpolators<DataType, vlLayout::Linear>* vlVolDataLayout< DataType, vlLayout::Linear >::m_ipolators [private]
 

Definition at line 124 of file vlvoldata_linear.h.

template<typename DataType>
DataType* vlVolDataLayout< DataType, vlLayout::Linear >::m_pData [private]
 

Definition at line 118 of file vlvoldata_linear.h.

template<typename DataType>
vlVolVoxelOps<DataType, vlLayout::Linear>* vlVolDataLayout< DataType, vlLayout::Linear >::m_voxelops [private]
 

Definition at line 127 of file vlvoldata_linear.h.


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