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

Class: CIccSingleSampledCurve. More...

#include <IccMpeBasic.h>

+ Inheritance diagram for CIccSingleSampledCurve:
+ Collaboration diagram for CIccSingleSampledCurve:

Public Member Functions

virtual icFloatNumber Apply (icFloatNumber v) const
 Name: CIccSingleSampledCurve::Apply.
 
virtual bool Begin (icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)
 Name: CIccSingleSampledCurve::Begin.
 
 CIccSingleSampledCurve (const CIccSingleSampledCurve &ITPC)
 Name: CIccSingleSampledCurve::CIccSingleSampledCurve.
 
 CIccSingleSampledCurve (icFloatNumber first=0.0, icFloatNumber last=1.0)
 Name: CIccSingleSampledCurve::CIccSingleSampledCurve.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccSingleSampledCurve::Describe.
 
virtual const icCharGetClassName () const
 
icUInt16Number GetExtensionType ()
 
virtual icFloatNumberGetSamples ()
 
virtual icUInt32Number GetSize ()
 
icUInt16Number GetStorageType ()
 
virtual icCurveElemSignature GetType () const
 
virtual CIccCurveSetCurveNewCopy () const
 
CIccSingleSampledCurveoperator= (const CIccSingleSampledCurve &SampledCurve)
 Name: &CIccSingleSampledCurve::operator=.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Name: CIccSingleSampledCurve::Read.
 
bool SetExtensionType (icUInt16Number nExtensionType)
 Name: CIccSingleSampledCurve::SetExtensionType.
 
void SetRange (icFloatNumber first=0.0f, icFloatNumber last=1.0f)
 Name: CIccSingleSampledCurve::SetRange.
 
virtual bool SetSize (icUInt32Number nSize, bool bZeroAlloc=true)
 Name: CIccSingleSampledCurve::SetSize.
 
bool SetStorageType (icUInt16Number nStorateType)
 Name: CIccSingleSampledCurve::SetStorageType.
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
 Name: CIccSingleSampledCurve::Validate.
 
virtual bool Write (CIccIO *pIO)
 Name: CIccSingleSampledCurve::Write.
 
virtual ~CIccSingleSampledCurve ()
 Name: CIccSingleSampledCurve::~CIccSingleSampledCurve.
 
- Public Member Functions inherited from CIccCurveSetCurve
virtual ~CIccCurveSetCurve ()
 

Protected Attributes

icUInt16Number m_extensionType
 
icFloatNumber m_firstEntry
 
icFloatNumber m_hiIntercept
 
icFloatNumber m_hiSlope
 
icFloatNumber m_last
 
icFloatNumber m_lastEntry
 
icFloatNumber m_loIntercept
 
icFloatNumber m_loSlope
 
icUInt32Number m_nCount
 
icUInt32Number m_nReserved
 
icFloatNumberm_pSamples
 
icFloatNumber m_range
 
icUInt16Number m_storageType
 

Additional Inherited Members

- Static Public Member Functions inherited from CIccCurveSetCurve
static CIccCurveSetCurveCreate (icCurveElemSignature sig)
 Name: CIccCurveSetCurve::Create.
 

Detailed Description

Class: CIccSingleSampledCurve.

Purpose: The single sampled curve class

Definition at line 286 of file IccMpeBasic.h.

Constructor & Destructor Documentation

◆ CIccSingleSampledCurve() [1/2]

CIccSingleSampledCurve::CIccSingleSampledCurve ( icFloatNumber first = 0.0,
icFloatNumber last = 1.0 )

Name: CIccSingleSampledCurve::CIccSingleSampledCurve.

Purpose:

Args:

Return:

Definition at line 1261 of file IccMpeBasic.cpp.

1262{
1263 m_nReserved = 0;
1264 m_nCount = 0;
1265 m_pSamples = 0;
1266 m_last = 0;
1267
1270
1271 if (first < last) {
1272 m_firstEntry = first;
1273 m_lastEntry = last;
1274 }
1275 else {
1276 m_firstEntry = last;
1277 m_lastEntry = first;
1278 }
1279
1281 m_loIntercept = 0;
1282 m_loSlope = 0;
1283 m_hiIntercept = 1.0;
1284 m_hiSlope = 0;
1285}
icUInt32Number m_nReserved
icFloatNumber m_hiSlope
icFloatNumber m_firstEntry
icUInt16Number m_extensionType
icUInt32Number m_nCount
icFloatNumber m_lastEntry
icFloatNumber m_loIntercept
icFloatNumber * m_pSamples
icFloatNumber m_range
icUInt16Number m_storageType
icFloatNumber m_loSlope
icFloatNumber m_hiIntercept
@ icClipSingleSampledCurve
@ icValueTypeFloat32

References icClipSingleSampledCurve, and icValueTypeFloat32.

◆ CIccSingleSampledCurve() [2/2]

CIccSingleSampledCurve::CIccSingleSampledCurve ( const CIccSingleSampledCurve & curve)

Name: CIccSingleSampledCurve::CIccSingleSampledCurve.

Purpose:

Args:

Return:

Definition at line 1297 of file IccMpeBasic.cpp.

1298{
1299 m_nReserved = curve.m_nReserved;
1300 m_nCount = curve.m_nCount;
1301
1304
1305 if (m_nCount) {
1306 m_pSamples = (icFloatNumber*)malloc(m_nCount * sizeof(icFloatNumber));
1307 if (m_pSamples)
1308 memcpy(m_pSamples, curve.m_pSamples, m_nCount * sizeof(icFloatNumber));
1309 else
1310 m_nCount = 0;
1311 }
1312 else{
1313 m_pSamples = NULL;
1314 }
1315
1316 m_firstEntry = curve.m_firstEntry;
1317 m_lastEntry = curve.m_lastEntry;
1319
1321 m_loSlope = curve.m_loSlope;
1323 m_hiSlope = curve.m_hiSlope;
1324}
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100

References m_extensionType, m_firstEntry, m_hiIntercept, m_hiSlope, m_lastEntry, m_loIntercept, m_loSlope, m_nCount, m_nReserved, m_pSamples, and m_storageType.

◆ ~CIccSingleSampledCurve()

CIccSingleSampledCurve::~CIccSingleSampledCurve ( )
virtual

Name: CIccSingleSampledCurve::~CIccSingleSampledCurve.

Purpose:

Args:

Return:

Definition at line 1378 of file IccMpeBasic.cpp.

1379{
1380 if (m_pSamples)
1381 free(m_pSamples);
1382}

Member Function Documentation

◆ Apply()

icFloatNumber CIccSingleSampledCurve::Apply ( icFloatNumber v) const
virtual

Name: CIccSingleSampledCurve::Apply.

Purpose:

Args:

Return:

Implements CIccCurveSetCurve.

Definition at line 1798 of file IccMpeBasic.cpp.

1799{
1800 if (v<m_firstEntry) {
1801 return m_loSlope * v + m_loIntercept;;
1802 }
1803 else if (v>m_lastEntry) {
1804 return m_hiSlope * v + m_hiIntercept;
1805 }
1806
1808 icUInt32Number index = (icUInt32Number) pos;
1809 icFloatNumber remainder = pos - (icFloatNumber)index;
1810
1811 if (remainder==0.0)
1812 return m_pSamples[index];
1813
1814 return (icFloatNumber)((1.0-remainder)*m_pSamples[index] + remainder*m_pSamples[index+1]);
1815}
unsigned int icUInt32Number

◆ Begin()

bool CIccSingleSampledCurve::Begin ( icElemInterp nInterp,
CIccTagMultiProcessElement * pMPE )
virtual

Name: CIccSingleSampledCurve::Begin.

Purpose:

Args:

Return:

Implements CIccCurveSetCurve.

Definition at line 1752 of file IccMpeBasic.cpp.

1753{
1754 if (m_nCount<2)
1755 return false;
1756
1758 m_last = (icFloatNumber)(m_nCount - 1);
1759 icFloatNumber stepSize = m_range / m_last;
1760
1761 if (m_range == 0.0)
1762 return false;
1763
1764 switch(m_extensionType) {
1766 m_loSlope=0.0;
1768
1769 m_hiSlope=0.0;
1771 break;
1772
1774 m_loSlope = (m_pSamples[1]-m_pSamples[0])/stepSize;
1776
1777 m_hiSlope = (m_pSamples[m_nCount-1] - m_pSamples[m_nCount-2])/stepSize;
1779 break;
1780
1781 default:
1782 return false;
1783 }
1784
1785 return true;
1786}
@ icExtendSingleSampledCurve

References icClipSingleSampledCurve, and icExtendSingleSampledCurve.

◆ Describe()

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

Name: CIccSingleSampledCurve::Describe.

Purpose:

Args:

Return:

Implements CIccCurveSetCurve.

Definition at line 1512 of file IccMpeBasic.cpp.

1513{
1514 icChar buf[128];
1515
1516 if (m_nCount<2) {
1517 sDescription += "Empty Single Sampled Curve [";
1518 sprintf(buf, "%.8f, ", m_firstEntry);
1519 sDescription += buf;
1520
1521 sprintf(buf, "%.8f", m_lastEntry);
1522 sDescription += buf;
1523
1524 sprintf(buf, "]\n");
1525 sDescription += buf;
1526 }
1527 else {
1528 sDescription += "Single Sampled Curve [";
1529
1530 sprintf(buf, "%.8f, ", m_firstEntry);
1531 sDescription += buf;
1532
1533 sprintf(buf, "%.8f", m_lastEntry);
1534 sDescription += buf;
1535
1536 sprintf(buf, "]\n");
1537 sDescription += buf;
1538
1539 switch(m_storageType) {
1540 case icValueTypeUInt8:
1541 sDescription +="UInt8Number Array\n";
1542 break;
1543 case icValueTypeUInt16:
1544 sDescription +="UInt16Number Array\n";
1545 break;
1546 case icValueTypeFloat16:
1547 sDescription +="Float16Number Array\n";
1548 break;
1549 case icValueTypeFloat32:
1550 sDescription +="Float32Number Array\n";
1551 break;
1552 default:
1553 sDescription +="Unknown Data Type\n";
1554 break;
1555 }
1556
1557 switch(m_extensionType) {
1559 sDescription += "Clip End Points\n";
1560 break;
1562 sDescription += "Extend End Points\n";
1563 break;
1564 default:
1565 sDescription += "Unknown extension handling\n";
1566 break;
1567 }
1568 sDescription += "IN OUT\n";
1569
1571
1574
1575 for (i=0; i<m_nCount; i++) {
1576 sprintf(buf, "%.8f %.8f\n", m_firstEntry + (icFloatNumber)i*range/last, m_pSamples[i]);
1577 sDescription += buf;
1578 }
1579 }
1580 sDescription += "\n";
1581}
char icChar
Definition IccDefs.h:109
@ icValueTypeFloat16
@ icValueTypeUInt8
@ icValueTypeUInt16

References icClipSingleSampledCurve, icExtendSingleSampledCurve, icValueTypeFloat16, icValueTypeFloat32, icValueTypeUInt16, and icValueTypeUInt8.

◆ GetClassName()

virtual const icChar * CIccSingleSampledCurve::GetClassName ( ) const
inlinevirtual

Implements CIccCurveSetCurve.

Definition at line 296 of file IccMpeBasic.h.

296{ return "CIccSingleSampledCurve"; }

◆ GetExtensionType()

icUInt16Number CIccSingleSampledCurve::GetExtensionType ( )
inline

Definition at line 304 of file IccMpeBasic.h.

304{ return m_extensionType; }

◆ GetSamples()

virtual icFloatNumber * CIccSingleSampledCurve::GetSamples ( )
inlinevirtual

