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

Class: CIccMBB. More...

#include <IccTagLut.h>

+ Inheritance diagram for CIccMBB:
+ Collaboration diagram for CIccMBB:

Public Member Functions

 CIccMBB ()
 Name: CIccMBB::CIccMBB.
 
 CIccMBB (const CIccMBB &IMBB)
 Name: CIccMBB::CIccMBB.
 
void Cleanup ()
 Name: CIccMBB::Cleanup.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccMBB::Describe.
 
CIccCLUTGetCLUT () const
 
icColorSpaceSignature GetCsInput ()
 
icColorSpaceSignature GetCsOutput ()
 
LPIccCurveGetCurvesA () const
 
LPIccCurveGetCurvesB () const
 
LPIccCurveGetCurvesM () const
 
CIccMatrixGetMatrix () const
 
virtual icUInt8Number GetPrecision ()
 
void Init (icUInt8Number nInputChannels, icUInt8Number nOutputChannels)
 Name: CIccMBB::Init.
 
icUInt8Number InputChannels () const
 
bool IsInputB ()
 
virtual bool IsInputMatrix ()
 
virtual bool IsMBBType ()
 
CIccCLUTNewCLUT (icUInt8Number *pGridPoints, icUInt8Number nPrecision=2)
 Name: CIccMBB::NewCLUT.
 
CIccCLUTNewCLUT (icUInt8Number nGridPoints, icUInt8Number nPrecision=2)
 Name: CIccMBB::NewCLUT.
 
virtual CIccTagNewCopy () const
 Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.
 
LPIccCurveNewCurvesA ()
 Name: CIccMBB::NewCurvesA.
 
LPIccCurveNewCurvesB ()
 Name: CIccMBB::NewCurvesB.
 
LPIccCurveNewCurvesM ()
 Name: CIccMBB::NewCurvesM.
 
CIccMatrixNewMatrix ()
 Name: CIccMBB::NewMatrix.
 
CIccMBBoperator= (const CIccMBB &IMBB)
 Name: CIccMBB::operator=.
 
icUInt8Number OutputChannels () const
 
CIccCLUTSetCLUT (CIccCLUT *clut)
 Name: CIccMBB::SetCLUT.
 
virtual void SetColorSpaces (icColorSpaceSignature csInput, icColorSpaceSignature csOutput)
 Name: CIccMBB::SetColorSpaces.
 
bool SwapMBCurves ()
 
virtual bool UseLegacyPCS () const
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL)
 Name: CIccMBB::Validate.
 
virtual ~CIccMBB ()
 Name: CIccMBB::~CIccMBB.
 
- Public Member Functions inherited from CIccTag
 CIccTag ()
 Name: CIccTag::CIccTag.
 
virtual void DetachIO ()
 Function: ReadAll() - Read All sub data for tag from file.
 
virtual const icCharGetClassName () const
 
virtual IIccExtensionTagGetExtension ()
 
virtual icArraySignature GetTagArrayType () const
 
virtual icStructSignature GetTagStructType () const
 
virtual icTagTypeSignature GetType () const
 Function: GetType()
 
virtual bool IsArrayType ()
 
virtual bool IsNumArrayType () const
 
virtual bool IsSupported ()
 Function: IsSupported(size, pIO) - Check if tag fully supported for apply purposes.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Function: Read(size, pIO) - Read tag from file.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO, CIccProfile *pProfile)
 Function: Read(size, pIO) - Read tag from file.
 
virtual bool ReadAll ()
 Function: ReadAll() - Read All sub data for tag from file.
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 Function: Validate Each derived tag will implement it's own IsValid() function.
 
virtual bool Write (CIccIO *pIO)
 Function: Write(pIO) Each derived tag will implement it's own Write() function.
 
virtual ~CIccTag ()
 Name: CIccTag::CIccTag.
 

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
 

Friends

class CIccXform3DLut
 
class CIccXform4DLut
 
class CIccXformNDLut
 

Additional Inherited Members

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

Detailed Description

Class: CIccMBB.

Purpose: The Multi-dimensional Black Box (MBB) base class for lut8, lut16, lutA2B and lutB2A tag types

Definition at line 427 of file IccTagLut.h.

Constructor & Destructor Documentation

◆ CIccMBB() [1/2]

CIccMBB::CIccMBB ( )

Name: CIccMBB::CIccMBB.

Purpose: Constructor

