IccMAX 2.1.27
Color Profile Tools
Loading...
Searching...
No Matches
CIccTagViewingConditions Class Reference

#include <IccTagBasic.h>

+ Inheritance diagram for CIccTagViewingConditions:
+ Collaboration diagram for CIccTagViewingConditions:

Public Member Functions

 CIccTagViewingConditions ()
 
 CIccTagViewingConditions (const CIccTagViewingConditions &ITVC)
 
virtual ~CIccTagViewingConditions ()
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 
virtual void DetachIO ()
 
virtual const icCharGetClassName () const
 
virtual IIccExtensionTagGetExtension ()
 
virtual icArraySignature GetTagArrayType () const
 
virtual icStructSignature GetTagStructType () const
 
virtual icTagTypeSignature GetType () const
 
virtual bool IsArrayType ()
 
virtual bool IsMBBType ()
 
virtual bool IsNumArrayType () const
 
virtual bool IsSupported ()
 
virtual CIccTagNewCopy () const
 
CIccTagViewingConditionsoperator= (const CIccTagViewingConditions &ViewCondTag)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO, CIccProfile *pProfile)
 
virtual bool ReadAll ()
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 
virtual bool Write (CIccIO *pIO)
 

Static Public Member Functions

static CIccTagCreate (icTagTypeSignature sig)
 

Data Fields

icIlluminant m_illumType
 
icUInt32Number m_nReserved
 
icXYZNumber m_XYZIllum
 
icXYZNumber m_XYZSurround
 

Detailed Description

Class: CIccTagViewingConditions

Purpose: Viewing conditions tag type

Constructor & Destructor Documentation

◆ CIccTagViewingConditions() [1/2]

CIccTagViewingConditions::CIccTagViewingConditions ( )

Name: CIccTagViewingConditions::CIccTagViewingConditions

Purpose: Constructor

8948{
8949 m_XYZIllum.X = 0;
8950 m_XYZIllum.Y = 0;
8951 m_XYZIllum.Z = 0;
8952
8953 m_XYZSurround.X = 0;
8954 m_XYZSurround.Y = 0;
8955 m_XYZSurround.Z = 0;
8956
8958}
@ icIlluminantUnknown
Definition icProfileHeader.h:1191
icS15Fixed16Number Y
Definition icProfileHeader.h:1430
icS15Fixed16Number Z
Definition icProfileHeader.h:1431
icS15Fixed16Number X
Definition icProfileHeader.h:1429
icXYZNumber m_XYZSurround
Definition IccTagBasic.h:1444
icIlluminant m_illumType
Definition IccTagBasic.h:1445
icXYZNumber m_XYZIllum
Definition IccTagBasic.h:1443

References icIlluminantUnknown, m_illumType, m_XYZIllum, m_XYZSurround, icXYZNumber::X, icXYZNumber::Y, and icXYZNumber::Z.

◆ CIccTagViewingConditions() [2/2]

CIccTagViewingConditions::CIccTagViewingConditions ( const CIccTagViewingConditions ITVC)

Name: CIccTagViewingConditions::CIccTagViewingConditions

Purpose: Copy Constructor

Args: ITVC = The CIccTagViewingConditions object to be copied

8972{
8973 m_illumType = ITVC.m_illumType;
8974
8975 memcpy(&m_XYZIllum, &ITVC.m_XYZIllum, sizeof(icXYZNumber));
8976 memcpy(&m_XYZSurround, &ITVC.m_XYZSurround, sizeof(icXYZNumber));
8977}
Definition icProfileHeader.h:1428

References m_illumType, m_XYZIllum, and m_XYZSurround.

Referenced by NewCopy().

+ Here is the caller graph for this function:

◆ ~CIccTagViewingConditions()

CIccTagViewingConditions::~CIccTagViewingConditions ( )
virtual

Name: CIccTagViewingConditions::~CIccTagViewingConditions

Purpose: Destructor

9013{
9014}

Member Function Documentation

◆ Create()

CIccTag * CIccTag::Create ( icTagTypeSignature  sig)
staticinherited

Name: CIccTag::Create

Purpose: This is a static tag creator based upon tag signature type

Args: sig = tag type signature

Return: Pointer to Allocated tag

144{
145 return CIccTagCreator::CreateTag(sig);
146}
static CIccTag * CreateTag(icTagTypeSignature tagTypeSig)
Definition IccTagFactory.h:279

References CIccTagCreator::CreateTag().

