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

Class: CIccTagSpectralDataInfo. More...

#include <IccTagBasic.h>

+ Inheritance diagram for CIccTagSpectralDataInfo:
+ Collaboration diagram for CIccTagSpectralDataInfo:

Public Member Functions

 CIccTagSpectralDataInfo ()
 Name: CIccTagSpectralDataInfo::CIccTagSpectralDataInfo.
 
 CIccTagSpectralDataInfo (const CIccTagSpectralDataInfo &ITRCS)
 Name: CIccTagSpectralDataInfo::CIccTagSpectralDataInfo.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccTagSpectralDataInfo::Describe.
 
virtual const icCharGetClassName () const
 
virtual icTagTypeSignature GetType () const
 Function: GetType()
 
virtual CIccTagNewCopy () const
 Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.
 
CIccTagSpectralDataInfooperator= (const CIccTagSpectralDataInfo &RespCurveSet16Tag)
 Name: CIccTagSpectralDataInfo::operator=.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Name: CIccTagSpectralDataInfo::Read.
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 Name: CIccTagSpectralDataInfo::Validate.
 
virtual bool Write (CIccIO *pIO)
 Name: CIccTagSpectralDataInfo::Write.
 
virtual ~CIccTagSpectralDataInfo ()
 Name: CIccTagSpectralDataInfo::~CIccTagSpectralDataInfo.
 
- 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.
 

Public Attributes

icSpectralRange m_biSpectralRange
 
icSignature m_nSig
 
icSpectralRange m_spectralRange
 
- Public Attributes inherited from CIccTag
icUInt32Number m_nReserved
 

Additional Inherited Members

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

Detailed Description

Class: CIccTagSpectralDataInfo.

Purpose: The responseCurveSet16 Tag type

Definition at line 1658 of file IccTagBasic.h.

Constructor & Destructor Documentation

◆ CIccTagSpectralDataInfo() [1/2]

CIccTagSpectralDataInfo::CIccTagSpectralDataInfo ( )

Name: CIccTagSpectralDataInfo::CIccTagSpectralDataInfo.

Purpose: Constructor

Definition at line 10513 of file IccTagBasic.cpp.

10514{
10515 m_nSig = 0;
10516 memset(&m_spectralRange, 0, sizeof(m_spectralRange));
10517 memset(&m_biSpectralRange, 0, sizeof(m_biSpectralRange));
10518}
icSpectralRange m_biSpectralRange
icSpectralRange m_spectralRange

◆ CIccTagSpectralDataInfo() [2/2]

CIccTagSpectralDataInfo::CIccTagSpectralDataInfo ( const CIccTagSpectralDataInfo & ITS)

Name: CIccTagSpectralDataInfo::CIccTagSpectralDataInfo.

Purpose: Copy Constructor

Args: ITS = The CIccTagSpectralDataInfo object to be copied

Definition at line 10532 of file IccTagBasic.cpp.

10533{
10534 m_nSig = ITS.m_nSig;
10537}

References m_biSpectralRange, m_nSig, and m_spectralRange.

◆ ~CIccTagSpectralDataInfo()

CIccTagSpectralDataInfo::~CIccTagSpectralDataInfo ( )
virtual

Name: CIccTagSpectralDataInfo::~CIccTagSpectralDataInfo.

Purpose: Destructor

Definition at line 10572 of file IccTagBasic.cpp.

10573{
10574}

Member Function Documentation

◆ Describe()

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

Name: CIccTagSpectralDataInfo::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 10694 of file IccTagBasic.cpp.