Definition at line 3135 of file IccTagLut.cpp.

3136{
3137 m_nInput = 0;
3138 m_nOutput = 0;
3139
3140 m_CurvesA = NULL;
3141 m_CLUT = NULL;
3142 m_Matrix = NULL;
3143 m_CurvesM = NULL;
3144 m_CurvesB = NULL;
3145
3148
3149 m_bInputMatrix = true;
3150 m_bUseMCurvesAsBCurves = false;
3151}
bool m_bInputMatrix
Definition IccTagLut.h:477
LPIccCurve * m_CurvesB
Definition IccTagLut.h:490
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
icColorSpaceSignature m_csOutput
Definition IccTagLut.h:484
bool m_bUseMCurvesAsBCurves
Definition IccTagLut.h:478
icColorSpaceSignature m_csInput
Definition IccTagLut.h:483
CIccMatrix * m_Matrix
Definition IccTagLut.h:488
#define icSigUnknownData

References icSigUnknownData.

◆ CIccMBB() [2/2]

CIccMBB::CIccMBB ( const CIccMBB & IMBB)

Name: CIccMBB::CIccMBB.

Purpose: Copy Constructor

Args: IMBB = The CIccMBB object to be copied

Definition at line 3164 of file IccTagLut.cpp.

3165{
3166 icUInt8Number nCurves;
3167 int i;
3168
3171 m_nInput = IMBB.m_nInput;
3172 m_nOutput = IMBB.m_nOutput;
3173 m_csInput = IMBB.m_csInput;
3174 m_csOutput = IMBB.m_csOutput;
3175
3176 if (IMBB.m_CLUT) {
3177 m_CLUT = new CIccCLUT(*IMBB.m_CLUT);
3178 }
3179 else
3180 m_CLUT = NULL;
3181
3182 if (IMBB.m_CurvesA) {
3183 nCurves = !IsInputB() ? m_nInput : m_nOutput;
3184
3185 m_CurvesA = new LPIccCurve[nCurves];
3186 for (i=0; i<nCurves; i++)
3187 m_CurvesA[i] = (CIccTagCurve*)IMBB.m_CurvesA[i]->NewCopy();
3188 }
3189 else {
3190 m_CurvesA = NULL;
3191 }
3192
3193 if (IMBB.m_CurvesM) {
3194 nCurves = IsInputMatrix() ? m_nInput : m_nOutput;
3195
3196 m_CurvesM = new LPIccCurve[nCurves];
3197 for (i=0; i<nCurves; i++)
3198 m_CurvesM[i] = (CIccTagCurve*)IMBB.m_CurvesM[i]->NewCopy();
3199 }
3200 else {
3201 m_CurvesM = NULL;
3202 }
3203
3204 if (IMBB.m_CurvesB) {
3205 nCurves = IsInputB() ? m_nInput : m_nOutput;
3206
3207 m_CurvesB = new LPIccCurve[nCurves];
3208 for (i=0; i<nCurves; i++)
3209 m_CurvesB[i] = (CIccTagCurve*)IMBB.m_CurvesB[i]->NewCopy();
3210 }
3211 else {
3212 m_CurvesB = NULL;
3213 }
3214
3215 if (IMBB.m_Matrix) {
3216 m_Matrix = new CIccMatrix(*IMBB.m_Matrix);
3217 }
3218 else {
3219 m_Matrix = NULL;
3220 }
3221}
Class: CIccCLUT.
Definition IccTagLut.h:326
Class: CIccCurve.
Definition IccTagLut.h:91
virtual CIccTag * NewCopy() const
Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.
Definition IccTagLut.h:94
bool IsInputB()
Definition IccTagLut.h:445
virtual bool IsInputMatrix()
Definition IccTagLut.h:442
Class: CIccMatrix.
Definition IccTagLut.h:260
Class: CIccTagCurve.
Definition IccTagLut.h:128
unsigned char icUInt8Number
Number definitions.

References m_bInputMatrix, m_bUseMCurvesAsBCurves, m_CLUT, m_csInput, m_csOutput, m_CurvesA, m_CurvesB, m_CurvesM, m_Matrix, m_nInput, m_nOutput, and CIccCurve::NewCopy().

+ Here is the call graph for this function:

◆ ~CIccMBB()

CIccMBB::~CIccMBB ( )
virtual

Name: CIccMBB::~CIccMBB.

Purpose: Destructor

