52 #ifndef __PCL_ImageColor_h
53 #define __PCL_ImageColor_h
69 #define m_colorSpace m_color->colorSpace
70 #define m_RGBWS m_color->RGBWS
105 using color_space = ColorSpace::value_type;
139 return s_defaultRGBWS;
153 s_defaultRGBWS = RGBWS;
171 return m_colorSpace != ColorSpace::Gray;
196 color_space colorSpace;
199 Color( color_space cs = ColorSpace::Gray )
201 , RGBWS( s_defaultRGBWS )
205 Color(
const Color& ) =
default;
207 void Assign(
const Color& x )
209 colorSpace = x.colorSpace;
213 void Reset() noexcept
215 colorSpace = ColorSpace::Gray;
219 Color* m_color =
nullptr;
229 static RGBColorSystem s_defaultRGBWS;
231 ImageColor() =
default;
232 ImageColor(
const ImageColor& ) =
default;
233 ImageColor& operator =(
const ImageColor& ) =
default;
235 virtual ~ImageColor()
240 void Swap( ImageColor& image ) noexcept
Implements color space properties of images.
const RGBColorSystem & RGBWorkingSpace() const noexcept
virtual void SetRGBWorkingSpace(const RGBColorSystem &RGBWS)
String ChannelId(int c) const noexcept
static void ResetDefaultRGBWorkingSpace()
static void SetDefaultRGBWorkingSpace(const RGBColorSystem &RGBWS)
color_space ColorSpace() const noexcept
bool IsColor() const noexcept
static const RGBColorSystem & DefaultRGBWorkingSpace() noexcept
Colorimetrically defined RGB working color space.
static const RGBColorSystem sRGB
void Swap(GenericPoint< T > &p1, GenericPoint< T > &p2) noexcept
String ChannelId(int colorSpace, int channel)