Main Page | Packages | Class Hierarchy | Class List | Directories | Class Members

IDVR.Volume.DataStructures.VoxelData Class Reference

#include <VoxelData.h>

List of all members.


Detailed Description

Class for controlling the basic voxel data of the volume data set.

This class is part of the DataStructure namespace which is actually a subnamespace of the main namespace Volume. Furthermore the standard class Object is inherted to the VoxelData class for better controlling of a particular quantity of VoxelData instances.

After loading the entire volume data set (see DataLoader class) which actually consists of one density value for each voxel element an instance of this class will be created to store all those voxel data. Furthermore, a couple of function are provided to help managing and controlling the basic voxel data.
Basically, the voxel data will be saved into an one dimensional unsigned short (16 bits per voxel value), but the interface function to access this data is adapted to a three dimensional (in fact a volume data structure) access by the user for better handling of this mostly huge voxel data set.
Thus, the indexing process offset of working with three dimensional arrays will be completely avoided without losing good access handling.

Most important are the two member arrays VoxelData::m_Dataset and VoxelData::m_GradientValues which save the actual voxel data and the corresponding gradient vector data. The voxel data consist of 4 bits for the object ID number (linked to an existing volume data object - see DataObject class) and more 12 bits for actual density data. Alltogether 16 bits basic data are needed for each voxel and additionally 3 * 32 bit for the gradient vector data. Please note that only on instance of this class can be created for each instance of the actual data structure class VolumeData. Thus every data structure object encapsulates one voxel data structure which makes surely most sense.

See also:
VolumeData - the main datastructure class.

DataObject - the volume data object class.

Author:
Bernhard Pflugfelder
Version:
1.0
Date:
02-19-2005


Public Member Functions

 VoxelData (void)
 This is the standard constructor.
 VoxelData (unsigned short n_VolumeDimension __gc[])
 Constructor initialization with the valid volume data dimension.
 ~VoxelData (void)
 This is the standard deconstructor.
void setVoxelValues (unsigned short n_VoxelCoordinates __gc[], unsigned short n_ObjectDensity, unsigned short n_ObjectID)
 Sets the basic voxel data to a voxel specified by uniquely voxel coordinates.
void setVoxelValues (unsigned short n_Column, unsigned short n_Row, unsigned short n_Depth, unsigned short n_ObjectDensity, unsigned short n_ObjectID)
 Sets the basic voxel data to a voxel specified by uniquely voxel coordinates.
void setVoxelObjectID (unsigned short n_VoxelCoordinates __gc[], unsigned short n_ObjectID)
 Sets only a new object ID value to a voxel specified by uniquely voxel coordinates.
void setVoxelObjectID (unsigned short n_Column, unsigned short n_Row, unsigned short n_Depth, unsigned short n_ObjectID)
 Sets only a new object ID value to a voxel specified by uniquely voxel coordinates.
void setVoxelDensity (unsigned short n_VoxelCoordinates __gc[], unsigned short n_Density)
 Sets only a new density value to a voxel specified by uniquely voxel coordinates.
void setVoxelDensity (unsigned short n_Column, unsigned short n_Row, unsigned short n_Depth, unsigned short n_ObjectID)
 Sets only a new density value to a voxel specified by uniquely voxel coordinates.
void setVoxelGradient (unsigned short n_VoxelCoordinates __gc[], float n_GradientValues __gc[])
 Sets a new gradient vector to the corresponding voxel specified by uniquely voxel coordinates.
void setVoxelGradient (unsigned short n_Column, unsigned short n_Row, unsigned short n_Depth, float n_GradientValues __gc[])
 Sets a new gradient vector to the corresponding voxel specified by uniquely voxel coordinates.
unsigned short getVoxelDensity (unsigned short n_DataItem)
 Returns the density value the given voxel data variable.
unsigned short getVoxelDensity (unsigned short n_VoxelCoordinates __gc[])
 Returns the density value to the specified voxel.
unsigned short getVoxelDensity (unsigned short n_Column, unsigned short n_Row, unsigned short n_Depth)
 Returns the density value to the specified voxel.
