IccMAX 2.1.27
Color Profile Tools
Loading...
Searching...
No Matches
CIccMpeSpectralMatrix Class Referenceabstract

#include <IccMpeSpectral.h>

+ Inheritance diagram for CIccMpeSpectralMatrix:
+ Collaboration diagram for CIccMpeSpectralMatrix:

Public Member Functions

 CIccMpeSpectralMatrix ()
 
 CIccMpeSpectralMatrix (const CIccMpeSpectralMatrix &ITPC)
 
virtual ~CIccMpeSpectralMatrix ()
 
virtual void Apply (CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const =0
 
virtual bool Begin (icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)=0
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 
virtual icAcsSignature GetBAcsSig ()
 
virtual const icCharGetClassName () const =0
 
virtual icAcsSignature GetEAcsSig ()
 
virtual IIccExtensionMpeGetExtension ()
 
icFloatNumberGetMatrix ()
 
virtual CIccApplyMpeGetNewApply (CIccApplyTagMpe *pApplyTag)
 
icFloatNumberGetOffset ()
 
const icSpectralRangeGetRange ()
 
virtual icElemTypeSignature GetType () const =0
 
icFloatNumberGetWhite ()
 
virtual bool IsAcs ()
 
virtual bool IsLateBinding () const
 
virtual bool IsLateBindingReflectance () const
 
virtual bool IsSupported ()
 
virtual CIccMultiProcessElementNewCopy () const =0
 
virtual icUInt16Number NumInputChannels () const
 
virtual icUInt16Number NumOutputChannels () const
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 
bool SetSize (icUInt16Number nInputChannels, icUInt16Number nOutputChannels, const icSpectralRange &range)
 
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 Member Functions

void copyData (const CIccMpeSpectralMatrix &ITPC)
 
virtual const char * GetDescribeName () const =0
 
virtual icUInt16Number numVectors () const =0
 

Protected Attributes

icUInt16Number m_nInputChannels
 
icUInt16Number m_nOutputChannels
 
icUInt16Number m_nReserved2
 
CIccMatrixMathm_pApplyMtx
 
icFloatNumberm_pMatrix
 
icFloatNumberm_pOffset
 
icFloatNumberm_pWhite
 
icSpectralRange m_Range
 
icUInt32Number m_size
 
icFloatNumber m_xyzOffset [3]
 

Detailed Description

Class: CIccMpeSpectralMatrix

Purpose: The Observed Emission Matrix Element

Constructor & Destructor Documentation

◆ CIccMpeSpectralMatrix() [1/2]

CIccMpeSpectralMatrix::CIccMpeSpectralMatrix ( )

Name: CIccMpeSpectralMatrix::CIccMpeSpectralMatrix

Purpose:

Args:

Return:

102{
103 m_nReserved = 0;
104 m_nReserved2 = 0;
106 m_size = 0;
107 m_pMatrix = NULL;
108 m_pOffset = NULL;
109 m_pWhite = NULL;
110
111 m_Range.start=0;
112 m_Range.end=0;
113 m_Range.steps=0;
114
115 m_pApplyMtx = NULL;
116}
icUInt16Number steps
Definition icProfileHeader.h:1469
icFloat16Number start
Definition icProfileHeader.h:1467
icFloat16Number end
Definition icProfileHeader.h:1468
icUInt16Number m_nOutputChannels
Definition IccTagMPE.h:192
icUInt16Number m_nInputChannels
Definition IccTagMPE.h:191
icUInt32Number m_nReserved
Definition IccTagMPE.h:188
icUInt16Number m_nReserved2
Definition IccMpeSpectral.h:127
icFloatNumber * m_pOffset
Definition IccMpeSpectral.h:131
CIccMatrixMath * m_pApplyMtx
Definition IccMpeSpectral.h:134
icSpectralRange m_Range
Definition IccMpeSpectral.h:126
icFloatNumber * m_pWhite
Definition IccMpeSpectral.h:129
icUInt32Number m_size
Definition IccMpeSpectral.h:132
icFloatNumber * m_pMatrix
Definition IccMpeSpectral.h:130

References icSpectralRange::end, CIccMultiProcessElement::m_nInputChannels, CIccMultiProcessElement::m_nOutputChannels, CIccMultiProcessElement::m_nReserved, m_nReserved2, m_pApplyMtx, m_pMatrix, m_pOffset, m_pWhite, m_Range, m_size, icSpectralRange::start, and icSpectralRange::steps.

Referenced by CIccMpeEmissionMatrix::CIccMpeEmissionMatrix(), and CIccMpeInvEmissionMatrix::CIccMpeInvEmissionMatrix().

+ Here is the caller graph for this function:

◆ CIccMpeSpectralMatrix() [2/2]

CIccMpeSpectralMatrix::CIccMpeSpectralMatrix ( const CIccMpeSpectralMatrix matrix)

Name: CIccMpeSpectralMatrix::CIccMpeSpectralMatrix

Purpose:

Args:

Return:

130{
131 m_nReserved = matrix.m_nReserved;
132 m_nReserved2 = matrix.m_nReserved2;
133
136
137 m_Range = matrix.m_Range;
138
139 m_size = matrix.m_size;
140 if(matrix.m_pMatrix) {
141 int num = m_size * sizeof(icFloatNumber);
142 m_pMatrix = (icFloatNumber*)malloc(num);
143 memcpy(m_pMatrix, matrix.m_pMatrix, num);
144 }
145 else
146 m_pMatrix = NULL;
147
148 if (matrix.m_pOffset) {
149 int num = m_Range.steps * sizeof(icFloatNumber);
150 m_pOffset = (icFloatNumber*)malloc(num);
151 memcpy(m_pOffset, matrix.m_pOffset, num);
152 }
153 else
154 m_pOffset = NULL;
155
156 if (matrix.m_pWhite) {
157 int num = m_Range.steps * sizeof(icFloatNumber);
158 m_pWhite = (icFloatNumber*)malloc(num);
159 memcpy(m_pWhite, matrix.m_pWhite, num);
160 }
161 else
162 m_pWhite = NULL;
163
164 m_pApplyMtx = NULL;
165}
float icFloatNumber
Definition IccDefs.h:101

References CIccMultiProcessElement::m_nInputChannels, CIccMultiProcessElement::m_nOutputChannels, CIccMultiProcessElement::m_nReserved, m_nReserved2, m_pApplyMtx, m_pMatrix, m_pOffset, m_pWhite, m_Range, m_size, and icSpectralRange::steps.

Referenced by CIccMpeEmissionMatrix::CIccMpeEmissionMatrix(), and CIccMpeInvEmissionMatrix::CIccMpeInvEmissionMatrix().

+ Here is the caller graph for this function:

◆ ~CIccMpeSpectralMatrix()

CIccMpeSpectralMatrix::~CIccMpeSpectralMatrix ( )
virtual

Name: CIccMpeSpectralMatrix::~CIccMpeSpectralMatrix

Purpose:

Args:

Return:

235{
236 if (m_pMatrix)
237 free(m_pMatrix);
238
239 if (m_pOffset)
240 free(m_pOffset);
241
242 if (m_pWhite)
243 free(m_pWhite);
244
245 if (m_pApplyMtx)
246 delete m_pApplyMtx;
247}

References m_pApplyMtx, m_pMatrix, m_pOffset, and m_pWhite.

Member Function Documentation

◆ Apply()

virtual void CIccMpeSpectralMatrix::Apply ( CIccApplyMpe pApply,
icFloatNumber dstPixel,
const icFloatNumber srcPixel 
) const
pure virtual

◆ Begin()

virtual bool CIccMpeSpectralMatrix::Begin ( icElemInterp  nInterp,
CIccTagMultiProcessElement pMPE 
)
pure virtual

◆ copyData()

void CIccMpeSpectralMatrix::copyData ( const CIccMpeSpectralMatrix matrix)
protected

Name: &CIccMpeSpectralMatrix::operator=

Purpose:

Args:

Return:

178{
179 m_nReserved = matrix.m_nReserved;
180 m_nReserved2 = matrix.m_nReserved2;
181
184
186
187 if (m_pMatrix)
188 free(m_pMatrix);
189
190 m_size = matrix.m_size;
191 if (matrix.m_pMatrix) {
192 int num = m_size * sizeof(icFloatNumber);
193 m_pMatrix = (icFloatNumber*)malloc(num);
194 memcpy(m_pMatrix, matrix.m_pMatrix, num);
195 }
196 else
197 m_pMatrix = NULL;
198
199 if (m_pOffset)
200 free(m_pOffset);
201
202 if (matrix.m_pOffset) {
203 int num = m_Range.steps * sizeof(icFloatNumber);
204 m_pOffset = (icFloatNumber*)malloc(num);
205 memcpy(m_pOffset, matrix.m_pOffset, num);
206 }
207 else
208 m_pOffset = NULL;
209
210 if (m_pWhite)
211 free(m_pWhite);
212
213 if (matrix.m_pWhite) {
214 int num = m_Range.steps * sizeof(icFloatNumber);
215 m_pWhite = (icFloatNumber*)malloc(num);
216 memcpy(m_pWhite, matrix.m_pWhite, num);
217 }
218 else
219 m_pWhite = NULL;
220
221 m_pApplyMtx = NULL;
222}

References CIccMultiProcessElement::m_nInputChannels, CIccMultiProcessElement::m_nOutputChannels, CIccMultiProcessElement::m_nReserved, m_nReserved2, m_pApplyMtx, m_pMatrix, m_pOffset, m_pWhite, m_Range, m_size, and icSpectralRange::steps.

Referenced by CIccMpeEmissionMatrix::operator=(), and CIccMpeInvEmissionMatrix::operator=().

+ Here is the caller 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 CIccMpeSpectralMatrix::Describe ( std::string &  sDescription,
int  nVerboseness 
)
virtual

Name: CIccMpeSpectralMatrix::Describe

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

311{
312 icChar buf[81];
313 int i, j;
314 icFloatNumber *data = m_pMatrix;
315
316 sprintf(buf, "BEGIN_%s %d %d \n", GetDescribeName(), m_nInputChannels, m_nOutputChannels);
317 sDescription += buf;
318
319 sprintf(buf, "RANGE %f %f %d\n", icF16toF(m_Range.start), icF16toF(m_Range.end), m_Range.steps);
320 sDescription += buf;
321
322 sDescription += "White\n";
323 for (j=0; j<(int)m_Range.steps; j++) {
324 if (j)
325 sDescription += " ";
326 sprintf(buf, "%12.8lf", m_pWhite[j]);
327 sDescription += buf;
328 }
329 sDescription += "\n";
330
331 sDescription += "BLACK_OFFSET\n";
332 for (j=0; j<(int)m_Range.steps; j++) {
333 if (j)
334 sDescription += " ";
335 sprintf(buf, "%12.8lf", m_pOffset[j]);
336 sDescription += buf;
337 }
338 sDescription += "\n";
339
340 if (data) {
341 sDescription += "CHANNEL_DATA\n";
342 for (j=0; j<m_nOutputChannels; j++) {
343 for (i=0; i<(int)m_Range.steps; i++) {
344 if (i)
345 sDescription += " ";
346 sprintf(buf, "%12.8lf", data[i]);
347 sDescription += buf;
348 }
349 sDescription += "\n";
350 data += m_nInputChannels;
351 }
352 }
353
354 sprintf(buf, "END_%s\n", GetDescribeName());
355 sDescription += buf;
356}
char icChar
Definition IccDefs.h:110
ICCPROFLIB_API icFloat32Number icF16toF(icFloat16Number num)
Definition IccUtil.cpp:629
virtual const char * GetDescribeName() const =0

References icSpectralRange::end, GetDescribeName(), icF16toF(), CIccMultiProcessElement::m_nInputChannels, CIccMultiProcessElement::m_nOutputChannels, m_pMatrix, m_pOffset, m_pWhite, m_Range, icSpectralRange::start, and icSpectralRange::steps.

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

◆ GetDescribeName()

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

Implemented in CIccMpeEmissionMatrix, and CIccMpeInvEmissionMatrix.

Referenced by Describe().

+ Here is the caller graph for this function:

◆ GetEAcsSig()

virtual icAcsSignature CIccMultiProcessElement::GetEAcsSig ( )
inlinevirtualinherited

Reimplemented in CIccMpeEAcs.

179{ return icSigAcsZero; }

◆ GetExtension()

◆ GetMatrix()

icFloatNumber * CIccMpeSpectralMatrix::GetMatrix ( )
inline
111{return m_pMatrix;}

References m_pMatrix.

◆ GetNewApply()

CIccApplyMpe * CIccMultiProcessElement::GetNewApply ( CIccApplyTagMpe pApplyTag)
virtualinherited

Name: CIccMultiProcessElement::GetNewApply()

Purpose:

Args:

Return:

Reimplemented in CIccMpeCLUT, CIccMpeCalculator, and CIccMpeSpectralCLUT.

147{
148 return new CIccApplyMpe(this);
149}
Definition IccTagMPE.h:203

References CIccApplyMpe::CIccApplyMpe().

Referenced by CIccApplyTagMpe::AppendElem(), and CIccMpeCalculator::GetNewApply().

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

◆ GetOffset()

icFloatNumber * CIccMpeSpectralMatrix::GetOffset ( )
inline
112{return m_pOffset;}

References m_pOffset.

◆ GetRange()

const icSpectralRange & CIccMpeSpectralMatrix::GetRange ( )
inline
106{ return m_Range;}

References m_Range.

◆ GetType()

◆ GetWhite()

icFloatNumber * CIccMpeSpectralMatrix::GetWhite ( )
inline
110{ return m_pWhite;}

References m_pWhite.

◆ 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 CIccMpeSpectralMatrix::IsLateBinding ( ) const
inlinevirtual

Reimplemented from CIccMultiProcessElement.

119{ return true; }

◆ 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()

◆ NumInputChannels()

◆ NumOutputChannels()

◆ numVectors()

virtual icUInt16Number CIccMpeSpectralMatrix::numVectors ( ) const
protectedpure virtual

Implemented in CIccMpeEmissionMatrix, and CIccMpeInvEmissionMatrix.

Referenced by SetSize().

+ Here is the caller graph for this function:

◆ Read()

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

Name: CIccMpeSpectralMatrix::Read

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

369{
371
372 icUInt32Number headerSize = sizeof(icElemTypeSignature) +
373 sizeof(icUInt32Number) +
374 sizeof(icUInt16Number) +
375 sizeof(icUInt16Number) +
376 sizeof(icUInt16Number) +
377 sizeof(icUInt16Number) +
378 sizeof(icUInt16Number) +
379 sizeof(icUInt16Number);
380
381 if (headerSize > size)
382 return false;
383
384 if (!pIO) {
385 return false;
386 }
387
388 icUInt16Number nInputChannels, nOutputChannels;
389 icSpectralRange range;
390
391 if (!pIO->Read32(&sig))
392 return false;
393
394 if (!pIO->Read32(&m_nReserved))
395 return false;
396
397 if (!pIO->Read16(&nInputChannels))
398 return false;
399
400 if (!pIO->Read16(&nOutputChannels))
401 return false;
402
403 if (!pIO->Read16(&range.start))
404 return false;
405
406 if (!pIO->Read16(&range.end))
407 return false;
408
409 if (!pIO->Read16(&range.steps))
410 return false;
411
412 if (!pIO->Read16(&m_nReserved2))
413 return false;
414
415 SetSize(nInputChannels, nOutputChannels, range);
416 if (!m_pWhite || !m_pMatrix || !m_pOffset)
417 return false;
418
419 if (size<headerSize + (int)range.steps*sizeof(icFloatNumber))
420 return false;
421
422 //Read White data
423 if (pIO->ReadFloat32Float(m_pWhite, range.steps)!=range.steps)
424 return false;
425
426 if (size<headerSize + (int)range.steps*sizeof(icFloatNumber) + m_size * sizeof(icFloatNumber))
427 return false;
428
429 //Read Matrix data
431 return false;
432
433 if (size>=headerSize + 2*(int)range.steps*sizeof(icFloatNumber) + m_size * sizeof(icFloatNumber)) {
434 if (pIO->ReadFloat32Float(m_pOffset, range.steps)!=range.steps)
435 return false;
436 }
437 else {
438 memset(m_pOffset, 0, (int)range.steps*sizeof(icFloatNumber));
439 }
440
441 return true;
442}
unsigned short icUInt16Number
Definition icProfileHeader.h:256
long icInt32Number
Definition icProfileHeader.h:291
icElemTypeSignature
Definition icProfileHeader.h:641
unsigned long icUInt32Number
Definition icProfileHeader.h:262
Definition icProfileHeader.h:1466
icInt32Number ReadFloat32Float(void *pBufFloat, icInt32Number nNum=1)
Definition IccIO.cpp:302
icInt32Number Read16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:114
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143
bool SetSize(icUInt16Number nInputChannels, icUInt16Number nOutputChannels, const icSpectralRange &range)
Definition IccMpeSpectral.cpp:260

References icSpectralRange::end, CIccMultiProcessElement::m_nReserved, m_nReserved2, m_pMatrix, m_pOffset, m_pWhite, m_size, CIccIO::Read16(), CIccIO::Read32(), CIccIO::ReadFloat32Float(), SetSize(), icSpectralRange::start, and icSpectralRange::steps.

+ Here is the call graph for this function:

◆ SetSize()

bool CIccMpeSpectralMatrix::SetSize ( icUInt16Number  nInputChannels,
icUInt16Number  nOutputChannels,
const icSpectralRange range 
)

Name: CIccMpeSpectralMatrix::SetSize

Purpose:

Args:

Return:

261{
262 if (m_pMatrix) {
263 free(m_pMatrix);
264 m_pMatrix = NULL;
265 }
266
267 if (m_pWhite) {
268 free(m_pWhite);
269 m_pWhite = NULL;
270 }
271
272 if (m_pOffset) {
273 free(m_pOffset);
274 m_pOffset = NULL;
275 }
276
277 if (m_pApplyMtx) {
278 delete m_pApplyMtx;
279 m_pApplyMtx = NULL;
280 }
281
282 m_nInputChannels = nInputChannels;
283 m_nOutputChannels = nOutputChannels;
284 m_Range = range;
285
287
288 m_pMatrix = (icFloatNumber*)calloc(m_size, sizeof(icFloatNumber));
289 m_pOffset = (icFloatNumber*)calloc(range.steps, sizeof(icFloatNumber));
290 m_pWhite = (icFloatNumber*)calloc(range.steps, sizeof(icFloatNumber));
291
292 if (!m_pMatrix || !m_pOffset || !m_pWhite) {
293 m_size = 0;
294 return false;
295 }
296
297 return true;
298}
virtual icUInt16Number numVectors() const =0

References CIccMultiProcessElement::m_nInputChannels, CIccMultiProcessElement::m_nOutputChannels, m_pApplyMtx, m_pMatrix, m_pOffset, m_pWhite, m_Range, m_size, numVectors(), and icSpectralRange::steps.

Referenced by CIccMpeXmlEmissionMatrix::ParseXml(), CIccMpeXmlInvEmissionMatrix::ParseXml(), and Read().

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

◆ Validate()

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

Name: CIccMpeSpectralMatrix::Validate

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

Reimplemented in CIccMpeInvEmissionMatrix.

518{
519 std::string mpeSigPath = sigPath + icGetSigPath(GetType());
520 icValidateStatus rv = CIccMultiProcessElement::Validate(sigPath, sReport, pMPE, pProfile);
521
522 if (!m_Range.steps) {
523 CIccInfo Info;
524 std::string sSigPathName = Info.GetSigPathName(mpeSigPath);
525
527 sReport += sSigPathName;
528 sReport += " - Cannot have zero spectral range steps!\n";
530 }
531
532 if (m_nOutputChannels != 3) {
533 CIccInfo Info;
534 std::string sSigPathName = Info.GetSigPathName(mpeSigPath);
535
537 sReport += sSigPathName;
538 sReport += " - Output Channels must be 3!\n";
540 }
541
542 if (!m_pWhite) {
543 CIccInfo Info;
544 std::string sSigPathName = Info.GetSigPathName(mpeSigPath);
545
547 sReport += sSigPathName;
548 sReport += " - Has Empty White data!\n";
550 }
551
552 if (!m_pMatrix) {
553 CIccInfo Info;
554 std::string sSigPathName = Info.GetSigPathName(mpeSigPath);
555
557 sReport += sSigPathName;
558 sReport += " - Has Empty Matrix data!\n";
560 }
561
562 if (!m_pOffset) {
563 CIccInfo Info;
564 std::string sSigPathName = Info.GetSigPathName(mpeSigPath);
565
567 sReport += sSigPathName;
568 sReport += " - Has Empty Matrix Constant data!\n";
570 }
571
572 if (m_Range.start>= m_Range.end || !m_Range.steps) {
573 CIccInfo Info;
574 std::string sSigPathName = Info.GetSigPathName(mpeSigPath);
575
577 sReport += sSigPathName;
578 sReport += " - Has an invalid spectral range!\n";
580 }
581
582 return rv;
583}
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
ICCPROFLIB_API icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Definition IccUtil.cpp:244
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
Definition IccTagMPE.cpp:454

References icSpectralRange::end, CIccInfo::GetSigPathName(), CIccMultiProcessElement::GetType(), icGetSigPath(), icMaxStatus(), icMsgValidateCriticalError, icValidateCriticalError, CIccMultiProcessElement::m_nOutputChannels, m_pMatrix, m_pOffset, m_pWhite, m_Range, icSpectralRange::start, icSpectralRange::steps, and CIccMultiProcessElement::Validate().

Referenced by CIccMpeInvEmissionMatrix::Validate().

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

◆ Write()

bool CIccMpeSpectralMatrix::Write ( CIccIO pIO)
virtual

Name: CIccMpeSpectralMatrix::Write

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

455{
457
458 if (!pIO)
459 return false;
460
461 if (!pIO->Write32(&sig))
462 return false;
463
464 if (!pIO->Write32(&m_nReserved))
465 return false;
466
467 if (!pIO->Write16(&m_nInputChannels))
468 return false;
469
470 if (!pIO->Write16(&m_nOutputChannels))
471 return false;
472
473 if (!pIO->Write16(&m_Range.start))
474 return false;
475
476 if (!pIO->Write16(&m_Range.end))
477 return false;
478
479 if (!pIO->Write16(&m_Range.steps))
480 return false;
481
482 if (!pIO->Write16(&m_nReserved2))
483 return false;
484
485 if (m_pWhite) {
487 return false;
488 }
489 else if (m_Range.steps) {
490 return false;
491 }
492
493 if (m_pMatrix) {
495 return false;
496 }
497
498 //Write Constant data
499 if (m_pOffset) {
501 return false;
502 }
503
504 return true;
505}
icInt32Number Write16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:122
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152
icInt32Number WriteFloat32Float(void *pBufFloat, icInt32Number nNum=1)
Definition IccIO.cpp:321

References icSpectralRange::end, CIccMultiProcessElement::GetType(), CIccMultiProcessElement::m_nInputChannels, CIccMultiProcessElement::m_nOutputChannels, CIccMultiProcessElement::m_nReserved, m_nReserved2, m_pMatrix, m_pOffset, m_pWhite, m_Range, m_size, icSpectralRange::start, icSpectralRange::steps, CIccIO::Write16(), CIccIO::Write32(), and CIccIO::WriteFloat32Float().

+ Here is the call graph for this function:

Field Documentation

◆ 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(), 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(), copyData(), CIccMpeSpectralObserver::copyData(), CIccMpeCurveSet::Describe(), CIccMpeMatrix::Describe(), CIccMpeCalculator::Describe(), 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(), CIccMpeXmlExtCLUT::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(), 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(), 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(), 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(), copyData(), CIccMpeSpectralObserver::copyData(), CIccMpeToneMap::CopyToneFuncs(), CIccMpeMatrix::Describe(), CIccMpeCalculator::Describe(), 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(), CIccMpeXmlExtCLUT::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(), SetSize(), CIccMpeSpectralObserver::SetSize(), CIccMpeCurveSet::SetSize(), CIccMpeTintArray::SetVectorSize(), CIccMpeTintArray::Validate(), CIccMpeToneMap::Validate(), CIccMpeCAM::Validate(), Validate(), CIccMpeSpectralObserver::Validate(), CIccMpeAcs::Write(), CIccMpeTintArray::Write(), CIccMpeToneMap::Write(), CIccMpeMatrix::Write(), CIccMpeCLUT::Write(), CIccMpeExtCLUT::Write(), CIccMpeCAM::Write(), CIccMpeCalculator::Write(), 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(), CIccMpeSpectralObserver::CIccMpeSpectralObserver(), CIccMpeSpectralObserver::CIccMpeSpectralObserver(), CIccMpeTintArray::CIccMpeTintArray(), CIccMpeTintArray::CIccMpeTintArray(), CIccMpeToneMap::CIccMpeToneMap(), CIccMpeToneMap::CIccMpeToneMap(), CIccMultiProcessElement::CIccMultiProcessElement(), CIccMpeSpectralCLUT::copyData(), 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(), Read(), CIccMpeSpectralCLUT::Read(), CIccMpeSpectralObserver::Read(), CIccMpeXmlCurveSet::ToXml(), CIccMpeXmlTintArray::ToXml(), CIccMpeXmlToneMap::ToXml(), CIccMpeXmlMatrix::ToXml(), CIccMpeXmlCLUT::ToXml(), CIccMpeXmlExtCLUT::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(), Write(), CIccMpeSpectralCLUT::Write(), and CIccMpeSpectralObserver::Write().

◆ m_nReserved2

icUInt16Number CIccMpeSpectralMatrix::m_nReserved2
protected

◆ m_pApplyMtx

◆ m_pMatrix

◆ m_pOffset

◆ m_pWhite

◆ m_Range

◆ m_size

icUInt32Number CIccMpeSpectralMatrix::m_size
protected

◆ m_xyzOffset


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