Definition at line 309 of file IccMpeBasic.h.

309{ return m_pSamples; }

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

+ Here is the caller graph for this function:

◆ GetSize()

virtual icUInt32Number CIccSingleSampledCurve::GetSize ( )
inlinevirtual

Definition at line 301 of file IccMpeBasic.h.

301{ return m_nCount; }

◆ GetStorageType()

icUInt16Number CIccSingleSampledCurve::GetStorageType ( )
inline

Definition at line 307 of file IccMpeBasic.h.

307{ return m_storageType; }

◆ GetType()

virtual icCurveElemSignature CIccSingleSampledCurve::GetType ( ) const
inlinevirtual

Implements CIccCurveSetCurve.

Definition at line 295 of file IccMpeBasic.h.

295{ return icSigSingleSampledCurve; }
@ icSigSingleSampledCurve

References icSigSingleSampledCurve.

◆ NewCopy()

virtual CIccCurveSetCurve * CIccSingleSampledCurve::NewCopy ( ) const
inlinevirtual

Implements CIccCurveSetCurve.

Definition at line 292 of file IccMpeBasic.h.

292{ return new CIccSingleSampledCurve(*this); }
CIccSingleSampledCurve(icFloatNumber first=0.0, icFloatNumber last=1.0)
Name: CIccSingleSampledCurve::CIccSingleSampledCurve.

◆ operator=()

CIccSingleSampledCurve & CIccSingleSampledCurve::operator= ( const CIccSingleSampledCurve & curve)

Name: &CIccSingleSampledCurve::operator=.

Purpose:

Args:

Return:

Definition at line 1336 of file IccMpeBasic.cpp.

1337{
1338 if (m_pSamples)
1339 free(m_pSamples);
1340
1341 m_nReserved = curve.m_nReserved;
1342 m_nCount = curve.m_nCount;
1343
1346
1347 if (m_nCount) {
1348 m_pSamples = (icFloatNumber*)malloc(m_nCount * sizeof(icFloatNumber));
1349 if (m_pSamples)
1350 memcpy(m_pSamples, curve.m_pSamples, m_nCount * sizeof(icFloatNumber));
1351 else
1352 m_nCount = 0;
1353 }
1354 else {
1355 m_pSamples = NULL;
1356 }
1357
1358 m_firstEntry = curve.m_firstEntry;
1359 m_lastEntry = curve.m_lastEntry;
1360
1362 m_loSlope = curve.m_loSlope;
1364 m_hiSlope = curve.m_hiSlope;
1365 return (*this);
1366}

References m_extensionType, m_firstEntry, m_hiIntercept, m_hiSlope, m_lastEntry, m_loIntercept, m_loSlope, m_nCount, m_nReserved, m_pSamples, and m_storageType.

◆ Read()

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

Name: CIccSingleSampledCurve::Read.

Purpose:

Args:

Return:

Implements CIccCurveSetCurve.

Definition at line 1593 of file IccMpeBasic.cpp.

