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

#include <IccTagLut.h>

+ Inheritance diagram for CIccTagGamutBoundaryDesc:
+ Collaboration diagram for CIccTagGamutBoundaryDesc:

Public Member Functions

 CIccTagGamutBoundaryDesc ()
 
 CIccTagGamutBoundaryDesc (const CIccTagGamutBoundaryDesc &InGamutBoundaryTag)
 
 CIccTagGamutBoundaryDesc (icUInt8Number nInputChannels, icInt32Number numberOfVertices, icInt32Number numberOfTriangles, icUInt8Number nOutputChannels=0)
 
virtual ~CIccTagGamutBoundaryDesc ()
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 
virtual void DetachIO ()
 
virtual const icCharGetClassName () const
 
virtual IIccExtensionTagGetExtension ()
 
icInt32Number getNumberOfTriangles ()
 
icInt32Number getNumberOfVertices ()
 
icInt16Number getNumDeviceChannels ()
 
icInt16Number getNumPCSChannels ()
 
virtual icArraySignature GetTagArrayType () const
 
virtual icStructSignature GetTagStructType () const
 
bool getTriangle (icInt32Number triangleNumber, icGamutBoundaryTriangle &triangle)
 
virtual icTagTypeSignature GetType () const
 
icFloatNumbergetVertexDeviceCoord (icInt32Number vertexNumber)
 
icFloatNumbergetVertexPCSCoord (icInt32Number vertexNumber)
 
virtual bool IsArrayType ()
 
virtual bool IsMBBType ()
 
virtual bool IsNumArrayType () const
 
virtual bool IsSupported ()
 
virtual CIccTagNewCopy () const
 
CIccTagGamutBoundaryDescoperator= (const CIccTagGamutBoundaryDesc &InGamutBoundaryTag)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO, CIccProfile *pProfile)
 
virtual bool ReadAll ()
 
bool setTriangle (icInt32Number triangleNumber, icGamutBoundaryTriangle &triangle)
 
bool setVertex (icInt32Number vertexNumber, icFloatNumber *pcsCoords, icFloatNumber *deviceCoords=NULL)
 
icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile) const
 
virtual bool Write (CIccIO *pIO)
 

Static Public Member Functions

static CIccTagCreate (icTagTypeSignature sig)
 

Data Fields

icUInt32Number m_nReserved
 

Protected Attributes

icFloatNumberm_DeviceValues
 
icInt16Number m_nDeviceChannels
 
icInt16Number m_nPCSChannels
 
icInt32Number m_NumberOfTriangles
 
icInt32Number m_NumberOfVertices
 
icFloatNumberm_PCSValues
 
icGamutBoundaryTrianglem_Triangles
 

Detailed Description

Class: CIccTagGamutBoundaryDesc

Purpose: The Gamut Boundary Description tag type

Constructor & Destructor Documentation

◆ CIccTagGamutBoundaryDesc() [1/3]

CIccTagGamutBoundaryDesc::CIccTagGamutBoundaryDesc ( )

Name: CIccTagGamutBoundaryDescription::CIccTagGamutBoundaryDescription

Purpose: Constructor

5326{
5329 m_nPCSChannels = 0;
5331 m_PCSValues = NULL;
5332 m_DeviceValues = NULL;
5333 m_Triangles = NULL;
5334
5335}
icGamutBoundaryTriangle * m_Triangles
Definition IccTagLut.h:664
icInt32Number m_NumberOfTriangles
Definition IccTagLut.h:659
icInt16Number m_nPCSChannels
Definition IccTagLut.h:660
icFloatNumber * m_DeviceValues
Definition IccTagLut.h:663
icFloatNumber * m_PCSValues
Definition IccTagLut.h:662
icInt16Number m_nDeviceChannels
Definition IccTagLut.h:661
icInt32Number m_NumberOfVertices
Definition IccTagLut.h:658

References m_DeviceValues, m_nDeviceChannels, m_nPCSChannels, m_NumberOfTriangles, m_NumberOfVertices, m_PCSValues, and m_Triangles.

◆ CIccTagGamutBoundaryDesc() [2/3]

