MeVisLabToolboxReference
ml::LUTFCompose Class Reference

A LUT function composing several input LUTs into a single output LUT. More...

#include <mlLUTFCompose.h>

Inheritance diagram for ml::LUTFCompose:
ml::LUTFunction ml::Base

List of all members.

Public Member Functions

 LUTFCompose (void)
 Constructor.
LUT properties
virtual bool isValid (void) const
 Return true if the LUT function is valid.
virtual int getNativeMinIndex (void) const
 Get native minimum index.
virtual int getNativeMaxIndex (void) const
 Get native maximum index.
virtual int getHeight (void) const
 Get native LUT height (= number of rows, numbering starts at 0)
virtual int getDepth (void) const
 Get native LUT depth (= number of layers, numbering starts at 0)
virtual double getNativeMinValue (void) const
 Get native minimum LUT value.
virtual double getNativeMaxValue (void) const
 Get native maximum LUT value.
LUT rendering

These methods are called by LUT users to obtain a rendering of the LUT function.

virtual bool render (LUTDataBase *lutData) const
 Render LUT in (previously initialized) LUTData object.
virtual bool renderRescaled (LUTDataBase *lutData, double minIndex, double maxIndex) const
 Render rescaled LUT in (previously initialized) LUTData object.

Protected Member Functions

 ML_CLASS_HEADER (LUTFCompose)
LUT implementation
virtual LUTVisualType getRenderType (LUTDataBase *lutData) const
 Get visual type used for rendering.
virtual bool renderLUTNative (LUTDataBase *lutData, LUTIteratorBase *lutIterator) const
 Render the lookup table into lutData using lutIterator to access and increment the LUT pointers.
virtual bool renderLUTRescaled (LUTDataBase *lutData, LUTIteratorBase *lutIterator, double minIndex, double maxIndex) const
 Render rescaled LUT into lutData using lutIterator to access and increment the LUT pointers.
template<typename T >
bool renderLUT (LUTData< T > *lutData, LUTIterator< T > *lutIterator, double minIndex, double maxIndex, bool rescale) const
 Render the output LUT into lutData using lutIterator to access and increment the LUT pointers.
unsigned int getInputLUTWidth (unsigned int index) const
 Get the width of the index range for which the specified input LUT needs to be rendered.

Protected Attributes

std::vector< const LUTFunction * > _inputLUTs
 List of input LUTs.
unsigned int _resolution
 Intermediate resolution.

Input LUT list and intermediate resolution

static unsigned int defaultResolution
 Default value for the intermediate resolution.
void clear (void)
 Clear list of input LUTs.
void addInputLUT (const LUTFunction &inputLUT)
 Add an input LUT.
unsigned int getNumInputLUTs (void) const
 Get number of input LUTs.
const LUTFunctiongetInputLUT (unsigned int i) const
 Get pointer to i-th input LUT (or NULL if out of range)
void setResolution (unsigned int resolution)
 Set intermediate resolution (if not obtained from input LUT)
unsigned int getResolution (void) const
 Get intermediate resolution.

Detailed Description

A LUT function composing several input LUTs into a single output LUT.

Definition at line 31 of file mlLUTFCompose.h.


Constructor & Destructor Documentation

ml::LUTFCompose::LUTFCompose ( void  )

Constructor.


Member Function Documentation

void ml::LUTFCompose::addInputLUT ( const LUTFunction inputLUT)

Add an input LUT.

void ml::LUTFCompose::clear ( void  )

Clear list of input LUTs.

virtual int ml::LUTFCompose::getDepth ( void  ) const [virtual]

Get native LUT depth (= number of layers, numbering starts at 0)

Reimplemented from ml::LUTFunction.

virtual int ml::LUTFCompose::getHeight ( void  ) const [virtual]

Get native LUT height (= number of rows, numbering starts at 0)

Reimplemented from ml::LUTFunction.

const LUTFunction* ml::LUTFCompose::getInputLUT ( unsigned int  i) const

Get pointer to i-th input LUT (or NULL if out of range)

unsigned int ml::LUTFCompose::getInputLUTWidth ( unsigned int  index) const [protected]

Get the width of the index range for which the specified input LUT needs to be rendered.

virtual int ml::LUTFCompose::getNativeMaxIndex ( void  ) const [virtual]

Get native maximum index.

