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

Class: CIccMpeSpectralCLUT. More...

#include <IccMpeSpectral.h>

+ Inheritance diagram for CIccMpeSpectralCLUT:
+ Collaboration diagram for CIccMpeSpectralCLUT:

Public Member Functions

virtual void Apply (CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const
 Name: CIccMpeEmissionCLUT::Apply.
 
 CIccMpeSpectralCLUT ()
 Name: CIccMpeSpectralCLUT::CIccMpeSpectralCLUT.
 
 CIccMpeSpectralCLUT (const CIccMpeSpectralCLUT &ITPC)
 Name: CIccMpeSpectralCLUT::CIccMpeSpectralCLUT.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccMpeSpectralCLUT::Describe.
 
CIccCLUTGetApplyCLUT ()
 
CIccCLUTGetCLUT ()
 
virtual CIccApplyMpeGetNewApply (CIccApplyTagMpe *pApplyTag)
 Name: CIccMpeSpectralCLUT::GetNewApply.
 
icFloatNumberGetWhite ()
 
virtual bool IsLateBinding () const
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Name: CIccMpeSpectralCLUT::Read.
 
void SetData (CIccCLUT *pCLUT, icUInt16Number nStorageType, const icSpectralRange &range, icFloatNumber *pWhite, icUInt16Number nOutputChannels=3)
 Name: CIccMpeSpectralCLUT::SetCLUT.
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
 Name: CIccMpeSpectralCLUT::Validate.
 
virtual bool Write (CIccIO *pIO)
 Name: CIccMpeSpectralCLUT::Write.
 
virtual ~CIccMpeSpectralCLUT ()
 Name: CIccMpeSpectralCLUT::~CIccMpeSpectralCLUT.
 
- Public Member Functions inherited from CIccMultiProcessElement
virtual bool Begin (icElemInterp nIterp=icElemInterpLinear, CIccTagMultiProcessElement *pMPE=NULL)=0
 
 CIccMultiProcessElement ()
 
virtual icAcsSignature GetBAcsSig ()
 
virtual const icCharGetClassName () const =0
 
virtual icAcsSignature GetEAcsSig ()
 
virtual IIccExtensionMpeGetExtension ()
 
virtual icElemTypeSignature GetType () const =0
 
virtual bool IsAcs ()
 
virtual bool IsLateBindingReflectance () const
 
virtual bool IsSupported ()
 
virtual CIccMultiProcessElementNewCopy () const =0
 
virtual icUInt16Number NumInputChannels () const
 
virtual icUInt16Number NumOutputChannels () const
 
virtual ~CIccMultiProcessElement ()
 

Protected Member Functions

void copyData (const CIccMpeSpectralCLUT &ITPC)
 Name: &CIccMpeSpectralCLUT::operator=.
 
virtual const char * GetDescribeName () const =0
 

Protected Attributes

icUInt32Number m_flags
 
icCLUTElemType m_interpType
 
icUInt16Number m_nStorageType
 
CIccCLUTm_pApplyCLUT
 
CIccCLUTm_pCLUT
 
icFloatNumberm_pWhite
 
icSpectralRange m_Range
 
- Protected Attributes inherited from CIccMultiProcessElement
icUInt16Number m_nInputChannels
 
icUInt16Number m_nOutputChannels
 

Additional Inherited Members

- Static Public Member Functions inherited from CIccMultiProcessElement
static CIccMultiProcessElementCreate (icElemTypeSignature sig)
 Name: CIccMultiProcessElement::Create.
 
- Public Attributes inherited from CIccMultiProcessElement
icUInt32Number m_nReserved
 

Detailed Description

Class: CIccMpeSpectralCLUT.

Purpose: The float Color LookUp Table tag

Definition at line 203 of file IccMpeSpectral.h.

Constructor & Destructor Documentation

◆ CIccMpeSpectralCLUT() [1/2]

CIccMpeSpectralCLUT::CIccMpeSpectralCLUT ( )

Name: CIccMpeSpectralCLUT::CIccMpeSpectralCLUT.

Purpose:

Args:

Return:

Definition at line 795 of file IccMpeSpectral.cpp.

796{
799
800 m_nReserved = 0;
801
802 m_Range.start = 0;
803 m_Range.end = 0;
804 m_Range.steps = 0;
805
807 m_flags = 0;
808
809 m_pCLUT = NULL;
810 m_pApplyCLUT = NULL;
811 m_pWhite = NULL;
812}
icUInt32Number m_flags
icUInt16Number m_nStorageType
icSpectralRange m_Range
icFloatNumber * m_pWhite
icUInt16Number m_nOutputChannels
Definition IccTagMPE.h:192
icUInt16Number m_nInputChannels
Definition IccTagMPE.h:191
icUInt32Number m_nReserved
Definition IccTagMPE.h:188
@ icValueTypeFloat32
icUInt16Number steps
icFloat16Number start
icFloat16Number end

References icValueTypeFloat32.

◆ CIccMpeSpectralCLUT() [2/2]

CIccMpeSpectralCLUT::CIccMpeSpectralCLUT ( const CIccMpeSpectralCLUT & clut)

Name: CIccMpeSpectralCLUT::CIccMpeSpectralCLUT.

Purpose:

Args:

Return:

Definition at line 824 of file IccMpeSpectral.cpp.

825{
826 if (clut.m_pCLUT)
827 m_pCLUT = new CIccCLUT(*clut.m_pCLUT);
828 else
829 m_pCLUT = NULL;
830
831 if (clut.m_pApplyCLUT)
833 else
834 m_pApplyCLUT = NULL;
835
836 if (clut.m_pWhite) {
837 m_pWhite = (icFloatNumber *)malloc((int)clut.m_Range.steps*sizeof(icFloatNumber));
838 memcpy(m_pWhite, clut.m_pWhite, clut.m_Range.steps*sizeof(icFloatNumber));
839 }
840 else
841 m_pWhite = NULL;
842
846
847 m_Range = clut.m_Range;
849 m_flags = clut.m_flags;
850}
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
Class: CIccCLUT.
Definition IccTagLut.h:326

References m_flags, CIccMultiProcessElement::m_nInputChannels, CIccMultiProcessElement::m_nOutputChannels, CIccMultiProcessElement::m_nReserved, m_nStorageType, m_pApplyCLUT, m_pCLUT, m_pWhite, m_Range, and icSpectralRange::steps.

◆ ~CIccMpeSpectralCLUT()

CIccMpeSpectralCLUT::~CIccMpeSpectralCLUT ( )
virtual

Name: CIccMpeSpectralCLUT::~CIccMpeSpectralCLUT.

Purpose:

Args:

Return:

Definition at line 909 of file IccMpeSpectral.cpp.

910{
911 if (m_pCLUT)
912 delete m_pCLUT;
913
914 if (m_pApplyCLUT)
915 delete m_pApplyCLUT;
916
917 if (m_pWhite)
918 free(m_pWhite);
919
920}

Member Function Documentation

◆ Apply()

void CIccMpeSpectralCLUT::Apply ( CIccApplyMpe * pApply,
icFloatNumber * dstPixel,
const icFloatNumber * srcPixel ) const
virtual

Name: CIccMpeEmissionCLUT::Apply.

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

Definition at line 1278 of file IccMpeSpectral.cpp.

1279{
1280 const CIccCLUT *pCLUT = m_pApplyCLUT;
1281
1282 switch(m_interpType) {
1283 case ic1dInterp:
1284 pCLUT->Interp1d(dstPixel, srcPixel);
1285 break;
1286 case ic2dInterp:
1287 pCLUT->Interp2d(dstPixel, srcPixel);
1288 break;
1289 case ic3dInterpTetra:
1290 pCLUT->Interp3dTetra(dstPixel, srcPixel);
1291 break;
1292 case ic3dInterp:
1293 pCLUT->Interp3d(dstPixel, srcPixel);
1294 break;
1295 case ic4dInterp:
1296 pCLUT->Interp4d(dstPixel, srcPixel);
1297 break;
1298 case ic5dInterp:
1299 pCLUT->Interp5d(dstPixel, srcPixel);
1300 break;
1301 case ic6dInterp:
1302 pCLUT->Interp6d(dstPixel, srcPixel);
1303 break;
1304 case icNdInterp:
1306 pCLUT->InterpND(dstPixel, srcPixel, pClutApply->m_pApply);
1307 break;
1308 }
1309}
@ ic1dInterp
@ ic3dInterpTetra
@ ic6dInterp
@ icNdInterp
@ ic2dInterp
@ ic4dInterp
@ ic5dInterp
@ ic3dInterp
Class: CIccApplyMpeSpectralCLUT.
void Interp4d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Name: CIccCLUT::Interp4d.
void Interp2d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Name: CIccCLUT::Interp2d.
void Interp6d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Name: CIccCLUT::Interp6d.
void Interp3d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Name: CIccCLUT::Interp3d.
void Interp5d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Name: CIccCLUT::Interp5d.
void Interp3dTetra(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Name: CIccCLUT::Interp3dTetra.
void Interp1d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Name: CIccCLUT::Interp1d.
void InterpND(icFloatNumber *destPixel, const icFloatNumber *srcPixel, CIccApplyCLUT *pApply) const
Name: CIccCLUT::InterpND.
icCLUTElemType m_interpType

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(), and CIccApplyMpeSpectralCLUT::m_pApply.

+ Here is the call graph for this function:

◆ copyData()

void CIccMpeSpectralCLUT::copyData ( const CIccMpeSpectralCLUT & clut)
protected

Name: &CIccMpeSpectralCLUT::operator=.

Purpose:

Args:

Return:

Definition at line 862 of file IccMpeSpectral.cpp.

863{
864 if (m_pCLUT)
865 delete m_pCLUT;
866
867 if (m_pApplyCLUT)
868 delete m_pApplyCLUT;
869
870 if (m_pWhite)
871 free(m_pWhite);
872
873 if (clut.m_pCLUT)
874 m_pCLUT = new CIccCLUT(*clut.m_pCLUT);
875 else
876 m_pCLUT = NULL;
877
878 if (clut.m_pApplyCLUT)
880 else
881 m_pApplyCLUT = NULL;
882
883 if (clut.m_pWhite) {
884 m_pWhite = (icFloatNumber *)malloc((int)clut.m_Range.steps*sizeof(icFloatNumber));
885 memcpy(m_pWhite, clut.m_pWhite, clut.m_Range.steps*sizeof(icFloatNumber));
886 }
887 else
888 m_pWhite = NULL;
889
893
894 m_Range = clut.m_Range;
896 m_flags = clut.m_flags;
897}

References m_flags, CIccMultiProcessElement::m_nInputChannels, CIccMultiProcessElement::m_nOutputChannels, CIccMultiProcessElement::m_nReserved, m_nStorageType, m_pApplyCLUT, m_pCLUT, m_pWhite, m_Range, and icSpectralRange::steps.

◆ Describe()

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

Name: CIccMpeSpectralCLUT::Describe.

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

Definition at line 971 of file IccMpeSpectral.cpp.

972{
973 if (m_pCLUT) {
974 m_pCLUT->DumpLut(sDescription, GetDescribeName(), icSigUnknownData, icSigUnknownData, nVerboseness);
975 }
976}
void DumpLut(std::string &sDescription, const icChar *szName, icColorSpaceSignature csInput, icColorSpaceSignature csOutput, int nVerboseness, bool bUseLegacy=false)
Name: CIccCLUT::DumpLut.
virtual const char * GetDescribeName() const =0
#define icSigUnknownData

References icSigUnknownData.

◆ GetApplyCLUT()

CIccCLUT * CIccMpeSpectralCLUT::GetApplyCLUT ( )
inline

Definition at line 225 of file IccMpeSpectral.h.

225{ return m_pApplyCLUT; }

◆ GetCLUT()

CIccCLUT * CIccMpeSpectralCLUT::GetCLUT ( )
inline

Definition at line 224 of file IccMpeSpectral.h.

224{ return m_pCLUT; }

◆ GetDescribeName()

virtual const char * CIccMpeSpectralCLUT::GetDescribeName ( ) const
protectedpure virtual

◆ GetNewApply()

CIccApplyMpe * CIccMpeSpectralCLUT::GetNewApply ( CIccApplyTagMpe * pApplyTag)
virtual

Name: CIccMpeSpectralCLUT::GetNewApply.

Purpose:

Args:

Return:

Reimplemented from CIccMultiProcessElement.

Definition at line 1251 of file IccMpeSpectral.cpp.

1252{
1253 if (!m_pCLUT) {
1254 return NULL;
1255 }
1256
1257 CIccApplyCLUT* pApply = m_pCLUT->GetNewApply();
1258 if (!pApply)
1259 return NULL;
1260
1261 CIccApplyMpeSpectralCLUT* rv = new CIccApplyMpeSpectralCLUT(this, pApply);
1262 if (!rv)
1263 delete pApply;
1264
1265 return rv;
1266}
Class: CIccApplyCLUT.
Definition IccTagLut.h:302
CIccApplyCLUT * GetNewApply()

◆ GetWhite()

icFloatNumber * CIccMpeSpectralCLUT::GetWhite ( )
inline

Definition at line 226 of file IccMpeSpectral.h.

226{ return m_pWhite; }

◆ IsLateBinding()

virtual bool CIccMpeSpectralCLUT::IsLateBinding ( ) const
inlinevirtual

Reimplemented from CIccMultiProcessElement.

Definition at line 228 of file IccMpeSpectral.h.

228{ return true; }

◆ Read()

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

Name: CIccMpeSpectralCLUT::Read.

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

Definition at line 989 of file IccMpeSpectral.cpp.

990{
992
993 icUInt32Number headerSize = sizeof(icTagTypeSignature) +
994 sizeof(icUInt32Number) +
995 sizeof(icUInt32Number) +
996 sizeof(icUInt16Number) +
997 sizeof(icUInt16Number) +
998 sizeof(icUInt16Number) +
999 sizeof(icUInt16Number) +
1000 sizeof(icUInt16Number) +
1001 sizeof(icUInt16Number) +
1002 16 * sizeof(icUInt8Number);
1003
1004 if (headerSize > size)
1005 return false;
1006
1007 if (!pIO) {
1008 return false;
1009 }
1010
1011 if (!pIO->Read32(&sig))
1012 return false;
1013
1014 if (!pIO->Read32(&m_nReserved))
1015 return false;
1016
1017 if (!pIO->Read16(&m_nInputChannels))
1018 return false;
1019
1020 if (!pIO->Read16(&m_nOutputChannels))
1021 return false;
1022
1023 if (!pIO->Read32(&m_flags))
1024 return false;
1025
1026 if (!pIO->Read16(&m_Range.start))
1027 return false;
1028
1029 if (!pIO->Read16(&m_Range.end))
1030 return false;
1031
1032 if (!pIO->Read16(&m_Range.steps))
1033 return false;
1034
1035 if (!pIO->Read16(&m_nStorageType))
1036 return false;
1037
1038 icUInt8Number gridPoints[16];
1039
1040 if (pIO->Read8(gridPoints, 16)!=16) {
1041 return false;
1042 }
1043
1045
1046 if (!m_pCLUT)
1047 return false;
1048
1051
1052 if (!nBytesPerPoint)
1053 return false;
1054
1055 m_pCLUT->Init(gridPoints, size - headerSize, (icUInt8Number)nBytesPerPoint);
1056
1057 icFloatNumber *pData = m_pCLUT->GetData(0);
1058
1059 if (!pData)
1060 return false;
1061
1062 icInt32Number nPoints = m_pCLUT->NumPoints()*(int)m_Range.steps;
1063
1064 switch(m_nStorageType) {
1065 case icValueTypeUInt8:
1066 if (pIO->ReadUInt8Float(pData,nPoints)!= nPoints)
1067 return false;
1068 break;
1069
1070 case icValueTypeUInt16:
1071 if (pIO->ReadUInt16Float(pData,nPoints)!= nPoints)
1072 return false;
1073 break;
1074
1075 case icValueTypeFloat16:
1076 if (pIO->ReadFloat16Float(pData,nPoints)!= nPoints)
1077 return false;
1078 break;
1079
1080 case icValueTypeFloat32:
1081 if (pIO->ReadFloat32Float(pData,nPoints)!= nPoints)
1082 return false;
1083 break;
1084
1085 default:
1086 return false;
1087 }
1088
1089 if (m_Range.steps *nBytesPerPoint > size - headerSize - nPoints*nBytesPerPoint)
1090 return false;
1091
1092 m_pWhite = (icFloatNumber *)malloc((int)m_Range.steps*sizeof(icFloatNumber));
1093 if (!m_pWhite)
1094 return false;
1095
1096 switch(m_nStorageType) {
1097 case icValueTypeUInt8:
1099 return false;
1100 break;
1101
1102 case icValueTypeUInt16:
1104 return false;
1105 break;
1106
1107 case icValueTypeFloat16:
1109 return false;
1110 break;
1111
1112 case icValueTypeFloat32:
1114 return false;
1115 break;
1116
1117 default:
1118 return false;
1119 }
1120
1121
1122 return true;
1123}
icArraySignature sig
static icFloatNumber NoClip(icFloatNumber v)
icUInt8Number icGetStorageTypeBytes(icUInt16Number nStorageType)
Definition IccUtil.cpp:1375
icTagTypeSignature
unsigned int icUInt32Number
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)
Name: CIccCLUT::Init.
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
unsigned char icUInt8Number
Number definitions.
unsigned short icUInt16Number
long icInt32Number
@ icValueTypeFloat16
@ icValueTypeUInt8
@ icValueTypeUInt16

References icGetStorageTypeBytes(), icValueTypeFloat16, icValueTypeFloat32, icValueTypeUInt16, icValueTypeUInt8, NoClip(), CIccIO::Read16(), CIccIO::Read32(), CIccIO::Read8(), CIccIO::ReadFloat16Float(), CIccIO::ReadFloat32Float(), CIccIO::ReadUInt16Float(), CIccIO::ReadUInt8Float(), and sig.

+ Here is the call graph for this function:

◆ SetData()

void CIccMpeSpectralCLUT::SetData ( CIccCLUT * pCLUT,
icUInt16Number nStorageType,
const icSpectralRange & range,
icFloatNumber * pWhite,
icUInt16Number nOutputChannels = 3 )

Name: CIccMpeSpectralCLUT::SetCLUT.

Purpose:

Args:

Return:

Definition at line 932 of file IccMpeSpectral.cpp.

935{
936 if (m_pCLUT)
937 delete m_pCLUT;
938
939 m_pCLUT = pCLUT;
940 if (pCLUT) {
941 pCLUT->SetClipFunc(NoClip);
942 m_nInputChannels = pCLUT->GetInputDim();
943 m_nOutputChannels = nOutputChannels;
944 }
945
946 m_nStorageType = nStorageType;
947
948 if (m_pApplyCLUT) {
949 delete m_pApplyCLUT;
950 m_pApplyCLUT = NULL;
951 }
952
953 m_Range = range;
954
955 if (m_pWhite)
956 free(m_pWhite);
957
958 m_pWhite = pWhite;
959}
icUInt8Number GetInputDim() const
Definition IccTagLut.h:356

References CIccCLUT::GetInputDim(), NoClip(), and CIccCLUT::SetClipFunc().

+ Here is the call graph for this function:

◆ Validate()

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

Name: CIccMpeSpectralCLUT::Validate.

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

Definition at line 1322 of file IccMpeSpectral.cpp.

1323{
1324 std::string mpeSigPath = sigPath + icGetSigPath(GetType());
1325 icValidateStatus rv = CIccMultiProcessElement::Validate(sigPath, sReport, pMPE, pProfile);
1326
1328 CIccInfo Info;
1329 std::string sSigPathName = Info.GetSigPathName(mpeSigPath);
1330
1331 sReport += icMsgValidateCriticalError;
1332 sReport += sSigPathName;
1333 sReport += " - Invalid storageType value!\n";
1335 }
1336
1337 if (!m_pCLUT) {
1338 CIccInfo Info;
1339 std::string sSigPathName = Info.GetSigPathName(mpeSigPath);
1340
1341 sReport += icMsgValidateCriticalError;
1342 sReport += sSigPathName;
1343 sReport += " - Has No CLUT!\n";
1345 }
1346
1347 if (!m_pWhite) {
1348 CIccInfo Info;
1349 std::string sSigPathName = Info.GetSigPathName(mpeSigPath);
1350
1351 sReport += icMsgValidateCriticalError;
1352 sReport += sSigPathName;
1353 sReport += " - Has Empty White data!\n";
1355 }
1356
1357 if (!m_Range.steps) {
1358 CIccInfo Info;
1359 std::string sSigPathName = Info.GetSigPathName(mpeSigPath);
1360
1361 sReport += icMsgValidateCriticalError;
1362 sReport += sSigPathName;
1363 sReport += " - Cannot have zero spectral range steps!\n";
1365 }
1366
1367 if (m_Range.start>= m_Range.end || !m_Range.steps) {
1368 CIccInfo Info;
1369 std::string sSigPathName = Info.GetSigPathName(mpeSigPath);
1370
1371 sReport += icMsgValidateCriticalError;
1372 sReport += sSigPathName;
1373 sReport += " - Has an invalid spectral range!\n";
1375 }
1376
1377 return rv;
1378}
icValidateStatus
Definition IccDefs.h:118
@ 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 * icMsgValidateCriticalError
Definition IccUtil.cpp:92
Type: Class.
Definition IccUtil.h:303
std::string GetSigPathName(std::string sigPath)
Definition IccUtil.cpp:1614
virtual icElemTypeSignature GetType() const =0
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const =0
Name: CIccProcessElement::Validate.
#define icMaxValueType