CIccTagGamutBoundaryDesc::CIccTagGamutBoundaryDesc ( icUInt8Number  nInputChannels,
icInt32Number  numberOfVertices,
icInt32Number  numberOfTriangles,
icUInt8Number  nOutputChannels = 0 
)

Name: CIccTagGamutBoundaryDescription::CIccTagGamutBoundaryDescription

Purpose: Constructor

Args: nInputChannels = the number of PCS values, typically 3 numberOfVertices = the number of vertices in the gamut boundary numberOfTriangles = the number of triangles that make up the gamut boundary nOutputChannels = the number of device values, can be zero if none are included

5353{
5354
5355 m_NumberOfVertices = numberOfVertices;
5356 m_NumberOfTriangles = numberOfTriangles;
5357 m_nPCSChannels = nInputChannels;
5358 m_nDeviceChannels = nOutputChannels;
5359 m_PCSValues = new icFloatNumber[nInputChannels*m_NumberOfVertices];
5360 if (nOutputChannels > 0)
5361 {
5362 m_DeviceValues = new icFloatNumber[nOutputChannels*m_NumberOfVertices];
5363 }
5364 else
5365 {
5366 m_DeviceValues = NULL;
5367 }
5369
5370
5371}
Definition IccTagLut.h:600
float icFloatNumber
Definition IccDefs.h:101

References m_DeviceValues, m_nDeviceChannels, m_nPCSChannels, m_NumberOfTriangles, m_NumberOfVertices, m_PCSValues, and m_Triangles.

◆ CIccTagGamutBoundaryDesc() [3/3]

CIccTagGamutBoundaryDesc::CIccTagGamutBoundaryDesc ( const CIccTagGamutBoundaryDesc InGamutBoundaryTag)

Name: CIccTagGamutBoundaryDescription::CIccTagGamutBoundaryDescription

Purpose: Constructor

Args: InGamutBoundaryTag = the CIccTagGamutBoundaryDescription object to copy

5385{
5386 m_NumberOfVertices = InGamutBoundaryTag.m_NumberOfVertices;
5387 m_NumberOfTriangles = InGamutBoundaryTag.m_NumberOfTriangles;
5388 m_nPCSChannels = InGamutBoundaryTag.m_nPCSChannels;
5389 m_nDeviceChannels = InGamutBoundaryTag.m_nDeviceChannels;
5390
5392
5393 if (m_nDeviceChannels > 0)
5394 {
5396 }
5397 else
5398 {
5399 m_DeviceValues = NULL;
5400 }
5402
5403 memcpy(m_PCSValues,InGamutBoundaryTag.m_PCSValues,m_nPCSChannels*m_NumberOfVertices*sizeof(icFloatNumber));
5404 if (m_DeviceValues)
5406 memcpy(m_Triangles,InGamutBoundaryTag.m_Triangles,m_NumberOfTriangles*sizeof(icGamutBoundaryTriangle));
5407}

References m_DeviceValues, m_nDeviceChannels, m_nPCSChannels, m_NumberOfTriangles, m_NumberOfVertices, m_PCSValues, and m_Triangles.

Referenced by NewCopy().

+ Here is the caller graph for this function:

◆ ~CIccTagGamutBoundaryDesc()

CIccTagGamutBoundaryDesc::~CIccTagGamutBoundaryDesc ( )
virtual

Name: CIccTagGamutBoundaryDescription::CIccTagGamutBoundaryDescription

Purpose: Destructor

5459{
5460 if (m_PCSValues)
5461 delete [] m_PCSValues;
5462
5463 if (m_DeviceValues)
5464 delete [] m_DeviceValues;
5465
5466 if (m_Triangles)
5467 delete [] m_Triangles;
5468}

References m_DeviceValues, m_PCSValues, and m_Triangles.

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 CIccTagGamutBoundaryDesc::Describe ( std::string &  sDescription,
int  nVerboseness 
)
virtual

Name: CIccTagGamutBoundaryDescription::Describe

Purpose: Dump data associated with gamut boundary tag to a string

Args: sDescription - string to concatenate tag dump to

Reimplemented from CIccTag.

