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

#include <IccTagXml.h>

+ Inheritance diagram for CIccTagXmlLut16:
+ Collaboration diagram for CIccTagXmlLut16:

Public Member Functions

virtual ~CIccTagXmlLut16 ()
 
void Cleanup ()
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 
virtual void DetachIO ()
 
virtual const char * GetClassName () const
 
CIccCLUTGetCLUT () const
 
icColorSpaceSignature GetCsInput ()
 
icColorSpaceSignature GetCsOutput ()
 
LPIccCurveGetCurvesA () const
 
LPIccCurveGetCurvesB () const
 
LPIccCurveGetCurvesM () const
 
virtual const char * GetExtClassName () const
 
virtual const char * GetExtDerivedClassName () const
 
virtual IIccExtensionTagGetExtension ()
 
CIccMatrixGetMatrix () const
 
virtual icUInt8Number GetPrecision ()
 
virtual icArraySignature GetTagArrayType () const
 
virtual icStructSignature GetTagStructType () const
 
virtual icTagTypeSignature GetType () const
 
void Init (icUInt8Number nInputChannels, icUInt8Number nOutputChannels)
 
icUInt8Number InputChannels () const
 
virtual bool IsArrayType ()
 
bool IsInputB ()
 
virtual bool IsInputMatrix ()
 
virtual bool IsMBBType ()
 
virtual bool IsNumArrayType () const
 
virtual bool IsSupported ()
 
CIccCLUTNewCLUT (icUInt8Number *pGridPoints, icUInt8Number nPrecision=2)
 
CIccCLUTNewCLUT (icUInt8Number nGridPoints, icUInt8Number nPrecision=2)
 
virtual CIccTagNewCopy () const
 
LPIccCurveNewCurvesA ()
 
LPIccCurveNewCurvesB ()
 
LPIccCurveNewCurvesM ()
 
CIccMatrixNewMatrix ()
 
icUInt8Number OutputChannels () const
 
virtual bool ParseXml (xmlNode *pNode, std::string &parseStr)
 
bool Read (icUInt32Number size, CIccIO *pIO)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO, CIccProfile *pProfile)
 
virtual bool ReadAll ()
 
CIccCLUTSetCLUT (CIccCLUT *clut)
 
virtual void SetColorSpaces (icColorSpaceSignature csInput, icColorSpaceSignature csOutput)
 
bool SwapMBCurves ()
 
virtual bool ToXml (std::string &xml, std::string blanks="")
 
virtual bool UseLegacyPCS () const
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL)
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 
bool Write (CIccIO *pIO)
 

Static Public Member Functions

static CIccTagCreate (icTagTypeSignature sig)
 

Data Fields

icUInt32Number m_nReserved
 

Protected Attributes

bool m_bInputMatrix
 
bool m_bUseMCurvesAsBCurves
 
CIccCLUTm_CLUT
 
icColorSpaceSignature m_csInput
 
icColorSpaceSignature m_csOutput
 
LPIccCurvem_CurvesA
 
LPIccCurvem_CurvesB
 
LPIccCurvem_CurvesM
 
CIccMatrixm_Matrix
 
icUInt8Number m_nInput
 
icUInt8Number m_nOutput
 
icUInt8Number m_nReservedByte
 
icS15Fixed16Number m_XYZMatrix [9]
 

Detailed Description

Constructor & Destructor Documentation

◆ ~CIccTagXmlLut16()

virtual CIccTagXmlLut16::~CIccTagXmlLut16 ( )
inlinevirtual
585{}

Member Function Documentation

◆ Cleanup()

void CIccMBB::Cleanup ( )
inherited

Name: CIccMBB::Cleanup

Purpose: Frees the memory allocated to the object

3326{
3327 int i;
3328
3329 if (IsInputMatrix()) {
3330 if (m_CurvesB) {
3331 for (i=0; i<m_nInput; i++)
3332 if (m_CurvesB[i])
3333 delete m_CurvesB[i];
3334
3335 delete [] m_CurvesB;
3336 m_CurvesB = NULL;
3337 }
3338
3339 if (m_CurvesM) {
3340 for (i=0; i<m_nInput; i++)
3341 if (m_CurvesM[i])
3342 delete m_CurvesM[i];
3343
3344 delete [] m_CurvesM;
3345 m_CurvesM = NULL;
3346 }
3347
3348
3349 if (m_CurvesA) {
3350 for (i=0; i<m_nOutput; i++)
3351 if (m_CurvesA[i])
3352 delete m_CurvesA[i];
3353
3354 delete [] m_CurvesA;
3355 m_CurvesA = NULL;
3356 }
3357
3358 }
3359 else {
3360 if (m_CurvesA) {
3361 for (i=0; i<m_nInput; i++)
3362 if (m_CurvesA[i])
3363 delete m_CurvesA[i];
3364
3365 delete [] m_CurvesA;
3366 m_CurvesA = NULL;
3367 }
3368
3369 if (m_CurvesM) {
3370 for (i=0; i<m_nOutput; i++)
3371 if (m_CurvesM[i])
3372 delete m_CurvesM[i];
3373
3374 delete [] m_CurvesM;
3375 m_CurvesM = NULL;
3376 }
3377
3378 if (m_CurvesB) {
3379 for (i=0; i<m_nOutput; i++)
3380 if (m_CurvesB[i])
3381 delete m_CurvesB[i];
3382
3383 delete [] m_CurvesB;
3384 m_CurvesB = NULL;
3385 }
3386 }
3387
3388 if (m_Matrix) {
3389 delete m_Matrix;
3390 m_Matrix = NULL;
3391 }
3392
3393 if (m_CLUT) {
3394 delete m_CLUT;
3395 m_CLUT = NULL;
3396 }
3397}
LPIccCurve * m_CurvesB
Definition IccTagLut.h:490
virtual bool IsInputMatrix()
Definition IccTagLut.h:442
CIccCLUT * m_CLUT
Definition IccTagLut.h:487
LPIccCurve * m_CurvesM
Definition IccTagLut.h:489
icUInt8Number m_nOutput
Definition IccTagLut.h:481
LPIccCurve * m_CurvesA
Definition IccTagLut.h:486
icUInt8Number m_nInput
Definition IccTagLut.h:480
CIccMatrix * m_Matrix
Definition IccTagLut.h:488