1594{
1596
1597 icUInt32Number headerSize = sizeof(icTagTypeSignature) +
1598 sizeof(icUInt32Number) +
1599 sizeof(icUInt32Number) +
1600 sizeof(icFloat32Number) +
1601 sizeof(icFloat32Number) +
1602 sizeof(icUInt16Number) +
1603 sizeof(icUInt16Number);
1604
1605 if (headerSize > size)
1606 return false;
1607
1608 if (!pIO) {
1609 return false;
1610 }
1611
1612 if (!pIO->Read32(&sig) || sig!=GetType())
1613 return false;
1614
1615 if (!pIO->Read32(&m_nReserved))
1616 return false;
1617
1618 if (!pIO->Read32(&m_nCount))
1619 return false;
1620
1621 if (!pIO->ReadFloat32Float(&m_firstEntry))
1622 return false;
1623
1624 if (!pIO->ReadFloat32Float(&m_lastEntry))
1625 return false;
1626
1627 if (!pIO->Read16(&m_extensionType))
1628 return false;
1629
1630 if (!pIO->Read16(&m_storageType))
1631 return false;
1632
1633 if (!SetSize(m_nCount, false))
1634 return false;
1635
1636 if (m_nCount > size - headerSize)
1637 return false;
1638
1639 if (m_nCount) {
1640 switch(m_storageType) {
1641 case icValueTypeUInt8:
1642 if (m_nCount * sizeof(icUInt8Number) > size - headerSize)
1643 return false;
1644
1646 return false;
1647 break;
1648 case icValueTypeUInt16:
1649 if (m_nCount * 2 > size - headerSize)
1650 return false;
1651
1653 return false;
1654 break;
1655 case icValueTypeFloat16:
1656 if (m_nCount * 2 > size - headerSize)
1657 return false;
1658
1660 return false;
1661 break;
1662 case icValueTypeFloat32:
1663 if (m_nCount * sizeof(icFloat32Number) > size - headerSize)
1664 return false;
1665
1667 return false;
1668 break;
1669 default:
1670 return false;
1671 }
1672 }
1673
1674 return true;
1675}
icArraySignature sig
icTagTypeSignature
icInt32Number ReadFloat16Float(void *pBufFloat, icInt32Number nNum=1)
Definition IccIO.cpp:269
icInt32Number ReadFloat32Float(void *pBufFloat, icInt32Number nNum=1)
Definition IccIO.cpp:302
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
virtual icCurveElemSignature GetType() const
virtual bool SetSize(icUInt32Number nSize, bool bZeroAlloc=true)
Name: CIccSingleSampledCurve::SetSize.
unsigned char icUInt8Number
Number definitions.
float icFloat32Number
unsigned short icUInt16Number
long icInt32Number
icCurveSegSignature
MPE Curve segment Signatures.

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

+ Here is the call graph for this function:

◆ SetExtensionType()

bool CIccSingleSampledCurve::SetExtensionType ( icUInt16Number nExtensionType)

Name: CIccSingleSampledCurve::SetExtensionType.

Purpose: Sets extension type of the single sampled curve

Args: nExtensionType is type of extension to use

Return: true if valid extension type, false otherwise

Definition at line 1421 of file IccMpeBasic.cpp.

1422{
1423 m_extensionType = nExtensionType;
1424
1425 switch (nExtensionType) {
1428 return true;
1429 }
1430 return false;
1431}

References icClipSingleSampledCurve, and icExtendSingleSampledCurve.

◆ SetRange()

void CIccSingleSampledCurve::SetRange ( icFloatNumber first = 0.0f,
icFloatNumber last = 1.0f )

Name: CIccSingleSampledCurve::SetRange.

Purpose: Sets range of sampled lookup table.

Args: first = first entry input position last = last entry input position

Definition at line 1395 of file IccMpeBasic.cpp.

1396{
1397 if (first < last) {
1398 m_firstEntry = first;
1399 m_lastEntry = last;
1400 }
1401 else {
1402 m_firstEntry = last;
1403 m_lastEntry = first;
1404 }
1405}

◆ SetSize()

bool CIccSingleSampledCurve::SetSize ( icUInt32Number nCount,
bool bZeroAlloc = true )
virtual

Name: CIccSingleSampledCurve::SetSize.

Purpose: Sets size of sampled lookup table. Previous data (if exists) is lost.

Args: nCount = number of elements in lut (must be >= 2).
bZeroAlloc = flag to decide if memory should be set to zero.

Return: true if allocation successful.

Definition at line 1475 of file IccMpeBasic.cpp.

