13#ifndef ML_LUTFRAMP_PAIR_H
14#define ML_LUTFRAMP_PAIR_H
44 virtual double getRGBCenter (
void)
const {
return _rgbRamp.getCenter(); }
50 virtual double getRGBWidth (
void)
const {
return _rgbRamp.getWidth(); }
56 virtual void getRGBStart (
double *r,
double *g,
double *b)
const;
62 virtual void getRGBEnd (
double *r,
double *g,
double *b)
const;
65 virtual void setRGBEnd (
double r,
double g,
double b);
68 virtual double getAlphaCenter (
void)
const {
return _alphaRamp.getCenter(); }
74 virtual double getAlphaWidth (
void)
const {
return _alphaRamp.getWidth(); }
80 virtual double getAlphaStart (
void)
const {
return _alphaRamp.getBaseValue(); }
86 virtual double getAlphaEnd (
void)
const {
return _alphaRamp.getPeakValue(); }
133 template <
typename T>
147 double _rgbStart[3], _rgbEnd[3];
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.
An RGBA LUT consisting of a RGB ramp and an alpha ramp.
virtual void setAlphaEnd(double a)
Set alpha end value.
virtual double getRGBCenter(void) const
Get RGB ramp center.
virtual double getAlphaWidth(void) const
Get alpha ramp width.
bool renderLUTNative(LUTDataBase *lutData, LUTIteratorBase *lutIterator) const override
Render the lookup table into lutData using lutIterator to access and increment the LUT pointers.
virtual void setRGBStart(double r, double g, double b)
Set start color RGB.
virtual double getAlphaEnd(void) const
Get alpha end value.
virtual void getRGBEnd(double *r, double *g, double *b) const
Store end color RGB in r, g, b (if not null)
virtual void getRGBStart(double *r, double *g, double *b) const
Store start color RGB in r, g, b (if not null)
virtual double getRGBWidth(void) const
Get RGB ramp width.
void setRelative(bool relative) override
Set/reset relative flag.
virtual void setRGBWidth(double width)
Set RGB ramp width.
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 th...
ML_CLASS_HEADER(LUTFRampPair)
virtual double getAlphaCenter(void) const
Get alpha ramp center.
LUTFRampPair(void)
Constructor.
LUTFPrimitive _alphaRamp
Alpha ramp LUT function.
virtual LUTDataBase * createLUT(LUTDataBase *lutData) const
Create single-channel LUT with same index and entry range as lutData.
virtual void setAlphaCenter(double center)
Set alpha ramp center.
virtual void setAlphaWidth(double width)
Set alpha ramp width.
double getNativeMaxIndex(void) const override
Get native maximum index.
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.
LUTFPrimitive _rgbRamp
RGB ramp LUT function.
double getNativeMinIndex(void) const override
Get native minimum index.
virtual void setRGBCenter(double center)
Set RGB ramp center.
virtual double getAlphaStart(void) const
Get alpha start value.
virtual void setRGBEnd(double r, double g, double b)
Set end color RGB.
virtual void setAlphaStart(double a)
Set alpha start value.
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.