References CIccMBB::IsInputMatrix(), CIccMBB::m_CLUT, CIccMBB::m_CurvesA, CIccMBB::m_CurvesB, CIccMBB::m_CurvesM, CIccMBB::m_Matrix, CIccMBB::m_nInput, and CIccMBB::m_nOutput.

Referenced by CIccMBB::~CIccMBB(), CIccMBB::Init(), and CIccMBB::operator=().

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

◆ 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 CIccMBB::Describe ( std::string &  sDescription,
int  nVerboseness 
)
virtualinherited

Name: CIccMBB::Describe

Purpose: Dump data associated with the tag to a string

Args: sDescription - string to concatenate tag dump to

Reimplemented from CIccTag.

3445{
3446 int i;
3447 icChar buf[128], color[40];
3448
3449
3450 if (IsInputMatrix()) {
3452 for (i=0; i<m_nInput; i++) {
3453 icColorIndexName(color, m_csInput, i, m_nInput, "");
3454 sprintf(buf, "B_Curve_%s", color);
3455 m_CurvesB[i]->DumpLut(sDescription, buf, m_csInput, i, nVerboseness);
3456 }
3457 }
3458
3459 if (m_Matrix)
3460 m_Matrix->DumpLut(sDescription, "Matrix", nVerboseness);
3461
3462 if (m_CurvesM) {
3463 for (i=0; i<m_nInput; i++) {
3464 icColorIndexName(color, m_csInput, i, m_nInput, "");
3466 sprintf(buf, "M_Curve_%s", color);
3467 else
3468 sprintf(buf, "B_Curve_%s", color);
3469 m_CurvesM[i]->DumpLut(sDescription, buf, m_csInput, i, nVerboseness);
3470 }
3471 }
3472
3473 if (m_CLUT)
3474 m_CLUT->DumpLut(sDescription, "CLUT", m_csInput, m_csOutput, nVerboseness, GetType()==icSigLut16Type);
3475
3476 if (m_CurvesA) {
3477 for (i=0; i<m_nOutput; i++) {
3478 icColorIndexName(color, m_csOutput, i, m_nOutput, "");
3479 sprintf(buf, "A_Curve_%s", color);
3480 m_CurvesA[i]->DumpLut(sDescription, buf, m_csOutput, i, nVerboseness);
3481 }
3482 }
3483 }
3484 else {
3485 if (m_CurvesA) {
3486 for (i=0; i<m_nInput; i++) {
3487 icColorIndexName(color, m_csInput, i, m_nInput, "");
3488 sprintf(buf, "A_Curve_%s", color);
3489 m_CurvesA[i]->DumpLut(sDescription, buf, m_csInput, i, nVerboseness);
3490 }
3491 }
3492
3493 if (m_CLUT)
3494 m_CLUT->DumpLut(sDescription, "CLUT", m_csInput, m_csOutput, nVerboseness);
3495
3496 if (m_CurvesM && this->GetType()!=icSigLut8Type) {
3497 for (i=0; i<m_nOutput; i++) {
3498 icColorIndexName(color, m_csOutput, i, m_nOutput, "");
3499 sprintf(buf, "M_Curve_%s", color);
3500 m_CurvesM[i]->DumpLut(sDescription, buf, m_csOutput, i, nVerboseness);
3501 }
3502 }
3503
3504 if (m_Matrix)
3505 m_Matrix->DumpLut(sDescription, "Matrix", nVerboseness);
3506
3507 if (m_CurvesB) {
3508 for (i=0; i<m_nOutput; i++) {
3509 icColorIndexName(color, m_csOutput, i, m_nOutput, "");
3510 sprintf(buf, "B_Curve_%s", color);
3511 m_CurvesB[i]->DumpLut(sDescription, buf, m_csOutput, i, nVerboseness);
3512 }
3513 }
3514 }
3515}
@ icSigLut8Type
Definition icProfileHeader.h:545
@ icSigLut16Type
Definition icProfileHeader.h:544
char icChar
Definition IccDefs.h:110
ICCPROFLIB_API void icColorIndexName(icChar *szName, icColorSpaceSignature csSig, int nIndex, int nColors, const icChar *szUnknown)
Definition IccUtil.cpp:295
virtual icTagTypeSignature GetType() const
Definition IccTagBasic.h:131
virtual void DumpLut(std::string &sDescription, const icChar *szName, icColorSpaceSignature csSig, int nIndex, int nVerboseness)
Definition IccTagLut.h:97
void DumpLut(std::string &sDescription, const icChar *szName, int nVerboseness)
Definition IccTagLut.cpp:1469
void DumpLut(std::string &sDescription, const icChar *szName, icColorSpaceSignature csInput, icColorSpaceSignature csOutput, int nVerboseness, bool bUseLegacy=false)
Definition IccTagLut.cpp:2157
icColorSpaceSignature m_csOutput
Definition IccTagLut.h:484
bool m_bUseMCurvesAsBCurves
Definition IccTagLut.h:478
icColorSpaceSignature m_csInput
Definition IccTagLut.h:483

References CIccCLUT::DumpLut(), CIccCurve::DumpLut(), CIccMatrix::DumpLut(), CIccTag::GetType(), icColorIndexName(), icSigLut16Type, icSigLut8Type, CIccMBB::IsInputMatrix(), CIccMBB::m_bUseMCurvesAsBCurves, CIccMBB::m_CLUT, CIccMBB::m_csInput, CIccMBB::m_csOutput, CIccMBB::m_CurvesA, CIccMBB::m_CurvesB, CIccMBB::m_CurvesM, CIccMBB::m_Matrix, CIccMBB::m_nInput, and CIccMBB::m_nOutput.

+ 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 char * CIccTagXmlLut16::GetClassName ( ) const
inlinevirtual

Reimplemented from CIccTag.

587{return "CIccTagXmlLut16"; }

◆ GetCLUT()

CIccCLUT * CIccMBB::GetCLUT ( ) const
inlineinherited
469{return m_CLUT;}

References CIccMBB::m_CLUT.

Referenced by CIccEvalCompare::EvaluateProfile(), icMBBFromXml(), and icMBBToXml().

+ Here is the caller graph for this function:

◆ GetCsInput()