1476{
1477 if (!nCount) {
1478 if (m_pSamples)
1479 free(m_pSamples);
1480 m_pSamples = NULL;
1481 m_nCount = nCount;
1482 return true;
1483 }
1484
1485 if (m_pSamples) {
1486 free(m_pSamples);
1487 }
1488
1489 if (bZeroAlloc)
1490 m_pSamples = (icFloatNumber*)calloc(nCount, sizeof(icFloatNumber));
1491 else
1492 m_pSamples = (icFloatNumber*)malloc(nCount * sizeof(icFloatNumber));
1493
1494 if (m_pSamples)
1495 m_nCount = nCount;
1496 else
1497 m_nCount = 0;
1498
1499 return (m_pSamples != NULL);
1500}

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

+ Here is the caller graph for this function:

◆ SetStorageType()

bool CIccSingleSampledCurve::SetStorageType ( icUInt16Number nStorateType)

Name: CIccSingleSampledCurve::SetStorageType.

Purpose: Sets storate type of the data stored in the single sampled curve

Args: nStorageType is type of data to use

Return: true if valid storage type, false otherwise

Definition at line 1446 of file IccMpeBasic.cpp.

1447{
1448 m_storageType = nStorateType;
1449
1450 switch (nStorateType) {
1451 case icValueTypeUInt8:
1452 case icValueTypeUInt16:
1453 case icValueTypeFloat16:
1454 case icValueTypeFloat32:
1455 return true;
1456 }
1457 return false;
1458}

References icValueTypeFloat16, icValueTypeFloat32, icValueTypeUInt16, and icValueTypeUInt8.

◆ Validate()

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

Name: CIccSingleSampledCurve::Validate.

Purpose:

Args:

Return:

Implements CIccCurveSetCurve.

Definition at line 1827 of file IccMpeBasic.cpp.

1828{
1829 CIccInfo Info;
1830 std::string sSigPathName = Info.GetSigPathName(sigPath);
1831
1833 if (m_nReserved) {
1834 sReport += icMsgValidateWarning;
1835 sReport += sSigPathName;
1836 sReport += " single sampled curve has non zero reserved data.\n";
1837 rv = icValidateWarning;
1838 }
1839
1841 sReport += icMsgValidateCriticalError;
1842 sReport += sSigPathName;
1843 sReport += " single sampled curve has unknown extension type\n";
1845 }
1846
1848 sReport += icMsgValidateCriticalError;
1849 sReport += sSigPathName;
1850 sReport += " single sampled curve uses unknown value type\n";
1852 }
1853
1854 if (m_nCount<2) {
1855 sReport += icMsgValidateCriticalError;
1856 sReport += sSigPathName;
1857 sReport += " single sampled curve has too few sample points.\n";
1859 }
1860
1861 if (m_lastEntry-m_firstEntry <= 0.0) {
1862 sReport += icMsgValidateWarning;
1863 sReport += sSigPathName;
1864 sReport += " single sampled curve has an invalid sample range.\r\n";
1866 }
1867
1868 return rv;
1869}
icValidateStatus
Definition IccDefs.h:118
@ icValidateOK
Definition IccDefs.h:119
@ icValidateWarning
Definition IccDefs.h:120
@ icValidateCriticalError
Definition IccDefs.h:122
icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Name: icMaxStatus.
Definition IccUtil.cpp:244
const char * icMsgValidateWarning
Definition IccUtil.cpp:90
const char * icMsgValidateCriticalError
Definition IccUtil.cpp:92
Type: Class.
Definition IccUtil.h:303
std::string GetSigPathName(std::string sigPath)
Definition IccUtil.cpp:1614
#define icMaxSingleSampledCurveType
#define icMaxValueType

References CIccInfo::GetSigPathName(), icMaxSingleSampledCurveType, icMaxStatus(), icMaxValueType, icMsgValidateCriticalError, icMsgValidateWarning, icValidateCriticalError, icValidateOK, and icValidateWarning.

+ Here is the call graph for this function:

◆ Write()

bool CIccSingleSampledCurve::Write ( CIccIO * pIO)
virtual

Name: CIccSingleSampledCurve::Write.

Purpose:

Args:

Return:

Implements CIccCurveSetCurve.

Definition at line 1687 of file IccMpeBasic.cpp.