Reimplemented from ml::LUTFunction.

virtual double ml::LUTFCompose::getNativeMaxValue ( void  ) const [virtual]

Get native maximum LUT value.

Reimplemented from ml::LUTFunction.

virtual int ml::LUTFCompose::getNativeMinIndex ( void  ) const [virtual]

Get native minimum index.

Reimplemented from ml::LUTFunction.

virtual double ml::LUTFCompose::getNativeMinValue ( void  ) const [virtual]

Get native minimum LUT value.

Reimplemented from ml::LUTFunction.

unsigned int ml::LUTFCompose::getNumInputLUTs ( void  ) const

Get number of input LUTs.

virtual LUTVisualType ml::LUTFCompose::getRenderType ( LUTDataBase lutData) const [inline, protected, virtual]

Get visual type used for rendering.

This method is called by render() and renderRescaled() to initialize the LUT iterator object appropriate for a pair of source/target visual types. By returning the visual type of lutData, we always render directly in the visual type requested.

Reimplemented from ml::LUTFunction.

Definition at line 124 of file mlLUTFCompose.h.

References ml::LUTDataBase::getVisualType().

unsigned int ml::LUTFCompose::getResolution ( void  ) const [inline]

Get intermediate resolution.

Definition at line 85 of file mlLUTFCompose.h.

virtual bool ml::LUTFCompose::isValid ( void  ) const [virtual]

Return true if the LUT function is valid.

Reimplemented from ml::LUTFunction.

ml::LUTFCompose::ML_CLASS_HEADER ( LUTFCompose  ) [protected]
virtual bool ml::LUTFCompose::render ( LUTDataBase lutData) const [virtual]

Render LUT in (previously initialized) LUTData object.

Return true if successful.

Overloaded here to directly render the LUT if only one input LUT is specified

Reimplemented from ml::LUTFunction.

template<typename T >
bool ml::LUTFCompose::renderLUT ( LUTData< T > *  lutData,
LUTIterator< T > *  lutIterator,
double  minIndex,
double  maxIndex,
bool  rescale 
) const [protected]

Render the output LUT into lutData using lutIterator to access and increment the LUT pointers.

Return true if successful.

virtual bool ml::LUTFCompose::renderLUTNative ( LUTDataBase lutData,
LUTIteratorBase lutIterator 
) const [protected, virtual]

Render the lookup table into lutData using lutIterator to access and increment the LUT pointers.

Both lutData and lutIterator should be type-cast to a derived, type specific class pointer, according to lutData->getDataType(). Return true if successful.

Implements ml::LUTFunction.

virtual bool ml::LUTFCompose::renderLUTRescaled ( LUTDataBase lutData,
LUTIteratorBase lutIterator,
double  minIndex,
double  maxIndex 
) const [protected, virtual]

Render rescaled LUT into lutData using lutIterator to access and increment the LUT pointers.

Both lutData and lutIterator should be type-cast to a derived, type specific class pointer, according to lutData->getDataType(). The LUT is rendered for range minIndex .. maxIndex, but resampled to the index range specified in lutData. Return true if successful.

Reimplemented from ml::LUTFunction.

virtual bool ml::LUTFCompose::renderRescaled ( LUTDataBase lutData,
double  minIndex,
double  maxIndex 
) const [virtual]

Render rescaled LUT in (previously initialized) LUTData object.

LUT is rendered for range minIndex .. maxIndex, but resampled to the index range specified in lutData. Return true if successful

Overloaded here to directly render the LUT if only one input LUT is specified

Reimplemented from ml::LUTFunction.

void ml::LUTFCompose::setResolution ( unsigned int  resolution) [inline]

Set intermediate resolution (if not obtained from input LUT)

Definition at line 82 of file mlLUTFCompose.h.

References ml::LUTFunction::changed().


Member Data Documentation

std::vector<const LUTFunction*> ml::LUTFCompose::_inputLUTs [protected]

List of input LUTs.

Definition at line 154 of file mlLUTFCompose.h.

unsigned int ml::LUTFCompose::_resolution [protected]

Intermediate resolution.

Definition at line 157 of file mlLUTFCompose.h.

unsigned int ml::LUTFCompose::defaultResolution [static]

Default value for the intermediate resolution.

Definition at line 88 of file mlLUTFCompose.h.


The documentation for this class was generated from the following file: