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

Class: CIccCurve. More...

#include <IccTagLut.h>

+ Inheritance diagram for CIccCurve:
+ Collaboration diagram for CIccCurve:

Public Member Functions

virtual icFloatNumber Apply (icFloatNumber v) const
 
virtual void Begin ()
 
 CIccCurve ()
 
virtual void DumpLut (std::string &sDescription, const icChar *szName, icColorSpaceSignature csSig, int nIndex, int nVerboseness)
 
icFloatNumber Find (icFloatNumber v)
 
virtual bool IsIdentity ()
 
virtual CIccTagNewCopy () const
 Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.
 
virtual ~CIccCurve ()
 
- Public Member Functions inherited from CIccTag
 CIccTag ()
 Name: CIccTag::CIccTag.
 
virtual void Describe (std::string &sDescription, int nVerboseness=0)
 Function: Describe(sDescription) Each derived tag will implement it's own Describe() function.
 
virtual void DetachIO ()
 Function: ReadAll() - Read All sub data for tag from file.
 
virtual const icCharGetClassName () const
 
virtual IIccExtensionTagGetExtension ()
 
virtual icArraySignature GetTagArrayType () const
 
virtual icStructSignature GetTagStructType () const
 
virtual icTagTypeSignature GetType () const
 Function: GetType()
 
virtual bool IsArrayType ()
 
virtual bool IsMBBType ()
 
virtual bool IsNumArrayType () const
 
virtual bool IsSupported ()
 Function: IsSupported(size, pIO) - Check if tag fully supported for apply purposes.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Function: Read(size, pIO) - Read tag from file.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO, CIccProfile *pProfile)
 Function: Read(size, pIO) - Read tag from file.
 
virtual bool ReadAll ()
 Function: ReadAll() - Read All sub data for tag from file.
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 Function: Validate Each derived tag will implement it's own IsValid() function.
 
virtual bool Write (CIccIO *pIO)
 Function: Write(pIO) Each derived tag will implement it's own Write() function.
 
virtual ~CIccTag ()
 Name: CIccTag::CIccTag.
 

Protected Member Functions

icFloatNumber Find (icFloatNumber v, icFloatNumber p0, icFloatNumber v0, icFloatNumber p1, icFloatNumber v1)
 Name: CIccCurve::Find.
 

Additional Inherited Members

- Static Public Member Functions inherited from CIccTag
static CIccTagCreate (icTagTypeSignature sig)
 Name: CIccTag::Create.
 
- Public Attributes inherited from CIccTag
icUInt32Number m_nReserved
 

Detailed Description

Class: CIccCurve.

Purpose: The base curve class

Definition at line 90 of file IccTagLut.h.

Constructor & Destructor Documentation

◆ CIccCurve()

CIccCurve::CIccCurve ( )
inline

Definition at line 93 of file IccTagLut.h.

93{}

◆ ~CIccCurve()

virtual CIccCurve::~CIccCurve ( )
inlinevirtual

Definition at line 95 of file IccTagLut.h.

95{}

Member Function Documentation

◆ Apply()

virtual icFloatNumber CIccCurve::Apply ( icFloatNumber v) const
inlinevirtual

Reimplemented in CIccTagCurve, CIccTagParametricCurve, and CIccTagSegmentedCurve.

Definition at line 101 of file IccTagLut.h.

101{ return v; }

Referenced by RGBClip().

+ Here is the caller graph for this function:

◆ Begin()

virtual void CIccCurve::Begin ( )
inlinevirtual

Reimplemented in CIccTagCurve, and CIccTagSegmentedCurve.

Definition at line 100 of file IccTagLut.h.

100{}

◆ DumpLut()

virtual void CIccCurve::DumpLut ( std::string & sDescription,
const icChar * szName,
icColorSpaceSignature csSig,
int nIndex,
int nVerboseness )
inlinevirtual

Reimplemented in CIccTagCurve, CIccTagParametricCurve, and CIccTagSegmentedCurve.

Definition at line 97 of file IccTagLut.h.

98 {}

◆ Find() [1/2]

icFloatNumber CIccCurve::Find ( icFloatNumber v)
inline

Definition at line 103 of file IccTagLut.h.

103{ return Find(v, 0, Apply(0), 1.0, Apply(1.0)); }
virtual icFloatNumber Apply(icFloatNumber v) const
Definition IccTagLut.h:101
icFloatNumber Find(icFloatNumber v)
Definition IccTagLut.h:103

References Find().

Referenced by Find().

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

◆ Find() [2/2]

icFloatNumber CIccCurve::Find ( icFloatNumber v,
icFloatNumber p0,
icFloatNumber v0,
icFloatNumber p1,
icFloatNumber v1 )
protected

Name: CIccCurve::Find.

Purpose: Read in the tag contents into a data block

Args: v = index to be searched, v0 = index less than/equal to v, p0 = the value at index v0, v1 = index greater than/equal to v, p1 = value at index v1

Return: The value at the requested index

Definition at line 107 of file IccTagLut.cpp.

110{
111 if (v<=v0)
112 return p0;
113 if (v>=v1)
114 return p1;
115
116 if (p1-p0 <= 0.00001) {
117 icFloatNumber d0 = (icFloatNumber)fabs(v-v0);
118 icFloatNumber d1 = (icFloatNumber)fabs(v1-v);
119
120 if (d0<d1)
121 return p0;
122 return p1;
123 }
124
125 icFloatNumber np = (icFloatNumber)((p0 + p1)/2.0);
126 icFloatNumber nv = Apply(np);
127
128 if (v<=nv) {
129 return Find(v, p0, v0, np, nv);
130 }
131 return Find(v, np, nv, p1, v1);
132}
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100

◆ IsIdentity()

virtual bool CIccCurve::IsIdentity ( )
inlinevirtual

Reimplemented in CIccTagCurve, CIccTagParametricCurve, and CIccTagSegmentedCurve.

Definition at line 104 of file IccTagLut.h.

104{return false;}

◆ NewCopy()

virtual CIccTag * CIccCurve::NewCopy ( ) const
inlinevirtual

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

Parameter(s): none

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

Reimplemented from CIccTag.

Reimplemented in CIccTagCurve, CIccTagParametricCurve, and CIccTagSegmentedCurve.

Definition at line 94 of file IccTagLut.h.

94{ return new CIccCurve; }

Referenced by CIccMBB::CIccMBB(), and CIccMBB::operator=().

+ Here is the caller graph for this function:

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