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

Class: CIccTagMultiProcessElement. More...

#include <IccTagMPE.h>

+ Inheritance diagram for CIccTagMultiProcessElement:
+ Collaboration diagram for CIccTagMultiProcessElement:

Public Member Functions

virtual void Apply (CIccApplyTagMpe *pApply, icFloatNumber *pDestPixel, const icFloatNumber *pSrcPixel) const
 Name: CIccTagMultiProcessElement::Apply.
 
virtual void Attach (CIccMultiProcessElement *pElement)
 Name: CIccTagMultiProcessElement::Attach.
 
virtual bool Begin (icElemInterp nInterp=icElemInterpLinear, IIccProfileConnectionConditions *pProfilePCC=NULL, IIccProfileConnectionConditions *pAppliedPCC=NULL, IIccCmmEnvVarLookup *pCmmEnvVarLookup=NULL)
 Name: CIccTagMultiProcessElement::Begin.
 
 CIccTagMultiProcessElement (const CIccTagMultiProcessElement &lut)
 Name: CIccTagMultiProcessElement::CIccTagMultiProcessElement.
 
 CIccTagMultiProcessElement (icUInt16Number nInputChannels=0, icUInt16Number nOutputChannels=0)
 Name: CIccTagMultiProcessElement::CIccTagMultiProcessElement.
 
void DeleteElement (int nIndex)
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccTagMultiProcessElement::Describe.
 
IIccProfileConnectionConditionsGetAppliedPCC ()
 
virtual const icCharGetClassName () const
 
IIccCmmEnvVarLookupGetCmmEnvLookup ()
 
CIccMultiProcessElementGetElement (int nIndex)
 Name: CIccTagMultiProcessElement::GetElement.
 
virtual CIccApplyTagMpeGetNewApply ()
 Name: CIccTagMultiProcessElement::GetNewApply.
 
IIccProfileConnectionConditionsGetProfilePCC ()
 
virtual icTagTypeSignature GetType () const
 Function: GetType()
 
virtual void Insert (CIccMultiProcessElement *pElement)
 Name: CIccTagMultiProcessElement::Insert.
 
bool IsLateBinding () const
 Name: CIccTagMultiProcessElement::IsLateBinding.
 
bool IsLateBindingReflectance () const
 Name: CIccTagMultiProcessElement::IsLateBindingReflectance.
 
virtual bool IsSupported ()
 Name: CIccTagMultiProcessElement::IsSupported.
 
virtual CIccTagNewCopy () const
 Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.
 
icUInt32Number NumElements () const
 
icUInt16Number NumInputChannels () const
 
icUInt16Number NumOutputChannels () const
 
CIccTagMultiProcessElementoperator= (const CIccTagMultiProcessElement &lut)
 Name: &operator=.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Name: CIccTagMultiProcessElement::Read.
 
void SetChannels (icUInt16Number nInputChannels, icUInt16Number nOutputChannels)
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 Name: CIccTagMultiProcessElement::Validate.
 
virtual bool Write (CIccIO *pIO)
 Name: CIccTagMultiProcessElement::Write.
 
virtual ~CIccTagMultiProcessElement ()
 Name: CIccTagMultiProcessElement::~CIccTagMultiProcessElement.
 
- Public Member Functions inherited from CIccTag
 CIccTag ()
 Name: CIccTag::CIccTag.
 
virtual void DetachIO ()
 Function: ReadAll() - Read All sub data for tag from file.
 
virtual IIccExtensionTagGetExtension ()
 
virtual icArraySignature GetTagArrayType () const
 
virtual icStructSignature GetTagStructType () const
 
virtual bool IsArrayType ()
 
virtual bool IsMBBType ()
 
virtual bool IsNumArrayType () const
 
virtual bool Read (icUInt32Number size, CIccIO *pIO, CIccProfile *pProfile)
 Function: Read(size, pIO) - Read tag from file.
 
virtual bool ReadAll ()
 Function: ReadAll() - Read All sub data for tag from file.
 
virtual ~CIccTag ()
 Name: CIccTag::CIccTag.
 

Protected Member Functions

virtual void Clean ()
 Name: CIccTagMultiProcessElement::Clean.
 
virtual icInt32Number ElementIndex (CIccMultiProcessElement *pElem)
 Name: CIccTagMultiProcessElement::ElementIndex.
 
virtual CIccMultiProcessElementList::iterator GetFirstElem ()
 
virtual CIccMultiProcessElementList::iterator GetLastElem ()
 
virtual void GetNextElemIterator (CIccMultiProcessElementList::iterator &itr)
 Name: CIccTagMultiProcessElement::GetNextElemIterator.
 

Protected Attributes

CIccMultiProcessElementListm_list
 
icUInt16Number m_nBufChannels
 
icUInt16Number m_nInputChannels
 
icUInt16Number m_nOutputChannels
 
icUInt32Number m_nProcElements
 
IIccProfileConnectionConditionsm_pAppliedPCC
 
IIccCmmEnvVarLookupm_pCmmEnvVarLookup
 
icPositionNumberm_position
 
IIccProfileConnectionConditionsm_pProfilePCC
 

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: CIccTagMultiProcessElement.

Purpose: A general purpose processing tag

Definition at line 357 of file IccTagMPE.h.

Constructor & Destructor Documentation

◆ CIccTagMultiProcessElement() [1/2]

CIccTagMultiProcessElement::CIccTagMultiProcessElement ( icUInt16Number nInputChannels = 0,
icUInt16Number nOutputChannels = 0 )

Name: CIccTagMultiProcessElement::CIccTagMultiProcessElement.

Purpose:

Args:

Return:

Definition at line 695 of file IccTagMPE.cpp.

696{
697 m_nReserved = 0;
698 m_list = NULL;
699 m_nProcElements = 0;
700 m_position = NULL;
701 m_nBufChannels = 0;
702
703 m_nInputChannels = nInputChannels;
704 m_nOutputChannels = nOutputChannels;
705
706 m_pAppliedPCC = NULL;
707 m_pProfilePCC = NULL;
708
709 m_pCmmEnvVarLookup = NULL;
710}
icUInt32Number m_nReserved
icUInt16Number m_nInputChannels
Definition IccTagMPE.h:415
IIccCmmEnvVarLookup * m_pCmmEnvVarLookup
Definition IccTagMPE.h:431
icUInt16Number m_nOutputChannels
Definition IccTagMPE.h:416
CIccMultiProcessElementList * m_list
Definition IccTagMPE.h:419
IIccProfileConnectionConditions * m_pAppliedPCC
Definition IccTagMPE.h:429
icUInt32Number m_nProcElements
Definition IccTagMPE.h:422
icUInt16Number m_nBufChannels
Definition IccTagMPE.h:426
icPositionNumber * m_position
Definition IccTagMPE.h:423
IIccProfileConnectionConditions * m_pProfilePCC
Definition IccTagMPE.h:428

◆ CIccTagMultiProcessElement() [2/2]

CIccTagMultiProcessElement::CIccTagMultiProcessElement ( const CIccTagMultiProcessElement & lut)

Name: CIccTagMultiProcessElement::CIccTagMultiProcessElement.

Purpose:

Args:

Return:

Definition at line 722 of file IccTagMPE.cpp.

723{
724 m_position = NULL;
725 m_list = NULL;
726 m_nProcElements = 0;
727
729
730 if (lut.m_list) {
732
733 CIccMultiProcessElementList::iterator i;
735
736 for (i=lut.m_list->begin(); i!= lut.m_list->end(); i++) {
737 ptr.ptr = (CIccMultiProcessElement*)i->ptr->NewCopy();
738 m_list->push_back(ptr);
739 }
740 }
743
744 if (lut.m_nProcElements && lut.m_position) {
746 if (m_position) {
747 memcpy(m_position, lut.m_position, lut.m_nProcElements*sizeof(icPositionNumber));
748 }
750 }
751
754
756}
std::list< CIccMultiProcessElementPtr > CIccMultiProcessElementList
Definition IccTagMPE.h:120
Class: CIccMultiProcessElement.
Definition IccTagMPE.h:146
virtual CIccMultiProcessElement * NewCopy() const =0
Class: CIccProcessElementPtr.
Definition IccTagMPE.h:115
CIccMultiProcessElement * ptr
Definition IccTagMPE.h:117

References m_list, m_nInputChannels, m_nOutputChannels, m_nProcElements, CIccTag::m_nReserved, m_pAppliedPCC, m_pCmmEnvVarLookup, m_position, m_pProfilePCC, CIccMultiProcessElement::NewCopy(), and CIccMultiProcessElementPtr::ptr.

+ Here is the call graph for this function:

◆ ~CIccTagMultiProcessElement()

CIccTagMultiProcessElement::~CIccTagMultiProcessElement ( )
virtual

Name: CIccTagMultiProcessElement::~CIccTagMultiProcessElement.

Purpose:

Args:

Return:

Definition at line 814 of file IccTagMPE.cpp.

815{
816 Clean();
817}
virtual void Clean()
Name: CIccTagMultiProcessElement::Clean.

Member Function Documentation

◆ Apply()

void CIccTagMultiProcessElement::Apply ( CIccApplyTagMpe * pApply,
icFloatNumber * pDestPixel,
const icFloatNumber * pSrcPixel ) const
virtual

Name: CIccTagMultiProcessElement::Apply.

Purpose:

Args:

Return:

Definition at line 1440 of file IccTagMPE.cpp.

1441{
1442 if (!pApply || !pApply->GetList() || !pApply->GetList()->size()) {
1443 memcpy(pDestPixel, pSrcPixel, m_nInputChannels*sizeof(icFloatNumber));
1444 return;
1445 }
1446
1447#ifdef DEBUG_MPE_APPLY
1448 int nCount = 0;
1449 printf("Start of MPE APPLY\n");
1450 DumpMpeApplyPixe(nCount++, pSrcPixel, m_nInputChannels);
1451#endif
1452
1453 CIccDblPixelBuffer *pApplyBuf = pApply->GetBuf();
1454 CIccApplyMpeIter i = pApply->begin();
1455 CIccApplyMpeIter next;
1456
1457 next = i;
1458 next++;
1459
1460 if (next==pApply->end()) {
1461 //Elements rely on pDestPixel != pSrcPixel
1462 if (pSrcPixel==pDestPixel) {
1463 i->ptr->Apply(pApplyBuf->GetDstBuf(), pSrcPixel);
1464 memcpy(pDestPixel, pApplyBuf->GetDstBuf(), m_nOutputChannels*sizeof(icFloatNumber));
1465 }
1466 else {
1467 i->ptr->Apply(pDestPixel, pSrcPixel);
1468 }
1469#ifdef DEBUG_MPE_APPLY
1470 DumpMpeApplyPixe(nCount++, pSrcPixel, m_nInputChannels);
1471#endif
1472 }
1473 else {
1474 i->ptr->Apply(pApplyBuf->GetDstBuf(), pSrcPixel);
1475
1476#ifdef DEBUG_MPE_APPLY
1477 DumpMpeApplyPixe(nCount++, pApplyBuf->GetDstBuf(), m_nInputChannels);
1478#endif
1479
1480 i++;
1481 next++;
1482 pApplyBuf->Switch();
1483
1484 while (next != pApply->end()) {
1485 CIccMultiProcessElement *pElem = i->ptr->GetElem();
1486
1487 if (!pElem->IsAcs()) {
1488 i->ptr->Apply(pApplyBuf->GetDstBuf(), pApplyBuf->GetSrcBuf());
1489
1490#ifdef DEBUG_MPE_APPLY
1491 DumpMpeApplyPixe(nCount++, pApplyBuf->GetDstBuf(), m_nInputChannels);
1492#endif
1493
1494 pApplyBuf->Switch();
1495 }
1496
1497 i++;
1498 next++;
1499 }
1500
1501 i->ptr->Apply(pDestPixel, pApplyBuf->GetSrcBuf());
1502
1503#ifdef DEBUG_MPE_APPLY
1504 DumpMpeApplyPixe(nCount++, pDestPixel, m_nInputChannels);
1505#endif
1506
1507 }
1508
1509#ifdef DEBUG_MPE_APPLY
1510 printf("End MPE Apply\n\n");
1511#endif
1512
1513}
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
CIccApplyMpeList::iterator CIccApplyMpeIter
Definition IccTagMPE.h:130
CIccDblPixelBuffer * GetBuf()
Definition IccTagMPE.h:330
CIccApplyMpeIter end()
Definition IccTagMPE.h:334
CIccApplyMpeList * GetList()
Definition IccTagMPE.h:331
CIccApplyMpeIter begin()
Definition IccTagMPE.h:333
Class: CIccDblPixelBuffer.
Definition IccTagMPE.h:278
icFloatNumber * GetSrcBuf()
Definition IccTagMPE.h:297
icFloatNumber * GetDstBuf()
Definition IccTagMPE.h:298
virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *pDestPixel, const icFloatNumber *pSrcPixel) const =0
virtual bool IsAcs()
Definition IccTagMPE.h:177

References CIccMultiProcessElement::Apply(), CIccApplyTagMpe::begin(), CIccApplyTagMpe::end(), CIccApplyTagMpe::GetBuf(), CIccDblPixelBuffer::GetDstBuf(), CIccApplyTagMpe::GetList(), CIccDblPixelBuffer::GetSrcBuf(), CIccMultiProcessElement::IsAcs(), and CIccDblPixelBuffer::Switch().

Referenced by main().

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

◆ Attach()

void CIccTagMultiProcessElement::Attach ( CIccMultiProcessElement * pElement)
virtual

Name: CIccTagMultiProcessElement::Attach.

Purpose:

Args:

Return:

Definition at line 922 of file IccTagMPE.cpp.

923{
924 if (!m_list) {
926 }
927
929
930 ptr.ptr = pElement;
931
932 m_list->push_back(ptr);
933}

References CIccMultiProcessElementPtr::ptr.

Referenced by CDevLinkWriter::begin(), CIccDefaultEncProfileConverter::ConvertFromParams(), and main().

+ Here is the caller graph for this function:

◆ Begin()

bool CIccTagMultiProcessElement::Begin ( icElemInterp nInterp = icElemInterpLinear,
IIccProfileConnectionConditions * pProfilePCC = NULL,
IIccProfileConnectionConditions * pAppliedPCC = NULL,
IIccCmmEnvVarLookup * pCmmEnvVarLookup = NULL )
virtual

Name: CIccTagMultiProcessElement::Begin.

Purpose: Initialize for application of processing element

Args: nInterp defines interpolation to use for N-Dimensional LUTs pPCC provides Profile Connection Conditions (only expected to be valid during call to Begin)

Return: true if initialization successful, false if not

Definition at line 1286 of file IccTagMPE.cpp.

1290{
1291 if (!m_list || !m_list->size()) {
1293 return false;
1294 else
1295 return true;
1296 }
1297
1298 m_pProfilePCC = pProfilePCC;
1299 m_pAppliedPCC = pAppliedPCC;
1300 m_pCmmEnvVarLookup = pCmmEnvVarLookup;
1301
1302 CIccMultiProcessElementList::iterator i;
1303
1305
1306 //Now we initialize each processing element checking channel matching as we go
1307 CIccMultiProcessElement *last=NULL;
1308 i = m_list->begin();
1309 if (i->ptr->NumInputChannels() != m_nInputChannels)
1310 return false;
1311
1312 for (; i!= m_list->end(); i++) {
1313 if (last) {
1314 if (i->ptr->NumInputChannels() != last->NumOutputChannels())
1315 return false;
1316 }
1317 last = i->ptr;
1318
1319 if (last) {
1322
1323 if (!last->Begin(nInterp, this))
1324 return false;
1325 }
1326 }
1327
1328 //The output channels must match
1329 if (last && last->NumOutputChannels() != m_nOutputChannels)
1330 return false;
1331
1332 m_pAppliedPCC = NULL;
1333 m_pProfilePCC = NULL;
1334
1335 return true;
1336}
virtual icUInt16Number NumOutputChannels() const
Definition IccTagMPE.h:160
virtual bool Begin(icElemInterp nIterp=icElemInterpLinear, CIccTagMultiProcessElement *pMPE=NULL)=0
icUInt16Number NumOutputChannels() const
Definition IccTagMPE.h:394

References CIccMultiProcessElement::Begin(), and CIccMultiProcessElement::NumOutputChannels().

Referenced by main().

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

◆ Clean()

void CIccTagMultiProcessElement::Clean ( )
protectedvirtual

Name: CIccTagMultiProcessElement::Clean.

Purpose:

Args:

Return:

Definition at line 831 of file IccTagMPE.cpp.

832{
833 if (m_list) {
834 CIccLutPtrMap map;
835 CIccMultiProcessElementList::iterator i;
836
837 for (i=m_list->begin(); i!=m_list->end(); i++) {
838 if (!map[i->ptr].offset) {
839 map[i->ptr].offset = 1;
840 delete i->ptr;
841 }
842 }
843
844 delete m_list;
845 m_list = NULL;
846 }
847
848 if (m_position) {
849 free(m_position);
850 m_position = NULL;
851 }
852
853 m_nProcElements = 0;
854}
std::map< CIccMultiProcessElement *, icPositionNumber > CIccLutPtrMap

◆ DeleteElement()

void CIccTagMultiProcessElement::DeleteElement ( int nIndex)

◆ Describe()

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

Name: CIccTagMultiProcessElement::Describe.

Purpose:

Args:

Return:

Reimplemented from CIccTag.

Definition at line 892 of file IccTagMPE.cpp.

893{
894 icChar buf[128];
895
896 sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\n", m_nInputChannels, m_nOutputChannels);
897 sDescription += buf;
898 sDescription += "\n";
899
900 CIccMultiProcessElementList::iterator i;
901 int j;
902
903 for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
904 sprintf(buf, "PROCESS_ELEMENT #%d\n", j+1);
905 sDescription += buf;
906 i->ptr->Describe(sDescription, nVerboseness);
907 sDescription += "\n";
908 }
909 sDescription += "END MULTI_PROCESS_ELEMENT_TAG\n";
910}
char icChar
Definition IccDefs.h:109

◆ ElementIndex()

icInt32Number CIccTagMultiProcessElement::ElementIndex ( CIccMultiProcessElement * pElem)
protectedvirtual

Name: CIccTagMultiProcessElement::ElementIndex.

Purpose:

Args:

Return:

Definition at line 1351 of file IccTagMPE.cpp.

1352{
1353 CIccMultiProcessElementList::iterator i;
1354 icInt32Number n;
1355
1356 for (n=0, i=m_list->begin(); i!= m_list->end(); i++, n++) {
1357 if (i->ptr == pElem)
1358 break;
1359 }
1360 if (i==m_list->end())
1361 n=-1;
1362
1363 return n;
1364}
long icInt32Number

◆ GetAppliedPCC()

IIccProfileConnectionConditions * CIccTagMultiProcessElement::GetAppliedPCC ( )
inline

Definition at line 403 of file IccTagMPE.h.

403{ return m_pAppliedPCC; }

Referenced by CIccMpeEmissionCLUT::Begin(), CIccMpeEmissionMatrix::Begin(), CIccMpeEmissionObserver::Begin(), CIccMpeInvEmissionMatrix::Begin(), CIccMpeReflectanceCLUT::Begin(), and CIccMpeReflectanceObserver::Begin().

+ Here is the caller graph for this function:

◆ GetClassName()

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

Reimplemented from CIccTag.

Reimplemented in CIccTagXmlMultiProcessElement.

Definition at line 369 of file IccTagMPE.h.

369{ return "CIccTagMultiProcessElement"; }

◆ GetCmmEnvLookup()

IIccCmmEnvVarLookup * CIccTagMultiProcessElement::GetCmmEnvLookup ( )
inline

Definition at line 405 of file IccTagMPE.h.

405{ return m_pCmmEnvVarLookup; }

Referenced by CIccMpeCalculator::Begin().

+ Here is the caller graph for this function:

◆ GetElement()

CIccMultiProcessElement * CIccTagMultiProcessElement::GetElement ( int nIndex)

Name: CIccTagMultiProcessElement::GetElement.

Purpose:

Args:

Return:

