13#ifndef ML_LUTFPRIMITIVE_H
14#define ML_LUTFPRIMITIVE_H
43 static const char *shapeNames[numShapes];
60 virtual double getCenter (
void)
const {
return _center; }
66 virtual double getWidth (
void)
const {
return _width; }
127 template <
typename T>
Untyped base class for LUTData template classes.
A LUTData object stores an instance of a LUT, rendered for a specified visual type,...
A single channel LUT with predefined primitives of different shapes.
LUTFPrimitive(void)
Constructor.
double _peakValue
Center LUT output level, relative to [0,1].
virtual void setPeakValue(double peakValue)
Set peak value.
virtual void setShape(ShapeType shape)
Set shape.
virtual void setEdgeWidth(double edgeWidth)
Set edge width.
double getNativeMaxIndex(void) const override
Get native maximum index.
virtual void setBaseValue(double baseValue)
Set base value.
virtual void setWidth(double width)
Set ramp width.
ML_CLASS_HEADER(LUTFPrimitive)
ShapeType _shape
Function Type.
virtual double getEdgeWidth(void) const
Get edge width.
double _center
Ramp center.
double getNativeMinIndex(void) const override
Get native minimum index.
bool renderLUTNative(LUTDataBase *lutData, LUTIteratorBase *lutIterator) const override
Render the lookup table into lutData using lutIterator to access and increment the LUT pointers.
virtual double getWidth(void) const
Get ramp width.
ShapeType
Shape constants.
virtual double getBaseValue(void) const
Get base value.
bool renderLUTRescaled(LUTDataBase *lutData, LUTIteratorBase *lutIterator, double minIndex, double maxIndex) const override
Render rescaled LUT into lutData using lutIterator to access and increment the LUT pointers.
virtual ShapeType getShape(void) const
Get shape.
virtual double getCenter(void) const
Get ramp center.
virtual double getPeakValue(void) const
Get peak value.
double _edgeWidth
Edge width (used for Wall shape only)
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 ...
double _baseValue
Base LUT output level, relative to [0,1].
virtual void setCenter(double center)
Set ramp center.
Common base class for lookup tables.
void changed(void)
Assign a new LUT ID.
LUT iterator base class with type independent functionality and declarations.
The LUTIterator class template is used by a LUTFunction object for rendering into a LUTData object.
#define MLLUT_EXPORT
System specific macro definitions.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.