31 #if defined(ColorToScalarFunctors_RECURSES) 32 #error Recursive header files inclusion detected in ColorToScalarFunctors.h 33 #else // defined(ColorToScalarFunctors_RECURSES) 35 #define ColorToScalarFunctors_RECURSES 37 #if !defined ColorToScalarFunctors_h 39 #define ColorToScalarFunctors_h 44 #include "DGtal/base/Common.h" 45 #include "DGtal/io/Color.h" 104 return static_cast<unsigned char>( ((int)aCol.
green() + (int)aCol.
blue() + (int)aCol.
red()) / 3);
112 template<
typename TValue>
120 return static_cast<Value
> (aCol.
getRGB());
130 #endif // !defined ColorToScalarFunctors_h 132 #undef ColorToScalarFunctors_RECURSES 133 #endif // else defined(ColorToScalarFunctors_RECURSES)
unsigned char operator()(const Color &aCol) const
DGtal::uint32_t getRGB() const
DGtal is the top-level namespace which contains all DGtal functions and types.
Structure representing an RGB triple with alpha component.
void green(const unsigned char aGreenValue)
void red(const unsigned char aRedValue)
void blue(const unsigned char aBlueValue)