icColorSpaceSignature CIccMBB::GetCsInput ( )
inlineinherited
458{ return m_csInput; }

References CIccMBB::m_csInput.

◆ GetCsOutput()

icColorSpaceSignature CIccMBB::GetCsOutput ( )
inlineinherited
459{ return m_csOutput; }

References CIccMBB::m_csOutput.

◆ GetCurvesA()

LPIccCurve * CIccMBB::GetCurvesA ( ) const
inlineinherited
470{return m_CurvesA;}

References CIccMBB::m_CurvesA.

Referenced by icMBBFromXml(), and icMBBToXml().

+ Here is the caller graph for this function:

◆ GetCurvesB()

LPIccCurve * CIccMBB::GetCurvesB ( ) const
inlineinherited
471{return m_CurvesB;}

References CIccMBB::m_CurvesB.

Referenced by icMBBFromXml(), and icMBBToXml().

+ Here is the caller graph for this function:

◆ GetCurvesM()

LPIccCurve * CIccMBB::GetCurvesM ( ) const
inlineinherited
472{return m_CurvesM;}

References CIccMBB::m_CurvesM.

Referenced by icMBBFromXml(), and icMBBToXml().

+ Here is the caller graph for this function:

◆ GetExtClassName()

virtual const char * CIccTagXml::GetExtClassName ( ) const
inlinevirtualinherited

Implements IIccExtensionTag.

79{ return "CIccTagXml"; }

Referenced by icProfDescToXml(), and icXmlParseProfDesc().

+ Here is the caller graph for this function:

◆ GetExtDerivedClassName()

virtual const char * CIccTagXml::GetExtDerivedClassName ( ) const
inlinevirtualinherited

Implements IIccExtensionTag.

Reimplemented in CIccCurveXml.

80{ return ""; }

◆ GetExtension()

virtual IIccExtensionTag * CIccTagXmlLut16::GetExtension ( )
inlinevirtual

Reimplemented from CIccTag.

589{return this; }

◆ GetMatrix()

CIccMatrix * CIccMBB::GetMatrix ( ) const
inlineinherited
468{return m_Matrix; }

References CIccMBB::m_Matrix.

Referenced by icMBBFromXml(), and icMBBToXml().

+ Here is the caller graph for this function:

◆ GetPrecision()

virtual icUInt8Number CIccMBB::GetPrecision ( )
inlinevirtualinherited

Reimplemented in CIccTagLut8.

441{ return 2; }

◆ 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 CIccTagLut16::GetType ( ) const
inlinevirtualinherited

Function: GetType()

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

Reimplemented from CIccTag.

586{ return icSigLut16Type; }

References icSigLut16Type.

Referenced by CIccTagLut16::Read(), CIccTagLut16::Validate(), and CIccTagLut16::Write().

+ Here is the caller graph for this function:

◆ Init()

void CIccMBB::Init ( icUInt8Number  nInputChannels,
icUInt8Number  nOutputChannels 
)
inherited

Name: CIccMBB::Init

Purpose: Cleans up any prior memory and Initializes the object.

Args: nInputChannels = number of input channels, nOutputChannels = number of output channels

3411{
3412 Cleanup();
3413 m_nInput = nInputChannels;
3414 m_nOutput = nOutputChannels;
3415}
void Cleanup()
Definition IccTagLut.cpp:3325

References CIccMBB::Cleanup(), CIccMBB::m_nInput, and CIccMBB::m_nOutput.

Referenced by CDevLinkWriter::begin(), and icMBBFromXml().

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

◆ InputChannels()

icUInt8Number CIccMBB::InputChannels ( ) const
inlineinherited
451{ return m_nInput; }

References CIccMBB::m_nInput.

Referenced by icMBBToXml().

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

◆ IsInputB()

bool CIccMBB::IsInputB ( )
inlineinherited
445{ return IsInputMatrix(); }

References CIccMBB::IsInputMatrix().

Referenced by CIccMBB::CIccMBB(), icMBBFromXml(), CIccMBB::NewCurvesA(), CIccMBB::NewCurvesB(), CIccMBB::operator=(), CIccTagLutAtoB::Read(), and CIccTagLutAtoB::Write().

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

◆ IsInputMatrix()

virtual bool CIccMBB::IsInputMatrix ( )
inlinevirtualinherited
442{ return m_bInputMatrix; } //Is matrix on input side of CLUT?
bool m_bInputMatrix
Definition IccTagLut.h:477

References CIccMBB::m_bInputMatrix.

Referenced by CIccMBB::CIccMBB(), CIccMBB::Cleanup(), CIccMBB::Describe(), icMBBFromXml(), icMBBToXml(), CIccMBB::IsInputB(), CIccMBB::NewCurvesM(), CIccMBB::operator=(), CIccTagLutAtoB::Read(), CIccTagLut8::SetColorSpaces(), CIccTagLut16::SetColorSpaces(), and CIccTagLutAtoB::Write().

+ Here is the caller graph for this function:

◆ IsMBBType()

virtual bool CIccMBB::IsMBBType ( )
inlinevirtualinherited

Reimplemented from CIccTag.

439{ return true;}

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

◆ NewCLUT() [1/2]

CIccCLUT * CIccMBB::NewCLUT ( icUInt8Number pGridPoints,
icUInt8Number  nPrecision = 2 
)
inherited

Name: CIccMBB::NewCLUT

Purpose: Allocates memory for a new CLUT and initializes it

Args: pGridPoints = number of grid points in the CLUT

Return: Pointer to the CIccCLUT object

3763{
3764 if (m_CLUT)
3765 return m_CLUT;
3766
3767 m_CLUT = new CIccCLUT(m_nInput, m_nOutput, nPrecision);
3768
3769 m_CLUT->Init(pGridPoints);
3770
3771 return m_CLUT;
3772}
Definition IccTagLut.h:326
bool Init(icUInt8Number nGridPoints, icUInt32Number nMaxSize=0, icUInt8Number nBytesPerPoint=4)
Definition IccTagLut.cpp:1806

References CIccCLUT::CIccCLUT(), CIccCLUT::Init(), CIccMBB::m_CLUT, CIccMBB::m_nInput, and CIccMBB::m_nOutput.

+ Here is the call graph for this function:

◆ NewCLUT() [2/2]

CIccCLUT * CIccMBB::NewCLUT ( icUInt8Number  nGridPoints,
icUInt8Number  nPrecision = 2 
)
inherited

Name: CIccMBB::NewCLUT

Purpose: Allocates memory for a new CLUT and initializes it

Args: nGridPoints = number of grid points in the CLUT

Return: Pointer to the CIccCLUT object

3816{
3817 if (m_CLUT)
3818 return m_CLUT;
3819
3820 m_CLUT = new CIccCLUT(m_nInput, m_nOutput, nPrecision);
3821
3822 m_CLUT->Init(nGridPoints);
3823
3824 return m_CLUT;
3825}

References CIccCLUT::CIccCLUT(), CIccCLUT::Init(), CIccMBB::m_CLUT, CIccMBB::m_nInput, and CIccMBB::m_nOutput.

Referenced by CDevLinkWriter::begin().

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

◆ NewCopy()

virtual CIccTag * CIccTagLut16::NewCopy ( ) const
inlinevirtualinherited

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 CIccMBB.

583{return new CIccTagLut16(*this);}
CIccTagLut16()
Definition IccTagLut.cpp:4900

References CIccTagLut16::CIccTagLut16().

+ Here is the call graph for this function:

◆ NewCurvesA()

LPIccCurve * CIccMBB::NewCurvesA ( )
inherited

Name: CIccMBB::NewCurvesA

Purpose: Allocates memory for a new set of A-curves

Return: Pointer to the LPIccCurve object

3674{
3675 if (m_CurvesA)
3676 return m_CurvesA;
3677
3678 icUInt8Number nCurves = !IsInputB() ? m_nInput : m_nOutput;
3679
3680 m_CurvesA = new LPIccCurve[nCurves];
3681 memset(m_CurvesA, 0, nCurves * sizeof(LPIccCurve));
3682
3683 return m_CurvesA;
3684}
unsigned char icUInt8Number
Definition icProfileHeader.h:250
Definition IccTagLut.h:91
bool IsInputB()
Definition IccTagLut.h:445

References CIccMBB::IsInputB(), CIccMBB::m_CurvesA, CIccMBB::m_nInput, and CIccMBB::m_nOutput.

Referenced by CDevLinkWriter::begin(), icMBBFromXml(), CIccTagLutAtoB::Read(), CIccTagLut8::Read(), and CIccTagLut16::Read().

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

◆ NewCurvesB()

LPIccCurve * CIccMBB::NewCurvesB ( )
inherited

Name: CIccMBB::NewCurvesB

Purpose: Allocates memory for a new set of B-curves

Return: Pointer to the LPIccCurve object

3719{
3720 if (m_CurvesB)
3721 return m_CurvesB;
3722
3723 icUInt8Number nCurves = IsInputB() ? m_nInput : m_nOutput;
3724
3725 m_CurvesB = new LPIccCurve[nCurves];
3726 memset(m_CurvesB, 0, nCurves * sizeof(LPIccCurve));
3727
3728 return m_CurvesB;
3729}

References CIccMBB::IsInputB(), CIccMBB::m_CurvesB, CIccMBB::m_nInput, and CIccMBB::m_nOutput.

Referenced by CDevLinkWriter::begin(), icMBBFromXml(), CIccTagLutAtoB::Read(), CIccTagLut8::Read(), CIccTagLut16::Read(), CIccTagLut8::SetColorSpaces(), and CIccTagLut16::SetColorSpaces().

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

◆ NewCurvesM()

LPIccCurve * CIccMBB::NewCurvesM ( )
inherited

Name: CIccMBB::NewCurvesM

Purpose: Allocates memory for a new set of M-curves

Return: Pointer to the LPIccCurve object

3697{
3698 if (m_CurvesM)
3699 return m_CurvesM;
3700
3702
3703 m_CurvesM = new LPIccCurve[nCurves];
3704 memset(m_CurvesM, 0, nCurves * sizeof(LPIccCurve));
3705
3706 return m_CurvesM;
3707}

References CIccMBB::IsInputMatrix(), CIccMBB::m_CurvesM, CIccMBB::m_nInput, and CIccMBB::m_nOutput.

Referenced by icMBBFromXml(), and CIccTagLutAtoB::Read().

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

◆ NewMatrix()

CIccMatrix * CIccMBB::NewMatrix ( )
inherited

Name: CIccMBB::NewMatrix

Purpose: Allocates memory for a new matrix

Return: Pointer to the CIccMatrix object

3741{
3742 if (m_Matrix)
3743 return m_Matrix;
3744
3745 m_Matrix = new CIccMatrix;
3746
3747 return m_Matrix;
3748}
Definition IccTagLut.h:260

References CIccMBB::m_Matrix.

Referenced by icMBBFromXml(), CIccTagLut8::SetColorSpaces(), and CIccTagLut16::SetColorSpaces().

+ Here is the caller graph for this function:

◆ OutputChannels()

icUInt8Number CIccMBB::OutputChannels ( ) const
inlineinherited
452{ return m_nOutput; }

References CIccMBB::m_nOutput.

Referenced by icMBBToXml().

+ Here is the caller graph for this function:

◆ ParseXml()

bool CIccTagXmlLut16::ParseXml ( xmlNode *  pNode,
std::string &  parseStr 
)
virtual

Implements CIccTagXml.

3932{
3933 if (pNode) {
3934 return icMBBFromXml(this, pNode, icConvert16Bit, parseStr);
3935 }
3936 return false;
3937}
bool icMBBFromXml(CIccMBB *pMBB, xmlNode *pNode, icConvertType nType, std::string &parseStr)
Definition IccTagXml.cpp:3793
@ icConvert16Bit
Definition IccXmlConfig.h:69

References icConvert16Bit, and icMBBFromXml().

+ Here is the call graph for this function:

◆ Read() [1/2]

bool CIccTagLut16::Read ( icUInt32Number  size,
CIccIO pIO 
)
virtualinherited

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

