VHTK::ScalarImageFilter Class Reference
[Volumetric Data Nodes]

Inheritance diagram for VHTK::ScalarImageFilter:

Inheritance graph
[legend]

List of all members.


Detailed Description

A helper class that aids the implementation of image volume filter nodes.

The default behaviour is to convert the first available scalar volume to the target format.

X3D Interface

 NameTypeDefault valueDescription
scalarVolume MFScalarImageNode   []   Scalar volume(s) to extract data from.  
vectorVolume MFVectorImageNode   []   Vector volume(s) to extract data from.  
pixelComponentType SFString   ""   The type of the target volume. One of SIGNED, UNSIGNED or RATIONAL. If empty the source volume type is used.  
bitsPerPixel SFInt32   0   The number of bits per voxel for the target volume. If zero the source volume type is used.  

Public Member Functions

 ScalarImageFilter (H3D::Inst< H3D::SFNode > _metadata=0, H3D::Inst< H3D::Field > _dataChanged=0, H3D::Inst< H3D::SFBool > _scaleVectors=0, H3D::Inst< SFImage > _image=0, H3D::Inst< MFScalarImageNode > _scalarVolume=0, H3D::Inst< MFVectorImageNode > _vectorVolume=0, H3D::Inst< H3D::SFString > _pixelComponentType=0, H3D::Inst< H3D::SFInt32 > _bitsPerPixel=0)

Public Attributes

std::auto_ptr< MFScalarImageNodescalarVolume
 Scalar volume(s) to extract data from.
std::auto_ptr< MFVectorImageNodevectorVolume
 Vector volume(s) to extract data from.
std::auto_ptr< H3D::SFStringpixelComponentType
 The type of the target volume.
std::auto_ptr< H3D::SFInt32bitsPerPixel
 The number of bits per voxel for the target volume.

Static Public Attributes

static H3D::H3DNodeDatabase database
 The H3DNodeDatabase for this node.

Protected Member Functions

template<typename DST_TYPE>
DST_TYPE * convertedScalarSourceData (int id=0)
 This function converts the data of the specified scalar volume before returning it.
H3D::Vec3f * convertedVectorSourceData (int id=0)
 Get the data array from the specified vector volume or by default the first one.
virtual bool convertData (void *&data, int &width, int &height, int &depth, H3D::Vec3f &pixelSize)
 This function is called to produce the new data from the source volumes, however to simplify support for muliple data types it is suggested that this function calls the filter helper that in turn calls the doConvertData member function with the correct data type template.
template<typename DST_TYPE>
bool doConvertData (DST_TYPE *&data, int &width, int &height, int &depth, H3D::Vec3f &pixelSize)
 This function performes the convertion of the volume data.

Friends

class SFImage
class ScalarImageFilterHelper

Classes

class  SFImage


Member Function Documentation

template<typename DST_TYPE>
DST_TYPE* VHTK::ScalarImageFilter::convertedScalarSourceData ( int  id = 0  )  [inline, protected]

This function converts the data of the specified scalar volume before returning it.

The returned array is automatically deleted when the convertData function returns.

H3D::Vec3f* VHTK::ScalarImageFilter::convertedVectorSourceData ( int  id = 0  )  [protected]

Get the data array from the specified vector volume or by default the first one.

virtual bool VHTK::ScalarImageFilter::convertData ( void *&  data,
int &  width,
int &  height,
int &  depth,
H3D::Vec3f &  pixelSize 
) [inline, protected, virtual]

This function is called to produce the new data from the source volumes, however to simplify support for muliple data types it is suggested that this function calls the filter helper that in turn calls the doConvertData member function with the correct data type template.

See also:
doConvertData

Reimplemented in VHTK::ScalarCompositionFilter, and VHTK::ScalarExtractorFilter.

template<typename DST_TYPE>
bool VHTK::ScalarImageFilter::doConvertData ( DST_TYPE *&  data,
int &  width,
int &  height,
int &  depth,
H3D::Vec3f &  pixelSize 
) [inline, protected]

This function performes the convertion of the volume data.

Since template functions can not be virtual, this function is called by a helper function.

See also:
convertData

Reimplemented in VHTK::ScalarCompositionFilter, and VHTK::ScalarExtractorFilter.


Member Data Documentation

Scalar volume(s) to extract data from.

Vector volume(s) to extract data from.

The type of the target volume.

One of SIGNED, UNSIGNED or RATIONAL. If empty the source volume type is used.

The number of bits per voxel for the target volume.

If zero the source volume type is used.

The H3DNodeDatabase for this node.

Reimplemented from VHTK::VHTKDataNode.

Reimplemented in VHTK::ScalarCompositionFilter, and VHTK::ScalarExtractorFilter.


Generated on Thu Mar 5 08:46:56 2009 for Volume Haptics Toolkit by  doxygen 1.5.6