Definition at line 1189 of file IccTagMPE.cpp.

1190{
1191 if (!m_list)
1192 return NULL;
1193
1194 CIccMultiProcessElementList::iterator i;
1195 int j;
1196
1197 for(i=m_list->begin(), j=0; j<nIndex && i!=m_list->end(); i++, j++);
1198
1199 if (i!=m_list->end())
1200 return i->ptr;
1201
1202 return NULL;
1203}

Referenced by main().

+ Here is the caller graph for this function:

◆ GetFirstElem()

CIccMultiProcessElementList::iterator CIccTagMultiProcessElement::GetFirstElem ( )
protectedvirtual

Definition at line 1366 of file IccTagMPE.cpp.

1367{
1368 return m_list->begin();
1369}

◆ GetLastElem()

CIccMultiProcessElementList::iterator CIccTagMultiProcessElement::GetLastElem ( )
protectedvirtual

Definition at line 1371 of file IccTagMPE.cpp.

1372{
1373 return m_list->end();
1374}

◆ GetNewApply()

CIccApplyTagMpe * CIccTagMultiProcessElement::GetNewApply ( )
virtual

Name: CIccTagMultiProcessElement::GetNewApply.

Purpose:

Args:

Return:

Definition at line 1387 of file IccTagMPE.cpp.

1388{
1389 CIccApplyTagMpe *pApply = new CIccApplyTagMpe(this);
1390
1391 if (!pApply)
1392 return NULL;
1393
1394 CIccDblPixelBuffer *pApplyBuf = pApply->GetBuf();
1395 pApplyBuf->UpdateChannels(m_nBufChannels);
1396 if (!pApplyBuf->Begin()) {
1397 delete pApply;
1398 return NULL;
1399 }
1400
1401 if (!m_list || !m_list->size())
1402 return pApply;
1403
1404 CIccMultiProcessElementList::iterator i, last;
1405 last = GetLastElem();
1406 for (i=GetFirstElem(); i!=last;) {
1407 pApply->AppendElem(i->ptr);
1408
1410 }
1411
1412 return pApply;
1413}
Class: CIccTagMultiProcessElement.
Definition IccTagMPE.h:321
virtual bool AppendElem(CIccMultiProcessElement *pElem)
Name: CIccApplyTagMpe::CIccApplyTagMpe.
void UpdateChannels(icUInt16Number nNumChannels)
Definition IccTagMPE.h:288
bool Begin()
Name: CIccDblPixelBuffer::CIccDblPixelBuffer.
virtual CIccMultiProcessElementList::iterator GetLastElem()
virtual CIccMultiProcessElementList::iterator GetFirstElem()
virtual void GetNextElemIterator(CIccMultiProcessElementList::iterator &itr)
Name: CIccTagMultiProcessElement::GetNextElemIterator.

References CIccApplyTagMpe::AppendElem(), CIccDblPixelBuffer::Begin(), CIccApplyTagMpe::GetBuf(), and CIccDblPixelBuffer::UpdateChannels().

Referenced by main().

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

◆ GetNextElemIterator()

void CIccTagMultiProcessElement::GetNextElemIterator ( CIccMultiProcessElementList::iterator & itr)
protectedvirtual

Name: CIccTagMultiProcessElement::GetNextElemIterator.

Purpose:

Args:

Return:

Definition at line 1215 of file IccTagMPE.cpp.

1216{
1217 itr++;
1218}

◆ GetProfilePCC()

IIccProfileConnectionConditions * CIccTagMultiProcessElement::GetProfilePCC ( )
inline

Definition at line 402 of file IccTagMPE.h.

402{ return m_pProfilePCC; }

◆ GetType()

virtual icTagTypeSignature CIccTagMultiProcessElement::GetType ( ) const
inlinevirtual

Function: GetType()

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

Reimplemented from CIccTag.

Definition at line 368 of file IccTagMPE.h.

@ icSigMultiProcessElementType

References icSigMultiProcessElementType.

◆ Insert()

void CIccTagMultiProcessElement::Insert ( CIccMultiProcessElement * pElement)
virtual

Name: CIccTagMultiProcessElement::Insert.

Purpose:

Args:

Return:

Definition at line 945 of file IccTagMPE.cpp.

946{
947 if (!m_list) {
949 }
950
952
953 ptr.ptr = pElement;
954
955 m_list->push_front(ptr);
956}

References CIccMultiProcessElementPtr::ptr.

◆ IsLateBinding()

bool CIccTagMultiProcessElement::IsLateBinding ( ) const

Name: CIccTagMultiProcessElement::IsLateBinding.

Purpose:

Args:

Return:

Definition at line 1230 of file IccTagMPE.cpp.

1231{
1232 if (!m_list)
1233 return false;
1234
1235 CIccMultiProcessElementList::const_iterator i;
1236
1237 for (i = m_list->begin(); i!= m_list->end(); i++) {
1238 if (i->ptr->IsLateBinding()) {
1239 return true;
1240 }
1241 }
1242
1243 return false;
1244}

◆ IsLateBindingReflectance()

bool CIccTagMultiProcessElement::IsLateBindingReflectance ( ) const

Name: CIccTagMultiProcessElement::IsLateBindingReflectance.

Purpose:

Args:

Return:

Definition at line 1256 of file IccTagMPE.cpp.

1257{
1258 if (!m_list)
1259 return false;
1260
1261 CIccMultiProcessElementList::const_iterator i;
1262
1263 for (i = m_list->begin(); i!= m_list->end(); i++) {
1264 if (i->ptr->IsLateBindingReflectance()) {
1265 return true;
1266 }
1267 }
1268
1269 return false;
1270}

◆ IsSupported()

bool CIccTagMultiProcessElement::IsSupported ( )
virtual

Name: CIccTagMultiProcessElement::IsSupported.

Purpose:

Args:

Return:

Reimplemented from CIccTag.

Definition at line 866 of file IccTagMPE.cpp.

867{
868 if (m_list) {
869 CIccMultiProcessElementList::iterator i;
870
871 for (i=m_list->begin(); i!=m_list->end(); i++) {
872 if (!i->ptr->IsSupported())
873 return false;
874 }
875 }
876
877 return true;
878}

◆ NewCopy()

virtual CIccTag * CIccTagMultiProcessElement::NewCopy ( ) const
inlinevirtual

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

Parameter(s): none

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

Reimplemented from CIccTag.

Definition at line 363 of file IccTagMPE.h.

363{ return new CIccTagMultiProcessElement(*this);}
CIccTagMultiProcessElement(icUInt16Number nInputChannels=0, icUInt16Number nOutputChannels=0)
Name: CIccTagMultiProcessElement::CIccTagMultiProcessElement.

◆ NumElements()

icUInt32Number CIccTagMultiProcessElement::NumElements ( ) const
inline

Definition at line 398 of file IccTagMPE.h.

