MeVisLabToolboxReference
ml::LUTFChannelMap Class Reference

A LUT function mapping the individual channels of the input LUT to the channels of the output LUT. More...

#include <mlLUTFChannelMap.h>

Inheritance diagram for ml::LUTFChannelMap:
ml::LUTFunction ml::Base

List of all members.

Public Types

enum  Map {
  MAP_NONE = 0, MAP_L, MAP_R, MAP_G,
  MAP_B, MAP_A, MAP_NUM_VALUES
}
 Channel source selector constants and type. More...

Public Member Functions

 LUTFChannelMap (void)
 Constructor.
void setRGBAMap (Map r, Map g, Map b, Map a)
 Specify channel map for RGB(A) output LUT.
void setLAMap (Map l, Map a)
 Specify channel map for L(A) output LUT.
const MapgetMap (void) const
 Get current channel map.
void setSource (LUTFunction *source)
 Set input LUT function.
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.

Protected Member Functions

 ML_CLASS_HEADER (LUTFChannelMap)
LUT implementation
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 a LUT primitive (as selected by the _shape member variable) into lutData using lutIterator to access and increment the LUT pointers.

Protected Attributes

Map _map [LUTIteratorBase::MAX_CHANNELS]
 Source channel selectors.
LUTFunction_source
 Input LUT function.

Detailed Description

A LUT function mapping the individual channels of the input LUT to the channels of the output LUT.

Definition at line 32 of file mlLUTFChannelMap.h.


Member Enumeration Documentation

Channel source selector constants and type.

Enumerator:
MAP_NONE 

No source channel.

MAP_L 

Intensity channel.

MAP_R 
MAP_G 
MAP_B 

Red, green, blue channels.

MAP_A 

Alpha channel.

MAP_NUM_VALUES 

Number of selector constants.

Definition at line 68 of file mlLUTFChannelMap.h.


Constructor & Destructor Documentation

ml::LUTFChannelMap::LUTFChannelMap ( void  )

Constructor.


Member Function Documentation

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

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

Reimplemented from ml::LUTFunction.

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

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

Reimplemented from ml::LUTFunction.

const Map* ml::LUTFChannelMap::getMap ( void  ) const [inline]

Get current channel map.

Definition at line 84 of file mlLUTFChannelMap.h.

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

Get native maximum index.

Reimplemented from ml::LUTFunction.

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

Get native maximum LUT value.

Reimplemented from ml::LUTFunction.

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

Get native minimum index.

Reimplemented from ml::LUTFunction.

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

Get native minimum LUT value.

Reimplemented from ml::LUTFunction.

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

Return true if the LUT function is valid.

Reimplemented from ml::LUTFunction.

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

Render a LUT primitive (as selected by the _shape member variable) into lutData using lutIterator to access and increment the LUT pointers.

Return true if successful.

virtual bool ml::LUTFChannelMap::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::LUTFChannelMap::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.

void ml::LUTFChannelMap::setLAMap ( Map  l,
Map  a 
)

Specify channel map for L(A) output LUT.

void ml::LUTFChannelMap::setRGBAMap ( Map  r,
Map  g,
Map  b,
Map  a 
)

Specify channel map for RGB(A) output LUT.

void ml::LUTFChannelMap::setSource ( LUTFunction source)

Set input LUT function.


Member Data Documentation

Map ml::LUTFChannelMap::_map[LUTIteratorBase::MAX_CHANNELS] [protected]

Source channel selectors.

Definition at line 122 of file mlLUTFChannelMap.h.

Input LUT function.

Definition at line 125 of file mlLUTFChannelMap.h.


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