ACF $AcfVersion:0$
Public Member Functions | List of all members
icmm::IWhitePointProvider Class Referenceabstract

Interface providing white point information for color spaces. More...

#include <IWhitePointProvider.h>

Inheritance diagram for icmm::IWhitePointProvider:
istd::IChangeable istd::IPolymorphic icmm::IIlluminant icmm::CIlluminant

Public Member Functions

virtual icmm::CVarColor GetWhitePoint () const =0
 Gets the white point as a color value.
 
- Public Member Functions inherited from istd::IChangeable
virtual int GetSupportedOperations () const
 Get set of flags for supported operations.
 
virtual bool CopyFrom (const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
 Copy this object from another one.
 
virtual bool IsEqual (const IChangeable &object) const
 Compare this object with another object.
 
virtual istd::TUniqueInterfacePtr< istd::IChangeableCloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const
 Make a copy of this object.
 
virtual bool ResetData (CompatibilityMode mode=CM_WITHOUT_REFS)
 Reset data to its default state.
 
virtual void BeginChanges (const ChangeSet &changeSet)
 Starts the change transaction.
 
virtual void EndChanges (const ChangeSet &changeSet)
 Ends the change transaction.
 
virtual void BeginChangeGroup (const ChangeSet &changeSet)
 Starts group of changes.
 
virtual void EndChangeGroup (const ChangeSet &changeSet)
 Ends group of changes.
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Additional Inherited Members

- Public Types inherited from istd::IChangeable
enum  ChangeFlags {
  CF_ACF_INTERNAL = 0 , CF_ALL_DATA , CF_ANY , CF_DESTROYING ,
  CF_DELEGATED , CF_NO_UNDO
}
 Data model change notification flags. More...
 
enum  SupportedOperations {
  SO_NONE = 0 , SO_OBSERVE = 1 << 0 , SO_COPY = 1 << 1 , SO_CLONE = 1 << 2 ,
  SO_COMPARE = 1 << 3 , SO_RESET = 1 << 4
}
 Flags for supported operations. More...
 
enum  CompatibilityMode { CM_STRICT , CM_WITHOUT_REFS , CM_WITH_REFS , CM_CONVERT }
 Control how relationship betweeen objects are interpreted. More...
 
typedef QMultiMap< QByteArray, QVariant > ChangeInfoMap
 
- Static Public Member Functions inherited from istd::IChangeable
static const ChangeSetGetNoChanges ()
 Get empty set of changes.
 
static const ChangeSetGetAnyChange ()
 Get anonymous change set.
 
static const ChangeSetGetAllChanges ()
 Get anonymous change set.
 
static const ChangeSetGetDelegatedChanges ()
 Get delegated change set.
 
- Protected Member Functions inherited from istd::IChangeable
virtual void OnBeginChanges ()
 Callback function for begin change event.
 
virtual void OnEndChanges (const ChangeSet &changeSet)
 Callback function for end change event.
 

Detailed Description

Interface providing white point information for color spaces.

Purpose

IWhitePointProvider defines an interface for objects that supply white point information. The white point represents the color that should appear as "white" in a color space, and is essential for chromatic adaptation and color space conversions. Different viewing conditions and illuminants produce different white points (D65, D50, A, etc.).

White Point Concept

A white point defines:

Standard Illuminants

Common standard white points:

Usage Examples

// Example 1: Getting white point from provider
void InspectWhitePoint(const icmm::IWhitePointProvider* provider)
{
icmm::CVarColor whitePoint = provider->GetWhitePoint();
// White point typically in XYZ coordinates
if (whitePoint.GetElementsCount() >= 3) {
double X = whitePoint.GetElement(0);
double Y = whitePoint.GetElement(1);
double Z = whitePoint.GetElement(2);
qDebug() << "White Point XYZ:" << X << Y << Z;
}
}
// Example 2: Comparing white points
bool SameWhitePoint(const icmm::IWhitePointProvider* provider1,
const icmm::IWhitePointProvider* provider2,
double tolerance = 0.001)
{
icmm::CVarColor wp1 = provider1->GetWhitePoint();
icmm::CVarColor wp2 = provider2->GetWhitePoint();
return wp1.IsSimilar(wp2, tolerance);
}
// Example 3: Chromatic adaptation
// When converting between color spaces with different white points,
// chromatic adaptation is needed
icmm::CVarColor AdaptColor(const icmm::CVarColor& color,
const icmm::IWhitePointProvider* sourceWP,
{
icmm::CVarColor sourceWhite = sourceWP->GetWhitePoint();
icmm::CVarColor destWhite = destWP->GetWhitePoint();
// Apply chromatic adaptation transform (simplified)
// Real implementation would use Bradford, von Kries, etc.
// ...
return color; // Adapted color
}
// Example 4: Checking if adaptation is needed
bool NeedsAdaptation(const icmm::IWhitePointProvider* source,
{
return !SameWhitePoint(source, dest);
}
Generic color implementation with variable number of color components.
Definition CVarColor.h:176
bool IsSimilar(const CVarColor &color, double tolerance=I_BIG_EPSILON) const
Allows to compare two colors with tolerance.
Definition CVarColor.h:267
Interface providing white point information for color spaces.
virtual icmm::CVarColor GetWhitePoint() const =0
Gets the white point as a color value.
double GetElement(int index) const
Get element at specified index.
Definition CVarVector.h:409
int GetElementsCount() const
Get number of elements.
Definition CVarVector.h:387

Applications

White points are used for:

See also
icmm::IIlluminant, icmm::IColorSpecification, icmm::ITristimulusSpecification, icmm::CXyzToCieLabTransformation

Definition at line 105 of file IWhitePointProvider.h.

Member Function Documentation

◆ GetWhitePoint()

virtual icmm::CVarColor icmm::IWhitePointProvider::GetWhitePoint ( ) const
pure virtual

Gets the white point as a color value.

Returns the white point typically as XYZ tristimulus values in a CVarColor. The white point defines what color should be considered as "white" or "neutral" in the color space.

Returns
CVarColor containing the white point, typically XYZ coordinates
Note
White point is usually normalized so Y component = 1.0
Common white points: D65 (X=0.95047, Y=1.0, Z=1.08883)
See also
IIlluminant::GetWhitePoint()

Implemented in icmm::CIlluminant.


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