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

#include <IccTagLut.h>

+ Inheritance diagram for CIccTagLutAtoB:
+ Collaboration diagram for CIccTagLutAtoB:

Public Member Functions

 CIccTagLutAtoB ()
 
 CIccTagLutAtoB (const CIccTagLutAtoB &ITLA2B)
 
virtual ~CIccTagLutAtoB ()
 
void Cleanup ()
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 
virtual void DetachIO ()
 
virtual const icCharGetClassName () const
 
CIccCLUTGetCLUT () const
 
icColorSpaceSignature GetCsInput ()
 
icColorSpaceSignature GetCsOutput ()
 
LPIccCurveGetCurvesA () const
 
LPIccCurveGetCurvesB () const
 
LPIccCurveGetCurvesM () 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 ()
 
CIccTagLutAtoBoperator= (const CIccTagLutAtoB &ITLA2B)
 
icUInt8Number OutputChannels () const
 
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 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
 
icUInt16Number m_nReservedWord
 

Detailed Description

Class: CIccTagLutAtoB

Purpose: The LutA2B tag type

Constructor & Destructor Documentation

◆ CIccTagLutAtoB() [1/2]

CIccTagLutAtoB::CIccTagLutAtoB ( )

Name: CIccTagLutAtoB::CIccTagLutAtoB

Purpose: Constructor

3837{
3838 m_bInputMatrix = false;
3839 m_nReservedWord = 0;
3840}
bool m_bInputMatrix
Definition IccTagLut.h:477
icUInt16Number m_nReservedWord
Definition IccTagLut.h:517

References CIccMBB::m_bInputMatrix, and m_nReservedWord.

Referenced by CDevLinkWriter::begin().

+ Here is the caller graph for this function:

◆ CIccTagLutAtoB() [2/2]

CIccTagLutAtoB::CIccTagLutAtoB ( const CIccTagLutAtoB ITLA2B)

Name: CIccTagLutAtoB::CIccTagLutAtoB

Purpose: Copy Constructor

Args: ITLA2B = The CIccTagLutAtoB object to be copied

3853 : CIccMBB(ITLA2B)
3854{
3855 m_nReservedWord = 0;
3856}
CIccMBB()
Definition IccTagLut.cpp:3138

References CIccMBB::CIccMBB(), and m_nReservedWord.

Referenced by CIccTagLutBtoA::CIccTagLutBtoA(), and NewCopy().

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

◆ ~CIccTagLutAtoB()

CIccTagLutAtoB::~CIccTagLutAtoB ( )
virtual

Name: CIccTagLutAtoB::~CIccTagLutAtoB

Purpose: Destructor

3889{
3890}

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(), 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 icChar * CIccTag::GetClassName ( ) const
inlinevirtualinherited

Reimplemented in CIccTagUnknown, CIccTagText, CIccTagUtf8Text, CIccTagZipUtf8Text, CIccTagZipXml, CIccTagUtf16Text, CIccTagTextDescription, CIccTagSignature, CIccTagNamedColor2, CIccTagXYZ, CIccTagChromaticity, CIccTagCicp, CIccTagSparseMatrixArray, CIccTagFixedNum< T, Tsig >, 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, CIccTagGamutBoundaryDesc, CIccTagMultiProcessElement, CIccTagProfileSequenceId, 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, and CIccTagXmlArray.

139{ return "CIccTag"; }

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

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

◆ 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 CIccTagLutAtoB::GetType ( ) const
inlinevirtual

Function: GetType()

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

Reimplemented from CIccTag.

Reimplemented in CIccTagLutBtoA.

510{ return icSigLutAtoBType; }
@ icSigLutAtoBType
Definition icProfileHeader.h:546

References icSigLutAtoBType.

Referenced by Read(), Validate(), and 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=(), Read(), and 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?

References CIccMBB::m_bInputMatrix.

Referenced by CIccMBB::CIccMBB(), CIccMBB::Cleanup(), CIccMBB::Describe(), icMBBFromXml(), icMBBToXml(), CIccMBB::IsInputB(), CIccMBB::NewCurvesM(), CIccMBB::operator=(), Read(), CIccTagLut8::SetColorSpaces(), CIccTagLut16::SetColorSpaces(), and 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 * CIccTagLutAtoB::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 CIccMBB.

Reimplemented in CIccTagLutBtoA.

