Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
CIccTagCicp Class Reference

Class: CIccTagCicp. More...

#include <IccTagBasic.h>

+ Inheritance diagram for CIccTagCicp:
+ Collaboration diagram for CIccTagCicp:

Public Member Functions

 CIccTagCicp ()
 Name: CIccTagCicp::CIccTagCicp.
 
 CIccTagCicp (const CIccTagCicp &ITCICP)
 Name: CIccTagCicp::CIccTagCicp.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccTagCicp::Describe.
 
virtual const icCharGetClassName () const
 
void GetFields (icUInt8Number &colorPrimaries, icUInt8Number &transferCharacteristics, icUInt8Number &matrixCoefficients, icUInt8Number &videoFullRangeFlag)
 Name: CIccTagCicp::GetFields.
 
virtual icTagTypeSignature GetType () const
 Function: GetType()
 
virtual CIccTagNewCopy () const
 Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.
 
CIccTagCicpoperator= (const CIccTagCicp &XYZTag)
 Name: CIccTagCicp::operator=.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Name: CIccTagCicp::Read.
 
void SetFields (icUInt8Number colorPrimaries, icUInt8Number transferCharacteristics, icUInt8Number matrixCoefficients, icUInt8Number videoFullRangeFlag)
 Name: CIccTagCicp::SetFields.
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 Name: CIccTagCicp::Validate.
 
virtual bool Write (CIccIO *pIO)
 Name: CIccTagCicp::Write.
 
virtual ~CIccTagCicp ()
 Name: CIccTagCicp::~CIccTagCicp.
 
- Public Member Functions inherited from CIccTag
 CIccTag ()
 Name: CIccTag::CIccTag.
 
virtual void DetachIO ()
 Function: ReadAll() - Read All sub data for tag from file.
 
virtual IIccExtensionTagGetExtension ()
 
virtual icArraySignature GetTagArrayType () const
 
virtual icStructSignature GetTagStructType () const
 
virtual bool IsArrayType ()
 
virtual bool IsMBBType ()
 
virtual bool IsNumArrayType () const
 
virtual bool IsSupported ()
 Function: IsSupported(size, pIO) - Check if tag fully supported for apply purposes.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO, CIccProfile *pProfile)
 Function: Read(size, pIO) - Read tag from file.
 
virtual bool ReadAll ()
 Function: ReadAll() - Read All sub data for tag from file.
 
virtual ~CIccTag ()
 Name: CIccTag::CIccTag.
 

Protected Attributes

icUInt8Number m_nColorPrimaries
 
icUInt8Number m_nMatrixCoefficients
 
icUInt8Number m_nTransferCharacteristics
 
icUInt8Number m_nVideoFullRangeFlag
 

Additional Inherited Members

- Static Public Member Functions inherited from CIccTag
static CIccTagCreate (icTagTypeSignature sig)
 Name: CIccTag::Create.
 
- Public Attributes inherited from CIccTag
icUInt32Number m_nReserved
 

Detailed Description

Class: CIccTagCicp.

Purpose: the cicpType tag - metadata containing ITU-T H.273 fields

Definition at line 745 of file IccTagBasic.h.

Constructor & Destructor Documentation

◆ CIccTagCicp() [1/2]

CIccTagCicp::CIccTagCicp ( )

Name: CIccTagCicp::CIccTagCicp.

Purpose: Constructor

Args: nSize = number of XYZ entries

Definition at line 4092 of file IccTagBasic.cpp.

4093{
4098}
icUInt8Number m_nVideoFullRangeFlag
icUInt8Number m_nMatrixCoefficients
icUInt8Number m_nColorPrimaries
icUInt8Number m_nTransferCharacteristics

◆ CIccTagCicp() [2/2]

CIccTagCicp::CIccTagCicp ( const CIccTagCicp & ITXYZ)

Name: CIccTagCicp::CIccTagCicp.

Purpose: Copy Constructor

Args: ITCICP = The CIccTagCicp object to be copied

Definition at line 4111 of file IccTagBasic.cpp.

4112{
4113}

◆ ~CIccTagCicp()

CIccTagCicp::~CIccTagCicp ( )
virtual

Name: CIccTagCicp::~CIccTagCicp.

Purpose: Destructor

Definition at line 4149 of file IccTagBasic.cpp.

4150{
4151}

Member Function Documentation

◆ Describe()

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

Name: CIccTagCicp::Describe.

Purpose: Dump data associated with the tag to a string

Args: sDescription - string to concatenate tag dump to

Reimplemented from CIccTag.

