PCL
pcl::ImageColor Class Reference

Implements color space properties of images. More...

#include <ImageColor.h>

+ Inheritance diagram for pcl::ImageColor:

Public Types

using color_space = ColorSpace::value_type
 

Public Member Functions

String ChannelId (int c) const noexcept
 
color_space ColorSpace () const noexcept
 
bool IsColor () const noexcept
 
const RGBColorSystemRGBWorkingSpace () const noexcept
 
virtual void SetRGBWorkingSpace (const RGBColorSystem &RGBWS)
 

Static Public Member Functions

static const RGBColorSystemDefaultRGBWorkingSpace () noexcept
 
static void ResetDefaultRGBWorkingSpace ()
 
static void SetDefaultRGBWorkingSpace (const RGBColorSystem &RGBWS)
 

Detailed Description

ImageColor defines the color space and the RGB Working Space for an image.

Supported color spaces are defined and enumerated by the ColorSpace class.

An RGB Working Space (RGBWS) is used by PCL and the PixInsight core application to perform luminance/chrominance separations and color space conversions. Note that a RGBWS has nothing to do with color management and ICC profiles in the PixInsight/PCL environment. An RGBWS is used for image processing tasks exclusively, and never for color management tasks.

RGB working spaces are implemented by the RGBColorSystem class.

Note that for a shared image (that is, an image living in the PixInsight core application) the RGBWS is controlled exclusively by its parent ImageWindow.

See also
ImageGeometry, AbstractImage, GenericImage

Definition at line 96 of file ImageColor.h.

Member Typedef Documentation

◆ color_space

using pcl::ImageColor::color_space = ColorSpace::value_type

An enumerated type that represents the set of supported color spaces. Valid constants for this enumeration are defined in the ColorSpace namespace.

Definition at line 105 of file ImageColor.h.

Member Function Documentation

◆ ChannelId()

String pcl::ImageColor::ChannelId ( int  c) const
inlinenoexcept

Returns the identifier of a nominal channel c in the current color space of this image.

Definition at line 187 of file ImageColor.h.

References pcl::ColorSpace::ChannelId().

◆ ColorSpace()

color_space pcl::ImageColor::ColorSpace ( ) const
inlinenoexcept

Returns the color space of this image. This function returns the value of a symbolic constant enumerated by the ColorSpace namespace.

Definition at line 178 of file ImageColor.h.

Referenced by pcl::ImageInfo::ImageInfo(), and pcl::XISF::ColorSpaceId().

◆ DefaultRGBWorkingSpace()

static const RGBColorSystem& pcl::ImageColor::DefaultRGBWorkingSpace ( )
inlinestaticnoexcept

Returns a reference to the current default RGB working space (RGBWS). If you don't change it, the factory-default RGBWS corresponds to the sRGB color space.

Note
This function only works for local images. For shared images, the default RGBWS is controlled by the ImageWindow class.

Definition at line 137 of file ImageColor.h.

◆ IsColor()

bool pcl::ImageColor::IsColor ( ) const
inlinenoexcept

Returns true iff this is a color image. Returns false if this is a grayscale monochrome image.

Definition at line 169 of file ImageColor.h.

◆ ResetDefaultRGBWorkingSpace()

static void pcl::ImageColor::ResetDefaultRGBWorkingSpace ( )
inlinestatic

Resets the default RGB working space (RGBWS) to the factory-default sRGB color space.

Definition at line 160 of file ImageColor.h.

References pcl::RGBColorSystem::sRGB.

◆ RGBWorkingSpace()

const RGBColorSystem& pcl::ImageColor::RGBWorkingSpace ( ) const
inlinenoexcept

Returns a reference to the RGB working space associated with this image.

Definition at line 110 of file ImageColor.h.

◆ SetDefaultRGBWorkingSpace()

static void pcl::ImageColor::SetDefaultRGBWorkingSpace ( const RGBColorSystem RGBWS)
inlinestatic

Selects the specified RGB working space RGBWS as the default RGB working space for local images. The default RGBWS is associated with newly created local images; existing images won't be affected by this setting.

Note
This function only works for local images. For shared images, the default RGBWS is controlled exclusively by the ImageWindow class.

Definition at line 151 of file ImageColor.h.

◆ SetRGBWorkingSpace()

virtual void pcl::ImageColor::SetRGBWorkingSpace ( const RGBColorSystem RGBWS)
inlinevirtual

Associates a given RGB working space (RGBWS) with this image.

Note
For shared images (that is, images living in the PixInsight core application), the RGB working space cannot be changed by calling this function. This is because the RGBWS of a shared image is a property controlled by its parent image window. See the documentation for the ImageWindow class.

Reimplemented in pcl::GenericImage< P >, pcl::GenericImage< P1 >, and pcl::GenericImage< UInt8PixelTraits >.

Definition at line 124 of file ImageColor.h.


The documentation for this class was generated from the following file: