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

Interface for illuminant objects with configurable properties. More...

#include <IIlluminant.h>

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

Public Member Functions

virtual void SetWhitePoint (const icmm::CVarColor &whitePoint)=0
 Sets the white point for this illuminant.
 
virtual QString GetIlluminantName () const =0
 Gets the human-readable name of this illuminant.
 
virtual void SetIlluminantName (const QString &illuminantName)=0
 Sets the human-readable name for this illuminant.
 
virtual StandardIlluminant GetIlluminantType () const =0
 Gets the standard illuminant type.
 
virtual void SetIlluminantType (const StandardIlluminant &illuminantType)=0
 Sets the standard illuminant type.
 
- Public Member Functions inherited from icmm::IWhitePointProvider
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 ()
 
- Public Member Functions inherited from iser::ISerializable
virtual bool Serialize (IArchive &archive)=0
 Load or store state of this object as a archive stream.
 
virtual quint32 GetMinimalVersion (int versionId) const
 Get minimal needed version to correct storing of this data.
 

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 for illuminant objects with configurable properties.

Purpose

IIlluminant extends IWhitePointProvider to represent a complete light source specification. It combines white point information with additional metadata like illuminant name and type, enabling proper color adaptation and device-independent color management.

Illuminant Concept

An illuminant represents:

Standard Illuminant Types

Daylight illuminants:**

Usage Examples

// Example 1: Creating and configuring an illuminant
icmm::CIlluminant* CreateD65Illuminant()
{
icmm::CIlluminant* illuminant = new icmm::CIlluminant();
// Set standard type
illuminant->SetIlluminantType(icmm::StandardIlluminant::SI_D65);
illuminant->SetIlluminantName("D65");
// Set white point (D65 XYZ coordinates)
icmm::CVarColor whitePoint(3);
whitePoint.SetElement(0, 0.95047); // X
whitePoint.SetElement(1, 1.00000); // Y (normalized to 1.0)
whitePoint.SetElement(2, 1.08883); // Z
illuminant->SetWhitePoint(whitePoint);
return illuminant;
}
// Example 2: Querying illuminant properties
void InspectIlluminant(const icmm::IIlluminant* illuminant)
{
// Get type and name
QString name = illuminant->GetIlluminantName();
qDebug() << "Illuminant:" << name;
// Get white point
icmm::CVarColor wp = illuminant->GetWhitePoint();
if (wp.GetElementsCount() >= 3) {
qDebug() << "White Point XYZ:"
<< wp.GetElement(0) << wp.GetElement(1) << wp.GetElement(2);
}
}
// Example 3: Chromatic adaptation between illuminants
icmm::CVarColor AdaptColor(const icmm::CVarColor& colorXyz,
const icmm::IIlluminant* sourceIlluminant,
const icmm::IIlluminant* destIlluminant)
{
// Get white points
icmm::CVarColor sourceWP = sourceIlluminant->GetWhitePoint();
icmm::CVarColor destWP = destIlluminant->GetWhitePoint();
// Apply chromatic adaptation transform
// (Bradford, von Kries, etc.)
// This ensures colors look consistent under different lighting
icmm::CVarColor adaptedColor = colorXyz;
// ... adaptation calculation ...
return adaptedColor;
}
// Example 4: Display vs. print illuminants
void SetupColorManagement()
{
// Display workflow (D65)
icmm::CIlluminant displayIlluminant;
displayIlluminant.SetIlluminantType(icmm::StandardIlluminant::SI_D65);
displayIlluminant.SetIlluminantName("D65");
// Print workflow (D50)
icmm::CIlluminant printIlluminant;
printIlluminant.SetIlluminantType(icmm::StandardIlluminant::SI_D50);
printIlluminant.SetIlluminantName("D50");
// Colors need adaptation when going from display to print
bool needsAdaptation =
(displayIlluminant.GetIlluminantType() !=
printIlluminant.GetIlluminantType());
}
// Example 5: Working with tristimulus specifications
void CreateColorSpecification(icmm::IIlluminant* illuminant)
{
// Illuminants are used in tristimulus specifications
// to define the viewing conditions for color spaces
// Create RGB specification with illuminant
// icmm::CTristimulusSpecification spec;
// spec.SetIlluminant(std::shared_ptr<IIlluminant>(illuminant));
// This specification can then be used with RGB color models
// to ensure accurate, device-independent color
}
// Example 7: Illuminant selection helper
icmm::StandardIlluminant SelectIlluminant(const QString& purpose)
{
if (purpose == "display" || purpose == "web") {
return icmm::StandardIlluminant::SI_D65;
} else if (purpose == "print") {
return icmm::StandardIlluminant::SI_D50;
} else if (purpose == "photography") {
return icmm::StandardIlluminant::SI_D65; // or D50 for some workflows
} else if (purpose == "tungsten") {
return icmm::StandardIlluminant::SI_A;
}
return icmm::StandardIlluminant::SI_D65; // Default
}
virtual void SetIlluminantType(const StandardIlluminant &illuminantType) override
Sets the standard illuminant type.
virtual StandardIlluminant GetIlluminantType() const override
Gets the standard illuminant type.
virtual void SetWhitePoint(const icmm::CVarColor &whitePoint) override
Sets the white point for this illuminant.
virtual void SetIlluminantName(const QString &illuminantName) override
Sets the human-readable name for this illuminant.
Generic color implementation with variable number of color components.
Definition CVarColor.h:176
Interface for illuminant objects with configurable properties.
virtual StandardIlluminant GetIlluminantType() const =0
Gets the standard illuminant type.
virtual QString GetIlluminantName() const =0
Gets the human-readable name of this illuminant.
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
StandardIlluminant
Definition icmm.h:49

Applications

Best Practices

Note
White point Y component is typically normalized to 1.0
See also
icmm::IWhitePointProvider, icmm::ITristimulusSpecification, icmm::CIlluminant, icmm::StandardIlluminant

Definition at line 178 of file IIlluminant.h.

Member Function Documentation

◆ GetIlluminantName()

virtual QString icmm::IIlluminant::GetIlluminantName ( ) const
pure virtual

Gets the human-readable name of this illuminant.

Returns
QString containing illuminant name (e.g., "D65", "D50", "A")
See also
SetIlluminantName()

Implemented in icmm::CIlluminant.

◆ GetIlluminantType()

virtual StandardIlluminant icmm::IIlluminant::GetIlluminantType ( ) const
pure virtual

Gets the standard illuminant type.

Returns
StandardIlluminant enum value (SI_D65, SI_D50, SI_A, etc.)
See also
SetIlluminantType(), StandardIlluminant

Implemented in icmm::CIlluminant.

◆ SetIlluminantName()

virtual void icmm::IIlluminant::SetIlluminantName ( const QString &  illuminantName)
pure virtual

Sets the human-readable name for this illuminant.

Parameters
illuminantNameQString with illuminant name
See also
GetIlluminantName()

Implemented in icmm::CIlluminant.

◆ SetIlluminantType()

virtual void icmm::IIlluminant::SetIlluminantType ( const StandardIlluminant illuminantType)
pure virtual

Sets the standard illuminant type.

Parameters
illuminantTypeStandardIlluminant enum value
See also
GetIlluminantType(), StandardIlluminant

Implemented in icmm::CIlluminant.

◆ SetWhitePoint()

virtual void icmm::IIlluminant::SetWhitePoint ( const icmm::CVarColor whitePoint)
pure virtual

Sets the white point for this illuminant.

The white point is typically expressed as XYZ tristimulus values with Y component normalized to 1.0.

Parameters
whitePointCVarColor containing XYZ coordinates of white point
See also
GetWhitePoint(), IWhitePointProvider

Implemented in icmm::CIlluminant.


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