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

vlVolDataLayoutBase< DataType > Class Template Reference

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

#include <vlvoldatalayout.h>

Inheritance diagram for vlVolDataLayoutBase< DataType >:

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

Public Member Functions

 vlVolDataLayoutBase (const vlDim &dim, const vlDataType dataType, const vlUnit &units, const vlLayoutType layout)
 Default constructor.

virtual ~vlVolDataLayoutBase ()
 Virtual destructor.

const char * typeInfo () const
 Retruns the type name of the datatype - compilar dependant.

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

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

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

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

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

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

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


Detailed Description

template<class DataType>
class vlVolDataLayoutBase< DataType >

This class is a base class. For every data layout, define a class which will subclass this one and implement all the virtual methods.

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

Definition at line 45 of file vlvoldatalayout.h.


Constructor & Destructor Documentation

template<class DataType>
vlVolDataLayoutBase< DataType >::vlVolDataLayoutBase const vlDim dim,
const vlDataType  dataType,
const vlUnit units,
const vlLayoutType  layout
[inline]
 

Definition at line 49 of file vlvoldatalayout.h.

References vlVolData::layout().

template<class DataType>
virtual vlVolDataLayoutBase< DataType >::~vlVolDataLayoutBase  )  [inline, virtual]
 

Definition at line 53 of file vlvoldatalayout.h.


Member Function Documentation

template<class DataType>
virtual bool vlVolDataLayoutBase< DataType >::clear const uint8  data  )  [pure virtual]
 

Implements vlVolData.

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

template<class DataType>
virtual DataType vlVolDataLayoutBase< DataType >::getVoxel const vlPoint3f position  )  const [pure virtual]
 

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

template<class DataType>
virtual DataType vlVolDataLayoutBase< DataType >::getVoxel const vlPoint3ui position  )  const [pure virtual]
 

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

template<class DataType>
virtual DataType* vlVolDataLayoutBase< DataType >::getVoxelPtr const vlPoint3ui position  )  const [pure 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.

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

Referenced by vlVolDataLayoutBase< DataType >::getVoxelVoidPtr().

template<class DataType>
void* vlVolDataLayoutBase< DataType >::getVoxelVoidPtr const vlPoint3ui position  )  const [inline, 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.

Implements vlVolData.

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

Definition at line 89 of file vlvoldatalayout.h.

References vlVolDataLayoutBase< DataType >::getVoxelPtr().

template<class DataType>
virtual bool vlVolDataLayoutBase< DataType >::isValid  )  const [pure virtual]
 

Implements vlVolData.

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

template<class DataType>
virtual bool vlVolDataLayoutBase< DataType >::setVoxel const vlPoint3ui position,
const DataType  voxel
[pure virtual]
 

Implemented in vlVolDataLayout< DataType, Layout >.

template<class DataType>
const char* vlVolDataLayoutBase< DataType >::typeInfo  )  const [inline, virtual]
 

Implements vlVolData.

Definition at line 56 of file vlvoldatalayout.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