References CIccInfo::GetSigPathName(), icGetSigPath(), icMaxStatus(), icMaxValueType, icMsgValidateCriticalError, icValidateCriticalError, and CIccMultiProcessElement::Validate().

+ Here is the call graph for this function:

◆ Write()

bool CIccMpeSpectralCLUT::Write ( CIccIO * pIO)
virtual

Name: CIccMpeSpectralCLUT::Write.

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

Definition at line 1135 of file IccMpeSpectral.cpp.

1136{
1138
1139 if (!pIO)
1140 return false;
1141
1142 if (!pIO->Write32(&sig))
1143 return false;
1144
1145 if (!pIO->Write32(&m_nReserved))
1146 return false;
1147
1148 if (!pIO->Write16(&m_nInputChannels))
1149 return false;
1150
1151 if (!pIO->Write16(&m_nOutputChannels))
1152 return false;
1153
1154 if (!pIO->Write32(&m_flags))
1155 return false;
1156
1157 if (!pIO->Write16(&m_Range.start))
1158 return false;
1159
1160 if (!pIO->Write16(&m_Range.end))
1161 return false;
1162
1163 if (!pIO->Write16(&m_Range.steps))
1164 return false;
1165
1166 if (!pIO->Write16(&m_nStorageType))
1167 return false;
1168
1169 if (m_pCLUT) {
1170 icUInt8Number gridPoints[16];
1171 int i;
1172
1173 for (i=0; i<16; i++)
1174 gridPoints[i] = m_pCLUT->GridPoint(i);
1175
1176 if (pIO->Write8(gridPoints, 16)!=16)
1177 return false;
1178
1179 icFloatNumber *pData = m_pCLUT->GetData(0);
1180 icInt32Number nPoints = m_pCLUT->NumPoints()*(int)m_Range.steps;
1181
1182 switch(m_nStorageType) {
1183 case icValueTypeUInt8:
1184 if (pIO->WriteUInt8Float(pData,nPoints)!= nPoints)
1185 return false;
1186 break;
1187
1188 case icValueTypeUInt16:
1189 if (pIO->WriteUInt16Float(pData,nPoints)!= nPoints)
1190 return false;
1191 break;
1192
1193 case icValueTypeFloat16:
1194 if (pIO->WriteFloat16Float(pData,nPoints)!= nPoints)
1195 return false;
1196 break;
1197
1198 case icValueTypeFloat32:
1199 if (pIO->WriteFloat32Float(pData,nPoints)!= nPoints)
1200 return false;
1201 break;
1202
1203 default:
1204 return false;
1205 }
1206 }
1207
1208 if (m_pWhite) {
1209 switch(m_nStorageType) {
1210 case icValueTypeUInt8:
1212 return false;
1213 break;
1214
1215 case icValueTypeUInt16:
1217 return false;
1218 break;
1219
1220 case icValueTypeFloat16:
1222 return false;
1223 break;
1224
1225 case icValueTypeFloat32:
1227 return false;
1228 break;
1229
1230 default:
1231 return false;
1232 }
1233 }
1234 else if (m_Range.steps) {
1235 return false;
1236 }
1237
1238 return true;
1239}
icUInt8Number GridPoint(int index) const
Definition IccTagLut.h:350
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
icElemTypeSignature
Multi-Processing Element type signatures.