1688{
1690
1691 if (!pIO)
1692 return false;
1693
1694 if (!pIO->Write32(&sig))
1695 return false;
1696
1697 if (!pIO->Write32(&m_nReserved))
1698 return false;
1699
1700 if (!pIO->Write32(&m_nCount))
1701 return false;
1702
1703 if (!pIO->WriteFloat32Float(&m_firstEntry))
1704 return false;
1705
1706 if (!pIO->WriteFloat32Float(&m_lastEntry))
1707 return false;
1708
1709 if (!pIO->Write16(&m_extensionType))
1710 return false;
1711
1712 if (!pIO->Write16(&m_storageType))
1713 return false;
1714
1715 if (m_nCount) {
1716
1717 switch(m_storageType) {
1718 case icValueTypeUInt8:
1720 return false;
1721 break;
1722 case icValueTypeUInt16:
1724 return false;
1725 break;
1726 case icValueTypeFloat16:
1728 return false;
1729 break;
1730 case icValueTypeFloat32:
1732 return false;
1733 break;
1734 default:
1735 return false;
1736 }
1737 }
1738
1739 return true;
1740}
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
icCurveElemSignature
MPE Curve Set Curve signature.

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

+ Here is the call graph for this function:

Member Data Documentation

◆ m_extensionType

icUInt16Number CIccSingleSampledCurve::m_extensionType
protected

Definition at line 327 of file IccMpeBasic.h.

Referenced by CIccSingleSampledCurve(), and operator=().

◆ m_firstEntry

icFloatNumber CIccSingleSampledCurve::m_firstEntry
protected

Definition at line 329 of file IccMpeBasic.h.

Referenced by CIccSingleSampledCurve(), and operator=().

◆ m_hiIntercept

icFloatNumber CIccSingleSampledCurve::m_hiIntercept
protected

Definition at line 338 of file IccMpeBasic.h.

Referenced by CIccSingleSampledCurve(), and operator=().

◆ m_hiSlope

icFloatNumber CIccSingleSampledCurve::m_hiSlope
protected

Definition at line 337 of file IccMpeBasic.h.

Referenced by CIccSingleSampledCurve(), and operator=().

◆ m_last

icFloatNumber CIccSingleSampledCurve::m_last
protected

Definition at line 333 of file IccMpeBasic.h.

◆ m_lastEntry

icFloatNumber CIccSingleSampledCurve::m_lastEntry
protected

Definition at line 330 of file IccMpeBasic.h.

Referenced by CIccSingleSampledCurve(), and operator=().

◆ m_loIntercept

icFloatNumber CIccSingleSampledCurve::m_loIntercept
protected

Definition at line 336 of file IccMpeBasic.h.

Referenced by CIccSingleSampledCurve(), and operator=().

◆ m_loSlope

icFloatNumber CIccSingleSampledCurve::m_loSlope
protected

Definition at line 335 of file IccMpeBasic.h.

Referenced by CIccSingleSampledCurve(), and operator=().

◆ m_nCount

icUInt32Number CIccSingleSampledCurve::m_nCount
protected

Definition at line 323 of file IccMpeBasic.h.

Referenced by CIccSingleSampledCurve(), and operator=().

◆ m_nReserved

icUInt32Number CIccSingleSampledCurve::m_nReserved
protected

Definition at line 321 of file IccMpeBasic.h.

Referenced by CIccSingleSampledCurve(), and operator=().

◆ m_pSamples

icFloatNumber* CIccSingleSampledCurve::m_pSamples
protected

Definition at line 324 of file IccMpeBasic.h.

Referenced by CIccSingleSampledCurve(), and operator=().

◆ m_range

icFloatNumber CIccSingleSampledCurve::m_range
protected

Definition at line 332 of file IccMpeBasic.h.

◆ m_storageType

icUInt16Number CIccSingleSampledCurve::m_storageType
protected

Definition at line 326 of file IccMpeBasic.h.

Referenced by CIccSingleSampledCurve(), and operator=().


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