MeVisLabToolboxReference
|
A single channel LUT with predefined primitives of different shapes. More...
#include <mlLUTFPrimitive.h>
Public Types | |
enum | ShapeType { Ramp = 0, Wall, Gauss, Sigmoid, numShapes } |
Shape constants. More... | |
Public Member Functions | |
LUTFPrimitive (void) | |
Constructor. | |
LUT parameters | |
virtual ShapeType | getShape (void) const |
Get shape. | |
virtual void | setShape (ShapeType shape) |
Set shape. | |
virtual double | getCenter (void) const |
Get ramp center. | |
virtual void | setCenter (double center) |
Set ramp center. | |
virtual double | getWidth (void) const |
Get ramp width. | |
virtual void | setWidth (double width) |
Set ramp width. | |
virtual double | getEdgeWidth (void) const |
Get edge width. | |
virtual void | setEdgeWidth (double edgeWidth) |
Set edge width. | |
virtual double | getBaseValue (void) const |
Get base value. | |
virtual void | setBaseValue (double baseValue) |
Set base value. | |
virtual double | getPeakValue (void) const |
Get peak value. | |
virtual void | setPeakValue (double peakValue) |
Set peak value. | |
LUT properties | |
virtual int | getNativeMinIndex (void) const |
Get native minimum index. | |
virtual int | getNativeMaxIndex (void) const |
Get native maximum index. | |
Static Public Attributes | |
static const char * | shapeNames [numShapes] |
Shape names. | |
Protected Member Functions | |
ML_CLASS_HEADER (LUTFPrimitive) | |
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 center, double width, double edgeWidth) 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 | |
ShapeType | _shape |
Function Type. | |
double | _center |
Ramp center. | |
double | _width |
Ramp width. | |
double | _edgeWidth |
Edge width (used for Wall shape only) | |
double | _baseValue |
Base LUT output level, relative to [0,1]. | |
double | _peakValue |
Center LUT output level, relative to [0,1]. |
A single channel LUT with predefined primitives of different shapes.
Definition at line 30 of file mlLUTFPrimitive.h.
Shape constants.
Ramp |
Linear ramp. |
Wall |
Double ramp. |
Gauss |
Gaussian shape. |
Sigmoid |
Sigmoid shape. |
numShapes |
Number of available shape primitives. |
Definition at line 35 of file mlLUTFPrimitive.h.
ml::LUTFPrimitive::LUTFPrimitive | ( | void | ) |
Constructor.
virtual double ml::LUTFPrimitive::getBaseValue | ( | void | ) | const [inline, virtual] |
Get base value.
Definition at line 80 of file mlLUTFPrimitive.h.
virtual double ml::LUTFPrimitive::getCenter | ( | void | ) | const [inline, virtual] |
Get ramp center.
Definition at line 62 of file mlLUTFPrimitive.h.
virtual double ml::LUTFPrimitive::getEdgeWidth | ( | void | ) | const [inline, virtual] |
Get edge width.
Definition at line 74 of file mlLUTFPrimitive.h.
virtual int ml::LUTFPrimitive::getNativeMaxIndex | ( | void | ) | const [virtual] |
Get native maximum index.
Reimplemented from ml::LUTFunction.
virtual int ml::LUTFPrimitive::getNativeMinIndex | ( | void | ) | const [virtual] |
Get native minimum index.
Reimplemented from ml::LUTFunction.
virtual double ml::LUTFPrimitive::getPeakValue | ( | void | ) | const [inline, virtual] |
Get peak value.
Definition at line 86 of file mlLUTFPrimitive.h.
virtual ShapeType ml::LUTFPrimitive::getShape | ( | void | ) | const [inline, virtual] |
Get shape.
Definition at line 56 of file mlLUTFPrimitive.h.
virtual double ml::LUTFPrimitive::getWidth | ( | void | ) | const [inline, virtual] |
Get ramp width.
Definition at line 68 of file mlLUTFPrimitive.h.
ml::LUTFPrimitive::ML_CLASS_HEADER | ( | LUTFPrimitive | ) | [protected] |
bool ml::LUTFPrimitive::renderLUT | ( | LUTData< T > * | lutData, |
LUTIterator< T > * | lutIterator, | ||
double | center, | ||
double | width, | ||
double | edgeWidth | ||
) | 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::LUTFPrimitive::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::LUTFPrimitive::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::LUTFPrimitive::setBaseValue | ( | double | baseValue | ) | [inline, virtual] |
Set base value.
Definition at line 83 of file mlLUTFPrimitive.h.
References ml::LUTFunction::changed().
virtual void ml::LUTFPrimitive::setCenter | ( | double | center | ) | [inline, virtual] |
Set ramp center.
Definition at line 65 of file mlLUTFPrimitive.h.
References ml::LUTFunction::changed().
virtual void ml::LUTFPrimitive::setEdgeWidth | ( | double | edgeWidth | ) | [inline, virtual] |
Set edge width.
Definition at line 77 of file mlLUTFPrimitive.h.
References ml::LUTFunction::changed().
virtual void ml::LUTFPrimitive::setPeakValue | ( | double | peakValue | ) | [inline, virtual] |
Set peak value.
Definition at line 89 of file mlLUTFPrimitive.h.
References ml::LUTFunction::changed().
virtual void ml::LUTFPrimitive::setShape | ( | ShapeType | shape | ) | [inline, virtual] |
virtual void ml::LUTFPrimitive::setWidth | ( | double | width | ) | [inline, virtual] |
Set ramp width.
Definition at line 71 of file mlLUTFPrimitive.h.
References ml::LUTFunction::changed().
double ml::LUTFPrimitive::_baseValue [protected] |
Base LUT output level, relative to [0,1].
Definition at line 149 of file mlLUTFPrimitive.h.
double ml::LUTFPrimitive::_center [protected] |
Ramp center.
Definition at line 140 of file mlLUTFPrimitive.h.
double ml::LUTFPrimitive::_edgeWidth [protected] |
Edge width (used for Wall shape only)
Definition at line 146 of file mlLUTFPrimitive.h.
double ml::LUTFPrimitive::_peakValue [protected] |
Center LUT output level, relative to [0,1].
Definition at line 152 of file mlLUTFPrimitive.h.
ShapeType ml::LUTFPrimitive::_shape [protected] |
Function Type.
Definition at line 137 of file mlLUTFPrimitive.h.
double ml::LUTFPrimitive::_width [protected] |
Ramp width.
Definition at line 143 of file mlLUTFPrimitive.h.
const char* ml::LUTFPrimitive::shapeNames[numShapes] [static] |
Shape names.
Definition at line 45 of file mlLUTFPrimitive.h.