5635{
5636 icChar buf[256];
5637
5638 sprintf(buf,"Number Of Vertices = %d, Number of Triangles = %d\n",m_NumberOfVertices,m_NumberOfTriangles);
5639 sDescription += buf;
5640
5641 sprintf(buf,"Number Of Inputs = %d, Number of Outputs = %d\n",m_nPCSChannels,m_nDeviceChannels);
5642 sDescription += buf;
5643
5644 if (nVerboseness > 75) {
5645 int c = 0;
5646 int d = 0;
5647 for (int i=0; i<m_NumberOfVertices; i++)
5648 {
5649 sprintf(buf,"V = %d:\t",i);
5650 sDescription += buf;
5651 for (int j=0; j<m_nPCSChannels; j++)
5652 {
5653 sprintf(buf,"%.4lf\t",m_PCSValues[c++]);
5654 sDescription += buf;
5655 }
5656 if (m_nDeviceChannels > 0)
5657 {
5658 sprintf(buf,":\t");
5659 sDescription += buf;
5660
5661 for (int j=0; j<m_nDeviceChannels; j++)
5662 {
5663 sprintf(buf,"%.4lf\t",m_DeviceValues[d++]);
5664 sDescription += buf;
5665 }
5666 }
5667 sprintf(buf,"\n");
5668 sDescription += buf;
5669 }
5670
5671 for (int i=0; i<m_NumberOfTriangles; i++)
5672 {
5673 sprintf(buf,"V1 = %u\tV2 = %u\tV3 = %u\n",m_Triangles[i].m_VertexNumbers[0],m_Triangles[i].m_VertexNumbers[1],m_Triangles[i].m_VertexNumbers[2]);
5674 sDescription += buf;
5675 }
5676 }
5677}
char icChar
Definition IccDefs.h:110

References m_DeviceValues, m_nDeviceChannels, m_nPCSChannels, m_NumberOfTriangles, m_NumberOfVertices, m_PCSValues, m_Triangles, and icGamutBoundaryTriangle::m_VertexNumbers.

◆ 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 * CIccTagGamutBoundaryDesc::GetClassName ( ) const
inlinevirtual

Reimplemented from CIccTag.

622{ return "icSigTagGamutBoundaryDesc"; }

◆ 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:

◆ getNumberOfTriangles()

icInt32Number CIccTagGamutBoundaryDesc::getNumberOfTriangles ( )
inline
643 {
644 return m_NumberOfTriangles;
645 }

References m_NumberOfTriangles.

◆ getNumberOfVertices()

icInt32Number CIccTagGamutBoundaryDesc::getNumberOfVertices ( )
inline
638 {
639 return m_NumberOfVertices;
640 }

References m_NumberOfVertices.

◆ getNumDeviceChannels()

icInt16Number CIccTagGamutBoundaryDesc::getNumDeviceChannels ( )
inline
653 {
654 return m_nDeviceChannels;
655 }

References m_nDeviceChannels.

◆ getNumPCSChannels()

icInt16Number CIccTagGamutBoundaryDesc::getNumPCSChannels ( )
inline
648 {
649 return m_nPCSChannels;
650 }

References m_nPCSChannels.

◆ 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:

◆ getTriangle()

bool CIccTagGamutBoundaryDesc::getTriangle ( icInt32Number  triangleNumber,
icGamutBoundaryTriangle triangle 
)

Name: CIccTagGamutBoundaryDescription::getTriangle

Purpose: Dump data associated with gamut boundary tag to a string

Args: triangleNumber = the number of the triangle to set triangle = the triangle to copy from the gamut boundary

Return: true = succesful, false = failure

5792{
5793 if ((triangleNumber < 0) || (triangleNumber >= m_NumberOfTriangles))
5794 return false;
5795
5796 memcpy(&triangle,&m_Triangles[triangleNumber],sizeof(icGamutBoundaryTriangle));
5797 return true;
5798}

References m_NumberOfTriangles, and m_Triangles.

◆ GetType()

virtual icTagTypeSignature CIccTagGamutBoundaryDesc::GetType ( ) const
inlinevirtual

Function: GetType()

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

Reimplemented from CIccTag.