507{ return new CIccTagLutAtoB(*this); }
CIccTagLutAtoB()
Definition IccTagLut.cpp:3836

References CIccTagLutAtoB().

+ 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(), 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(), 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 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:

◆ operator=()

CIccTagLutAtoB & CIccTagLutAtoB::operator= ( const CIccTagLutAtoB ITLA2B)

Name: CIccTagLutAtoB::operator=

Purpose: Copy Operator

Args: ITLA2B = The CIccTagLutAtoB object to be copied

3870{
3871 if (&ITLA2B == this)
3872 return *this;
3873
3874 CIccMBB::operator=(ITLA2B);
3875
3876 return *this;
3877}
CIccMBB & operator=(const CIccMBB &IMBB)
Definition IccTagLut.cpp:3237

References CIccMBB::operator=().

+ Here is the call 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:

◆ Read() [1/2]

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

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

3908{
3910 icUInt32Number Offset[5], nStart, nEnd, nPos;
3911 icUInt8Number nCurves, i;
3912
3913 if (size<8*sizeof(icUInt32Number) || !pIO) {
3914 return false;
3915 }
3916
3917 nStart = pIO->Tell();
3918 nEnd = nStart + size;
3919
3920 if (!pIO->Read32(&sig) ||
3921 !pIO->Read32(&m_nReserved) ||
3922 !pIO->Read8(&m_nInput) ||
3923 !pIO->Read8(&m_nOutput) ||
3924 !pIO->Read16(&m_nReservedWord) ||
3925 pIO->Read32(Offset, 5)!=5)
3926 return false;
3927
3928 if (sig!=GetType())
3929 return false;
3930
3931 //B Curves
3932 if (Offset[0]) {
3933 nCurves = IsInputB() ? m_nInput : m_nOutput;
3934 LPIccCurve *pCurves = NewCurvesB();
3935
3936 if (pIO->Seek(nStart + Offset[0], icSeekSet)<0)
3937 return false;
3938
3939 for (i=0; i<nCurves; i++) {
3940 nPos = pIO->Tell();
3941
3942 if (!pIO->Read32(&sig))
3943 return false;
3944
3945 if (pIO->Seek(nPos, icSeekSet)<0)
3946 return false;
3947
3948 if (sig!=icSigCurveType &&
3950 return false;
3951
3952 pCurves[i] = (CIccCurve*)CIccTag::Create(sig);
3953
3954 if (!pCurves[i]->Read(nEnd - pIO->Tell(), pIO))
3955 return false;
3956
3957 if (!pIO->Sync32(Offset[0]))
3958 return false;
3959 }
3960 }
3961
3962 //Matrix
3963 if (Offset[1]) {
3965
3966 if (Offset[1] + 12*sizeof(icS15Fixed16Number) >size)
3967 return false;
3968
3969 m_Matrix = new CIccMatrix();
3970
3971 if (pIO->Seek(nStart + Offset[1], icSeekSet)<0)
3972 return false;
3973
3974 for (i=0; i<12; i++) {
3975 if (pIO->Read32(&tmp, 1)!=1)
3976 return false;
3977 m_Matrix->m_e[i] = icFtoD(tmp);
3978 }
3979 }
3980
3981
3982 //M Curves
3983 if (Offset[2]) {
3984 nCurves = IsInputMatrix() ? m_nInput : m_nOutput;
3985 LPIccCurve *pCurves = NewCurvesM();
3986
3987 if (pIO->Seek(nStart + Offset[2], icSeekSet)<0)
3988 return false;
3989
3990 for (i=0; i<nCurves; i++) {
3991 nPos = pIO->Tell();
3992
3993 if (!pIO->Read32(&sig))
3994 return false;
3995
3996 if (pIO->Seek(nPos, icSeekSet)<0)
3997 return false;
3998
3999 if (sig!=icSigCurveType &&
4001 return false;
4002
4003 pCurves[i] = (CIccCurve*)CIccTag::Create(sig);
4004
4005 if (!pCurves[i]->Read(nEnd - pIO->Tell(), pIO))
4006 return false;
4007
4008 if (!pIO->Sync32(Offset[2]))
4009 return false;
4010 }
4011 }
4012
4013 //CLUT
4014 if (Offset[3]) {
4015 if (pIO->Seek(nStart + Offset[3], icSeekSet)<0)
4016 return false;
4017
4019
4020 if (!m_CLUT->Read(nEnd - pIO->Tell(), pIO))
4021 return false;
4022 }
4023
4024 //A Curves
4025 if (Offset[4]) {
4026 nCurves = !IsInputB() ? m_nInput : m_nOutput;
4027 LPIccCurve *pCurves = NewCurvesA();
4028
4029 if (pIO->Seek(nStart + Offset[4], icSeekSet)<0)
4030 return false;
4031
4032 for (i=0; i<nCurves; i++) {
4033 nPos = pIO->Tell();
4034
4035 if (!pIO->Read32(&sig))
4036 return false;
4037
4038 if (pIO->Seek(nPos, icSeekSet)<0)
4039 return false;
4040
4041 if (sig!=icSigCurveType &&
4043 return false;
4044
4045 pCurves[i] = (CIccCurve*)CIccTag::Create(sig);
4046
4047 if (!pCurves[i]->Read(nEnd - pIO->Tell(), pIO))
4048 return false;
4049
4050 if (!pIO->Sync32(Offset[4]))
4051 return false;
4052 }
4053 }
4054 return true;
4055}
unsigned long icUInt32Number
Definition icProfileHeader.h:262
icTagTypeSignature
Definition icProfileHeader.h:526
@ icSigParametricCurveType
Definition icProfileHeader.h:552
@ icSigCurveType
Definition icProfileHeader.h:533
icInt32Number icS15Fixed16Number
Definition icProfileHeader.h:302
@ icSeekSet
Definition IccIO.h:83
ICCPROFLIB_API icFloatNumber icFtoD(icS15Fixed16Number num)
Definition IccUtil.cpp:559
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
virtual icInt32Number Seek(icInt32Number nOffset, icSeekVal pos)
Definition IccIO.h:132
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143
bool Sync32(icUInt32Number nOffset=0)
Operation to make sure read position is evenly divisible by 4.
Definition IccIO.cpp:357
icUInt32Number m_nReserved
Definition IccTagBasic.h:235
static CIccTag * Create(icTagTypeSignature sig)
Definition IccTagBasic.cpp:143
icFloatNumber m_e[12]
Definition IccTagLut.h:269
bool Read(icUInt32Number size, CIccIO *pIO)
Definition IccTagLut.cpp:1969
LPIccCurve * NewCurvesB()
Definition IccTagLut.cpp:3718
LPIccCurve * NewCurvesM()
Definition IccTagLut.cpp:3696
LPIccCurve * NewCurvesA()
Definition IccTagLut.cpp:3673
virtual icTagTypeSignature GetType() const
Definition IccTagLut.h:510
bool Read(icUInt32Number size, CIccIO *pIO)
Definition IccTagLut.cpp:3907

References CIccCLUT::CIccCLUT(), CIccMatrix::CIccMatrix(), CIccTag::Create(), GetType(), icFtoD(), icSeekSet, icSigCurveType, icSigParametricCurveType, CIccMBB::IsInputB(), CIccMBB::IsInputMatrix(), CIccMBB::m_CLUT, CIccMatrix::m_e, CIccMBB::m_Matrix, CIccMBB::m_nInput, CIccMBB::m_nOutput, CIccTag::m_nReserved, m_nReservedWord, CIccMBB::NewCurvesA(), CIccMBB::NewCurvesB(), CIccMBB::NewCurvesM(), CIccTag::Read(), CIccCLUT::Read(), CIccIO::Read16(), CIccIO::Read32(), CIccIO::Read8(), CIccIO::Seek(), CIccIO::Sync32(), 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 CIccMBB::SetColorSpaces ( icColorSpaceSignature  csInput,
icColorSpaceSignature  csOutput 
)
virtualinherited

Name: CIccMBB::SetColorSpaces

Purpose: Sets the input and output color spaces

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

Reimplemented in CIccTagLut8, and CIccTagLut16.

3429{
3430 m_csInput = csInput;
3431 m_csOutput = csOutput;
3432}

References CIccMBB::m_csInput, and CIccMBB::m_csOutput.

Referenced by CIccProfileXml::ParseTag(), CIccTagLut8::SetColorSpaces(), and CIccTagLut16::SetColorSpaces().

+ Here is the caller 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:

◆ UseLegacyPCS()

virtual bool CIccMBB::UseLegacyPCS ( ) const
inlinevirtualinherited

Reimplemented in CIccTagLut16.

443{ return false; } //Treat Lab Encoding differently?

◆ Validate() [1/2]

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

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

Reimplemented in CIccTagLutBtoA.

4195{
4196 icValidateStatus rv = CIccMBB::Validate(sigPath, sReport, pProfile);
4197
4198 CIccInfo Info;
4199 std::string sSigPathName = Info.GetSigPathName(sigPath);
4200 icSignature sig = icGetFirstSigPathSig(sigPath);
4201
4202 if (!pProfile) {
4203 return rv;
4204 }
4205
4206 switch(sig) {
4207 case icSigAToB0Tag:
4208 case icSigAToB1Tag:
4209 case icSigAToB2Tag:
4210 {
4211 icUInt32Number nInput = icGetSpaceSamples(pProfile->m_Header.colorSpace);
4212
4213 icUInt32Number nOutput = icGetSpaceSamples(pProfile->m_Header.pcs);
4214
4215 icUInt8Number i;
4216 if (m_CurvesB) {
4217 for (i=0; i<nOutput; i++) {
4218 if (m_CurvesB[i]) {
4219 rv = icMaxStatus(rv, m_CurvesB[i]->Validate(sigPath+icGetSigPath(GetType()), sReport, pProfile));
4220 }
4221 else {
4222 sReport += icMsgValidateCriticalError;
4223 sReport += sSigPathName;
4224 sReport += " - Incorrect number of B-curves.\n";
4226 }
4227 }
4228 }
4229
4230 if (m_CurvesM) {
4231 for (i=0; i<nOutput; i++) {
4232 if (m_CurvesM[i]) {
4233 rv = icMaxStatus(rv, m_CurvesM[i]->Validate(sigPath+icGetSigPath(GetType()), sReport, pProfile));
4234 }
4235 else {
4236 sReport += icMsgValidateCriticalError;
4237 sReport += sSigPathName;
4238 sReport += " - Incorrect number of M-curves.\n";
4240 }
4241 }
4242 }
4243
4244 if (m_CurvesA) {
4245 if (!m_CLUT) {
4246 sReport += icMsgValidateNonCompliant;
4247 sReport += sSigPathName;
4248 sReport += " - CLUT must be present if using A-curves.\n";
4249
4251 }
4252
4253 for (i=0; i<nInput; i++) {
4254 if (m_CurvesA[i]) {
4255 rv = icMaxStatus(rv, m_CurvesA[i]->Validate(sigPath+icGetSigPath(GetType()), sReport, pProfile));
4256 }
4257 else {
4258 sReport += icMsgValidateCriticalError;
4259 sReport += sSigPathName;
4260 sReport += " - Incorrect number of A-curves.\n";
4262 }
4263 }
4264
4265 }
4266
4267 break;
4268 }
4269 default:
4270 {
4271 }
4272 }
4273
4274
4275 return rv;
4276}
icUInt32Number icSignature
Definition icProfileHeader.h:271
@ icSigAToB0Tag
Definition icProfileHeader.h:342
@ icSigAToB2Tag
Definition icProfileHeader.h:344
@ icSigAToB1Tag
Definition icProfileHeader.h:343
icValidateStatus
Definition IccDefs.h:119
@ icValidateCriticalError
Definition IccDefs.h:123
@ icValidateNonCompliant
Definition IccDefs.h:122
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 * icMsgValidateCriticalError
Definition IccUtil.cpp:92
ICCPROFLIB_API icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Definition IccUtil.cpp:244
ICCPROFLIB_API const char * icMsgValidateNonCompliant
Definition IccUtil.cpp:91
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)
Definition IccTagLut.cpp:3532
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL)
Definition IccTagLut.cpp:4194

References icHeader::colorSpace, CIccInfo::GetSigPathName(), GetType(), icGetFirstSigPathSig(), icGetSigPath(), icGetSpaceSamples(), icMaxStatus(), icMsgValidateCriticalError, icMsgValidateNonCompliant, icSigAToB0Tag, icSigAToB1Tag, icSigAToB2Tag, icValidateCriticalError, icValidateNonCompliant, CIccMBB::m_CLUT, CIccMBB::m_CurvesA, CIccMBB::m_CurvesB, CIccMBB::m_CurvesM, icHeader::pcs, CIccMBB::Validate(), and CIccTag::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

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

Referenced by CIccTagGamutBoundaryDesc::Validate(), CIccMBB::Validate(), 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 CIccTagLutAtoB::Write ( CIccIO pIO)
virtual

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

4073{
4075 icUInt32Number Offset[5], nStart, nEnd, nOffsetPos;
4076 icUInt8Number nCurves, i;
4077
4078 nStart = pIO->Tell();
4079 memset(&Offset[0], 0, sizeof(Offset));
4080
4081 if (!pIO->Write32(&sig) ||
4082 !pIO->Write32(&m_nReserved) ||
4083 !pIO->Write8(&m_nInput) ||
4084 !pIO->Write8(&m_nOutput) ||
4085 !pIO->Write16(&m_nReservedWord))
4086 return false;
4087
4088 nOffsetPos = pIO->Tell();
4089 if (pIO->Write32(Offset, 5)!=5)
4090 return false;
4091
4092 //B Curves
4093 if (m_CurvesB) {
4094 Offset[0] = pIO->Tell() - nStart;
4095 nCurves = IsInputB() ? m_nInput : m_nOutput;
4096
4097 for (i=0; i<nCurves; i++) {
4098 if (!m_CurvesB[i])
4099 return false;
4100
4101 if (!m_CurvesB[i]->Write(pIO))
4102 return false;
4103
4104 if (!pIO->Align32())
4105 return false;
4106 }
4107 }
4108
4109 //Matrix
4110 if (m_Matrix) {
4112
4113 Offset[1] = pIO->Tell() - nStart;
4114
4115 for (i=0; i<12; i++) {
4116 tmp = icDtoF(m_Matrix->m_e[i]);
4117 if (pIO->Write32(&tmp, 1)!=1)
4118 return false;
4119 }
4120 }
4121
4122
4123 //M Curves
4124 if (m_CurvesM) {
4125 Offset[2] = pIO->Tell() - nStart;
4126 nCurves = IsInputMatrix() ? m_nInput : m_nOutput;
4127
4128 for (i=0; i<nCurves; i++) {
4129 if (!m_CurvesM[i])
4130 return false;
4131
4132 if (!m_CurvesM[i]->Write(pIO))
4133 return false;
4134
4135 if (!pIO->Align32())
4136 return false;
4137 }
4138 }
4139
4140 //CLUT
4141 if (m_CLUT) {
4142 Offset[3] = pIO->Tell() - nStart;
4143
4144 if (!m_CLUT->Write(pIO))
4145 return false;
4146
4147 if (!pIO->Align32())
4148 return false;
4149 }
4150
4151 //A Curves
4152 if (m_CurvesA) {
4153 Offset[4] = pIO->Tell() - nStart;
4154 nCurves = !IsInputB() ? m_nInput : m_nOutput;
4155
4156 for (i=0; i<nCurves; i++) {
4157 if (!m_CurvesA[i])
4158 return false;
4159
4160 if (!m_CurvesA[i]->Write(pIO))
4161 return false;
4162
4163 if (!pIO->Align32())
4164 return false;
4165 }
4166 }
4167
4168 nEnd = pIO->Tell();
4169
4170 if (!pIO->Seek(nOffsetPos, icSeekSet))
4171 return false;
4172
4173 if (pIO->Write32(&Offset[0], 5)!=5)
4174 return false;
4175
4176 return pIO->Seek(nEnd, icSeekSet)>=0;
4177}
ICCPROFLIB_API icS15Fixed16Number icDtoF(icFloatNumber num)
Definition IccUtil.cpp:545
virtual icInt32Number Write8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:105
icInt32Number Write16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:122
bool Align32()
Write operation to make sure that filelength is evenly divisible by 4.
Definition IccIO.cpp:341
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152
bool Write(CIccIO *pIO)
Definition IccTagLut.cpp:1999
bool Write(CIccIO *pIO)
Definition IccTagLut.cpp:4072

References CIccIO::Align32(), GetType(), icDtoF(), icSeekSet, CIccMBB::IsInputB(), CIccMBB::IsInputMatrix(), 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, m_nReservedWord, CIccIO::Seek(), CIccIO::Tell(), CIccTag::Write(), CIccCLUT::Write(), CIccIO::Write16(), CIccIO::Write32(), and CIccIO::Write8().

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

◆ m_nReservedWord

icUInt16Number CIccTagLutAtoB::m_nReservedWord
protected

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