Main Page | Class Hierarchy | Class List | Class Members

DVR::Data Class Reference

List of all members.

Public Member Functions

 Data ()
bool Load (String fileName, String error)
bool Prepare ()
bool PrepareForTF (TransferFunction TF)
void PrepareShadingNone ()
void PrepareShadingDiffuse (Vector3 lightDir)
void PrepareShadingDiffuseAndSpecular (Vector3 lightDir, Vector3 camDir)
int SampleAverageHit (Vector3 startPosition, Vector3 direction, float interval, Int32 interpolation)
int SampleMIPHit (Vector3 startPosition, Vector3 direction, float interval, Int32 interpolation)
bool SampleFirstHit (Vector3 startPosition, Vector3 direction, float interval, ushort value, out int x, out int y, out int z)
Vector3 GetGradientTriLinear (float x, float y, float z)
float GetValueTriLinear (float x, float y, float z)
bool SampleFirstHitTriLinear (Vector3 startPosition, Vector3 direction, float interval, ushort value, out float x, out float y, out float z)
bool SampleCompositionTriLinear (Vector3 startPosition, Vector3 direction, float interval, Vector3 backgroundColor, out Vector3 color)
bool SampleCompositionNearest (Vector3 startPosition, Vector3 direction, float interval, Vector3 backgroundColor, out Vector3 color)

Public Attributes

ushort[,,] mData
Vector3[,,] mGradients
float[,,] mGradientLengths
ushort[] mHistogram
ushort mMaxHistogramCount

Properties

float GradientDependency
bool Ready
Math.AxisAlignedBox BoundingBox
ushort X
ushort Y
ushort Z
ushort MaxValue
ushort MinValue

Detailed Description

Summary description for Data.


Constructor & Destructor Documentation

DVR::Data::Data  )  [inline]
 

Default constructor.


Member Function Documentation

Vector3 DVR::Data::GetGradientTriLinear float  x,
float  y,
float  z
[inline]
 

Returns the trilinear interpolated gradient. The x position. The y position. The z position. The gradient of the interpolated voxel.

float DVR::Data::GetValueTriLinear float  x,
float  y,
float  z
[inline]
 

Returns the trilinear interpolated value. The x position. The y position. The z position. The value of the interpolated voxel.

bool DVR::Data::Load String  fileName,
String  error
[inline]
 

Loads a 3D data set from a file. The file to load the data from. The error message if any. True if loading succeeded, False otherwise.

bool DVR::Data::Prepare  )  [inline]
 

Prepare the data for direct volume rendering. Calculates voxel opacities, gradients etc. True if succeeded, False otherwise.

bool DVR::Data::PrepareForTF TransferFunction  TF  )  [inline]
 

Prepares the data for rendering with a transfer function. The transfer function to render with. True if succeeded, False otherwise.

void DVR::Data::PrepareShadingDiffuse Vector3  lightDir  )  [inline]
 

Prepares the shading of the data. Does diffuse shading. The light direction.

void DVR::Data::PrepareShadingDiffuseAndSpecular Vector3  lightDir,
Vector3  camDir
[inline]
 

Prepares the shading of the data. Does diffuse and specular shading. The light direction. The camera direction.

void DVR::Data::PrepareShadingNone  )  [inline]
 

Prepares the colors of the data.

int DVR::Data::SampleAverageHit Vector3  startPosition,
Vector3  direction,
float  interval,
Int32  interpolation
[inline]
 

returns the average value of one ray the position where the ray enters the bounding box the direction of the ray the interval between two sampling points the mode of interpolation (0 = nearest neighbour; 1 = trilinear the average value

bool DVR::Data::SampleCompositionNearest Vector3  startPosition,
Vector3  direction,
float  interval,
Vector3  backgroundColor,
out Vector3  color
[inline]
 

Calculates the color of a composition raycast into the data. Using nearest neighbour interpolation. The start position of sampling. The sampling direction. The interval sampling points are taken. The calculated color. True if the raycast was possible, False otherwise.

bool DVR::Data::SampleCompositionTriLinear Vector3  startPosition,
Vector3  direction,
float  interval,
Vector3  backgroundColor,
out Vector3  color
[inline]
 

Calculates the color of a composition raycast into the data. The start position of sampling. The sampling direction. The interval sampling points are taken. The calculated color. True if the raycast was possible, False otherwise.

bool DVR::Data::SampleFirstHit Vector3  startPosition,
Vector3  direction,
float  interval,
ushort  value,
out int  x,
out int  y,
out int  z
[inline]
 

Returns the position if the first hit voxel which has a value greater than value. The start position of sampling. The sampling direction. The interval sampling points are taken. The value we are searching for. The x coord of the voxel which value is greater than value. The y coord of the voxel which value is greater than value. The z coord of the voxel which value is greater than value. True if such a voxel is found, False otherwise.

bool DVR::Data::SampleFirstHitTriLinear Vector3  startPosition,
Vector3  direction,
float  interval,
ushort  value,
out float  x,
out float  y,
out float  z
[inline]
 

Returns the position if the first hit voxel which has a value greater than value. The start position of sampling. The sampling direction. The interval sampling points are taken. The value we are searching for. The x coord of the voxel which value is greater than value. The y coord of the voxel which value is greater than value. The z coord of the voxel which value is greater than value. True if such a voxel is found, False otherwise.

int DVR::Data::SampleMIPHit Vector3  startPosition,
Vector3  direction,
float  interval,
Int32  interpolation
[inline]
 

Samples the data for MIP. The starting point. The direction of the ray. The sampling interval. The interpolation type. Returns the sampled value.


Member Data Documentation

ushort [,,] DVR::Data::mData
 

3D data array. Public for performence reasons only.

float [,,] DVR::Data::mGradientLengths
 

The length of the not normalized gradient vector for every voxel. This value is scaled to be 1 for a maximum gradient-length and 0 for gradients with zero-length. Public for performence reasons only.

Vector3 [,,] DVR::Data::mGradients
 

The gradient vector for every voxel. This vectors are normalized. Public for performence reasons only.

ushort [] DVR::Data::mHistogram
 

The histogram of the data values. Index into array = voxel value. Value of array item = number of voxels having this value. Public for performence reasons only.

ushort DVR::Data::mMaxHistogramCount
 

The maximum of all histrogram values.


Property Documentation

Math.AxisAlignedBox DVR::Data::BoundingBox [get]
 

The bounding box of the data, centered at (0,0,0).

float DVR::Data::GradientDependency [get, set]
 

Gets or sets the dependency of alpha from the gradients.

ushort DVR::Data::MaxValue [get]
 

The maximum value of a voxel in mData.

ushort DVR::Data::MinValue [get]
 

The minimum value of a voxel in mData.

bool DVR::Data::Ready [get]
 

Indicates if the data is ready for rendering.

ushort DVR::Data::X [get]
 

The length of the data-array in the X - direction.

ushort DVR::Data::Y [get]
 

The length of the data-array in the Y - direction.

ushort DVR::Data::Z [get]
 

The length of the data-array in the Z - direction.


The documentation for this class was generated from the following file:
Generated on Tue Nov 30 22:19:43 2004 for DirectVolumeRenderer by doxygen 1.3.6