@ icSigGamutBoundaryDescType
Definition icProfileHeader.h:543

References icSigGamutBoundaryDescType.

Referenced by Write().

+ Here is the caller graph for this function:

◆ getVertexDeviceCoord()

icFloatNumber * CIccTagGamutBoundaryDesc::getVertexDeviceCoord ( icInt32Number  vertexNumber)

Name: CIccTagGamutBoundaryDescription::getVertexDeviceCoord

Purpose: Dump data associated with gamut boundaty tag to a string

Args: vertexNumber = the number of the vertex to get

Return: NULL = failure, otherwise a pointer to the device coordinate

5742{
5743 if ((vertexNumber < 0) || (vertexNumber >= m_NumberOfVertices))
5744 return NULL;
5745
5746 if (!m_DeviceValues)
5747 return NULL;
5748
5749 return &m_DeviceValues[vertexNumber*m_nDeviceChannels];
5750}

References m_DeviceValues, m_nDeviceChannels, and m_NumberOfVertices.

◆ getVertexPCSCoord()

icFloatNumber * CIccTagGamutBoundaryDesc::getVertexPCSCoord ( icInt32Number  vertexNumber)

Name: CIccTagGamutBoundaryDescription::getVertexPCSCoord

Purpose: Dump data associated with gamut boundary tag to a string

Args: vertexNumber = the number of the vertex to get

Return: NULL = failure, otherwise a pointer to the PCS coordinate

5721{
5722 if ((vertexNumber < 0) || (vertexNumber >= m_NumberOfVertices))
5723 return NULL;
5724
5725 return &m_PCSValues[vertexNumber*m_nPCSChannels];
5726}

References m_nPCSChannels, m_NumberOfVertices, and m_PCSValues.

◆ 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 * CIccTagGamutBoundaryDesc::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.

618{return new CIccTagGamutBoundaryDesc(*this);}
CIccTagGamutBoundaryDesc()
Definition IccTagLut.cpp:5325

References CIccTagGamutBoundaryDesc().

+ Here is the call graph for this function:

◆ operator=()

CIccTagGamutBoundaryDesc & CIccTagGamutBoundaryDesc::operator= ( const CIccTagGamutBoundaryDesc InGamutBoundaryTag)

Name: CIccTagGamutBoundaryDescription::operator=

Purpose: Constructor

Args: InGamutBoundaryTag = the CIccTagGamutBoundaryDescription object to copy

5421{
5422 if (&InGamutBoundaryTag == this)
5423 return *this;
5424
5425 m_NumberOfVertices = InGamutBoundaryTag.m_NumberOfVertices;
5426 m_NumberOfTriangles = InGamutBoundaryTag.m_NumberOfTriangles;
5427 m_nPCSChannels = InGamutBoundaryTag.m_nPCSChannels;
5428 m_nDeviceChannels = InGamutBoundaryTag.m_nDeviceChannels;
5429
5431
5432 if (m_nDeviceChannels > 0)
5433 {
5435 }
5436 else
5437 {
5438 m_DeviceValues = NULL;
5439 }
5441
5442 memcpy(m_PCSValues,InGamutBoundaryTag.m_PCSValues,m_nPCSChannels*m_NumberOfVertices*sizeof(icFloatNumber));
5443 if (m_DeviceValues)
5445 memcpy(m_Triangles,InGamutBoundaryTag.m_Triangles,m_NumberOfTriangles*sizeof(icGamutBoundaryTriangle));
5446
5447 return *this;
5448}

References m_DeviceValues, m_nDeviceChannels, m_nPCSChannels, m_NumberOfTriangles, m_NumberOfVertices, m_PCSValues, and m_Triangles.

◆ Read() [1/2]

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

Name: CIccTagGamutBoundaryDescription::Read

Purpose: Read in an gamut boundary tag type 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.