unsigned short getVoxelObjectID (unsigned short n_DataItem)
 Returns the object ID key value the given voxel data variable.
unsigned short getVoxelObjectID (unsigned short n_VoxelCoordinates __gc[])
 Returns the object ID key to the specified voxel.
unsigned short getVoxelObjectID (unsigned short n_Column, unsigned short n_Row, unsigned short n_Depth)
 Returns the object ID key to the specified voxel.
float getVoxelGradient (unsigned short n_VoxelCoordinates __gc[]) __gc[]
 Returns the gradient vector elements to the corresponding voxel coordinates.
float getVoxelGradient (unsigned short n_Column, unsigned short n_Row, unsigned short n_Depth) __gc[]
 Returns the gradient vector elements to the corresponding voxel coordinates.
unsigned short getVoxelData (unsigned short n_VoxelCoordinates __gc[])
 Returns the basic voxel data in form of a voxel data variable.
unsigned short getVoxelData (unsigned short n_Column, unsigned short n_Row, unsigned short n_Depth)
 Returns the basic voxel data in form of a voxel data variable.
__property unsigned short get_VolumeDimension (void) __gc[]
 Returns the current volume dimension of the data set.
__property unsigned int get_VoxelCountOfSlice (void)
 Returns the voxel count per data slice of the current data set.
__property unsigned int get_VoxelCountOverall (void)
 Returns the total count of voxel for current dataset.
void resetVoxelGradients (void)
 Resets the whole gradient data set to zero.

Private Types

enum  Indices
 Constant index values for the three components of the three dimensional volume data set.

Private Attributes

unsigned short m_Dataset __gc []
 Saves the basic voxel data structure which is the object ID and the density value.
unsigned short m_VolumeDimension __gc []
 Saves the valid volume dimension of the current data set.
int m_VoxelCountOfSlice
 The voxel count per slice.


Constructor & Destructor Documentation

VoxelData::VoxelData void   ) 
 

This is the standard constructor.

All member variables of this new instance will be set to zero/null.

VoxelData::VoxelData unsigned short n_VolumeDimension  __gc[]  ) 
 

Constructor initialization with the valid volume data dimension.

All member variables will be set to zero and the VoxelData::m_Dataset array will be initialized with the specified volume dimension.

Parameters:
n_VolumeDimension the valid size of the volume data set.

void VoxelData::~VoxelData void   ) 
 

This is the standard deconstructor.

All member variables will be deleted.


Member Function Documentation

unsigned short VoxelData::get_VolumeDimension void   ) 
 

Returns the current volume dimension of the data set.

Returns:
the volume dimension as an one dimensional array with three elements.

unsigned int VoxelData::get_VoxelCountOfSlice void   ) 
 

Returns the voxel count per data slice of the current data set.

For each voxel of the data slice the z coordinate is constant.

Returns:
the volume dimension as an one dimensional array with three elements.

unsigned int VoxelData::get_VoxelCountOverall void   ) 
 

Returns the total count of voxel for current dataset.

Returns:
the overall voxel count.

unsigned short VoxelData::getVoxelData unsigned short  n_Column,
unsigned short  n_Row,
unsigned short  n_Depth
 

Returns the basic voxel data in form of a voxel data variable.

Parameters:
n_Column the x element of the exact voxel coordinates.
n_Row the x element of the exact voxel coordinates.
n_Depth the x element of the exact voxel coordinates.
Returns:
the current voxel data varible.
Exceptions:
An instance of the class Exception will be thrown if the voxel coordinates are not valid.

unsigned short VoxelData::getVoxelData unsigned short n_VoxelCoordinates  __gc[]  ) 
 

Returns the basic voxel data in form of a voxel data variable.

Parameters:
n_VoxelCoordinates the exact voxel coordinates.
Returns:
the current voxel data varible.
Exceptions:
An instance of the class Exception will be thrown if the voxel coordinates are not valid.

unsigned short VoxelData::getVoxelDensity unsigned short  n_Column,
unsigned short  n_Row,
unsigned short  n_Depth
 

Returns the density value to the specified voxel.

