#include <Volume.h>
Public Member Functions | |
Volume (unsigned short x_dim_, unsigned short y_dim_, unsigned short z_dim_) | |
Volume.cpp. | |
virtual | ~Volume () |
RGBAColor * | getSlice (SliceOrientation orientation) |
RGBAColor * | getColorData () |
unsigned short * | getOpacityData () |
bool | getOpacityData (int x, int y, int z, unsigned short &opacity_data) |
unsigned short | getOpacityData (int x, int y, int z) |
unsigned short | getImageData (int x, int y, int z) |
bool | getOpacityData (Vector3 &position, unsigned short &voxel) |
bool | isOpacityDataTrilinearInterpolated (float x_pos, float y_pos, float z_pos, unsigned short &opacity) |
unsigned int | getXDim () |
unsigned int | getYDim () |
unsigned int | getZDim () |
unsigned int | getVolumeSize () |
unsigned short | calcMaxDimension () |
void | calcGradient () |
Gradient * | getGradientData () |
bool | getGradientNNI (float x_pos, float y_pos, float z_pos, Gradient &grad) |
bool | getGradientTLI (float x_pos, float y_pos, float z_pos, Gradient &grad) |
-------------------------------------------------------------getGradientTI()- | |
bool | calcRayLength (Vector3 &nearp, Vector3 &farp, Vector3 &position, Vector3 &direction, float &length) |
float | getStepLength (Vector3 &pos) |
Public Attributes | |
Gradient * | gradients_ |
Gradient * | gra_mag_ |
Protected Attributes | |
RGBAColor * | color_data_ |
unsigned short * | opacity_data_ |
The opacity data values of every voxel in the volume. | |
unsigned short | x_dim_ |
The x dimension of the volume dataset. | |
unsigned short | y_dim_ |
The y dimension of the volume dataset. | |
unsigned short | z_dim_ |
The z dimension of the volume dataset. | |
unsigned short | max_dim_ |
The value of the biggest dimension. | |
float | histogram_ [MAXDENSITY+1] |
The histogram values. |
Volume::Volume | ( | unsigned short | x_dim_, | |
unsigned short | y_dim_, | |||
unsigned short | z_dim_ | |||
) |
The default constructor.
x_dim_ | The x dimension of the volume. | |
y_dim_ | The y dimension of the volume. | |
z_dim_ | The z dimension of the volume. |
Volume::~Volume | ( | ) | [virtual] |
The destructor.
void Volume::calcGradient | ( | ) |
unsigned short Volume::calcMaxDimension | ( | ) |
Finds out the biggest dimension:
bool Volume::calcRayLength | ( | Vector3 & | nearp, | |
Vector3 & | farp, | |||
Vector3 & | position, | |||
Vector3 & | direction, | |||
float & | length | |||
) |
Calculates the start and endpoint of an ray.
RGBAColor * Volume::getColorData | ( | ) |
Returns the pointer to the color data array which is going to be rendered.
Gradient * Volume::getGradientData | ( | ) |
Returns the pointer to the gradient data array.
bool Volume::getGradientNNI | ( | float | x_pos, | |
float | y_pos, | |||
float | z_pos, | |||
Gradient & | grad | |||
) |
Returns the the gradient on the specified position.
bool Volume::getGradientTLI | ( | float | x_pos, | |
float | y_pos, | |||
float | z_pos, | |||
Gradient & | grad | |||
) |
-------------------------------------------------------------getGradientTI()-
-------------------------------------------------------------getGradientTI()-
Returns the the trilinear interpolated gradient on the specified position.
unsigned short Volume::getImageData | ( | int | x, | |
int | y, | |||
int | z | |||
) |
Checks if the point is a valid data point and returns the opacity data at this point.
x | The x-coord. of the point. | |
y | The y-coord. of the point. | |
z | The z-coord. of the point. |
bool Volume::getOpacityData | ( | Vector3 & | position, | |
unsigned short & | voxel | |||
) |
Returns true if there is an opacity value on the specified vector-point.
position | The position vector of the point. | |
opacity_data |
unsigned short Volume::getOpacityData | ( | int | x, | |
int | y, | |||
int | z | |||
) |
Checks if the point is a valid data point and returns the opacity data at this point.
x | The x-coord. of the point. | |
y | The y-coord. of the point. | |
z | The z-coord. of the point. |
bool Volume::getOpacityData | ( | int | x, | |
int | y, | |||
int | z, | |||
unsigned short & | opacity_data | |||
) |
Returns true if there is an opacity value on the specified point.
x | The x-coord. of the point. | |
y | The y-coord. of the point. | |
z | The z-coord. of the point. | |
opacity_data |
unsigned short * Volume::getOpacityData | ( | ) |
Returns the pointer to the opacity data array.
RGBAColor * Volume::getSlice | ( | SliceOrientation | orientation | ) |
Returns the slice specified by the orientation.
orientation | The orientation of the slice. |
float Volume::getStepLength | ( | Vector3 & | pos | ) |
Calculates the current step length for sampling the ray depending on the underlying gradient data.
unsigned int Volume::getVolumeSize | ( | ) |
Returns the data size.
unsigned int Volume::getXDim | ( | ) |
Returns the value of the x dimension.
unsigned int Volume::getYDim | ( | ) |
Returns the value of the y dimension.
unsigned int Volume::getZDim | ( | ) |
Returns the value of the z dimension.
bool Volume::isOpacityDataTrilinearInterpolated | ( | float | x_pos, | |
float | y_pos, | |||
float | z_pos, | |||
unsigned short & | opacity | |||
) |
Makes a trilinear interpolation at point 'position' for the opacity_data.
position | The location of the calculation. | |
opacity_data | Becomes the interpolated value. |
RGBAColor* Volume::color_data_ [protected] |
Holds the color values of every voxel in the volume and this one is going to be rendered by OpenGL.
float Volume::histogram_[MAXDENSITY+1] [protected] |
The histogram values.
unsigned short Volume::max_dim_ [protected] |
The value of the biggest dimension.
unsigned short* Volume::opacity_data_ [protected] |
The opacity data values of every voxel in the volume.
unsigned short Volume::x_dim_ [protected] |
The x dimension of the volume dataset.
unsigned short Volume::y_dim_ [protected] |
The y dimension of the volume dataset.
unsigned short Volume::z_dim_ [protected] |
The z dimension of the volume dataset.