Definition at line 3309 of file IccTagLut.cpp.

3310{
3311 Cleanup();
3312}
void Cleanup()
Name: CIccMBB::Cleanup.

Member Function Documentation

◆ Cleanup()

void CIccMBB::Cleanup ( )

Name: CIccMBB::Cleanup.

Purpose: Frees the memory allocated to the object

Definition at line 3322 of file IccTagLut.cpp.

3323{
3324 int i;
3325
3326 if (IsInputMatrix()) {
3327 if (m_CurvesB) {
3328 for (i=0; i<m_nInput; i++)
3329 if (m_CurvesB[i])
3330 delete m_CurvesB[i];
3331
3332 delete [] m_CurvesB;
3333 m_CurvesB = NULL;
3334 }
3335
3336 if (m_CurvesM) {
3337 for (i=0; i<m_nInput; i++)
3338 if (m_CurvesM[i])
3339 delete m_CurvesM[i];
3340
3341 delete [] m_CurvesM;
3342 m_CurvesM = NULL;
3343 }
3344
3345
3346 if (m_CurvesA) {
3347 for (i=0; i<m_nOutput; i++)
3348 if (m_CurvesA[i])
3349 delete m_CurvesA[i];
3350
3351 delete [] m_CurvesA;
3352 m_CurvesA = NULL;
3353 }
3354
3355 }
3356 else {
3357 if (m_CurvesA) {
3358 for (i=0; i<m_nInput; i++)
3359 if (m_CurvesA[i])
3360 delete m_CurvesA[i];
3361
3362 delete [] m_CurvesA;
3363 m_CurvesA = NULL;
3364 }
3365
3366 if (m_CurvesM) {
3367 for (i=0; i<m_nOutput; i++)
3368 if (m_CurvesM[i])
3369 delete m_CurvesM[i];
3370
3371 delete [] m_CurvesM;
3372 m_CurvesM = NULL;
3373 }
3374
3375 if (m_CurvesB) {
3376 for (i=0; i<m_nOutput; i++)
3377 if (m_CurvesB[i])
3378 delete m_CurvesB[i];
3379
3380 delete [] m_CurvesB;
3381 m_CurvesB = NULL;
3382 }
3383 }
3384
3385 if (m_Matrix) {
3386 delete m_Matrix;
3387 m_Matrix = NULL;
3388 }
3389
3390 if (m_CLUT) {
3391 delete m_CLUT;
3392 m_CLUT = NULL;
3393 }
3394}

◆ Describe()

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

Name: CIccMBB::Describe.

Purpose: Dump data associated with the tag to a string

Args: sDescription - string to concatenate tag dump to

Reimplemented from CIccTag.

Definition at line 3441 of file IccTagLut.cpp.

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

References icColorIndexName(), icSigLut16Type, and icSigLut8Type.

+ Here is the call graph for this function:

◆ GetCLUT()

CIccCLUT * CIccMBB::GetCLUT ( ) const
inline

Definition at line 469 of file IccTagLut.h.

469{return m_CLUT;}

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

+ Here is the caller graph for this function:

◆ GetCsInput()

icColorSpaceSignature CIccMBB::GetCsInput ( )
inline

Definition at line 458 of file IccTagLut.h.

458{ return m_csInput; }

◆ GetCsOutput()

icColorSpaceSignature CIccMBB::GetCsOutput ( )
inline

Definition at line 459 of file IccTagLut.h.

459{ return m_csOutput; }

◆ GetCurvesA()

LPIccCurve * CIccMBB::GetCurvesA ( ) const
inline

Definition at line 470 of file IccTagLut.h.

470{return m_CurvesA;}

Referenced by icMBBFromXml(), and icMBBToXml().

+ Here is the caller graph for this function:

◆ GetCurvesB()

LPIccCurve * CIccMBB::GetCurvesB ( ) const
inline

Definition at line 471 of file IccTagLut.h.

471{return m_CurvesB;}

Referenced by icMBBFromXml(), and icMBBToXml().

+ Here is the caller graph for this function:

◆ GetCurvesM()

LPIccCurve * CIccMBB::GetCurvesM ( ) const
inline

Definition at line 472 of file IccTagLut.h.

472{return m_CurvesM;}

Referenced by icMBBFromXml(), and icMBBToXml().

+ Here is the caller graph for this function:

◆ GetMatrix()

CIccMatrix * CIccMBB::GetMatrix ( ) const
inline