Parameters:
n_Column the x element of the exact voxel coordinates.
n_Row the x element of the exact voxel coordinates.
n_Depth the x element of the exact voxel coordinates.
Returns:
the current density value of the voxel.
Exceptions:
An instance of the class Exception will be thrown if the voxel coordinates are not valid.

unsigned short VoxelData::getVoxelDensity unsigned short n_VoxelCoordinates  __gc[]  ) 
 

Returns the density value to the specified voxel.

Parameters:
n_VoxelCoordinates the exact voxel coordinates.
Returns:
the current density value of the voxel.
Exceptions:
An instance of the class Exception will be thrown if the voxel coordinates are not valid.

unsigned short VoxelData::getVoxelDensity unsigned short  n_DataItem  ) 
 

Returns the density value the given voxel data variable.

Parameters:
n_DataItem is the actual data variable for each voxel.
Returns:
the current density value of the voxel.

float VoxelData::getVoxelGradient unsigned short  n_Column,
unsigned short  n_Row,
unsigned short  n_Depth
 

Returns the gradient vector elements to the corresponding voxel coordinates.

Parameters:
n_Column the x element of the exact voxel coordinates.
n_Row the x element of the exact voxel coordinates.
n_Depth the x element of the exact voxel coordinates.
Returns:
the current gradient vector as an one dimensional array with three elements.
Exceptions:
An instance of the class Exception will be thrown if the voxel coordinates are not valid.

float VoxelData::getVoxelGradient unsigned short n_VoxelCoordinates  __gc[]  ) 
 

Returns the gradient vector elements to the corresponding voxel coordinates.

Parameters:
n_VoxelCoordinates the exact voxel coordinates.
Returns:
the current gradient vector as an one dimensional array with three elements.
Exceptions:
An instance of the class Exception will be thrown if the voxel coordinates are not valid.

unsigned short VoxelData::getVoxelObjectID unsigned short  n_Column,
unsigned short  n_Row,
unsigned short  n_Depth
 

Returns the object ID key to the specified voxel.

Parameters:
n_Column the x element of the exact voxel coordinates.
n_Row the x element of the exact voxel coordinates.
n_Depth the x element of the exact voxel coordinates.
Returns:
the current ID key of the voxel.
Exceptions:
An instance of the class Exception will be thrown if the voxel coordinates are not valid.

unsigned short VoxelData::getVoxelObjectID unsigned short n_VoxelCoordinates  __gc[]  ) 
 

Returns the object ID key to the specified voxel.

Parameters:
n_VoxelCoordinates the exact voxel coordinates.
Returns:
the current ID key of the voxel.
Exceptions:
An instance of the class Exception will be thrown if the voxel coordinates are not valid.

unsigned short VoxelData::getVoxelObjectID unsigned short  n_DataItem  ) 
 

Returns the object ID key value the given voxel data variable.

Parameters:
n_DataItem is the actual data variable for each voxel.
Returns:
the current ID key of the voxel.

ero That means each element of the gradient vector will be set ot zero but the current volume data size will not be changed *void VoxelData::resetVoxelGradients void   ) 
 

Resets the whole gradient data set to zero.

That means each element of the gradient vector will be set ot zero but the current volume data size will not be changed.

void VoxelData::setVoxelDensity unsigned short  n_Column,
unsigned short  n_Row,
unsigned short  n_Depth,
unsigned short  n_ObjectID
 

Sets only a new density value to a voxel specified by uniquely voxel coordinates.

The remaining voxel data will not be changed.

Parameters:
n_Column the x element of the exact voxel coordinates.
n_Row the x element of the exact voxel coordinates.
n_Depth the x element of the exact voxel coordinates.
n_ObjectID the new object ID key for the voxel.
Exceptions:
An instance of the class Exception will be thrown if the voxel coordinates are not valid.

void VoxelData::setVoxelDensity unsigned short n_VoxelCoordinates  __gc[],
unsigned short  n_Density
 

Sets only a new density value to a voxel specified by uniquely voxel coordinates.

The remaining voxel data will not be changed.

