Volume Class Reference

#include <Volume.h>

List of all members.

Public Member Functions

 Volume (unsigned short x_dim_, unsigned short y_dim_, unsigned short z_dim_)
 Volume.cpp.
virtual ~Volume ()
RGBAColorgetSlice (SliceOrientation orientation)
RGBAColorgetColorData ()
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 ()
GradientgetGradientData ()
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

Gradientgradients_
Gradientgra_mag_

Protected Attributes

RGBAColorcolor_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.


Constructor & Destructor Documentation

Volume::Volume ( unsigned short  x_dim_,
unsigned short  y_dim_,
unsigned short  z_dim_ 
)

Volume.cpp.

The default constructor.

Parameters:
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.


Member Function Documentation

void Volume::calcGradient (  ) 

unsigned short Volume::calcMaxDimension (  ) 

Finds out the biggest dimension:

Returns:
max_dim_ The value of the biggest dimension of the data:

bool Volume::calcRayLength ( Vector3 nearp,
Vector3 farp,
Vector3 position,
Vector3 direction,
float &  length 
)

Calculates the start and endpoint of an ray.

Returns:
Returns true if ray intersects the data.

RGBAColor * Volume::getColorData (  ) 

Returns the pointer to the color data array which is going to be rendered.

Returns:
Returns a pointer to the color data array.

Gradient * Volume::getGradientData (  ) 

Returns the pointer to the gradient data array.

Returns:
Returns a 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.

Returns:
Returns true if data was found.

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.

Returns:
Returns true if data was found.

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.

Parameters:
x The x-coord. of the point.
y The y-coord. of the point.
z The z-coord. of the point.
Returns:
The opacity data at this point.

bool Volume::getOpacityData ( Vector3 position,
unsigned short &  voxel 
)

Returns true if there is an opacity value on the specified vector-point.

Parameters:
position The position vector of the point.
opacity_data 
Returns:
true.

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.

Parameters:
x The x-coord. of the point.
y The y-coord. of the point.
z The z-coord. of the point.
Returns:
The opacity data at this 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.

Parameters:
x The x-coord. of the point.
y The y-coord. of the point.
z The z-coord. of the point.
opacity_data 
Returns:
true.

unsigned short * Volume::getOpacityData (  ) 

Returns the pointer to the opacity data array.

Returns:
Returns a pointer to the opacity data array.

RGBAColor * Volume::getSlice ( SliceOrientation  orientation  ) 

Returns the slice specified by the orientation.

Parameters:
orientation The orientation of the slice.
Returns:
Returns the color array of pixels of the specified slice.

float Volume::getStepLength ( Vector3 pos  ) 

Calculates the current step length for sampling the ray depending on the underlying gradient data.

Returns:
step_length Returns the current step length.

unsigned int Volume::getVolumeSize (  ) 

Returns the data size.

Returns:
Returns the size of the volume.

unsigned int Volume::getXDim (  ) 

Returns the value of the x dimension.

Returns:
Returns the x dimension of the volume.

unsigned int Volume::getYDim (  ) 

Returns the value of the y dimension.

Returns:
Returns the y dimension of the volume.

unsigned int Volume::getZDim (  ) 

Returns the value of the z dimension.

Returns:
Returns the z dimension of the volume.

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.

Parameters:
position The location of the calculation.
opacity_data Becomes the interpolated value.
Returns:
true if the calculation suceeded.


Member Data Documentation

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.

Gradient* Volume::gra_mag_

Gradient* Volume::gradients_

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.


The documentation for this class was generated from the following files:
Generated on Wed Dec 6 11:27:27 2006 by  doxygen 1.4.7