10695{
10696 char buf[256];
10697
10698 sDescription += "ColorSignature: ";
10699 sDescription += icGetColorSigStr(buf, m_nSig);
10700 sDescription += "\n";
10701
10702 sprintf(buf, "SpectralRange: start %fnm end %fnm with %d steps\n", icF16toF(m_spectralRange.start), icF16toF(m_spectralRange.end), m_spectralRange.steps);
10703 sDescription += buf;
10705 sprintf(buf, "BiSpectralRange: start %fnm end %fnm with %d steps\n", icF16toF(m_spectralRange.start), icF16toF(m_spectralRange.end), m_spectralRange.steps);
10706 sDescription += buf;
10707 }
10708}
const icChar * icGetColorSigStr(icChar *pBuf, icUInt32Number nSig)
Definition IccUtil.cpp:1139
icFloatNumber icF16toF(icFloat16Number num)
Definition IccUtil.cpp:629
icUInt16Number steps
icFloat16Number start
icFloat16Number end

References icF16toF(), and icGetColorSigStr().

+ Here is the call graph for this function:

◆ GetClassName()

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

Reimplemented from CIccTag.

Reimplemented in CIccTagXmlSpectralDataInfo.

Definition at line 1668 of file IccTagBasic.h.

1668{ return "CIccTagSpectralDataInfo"; }

◆ GetType()

virtual icTagTypeSignature CIccTagSpectralDataInfo::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 1667 of file IccTagBasic.h.

1667{ return icSigSpectralDataInfoType ; }
@ icSigSpectralDataInfoType

References icSigSpectralDataInfoType.

◆ NewCopy()

virtual CIccTag * CIccTagSpectralDataInfo::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 1664 of file IccTagBasic.h.

1664{return new CIccTagSpectralDataInfo(*this);}
CIccTagSpectralDataInfo()
Name: CIccTagSpectralDataInfo::CIccTagSpectralDataInfo.

◆ operator=()

CIccTagSpectralDataInfo & CIccTagSpectralDataInfo::operator= ( const CIccTagSpectralDataInfo & ITS)

Name: CIccTagSpectralDataInfo::operator=.

Purpose: Copy Operator

Args: SignatureTag = The CIccTagSignature object to be copied

Definition at line 10551 of file IccTagBasic.cpp.

10552{
10553 if (&ITS == this)
10554 return *this;
10555
10556 m_nSig = ITS.m_nSig;
10559
10560 return *this;
10561}

References m_biSpectralRange, m_nSig, and m_spectralRange.

◆ Read()

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

Name: CIccTagSpectralDataInfo::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 10590 of file IccTagBasic.cpp.

10591{
10593
10594 if (sizeof(icTagTypeSignature) + 2*sizeof(icUInt32Number) + 6*sizeof(icUInt16Number) > size)
10595 return false;
10596
10597 if (!pIO) {
10598 m_nSig = 0;
10599 memset(&m_spectralRange, 0, sizeof(m_spectralRange));
10600 memset(&m_biSpectralRange, 0, sizeof(m_biSpectralRange));
10601 return false;
10602 }
10603
10604 if (!pIO->Read32(&sig))
10605 return false;
10606
10607 if (!pIO->Read32(&m_nReserved))
10608 return false;
10609
10610 if (!pIO->Read32(&m_nSig))
10611 return false;
10612
10613 if (!pIO->Read16(&m_spectralRange.start))
10614 return false;
10615
10616 if (!pIO->Read16(&m_spectralRange.end))
10617 return false;
10618
10619 if (!pIO->Read16(&m_spectralRange.steps))
10620 return false;
10621
10622 if (!pIO->Read16(&m_biSpectralRange.start))
10623 return false;
10624
10625 if (!pIO->Read16(&m_biSpectralRange.end))
10626 return false;
10627
10628 if (!pIO->Read16(&m_biSpectralRange.steps))
10629 return false;
10630
10631 return true;
10632}
icArraySignature sig
icTagTypeSignature
unsigned int icUInt32Number
icInt32Number Read16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:114
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143
icUInt32Number m_nReserved
unsigned short icUInt16Number

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

+ Here is the call graph for this function:

◆ Validate()

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

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

Definition at line 10725 of file IccTagBasic.cpp.