398{ return m_list ? (icUInt32Number)(m_list->size()) : 0; }
unsigned int icUInt32Number

Referenced by main().

+ Here is the caller graph for this function:

◆ NumInputChannels()

icUInt16Number CIccTagMultiProcessElement::NumInputChannels ( ) const
inline

Definition at line 393 of file IccTagMPE.h.

393{ return m_nInputChannels; }

Referenced by main().

+ Here is the caller graph for this function:

◆ NumOutputChannels()

icUInt16Number CIccTagMultiProcessElement::NumOutputChannels ( ) const
inline

Definition at line 394 of file IccTagMPE.h.

394{ return m_nOutputChannels; }

Referenced by main().

+ Here is the caller graph for this function:

◆ operator=()

CIccTagMultiProcessElement & CIccTagMultiProcessElement::operator= ( const CIccTagMultiProcessElement & lut)

Name: &operator=.

Purpose:

Args:

Return:

Definition at line 768 of file IccTagMPE.cpp.

769{
770 Clean();
771
773
774 if (lut.m_list) {
776
777 CIccMultiProcessElementList::iterator i;
779
780 for (i=lut.m_list->begin(); i!= lut.m_list->end(); i++) {
781 ptr.ptr = (CIccMultiProcessElement*)i->ptr->NewCopy();
782 m_list->push_back(ptr);
783 }
784 }
787
788 if (lut.m_nProcElements && lut.m_position) {
790 if (m_position) {
791 memcpy(m_position, lut.m_position, lut.m_nProcElements*sizeof(icPositionNumber));
792 }
794 }
795
798
800
801 return *this;
802}

References m_list, m_nInputChannels, m_nOutputChannels, m_nProcElements, CIccTag::m_nReserved, m_pAppliedPCC, m_pCmmEnvVarLookup, m_position, m_pProfilePCC, CIccMultiProcessElement::NewCopy(), and CIccMultiProcessElementPtr::ptr.

+ Here is the call graph for this function:

◆ Read()

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

Name: CIccTagMultiProcessElement::Read.

Purpose:

Args:

Return:

Reimplemented from CIccTag.

Definition at line 969 of file IccTagMPE.cpp.

970{
972
973 icUInt32Number headerSize = sizeof(icTagTypeSignature) +
974 sizeof(icUInt32Number) +
975 sizeof(icUInt8Number) +
976 sizeof(icUInt8Number) +
977 sizeof(icUInt16Number);
978
979 if (headerSize > size)
980 return false;
981
982 if (!pIO) {
983 return false;
984 }
985
986 Clean();
987
988 icUInt32Number tagStart = pIO->Tell();
989
990 if (!pIO->Read32(&sig))
991 return false;
992
993 if (!pIO->Read32(&m_nReserved))
994 return false;
995
996 if (!pIO->Read16(&m_nInputChannels))
997 return false;
998
999 if (!pIO->Read16(&m_nOutputChannels))
1000 return false;
1001
1002 if (!pIO->Read32(&m_nProcElements))
1003 return false;
1004
1005 if (headerSize + (icUInt64Number)m_nProcElements*sizeof(icUInt32Number) > size)
1006 return false;
1007
1009
1010 if (!m_list)
1011 return false;
1012
1014
1016
1017 if (!m_position)
1018 return false;
1019
1020 CIccLutOffsetMap loadedElements;
1021
1022 for (i=0; i<m_nProcElements; i++) {
1023 if (!pIO->Read32(&m_position[i].offset))
1024 return false;
1025 if (!pIO->Read32(&m_position[i].size))
1026 return false;
1027 }
1028
1030 icElemTypeSignature sigElem;
1031
1032 for (i=0; i<m_nProcElements; i++) {
1033 if (m_position[i].offset+m_position[i].size > size) {
1034 return false;
1035 }
1036
1037 //Use hash to cache offset duplication
1038 CIccMultiProcessElement *element = loadedElements[m_position[i].offset];
1039 if (!element) {
1040 icUInt32Number pos = tagStart + m_position[i].offset;
1041
1042 if (pIO->Seek(pos, icSeekSet)!=(icInt32Number)pos) {
1043 return false;
1044 }
1045
1046 if (!pIO->Read32(&sigElem)) {
1047 return false;
1048 }
1049
1050 if (pIO->Seek(pos, icSeekSet)!=(icInt32Number)pos) {
1051 return false;
1052 }
1053
1054 element = CIccMultiProcessElement::Create(sigElem);
1055 if (!element) {
1056 return false;
1057 }
1058
1059 if (!element->Read(m_position[i].size, pIO)) {
1060 delete element;
1061 return false;
1062 }
1063
1064 loadedElements[m_position[i].offset] = element;
1065 }
1066 ptr.ptr = element;
1067
1068 m_list->push_back(ptr);
1069 }
1070
1071 return true;
1072}
icArraySignature sig
@ icSeekSet
Definition IccIO.h:83
std::map< icUInt32Number, CIccMultiProcessElement * > CIccLutOffsetMap
icTagTypeSignature
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
virtual bool Read(icUInt32Number size, CIccIO *pIO)=0
static CIccMultiProcessElement * Create(icElemTypeSignature sig)
Name: CIccMultiProcessElement::Create.
unsigned char icUInt8Number
Number definitions.
unsigned short icUInt16Number
icElemTypeSignature
Multi-Processing Element type signatures.
icUInt32Number icUInt64Number[2]
icUInt32Number offset
icUInt32Number size

References CIccMultiProcessElement::Create(), icSeekSet, CIccMultiProcessElementPtr::ptr, CIccMultiProcessElement::Read(), CIccIO::Read16(), CIccIO::Read32(), CIccIO::Seek(), sig, and CIccIO::Tell().

+ Here is the call graph for this function:

◆ SetChannels()

void CIccTagMultiProcessElement::SetChannels ( icUInt16Number nInputChannels,
icUInt16Number nOutputChannels )
inline

Definition at line 396 of file IccTagMPE.h.

396{m_nInputChannels = nInputChannels; m_nOutputChannels = nOutputChannels;}

Referenced by CIccDefaultEncProfileConverter::ConvertFromParams().

+ Here is the caller graph for this function:

◆ Validate()

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

Name: CIccTagMultiProcessElement::Validate.

Purpose:

Args:

Return:

Reimplemented from CIccTag.

Definition at line 1526 of file IccTagMPE.cpp.