Definition at line 4263 of file IccTagBasic.cpp.

4264{
4265 icChar buf[256], code[128];
4267
4268 sprintf(buf, "ColorPrimaries=%u\r\n", m_nColorPrimaries);
4269 sDescription += buf;
4270
4271 sprintf(buf, "TransferCharacteristics=%u\r\n", m_nTransferCharacteristics);
4272 sDescription += buf;
4273
4274 sprintf(buf, "MatrixCoefficients=%u\r\n", m_nMatrixCoefficients);
4275 sDescription += buf;
4276
4277 sprintf(buf, "VideoFullRangeFlag=%u\r\n\r\n", m_nVideoFullRangeFlag);
4278 sDescription += buf;
4279
4280 sprintf(buf, "Combined Code: %s\r\n", code);
4281 sDescription += buf;
4282
4283 int i;
4284 for (i = 0; icExampleCicpCodes[i].code; i++)
4285 if (!strcmp(code, icExampleCicpCodes[i].code))
4286 break;
4287
4288 sDescription += "Interpretation: ";
4289 if (icExampleCicpCodes[i].code) {
4290 sDescription += icExampleCicpCodes[i].interp;
4291 }
4292 else {
4293 sDescription += "unknown";
4294 }
4295 sDescription += "\r\n";
4296}
char icChar
Definition IccDefs.h:109
static struct @4 icExampleCicpCodes[]
const char * code

References code, and icExampleCicpCodes.

◆ GetClassName()

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

Reimplemented from CIccTag.

Reimplemented in CIccTagXmlCicp.

Definition at line 755 of file IccTagBasic.h.

755{ return "CIccTagCicp"; }

◆ GetFields()

void CIccTagCicp::GetFields ( icUInt8Number & colorPrimaries,
icUInt8Number & transferCharacteristics,
icUInt8Number & matrixCoefficients,
icUInt8Number & videoFullRangeFlag )

Name: CIccTagCicp::GetFields.

Purpose: gets the ITU-T H.273 field values

Args: meaning of args as named

Definition at line 4309 of file IccTagBasic.cpp.

4313{
4314 colorPrimaries = m_nColorPrimaries;
4315 transferCharacteristics = m_nTransferCharacteristics;
4316 matrixCoefficients = m_nMatrixCoefficients;
4317 videoFullRangeFlag = m_nVideoFullRangeFlag;
4318}

◆ GetType()

virtual icTagTypeSignature CIccTagCicp::GetType ( ) const
inlinevirtual

Function: GetType()

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

Reimplemented from CIccTag.

Definition at line 754 of file IccTagBasic.h.

754{ return icSigCicpType; }
@ icSigCicpType

References icSigCicpType.

◆ NewCopy()

virtual CIccTag * CIccTagCicp::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.

Definition at line 751 of file IccTagBasic.h.

751{ return new CIccTagCicp(*this); }
CIccTagCicp()
Name: CIccTagCicp::CIccTagCicp.

◆ operator=()

CIccTagCicp & CIccTagCicp::operator= ( const CIccTagCicp & cicpTag)

Name: CIccTagCicp::operator=.

Purpose: Copy Operator

Args: cicpTag = The CIccTagCicp object to be copied

Definition at line 4127 of file IccTagBasic.cpp.

4128{
4129 if (&cicpTag == this)
4130 return *this;
4131
4136
4137 return *this;
4138}

References m_nColorPrimaries, m_nMatrixCoefficients, m_nTransferCharacteristics, and m_nVideoFullRangeFlag.

◆ Read()

bool CIccTagCicp::Read ( icUInt32Number size,
CIccIO * pIO )
virtual

Name: CIccTagCicp::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.

Definition at line 4168 of file IccTagBasic.cpp.