Definition at line 468 of file IccTagLut.h.

468{return m_Matrix; }

Referenced by icMBBFromXml(), and icMBBToXml().

+ Here is the caller graph for this function:

◆ GetPrecision()

virtual icUInt8Number CIccMBB::GetPrecision ( )
inlinevirtual

Reimplemented in CIccTagLut8.

Definition at line 441 of file IccTagLut.h.

441{ return 2; }

◆ Init()

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

Name: CIccMBB::Init.

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

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

Definition at line 3407 of file IccTagLut.cpp.

3408{
3409 Cleanup();
3410 m_nInput = nInputChannels;
3411 m_nOutput = nOutputChannels;
3412}

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

+ Here is the caller graph for this function:

◆ InputChannels()

icUInt8Number CIccMBB::InputChannels ( ) const
inline

Definition at line 451 of file IccTagLut.h.

451{ return m_nInput; }

Referenced by icMBBToXml().

+ Here is the caller graph for this function:

◆ IsInputB()

bool CIccMBB::IsInputB ( )
inline

Definition at line 445 of file IccTagLut.h.

445{ return IsInputMatrix(); }

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

+ Here is the caller graph for this function:

◆ IsInputMatrix()

virtual bool CIccMBB::IsInputMatrix ( )
inlinevirtual

Definition at line 442 of file IccTagLut.h.

442{ return m_bInputMatrix; } //Is matrix on input side of CLUT?

Referenced by icMBBFromXml(), icMBBToXml(), CIccTagLutAtoB::Read(), CIccTagLut16::SetColorSpaces(), CIccTagLut8::SetColorSpaces(), and CIccTagLutAtoB::Write().

+ Here is the caller graph for this function:

◆ IsMBBType()

virtual bool CIccMBB::IsMBBType ( )
inlinevirtual

Reimplemented from CIccTag.

Definition at line 439 of file IccTagLut.h.

439{ return true;}

◆ NewCLUT() [1/2]

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

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

Definition at line 3759 of file IccTagLut.cpp.

3760{
3761 if (m_CLUT)
3762 return m_CLUT;
3763
3764 m_CLUT = new CIccCLUT(m_nInput, m_nOutput, nPrecision);
3765
3766 m_CLUT->Init(pGridPoints);
3767
3768 return m_CLUT;
3769}
bool Init(icUInt8Number nGridPoints, icUInt32Number nMaxSize=0, icUInt8Number nBytesPerPoint=4)
Name: CIccCLUT::Init.

◆ NewCLUT() [2/2]

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

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

Definition at line 3812 of file IccTagLut.cpp.

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

Referenced by CDevLinkWriter::begin().

+ Here is the caller graph for this function:

◆ NewCopy()

virtual CIccTag * CIccMBB::NewCopy ( ) const
inlinevirtual

Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.

Parameter(s): none

Returns a new CIccTag object that is a copy of this object.

Reimplemented from CIccTag.

Reimplemented in CIccTagLut16, CIccTagLut8, CIccTagLutAtoB, and CIccTagLutBtoA.

Definition at line 436 of file IccTagLut.h.

436{return new CIccMBB(*this);}
CIccMBB()
Name: CIccMBB::CIccMBB.

◆ NewCurvesA()

LPIccCurve * CIccMBB::NewCurvesA ( )

Name: CIccMBB::NewCurvesA.

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

Return: Pointer to the LPIccCurve object

Definition at line 3670 of file IccTagLut.cpp.

3671{
3672 if (m_CurvesA)
3673 return m_CurvesA;
3674
3675 icUInt8Number nCurves = !IsInputB() ? m_nInput : m_nOutput;
3676
3677 m_CurvesA = new LPIccCurve[nCurves];
3678 memset(m_CurvesA, 0, nCurves * sizeof(LPIccCurve));
3679
3680 return m_CurvesA;
3681}

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

+ Here is the caller graph for this function:

◆ NewCurvesB()

LPIccCurve * CIccMBB::NewCurvesB ( )

Name: CIccMBB::NewCurvesB.

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

Return: Pointer to the LPIccCurve object

Definition at line 3715 of file IccTagLut.cpp.

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

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

+ Here is the caller graph for this function:

◆ NewCurvesM()

LPIccCurve * CIccMBB::NewCurvesM ( )

Name: CIccMBB::NewCurvesM.

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

Return: Pointer to the LPIccCurve object