References icValueTypeFloat16, icValueTypeFloat32, icValueTypeUInt16, icValueTypeUInt8, sig, CIccIO::Write16(), CIccIO::Write32(), CIccIO::Write8(), CIccIO::WriteFloat16Float(), CIccIO::WriteFloat32Float(), CIccIO::WriteUInt16Float(), and CIccIO::WriteUInt8Float().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_flags

icUInt32Number CIccMpeSpectralCLUT::m_flags
protected

◆ m_interpType

icCLUTElemType CIccMpeSpectralCLUT::m_interpType
protected

Definition at line 241 of file IccMpeSpectral.h.

Referenced by CIccMpeEmissionCLUT::Begin(), and CIccMpeReflectanceCLUT::Begin().

◆ m_nStorageType

icUInt16Number CIccMpeSpectralCLUT::m_nStorageType
protected

Definition at line 235 of file IccMpeSpectral.h.

Referenced by CIccMpeSpectralCLUT(), and copyData().

◆ m_pApplyCLUT

CIccCLUT* CIccMpeSpectralCLUT::m_pApplyCLUT
protected

◆ m_pCLUT

CIccCLUT* CIccMpeSpectralCLUT::m_pCLUT
protected

◆ m_pWhite

icFloatNumber* CIccMpeSpectralCLUT::m_pWhite
protected

◆ m_Range

icSpectralRange CIccMpeSpectralCLUT::m_Range
protected

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