MeVisLabToolboxReference
ml::LUTFRampPair Class Reference

An RGBA LUT consisting of a RGB ramp and an alpha ramp. More...

#include <mlLUTFRampPair.h>

Inheritance diagram for ml::LUTFRampPair:
ml::LUTFunction ml::Base

List of all members.

Public Member Functions

 LUTFRampPair (void)
 Constructor.
LUT parameters
virtual void setRelative (bool relative)
 Set/reset relative flag.
virtual double getRGBCenter (void) const
 Get RGB ramp center.
virtual void setRGBCenter (double center)
 Set RGB ramp center.
virtual double getRGBWidth (void) const
 Get RGB ramp width.
virtual void setRGBWidth (double width)
 Set RGB ramp width.
virtual void getRGBStart (double *r, double *g, double *b) const
 Store start color RGB in r, g, b (if not null)
virtual void setRGBStart (double r, double g, double b)
 Set start color RGB.
virtual void getRGBEnd (double *r, double *g, double *b) const
 Store end color RGB in r, g, b (if not null)
virtual void setRGBEnd (double r, double g, double b)
 Set end color RGB.
virtual double getAlphaCenter (void) const
 Get alpha ramp center.
virtual void setAlphaCenter (double center)
 Set alpha ramp center.
virtual double getAlphaWidth (void) const
 Get alpha ramp width.
virtual void setAlphaWidth (double width)
 Set alpha ramp width.
virtual double getAlphaStart (void) const
 Get alpha start value.
virtual void setAlphaStart (double a)
 Set alpha start value.
virtual double getAlphaEnd (void) const
 Get alpha end value.
virtual void setAlphaEnd (double a)
 Set alpha end value.
LUT properties
virtual int getNativeMinIndex (void) const
 Get native minimum index.
virtual int getNativeMaxIndex (void) const
 Get native maximum index.

Protected Member Functions

 ML_CLASS_HEADER (LUTFRampPair)
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.
virtual LUTDataBasecreateLUT (LUTDataBase *lutData) const
 Create single-channel LUT with same index and entry range as lutData.
template<typename T >
bool copyLUT (LUTData< T > *lutData, LUTIterator< T > *lutIterator, const LUTData< double > *rgbLut, const LUTData< T > *alphaLut) const
 Copy the single-channel LUTs rgbLut and alphaLut into lutData, applying RGB start and end color to the RGB channels and using lutIterator to access and increment the LUT pointers.

Protected Attributes

LUTFPrimitive _rgbRamp
 RGB ramp LUT function.
LUTFPrimitive _alphaRamp
 Alpha ramp LUT function.
double _rgbStart [3]
 Start and end RGB.
double _rgbEnd [3]

Detailed Description

An RGBA LUT consisting of a RGB ramp and an alpha ramp.

Definition at line 33 of file mlLUTFRampPair.h.


Constructor & Destructor Documentation

ml::LUTFRampPair::LUTFRampPair ( void  )

Constructor.


Member Function Documentation

template<typename T >
bool ml::LUTFRampPair::copyLUT ( LUTData< T > *  lutData,
LUTIterator< T > *  lutIterator,
const LUTData< double > *  rgbLut,
const LUTData< T > *  alphaLut 
) const [protected]

Copy the single-channel LUTs rgbLut and alphaLut into lutData, applying RGB start and end color to the RGB channels and using lutIterator to access and increment the LUT pointers.

Return true if successful.

virtual LUTDataBase* ml::LUTFRampPair::createLUT ( LUTDataBase lutData) const [protected, virtual]

Create single-channel LUT with same index and entry range as lutData.

virtual double ml::LUTFRampPair::getAlphaCenter ( void  ) const [inline, virtual]

Get alpha ramp center.

Definition at line 72 of file mlLUTFRampPair.h.

virtual double ml::LUTFRampPair::getAlphaEnd ( void  ) const [inline, virtual]

Get alpha end value.

Definition at line 90 of file mlLUTFRampPair.h.

virtual double ml::LUTFRampPair::getAlphaStart ( void  ) const [inline, virtual]

Get alpha start value.

Definition at line 84 of file mlLUTFRampPair.h.

virtual double ml::LUTFRampPair::getAlphaWidth ( void  ) const [inline, virtual]

Get alpha ramp width.

Definition at line 78 of file mlLUTFRampPair.h.

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

Get native maximum index.

Reimplemented from ml::LUTFunction.

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

Get native minimum index.

Reimplemented from ml::LUTFunction.

virtual double ml::LUTFRampPair::getRGBCenter ( void  ) const [inline, virtual]

Get RGB ramp center.

Definition at line 48 of file mlLUTFRampPair.h.

virtual void ml::LUTFRampPair::getRGBEnd ( double *  r,
double *  g,
double *  b 
) const [virtual]

Store end color RGB in r, g, b (if not null)

virtual void ml::LUTFRampPair::getRGBStart ( double *  r,
double *  g,
double *  b 
) const [virtual]

Store start color RGB in r, g, b (if not null)

virtual double ml::LUTFRampPair::getRGBWidth ( void  ) const [inline, virtual]

Get RGB ramp width.

Definition at line 54 of file mlLUTFRampPair.h.

ml::LUTFRampPair::ML_CLASS_HEADER ( LUTFRampPair  ) [protected]
virtual bool ml::LUTFRampPair::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::LUTFRampPair::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 void ml::LUTFRampPair::setAlphaCenter ( double  center) [inline, virtual]

Set alpha ramp center.

Definition at line 75 of file mlLUTFRampPair.h.

References ml::LUTFunction::changed().

virtual void ml::LUTFRampPair::setAlphaEnd ( double  a) [inline, virtual]

Set alpha end value.

Definition at line 93 of file mlLUTFRampPair.h.

References ml::LUTFunction::changed().

virtual void ml::LUTFRampPair::setAlphaStart ( double  a) [inline, virtual]

Set alpha start value.

Definition at line 87 of file mlLUTFRampPair.h.

References ml::LUTFunction::changed().

virtual void ml::LUTFRampPair::setAlphaWidth ( double  width) [inline, virtual]

Set alpha ramp width.

Definition at line 81 of file mlLUTFRampPair.h.

References ml::LUTFunction::changed().

virtual void ml::LUTFRampPair::setRelative ( bool  relative) [virtual]

Set/reset relative flag.

Reimplemented from ml::LUTFunction.

virtual void ml::LUTFRampPair::setRGBCenter ( double  center) [inline, virtual]

Set RGB ramp center.

Definition at line 51 of file mlLUTFRampPair.h.

References ml::LUTFunction::changed().

virtual void ml::LUTFRampPair::setRGBEnd ( double  r,
double  g,
double  b 
) [virtual]

Set end color RGB.

virtual void ml::LUTFRampPair::setRGBStart ( double  r,
double  g,
double  b 
) [virtual]

Set start color RGB.

virtual void ml::LUTFRampPair::setRGBWidth ( double  width) [inline, virtual]

Set RGB ramp width.

Definition at line 57 of file mlLUTFRampPair.h.

References ml::LUTFunction::changed().


Member Data Documentation

Alpha ramp LUT function.

Definition at line 148 of file mlLUTFRampPair.h.

double ml::LUTFRampPair::_rgbEnd[3] [protected]

Definition at line 151 of file mlLUTFRampPair.h.

RGB ramp LUT function.

Definition at line 145 of file mlLUTFRampPair.h.

double ml::LUTFRampPair::_rgbStart[3] [protected]

Start and end RGB.

Definition at line 151 of file mlLUTFRampPair.h.


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