Definition at line 3693 of file IccTagLut.cpp.

3694{
3695 if (m_CurvesM)
3696 return m_CurvesM;
3697
3699
3700 m_CurvesM = new LPIccCurve[nCurves];
3701 memset(m_CurvesM, 0, nCurves * sizeof(LPIccCurve));
3702
3703 return m_CurvesM;
3704}

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

+ Here is the caller graph for this function:

◆ NewMatrix()

CIccMatrix * CIccMBB::NewMatrix ( )

Name: CIccMBB::NewMatrix.

Purpose: Allocates memory for a new matrix

Return: Pointer to the CIccMatrix object

Definition at line 3737 of file IccTagLut.cpp.

3738{
3739 if (m_Matrix)
3740 return m_Matrix;
3741
3742 m_Matrix = new CIccMatrix;
3743
3744 return m_Matrix;
3745}

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

+ Here is the caller graph for this function:

◆ operator=()

CIccMBB & CIccMBB::operator= ( const CIccMBB & IMBB)

Name: CIccMBB::operator=.

Purpose: Copy Operator

Args: IMBB = The CIccMBB object to be copied

Definition at line 3234 of file IccTagLut.cpp.

3235{
3236 if (&IMBB == this)
3237 return *this;
3238
3239 Cleanup();
3240
3241 icUInt8Number nCurves;
3242 int i;
3243
3246 m_nInput = IMBB.m_nInput;
3247 m_nOutput = IMBB.m_nOutput;
3248 m_csInput = IMBB.m_csInput;
3249 m_csOutput = IMBB.m_csOutput;
3250
3251 if (IMBB.m_CLUT) {
3252 m_CLUT = new CIccCLUT(*IMBB.m_CLUT);
3253 }
3254 else
3255 m_CLUT = NULL;
3256
3257 if (IMBB.m_CurvesA) {
3258 nCurves = !IsInputB() ? m_nInput : m_nOutput;
3259
3260 m_CurvesA = new LPIccCurve[nCurves];
3261 for (i=0; i<nCurves; i++)
3262 m_CurvesA[i] = (CIccTagCurve*)IMBB.m_CurvesA[i]->NewCopy();
3263 }
3264 else {
3265 m_CurvesA = NULL;
3266 }
3267
3268 if (IMBB.m_CurvesM) {
3269 nCurves = IsInputMatrix() ? m_nInput : m_nOutput;
3270
3271 m_CurvesM = new LPIccCurve[nCurves];
3272 for (i=0; i<nCurves; i++)
3273 m_CurvesM[i] = (CIccTagCurve*)IMBB.m_CurvesM[i]->NewCopy();
3274 }
3275 else {
3276 m_CurvesM = NULL;
3277 }
3278
3279 if (IMBB.m_CurvesB) {
3280 nCurves = IsInputB() ? m_nInput : m_nOutput;
3281
3282 m_CurvesB = new LPIccCurve[nCurves];
3283 for (i=0; i<nCurves; i++)
3284 m_CurvesB[i] = (CIccTagCurve*)IMBB.m_CurvesB[i]->NewCopy();
3285 }
3286 else {
3287 m_CurvesB = NULL;
3288 }
3289
3290 if (IMBB.m_Matrix) {
3291 m_Matrix = new CIccMatrix(*IMBB.m_Matrix);
3292 }
3293 else {
3294 m_Matrix = NULL;
3295 }
3296
3297 return *this;
3298}

References m_bInputMatrix, m_bUseMCurvesAsBCurves, m_CLUT, m_csInput, m_csOutput, m_CurvesA, m_CurvesB, m_CurvesM, m_Matrix, m_nInput, m_nOutput, and CIccCurve::NewCopy().

Referenced by CIccTagLut16::operator=(), CIccTagLut8::operator=(), CIccTagLutAtoB::operator=(), and CIccTagLutBtoA::operator=().

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

◆ OutputChannels()

icUInt8Number CIccMBB::OutputChannels ( ) const
inline

Definition at line 452 of file IccTagLut.h.

452{ return m_nOutput; }

Referenced by icMBBToXml().

+ Here is the caller graph for this function:

◆ SetCLUT()

CIccCLUT * CIccMBB::SetCLUT ( CIccCLUT * clut)

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.

Definition at line 3785 of file IccTagLut.cpp.

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

References CIccCLUT::GetInputDim(), and CIccCLUT::GetOutputChannels().

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 )
virtual

