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

#include <IccMpeXml.h>

+ Inheritance diagram for CIccMpeXmlExtCLUT:
+ Collaboration diagram for CIccMpeXmlExtCLUT:

Public Member Functions

virtual ~CIccMpeXmlExtCLUT ()
 
virtual void Apply (CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const
 
virtual bool Begin (icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 
virtual icAcsSignature GetBAcsSig ()
 
virtual const char * GetClassName () const
 
CIccCLUTGetCLUT ()
 
virtual icAcsSignature GetEAcsSig ()
 
virtual const char * GetExtClassName ()
 
virtual IIccExtensionMpeGetExtension ()
 
virtual CIccApplyMpeGetNewApply (CIccApplyTagMpe *pApplyTag)
 
icUInt16Number GetStorageType ()
 
virtual icElemTypeSignature GetType () const
 
virtual bool IsAcs ()
 
virtual bool IsLateBinding () const
 
virtual bool IsLateBindingReflectance () const
 
virtual bool IsSupported ()
 
virtual CIccMultiProcessElementNewCopy () const
 
virtual icUInt16Number NumInputChannels () const
 
virtual icUInt16Number NumOutputChannels () const
 
virtual bool ParseXml (xmlNode *pNode, std::string &parseStr)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 
void SetCLUT (CIccCLUT *pCLUT)
 
bool SetStorageType (icUInt16Number nStorateType)
 
virtual bool ToXml (std::string &xml, std::string blanks="")
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
 
virtual bool Write (CIccIO *pIO)
 

Static Public Member Functions

static CIccMultiProcessElementCreate (icElemTypeSignature sig)
 

Data Fields

icUInt32Number m_nReserved
 

Protected Attributes

icCLUTElemType m_interpType
 
icUInt16Number m_nInputChannels
 
icUInt16Number m_nOutputChannels
 
icUInt16Number m_nReserved2
 
CIccCLUTm_pCLUT
 
icUInt16Number m_storageType
 

Detailed Description

Constructor & Destructor Documentation

◆ ~CIccMpeXmlExtCLUT()

virtual CIccMpeXmlExtCLUT::~CIccMpeXmlExtCLUT ( )
inlinevirtual
195{}

Member Function Documentation

◆ Apply()

void CIccMpeCLUT::Apply ( CIccApplyMpe pApply,
icFloatNumber dstPixel,
const icFloatNumber srcPixel 
) const
virtualinherited

Name: CIccMpeCLUT::Apply

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

5690{
5691 const CIccCLUT *pCLUT = m_pCLUT;
5692
5693 switch(m_interpType) {
5694 case ic1dInterp:
5695 pCLUT->Interp1d(dstPixel, srcPixel);
5696 break;
5697 case ic2dInterp:
5698 pCLUT->Interp2d(dstPixel, srcPixel);
5699 break;
5700 case ic3dInterpTetra:
5701 pCLUT->Interp3dTetra(dstPixel, srcPixel);
5702 break;
5703 case ic3dInterp:
5704 pCLUT->Interp3d(dstPixel, srcPixel);
5705 break;
5706 case ic4dInterp:
5707 pCLUT->Interp4d(dstPixel, srcPixel);
5708 break;
5709 case ic5dInterp:
5710 pCLUT->Interp5d(dstPixel, srcPixel);
5711 break;
5712 case ic6dInterp:
5713 pCLUT->Interp6d(dstPixel, srcPixel);
5714 break;
5715 case icNdInterp:
5716 CIccApplyMpeCLUT* pApplyCLUT = (CIccApplyMpeCLUT*)pApply;
5717 pCLUT->InterpND(dstPixel, srcPixel, pApplyCLUT->m_pApply);
5718 break;
5719 }
5720}
@ ic1dInterp
Definition IccMpeBasic.h:637
@ ic3dInterpTetra
Definition IccMpeBasic.h:639
@ ic6dInterp
Definition IccMpeBasic.h:643
@ icNdInterp
Definition IccMpeBasic.h:644
@ ic2dInterp
Definition IccMpeBasic.h:638
@ ic4dInterp
Definition IccMpeBasic.h:641
@ ic5dInterp
Definition IccMpeBasic.h:642
@ ic3dInterp
Definition IccMpeBasic.h:640
CIccCLUT * m_pCLUT
Definition IccMpeBasic.h:682
icCLUTElemType m_interpType
Definition IccMpeBasic.h:683
Definition IccMpeBasic.h:695
CIccApplyCLUT * m_pApply
Definition IccMpeBasic.h:708
Definition IccTagLut.h:326
void Interp4d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Definition IccTagLut.cpp:2683
void Interp2d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Definition IccTagLut.cpp:2472
void Interp6d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Definition IccTagLut.cpp:2881
void Interp3d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Definition IccTagLut.cpp:2613
void Interp5d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Definition IccTagLut.cpp:2769
void Interp3dTetra(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Definition IccTagLut.cpp:2527
void Interp1d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Definition IccTagLut.cpp:2428
void InterpND(icFloatNumber *destPixel, const icFloatNumber *srcPixel, CIccApplyCLUT *pApply) const
Definition IccTagLut.cpp:3033

References ic1dInterp, ic2dInterp, ic3dInterp, ic3dInterpTetra, ic4dInterp, ic5dInterp, ic6dInterp, icNdInterp, CIccCLUT::Interp1d(), CIccCLUT::Interp2d(), CIccCLUT::Interp3d(), CIccCLUT::Interp3dTetra(), CIccCLUT::Interp4d(), CIccCLUT::Interp5d(), CIccCLUT::Interp6d(), CIccCLUT::InterpND(), CIccMpeCLUT::m_interpType, CIccApplyMpeCLUT::m_pApply, and CIccMpeCLUT::m_pCLUT.

+ Here is the call graph for this function:

◆ Begin()

bool CIccMpeCLUT::Begin ( icElemInterp  nInterp,
CIccTagMultiProcessElement pMPE 
)
virtualinherited

Name: CIccMpeCLUT::Begin

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

5644{
5645 if (!m_pCLUT)
5646 return false;
5647
5648 m_pCLUT->Begin();
5649
5650 switch (m_nInputChannels) {
5651 case 1:
5653 break;
5654 case 2:
5656 break;
5657 case 3:
5658 if (nInterp==icElemInterpTetra)
5660 else
5662 break;
5663 case 4:
5665 break;
5666 case 5:
5668 break;
5669 case 6:
5671 break;
5672 default:
5674 break;
5675 }
5676 return true;
5677}
@ icElemInterpTetra
Definition IccTagMPE.h:95
void Begin()
Definition IccTagLut.cpp:2221
icUInt16Number m_nInputChannels
Definition IccTagMPE.h:191

References CIccCLUT::Begin(), ic1dInterp, ic2dInterp, ic3dInterp, ic3dInterpTetra, ic4dInterp, ic5dInterp, ic6dInterp, icElemInterpTetra, icNdInterp, CIccMpeCLUT::m_interpType, CIccMultiProcessElement::m_nInputChannels, and CIccMpeCLUT::m_pCLUT.

+ Here is the call graph for this function:

◆ Create()

CIccMultiProcessElement * CIccMultiProcessElement::Create ( icElemTypeSignature  sig)
staticinherited

Name: CIccMultiProcessElement::Create

Purpose:

Args:

Return:

132{
134}
static CIccMultiProcessElement * CreateElement(icElemTypeSignature elemTypeSig)
Definition IccMpeFactory.h:213

References CIccMpeCreator::CreateElement().

Referenced by CIccDefaultEncProfileConverter::ConvertFromParams(), CIccSampledCalculatorCurve::Read(), CIccMpeCalculator::Read(), and CIccTagMultiProcessElement::Read().

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

◆ Describe()

void CIccMpeExtCLUT::Describe ( std::string &  sDescription,
int  nVerboseness 
)
virtualinherited

Name: CIccMpeExtCLUT::Describe

Purpose:

Args:

Return:

Reimplemented from CIccMpeCLUT.

5876{
5877 if (m_pCLUT) {
5878 char desc[256];
5879 sprintf(desc, "EXT_ELEM_CLUT(%d)", m_storageType);
5880
5881 m_pCLUT->DumpLut(sDescription, desc, icSigUnknownData, icSigUnknownData, nVerboseness);
5882 }
5883}
#define icSigUnknownData
Definition icProfileHeader.h:903
icUInt16Number m_storageType
Definition IccMpeBasic.h:742
void DumpLut(std::string &sDescription, const icChar *szName, icColorSpaceSignature csInput, icColorSpaceSignature csOutput, int nVerboseness, bool bUseLegacy=false)
Definition IccTagLut.cpp:2157

References CIccCLUT::DumpLut(), CIccMpeCLUT::m_pCLUT, and CIccMpeExtCLUT::m_storageType.

+ Here is the call graph for this function:

◆ GetBAcsSig()

virtual icAcsSignature CIccMultiProcessElement::GetBAcsSig ( )
inlinevirtualinherited

Reimplemented in CIccMpeBAcs.

178{ return icSigAcsZero; }
#define icSigAcsZero
Definition icProfileHeader.h:1100

Referenced by CIccMpeAcs::Describe().

+ Here is the caller graph for this function:

◆ GetClassName()

virtual const char * CIccMpeXmlExtCLUT::GetClassName ( ) const
inlinevirtual

Reimplemented from CIccMpeExtCLUT.

197{ return "CIccMpeXmlExtCLUT"; }

◆ GetCLUT()

CIccCLUT * CIccMpeCLUT::GetCLUT ( )
inlineinherited
678{ return m_pCLUT; }

References CIccMpeCLUT::m_pCLUT.

◆ GetEAcsSig()

virtual icAcsSignature CIccMultiProcessElement::GetEAcsSig ( )
inlinevirtualinherited

Reimplemented in CIccMpeEAcs.

179{ return icSigAcsZero; }

◆ GetExtClassName()

virtual const char * CIccMpeXml::GetExtClassName ( )
inlinevirtualinherited

Implements IIccExtensionMpe.

84{ return "CIccMpeXml"; }

◆ GetExtension()

virtual IIccExtensionMpe * CIccMpeXmlExtCLUT::GetExtension ( )
inlinevirtual

Reimplemented from CIccMultiProcessElement.

199{ return this; }

◆ GetNewApply()

CIccApplyMpe * CIccMpeCLUT::GetNewApply ( CIccApplyTagMpe pApplyTag)
virtualinherited

Name: CIccMpeCLUT::Begin

Purpose:

Args:

Return:

Reimplemented from CIccMultiProcessElement.

5762{
5763 if (!m_pCLUT) {
5764 return NULL;
5765 }
5766
5767 CIccApplyCLUT* pApply = m_pCLUT->GetNewApply();
5768 if (!pApply)
5769 return NULL;
5770
5771 CIccApplyMpeCLUT * rv = new CIccApplyMpeCLUT(this, pApply);
5772 if (!rv)
5773 delete pApply;
5774
5775 return rv;
5776}
Definition IccTagLut.h:302
CIccApplyCLUT * GetNewApply()
Definition IccTagLut.cpp:2403

References CIccApplyMpeCLUT::CIccApplyMpeCLUT(), CIccCLUT::GetNewApply(), and CIccMpeCLUT::m_pCLUT.

+ Here is the call graph for this function:

◆ GetStorageType()

icUInt16Number CIccMpeExtCLUT::GetStorageType ( )
inlineinherited
739{ return m_storageType; }

References CIccMpeExtCLUT::m_storageType.

◆ GetType()

virtual icElemTypeSignature CIccMpeExtCLUT::GetType ( ) const
inlinevirtualinherited

Reimplemented from CIccMpeCLUT.

728{ return icSigExtCLutElemType; }
@ icSigExtCLutElemType
Definition icProfileHeader.h:650

References icSigExtCLutElemType.

Referenced by CIccMpeExtCLUT::Validate(), and CIccMpeExtCLUT::Write().

+ Here is the caller graph for this function:

◆ IsAcs()

virtual bool CIccMultiProcessElement::IsAcs ( )
inlinevirtualinherited

Reimplemented in CIccMpeAcs.

177{ return false; }

Referenced by CIccTagMultiProcessElement::Apply().

+ Here is the caller graph for this function:

◆ IsLateBinding()

virtual bool CIccMultiProcessElement::IsLateBinding ( ) const
inlinevirtualinherited

Reimplemented in CIccMpeCalculator, CIccMpeSpectralMatrix, CIccMpeSpectralCLUT, and CIccMpeSpectralObserver.

184{ return false; }

Referenced by CIccMpeCalculator::IsLateBinding(), and CIccTagMultiProcessElement::IsLateBinding().

+ Here is the caller graph for this function:

◆ IsLateBindingReflectance()

virtual bool CIccMultiProcessElement::IsLateBindingReflectance ( ) const
inlinevirtualinherited

Reimplemented in CIccMpeCalculator, CIccMpeReflectanceCLUT, and CIccMpeReflectanceObserver.

185{ return false; }

Referenced by CIccMpeCalculator::IsLateBindingReflectance(), and CIccTagMultiProcessElement::IsLateBindingReflectance().

+ Here is the caller graph for this function:

◆ IsSupported()

virtual bool CIccMultiProcessElement::IsSupported ( )
inlinevirtualinherited

Reimplemented in CIccMpeUnknown.

162{ return true; }

Referenced by CIccTagMultiProcessElement::IsSupported().

+ Here is the caller graph for this function:

◆ NewCopy()

virtual CIccMultiProcessElement * CIccMpeExtCLUT::NewCopy ( ) const
inlinevirtualinherited

Reimplemented from CIccMpeCLUT.

725{ return new CIccMpeExtCLUT(*this);}
CIccMpeExtCLUT()
Definition IccMpeBasic.cpp:5817

References CIccMpeExtCLUT::CIccMpeExtCLUT().

+ Here is the call graph for this function:

◆ NumInputChannels()

◆ NumOutputChannels()

◆ ParseXml()

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

Implements CIccMpeXml.

1928{
1929 m_storageType = (icUInt16Number)atoi(icXmlAttrValue(pNode, "StorageType", "0"));
1930 m_nReserved2 = atoi(icXmlAttrValue(pNode, "Reserved2", "0"));
1931
1932 m_nInputChannels = atoi(icXmlAttrValue(pNode, "InputChannels"));
1933 m_nOutputChannels = atoi(icXmlAttrValue(pNode, "OutputChannels"));
1934
1936 parseStr += "Invalid InputChannels or OutputChannels In ExtCLutElement\n";
1937 return false;
1938 }
1939
1941 if (pCLut) {
1942 SetCLUT(pCLut);
1943 if (m_pCLUT)
1944 return true;
1945 }
1946
1947 return false;
1948}
unsigned short icUInt16Number
Definition icProfileHeader.h:256
@ icConvertFloat
Definition IccXmlConfig.h:70
const char * icXmlAttrValue(xmlAttr *attr, const char *szDefault="")
Definition IccUtilXml.cpp:572
CIccCLUT * icCLutFromXml(xmlNode *pNode, int nIn, int nOut, icConvertType nType, std::string &parseStr)
Definition IccTagXml.cpp:3327
void SetCLUT(CIccCLUT *pCLUT)
Definition IccMpeBasic.cpp:5480
icUInt16Number m_nReserved2
Definition IccMpeBasic.h:743

References icCLutFromXml(), icConvertFloat, icXmlAttrValue(), CIccMultiProcessElement::m_nInputChannels, CIccMultiProcessElement::m_nOutputChannels, CIccMpeExtCLUT::m_nReserved2, CIccMpeCLUT::m_pCLUT, CIccMpeExtCLUT::m_storageType, and CIccMpeCLUT::SetCLUT().

+ Here is the call graph for this function:

◆ Read()

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

Name: CIccMpeExtCLUT::Read

Purpose:

Args:

Return:

Reimplemented from CIccMpeCLUT.

5924{
5926
5927 icUInt32Number headerSize = sizeof(icTagTypeSignature) +
5928 sizeof(icUInt32Number) +
5929 sizeof(icUInt16Number) +
5930 sizeof(icUInt16Number) +
5931 sizeof(icUInt16Number) +
5932 sizeof(icUInt16Number) +
5933 16 * sizeof(icUInt8Number);
5934
5935 if (headerSize > size)
5936 return false;
5937
5938 icUInt32Number dataSize = size - headerSize;
5939
5940 if (!pIO) {
5941 return false;
5942 }
5943
5944 if (!pIO->Read32(&sig))
5945 return false;
5946
5947 if (!pIO->Read32(&m_nReserved))
5948 return false;
5949
5950 if (!pIO->Read16(&m_nInputChannels))
5951 return false;
5952
5953 if (!pIO->Read16(&m_nOutputChannels))
5954 return false;
5955
5956 if (!pIO->Read16(&m_storageType))
5957 return false;
5958
5959 if (!pIO->Read16(&m_nReserved2))
5960 return false;
5961
5962 icUInt8Number gridPoints[16];
5963
5964 if (pIO->Read8(gridPoints, 16)!=16) {
5965 return false;
5966 }
5967
5969
5970 if (m_nInputChannels > 16 || nPoints > dataSize)
5971 return false;
5972
5974
5975 if (!m_pCLUT)
5976 return false;
5977
5979
5980 if (!m_pCLUT->Init(gridPoints, dataSize, icGetStorageTypeBytes(m_storageType)))
5981 return false;
5982
5983 icFloatNumber *pData = m_pCLUT->GetData(0);
5984
5985 if (!pData)
5986 return false;
5987
5988 nPoints = m_pCLUT->NumPoints()*m_nOutputChannels;
5989
5990 if (nPoints > dataSize)
5991 return false;
5992
5993 switch(m_storageType) {
5994 case icValueTypeUInt8:
5995 if (pIO->ReadUInt8Float(pData,nPoints)!= nPoints)
5996 return false;
5997 break;
5998
5999 case icValueTypeUInt16:
6000 if (nPoints * 2 > dataSize)
6001 return false;
6002
6003 if (pIO->ReadUInt16Float(pData,nPoints)!= nPoints)
6004 return false;
6005 break;
6006
6007 case icValueTypeFloat16:
6008 if (nPoints * 2 > dataSize)
6009 return false;
6010
6011 if (pIO->ReadFloat16Float(pData,nPoints)!= nPoints)
6012 return false;
6013 break;
6014
6015 case icValueTypeFloat32:
6016 if (pIO->ReadFloat32Float(pData,nPoints)!= nPoints)
6017 return false;
6018 break;
6019
6020 default:
6021 return false;
6022 }
6023 return true;
6024}
unsigned char icUInt8Number
Definition icProfileHeader.h:250
unsigned long icUInt32Number
Definition icProfileHeader.h:262
icTagTypeSignature
Definition icProfileHeader.h:526
@ icValueTypeFloat16
Definition icProfileHeader.h:1087
@ icValueTypeUInt8
Definition icProfileHeader.h:1089
@ icValueTypeUInt16
Definition icProfileHeader.h:1088
@ icValueTypeFloat32
Definition icProfileHeader.h:1086
static icFloatNumber NoClip(icFloatNumber v)
Definition IccMpeBasic.cpp:5377
float icFloatNumber
Definition IccDefs.h:101
ICCPROFLIB_API icUInt8Number icGetStorageTypeBytes(icUInt16Number nStorageType)
Definition IccUtil.cpp:1375
icInt32Number ReadFloat16Float(void *pBufFloat, icInt32Number nNum=1)
Definition IccIO.cpp:269
icInt32Number ReadFloat32Float(void *pBufFloat, icInt32Number nNum=1)
Definition IccIO.cpp:302
virtual icInt32Number Read8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:104
icInt32Number Read16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:114
icInt32Number ReadUInt8Float(void *pBufFloat, icInt32Number nNum=1)
Definition IccIO.cpp:203
icInt32Number ReadUInt16Float(void *pBufFloat, icInt32Number nNum=1)
Definition IccIO.cpp:236
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143
void SetClipFunc(icCLUTCLIPFUNC ClipFunc)
Definition IccTagLut.h:379
icUInt32Number NumPoints() const
Definition IccTagLut.h:348
icFloatNumber * GetData(int index)
Definition IccTagLut.h:347
bool Init(icUInt8Number nGridPoints, icUInt32Number nMaxSize=0, icUInt8Number nBytesPerPoint=4)
Definition IccTagLut.cpp:1806
icUInt32Number m_nReserved
Definition IccTagMPE.h:188

References CIccCLUT::CIccCLUT(), CIccCLUT::GetData(), icGetStorageTypeBytes(), icValueTypeFloat16, icValueTypeFloat32, icValueTypeUInt16, icValueTypeUInt8, CIccCLUT::Init(), CIccMultiProcessElement::m_nInputChannels, CIccMultiProcessElement::m_nOutputChannels, CIccMultiProcessElement::m_nReserved, CIccMpeExtCLUT::m_nReserved2, CIccMpeCLUT::m_pCLUT, CIccMpeExtCLUT::m_storageType, NoClip(), CIccCLUT::NumPoints(), CIccIO::Read16(), CIccIO::Read32(), CIccIO::Read8(), CIccIO::ReadFloat16Float(), CIccIO::ReadFloat32Float(), CIccIO::ReadUInt16Float(), CIccIO::ReadUInt8Float(), and CIccCLUT::SetClipFunc().

+ Here is the call graph for this function:

◆ SetCLUT()

void CIccMpeCLUT::SetCLUT ( CIccCLUT pCLUT)
inherited

Name: CIccMpeCLUT::SetCLUT

Purpose:

Args:

Return:

5481{
5482 if (m_pCLUT)
5483 delete m_pCLUT;
5484
5485 m_pCLUT = pCLUT;
5486 if (pCLUT) {
5487 pCLUT->SetClipFunc(NoClip);
5488 m_nInputChannels = pCLUT->GetInputDim();
5490 }
5491}
icUInt8Number GetInputDim() const
Definition IccTagLut.h:356
icUInt16Number GetOutputChannels() const
Definition IccTagLut.h:357

References CIccCLUT::GetInputDim(), CIccCLUT::GetOutputChannels(), CIccMultiProcessElement::m_nInputChannels, CIccMultiProcessElement::m_nOutputChannels, CIccMpeCLUT::m_pCLUT, NoClip(), and CIccCLUT::SetClipFunc().

Referenced by CDevLinkWriter::begin(), main(), CIccMpeXmlCLUT::ParseXml(), and ParseXml().

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

◆ SetStorageType()

bool CIccMpeExtCLUT::SetStorageType ( icUInt16Number  nStorateType)
inherited

Name: CIccMpeExtCLUT::SetStorageType

Purpose: Sets storage type of the data stored in the CLUT

Args: nStorageType is type of data to use

Return: true if valid storage type, false otherwise

5899{
5900 m_storageType = nStorateType;
5901
5902 switch (nStorateType) {
5903 case icValueTypeUInt8:
5904 case icValueTypeUInt16:
5905 case icValueTypeFloat16:
5906 case icValueTypeFloat32:
5907 return true;
5908 }
5909 return false;
5910}

References icValueTypeFloat16, icValueTypeFloat32, icValueTypeUInt16, icValueTypeUInt8, and CIccMpeExtCLUT::m_storageType.

◆ ToXml()

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

Implements CIccMpeXml.

1908{
1909 char attrs[256];
1910 std::string reserved;
1911
1912 if (m_nReserved) {
1913 sprintf(attrs, " Reserved=\"%u\"", m_nReserved);
1914 reserved = attrs;
1915 }
1916
1917 if (m_nReserved2) {
1918 sprintf(attrs, " Reserved2=\"%u\"", m_nReserved2);
1919 reserved += attrs;
1920 }
1921
1922 sprintf(attrs, " InputChannels=\"%d\" OutputChannels=\"%d\"%s StorageType=\"%d\"", NumInputChannels(), NumOutputChannels(), reserved.c_str(), m_storageType);
1923
1924 return icCLUTToXml(xml, m_pCLUT, icConvertFloat, blanks, true, attrs, "ExtCLutElement");
1925}
bool icCLUTToXml(std::string &xml, CIccCLUT *pCLUT, icConvertType nType, std::string blanks, bool bSaveGridPoints=false, const char *szExtraAttrs="", const char *szName="CLUT")
Definition IccUtilXml.cpp:537
virtual icUInt16Number NumInputChannels() const
Definition IccTagMPE.h:159
virtual icUInt16Number NumOutputChannels() const
Definition IccTagMPE.h:160

References icCLUTToXml(), icConvertFloat, CIccMultiProcessElement::m_nReserved, CIccMpeExtCLUT::m_nReserved2, CIccMpeCLUT::m_pCLUT, CIccMpeExtCLUT::m_storageType, CIccMultiProcessElement::NumInputChannels(), and CIccMultiProcessElement::NumOutputChannels().

+ Here is the call graph for this function:

◆ Validate()

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

Name: CIccMpeExtCLUT::Validate

Purpose:

Args:

Return:

Reimplemented from CIccMpeCLUT.

6115{
6116 std::string mpeSigPath = sigPath + icGetSigPath(GetType());
6117 icValidateStatus rv = CIccMpeCLUT::Validate(sigPath, sReport, pMPE, pProfile);
6118
6120 CIccInfo Info;
6121 std::string sSigPathName = Info.GetSigPathName(mpeSigPath);
6122
6123 sReport += icMsgValidateCriticalError;
6124 sReport += sSigPathName;
6125 sReport += " - Invalid value type!\n";
6127 }
6128
6129 return rv;
6130}
#define icMaxValueType
Definition icProfileHeader.h:1092
icValidateStatus
Definition IccDefs.h:119
@ icValidateCriticalError
Definition IccDefs.h:123
ICCPROFLIB_API std::string icGetSigPath(icUInt32Number sig)
Definition IccUtil.cpp:1191
ICCPROFLIB_API const char * icMsgValidateCriticalError
Definition IccUtil.cpp:92
Definition IccUtil.h:303
std::string GetSigPathName(std::string sigPath)
Definition IccUtil.cpp:1614
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
Definition IccMpeBasic.cpp:5732
virtual icElemTypeSignature GetType() const
Definition IccMpeBasic.h:728

References CIccInfo::GetSigPathName(), CIccMpeExtCLUT::GetType(), icGetSigPath(), icMsgValidateCriticalError, icValidateCriticalError, CIccMpeExtCLUT::m_storageType, and CIccMpeCLUT::Validate().

+ Here is the call graph for this function:

◆ Write()

bool CIccMpeExtCLUT::Write ( CIccIO pIO)
virtualinherited

Name: CIccMpeExtCLUT::Write

Purpose:

Args:

Return:

Reimplemented from CIccMpeCLUT.

6037{
6039
6040 if (!pIO)
6041 return false;
6042
6043 if (!pIO->Write32(&sig))
6044 return false;
6045
6046 if (!pIO->Write32(&m_nReserved))
6047 return false;
6048
6049 if (!pIO->Write16(&m_nInputChannels))
6050 return false;
6051
6052 if (!pIO->Write16(&m_nOutputChannels))
6053 return false;
6054
6055 if (!pIO->Write16(&m_storageType))
6056 return false;
6057
6058 if (!pIO->Write16(&m_nReserved2))
6059 return false;
6060
6061 if (m_pCLUT) {
6062 icUInt8Number gridPoints[16];
6063 int i;
6064
6065 for (i=0; i<16; i++)
6066 gridPoints[i] = m_pCLUT->GridPoint(i);
6067
6068 if (pIO->Write8(gridPoints, 16)!=16)
6069 return false;
6070
6071 icFloatNumber *pData = m_pCLUT->GetData(0);
6073
6074 switch(m_storageType) {
6075 case icValueTypeUInt8:
6076 if (pIO->WriteUInt8Float(pData,nPoints)!= nPoints)
6077 return false;
6078 break;
6079
6080 case icValueTypeUInt16:
6081 if (pIO->WriteUInt16Float(pData,nPoints)!= nPoints)
6082 return false;
6083 break;
6084
6085 case icValueTypeFloat16:
6086 if (pIO->WriteFloat16Float(pData,nPoints)!= nPoints)
6087 return false;
6088 break;
6089
6090 case icValueTypeFloat32:
6091 if (pIO->WriteFloat32Float(pData,nPoints)!= nPoints)
6092 return false;
6093 break;
6094
6095 default:
6096 return false;
6097 }
6098 }
6099
6100 return true;
6101}
long icInt32Number
Definition icProfileHeader.h:291
icElemTypeSignature
Definition icProfileHeader.h:641
virtual icInt32Number Write8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:105
icInt32Number Write16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:122
icInt32Number WriteFloat16Float(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:285
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152
icInt32Number WriteFloat32Float(void *pBufFloat, icInt32Number nNum=1)
Definition IccIO.cpp:321
icInt32Number WriteUInt8Float(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:219
icInt32Number WriteUInt16Float(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:252
icUInt8Number GridPoint(int index) const
Definition IccTagLut.h:350

References CIccCLUT::GetData(), CIccMpeExtCLUT::GetType(), CIccCLUT::GridPoint(), icValueTypeFloat16, icValueTypeFloat32, icValueTypeUInt16, icValueTypeUInt8, CIccMultiProcessElement::m_nInputChannels, CIccMultiProcessElement::m_nOutputChannels, CIccMultiProcessElement::m_nReserved, CIccMpeExtCLUT::m_nReserved2, CIccMpeCLUT::m_pCLUT, CIccMpeExtCLUT::m_storageType, CIccCLUT::NumPoints(), CIccIO::Write16(), CIccIO::Write32(), CIccIO::Write8(), CIccIO::WriteFloat16Float(), CIccIO::WriteFloat32Float(), CIccIO::WriteUInt16Float(), and CIccIO::WriteUInt8Float().

+ Here is the call graph for this function:

Field Documentation

◆ m_interpType

icCLUTElemType CIccMpeCLUT::m_interpType
protectedinherited

◆ m_nInputChannels

icUInt16Number CIccMultiProcessElement::m_nInputChannels
protectedinherited

Referenced by CIccMpeBAcs::CIccMpeBAcs(), CIccMpeBAcs::CIccMpeBAcs(), CIccMpeCalculator::CIccMpeCalculator(), CIccMpeCalculator::CIccMpeCalculator(), CIccMpeCAM::CIccMpeCAM(), CIccMpeCLUT::CIccMpeCLUT(), CIccMpeCLUT::CIccMpeCLUT(), CIccMpeCurveSet::CIccMpeCurveSet(), CIccMpeCurveSet::CIccMpeCurveSet(), CIccMpeEAcs::CIccMpeEAcs(), CIccMpeEAcs::CIccMpeEAcs(), CIccMpeExtCLUT::CIccMpeExtCLUT(), CIccMpeMatrix::CIccMpeMatrix(), CIccMpeMatrix::CIccMpeMatrix(), CIccMpeSpectralCLUT::CIccMpeSpectralCLUT(), CIccMpeSpectralCLUT::CIccMpeSpectralCLUT(), CIccMpeSpectralMatrix::CIccMpeSpectralMatrix(), CIccMpeSpectralMatrix::CIccMpeSpectralMatrix(), CIccMpeSpectralObserver::CIccMpeSpectralObserver(), CIccMpeSpectralObserver::CIccMpeSpectralObserver(), CIccMpeTintArray::CIccMpeTintArray(), CIccMpeTintArray::CIccMpeTintArray(), CIccMpeToneMap::CIccMpeToneMap(), CIccMpeToneMap::CIccMpeToneMap(), CIccMultiProcessElement::CIccMultiProcessElement(), CIccMpeAcs::Apply(), CIccMpeCurveSet::Apply(), CIccMpeMatrix::Apply(), CIccMpeAcs::Begin(), CIccMpeCurveSet::Begin(), CIccMpeMatrix::Begin(), CIccMpeCLUT::Begin(), CIccMpeEmissionMatrix::Begin(), CIccMpeInvEmissionMatrix::Begin(), CIccMpeEmissionCLUT::Begin(), CIccMpeReflectanceCLUT::Begin(), CIccMpeEmissionObserver::Begin(), CIccMpeReflectanceObserver::Begin(), CIccMpeSpectralCLUT::copyData(), CIccMpeSpectralMatrix::copyData(), CIccMpeSpectralObserver::copyData(), CIccMpeCurveSet::Describe(), CIccMpeMatrix::Describe(), CIccMpeCalculator::Describe(), CIccMpeSpectralMatrix::Describe(), CIccMpeSpectralObserver::Describe(), CIccMpeXmlCalculator::Flatten(), CIccMultiProcessElement::NumInputChannels(), CIccMpeEmissionMatrix::numVectors(), CIccMpeBAcs::operator=(), CIccMpeCalculator::operator=(), CIccMpeCLUT::operator=(), CIccMpeCurveSet::operator=(), CIccMpeEAcs::operator=(), CIccMpeMatrix::operator=(), CIccMpeTintArray::operator=(), CIccMpeToneMap::operator=(), CIccMpeXmlTintArray::ParseXml(), CIccMpeXmlToneMap::ParseXml(), CIccMpeXmlMatrix::ParseXml(), CIccMpeXmlCLUT::ParseXml(), ParseXml(), CIccMpeXmlBAcs::ParseXml(), CIccMpeXmlEAcs::ParseXml(), CIccMpeXmlJabToXYZ::ParseXml(), CIccMpeXmlXYZToJab::ParseXml(), CIccMpeXmlCalculator::ParseXml(), CIccMpeXmlEmissionCLUT::ParseXml(), CIccMpeXmlReflectanceCLUT::ParseXml(), CIccMpeAcs::Read(), CIccMpeCurveSet::Read(), CIccMpeTintArray::Read(), CIccMpeToneMap::Read(), CIccMpeMatrix::Read(), CIccMpeCLUT::Read(), CIccMpeExtCLUT::Read(), CIccMpeCAM::Read(), CIccMpeSpectralCLUT::Read(), CIccMpeCLUT::SetCLUT(), CIccMpeCurveSet::SetCurve(), CIccMpeSpectralCLUT::SetData(), CIccMpeCalculator::SetSize(), CIccMpeMatrix::SetSize(), CIccMpeSpectralMatrix::SetSize(), CIccMpeSpectralObserver::SetSize(), CIccMpeCurveSet::SetSize(), CIccMpeCurveSet::Validate(), CIccMpeTintArray::Validate(), CIccMpeToneMap::Validate(), CIccMpeCAM::Validate(), CIccMpeInvEmissionMatrix::Validate(), CIccMpeAcs::Write(), CIccMpeCurveSet::Write(), CIccMpeTintArray::Write(), CIccMpeToneMap::Write(), CIccMpeMatrix::Write(), CIccMpeCLUT::Write(), CIccMpeExtCLUT::Write(), CIccMpeCAM::Write(), CIccMpeCalculator::Write(), CIccMpeSpectralMatrix::Write(), CIccMpeSpectralCLUT::Write(), and CIccMpeSpectralObserver::Write().

◆ m_nOutputChannels

icUInt16Number CIccMultiProcessElement::m_nOutputChannels
protectedinherited

Referenced by CIccMpeBAcs::CIccMpeBAcs(), CIccMpeBAcs::CIccMpeBAcs(), CIccMpeCalculator::CIccMpeCalculator(), CIccMpeCalculator::CIccMpeCalculator(), CIccMpeCAM::CIccMpeCAM(), CIccMpeCLUT::CIccMpeCLUT(), CIccMpeCLUT::CIccMpeCLUT(), CIccMpeCurveSet::CIccMpeCurveSet(), CIccMpeCurveSet::CIccMpeCurveSet(), CIccMpeEAcs::CIccMpeEAcs(), CIccMpeEAcs::CIccMpeEAcs(), CIccMpeExtCLUT::CIccMpeExtCLUT(), CIccMpeMatrix::CIccMpeMatrix(), CIccMpeMatrix::CIccMpeMatrix(), CIccMpeSpectralCLUT::CIccMpeSpectralCLUT(), CIccMpeSpectralCLUT::CIccMpeSpectralCLUT(), CIccMpeSpectralMatrix::CIccMpeSpectralMatrix(), CIccMpeSpectralMatrix::CIccMpeSpectralMatrix(), CIccMpeSpectralObserver::CIccMpeSpectralObserver(), CIccMpeSpectralObserver::CIccMpeSpectralObserver(), CIccMpeTintArray::CIccMpeTintArray(), CIccMpeTintArray::CIccMpeTintArray(), CIccMpeToneMap::CIccMpeToneMap(), CIccMpeToneMap::CIccMpeToneMap(), CIccMultiProcessElement::CIccMultiProcessElement(), CIccMpeTintArray::Apply(), CIccMpeToneMap::Apply(), CIccMpeMatrix::Apply(), CIccMpeAcs::Begin(), CIccMpeTintArray::Begin(), CIccMpeToneMap::Begin(), CIccMpeMatrix::Begin(), CIccMpeEmissionMatrix::Begin(), CIccMpeInvEmissionMatrix::Begin(), CIccMpeEmissionCLUT::Begin(), CIccMpeReflectanceCLUT::Begin(), CIccMpeEmissionObserver::Begin(), CIccMpeReflectanceObserver::Begin(), CIccMpeToneMap::ClearToneFuncs(), CIccMpeSpectralCLUT::copyData(), CIccMpeSpectralMatrix::copyData(), CIccMpeSpectralObserver::copyData(), CIccMpeToneMap::CopyToneFuncs(), CIccMpeMatrix::Describe(), CIccMpeCalculator::Describe(), CIccMpeSpectralMatrix::Describe(), CIccMpeSpectralObserver::Describe(), CIccMpeTintArray::Describe(), CIccMpeToneMap::Describe(), CIccMpeXmlCalculator::Flatten(), CIccMpeToneMap::Insert(), CIccMultiProcessElement::NumOutputChannels(), CIccMpeInvEmissionMatrix::numVectors(), CIccMpeBAcs::operator=(), CIccMpeCalculator::operator=(), CIccMpeCLUT::operator=(), CIccMpeCurveSet::operator=(), CIccMpeEAcs::operator=(), CIccMpeMatrix::operator=(), CIccMpeTintArray::operator=(), CIccMpeToneMap::operator=(), CIccMpeXmlTintArray::ParseXml(), CIccMpeXmlToneMap::ParseXml(), CIccMpeXmlMatrix::ParseXml(), CIccMpeXmlCLUT::ParseXml(), ParseXml(), CIccMpeXmlBAcs::ParseXml(), CIccMpeXmlEAcs::ParseXml(), CIccMpeXmlJabToXYZ::ParseXml(), CIccMpeXmlXYZToJab::ParseXml(), CIccMpeXmlCalculator::ParseXml(), CIccMpeXmlEmissionCLUT::ParseXml(), CIccMpeXmlReflectanceCLUT::ParseXml(), CIccMpeAcs::Read(), CIccMpeTintArray::Read(), CIccMpeToneMap::Read(), CIccMpeMatrix::Read(), CIccMpeCLUT::Read(), CIccMpeExtCLUT::Read(), CIccMpeCAM::Read(), CIccMpeSpectralCLUT::Read(), CIccMpeCLUT::SetCLUT(), CIccMpeSpectralCLUT::SetData(), CIccMpeToneMap::SetNumOutputChannels(), CIccMpeCalculator::SetSize(), CIccMpeMatrix::SetSize(), CIccMpeSpectralMatrix::SetSize(), CIccMpeSpectralObserver::SetSize(), CIccMpeCurveSet::SetSize(), CIccMpeTintArray::SetVectorSize(), CIccMpeTintArray::Validate(), CIccMpeToneMap::Validate(), CIccMpeCAM::Validate(), CIccMpeSpectralMatrix::Validate(), CIccMpeSpectralObserver::Validate(), CIccMpeAcs::Write(), CIccMpeTintArray::Write(), CIccMpeToneMap::Write(), CIccMpeMatrix::Write(), CIccMpeCLUT::Write(), CIccMpeExtCLUT::Write(), CIccMpeCAM::Write(), CIccMpeCalculator::Write(), CIccMpeSpectralMatrix::Write(), CIccMpeSpectralCLUT::Write(), and CIccMpeSpectralObserver::Write().

◆ m_nReserved

icUInt32Number CIccMultiProcessElement::m_nReserved
inherited

Referenced by CIccMpeAcs::CIccMpeAcs(), CIccMpeBAcs::CIccMpeBAcs(), CIccMpeCalculator::CIccMpeCalculator(), CIccMpeCalculator::CIccMpeCalculator(), CIccMpeCAM::CIccMpeCAM(), CIccMpeCLUT::CIccMpeCLUT(), CIccMpeCLUT::CIccMpeCLUT(), CIccMpeCurveSet::CIccMpeCurveSet(), CIccMpeCurveSet::CIccMpeCurveSet(), CIccMpeEAcs::CIccMpeEAcs(), CIccMpeExtCLUT::CIccMpeExtCLUT(), CIccMpeMatrix::CIccMpeMatrix(), CIccMpeMatrix::CIccMpeMatrix(), CIccMpeSpectralCLUT::CIccMpeSpectralCLUT(), CIccMpeSpectralCLUT::CIccMpeSpectralCLUT(), CIccMpeSpectralMatrix::CIccMpeSpectralMatrix(), CIccMpeSpectralMatrix::CIccMpeSpectralMatrix(), CIccMpeSpectralObserver::CIccMpeSpectralObserver(), CIccMpeSpectralObserver::CIccMpeSpectralObserver(), CIccMpeTintArray::CIccMpeTintArray(), CIccMpeTintArray::CIccMpeTintArray(), CIccMpeToneMap::CIccMpeToneMap(), CIccMpeToneMap::CIccMpeToneMap(), CIccMultiProcessElement::CIccMultiProcessElement(), CIccMpeSpectralCLUT::copyData(), CIccMpeSpectralMatrix::copyData(), CIccMpeSpectralObserver::copyData(), CIccMpeBAcs::operator=(), CIccMpeCalculator::operator=(), CIccMpeCLUT::operator=(), CIccMpeCurveSet::operator=(), CIccMpeEAcs::operator=(), CIccMpeMatrix::operator=(), CIccMpeTintArray::operator=(), CIccMpeToneMap::operator=(), CIccTagXmlMultiProcessElement::ParseElement(), CIccMpeXmlCalculator::ParseImport(), CIccMpeAcs::Read(), CIccMpeCurveSet::Read(), CIccMpeTintArray::Read(), CIccMpeToneMap::Read(), CIccMpeMatrix::Read(), CIccMpeCLUT::Read(), CIccMpeExtCLUT::Read(), CIccMpeCAM::Read(), CIccMpeCalculator::Read(), CIccMpeSpectralMatrix::Read(), CIccMpeSpectralCLUT::Read(), CIccMpeSpectralObserver::Read(), CIccMpeXmlCurveSet::ToXml(), CIccMpeXmlTintArray::ToXml(), CIccMpeXmlToneMap::ToXml(), CIccMpeXmlMatrix::ToXml(), CIccMpeXmlCLUT::ToXml(), ToXml(), CIccMpeXmlBAcs::ToXml(), CIccMpeXmlEAcs::ToXml(), CIccMpeXmlJabToXYZ::ToXml(), CIccMpeXmlXYZToJab::ToXml(), CIccMpeXmlCalculator::ToXml(), CIccMpeXmlEmissionMatrix::ToXml(), CIccMpeXmlInvEmissionMatrix::ToXml(), CIccMpeXmlEmissionCLUT::ToXml(), CIccMpeXmlReflectanceCLUT::ToXml(), CIccMpeXmlEmissionObserver::ToXml(), CIccMpeXmlReflectanceObserver::ToXml(), CIccMultiProcessElement::Validate(), CIccMpeAcs::Write(), CIccMpeCurveSet::Write(), CIccMpeTintArray::Write(), CIccMpeToneMap::Write(), CIccMpeMatrix::Write(), CIccMpeCLUT::Write(), CIccMpeExtCLUT::Write(), CIccMpeCAM::Write(), CIccMpeCalculator::Write(), CIccMpeSpectralMatrix::Write(), CIccMpeSpectralCLUT::Write(), and CIccMpeSpectralObserver::Write().

◆ m_nReserved2

◆ m_pCLUT

◆ m_storageType


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