1528{
1530
1531 CIccInfo Info;
1532 std::string sSigPathName = Info.GetSigPathName(sigPath);
1533 bool bMatchChannels = true;
1534
1535 if (!m_list || !m_list->size()) {
1537 sReport += icMsgValidateCriticalError;
1538 sReport += sSigPathName;
1539 sReport += " No processing elements and input and output channels do not match!\n";
1541 }
1542 else {
1543 sReport += icMsgValidateWarning;
1544 sReport += sSigPathName;
1545 sReport += " No processing elements.\n";
1547 }
1548 }
1549
1550 if (!pProfile) {
1551 sReport += icMsgValidateWarning;
1552 sReport += sSigPathName;
1553 sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
1555 return rv;
1556 }
1557 icUInt32Number nInput, nOutput;
1558
1559 //Check # of channels
1560 switch(icGetFirstSigPathSig(sigPath)) {
1561 case icSigAToB0Tag:
1562 case icSigAToB1Tag:
1563 case icSigAToB2Tag:
1564 case icSigAToB3Tag:
1565 {
1566 nInput = icGetSpaceSamples(pProfile->m_Header.colorSpace);
1567 if (m_nInputChannels != nInput) {
1568 sReport += icMsgValidateCriticalError;
1569 sReport += sSigPathName;
1570 sReport += " - Incorrect number of input channels.\n";
1572 }
1573
1574 nOutput = icGetSpaceSamples(pProfile->m_Header.pcs);
1575 if (m_nOutputChannels != nOutput) {
1576 sReport += icMsgValidateCriticalError;
1577 sReport += sSigPathName;
1578 sReport += " - Incorrect number of output channels.\n";
1580 }
1581
1582 break;
1583 }
1584 case icSigBToA0Tag:
1585 case icSigBToA1Tag:
1586 case icSigBToA2Tag:
1587 case icSigBToA3Tag:
1588 {
1589 nInput = icGetSpaceSamples(pProfile->m_Header.pcs);
1590 if (m_nInputChannels!=nInput) {
1591 sReport += icMsgValidateCriticalError;
1592 sReport += sSigPathName;
1593 sReport += " - Incorrect number of input channels.\n";
1595 }
1596
1597 nOutput = icGetSpaceSamples(pProfile->m_Header.colorSpace);
1598 if (m_nOutputChannels!=nOutput) {
1599 sReport += icMsgValidateCriticalError;
1600 sReport += sSigPathName;
1601 sReport += " - Incorrect number of output channels.\n";
1603 }
1604
1605 break;
1606 }
1607 case icSigDToB0Tag:
1608 case icSigDToB1Tag:
1609 case icSigDToB2Tag:
1610 case icSigDToB3Tag:
1611 {
1612 nInput = icGetSpaceSamples(pProfile->m_Header.colorSpace);
1613 if (m_nInputChannels != nInput) {
1614 sReport += icMsgValidateCriticalError;
1615 sReport += sSigPathName;
1616 sReport += " - Incorrect number of input channels.\n";
1618 }
1619
1620 nOutput = icGetSpectralSpaceSamples(&pProfile->m_Header);
1621 if (m_nOutputChannels != nOutput) {
1622 sReport += icMsgValidateCriticalError;
1623 sReport += sSigPathName;
1624 sReport += " - Incorrect number of output channels.\n";
1626 }
1627
1628 break;
1629 }
1630 case icSigBToD0Tag:
1631 case icSigBToD1Tag:
1632 case icSigBToD2Tag:
1633 case icSigBToD3Tag:
1634 {
1635 nInput = icGetSpectralSpaceSamples(&pProfile->m_Header);
1636 if (m_nInputChannels!=nInput) {
1637 sReport += icMsgValidateCriticalError;
1638 sReport += sSigPathName;
1639 sReport += " - Incorrect number of input channels.\n";
1641 }
1642
1643 nOutput = icGetSpaceSamples(pProfile->m_Header.colorSpace);
1644 if (m_nOutputChannels!=nOutput) {
1645 sReport += icMsgValidateCriticalError;
1646 sReport += sSigPathName;
1647 sReport += " - Incorrect number of output channels.\n";
1649 }
1650
1651 break;
1652 }
1653 case icSigHToS0Tag:
1654 case icSigHToS1Tag:
1655 case icSigHToS2Tag:
1656 case icSigHToS3Tag:
1657 {
1658 nInput = icGetSpaceSamples(pProfile->m_Header.pcs);
1659 if (m_nInputChannels != nInput) {
1660 sReport += icMsgValidateCriticalError;
1661 sReport += sSigPathName;
1662 sReport += " - Incorrect number of input channels.\n";
1664 }
1665
1666 nOutput = icGetSpaceSamples(pProfile->m_Header.pcs);
1667 if (m_nOutputChannels != nOutput) {
1668 sReport += icMsgValidateCriticalError;
1669 sReport += sSigPathName;
1670 sReport += " - Incorrect number of output channels.\n";
1672 }
1673
1674 break;
1675 }
1678 {
1679 if (m_nInputChannels != 3) {
1680 sReport += icMsgValidateCriticalError;
1681 sReport += sSigPathName;
1682 sReport += " - Incorrect number of input channels.\n";
1684 }
1685
1686 if (m_nOutputChannels != 3) {
1687 sReport += icMsgValidateCriticalError;
1688 sReport += sSigPathName;
1689 sReport += " - Incorrect number of output channels.\n";
1691 }
1692
1693 break;
1694 }
1695 case icSigBRDFAToB0Tag:
1696 case icSigBRDFAToB1Tag:
1697 case icSigBRDFAToB2Tag:
1698 case icSigBRDFAToB3Tag:
1699 {
1700 switch(icGetFirstSigPathSig(sigPath)) {
1702 //TODO: Initialize input and output
1703 nInput = nOutput = 0;
1704 break;
1705
1707 //TODO: Initialize input and output
1708 nInput = nOutput = 0;
1709 break;
1710
1712 //TODO: Initialize input and output
1713 nInput = nOutput = 0;
1714 break;
1715
1716 default:
1717 break;
1718 }
1719 break;
1720 }
1721 case icSigBRDFDToB0Tag:
1722 case icSigBRDFDToB1Tag:
1723 case icSigBRDFDToB2Tag:
1724 case icSigBRDFDToB3Tag:
1725 {
1726 switch(icGetFirstSigPathSig(sigPath)) {
1728 //TODO: Initialize input and output
1729 nInput = nOutput = 0;
1730 break;
1731
1733 //TODO: Initialize input and output
1734 nInput = nOutput = 0;
1735 break;
1736
1738 //TODO: Initialize input and output
1739 nInput = nOutput = 0;
1740 break;
1741
1742 default:
1743 break;
1744 }
1745 break;
1746 }
1747
1748 case icSigMToA0Tag:
1749 {
1750 nInput = icGetMaterialColorSpaceSamples(pProfile->m_Header.mcs);
1751 if (m_nInputChannels != nInput) {
1752 sReport += icMsgValidateCriticalError;
1753 sReport += sSigPathName;
1754 sReport += " - Incorrect number of input channels.\n";
1756 }
1757
1758 nOutput = icGetSpaceSamples(pProfile->m_Header.colorSpace);
1759 if (m_nOutputChannels != nOutput) {
1760 sReport += icMsgValidateCriticalError;
1761 sReport += sSigPathName;
1762 sReport += " - Incorrect number of output channels.\n";
1764 }
1765
1766 break;
1767 }
1768
1769 case icSigAToM0Tag:
1770 {
1771 nInput = icGetSpaceSamples(pProfile->m_Header.colorSpace);
1772 if (m_nInputChannels != nInput) {
1773 sReport += icMsgValidateCriticalError;
1774 sReport += sSigPathName;
1775 sReport += " - Incorrect number of input channels.\n";
1777 }
1778
1779 nOutput = icGetMaterialColorSpaceSamples(pProfile->m_Header.mcs);
1780 if (m_nOutputChannels != nOutput) {
1781 sReport += icMsgValidateCriticalError;
1782 sReport += sSigPathName;
1783 sReport += " - Incorrect number of output channels.\n";
1785 }
1786
1787 break;
1788 }
1789
1790 case icSigMToB0Tag:
1791 case icSigMToB1Tag:
1792 case icSigMToB2Tag:
1793 case icSigMToB3Tag:
1794 {
1795 nInput = icGetMaterialColorSpaceSamples(pProfile->m_Header.mcs);
1796 if (m_nInputChannels != nInput) {
1797 sReport += icMsgValidateCriticalError;
1798 sReport += sSigPathName;
1799 sReport += " - Incorrect number of input channels.\n";
1801 }
1802
1803 nOutput = icGetSpaceSamples(pProfile->m_Header.pcs);
1804 if (m_nOutputChannels != nOutput) {
1805 sReport += icMsgValidateCriticalError;
1806 sReport += sSigPathName;
1807 sReport += " - Incorrect number of output channels.\n";
1809 }
1810
1811 break;
1812 }
1813
1814 case icSigMToS0Tag:
1815 case icSigMToS1Tag:
1816 case icSigMToS2Tag:
1817 case icSigMToS3Tag:
1818 {
1819 nInput = icGetMaterialColorSpaceSamples(pProfile->m_Header.mcs);
1820 if (m_nInputChannels != nInput) {
1821 sReport += icMsgValidateCriticalError;
1822 sReport += sSigPathName;
1823 sReport += " - Incorrect number of input channels.\n";
1825 }
1826
1827 nOutput = icGetSpectralSpaceSamples(&pProfile->m_Header);
1828 if (m_nOutputChannels != nOutput) {
1829 sReport += icMsgValidateCriticalError;
1830 sReport += sSigPathName;
1831 sReport += " - Incorrect number of output channels.\n";
1833 }
1834
1835 break;
1836 }
1837
1838 default:
1839 sReport += icMsgValidateWarning;
1840 sReport += sSigPathName;
1841 sReport += " - Unknown tag - Cannot validate input and output channels!\n";
1843 bMatchChannels = false;
1844 break;
1845 }
1846
1847 if (!m_list || !m_list->size()) {
1848 return rv;
1849 }
1850
1851 CIccMultiProcessElementList::iterator i = m_list->begin();
1852 CIccMultiProcessElement *last=NULL;
1853
1854 if (bMatchChannels && i->ptr->NumInputChannels() != m_nInputChannels) {
1855 sReport += icMsgValidateCriticalError;
1856 sReport += sSigPathName;
1857 sReport += "Mis-matching number of input channels in first process element!\n";
1859 }
1860
1861 for (; i!= m_list->end(); i++) {
1862 if (last) {
1863 if (i->ptr->NumInputChannels() != last->NumOutputChannels()) {
1864 sReport += icMsgValidateCriticalError;
1865 sReport += sSigPathName;
1866
1867 sReport += "(";
1868 sReport += last->GetClassName();
1869 sReport += "->";
1870 sReport += i->ptr->GetClassName();
1871
1872 sReport += " Mis-matching number of channels in last process element!\n";
1874 }
1875 }
1876 last = i->ptr;
1877
1878 if (last)
1879 rv = icMaxStatus(rv, last->Validate(sigPath+icGetSigPath(GetType()), sReport, this));
1880 }
1881
1882 if (bMatchChannels && last && last->NumOutputChannels() != m_nOutputChannels) {
1883 sReport += icMsgValidateCriticalError;
1884 sReport += sSigPathName;
1885 sReport += " Mis-matching number of output channels!\n";
1887 }
1888
1889 return rv;
1890}
icValidateStatus
Definition IccDefs.h:118
@ icValidateOK
Definition IccDefs.h:119
@ icValidateWarning
Definition IccDefs.h:120
@ icValidateCriticalError
Definition IccDefs.h:122
icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Name: icMaxStatus.
Definition IccUtil.cpp:244
std::string icGetSigPath(icUInt32Number nSig)
Definition IccUtil.cpp:1191
const char * icMsgValidateWarning
Definition IccUtil.cpp:90
icUInt32Number icGetSpaceSamples(icColorSpaceSignature sig)
Definition IccUtil.cpp:1303
icUInt32Number icGetSpectralSpaceSamples(const icHeader *pHdr)
Definition IccUtil.cpp:1367
icUInt32Number icGetMaterialColorSpaceSamples(icMaterialColorSignature sig)
Definition IccUtil.cpp:1391
const char * icMsgValidateCriticalError
Definition IccUtil.cpp:92
icSignature icGetFirstSigPathSig(std::string sigPath)
Definition IccUtil.cpp:1201
Type: Class.
Definition IccUtil.h:303
std::string GetSigPathName(std::string sigPath)
Definition IccUtil.cpp:1614
virtual const icChar * GetClassName() const =0
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const =0
Name: CIccProcessElement::Validate.
virtual icTagTypeSignature GetType() const
Function: GetType()
Definition IccTagMPE.h:368
@ icSigBToD0Tag
@ icSigBToA2Tag
@ icSigBRDFDToB0Tag
@ icSigAToB3Tag
@ icSigHToS3Tag
@ icSigMToS3Tag
@ icSigBToD2Tag
@ icSigAToM0Tag
@ icSigHToS2Tag
@ icSigMToB0Tag
@ icSigAToB0Tag
@ icSigMToB3Tag
@ icSigBToA1Tag
@ icSigDToB3Tag
@ icSigAToB2Tag
@ icSigBRDFAToB1Tag
@ icSigBRDFAToB2Tag
@ icSigCustomToStandardPccTag
@ icSigBRDFAToB0Tag
@ icSigDToB0Tag
@ icSigBToD3Tag
@ icSigBToA0Tag
@ icSigMToS0Tag
@ icSigMToS2Tag
@ icSigHToS1Tag
@ icSigBToD1Tag
@ icSigMToB1Tag
@ icSigHToS0Tag
@ icSigBRDFAToB3Tag
@ icSigAToB1Tag
@ icSigBToA3Tag
@ icSigDToB2Tag
@ icSigStandardToCustomPccTag
@ icSigMToA0Tag
@ icSigMToS1Tag
@ icSigDToB1Tag
@ icSigBRDFDToB1Tag
@ icSigBRDFDToB2Tag
@ icSigMToB2Tag
@ icSigBRDFDToB3Tag
@ icSigBrdfLightTransformMbr
@ icSigBrdfOutputTransformMbr
@ icSigBrdfTransformMbr