Name: CIccMBB::SetColorSpaces.

Purpose: Sets the input and output color spaces

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

Reimplemented in CIccTagLut16, and CIccTagLut8.

Definition at line 3425 of file IccTagLut.cpp.

3426{
3427 m_csInput = csInput;
3428 m_csOutput = csOutput;
3429}

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

+ Here is the caller graph for this function:

◆ SwapMBCurves()

bool CIccMBB::SwapMBCurves ( )
inline

Definition at line 446 of file IccTagLut.h.

446{ return m_bUseMCurvesAsBCurves; }

Referenced by icMBBToXml().

+ Here is the caller graph for this function:

◆ UseLegacyPCS()

virtual bool CIccMBB::UseLegacyPCS ( ) const
inlinevirtual

Reimplemented in CIccTagLut16.

Definition at line 443 of file IccTagLut.h.

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

◆ Validate()

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

Name: CIccMBB::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 in CIccTagLut16, CIccTagLut8, CIccTagLutAtoB, and CIccTagLutBtoA.

Definition at line 3529 of file IccTagLut.cpp.

3530{
3531 icValidateStatus rv = CIccTag::Validate(sigPath, sReport, pProfile);
3532
3533 CIccInfo Info;
3534 std::string sSigPathName = Info.GetSigPathName(sigPath);
3536
3537 if (!pProfile) {
3538 sReport += icMsgValidateWarning;
3539 sReport += sSigPathName;
3540 sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
3542 return rv;
3543 }
3544 icUInt32Number nInput, nOutput;
3545
3546 //Check # of channels
3547 switch(sig) {
3548 case icSigAToB0Tag:
3549 case icSigAToB1Tag:
3550 case icSigAToB2Tag:
3551 case icSigAToB3Tag:
3552 {
3553 nInput = icGetSpaceSamples(pProfile->m_Header.colorSpace);
3554 if (m_nInput!=nInput) {
3555 sReport += icMsgValidateCriticalError;
3556 sReport += sSigPathName;
3557 sReport += " - Incorrect number of input channels.\n";
3559 }
3560
3561 nOutput = icGetSpaceSamples(pProfile->m_Header.pcs);
3562 if (m_nOutput!=nOutput) {
3563 sReport += icMsgValidateCriticalError;
3564 sReport += sSigPathName;
3565 sReport += " - Incorrect number of output channels.\n";
3567 }
3568
3569 break;
3570 }
3571 case icSigBToA0Tag:
3572 case icSigBToA1Tag:
3573 case icSigBToA2Tag:
3574 case icSigBToA3Tag:
3575 {
3576 nInput = icGetSpaceSamples(pProfile->m_Header.pcs);
3577 if (m_nInput!=nInput) {
3578 sReport += icMsgValidateCriticalError;
3579 sReport += sSigPathName;
3580 sReport += " - Incorrect number of input channels.\n";
3582 }
3583
3584 nOutput = icGetSpaceSamples(pProfile->m_Header.colorSpace);
3585 if (m_nOutput!=nOutput) {
3586 sReport += icMsgValidateCriticalError;
3587 sReport += sSigPathName;
3588 sReport += " - Incorrect number of output channels.\n";
3590 }
3591
3592 break;
3593 }
3594 case icSigHToS0Tag:
3595 case icSigHToS1Tag:
3596 case icSigHToS2Tag:
3597 case icSigHToS3Tag:
3598 {
3599 nInput = icGetSpaceSamples(pProfile->m_Header.pcs);
3600 if (m_nInput != nInput) {
3601 sReport += icMsgValidateCriticalError;
3602 sReport += sSigPathName;
3603 sReport += " - Incorrect number of input channels.\n";
3605 }
3606
3607 nOutput = icGetSpaceSamples(pProfile->m_Header.pcs);
3608 if (m_nOutput != nOutput) {
3609 sReport += icMsgValidateCriticalError;
3610 sReport += sSigPathName;
3611 sReport += " - Incorrect number of output channels.\n";
3613 }
3614
3615 break;
3616 }
3617 case icSigGamutTag:
3618 {
3619 nInput = 1;
3620 if (m_nInput!=nInput) {
3621 sReport += icMsgValidateCriticalError;
3622 sReport += sSigPathName;
3623 sReport += " - Incorrect number of input channels.\n";
3625 }
3626
3627 nOutput = icGetSpaceSamples(pProfile->m_Header.colorSpace);
3628 if (m_nOutput!=nOutput) {
3629 sReport += icMsgValidateCriticalError;
3630 sReport += sSigPathName;
3631 sReport += " - Incorrect number of output channels.\n";
3633 }
3634
3635 break;
3636 }
3637 default:
3638 {
3639 nInput = m_nInput;
3640 nOutput = m_nOutput;
3641 }
3642 }
3643
3644 //CLUT check
3645 if (nInput!=nOutput) {
3646 if (!m_CLUT) {
3647 sReport += icMsgValidateCriticalError;
3648 sReport += sSigPathName;
3649 sReport += " - CLUT must be present.\n";
3651 }
3652 }
3653
3654 if (m_CLUT) {
3655 rv = icMaxStatus(rv, m_CLUT->Validate(sigPath, sReport, pProfile));
3656 }
3657
3658 return rv;
3659}
icArraySignature sig
icValidateStatus
Definition IccDefs.h:118
@ icValidateWarning
Definition IccDefs.h:120
@ icValidateCriticalError
Definition IccDefs.h:122
icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Name: icMaxStatus.
Definition IccUtil.cpp:244
const char * icMsgValidateWarning
Definition IccUtil.cpp:90
icUInt32Number icGetSpaceSamples(icColorSpaceSignature sig)
Definition IccUtil.cpp:1303
const char * icMsgValidateCriticalError
Definition IccUtil.cpp:92
icSignature icGetFirstSigPathSig(std::string sigPath)
Definition IccUtil.cpp:1201
unsigned int icUInt32Number
icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
Name: CIccCLUT::Validate.
Type: Class.
Definition IccUtil.h:303
std::string GetSigPathName(std::string sigPath)
Definition IccUtil.cpp:1614
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
Function: Validate Each derived tag will implement it's own IsValid() function.
icUInt32Number icSignature
@ icSigBToA2Tag
@ icSigAToB3Tag
@ icSigHToS3Tag
@ icSigHToS2Tag
@ icSigAToB0Tag
@ icSigBToA1Tag
@ icSigAToB2Tag
@ icSigBToA0Tag
@ icSigHToS1Tag
@ icSigHToS0Tag
@ icSigAToB1Tag
@ icSigBToA3Tag
@ icSigGamutTag