4169{
4171
4172 if (sizeof(icTagTypeSignature) +
4173 sizeof(icUInt32Number) +
4174 sizeof(icUInt8Number)*4 > size)
4175 return false;
4176
4177 if (!pIO) {
4178 return false;
4179 }
4180
4181 if (!pIO->Read32(&sig))
4182 return false;
4183
4184 if (!pIO->Read32(&m_nReserved))
4185 return false;
4186
4187 if (!pIO->Read8(&m_nColorPrimaries) ||
4189 !pIO->Read8(&m_nMatrixCoefficients) ||
4191 return false;
4192
4193 return true;
4194}
icArraySignature sig
icTagTypeSignature
unsigned int icUInt32Number
virtual icInt32Number Read8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:104
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143
icUInt32Number m_nReserved
unsigned char icUInt8Number
Number definitions.

References CIccIO::Read32(), CIccIO::Read8(), and sig.

+ Here is the call graph for this function:

◆ SetFields()

void CIccTagCicp::SetFields ( icUInt8Number colorPrimaries,
icUInt8Number transferCharacteristics,
icUInt8Number matrixCoefficients,
icUInt8Number videoFullRangeFlag )

Name: CIccTagCicp::SetFields.

Purpose: Sets the ITU-T H.273 field values

Args: meaning of args as named

Definition at line 4331 of file IccTagBasic.cpp.

4335{
4336 m_nColorPrimaries = colorPrimaries;
4337 m_nTransferCharacteristics = transferCharacteristics;
4338 m_nMatrixCoefficients =matrixCoefficients;
4339 m_nVideoFullRangeFlag = videoFullRangeFlag;
4340}

◆ Validate()

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

Name: CIccTagCicp::Validate.

Purpose: Check tag data validity.

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

Return: icValidateStatusOK if valid, or other error status.

Reimplemented from CIccTag.

Definition at line 4358 of file IccTagBasic.cpp.

4359{
4360 icValidateStatus rv = CIccTag::Validate(sigPath, sReport, pProfile);
4361
4362 CIccInfo Info;
4363 std::string sSigPathName = Info.GetSigPathName(sigPath);
4364
4365 if (!pProfile)
4366 return rv;
4367
4368 if ((pProfile->m_Header.colorSpace == icSigRgbData || pProfile->m_Header.colorSpace == icSigXYZData) && m_nMatrixCoefficients) {
4369 sReport += icMsgValidateNonCompliant;
4370 sReport += sSigPathName;
4371 sReport += " - CICP MatrixCoefficients not zero for RGB or XYZ colour space data.\r\n";
4373 }
4374
4375 if (pProfile->m_Header.colorSpace == icSigYCbCrData && !m_nMatrixCoefficients) {
4376 sReport += icMsgValidateNonCompliant;
4377 sReport += sSigPathName;
4378 sReport += " - CICP MatrixCoefficients zero for YCbCr colour space data.\r\n";
4380 }
4381
4382 return rv;
4383}
icValidateStatus
Definition IccDefs.h:118
@ icValidateNonCompliant
Definition IccDefs.h:121
icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Name: icMaxStatus.
Definition IccUtil.cpp:244
const char * icMsgValidateNonCompliant
Definition IccUtil.cpp:91
Type: Class.
Definition IccUtil.h:303
std::string GetSigPathName(std::string sigPath)
Definition IccUtil.cpp:1614
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
Function: Validate Each derived tag will implement it's own IsValid() function.
@ icSigXYZData
@ icSigRgbData
@ icSigYCbCrData

References CIccInfo::GetSigPathName(), icMaxStatus(), icMsgValidateNonCompliant, icSigRgbData, icSigXYZData, icSigYCbCrData, icValidateNonCompliant, and CIccTag::Validate().

+ Here is the call graph for this function:

◆ Write()

bool CIccTagCicp::Write ( CIccIO * pIO)
virtual

Name: CIccTagCicp::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.

Definition at line 4210 of file IccTagBasic.cpp.

4211{
4213
4214 if (!pIO)
4215 return false;
4216
4217 if (!pIO->Write32(&sig))
4218 return false;
4219
4220 if (!pIO->Write32(&m_nReserved))
4221 return false;
4222
4223 if (!pIO->Write8(&m_nColorPrimaries) ||
4225 !pIO->Write8(&m_nMatrixCoefficients) ||
4227 return false;
4228
4229 return true;
4230}
virtual icInt32Number Write8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:105
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152
virtual icTagTypeSignature GetType() const
Function: GetType()

References sig, CIccIO::Write32(), and CIccIO::Write8().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_nColorPrimaries

icUInt8Number CIccTagCicp::m_nColorPrimaries
protected

Definition at line 775 of file IccTagBasic.h.

Referenced by operator=().

◆ m_nMatrixCoefficients

icUInt8Number CIccTagCicp::m_nMatrixCoefficients
protected

Definition at line 777 of file IccTagBasic.h.

Referenced by operator=().

◆ m_nTransferCharacteristics

icUInt8Number CIccTagCicp::m_nTransferCharacteristics
protected

Definition at line 776 of file IccTagBasic.h.

Referenced by operator=().

◆ m_nVideoFullRangeFlag

icUInt8Number CIccTagCicp::m_nVideoFullRangeFlag
protected

Definition at line 778 of file IccTagBasic.h.

Referenced by operator=().


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