5485{
5487
5488 if (sizeof(icTagTypeSignature) +
5489 sizeof(icUInt32Number)*3 +
5490 sizeof(icUInt16Number)*2 > size)
5491 return false;
5492
5493 if (!pIO) {
5494 return false;
5495 }
5496
5497 if (!pIO->Read32(&sig) ||
5498 !pIO->Read32(&m_nReserved))
5499 return false;
5500
5501 if (!pIO->Read16(&m_nPCSChannels) ||
5502 !pIO->Read16(&m_nDeviceChannels))
5503 return false;
5504
5505 if (!pIO->Read32(&m_NumberOfVertices) ||
5507 return false;
5508
5509 if (sizeof(icTagTypeSignature) +
5510 sizeof(icUInt32Number)*3 +
5511 sizeof(icUInt16Number)*2 +
5515 return false;
5516
5517 if (m_PCSValues)
5518 delete [] m_PCSValues;
5519 if (m_DeviceValues)
5520 delete [] m_DeviceValues;
5521 if (m_Triangles)
5522 delete [] m_Triangles;
5523
5525
5526 if (!m_PCSValues)
5527 return false;
5528
5529 if (m_nDeviceChannels > 0)
5530 {
5532
5533 if (!m_DeviceValues)
5534 return false;
5535 }
5536 else
5537 {
5538 m_DeviceValues = NULL;
5539 }
5541
5543
5544 if (pIO->Read32(m_Triangles, nNum32)!=nNum32)
5545 return false;
5546
5548
5549 if (pIO->ReadFloat32Float(m_PCSValues, nNum32)!=nNum32)
5550 return false;
5551
5552 if (m_nDeviceChannels > 0)
5553 {
5555
5556 if (pIO->ReadFloat32Float(m_DeviceValues, nNum32)!=nNum32)
5557 return false;
5558 }
5559
5560 return true;
5561}
float icFloat32Number
Definition icProfileHeader.h:313
unsigned short icUInt16Number
Definition icProfileHeader.h:256
unsigned long icUInt32Number
Definition icProfileHeader.h:262
icTagTypeSignature
Definition icProfileHeader.h:526
icUInt32Number icUInt64Number[2]
Definition icProfileHeader.h:268
icInt32Number ReadFloat32Float(void *pBufFloat, icInt32Number nNum=1)
Definition IccIO.cpp:302
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
Definition IccTagBasic.h:235

References m_DeviceValues, m_nDeviceChannels, m_nPCSChannels, CIccTag::m_nReserved, m_NumberOfTriangles, m_NumberOfVertices, m_PCSValues, m_Triangles, CIccIO::Read16(), CIccIO::Read32(), and CIccIO::ReadFloat32Float().

+ 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; }

◆ setTriangle()

bool CIccTagGamutBoundaryDesc::setTriangle ( icInt32Number  triangleNumber,
icGamutBoundaryTriangle triangle 
)

Name: CIccTagGamutBoundaryDescription::setTriangle

Purpose: Dump data associated with gamut boundary tag to a string

Args: triangleNumber = the number of the triangle to set triangle = the triangle to copy into the gamut boundary

Return: true = succesful, false = failure

5767{
5768 if ((triangleNumber < 0) || (triangleNumber >= m_NumberOfTriangles))
5769 return false;
5770
5771 memcpy(&m_Triangles[triangleNumber],&triangle,sizeof(icGamutBoundaryTriangle));
5772
5773 return true;
5774}

References m_NumberOfTriangles, and m_Triangles.

◆ setVertex()

bool CIccTagGamutBoundaryDesc::setVertex ( icInt32Number  vertexNumber,
icFloatNumber pcsCoords,
icFloatNumber deviceCoords = NULL 
)

Name: CIccTagGamutBoundaryDescription::setVertex

Purpose: Dump data associated with gamut boundary tag to a string

Args: vertexNumber = the number of the vertex to set pcsCoords = the pcs coordinates of the vertex deviceCoords = the device coordinates of the vertex

Return: true = succesful, false = failure

5695{
5696 if ((vertexNumber < 0) || (vertexNumber >= m_NumberOfVertices))
5697 return false;
5698
5699 memcpy(&m_PCSValues[vertexNumber*m_nPCSChannels],pcsCoords,sizeof(icFloatNumber)*m_nPCSChannels);
5700 if ((m_DeviceValues) && (deviceCoords))
5701 memcpy(&m_DeviceValues[vertexNumber*m_nDeviceChannels],deviceCoords,sizeof(icFloatNumber)*m_nDeviceChannels);
5702
5703 return true;
5704}

References m_DeviceValues, m_nDeviceChannels, m_nPCSChannels, m_NumberOfVertices, and m_PCSValues.

◆ Validate()

icValidateStatus CIccTagGamutBoundaryDesc::Validate ( std::string  sigPath,
std::string &  sReport,
const CIccProfile pProfile 
) const
virtual

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

5817{
5818 icValidateStatus rv = CIccTag::Validate(sigPath, sReport, pProfile);
5819
5820 CIccInfo Info;
5821 std::string sSigPathName = Info.GetSigPathName(sigPath);
5822
5823 if ((m_NumberOfVertices == 0) || (m_NumberOfTriangles == 0) || (m_nPCSChannels < 3)) {
5824 sReport += icMsgValidateWarning;
5825 sReport += sSigPathName;
5826 sReport += " - Invalid tag.\n";
5827
5829 return rv;
5830 }
5831
5832 return rv;
5833}
icValidateStatus
Definition IccDefs.h:119
@ icValidateWarning
Definition IccDefs.h:121
ICCPROFLIB_API const char * icMsgValidateWarning
Definition IccUtil.cpp:90
ICCPROFLIB_API icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Definition IccUtil.cpp:244
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
Definition IccTagBasic.cpp:164

References CIccInfo::GetSigPathName(), icMaxStatus(), icMsgValidateWarning, icValidateWarning, m_nPCSChannels, m_NumberOfTriangles, m_NumberOfVertices, and CIccTag::Validate().

+ Here is the call graph for this function:

◆ Write()

bool CIccTagGamutBoundaryDesc::Write ( CIccIO pIO)
virtual

Name: CIccTagGamutBoundaryDescription::Write

Purpose: Write a gamut boundary type tag to a file

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

Return: true = succesful, false = failure

Reimplemented from CIccTag.

5577{
5578
5580
5581 if (!pIO) {
5582 return false;
5583 }
5584
5585 icUInt32Number startPos = pIO->GetLength();
5586
5587 if (!pIO->Write32(&sig) ||
5588 !pIO->Write32(&m_nReserved))
5589 return false;
5590
5591
5592 if (!pIO->Write16(&m_nPCSChannels) ||
5593 !pIO->Write16(&m_nDeviceChannels))
5594 return false;
5595
5596 if (!pIO->Write32(&m_NumberOfVertices) ||
5598 return false;
5599
5601
5602 if (pIO->Write32(m_Triangles, nNum32)!=nNum32)
5603 return false;
5604
5605
5607
5608 if (pIO->WriteFloat32Float(m_PCSValues, nNum32)!=nNum32)
5609 return false;
5610
5611 if (m_nDeviceChannels > 0)
5612 {
5614
5615 if (pIO->WriteFloat32Float(m_DeviceValues, nNum32)!=nNum32)
5616 return false;
5617 }
5618
5619 return true;
5620
5621}
virtual icInt32Number GetLength()
Definition IccIO.h:130
icInt32Number Write16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:122
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152
icInt32Number WriteFloat32Float(void *pBufFloat, icInt32Number nNum=1)
Definition IccIO.cpp:321
virtual icTagTypeSignature GetType() const
Definition IccTagLut.h:621

References CIccIO::GetLength(), GetType(), m_DeviceValues, m_nDeviceChannels, m_nPCSChannels, CIccTag::m_nReserved, m_NumberOfTriangles, m_NumberOfVertices, m_PCSValues, m_Triangles, CIccIO::Write16(), CIccIO::Write32(), and CIccIO::WriteFloat32Float().

+ Here is the call graph for this function:

Field Documentation

◆ m_DeviceValues

◆ m_nDeviceChannels

◆ m_nPCSChannels

◆ 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(), CIccTagViewingConditions::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(), 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(), CIccTagViewingConditions::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(), Write(), CIccTagMultiProcessElement::Write(), and CIccTagProfileSequenceId::Write().

◆ m_NumberOfTriangles

◆ m_NumberOfVertices

◆ m_PCSValues

◆ m_Triangles


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