4975{
4977 icUInt32Number nStart, nEnd;
4978 icUInt8Number i, nGrid;
4979 icUInt16Number nInputEntries, nOutputEntries;
4980 LPIccCurve *pCurves;
4981 CIccTagCurve *pCurve;
4982
4983 if (size<13*sizeof(icUInt32Number) || !pIO) {
4984 return false;
4985 }
4986
4987 nStart = pIO->Tell();
4988 nEnd = nStart + size;
4989
4990 if (!pIO->Read32(&sig) ||
4991 !pIO->Read32(&m_nReserved) ||
4992 !pIO->Read8(&m_nInput) ||
4993 !pIO->Read8(&m_nOutput) ||
4994 !pIO->Read8(&nGrid) ||
4995 !pIO->Read8(&m_nReservedByte) ||
4996 pIO->Read32(m_XYZMatrix, 9) != 9 ||
4997 !pIO->Read16(&nInputEntries) ||
4998 !pIO->Read16(&nOutputEntries))
4999 return false;
5000
5001 if (sig!=GetType())
5002 return false;
5003
5004
5005 //B Curves
5006 pCurves = NewCurvesB();
5007
5008 for (i=0; i<m_nInput; i++) {
5009 if (nInputEntries*sizeof(icUInt16Number) > nEnd - pIO->Tell())
5010 return false;
5011
5012 pCurves[i] = pCurve = (CIccTagCurve*)CIccTag::Create(icSigCurveType);
5013
5014 if (!pCurve->SetSize(nInputEntries))
5015 return false;
5016
5017 if (pIO->ReadUInt16Float(&(*pCurve)[0], nInputEntries) != nInputEntries)
5018 return false;
5019 }
5020
5021 //CLUT
5023
5024 if (!m_CLUT->Init(nGrid, nEnd - pIO->Tell(), 2))
5025 return false;
5026
5027 if (!m_CLUT->ReadData(nEnd - pIO->Tell(), pIO, 2))
5028 return false;
5029
5030 //A Curves
5031 pCurves = NewCurvesA();
5032
5033 for (i=0; i<m_nOutput; i++) {
5034 if (nOutputEntries*sizeof(icUInt16Number) > nEnd - pIO->Tell())
5035 return false;
5036
5037 pCurves[i] = pCurve = (CIccTagCurve*)CIccTag::Create(icSigCurveType);
5038
5039 if (!pCurve->SetSize(nOutputEntries))
5040 return false;
5041
5042 if (pIO->ReadUInt16Float(&(*pCurve)[0], nOutputEntries) != nOutputEntries)
5043 return false;
5044 }
5045 return true;
5046}
unsigned short icUInt16Number
Definition icProfileHeader.h:256
unsigned long icUInt32Number
Definition icProfileHeader.h:262
icTagTypeSignature
Definition icProfileHeader.h:526
@ icSigCurveType
Definition icProfileHeader.h:533
virtual icInt32Number Read8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:104
icInt32Number Read16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:114
virtual icInt32Number Tell()
Definition IccIO.h:133
icInt32Number ReadUInt16Float(void *pBufFloat, icInt32Number nNum=1)
Definition IccIO.cpp:236
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143
icUInt32Number m_nReserved
Definition IccTagBasic.h:235
static CIccTag * Create(icTagTypeSignature sig)
Definition IccTagBasic.cpp:143
Definition IccTagLut.h:128
bool SetSize(icUInt32Number nSize, icTagCurveSizeInit nSizeOpt=icInitZero)
Definition IccTagLut.cpp:439
bool ReadData(icUInt32Number size, CIccIO *pIO, icUInt8Number nPrecision)
Definition IccTagLut.cpp:1896
LPIccCurve * NewCurvesB()
Definition IccTagLut.cpp:3718
LPIccCurve * NewCurvesA()
Definition IccTagLut.cpp:3673
icUInt8Number m_nReservedByte
Definition IccTagLut.h:596
icS15Fixed16Number m_XYZMatrix[9]
Definition IccTagLut.h:597
virtual icTagTypeSignature GetType() const
Definition IccTagLut.h:586

References CIccCLUT::CIccCLUT(), CIccTag::Create(), CIccTagLut16::GetType(), icSigCurveType, CIccCLUT::Init(), CIccMBB::m_CLUT, CIccMBB::m_nInput, CIccMBB::m_nOutput, CIccTag::m_nReserved, CIccTagLut16::m_nReservedByte, CIccTagLut16::m_XYZMatrix, CIccMBB::NewCurvesA(), CIccMBB::NewCurvesB(), CIccTagCurve::operator[](), CIccIO::Read16(), CIccIO::Read32(), CIccIO::Read8(), CIccCLUT::ReadData(), CIccIO::ReadUInt16Float(), CIccTagCurve::SetSize(), and CIccIO::Tell().

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

◆ SetCLUT()

CIccCLUT * CIccMBB::SetCLUT ( CIccCLUT clut)
inherited

Name: CIccMBB::SetCLUT

Purpose: Assignes CLUT connection to an initialized new CLUT

Args: clut = pointer to a previously allocated CLUT (Onwership is transfered to CIccMBB object).

Return: Pointer to the CIccCLUT object or NULL if clut is incompatible with CIccMBB object. If the clut is incompatible it is deleted.

3789{
3790 if (clut->GetInputDim() != m_nInput || clut->GetOutputChannels() != m_nOutput) {
3791 delete clut;
3792 return NULL;
3793 }
3794
3795 if (m_CLUT) {
3796 delete m_CLUT;
3797 }
3798
3799 m_CLUT = clut;
3800 return clut;
3801}
icUInt8Number GetInputDim() const
Definition IccTagLut.h:356
icUInt16Number GetOutputChannels() const
Definition IccTagLut.h:357

References CIccCLUT::GetInputDim(), CIccCLUT::GetOutputChannels(), CIccMBB::m_CLUT, CIccMBB::m_nInput, and CIccMBB::m_nOutput.

Referenced by icMBBFromXml().

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

◆ SetColorSpaces()

void CIccTagLut16::SetColorSpaces ( icColorSpaceSignature  csInput,
icColorSpaceSignature  csOutput 
)
virtualinherited

Name: CIccTagLut16::SetColorSpaces

Purpose: Sets the input and output color spaces

Args: csInput = input color space signature, csOutput = output color space signature

Reimplemented from CIccMBB.