Referenced by CIccDefaultEncProfileConverter::ConvertFromParams(), CIccTagStruct::LoadElem(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlArray::ParseXml(), CIccMpeTintArray::Read(), CIccTagLutAtoB::Read(), CIccTagLut8::Read(), CIccTagLut16::Read(), CIccTagLut8::SetColorSpaces(), CIccTagLut16::SetColorSpaces(), and CIccProfileDescText::SetType().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Describe()

void CIccTagViewingConditions::Describe ( std::string &  sDescription,
int  nVerboseness 
)
virtual

Name: CIccTagViewingConditions::Describe

Purpose: Dump data associated with the tag to a string

Args: sDescription - string to concatenate tag dump to

Reimplemented from CIccTag.

9113{
9114 icChar buf[128];
9115 CIccInfo Fmt;
9116
9117 sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
9121 sDescription += buf;
9122
9123 sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
9127 sDescription += buf;
9128
9129 sDescription += "Illuminant Type: ";
9130
9131 sDescription += Fmt.GetIlluminantName(m_illumType);
9132 sDescription += "\n";
9133
9134}
char icChar
Definition IccDefs.h:110
ICCPROFLIB_API icFloatNumber icFtoD(icS15Fixed16Number num)
Definition IccUtil.cpp:559
Definition IccUtil.h:303
const icChar * GetIlluminantName(icIlluminant val)
Definition IccUtil.cpp:2169

References CIccInfo::GetIlluminantName(), icFtoD(), m_illumType, m_XYZIllum, m_XYZSurround, icXYZNumber::X, icXYZNumber::Y, and icXYZNumber::Z.

+ Here is the call graph for this function:

◆ DetachIO()

virtual void CIccTag::DetachIO ( )
inlinevirtualinherited

Function: ReadAll() - Read All sub data for tag from file. Called by CIccProfile::ReadAll() to read all sub data for tag

Returns true if ReadAll is successful.

183{}

◆ GetClassName()

virtual const icChar * CIccTagViewingConditions::GetClassName ( ) const
inlinevirtual

Reimplemented from CIccTag.

Reimplemented in CIccTagXmlViewingConditions.

1435{ return "CIccTagViewingConditions"; }

◆ GetExtension()

virtual IIccExtensionTag * CIccTag::GetExtension ( )
inlinevirtualinherited

Reimplemented in CIccTagXmlUnknown, CIccTagXmlText, CIccTagXmlUtf8Text, CIccTagXmlZipUtf8Text, CIccTagXmlZipXml, CIccTagXmlUtf16Text, CIccTagXmlTextDescription, CIccTagXmlSignature, CIccTagXmlNamedColor2, CIccTagXmlXYZ, CIccTagXmlChromaticity, CIccTagXmlCicp, CIccTagXmlSparseMatrixArray, CIccTagXmlFixedNum< T, Tsig >, CIccTagXmlNum< T, A, Tsig >, CIccTagXmlFloatNum< T, A, Tsig >, CIccTagXmlMeasurement, CIccTagXmlMultiLocalizedUnicode, CIccTagXmlTagData, CIccTagXmlDateTime, CIccTagXmlColorantOrder, CIccTagXmlColorantTable, CIccTagXmlViewingConditions, CIccTagXmlSpectralDataInfo, CIccTagXmlSpectralViewingConditions, CIccTagXmlProfileSeqDesc, CIccTagXmlResponseCurveSet16, CIccTagXmlCurve, CIccTagXmlParametricCurve, CIccTagXmlSegmentedCurve, CIccTagXmlLutAtoB, CIccTagXmlLutBtoA, CIccTagXmlLut8, CIccTagXmlLut16, CIccTagXmlMultiProcessElement, CIccTagXmlProfileSequenceId, CIccTagXmlDict, CIccTagXmlStruct, CIccTagXmlArray, CIccTagXmlGamutBoundaryDesc, CIccTagXmlEmbeddedHeightImage, CIccTagXmlEmbeddedNormalImage, and CIccTagXmlEmbeddedProfile.

143{return NULL;}

Referenced by icCurvesFromXml(), icCurvesToXml(), icProfDescToXml(), icXmlParseProfDesc(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlArray::ParseXml(), CIccMpeXmlTintArray::ToXml(), CIccTagXmlStruct::ToXml(), CIccTagXmlArray::ToXml(), and CIccProfileXml::ToXmlWithBlanks().

+ Here is the caller graph for this function:

◆ GetTagArrayType()

virtual icArraySignature CIccTag::GetTagArrayType ( ) const
inlinevirtualinherited

Reimplemented in CIccTagArray.

133{ return icSigUndefinedArray; }
@ icSigUndefinedArray
Definition icProfileHeader.h:617

References icSigUndefinedArray.

Referenced by icGetTagArrayHandlerOfType(), and CIccProfileXml::ParseTag().

+ Here is the caller graph for this function:

◆ GetTagStructType()

virtual icStructSignature CIccTag::GetTagStructType ( ) const
inlinevirtualinherited

Reimplemented in CIccTagStruct.

132{ return icSigUndefinedStruct; }
@ icSigUndefinedStruct
Definition icProfileHeader.h:606

References icSigUndefinedStruct.

Referenced by icGetTagStructHandlerOfType(), CIccArrayColorantInfo::Validate(), and CIccArrayNamedColor::Validate().

+ Here is the caller graph for this function:

◆ GetType()

virtual icTagTypeSignature CIccTagViewingConditions::GetType ( ) const
inlinevirtual

Function: GetType()

Purpose: Get Tag Type. Each derived tag will implement it's own GetType() function.

Reimplemented from CIccTag.

@ icSigViewingConditionsType
Definition icProfileHeader.h:573

References icSigViewingConditionsType.

Referenced by Write().

+ Here is the caller graph for this function:

◆ IsArrayType()

virtual bool CIccTag::IsArrayType ( )
inlinevirtualinherited

Reimplemented in CIccTagXYZ, CIccTagChromaticity, CIccTagSparseMatrixArray, CIccTagFixedNum< T, Tsig >, CIccTagNum< T, Tsig >, CIccTagFloatNum< T, Tsig >, and CIccTagData.

135{ return false; }

Referenced by MyTagDialog::MyTagDialog(), and DumpTag().

+ Here is the caller graph for this function:

◆ IsMBBType()

virtual bool CIccTag::IsMBBType ( )
inlinevirtualinherited

Reimplemented in CIccMBB.

136{ return false; } //If true then CIccTag can be cast as an CIccMBB

Referenced by CIccProfileXml::ParseTag().

+ Here is the caller graph for this function:

◆ IsNumArrayType()

virtual bool CIccTag::IsNumArrayType ( ) const
inlinevirtualinherited

Reimplemented in CIccTagSparseMatrixArray, CIccTagFixedNum< T, Tsig >, CIccTagNum< T, Tsig >, and CIccTagFloatNum< T, Tsig >.

137{ return false;} //If true then CIccTag can be cast as a CIccTagNumArray

Referenced by CIccArrayNamedColor::FindDeviceColor(), CIccArrayNamedColor::FindPcsColor(), CIccArrayNamedColor::FindSpectralColor(), CIccTagStruct::GetElemNumberValue(), CIccStructNamedColor::GetNumArray(), CIccMpeXmlTintArray::ParseXml(), and CIccMpeTintArray::Read().

+ Here is the caller graph for this function:

◆ IsSupported()

virtual bool CIccTag::IsSupported ( )
inlinevirtualinherited

Function: IsSupported(size, pIO) - Check if tag fully supported for apply purposes. By Default inherited classes are supported. Unknown tag types are not supported.

Returns true if tag type is supported.

Reimplemented in CIccTagUnknown, CIccTagEmbeddedProfile, and CIccTagMultiProcessElement.

153{ return true; }

◆ NewCopy()

virtual CIccTag * CIccTagViewingConditions::NewCopy ( ) const
inlinevirtual

Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.

Parameter(s): none

Returns a new CIccTag object that is a copy of this object.

Reimplemented from CIccTag.

1431{return new CIccTagViewingConditions(*this);}
CIccTagViewingConditions()
Definition IccTagBasic.cpp:8947

References CIccTagViewingConditions().

+ Here is the call graph for this function:

◆ operator=()

CIccTagViewingConditions & CIccTagViewingConditions::operator= ( const CIccTagViewingConditions ViewCondTag)

Name: CIccTagViewingConditions::operator=

Purpose: Copy Operator

Args: ViewCondTag = The CIccTagViewingConditions object to be copied

8991{
8992 if (&ViewCondTag == this)
8993 return *this;
8994
8995 m_illumType = ViewCondTag.m_illumType;
8996
8997 memcpy(&m_XYZIllum, &ViewCondTag.m_XYZIllum, sizeof(icXYZNumber));
8998 memcpy(&m_XYZSurround, &ViewCondTag.m_XYZSurround, sizeof(icXYZNumber));
8999
9000 return *this;
9001}

References m_illumType, m_XYZIllum, and m_XYZSurround.

◆ Read() [1/2]

bool CIccTagViewingConditions::Read ( icUInt32Number  size,
CIccIO pIO 
)
virtual

Name: CIccTagViewingConditions::Read

Purpose: Read in the tag contents into a data block

Args: size - # of bytes in tag, pIO - IO object to read tag from

Return: true = successful, false = failure

Reimplemented from CIccTag.

9032{
9034
9035 if (sizeof(icTagTypeSignature) +
9036 2*sizeof(icUInt32Number) +
9037 2*sizeof(icXYZNumber) > size)
9038 return false;
9039
9040 if (!pIO) {
9041 return false;
9042 }
9043
9044 if (!pIO->Read32(&sig))
9045 return false;
9046
9047 if (!pIO->Read32(&m_nReserved))
9048 return false;
9049
9050 if (pIO->Read32(&m_XYZIllum.X, 3) != 3)
9051 return false;
9052
9053 if (pIO->Read32(&m_XYZSurround.X, 3) != 3)
9054 return false;
9055
9056 if (!pIO->Read32(&m_illumType))
9057 return false;
9058
9059 return true;
9060}
unsigned long icUInt32Number
Definition icProfileHeader.h:262
icTagTypeSignature
Definition icProfileHeader.h:526
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143
icUInt32Number m_nReserved
Definition IccTagBasic.h:235

References m_illumType, CIccTag::m_nReserved, m_XYZIllum, m_XYZSurround, CIccIO::Read32(), and icXYZNumber::X.

+ Here is the call graph for this function:

◆ Read() [2/2]

virtual bool CIccTag::Read ( icUInt32Number  size,
CIccIO pIO,
CIccProfile pProfile 
)
inlinevirtualinherited

Function: Read(size, pIO) - Read tag from file. Each derived tag will implement it's own Read() function.

Parameter(s): size - number of bytes in tag including the type signature. pIO - IO object used to read in tag. The IO object should already be initialized to point to the begining of the tag.

Returns true if Read is successful.

Reimplemented in CIccTagEmbeddedProfile.

197{ return Read(size, pIO); }
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Definition IccTagBasic.h:167

References CIccTag::Read().

+ Here is the call graph for this function:

◆ ReadAll()

virtual bool CIccTag::ReadAll ( )
inlinevirtualinherited

Function: ReadAll() - Read All sub data for tag from file. Called by CIccProfile::ReadAll() to read all sub data for tag

Returns true if ReadAll is successful.

Reimplemented in CIccTagEmbeddedProfile.

175{ return true; }

◆ Validate()

icValidateStatus CIccTagViewingConditions::Validate ( std::string  sigPath,
std::string &  sReport,
const CIccProfile pProfile = NULL 
) const
virtual

Name: CIccTagViewingConditions::Validate

Purpose: Check tag data validity.

Args: sig = signature of tag being validated, sReport = String to add report information to

Return: icValidateStatusOK if valid, or other error status.

Reimplemented from CIccTag.

9152{
9153 icValidateStatus rv = CIccTag::Validate(sigPath, sReport, pProfile);
9154
9155 CIccInfo Info;
9156 std::string sSigPathName = Info.GetSigPathName(sigPath);
9157
9158 rv = icMaxStatus(rv, Info.CheckData(sReport, m_XYZIllum, "XYZ Illuminant"));
9159 rv = icMaxStatus(rv, Info.CheckData(sReport, m_XYZSurround, "XYZ Surround"));
9160
9161 return rv;
9162}
icValidateStatus
Definition IccDefs.h:119
ICCPROFLIB_API icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Definition IccUtil.cpp:244
std::string GetSigPathName(std::string sigPath)
Definition IccUtil.cpp:1614
icValidateStatus CheckData(std::string &sReport, const icDateTimeNumber &dateTime, std::string sDesc="")
Definition IccUtil.cpp:2414
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
Definition IccTagBasic.cpp:164

References CIccInfo::CheckData(), CIccInfo::GetSigPathName(), icMaxStatus(), m_XYZIllum, m_XYZSurround, and CIccTag::Validate().

+ Here is the call graph for this function:

◆ Write()

bool CIccTagViewingConditions::Write ( CIccIO pIO)
virtual

Name: CIccTagViewingConditions::Write

Purpose: Write the tag to a file

Args: pIO - The IO object to write tag to.

Return: true = succesful, false = failure

Reimplemented from CIccTag.

9077{
9079
9080 if (!pIO)
9081 return false;
9082
9083 if (!pIO->Write32(&sig))
9084 return false;
9085
9086 if (!pIO->Write32(&m_nReserved))
9087 return false;
9088
9089 if (pIO->Write32(&m_XYZIllum.X, 3) !=3)
9090 return false;
9091
9092 if (pIO->Write32(&m_XYZSurround.X, 3) !=3)
9093 return false;
9094
9095 if (!pIO->Write32(&m_illumType))
9096 return false;
9097
9098 return true;
9099}
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152
virtual icTagTypeSignature GetType() const
Definition IccTagBasic.h:1434

References GetType(), m_illumType, CIccTag::m_nReserved, m_XYZIllum, m_XYZSurround, CIccIO::Write32(), and icXYZNumber::X.

+ Here is the call graph for this function:

Field Documentation

◆ m_illumType

◆ m_nReserved

icUInt32Number CIccTag::m_nReserved
inherited

Referenced by CIccTag::CIccTag(), CIccTagMultiProcessElement::CIccTagMultiProcessElement(), CIccTagMultiProcessElement::CIccTagMultiProcessElement(), CIccTagMultiProcessElement::operator=(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlArray::ParseXml(), CIccTagText::Read(), CIccTagUtf8Text::Read(), CIccTagZipUtf8Text::Read(), CIccTagUtf16Text::Read(), CIccTagTextDescription::Read(), CIccTagSignature::Read(), CIccTagNamedColor2::Read(), CIccTagXYZ::Read(), CIccTagChromaticity::Read(), CIccTagCicp::Read(), CIccTagSparseMatrixArray::Read(), CIccTagFixedNum< T, Tsig >::Read(), CIccTagNum< T, Tsig >::Read(), CIccTagFloatNum< T, Tsig >::Read(), CIccTagMeasurement::Read(), CIccTagMultiLocalizedUnicode::Read(), CIccTagData::Read(), CIccTagDateTime::Read(), CIccTagColorantOrder::Read(), CIccTagColorantTable::Read(), Read(), CIccTagProfileSeqDesc::Read(), CIccTagResponseCurveSet16::Read(), CIccTagSpectralDataInfo::Read(), CIccTagSpectralViewingConditions::Read(), CIccTagEmbeddedHeightImage::Read(), CIccTagEmbeddedNormalImage::Read(), CIccTagStruct::Read(), CIccTagArray::Read(), CIccTagDict::Read(), CIccTagCurve::Read(), CIccTagParametricCurve::Read(), CIccTagLutAtoB::Read(), CIccTagLut8::Read(), CIccTagLut16::Read(), CIccTagGamutBoundaryDesc::Read(), CIccTagMultiProcessElement::Read(), CIccTagProfileSequenceId::Read(), CIccTagEmbeddedProfile::Read(), CIccTag::Validate(), CIccTagText::Write(), CIccTagUtf8Text::Write(), CIccTagZipUtf8Text::Write(), CIccTagUtf16Text::Write(), CIccTagTextDescription::Write(), CIccTagSignature::Write(), CIccTagNamedColor2::Write(), CIccTagXYZ::Write(), CIccTagChromaticity::Write(), CIccTagCicp::Write(), CIccTagSparseMatrixArray::Write(), CIccTagFixedNum< T, Tsig >::Write(), CIccTagNum< T, Tsig >::Write(), CIccTagFloatNum< T, Tsig >::Write(), CIccTagMeasurement::Write(), CIccTagMultiLocalizedUnicode::Write(), CIccTagData::Write(), CIccTagDateTime::Write(), CIccTagColorantOrder::Write(), CIccTagColorantTable::Write(), Write(), CIccTagProfileSeqDesc::Write(), CIccTagResponseCurveSet16::Write(), CIccTagSpectralDataInfo::Write(), CIccTagSpectralViewingConditions::Write(), CIccTagEmbeddedHeightImage::Write(), CIccTagEmbeddedNormalImage::Write(), CIccTagStruct::Write(), CIccTagArray::Write(), CIccTagDict::Write(), CIccTagEmbeddedProfile::Write(), CIccTagCurve::Write(), CIccTagParametricCurve::Write(), CIccTagLutAtoB::Write(), CIccTagLut8::Write(), CIccTagLut16::Write(), CIccTagGamutBoundaryDesc::Write(), CIccTagMultiProcessElement::Write(), and CIccTagProfileSequenceId::Write().

◆ m_XYZIllum

◆ m_XYZSurround


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