Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
IccMpeBasic.h
Go to the documentation of this file.
1/** @file
2File: IccMpeBasic.h
3
4Contains: Header for implementation of Basic CIccTagMPE elements
5 and supporting classes
6
7Version: V1
8
9Copyright: (c) see ICC Software License
10*/
11
12/*
13* The ICC Software License, Version 0.2
14*
15*
16* Copyright (c) 2005 The International Color Consortium. All rights
17* reserved.
18*
19* Redistribution and use in source and binary forms, with or without
20* modification, are permitted provided that the following conditions
21* are met:
22*
23* 1. Redistributions of source code must retain the above copyright
24* notice, this list of conditions and the following disclaimer.
25*
26* 2. Redistributions in binary form must reproduce the above copyright
27* notice, this list of conditions and the following disclaimer in
28* the documentation and/or other materials provided with the
29* distribution.
30*
31* 3. In the absence of prior written permission, the names "ICC" and "The
32* International Color Consortium" must not be used to imply that the
33* ICC organization endorses or promotes products derived from this
34* software.
35*
36*
37* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
38* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
39* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
40* DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
41* ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
42* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
43* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
44* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
45* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
46* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
47* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
48* SUCH DAMAGE.
49* ====================================================================
50*
51* This software consists of voluntary contributions made by many
52* individuals on behalf of the The International Color Consortium.
53*
54*
55* Membership in the ICC is encouraged when this software is used for
56* commercial purposes.
57*
58*
59* For more information on The International Color Consortium, please
60* see <http://www.color.org/>.
61*
62*
63*/
64
65//////////////////////////////////////////////////////////////////////
66// HISTORY:
67//
68// -Jan 30, 2005
69// Initial CIccMpe prototype development
70//
71// -Nov 6, 2006
72// Prototype Merged into release
73//
74//////////////////////////////////////////////////////////////////////
75
76#ifndef _ICCELEMBASIC_H
77#define _ICCELEMBASIC_H
78
79#include "IccTagMPE.h"
80
81
82//CIccFloatTag support
83#ifdef USEREFICCMAXNAMESPACE
84namespace refIccMAX {
85#endif
86
87/**
88****************************************************************************
89* Class: CIccCurveSegment
90*
91* Purpose:
92*****************************************************************************
93*/
95{
96public:
97 virtual ~CIccCurveSegment() {}
98
100 virtual CIccCurveSegment* NewCopy() const = 0;
101
102 virtual icCurveSegSignature GetType() const = 0;
103 virtual const icChar *GetClassName() const = 0;
104
105 virtual void Describe(std::string &sDescription, int nVerboseness)=0;
106
107 virtual bool Read(icUInt32Number size, CIccIO *pIO)=0;
108 virtual bool Write(CIccIO *pIO)=0;
109
110 virtual bool Begin(CIccCurveSegment *pPrevSeg) = 0;
111 virtual icFloatNumber Apply(icFloatNumber v) const =0;
112
113 virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement* pMPE=NULL, const CIccProfile* pProfile=NULL) const = 0;
114
115 icFloatNumber StartPoint() { return m_startPoint; }
116 icFloatNumber EndPoint() { return m_endPoint;}
117
118protected:
122};
123
124
125/**
126****************************************************************************
127* Class: CIccTagFormulaCurveSegment
128*
129* Purpose: The parametric curve segment
130*****************************************************************************
131*/
133{
134public:
138 virtual CIccCurveSegment *NewCopy() const { return new CIccFormulaCurveSegment(*this);}
139 virtual ~CIccFormulaCurveSegment();
140
142 virtual const icChar *GetClassName() const { return "CIccFormulaCurveSegment"; }
143
144 virtual void Describe(std::string &sDescription, int nVerboseness);
145
146 void SetFunction(icUInt16Number functionType, icUInt8Number num_parameters, icFloatNumber *parameters);
147
148 virtual bool Read(icUInt32Number size, CIccIO *pIO);
149 virtual bool Write(CIccIO *pIO);
150
151 virtual bool Begin(CIccCurveSegment *pPrevSeg);
152 virtual icFloatNumber Apply(icFloatNumber v) const;
153 virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement* pMPE=NULL, const CIccProfile* pProfile = NULL) const;
154
155protected:
161};
162
163
164/**
165****************************************************************************
166* Class: CIccSampledCurveSegment
167*
168* Purpose: The sampled curve segment
169*****************************************************************************
170*/
172{
173public:
176 CIccSampledCurveSegment &operator=(const CIccSampledCurveSegment &ParamCurveTag);
177 virtual CIccCurveSegment *NewCopy() const { return new CIccSampledCurveSegment(*this);}
178 virtual ~CIccSampledCurveSegment();
179
181 virtual const icChar *GetClassName() const { return "CIccSampledCurveSegment"; }
182
183 virtual bool SetSize(icUInt32Number nSize, bool bZeroAlloc=true); //nSize must be >= 2
184 virtual icUInt32Number GetSize() { return m_nCount; }
185
186 virtual icFloatNumber *GetSamples() { return m_pSamples; }
187
188 virtual void Describe(std::string &sDescription, int nVerboseness);
189
190 virtual bool Read(icUInt32Number size, CIccIO *pIO);
191 virtual bool Write(CIccIO *pIO);
192
193 virtual bool Begin(CIccCurveSegment *pPrevSeg);
194 virtual icFloatNumber Apply(icFloatNumber v) const;
195 virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement* pMPE=NULL, const CIccProfile* pProfile = NULL) const ;
196
197protected:
198 icUInt32Number m_nCount; //number of samples used for interpolation
199 icFloatNumber *m_pSamples; //interpolation values - Note m_pSamples[0] is initialized from previous segment in Begin()
200
203};
204
205
206
207/**
208****************************************************************************
209* Class: CIccCurveSetCurve
210*
211* Purpose: Base class for Curve Set Curves
212*****************************************************************************
213*/
215{
216public:
218
220 virtual CIccCurveSetCurve *NewCopy() const = 0;
221
222 virtual icCurveElemSignature GetType() const = 0;
223 virtual const icChar *GetClassName() const = 0;
224
225 virtual void Describe(std::string &sDescription, int nVerboseness=100) = 0;
226
227 virtual bool Read(icUInt32Number size, CIccIO *pIO) = 0;
228 virtual bool Write(CIccIO *pIO) = 0;
229
230 virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE) = 0;
231 virtual icFloatNumber Apply(icFloatNumber v) const = 0;
232 virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement* pMPE=NULL, const CIccProfile* pProfile = NULL) const = 0;
233
234protected:
235};
236
238
239typedef std::list<CIccCurveSegment*> CIccCurveSegmentList;
240
241/**
242****************************************************************************
243* Class: CIccSegmentedCurve
244*
245* Purpose: The Curve Set Segmented Curve Type
246*****************************************************************************
247*/
249{
250public:
253 CIccSegmentedCurve &operator=(const CIccSegmentedCurve &ParamCurveTag);
254 virtual CIccCurveSetCurve *NewCopy() const { return new CIccSegmentedCurve(*this);}
255 virtual ~CIccSegmentedCurve();
256
258 virtual const icChar *GetClassName() const { return "CIccSegmentedCurve"; }
259
260 virtual void Describe(std::string &sDescription, int nVerboseness);
261
262 virtual bool Read(icUInt32Number size, CIccIO *pIO);
263 virtual bool Write(CIccIO *pIO);
264
265 void Reset();
266 bool Insert(CIccCurveSegment *pCurveSegment);
267
268 virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE);
269 virtual icFloatNumber Apply(icFloatNumber v) const;
270 virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement* pMPE=NULL, const CIccProfile* pProfile = NULL) const;
271
272protected:
276};
277
278
279/**
280****************************************************************************
281* Class: CIccSingleSampledCurve
282*
283* Purpose: The single sampled curve class
284*****************************************************************************
285*/
287{
288public:
291 CIccSingleSampledCurve &operator=(const CIccSingleSampledCurve &SampledCurve);
292 virtual CIccCurveSetCurve *NewCopy() const { return new CIccSingleSampledCurve(*this); }
293 virtual ~CIccSingleSampledCurve();
294
296 virtual const icChar *GetClassName() const { return "CIccSingleSampledCurve"; }
297
298 void SetRange(icFloatNumber first = 0.0f, icFloatNumber last = 1.0f);
299
300 virtual bool SetSize(icUInt32Number nSize, bool bZeroAlloc = true); //nSize must be >= 2
301 virtual icUInt32Number GetSize() { return m_nCount; }
302
303 bool SetExtensionType(icUInt16Number nExtensionType);
304 icUInt16Number GetExtensionType() { return m_extensionType; }
305
306 bool SetStorageType(icUInt16Number nStorateType);
307 icUInt16Number GetStorageType() { return m_storageType; }
308
309 virtual icFloatNumber *GetSamples() { return m_pSamples; }
310
311 virtual void Describe(std::string &sDescription, int nVerboseness);
312
313 virtual bool Read(icUInt32Number size, CIccIO *pIO);
314 virtual bool Write(CIccIO *pIO);
315
316 virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE);
317 virtual icFloatNumber Apply(icFloatNumber v) const;
318 virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement* pMPE = NULL, const CIccProfile* pProfile = NULL) const;
319
320protected:
322
323 icUInt32Number m_nCount; //number of samples used for interpolation
324 icFloatNumber *m_pSamples; //interpolation values
325
328
331
334
339};
340
341//forward class
343
344#define ICC_MAXCALCCURVESIZE 16384
345
346/**
347****************************************************************************
348* Class: CIccSampledCalculatorCurve
349*
350* Purpose: The sampled calculator curve class
351*****************************************************************************
352*/
354{
355public:
358 CIccSampledCalculatorCurve &operator=(const CIccSampledCalculatorCurve &SampledCurve);
359 virtual CIccCurveSetCurve *NewCopy() const { return new CIccSampledCalculatorCurve(*this); }
361
363 virtual const icChar *GetClassName() const { return "CIccSampledCalculatorCurve"; }
364
365 void SetRange(icFloatNumber first = 0.0f, icFloatNumber last = 1.0f);
366
367 bool SetCalculator(CIccMpeCalculator *pCalc);
368
369 virtual bool SetRecommendedSize(icUInt32Number nSize); //nSize must be >= 2
370 virtual icUInt32Number GetRecommendedSize() { return m_nDesiredSize; }
371
372 virtual bool SetSize(icUInt32Number nSize, bool bZeroAlloc = true); //nSize must be >= 2
373 virtual icUInt32Number GetSize() { return m_nCount; }
374
375 bool SetExtensionType(icUInt16Number nExtensionType);
376 icUInt16Number GetExtensionType() { return m_extensionType; }
377
378 virtual void Describe(std::string &sDescription, int nVerboseness=100);
379
380 virtual bool Read(icUInt32Number size, CIccIO *pIO);
381 virtual bool Write(CIccIO *pIO);
382
383 virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE);
384 virtual icFloatNumber Apply(icFloatNumber v) const;
385 virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement* pMPE = NULL, const CIccProfile* pProfile = NULL) const;
386
387protected:
388 bool SetStorageType(icUInt16Number nStorateType) { return false; }
390
393
394 icUInt32Number m_nCount; //number of samples used for interpolation
395 icFloatNumber *m_pSamples; //interpolation values
396
399
402
405
410
412
413 icUInt32Number m_nDesiredSize; //Desired number of samples used for interpolation
414};
415
416
417/**
418****************************************************************************
419* Class: CIccMpeCurveSet
420*
421* Purpose: The curve set process element
422*****************************************************************************
423*/
425{
426public:
427 CIccMpeCurveSet(int nSize=0);
428 CIccMpeCurveSet(const CIccMpeCurveSet &curveSet);
429 CIccMpeCurveSet &operator=(const CIccMpeCurveSet &curveSet);
430 virtual CIccMultiProcessElement *NewCopy() const { return new CIccMpeCurveSet(*this);}
431 virtual ~CIccMpeCurveSet();
432
433 bool SetSize(int nNewSize);
434
435 bool SetCurve(int nIndex, icCurveSetCurvePtr newCurve);
436
438 virtual const icChar *GetClassName() const { return "CIccMpeCurveSet"; }
439
440 virtual void Describe(std::string &sDescription, int nVerboseness);
441
442 virtual bool Read(icUInt32Number size, CIccIO *pIO);
443 virtual bool Write(CIccIO *pIO);
444
445 virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE);
446 virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const;
447
448 virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement* pMPE=NULL, const CIccProfile* pProfile = NULL) const;
449
450protected:
452
454};
455
456
457/**
458****************************************************************************
459* Class: CIccMpeTintArray
460*
461* Purpose: The curve set process element
462*****************************************************************************
463*/
465{
466public:
467 CIccMpeTintArray(int nVectorSize=1);
468 CIccMpeTintArray(const CIccMpeTintArray &tintArray);
469 CIccMpeTintArray &operator=(const CIccMpeTintArray &tintArray);
470 virtual CIccMultiProcessElement *NewCopy() const { return new CIccMpeTintArray(*this);}
471 virtual ~CIccMpeTintArray();
472
473 void SetVectorSize(int nVectorSize);
474
475 //SetArray assumes ownership of pTag
476 void SetArray(CIccTagNumArray *pTag);
477
478 CIccTagNumArray *GetArray() { return m_Array; }
479
481 virtual const icChar *GetClassName() const { return "CIccMpeTintArray"; }
482
483 virtual void Describe(std::string &sDescription, int nVerboseness =0);
484
485 virtual bool Read(icUInt32Number size, CIccIO *pIO);
486 virtual bool Write(CIccIO *pIO);
487
488 virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE);
489 virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const;
490
491 virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement* pMPE=NULL, const CIccProfile* pProfile = NULL) const;
492
493protected:
495};
496
497
498/**
499****************************************************************************
500* Class: CIccToneMapFunc
501*
502* Purpose: The parametric function to apply a tone map based on mapped luminance and channel value
503*****************************************************************************
504*/
506{
507public:
509 virtual ~CIccToneMapFunc();
510 CIccToneMapFunc& operator=(const CIccToneMapFunc& toneMap);
511 virtual CIccToneMapFunc* NewCopy() const;
512
514 virtual const char* GetClassName() const { return "CIccToneMapFunc"; }
515
516 bool SetFunction(icUInt16Number nFunc, icUInt8Number, icFloatNumber* pParams);
517
518 void Describe(std::string& sDescription, int nVerboseness = 0);
519
520 bool Read(icUInt32Number size, CIccIO* pIO);
521 bool Write(CIccIO* pIO);
522
523 bool Begin();
524 icFloatNumber Apply(icFloatNumber lumValue, icFloatNumber pixelValue) const;
525
526 icValidateStatus Validate(std::string& sFuncReport, int nVerboseness=0) const; //Sets sFuncReport String (doesn't concatenate)
527
528protected:
529 int NumArgs() const;
530
536};
537
538/**
539****************************************************************************
540* Class: CIccMpeToneMap
541*
542* Purpose: The curve set process element
543*****************************************************************************
544*/
546{
547public:
548 CIccMpeToneMap(icUInt16Number nOutputChannels = 1);
549 CIccMpeToneMap(const CIccMpeToneMap& toneMap);
550 CIccMpeToneMap& operator=(const CIccMpeToneMap& toneMap);
551 virtual CIccMultiProcessElement* NewCopy() const { return new CIccMpeToneMap(*this); }
552 virtual ~CIccMpeToneMap();
553
555 virtual const icChar* GetClassName() const { return "CIccMpeToneMap"; }
556
557 virtual CIccToneMapFunc* NewToneMapFunc() { return new CIccToneMapFunc(); }
558
559 void SetLumCurve(CIccCurveSetCurve* pLumCurve); //CIccMpeToneMap object assumes ownership of arg
560
561 void SetNumOutputChannels(icUInt16Number nOutputChannels); //This clears m_pToneFuncs
562 bool Insert(CIccToneMapFunc* pToneMapFunc); //CIccMpeToneMap object assumes ownership of arg
563
564 virtual void Describe(std::string& sDescription, int nVerboseness = 0);
565
566 virtual bool Read(icUInt32Number size, CIccIO* pIO);
567 virtual bool Write(CIccIO* pIO);
568
569 virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement* pMPE);
570 virtual void Apply(CIccApplyMpe* pApply, icFloatNumber* dstPixel, const icFloatNumber* srcPixel) const;
571
572 virtual icValidateStatus Validate(std::string sigPath, std::string& sReport, const CIccTagMultiProcessElement* pMPE = NULL, const CIccProfile* pProfile = NULL) const;
573
574protected:
575 CIccToneMapFunc** CopyToneFuncs() const;
576 void ClearToneFuncs();
577
581};
582
583
591
592/**
593****************************************************************************
594* Class: CIccMpeMatrix
595*
596* Purpose: The Matrix element with constant offset
597*****************************************************************************
598*/
600{
601public:
603 CIccMpeMatrix(const CIccMpeMatrix &ITPC);
604 CIccMpeMatrix &operator=(const CIccMpeMatrix &ParamCurveTag);
605 virtual CIccMultiProcessElement *NewCopy() const { return new CIccMpeMatrix(*this);}
606 virtual ~CIccMpeMatrix();
607
609 virtual const icChar *GetClassName() const { return "CIccMpeMatrix"; }
610
611 virtual void Describe(std::string &sDescription, int nVerboseness);
612
613 virtual bool Read(icUInt32Number size, CIccIO *pIO);
614 virtual bool Write(CIccIO *pIO);
615
616 bool SetSize(icUInt16Number nInputChannels, icUInt16Number nOutputChannels, bool bUseConstants = true);
617
618 icFloatNumber *GetMatrix() const {return m_pMatrix;}
619 icFloatNumber *GetConstants() const {return m_pConstants;}
620 bool GetApplyConstants() const {return m_bApplyConstants;}
621
622 virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE);
623 virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const;
624
625 virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement* pMPE=NULL, const CIccProfile* pProfile = NULL) const;
626
627protected:
633};
634
635
646
647
648/**
649****************************************************************************
650* Class: CIccMpeCLUT
651*
652* Purpose: The float Color LookUp Table tag
653*****************************************************************************
654*/
656{
657public:
658 CIccMpeCLUT();
659 CIccMpeCLUT(const CIccMpeCLUT &clut);
660 CIccMpeCLUT &operator=(const CIccMpeCLUT &clut);
661 virtual CIccMultiProcessElement *NewCopy() const { return new CIccMpeCLUT(*this);}
662 virtual ~CIccMpeCLUT();
663
665 virtual const icChar *GetClassName() const { return "CIccMpeCLUT"; }
666
667 virtual void Describe(std::string &sDescription, int nVerboseness);
668
669 virtual bool Read(icUInt32Number size, CIccIO *pIO);
670 virtual bool Write(CIccIO *pIO);
671
672 virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE);
673 virtual CIccApplyMpe* GetNewApply(CIccApplyTagMpe* pApplyTag);
674 virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const;
675
676 virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement* pMPE=NULL, const CIccProfile* pProfile = NULL) const;
677
678 CIccCLUT *GetCLUT() { return m_pCLUT; }
679 void SetCLUT(CIccCLUT *pCLUT);
680
681protected:
684};
685
686
687/**
688****************************************************************************
689* Class: CIccApplyMpeCLUT
690*
691* Purpose: The Calculator process element apply data
692*****************************************************************************
693*/
695{
696 friend class CIccMpeCLUT;
697public:
698 virtual ~CIccApplyMpeCLUT();
699
701 virtual const icChar* GetClassName() const { return "CIccApplyMpeCLUT"; }
702
703 bool Init(icUInt32Number nNodes);
704
705protected:
707
709 };
710
711
712
713/****************************************************************************
714* Class: CIccMpeExtCLUT
715*
716* Purpose: The extended Color LookUp Table tag
717*****************************************************************************
718*/
720{
721public:
723 CIccMpeExtCLUT(const CIccMpeExtCLUT &clut);
724 CIccMpeExtCLUT &operator=(const CIccMpeExtCLUT &clut);
725 virtual CIccMultiProcessElement *NewCopy() const { return new CIccMpeExtCLUT(*this);}
726 virtual ~CIccMpeExtCLUT() {}
727
729 virtual const icChar *GetClassName() const { return "CIccMpeExtCLUT"; }
730
731 virtual void Describe(std::string &sDescription, int nVerboseness);
732
733 virtual bool Read(icUInt32Number size, CIccIO *pIO);
734 virtual bool Write(CIccIO *pIO);
735
736 virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement* pMPE=NULL, const CIccProfile* pProfile = NULL) const;
737
738 bool SetStorageType(icUInt16Number nStorateType);
739 icUInt16Number GetStorageType() { return m_storageType; }
740
741protected:
744};
745
746class CIccCamConverter;
747
748/**
749****************************************************************************
750* Class: CIccMpeCAM
751*
752* Purpose: The float Color LookUp Table tag
753*****************************************************************************
754*/
756{
757public:
758 virtual ~CIccMpeCAM();
759
760 virtual icElemTypeSignature GetType() const = 0;
761 virtual const icChar *GetClassName() const = 0;
762
763 virtual const icChar *GetXformName() const = 0;
764
765 virtual void Describe(std::string &sDescription, int nVerboseness);
766
767 virtual bool Read(icUInt32Number size, CIccIO *pIO);
768 virtual bool Write(CIccIO *pIO);
769
770 virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE);
771 virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const =0;
772
773 virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement* pMPE=NULL, const CIccProfile* pProfile = NULL) const;
774
775 CIccCamConverter *GetCAM() { return m_pCAM; }
776 void SetCAM(CIccCamConverter *pCAM);
777
778protected:
779 CIccMpeCAM();
780
782};
783
784
785/**
786****************************************************************************
787* Class: CIccMpeXYZToJab
788*
789* Purpose: Converts XYZ to Jab using color appearance model
790*****************************************************************************
791*/
793{
794public:
797 CIccMpeXYZToJab &operator=(const CIccMpeXYZToJab &cam);
798 virtual CIccMultiProcessElement *NewCopy() const { return new CIccMpeXYZToJab(*this);}
799 virtual ~CIccMpeXYZToJab();
800
802 virtual const icChar *GetClassName() const {return "CIccMpeXYZToJab"; }
803
804 virtual const icChar *GetXformName() const {return "XYZToJab"; }
805
806 virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const;
807};
808
809/**
810****************************************************************************
811* Class: CIccMpeJabToXYZ
812*
813* Purpose: Converts Jab to XYZ using color appearance model
814*****************************************************************************
815*/
817{
818public:
821 CIccMpeJabToXYZ &operator=(const CIccMpeJabToXYZ &cam);
822 virtual CIccMultiProcessElement *NewCopy() const { return new CIccMpeJabToXYZ(*this);}
823 virtual ~CIccMpeJabToXYZ();
824
826 virtual const icChar *GetClassName() const {return "CIccMpeJabToXYZ"; }
827
828 virtual const icChar *GetXformName() const {return "JabToXyz"; }
829
830 virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const;
831};
832
833//CIccMPElements support
834#ifdef USEREFICCMAXNAMESPACE
835}
836#endif
837
838
839
840#endif //_ICCELEMBASIC_H
icArraySignature sig
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
char icChar
Definition IccDefs.h:109
icValidateStatus
Definition IccDefs.h:118
std::list< CIccCurveSegment * > CIccCurveSegmentList
icMatrixElemType
@ ic3x3Matrix
@ icOtherMatrix
@ ic3x4Matrix
@ ic4x3Matrix
@ ic4x4Matrix
CIccCurveSetCurve * icCurveSetCurvePtr
icCLUTElemType
@ ic1dInterp
@ ic3dInterpTetra
@ ic6dInterp
@ icNdInterp
@ ic2dInterp
@ ic4dInterp
@ ic5dInterp
@ ic3dInterp
File: IccTagMPE.h.
icElemInterp
Definition IccTagMPE.h:93
unsigned int icUInt32Number
Class: CIccApplyCLUT.
Definition IccTagLut.h:302
Class: CIccApplyMpeCLUT.
virtual const icChar * GetClassName() const
bool Init(icUInt32Number nNodes)
CIccApplyCLUT * m_pApply
virtual icElemTypeSignature GetType() const
Class: CIccApplyMpe.
Definition IccTagMPE.h:203
Class: CIccTagMultiProcessElement.
Definition IccTagMPE.h:321
Class: CIccCLUT.
Definition IccTagLut.h:326
Class: CIccCurveSegment.
Definition IccMpeBasic.h:95
virtual icCurveSegSignature GetType() const =0
virtual CIccCurveSegment * NewCopy() const =0
virtual void Describe(std::string &sDescription, int nVerboseness)=0
icFloatNumber EndPoint()
icFloatNumber StartPoint()
icFloatNumber m_startPoint
icFloatNumber m_endPoint
virtual bool Read(icUInt32Number size, CIccIO *pIO)=0
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const =0
virtual ~CIccCurveSegment()
Definition IccMpeBasic.h:97
virtual bool Write(CIccIO *pIO)=0
virtual bool Begin(CIccCurveSegment *pPrevSeg)=0
virtual const icChar * GetClassName() const =0
icUInt32Number m_nReserved
virtual icFloatNumber Apply(icFloatNumber v) const =0
Class: CIccCurveSetCurve.
virtual const icChar * GetClassName() const =0
virtual icFloatNumber Apply(icFloatNumber v) const =0
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const =0
virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)=0
virtual bool Read(icUInt32Number size, CIccIO *pIO)=0
virtual void Describe(std::string &sDescription, int nVerboseness=100)=0
virtual bool Write(CIccIO *pIO)=0
virtual icCurveElemSignature GetType() const =0
virtual ~CIccCurveSetCurve()
virtual CIccCurveSetCurve * NewCopy() const =0
Class: CIccTagFormulaCurveSegment.
icUInt8Number m_nParameters
icUInt16Number m_nFunctionType
icUInt16Number m_nReserved2
virtual const icChar * GetClassName() const
virtual icCurveSegSignature GetType() const
icUInt16Number m_nShortcutType
icFloatNumber * m_params
virtual CIccCurveSegment * NewCopy() const
Type: Class.
Definition IccIO.h:97
Class: CIccMpeCAM.
virtual const icChar * GetXformName() const =0
virtual const icChar * GetClassName() const =0
CIccCamConverter * m_pCAM
virtual icElemTypeSignature GetType() const =0
virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const =0
CIccCamConverter * GetCAM()
Class: CIccMpeCLUT.
virtual const icChar * GetClassName() const
CIccCLUT * GetCLUT()
virtual CIccMultiProcessElement * NewCopy() const
CIccCLUT * m_pCLUT
virtual icElemTypeSignature GetType() const
icCLUTElemType m_interpType
Class: CIccMpeCalculator.
Definition IccMpeCalc.h:447
Class: CIccMpeCurveSet.
virtual CIccMultiProcessElement * NewCopy() const
virtual icElemTypeSignature GetType() const
icCurveSetCurvePtr * m_curve
icPositionNumber * m_position
virtual const icChar * GetClassName() const
virtual const icChar * GetClassName() const
virtual ~CIccMpeExtCLUT()
icUInt16Number m_nReserved2
virtual icElemTypeSignature GetType() const
icUInt16Number m_storageType
virtual CIccMultiProcessElement * NewCopy() const
icUInt16Number GetStorageType()
Class: CIccMpeJabToXYZ.
virtual CIccMultiProcessElement * NewCopy() const
virtual const icChar * GetXformName() const
virtual icElemTypeSignature GetType() const
virtual const icChar * GetClassName() const
Class: CIccMpeMatrix.
icFloatNumber * GetConstants() const
icUInt32Number m_size
icFloatNumber * m_pConstants
virtual icElemTypeSignature GetType() const
virtual const icChar * GetClassName() const
icFloatNumber * GetMatrix() const
bool m_bApplyConstants
icFloatNumber * m_pMatrix
virtual CIccMultiProcessElement * NewCopy() const
icMatrixElemType m_type
bool GetApplyConstants() const
Class: CIccMpeTintArray.
virtual const icChar * GetClassName() const
virtual icElemTypeSignature GetType() const
CIccTagNumArray * m_Array
CIccTagNumArray * GetArray()
virtual CIccMultiProcessElement * NewCopy() const
Class: CIccMpeToneMap.
CIccToneMapFunc ** m_pToneFuncs
virtual CIccMultiProcessElement * NewCopy() const
icUInt16Number m_nFunc
virtual const icChar * GetClassName() const
virtual CIccToneMapFunc * NewToneMapFunc()
CIccCurveSetCurve * m_pLumCurve
virtual icElemTypeSignature GetType() const
Class: CIccMpeXYZToJab.
virtual const icChar * GetClassName() const
virtual CIccMultiProcessElement * NewCopy() const
virtual const icChar * GetXformName() const
virtual icElemTypeSignature GetType() const
Class: CIccMultiProcessElement.
Definition IccTagMPE.h:146
Class: CIccSampledCalculatorCurve.
icUInt32Number m_nDesiredSize
icUInt16Number m_extensionType
icUInt16Number m_nReserved2
bool SetStorageType(icUInt16Number nStorateType)
icUInt16Number GetExtensionType()
CIccMpeCalculator * m_pCalc
virtual CIccCurveSetCurve * NewCopy() const
virtual icUInt32Number GetRecommendedSize()
virtual const icChar * GetClassName() const
icUInt16Number m_storageType
virtual icCurveElemSignature GetType() const
virtual icUInt32Number GetSize()
icFloatNumber * m_pSamples
icUInt16Number GetStorageType()
Class: CIccSampledCurveSegment.
virtual icCurveSegSignature GetType() const
virtual CIccCurveSegment * NewCopy() const
icFloatNumber * m_pSamples
virtual icUInt32Number GetSize()
virtual const icChar * GetClassName() const
virtual icFloatNumber * GetSamples()
icUInt32Number m_nCount
Class: CIccSegmentedCurve.
virtual icCurveElemSignature GetType() const
icUInt32Number m_nReserved2
virtual const icChar * GetClassName() const
CIccCurveSegmentList * m_list
icUInt32Number m_nReserved1
virtual CIccCurveSetCurve * NewCopy() const
Class: CIccSingleSampledCurve.
icUInt32Number m_nReserved
icFloatNumber m_hiSlope
icFloatNumber m_firstEntry
icUInt16Number m_extensionType
virtual const icChar * GetClassName() const
icUInt32Number m_nCount
virtual icUInt32Number GetSize()
virtual icFloatNumber * GetSamples()
icFloatNumber m_lastEntry
icFloatNumber m_loIntercept
virtual icCurveElemSignature GetType() const
virtual CIccCurveSetCurve * NewCopy() const
icFloatNumber * m_pSamples
icFloatNumber m_range
icUInt16Number m_storageType
icFloatNumber m_loSlope
icUInt16Number GetExtensionType()
icUInt16Number GetStorageType()
icFloatNumber m_hiIntercept
Class: CIccTagMultiProcessElement.
Definition IccTagMPE.h:358
Class: CIccTagNumArray.
Class: CIccToneMapFunc.
icUInt16Number m_nReserved2
icUInt32Number m_nReserved
virtual icToneFunctionSignature GetType() const
icUInt16Number m_nFunctionType
icUInt8Number m_nParameters
icFloatNumber * m_params
virtual const char * GetClassName() const
icCurveElemSignature
MPE Curve Set Curve signature.
@ icSigSegmentedCurve
@ icSigSampledCalculatorCurve
@ icSigSingleSampledCurve
unsigned char icUInt8Number
Number definitions.
icToneFunctionSignature
MPE Tone Map Function signature.
@ icSigToneMapFunction
unsigned short icUInt16Number
icCurveSegSignature
MPE Curve segment Signatures.
@ icSigSampledCurveSeg
@ icSigFormulaCurveSeg
icElemTypeSignature
Multi-Processing Element type signatures.
@ icSigCurveSetElemType
@ icSigCLutElemType
@ icSigToneMapElemType
@ icSigExtCLutElemType
@ icSigTintArrayElemType
@ icSigXYZToJabElemType
@ icSigJabToXYZElemType
@ icSigMatrixElemType