18 #ifndef itkColormapFunction_h
19 #define itkColormapFunction_h
45 template<
typename TScalar,
typename TRGBPixel >
71 itkGetConstMacro(MinimumInputValue,
ScalarType);
74 itkGetConstMacro(MaximumInputValue,
ScalarType);
83 return !( *
this != other );
108 auto d =
static_cast< RealType >( maxInputValue - minInputValue );
110 static_cast< RealType >( minInputValue ) ) / d;
112 value = std::max(0.0, value);
113 value = std::min(1.0, value);
135 os << indent <<
"Minimum RGB Component Value: "
138 os << indent <<
"Maximum RGB Component Value: "
141 os << indent <<
"Minimum Input Value: "
144 os << indent <<
"Maximum Input Value: "
Light weight base class for most itk classes.
virtual RGBComponentType GetMinimumRGBComponentValue() const
virtual RGBComponentType GetMaximumRGBComponentValue() const
RGBComponentType m_MaximumRGBComponentValue
Define numeric traits for std::vector.
virtual ScalarType GetMinimumInputValue() const
ScalarType m_MaximumInputValue
ScalarType m_MinimumInputValue
typename TRGBPixel::ComponentType RGBComponentType
virtual bool operator!=(const ColormapFunction &) const
~ColormapFunction() override=default
virtual bool operator==(const ColormapFunction &other) const
virtual RGBPixelType operator()(const ScalarType &) const =0
Function object which maps a scalar value into an RGB colormap value.
void PrintSelf(std::ostream &os, Indent indent) const override
RGBComponentType RescaleRGBComponentValue(RealType v) const
void PrintSelf(std::ostream &os, Indent indent) const override
typename NumericTraits< ScalarType >::RealType RealType
Control indentation during Print() invocation.
virtual ScalarType GetMaximumInputValue() const
RGBComponentType m_MinimumRGBComponentValue
Base class for most ITK classes.
RealType RescaleInputValue(ScalarType v) const