10726{
10727 icValidateStatus rv = CIccTag::Validate(sigPath, sReport, pProfile);
10728
10729 CIccInfo Info;
10730 std::string sSigPathName = Info.GetSigPathName(sigPath);
10732
10733 if (sig==icSigSpectralDataInfoTag && pProfile->m_Header.spectralPCS) {
10734 const icHeader *pHdr = &pProfile->m_Header;
10735
10736 if (m_nSig != pHdr->spectralPCS ||
10737 memcmp(&m_spectralRange, &pHdr->spectralRange, sizeof(m_spectralRange)) ||
10738 memcmp(&m_biSpectralRange, &pHdr->biSpectralRange, sizeof(m_biSpectralRange))) {
10739 sReport += icMsgValidateCriticalError;
10740 sReport += sSigPathName;
10741 sReport += " - SpectralDataInfo should be the same as the profile spectralPCS.\n";
10743 }
10744 }
10745 rv = icMaxStatus(rv, Info.CheckData(sReport, m_spectralRange, "Spectral Range"));
10747 rv = icMaxStatus(rv, Info.CheckData(sReport, m_biSpectralRange, "Bispectral Range"));
10748 return rv;
10749}
icValidateStatus
Definition IccDefs.h:118
@ icValidateCriticalError
Definition IccDefs.h:122
icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Name: icMaxStatus.
Definition IccUtil.cpp:244
const char * icMsgValidateCriticalError
Definition IccUtil.cpp:92
icSignature icGetFirstSigPathSig(std::string sigPath)
Definition IccUtil.cpp:1201
Type: Class.
Definition IccUtil.h:303
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
Function: Validate Each derived tag will implement it's own IsValid() function.
icUInt32Number icSignature
@ icSigSpectralDataInfoTag
The Profile header.
icSpectralRange spectralRange
icSpectralColorSignature spectralPCS
icSpectralRange biSpectralRange

References icHeader::biSpectralRange, CIccInfo::CheckData(), CIccInfo::GetSigPathName(), icGetFirstSigPathSig(), icMaxStatus(), icMsgValidateCriticalError, icSigSpectralDataInfoTag, icValidateCriticalError, sig, icHeader::spectralPCS, icHeader::spectralRange, and CIccTag::Validate().

+ Here is the call graph for this function:

◆ Write()

bool CIccTagSpectralDataInfo::Write ( CIccIO * pIO)
virtual

Name: CIccTagSpectralDataInfo::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 10647 of file IccTagBasic.cpp.

10648{
10650
10651 if (!pIO)
10652 return false;
10653
10654 if (!pIO->Write32(&sig))
10655 return false;
10656
10657 if (!pIO->Write32(&m_nReserved))
10658 return false;
10659
10660 if (!pIO->Write32(&m_nSig))
10661 return false;
10662
10663 if (!pIO->Write16(&m_spectralRange.start))
10664 return false;
10665
10666 if (!pIO->Write16(&m_spectralRange.end))
10667 return false;
10668
10669 if (!pIO->Write16(&m_spectralRange.steps))
10670 return false;
10671
10672 if (!pIO->Write16(&m_biSpectralRange.start))
10673 return false;
10674
10675 if (!pIO->Write16(&m_biSpectralRange.end))
10676 return false;
10677
10678 if (!pIO->Write16(&m_biSpectralRange.steps))
10679 return false;
10680 return true;
10681}
icInt32Number Write16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:122
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152
virtual icTagTypeSignature GetType() const
Function: GetType()

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

+ Here is the call graph for this function:

Member Data Documentation

◆ m_biSpectralRange

icSpectralRange CIccTagSpectralDataInfo::m_biSpectralRange

Definition at line 1678 of file IccTagBasic.h.

Referenced by CIccTagSpectralDataInfo(), and operator=().

◆ m_nSig

icSignature CIccTagSpectralDataInfo::m_nSig

Definition at line 1676 of file IccTagBasic.h.

Referenced by CIccTagSpectralDataInfo(), and operator=().

◆ m_spectralRange

icSpectralRange CIccTagSpectralDataInfo::m_spectralRange

Definition at line 1677 of file IccTagBasic.h.

Referenced by CIccTagSpectralDataInfo(), and operator=().


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