Parameters:
n_VoxelCoordinates the exact voxel coordinates.
n_Density the new voxel density value.
Exceptions:
An instance of the class Exception will be thrown if the voxel coordinates are not valid.

void VoxelData::setVoxelGradient unsigned short  n_Column,
unsigned short  n_Row,
unsigned short  n_Depth,
float n_GradientValues  __gc[]
 

Sets a new gradient vector to the corresponding voxel specified by uniquely voxel coordinates.

The remaining voxel data will not be changed. A valid gradient vector consists of three elements for the x-, y- and z-component (thus, a three dimensional vector structure).

Parameters:
n_Column the x element of the exact voxel coordinates.
n_Row the x element of the exact voxel coordinates.
n_Depth the x element of the exact voxel coordinates.
n_GradientValues the new grdient vector.
Exceptions:
An instance of the class Exception will be thrown if the voxel coordinates are not valid.

void VoxelData::setVoxelGradient unsigned short n_VoxelCoordinates  __gc[],
float n_GradientValues  __gc[]
 

Sets a new gradient vector to the corresponding voxel specified by uniquely voxel coordinates.

The remaining voxel data will not be changed. A valid gradient vector consists of three elements for the x-, y- and z-component (thus, a three dimensional vector structure).

Parameters:
n_VoxelCoordinates the exact voxel coordinates.
n_GradientValues the new grdient vector.
Exceptions:
An instance of the class Exception will be thrown if the voxel coordinates are not valid.

void VoxelData::setVoxelObjectID unsigned short  n_Column,
unsigned short  n_Row,
unsigned short  n_Depth,
unsigned short  n_ObjectID
 

Sets only a new object ID value to a voxel specified by uniquely voxel coordinates.

The remaining voxel data will not be changed.

Parameters:
n_Column the x element of the exact voxel coordinates.
n_Row the x element of the exact voxel coordinates.
n_Depth the x element of the exact voxel coordinates.
n_ObjectID the new object ID key for the voxel.
Exceptions:
An instance of the class Exception will be thrown if the voxel coordinates are not valid.

void VoxelData::setVoxelObjectID unsigned short n_VoxelCoordinates  __gc[],
unsigned short  n_ObjectID
 

Sets only a new object ID value to a voxel specified by uniquely voxel coordinates.

The remaining voxel data will not be changed.

Parameters:
n_VoxelCoordinates the exact voxel coordinates.
n_ObjectID the new object ID key for the voxel.
Exceptions:
An instance of the class Exception will be thrown if the voxel coordinates are not valid.

void VoxelData::setVoxelValues unsigned short  n_Column,
unsigned short  n_Row,
unsigned short  n_Depth,
unsigned short  n_ObjectDensity,
unsigned short  n_ObjectID
 

Sets the basic voxel data to a voxel specified by uniquely voxel coordinates.

Parameters:
n_Column the x element of the exact voxel coordinates.
n_Row the x element of the exact voxel coordinates.
n_Depth the x element of the exact voxel coordinates.
n_ObjectDensity the new voxel density value.
n_ObjectID the new object ID key for the voxel.
Exceptions:
An instance of the class Exception will be thrown if the voxel coordinates are not valid.

void VoxelData::setVoxelValues unsigned short n_VoxelCoordinates  __gc[],
unsigned short  n_ObjectDensity,
unsigned short  n_ObjectID
 

Sets the basic voxel data to a voxel specified by uniquely voxel coordinates.

Parameters:
n_VoxelCoordinates the exact voxel coordinates.
n_ObjectDensity the new voxel density value.
n_ObjectID the new object ID key for the voxel.
Exceptions:
An instance of the class Exception will be thrown if the voxel coordinates are not valid.


Member Data Documentation

int IDVR.Volume.DataStructures.VoxelData.m_VoxelCountOfSlice [private]
 

The voxel count per slice.

For each voxel of the data slice the z coordinate is constant.


The documentation for this class was generated from the following files:
Generated on Sat Apr 9 11:51:01 2005 for RayCaster wiht Importance Driven Volume Rendering (IDVR) by  doxygen 1.4.1