VolVis::VolumeRendering::VolumeData Class Reference

#include <VolumeData.h>


Detailed Description

This class stores the data of the volume and provides a method for loading this data from a file. The data can be accessed as the whole array or as the individual voxels through their 3d-coordinates or


Public Member Functions

const std::vector< unsigned
char > & 
get2dHistogram () const
int get2dHistogramSize () const
const unsigned short * getData () const
const std::vector< int > & getGradientHistogram () const
GLuint getGradientTexture () const
const std::vector< int > & getHistogram () const
int getMaxDimension () const
int getMaxGradientHistogramValue () const
int getMaxHistogramValue () const
const Eigen::Vector< int, 3 > & getOriginalDimension () const
GLuint getTexture () const
const Eigen::Vector< int, 3 > & getTextureDimension () const
unsigned short getValueAt (int x, int y, int z) const
unsigned short getValueAt (Eigen::Vector< int, 3 > &pos) const
bool isEmpty () const
void load (const std::string &filePath, QProgressBar *progressBar=0)
 VolumeData ()
 ~VolumeData ()


Constructor & Destructor Documentation

VolVis::VolumeRendering::VolumeData::VolumeData (  ) 

Constructor. Sets the dimensions and data to zero.

VolVis::VolumeRendering::VolumeData::~VolumeData (  ) 

Destructor. Deletes the texture in gpu and the volume data.


Member Function Documentation

const std::vector<unsigned char>& VolVis::VolumeRendering::VolumeData::get2dHistogram (  )  const

Returns the values of the 2d histogram which are sorted to intensity values and gradient magnitude values.

Returns:
vector containing the values of the 2d histogram

int VolVis::VolumeRendering::VolumeData::get2dHistogramSize (  )  const

Returns the resolution of the 2d histogram (which is the same for both directions)

Returns:
resolution of the 2d histogram

const unsigned short* VolVis::VolumeRendering::VolumeData::getData (  )  const

Returns a pointer to the array containing the data.

Returns:
pointer to the volume data stored in an array.

const std::vector<int>& VolVis::VolumeRendering::VolumeData::getGradientHistogram (  )  const

Returns the 2dimensional histogram. x-axis = intensity, y-axis = gradient

GLuint VolVis::VolumeRendering::VolumeData::getGradientTexture (  )  const

Returns the texture id of the gradient texture (3d texture)

Returns:
texture id of gradient texture

const std::vector<int>& VolVis::VolumeRendering::VolumeData::getHistogram (  )  const

Returns the vector containing the histogram values (4096 values)

int VolVis::VolumeRendering::VolumeData::getMaxDimension (  )  const

The dimension of the longest side.

Returns:
maximum dimension

int VolVis::VolumeRendering::VolumeData::getMaxGradientHistogramValue (  )  const

Returns the maximum value of the histogram for the gradient magnitude values.

Returns:
maximum value of the histogram for gradient magnitude values.

int VolVis::VolumeRendering::VolumeData::getMaxHistogramValue (  )  const

Returns the maximum value of the histogram, which is the number of occurences of the popular density value in the volume.

Returns:
maximum value of the histogram (for intensity values)

const Eigen::Vector<int,3>& VolVis::VolumeRendering::VolumeData::getOriginalDimension (  )  const

Returns the dimensions of the volume in x,y and z-direction like stored in a volume file.

Returns:
dimensions of the volume

GLuint VolVis::VolumeRendering::VolumeData::getTexture (  )  const

Returns the texture id of the 3d-texture

Returns:
texture id of intensity texture

const Eigen::Vector<int,3>& VolVis::VolumeRendering::VolumeData::getTextureDimension (  )  const

Returns the dimensions of the texture representing the volume. 2^n

Returns:
dimensions of the volume

unsigned short VolVis::VolumeRendering::VolumeData::getValueAt ( int  x,
int  y,
int  z 
) const

Returns the value of a voxel at the specified position.

Parameters:
x x-coordinate
y y-coordinate
z z-coordinate
Returns:
value stored at the voxel position.

unsigned short VolVis::VolumeRendering::VolumeData::getValueAt ( Eigen::Vector< int, 3 > &  pos  )  const

Returns the value of a voxel at the specified position.

Parameters:
pos 3d-coordinate of the voxel.
Returns:
value stored at the voxel position.

bool VolVis::VolumeRendering::VolumeData::isEmpty (  )  const

Checks if volume data is loaded.

Returns:
true if no data is loaded

void VolVis::VolumeRendering::VolumeData::load ( const std::string &  filePath,
QProgressBar *  progressBar = 0 
)

Loads the volume data from a file. Extracts the dimension of the volume and the voxel data itself. The voxel data is stored in an unsigned short array and is mapped to a 2^n-sized 3d-texture. This method also extracts the histogram and stores it in an array with all possible 4096 values. If already a volume is stored in the object, it will be deleted before loading the new one.

Parameters:
filePath path to the file containing the volume data
progressBar the QT progress bar which should be updated from 0 at beginning to 100 percent when the file is fully loaded


The documentation for this class was generated from the following file:
Generated on Wed Dec 5 12:27:32 2007 for VolVis by  doxygen 1.5.1-p1