5062{
5063 if (csInput==icSigXYZData) {
5064 int i;
5065
5066 if (!m_CurvesM && IsInputMatrix()) { //Transfer ownership of curves
5068 m_CurvesB = NULL;
5069
5070 LPIccCurve *pCurves = NewCurvesB();
5071 CIccTagCurve *pCurve;
5072 for (i=0; i<m_nInput; i++) {
5073 pCurves[i] = pCurve = (CIccTagCurve*)CIccTag::Create(icSigCurveType);
5074 pCurve->SetSize(0);
5075 }
5076
5078 }
5079
5080 if (!m_Matrix) {
5081 CIccMatrix *pMatrix = NewMatrix();
5082 for (i=0; i<9; i++) {
5083 pMatrix->m_e[i] = icFtoD(m_XYZMatrix[i]);
5084 }
5085
5086 pMatrix->m_bUseConstants=false;
5087 }
5088 }
5089 else {
5090 m_XYZMatrix[0] = m_XYZMatrix[4] = m_XYZMatrix[8] = icDtoF(1.0);
5091 m_XYZMatrix[1] = m_XYZMatrix[2] = m_XYZMatrix[3] =
5092 m_XYZMatrix[5] = m_XYZMatrix[6] = m_XYZMatrix[7] = 0;
5093 }
5094
5095 CIccMBB::SetColorSpaces(csInput, csOutput);
5096}
@ icSigXYZData
Definition icProfileHeader.h:846
ICCPROFLIB_API icS15Fixed16Number icDtoF(icFloatNumber num)
Definition IccUtil.cpp:545
ICCPROFLIB_API icFloatNumber icFtoD(icS15Fixed16Number num)
Definition IccUtil.cpp:559
icFloatNumber m_e[12]
Definition IccTagLut.h:269
bool m_bUseConstants
Definition IccTagLut.h:270
CIccMatrix * NewMatrix()
Definition IccTagLut.cpp:3740
virtual void SetColorSpaces(icColorSpaceSignature csInput, icColorSpaceSignature csOutput)
Definition IccTagLut.cpp:3428

References CIccTag::Create(), icDtoF(), icFtoD(), icSigCurveType, icSigXYZData, CIccMBB::IsInputMatrix(), CIccMatrix::m_bUseConstants, CIccMBB::m_bUseMCurvesAsBCurves, CIccMBB::m_CurvesB, CIccMBB::m_CurvesM, CIccMatrix::m_e, CIccMBB::m_Matrix, CIccMBB::m_nInput, CIccTagLut16::m_XYZMatrix, CIccMBB::NewCurvesB(), CIccMBB::NewMatrix(), CIccMBB::SetColorSpaces(), and CIccTagCurve::SetSize().

+ Here is the call graph for this function:

◆ SwapMBCurves()

bool CIccMBB::SwapMBCurves ( )
inlineinherited
446{ return m_bUseMCurvesAsBCurves; }

References CIccMBB::m_bUseMCurvesAsBCurves.

Referenced by icMBBToXml().

+ Here is the caller graph for this function:

◆ ToXml()

bool CIccTagXmlLut16::ToXml ( std::string &  xml,
std::string  blanks = "" 
)
virtual

Implements CIccTagXml.

3922{
3923 std::string info;
3924
3925 bool rv = icMBBToXml(xml, this, icConvert16Bit, blanks, false);
3926
3927 return rv;
3928}
bool icMBBToXml(std::string &xml, CIccMBB *pMBB, icConvertType nType, std::string blanks="", bool bSaveGridPoints=false)
Definition IccTagXml.cpp:3131

References icConvert16Bit, and icMBBToXml().

+ Here is the call graph for this function:

◆ UseLegacyPCS()

virtual bool CIccTagLut16::UseLegacyPCS ( ) const
inlinevirtualinherited

Reimplemented from CIccMBB.

587{ return true; } //Treat Lab Encoding differently?

◆ Validate() [1/2]

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

Name: CIccTagLut16::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 CIccMBB.