References CIccInfo::GetSigPathName(), icGetFirstSigPathSig(), icGetSpaceSamples(), icMaxStatus(), icMsgValidateCriticalError, icMsgValidateWarning, icSigAToB0Tag, icSigAToB1Tag, icSigAToB2Tag, icSigAToB3Tag, icSigBToA0Tag, icSigBToA1Tag, icSigBToA2Tag, icSigBToA3Tag, icSigGamutTag, icSigHToS0Tag, icSigHToS1Tag, icSigHToS2Tag, icSigHToS3Tag, icValidateCriticalError, icValidateWarning, sig, and CIccTag::Validate().

Referenced by CIccTagLut16::Validate(), CIccTagLut8::Validate(), CIccTagLutAtoB::Validate(), and CIccTagLutBtoA::Validate().

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

Friends And Related Symbol Documentation

◆ CIccXform3DLut

friend class CIccXform3DLut
friend

Definition at line 429 of file IccTagLut.h.

◆ CIccXform4DLut

friend class CIccXform4DLut
friend

Definition at line 430 of file IccTagLut.h.

◆ CIccXformNDLut

friend class CIccXformNDLut
friend

Definition at line 431 of file IccTagLut.h.

Member Data Documentation

◆ m_bInputMatrix

bool CIccMBB::m_bInputMatrix
protected

Definition at line 477 of file IccTagLut.h.

Referenced by CIccMBB(), CIccTagLutBtoA::CIccTagLutBtoA(), and operator=().

◆ m_bUseMCurvesAsBCurves

bool CIccMBB::m_bUseMCurvesAsBCurves
protected

◆ m_CLUT

◆ m_csInput

icColorSpaceSignature CIccMBB::m_csInput
protected

Definition at line 483 of file IccTagLut.h.

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

◆ m_csOutput

icColorSpaceSignature CIccMBB::m_csOutput
protected

Definition at line 484 of file IccTagLut.h.

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

◆ m_CurvesA

◆ m_CurvesB

◆ m_CurvesM

◆ m_Matrix

◆ m_nInput

◆ m_nOutput


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