#include <VoxelData.h>
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.
DataObject - the volume data object class.
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. |
|
This is the standard constructor. All member variables of this new instance will be set to zero/null. |
|
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.
|
|
This is the standard deconstructor. All member variables will be deleted. |
|
Returns the current volume dimension of the data set.
|
|
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 total count of voxel for current dataset.
|
|
Returns the basic voxel data in form of a voxel data variable.
|
|
Returns the basic voxel data in form of a voxel data variable.
|
|
Returns the density value to the specified voxel.
|
|
Returns the density value to the specified voxel.
|
|
Returns the density value the given voxel data variable.
|
|
Returns the gradient vector elements to the corresponding voxel coordinates.
|
|
Returns the gradient vector elements to the corresponding voxel coordinates.
|
|
Returns the object ID key to the specified voxel.
|
|
Returns the object ID key to the specified voxel.
|
|
Returns the object ID key value the given voxel data variable.
|
|
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. |
|
Sets only a new density value to a voxel specified by uniquely voxel coordinates. The remaining voxel data will not be changed.
|
|
Sets only a new density value to a voxel specified by uniquely voxel coordinates. The remaining voxel data will not be changed.
|
|
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).
|
|
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).
|
|
Sets only a new object ID value to a voxel specified by uniquely voxel coordinates. The remaining voxel data will not be changed.
|
|
Sets only a new object ID value to a voxel specified by uniquely voxel coordinates. The remaining voxel data will not be changed.
|
|
Sets the basic voxel data to a voxel specified by uniquely voxel coordinates.
|
|
Sets the basic voxel data to a voxel specified by uniquely voxel coordinates.
|
|
The voxel count per slice. For each voxel of the data slice the z coordinate is constant. |