5205{
5206 icValidateStatus rv = CIccMBB::Validate(sigPath, sReport, pProfile);
5207
5208 CIccInfo Info;
5209 std::string sSigPathName = Info.GetSigPathName(sigPath);
5210 icSignature sig = icGetFirstSigPathSig(sigPath);
5211
5212 if (!pProfile) {
5214 return rv;
5215 }
5216
5217 switch(sig) {
5218 case icSigAToB0Tag:
5219 case icSigAToB1Tag:
5220 case icSigAToB2Tag:
5221 case icSigBToA0Tag:
5222 case icSigBToA1Tag:
5223 case icSigBToA2Tag:
5224 case icSigGamutTag:
5225 {
5226 icUInt32Number nInput, nOutput;
5227 if (sig==icSigAToB0Tag || sig==icSigAToB1Tag || sig==icSigAToB2Tag || sig==icSigGamutTag) {
5228 nInput = icGetSpaceSamples(pProfile->m_Header.pcs);
5229 nOutput = icGetSpaceSamples(pProfile->m_Header.colorSpace);
5230 }
5231 else {
5232 nInput = icGetSpaceSamples(pProfile->m_Header.colorSpace);
5233 nOutput = icGetSpaceSamples(pProfile->m_Header.pcs);
5234 }
5235
5236 if (sig==icSigGamutTag) {
5237 nOutput = 1;
5238 }
5239
5240 icUInt8Number i;
5241 if (m_CurvesB) {
5242 for (i=0; i<nInput; i++) {
5243 if (m_CurvesB[i]) {
5244 rv = icMaxStatus(rv, m_CurvesB[i]->Validate(sigPath+icGetSigPath(GetType()), sReport, pProfile));
5245 if (m_CurvesB[i]->GetType()==icSigCurveType) {
5246 CIccTagCurve *pTagCurve = (CIccTagCurve*)m_CurvesB[i];
5247 if (pTagCurve->GetSize()==1) {
5248 sReport += icMsgValidateCriticalError;
5249 sReport += sSigPathName;
5250 sReport += " - lut16Tags do not support single entry gamma curves.\n";
5252 }
5253 }
5254 }
5255 else {
5256 sReport += icMsgValidateCriticalError;
5257 sReport += sSigPathName;
5258 sReport += " - Incorrect number of B-curves.\n";
5260 }
5261 }
5262 }
5263
5264 if (m_Matrix) {
5265 rv = icMaxStatus(rv, m_Matrix->Validate(sigPath + icGetSigPath(GetType()), sReport, pProfile));
5266 }
5267 else {
5268 int sum=0;
5269 for (int i=0; i<9; i++) {
5270 sum += m_XYZMatrix[i];
5271 }
5272 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[8]!=1.0 || sum!=3.0) {
5273 sReport += icMsgValidateWarning;
5274 sReport += sSigPathName;
5275 sReport += " - Matrix must be identity.\n";
5277 }
5278 }
5279
5280 if (m_CurvesA) {
5281
5282 for (i=0; i<nOutput; i++) {
5283 if (m_CurvesA[i]) {
5284 rv = icMaxStatus(rv, m_CurvesA[i]->Validate(sigPath+icGetSigPath(GetType()), sReport, pProfile));
5285 if (m_CurvesA[i]->GetType()==icSigCurveType) {
5286 CIccTagCurve *pTagCurve = (CIccTagCurve*)m_CurvesA[i];
5287 if (pTagCurve->GetSize()==1) {
5288 sReport += icMsgValidateCriticalError;
5289 sReport += sSigPathName;
5290 sReport += " - lut16Tags do not support single entry gamma curves.\n";
5292 }
5293 }
5294 }
5295 else {
5296 sReport += icMsgValidateCriticalError;
5297 sReport += sSigPathName;
5298 sReport += " - Incorrect number of A-curves.\n";
5300 }
5301 }
5302
5303 }
5304
5305 break;
5306 }
5307 default:
5308 {
5309 }
5310 }
5311
5312
5313 return rv;
5314}
icUInt32Number icSignature
Definition icProfileHeader.h:271
@ icSigBToA2Tag
Definition icProfileHeader.h:376
@ icSigAToB0Tag
Definition icProfileHeader.h:342
@ icSigBToA1Tag
Definition icProfileHeader.h:375
@ icSigAToB2Tag
Definition icProfileHeader.h:344
@ icSigBToA0Tag
Definition icProfileHeader.h:374
@ icSigAToB1Tag
Definition icProfileHeader.h:343
@ icSigGamutTag
Definition icProfileHeader.h:412
icValidateStatus
Definition IccDefs.h:119
@ icValidateWarning
Definition IccDefs.h:121
@ icValidateCriticalError
Definition IccDefs.h:123
ICCPROFLIB_API icSignature icGetFirstSigPathSig(std::string sigPath)
Definition IccUtil.cpp:1201
ICCPROFLIB_API icUInt32Number icGetSpaceSamples(icColorSpaceSignature sig)
Definition IccUtil.cpp:1303
ICCPROFLIB_API std::string icGetSigPath(icUInt32Number sig)
Definition IccUtil.cpp:1191
ICCPROFLIB_API const char * icMsgValidateWarning
Definition IccUtil.cpp:90
ICCPROFLIB_API const char * icMsgValidateCriticalError
Definition IccUtil.cpp:92
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
icUInt32Number GetSize() const
Definition IccTagLut.h:148
icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
Definition IccTagLut.cpp:1579
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL)
Definition IccTagLut.cpp:3532
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL)
Definition IccTagLut.cpp:5204

References icHeader::colorSpace, CIccInfo::GetSigPathName(), CIccTagCurve::GetSize(), CIccTag::GetType(), CIccTagLut16::GetType(), icGetFirstSigPathSig(), icGetSigPath(), icGetSpaceSamples(), icMaxStatus(), icMsgValidateCriticalError, icMsgValidateWarning, icSigAToB0Tag, icSigAToB1Tag, icSigAToB2Tag, icSigBToA0Tag, icSigBToA1Tag, icSigBToA2Tag, icSigCurveType, icSigGamutTag, icValidateCriticalError, icValidateWarning, CIccMBB::m_CurvesA, CIccMBB::m_CurvesB, CIccMBB::m_Matrix, CIccTagLut16::m_XYZMatrix, icHeader::pcs, CIccMBB::Validate(), CIccTag::Validate(), and CIccMatrix::Validate().

+ Here is the call graph for this function:

◆ Validate() [2/2]

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

Function: Validate Each derived tag will implement it's own IsValid() function

Parameter(s): sig - signature of tag being validated, sDescription - A string to put tag validation report.

Name: CIccTag::Validate

Purpose: Check tag data validity. In base class we only look at the tag's reserved data value

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

Return: icValidateStatusOK if valid, or other error status.

Reimplemented in CIccTagGamutBoundaryDesc, CIccTagText, CIccTagUtf8Text, CIccTagZipUtf8Text, CIccTagUtf16Text, CIccTagTextDescription, CIccTagSignature, CIccTagNamedColor2, CIccTagXYZ, CIccTagChromaticity, CIccTagCicp, CIccTagSparseMatrixArray, CIccTagNum< T, Tsig >, CIccTagFloatNum< T, Tsig >, CIccTagMeasurement, CIccTagMultiLocalizedUnicode, CIccTagData, CIccTagDateTime, CIccTagColorantOrder, CIccTagColorantTable, CIccTagViewingConditions, CIccTagProfileSeqDesc, CIccTagResponseCurveSet16, CIccTagSpectralDataInfo, CIccTagSpectralViewingConditions, CIccTagEmbeddedHeightImage, CIccTagEmbeddedNormalImage, CIccTagStruct, CIccTagArray, CIccTagDict, CIccTagEmbeddedProfile, CIccTagCurve, CIccTagParametricCurve, CIccTagSegmentedCurve, CIccTagMultiProcessElement, and CIccTagProfileSequenceId.

165{
167
168 if (m_nReserved != 0) {
169 CIccInfo Info;
170 sReport += icMsgValidateNonCompliant;
171 sReport += Info.GetSigPathName(sigPath);
172 sReport += " - Reserved Value must be zero.\n";
173
175 }
176
177 return rv;
178}
@ icValidateOK
Definition IccDefs.h:120
@ icValidateNonCompliant
Definition IccDefs.h:122
ICCPROFLIB_API const char * icMsgValidateNonCompliant
Definition IccUtil.cpp:91

References CIccInfo::GetSigPathName(), icMsgValidateNonCompliant, icValidateNonCompliant, icValidateOK, and CIccTag::m_nReserved.