References CIccMultiProcessElement::GetClassName(), CIccInfo::GetSigPathName(), icGetFirstSigPathSig(), icGetMaterialColorSpaceSamples(), icGetSigPath(), icGetSpaceSamples(), icGetSpectralSpaceSamples(), icMaxStatus(), icMsgValidateCriticalError, icMsgValidateWarning, icSigAToB0Tag, icSigAToB1Tag, icSigAToB2Tag, icSigAToB3Tag, icSigAToM0Tag, icSigBRDFAToB0Tag, icSigBRDFAToB1Tag, icSigBRDFAToB2Tag, icSigBRDFAToB3Tag, icSigBRDFDToB0Tag, icSigBRDFDToB1Tag, icSigBRDFDToB2Tag, icSigBRDFDToB3Tag, icSigBrdfLightTransformMbr, icSigBrdfOutputTransformMbr, icSigBrdfTransformMbr, icSigBToA0Tag, icSigBToA1Tag, icSigBToA2Tag, icSigBToA3Tag, icSigBToD0Tag, icSigBToD1Tag, icSigBToD2Tag, icSigBToD3Tag, icSigCustomToStandardPccTag, icSigDToB0Tag, icSigDToB1Tag, icSigDToB2Tag, icSigDToB3Tag, icSigHToS0Tag, icSigHToS1Tag, icSigHToS2Tag, icSigHToS3Tag, icSigMToA0Tag, icSigMToB0Tag, icSigMToB1Tag, icSigMToB2Tag, icSigMToB3Tag, icSigMToS0Tag, icSigMToS1Tag, icSigMToS2Tag, icSigMToS3Tag, icSigStandardToCustomPccTag, icValidateCriticalError, icValidateOK, icValidateWarning, CIccMultiProcessElement::NumOutputChannels(), and CIccMultiProcessElement::Validate().