Referenced by CIccTagGamutBoundaryDesc::Validate(), CIccMBB::Validate(), CIccTagLutAtoB::Validate(), CIccTagLutBtoA::Validate(), CIccTagLut8::Validate(), CIccTagLut16::Validate(), CIccArrayUnknown::Validate(), CIccArrayColorantInfo::Validate(), CIccArrayNamedColor::Validate(), CIccStructUnknown::Validate(), CIccTagText::Validate(), CIccTagUtf8Text::Validate(), CIccTagZipUtf8Text::Validate(), CIccTagUtf16Text::Validate(), CIccTagTextDescription::Validate(), CIccTagSignature::Validate(), CIccTagNamedColor2::Validate(), CIccTagXYZ::Validate(), CIccTagChromaticity::Validate(), CIccTagCicp::Validate(), CIccTagNum< T, Tsig >::Validate(), CIccTagFloatNum< T, Tsig >::Validate(), CIccTagMeasurement::Validate(), CIccTagMultiLocalizedUnicode::Validate(), CIccTagData::Validate(), CIccTagDateTime::Validate(), CIccTagColorantOrder::Validate(), CIccTagColorantTable::Validate(), CIccTagViewingConditions::Validate(), CIccTagProfileSeqDesc::Validate(), CIccTagResponseCurveSet16::Validate(), CIccTagSpectralDataInfo::Validate(), CIccTagSpectralViewingConditions::Validate(), CIccTagEmbeddedHeightImage::Validate(), CIccTagEmbeddedNormalImage::Validate(), CIccTagStruct::Validate(), CIccTagArray::Validate(), CIccTagDict::Validate(), CIccTagEmbeddedProfile::Validate(), CIccTagCurve::Validate(), CIccTagParametricCurve::Validate(), and CIccTagProfileSequenceId::Validate().

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

◆ Write()

bool CIccTagLut16::Write ( CIccIO pIO)
virtualinherited

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

5113{
5115 icUInt8Number i, nGrid;
5116 icS15Fixed16Number XYZMatrix[9];
5117 icUInt16Number nInputEntries, nOutputEntries;
5118 LPIccCurve *pCurves;
5119 CIccTagCurve *pCurve;
5120
5121 if (m_Matrix) {
5122 for (i=0; i<9; i++) {
5123 XYZMatrix[i] = icDtoF(m_Matrix->m_e[i]);
5124 }
5125 }
5126 else {
5127 memset(XYZMatrix, 0, 9*sizeof(icS15Fixed16Number));
5128 XYZMatrix[0] = XYZMatrix[4] = XYZMatrix[8] = icDtoF(1.0);
5129 }
5130
5132 pCurves = m_CurvesM;
5133 }
5134 else {
5135 pCurves = m_CurvesB;
5136 }
5137
5138 if (!pCurves || !m_CurvesA || !m_CLUT)
5139 return false;
5140
5141 nGrid = m_CLUT->GridPoints();
5142
5143 nInputEntries = (icUInt16Number)(((CIccTagCurve*)pCurves[0])->GetSize());
5144 nOutputEntries = (icUInt16Number)(((CIccTagCurve*)m_CurvesA[0])->GetSize());
5145
5146 if (!pIO->Write32(&sig) ||
5147 !pIO->Write32(&m_nReserved) ||
5148 !pIO->Write8(&m_nInput) ||
5149 !pIO->Write8(&m_nOutput) ||
5150 !pIO->Write8(&nGrid) ||
5151 !pIO->Write8(&m_nReservedByte) ||
5152 pIO->Write32(XYZMatrix, 9) != 9 ||
5153 !pIO->Write16(&nInputEntries) ||
5154 !pIO->Write16(&nOutputEntries))
5155 return false;
5156
5157 //B Curves
5158 for (i=0; i<m_nInput; i++) {
5159 if (pCurves[i]->GetType()!=icSigCurveType)
5160 return false;
5161
5162 pCurve = (CIccTagCurve*)pCurves[i];
5163 if (!pCurve)
5164 return false;
5165
5166 if (pIO->WriteUInt16Float(&(*pCurve)[0], nInputEntries) != nInputEntries)
5167 return false;
5168 }
5169
5170 //CLUT
5171 if (!m_CLUT->WriteData(pIO, 2))
5172 return false;
5173
5174 //A Curves
5175 pCurves = m_CurvesA;
5176
5177 for (i=0; i<m_nOutput; i++) {
5178 if (pCurves[i]->GetType()!=icSigCurveType)
5179 return false;
5180
5181 pCurve = (CIccTagCurve*)pCurves[i];
5182
5183 if (pIO->WriteUInt16Float(&(*pCurve)[0], nOutputEntries) != nOutputEntries)
5184 return false;
5185 }
5186 return true;
5187}
icInt32Number icS15Fixed16Number
Definition icProfileHeader.h:302
virtual icInt32Number Write8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:105
icInt32Number Write16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:122
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152
icInt32Number WriteUInt16Float(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:252
bool WriteData(CIccIO *pIO, icUInt8Number nPrecision)
Definition IccTagLut.cpp:1936
icUInt8Number GridPoints() const
Definition IccTagLut.h:349

References CIccTagCurve::GetSize(), CIccTag::GetType(), CIccTagLut16::GetType(), CIccCLUT::GridPoints(), icDtoF(), icSigCurveType, CIccMBB::m_bUseMCurvesAsBCurves, CIccMBB::m_CLUT, CIccMBB::m_CurvesA, CIccMBB::m_CurvesB, CIccMBB::m_CurvesM, CIccMatrix::m_e, CIccMBB::m_Matrix, CIccMBB::m_nInput, CIccMBB::m_nOutput, CIccTag::m_nReserved, CIccTagLut16::m_nReservedByte, CIccTagCurve::operator[](), CIccIO::Write16(), CIccIO::Write32(), CIccIO::Write8(), CIccCLUT::WriteData(), and CIccIO::WriteUInt16Float().

+ Here is the call graph for this function:

Field Documentation

◆ m_bInputMatrix

◆ m_bUseMCurvesAsBCurves

◆ m_CLUT

◆ m_csInput

◆ m_csOutput

◆ m_CurvesA

◆ m_CurvesB

◆ m_CurvesM

◆ m_Matrix

◆ m_nInput

◆ m_nOutput

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

◆ m_nReservedByte

icUInt8Number CIccTagLut16::m_nReservedByte
protectedinherited

◆ m_XYZMatrix


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