+ Here is the call graph for this function:

◆ Write()

bool CIccTagMultiProcessElement::Write ( CIccIO * pIO)
virtual

Name: CIccTagMultiProcessElement::Write.

Purpose:

Args:

Return:

Reimplemented from CIccTag.

Definition at line 1084 of file IccTagMPE.cpp.

1085{
1087
1088 if (!pIO)
1089 return false;
1090
1091 icUInt32Number tagStart = pIO->Tell();
1092
1093 if (!pIO->Write32(&sig))
1094 return false;
1095
1096 if (!pIO->Write32(&m_nReserved))
1097 return false;
1098
1099 if (!pIO->Write16(&m_nInputChannels))
1100 return false;
1101
1102 if (!pIO->Write16(&m_nOutputChannels))
1103 return false;
1104
1105 if (m_list) {
1107 }
1108 else {
1109 m_nProcElements = 0;
1110 }
1111
1112 if (!pIO->Write32(&m_nProcElements))
1113 return false;
1114
1115 if (m_nProcElements) {
1116 icUInt32Number offsetPos = pIO->Tell();
1117
1118 if (m_position) {
1119 delete [] m_position;
1120 }
1121
1123
1124 if (!m_position)
1125 return false;
1126
1127 //Write an empty position table
1128 icUInt32Number j, zeros[2] = { 0, 0 };
1129 for (j=0; j<m_nProcElements; j++) {
1130 if (pIO->Write32(zeros, 2)!=2)
1131 return false;
1132 }
1133
1134 CIccLutPtrMap map;
1135 CIccMultiProcessElementList::iterator i;
1136 icUInt32Number start, end;
1137 icPositionNumber position;
1138
1139 //Write out each process element
1140 for (j=0, i=m_list->begin(); i!=m_list->end(); i++, j++) {
1141 if (map.find(i->ptr)==map.end()) {
1142 start = pIO->Tell();
1143
1144 if (!i->ptr->Write(pIO))
1145 return false;
1146
1147 end = pIO->Tell();
1148
1149 if (!pIO->Align32())
1150 return false;
1151
1152 position.offset = start - tagStart;
1153 position.size = end - start;
1154
1155 map[i->ptr] = position;
1156 }
1157 m_position[j] = map[i->ptr];
1158 }
1159
1160 icUInt32Number endPos = pIO->Tell();
1161
1162 if (pIO->Seek(offsetPos, icSeekSet)<0)
1163 return false;
1164
1165 for (j=0; j<m_nProcElements; j++) {
1166 if (!pIO->Write32(&m_position[j].offset))
1167 return false;
1168 if (!pIO->Write32(&m_position[j].size))
1169 return false;
1170 }
1171
1172 if (pIO->Seek(endPos, icSeekSet)<0)
1173 return false;
1174 }
1175
1176 return true;
1177}
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

References CIccIO::Align32(), icSeekSet, icPositionNumber::offset, CIccIO::Seek(), sig, icPositionNumber::size, CIccIO::Tell(), CIccIO::Write16(), and CIccIO::Write32().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_list

CIccMultiProcessElementList* CIccTagMultiProcessElement::m_list
protected

Definition at line 419 of file IccTagMPE.h.

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

◆ m_nBufChannels

icUInt16Number CIccTagMultiProcessElement::m_nBufChannels
protected

Definition at line 426 of file IccTagMPE.h.

◆ m_nInputChannels

icUInt16Number CIccTagMultiProcessElement::m_nInputChannels
protected

Definition at line 415 of file IccTagMPE.h.

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

◆ m_nOutputChannels

icUInt16Number CIccTagMultiProcessElement::m_nOutputChannels
protected

Definition at line 416 of file IccTagMPE.h.

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

◆ m_nProcElements

icUInt32Number CIccTagMultiProcessElement::m_nProcElements
protected

Definition at line 422 of file IccTagMPE.h.

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

◆ m_pAppliedPCC

IIccProfileConnectionConditions* CIccTagMultiProcessElement::m_pAppliedPCC
protected

Definition at line 429 of file IccTagMPE.h.

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

◆ m_pCmmEnvVarLookup

IIccCmmEnvVarLookup* CIccTagMultiProcessElement::m_pCmmEnvVarLookup
protected

Definition at line 431 of file IccTagMPE.h.

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

◆ m_position

icPositionNumber* CIccTagMultiProcessElement::m_position
protected

Definition at line 423 of file IccTagMPE.h.

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

◆ m_pProfilePCC

IIccProfileConnectionConditions* CIccTagMultiProcessElement::m_pProfilePCC
protected

Definition at line 428 of file IccTagMPE.h.

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


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