IccMAX 2.1.27
Color Profile Tools
Loading...
Searching...
No Matches
CIccSingleSampledCurve Class Reference

#include <IccMpeBasic.h>

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

Public Member Functions

 CIccSingleSampledCurve (const CIccSingleSampledCurve &ITPC)
 
 CIccSingleSampledCurve (icFloatNumber first=0.0, icFloatNumber last=1.0)
 
virtual ~CIccSingleSampledCurve ()
 
virtual icFloatNumber Apply (icFloatNumber v) const
 
virtual bool Begin (icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 
virtual const icCharGetClassName () const
 
icUInt16Number GetExtensionType ()
 
virtual icFloatNumberGetSamples ()
 
virtual icUInt32Number GetSize ()
 
icUInt16Number GetStorageType ()
 
virtual icCurveElemSignature GetType () const
 
virtual CIccCurveSetCurveNewCopy () const
 
CIccSingleSampledCurveoperator= (const CIccSingleSampledCurve &SampledCurve)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 
bool SetExtensionType (icUInt16Number nExtensionType)
 
void SetRange (icFloatNumber first=0.0f, icFloatNumber last=1.0f)
 
virtual bool SetSize (icUInt32Number nSize, bool bZeroAlloc=true)
 
bool SetStorageType (icUInt16Number nStorateType)
 
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 CIccCurveSetCurveCreate (icCurveElemSignature sig)
 

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
 

Detailed Description

Class: CIccSingleSampledCurve

Purpose: The single sampled curve class

Constructor & Destructor Documentation

◆ CIccSingleSampledCurve() [1/2]

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

Name: CIccSingleSampledCurve::CIccSingleSampledCurve

Purpose:

Args:

Return:

1275{
1276 m_nReserved = 0;
1277 m_nCount = 0;
1278 m_pSamples = 0;
1279 m_last = 0;
1280
1283
1284 if (first < last) {
1285 m_firstEntry = first;
1286 m_lastEntry = last;
1287 }
1288 else {
1289 m_firstEntry = last;
1290 m_lastEntry = first;
1291 }
1292
1294 m_loIntercept = 0;
1295 m_loSlope = 0;
1296 m_hiIntercept = 1.0;
1297 m_hiSlope = 0;
1298}
@ icClipSingleSampledCurve
Definition icProfileHeader.h:1067
@ icValueTypeFloat32
Definition icProfileHeader.h:1086
icUInt32Number m_nReserved
Definition IccMpeBasic.h:321
icFloatNumber m_hiSlope
Definition IccMpeBasic.h:337
icFloatNumber m_firstEntry
Definition IccMpeBasic.h:329
icUInt16Number m_extensionType
Definition IccMpeBasic.h:327
icUInt32Number m_nCount
Definition IccMpeBasic.h:323
icFloatNumber m_lastEntry
Definition IccMpeBasic.h:330
icFloatNumber m_loIntercept
Definition IccMpeBasic.h:336
icFloatNumber m_last
Definition IccMpeBasic.h:333
icFloatNumber * m_pSamples
Definition IccMpeBasic.h:324
icFloatNumber m_range
Definition IccMpeBasic.h:332
icUInt16Number m_storageType
Definition IccMpeBasic.h:326
icFloatNumber m_loSlope
Definition IccMpeBasic.h:335
icFloatNumber m_hiIntercept
Definition IccMpeBasic.h:338

References icClipSingleSampledCurve, icValueTypeFloat32, m_extensionType, m_firstEntry, m_hiIntercept, m_hiSlope, m_last, m_lastEntry, m_loIntercept, m_loSlope, m_nCount, m_nReserved, m_pSamples, m_range, and m_storageType.

Referenced by CIccSinglSampledeCurveXml::CIccSinglSampledeCurveXml(), CDevLinkWriter::begin(), CIccCurveSetCurve::Create(), and main().

+ Here is the caller graph for this function:

◆ CIccSingleSampledCurve() [2/2]

CIccSingleSampledCurve::CIccSingleSampledCurve ( const CIccSingleSampledCurve curve)

Name: CIccSingleSampledCurve::CIccSingleSampledCurve

Purpose:

Args:

Return:

1311{
1312 m_nReserved = curve.m_nReserved;
1313 m_nCount = curve.m_nCount;
1314
1317
1318 if (m_nCount) {
1319 m_pSamples = (icFloatNumber*)malloc(m_nCount * sizeof(icFloatNumber));
1320 if (m_pSamples)
1321 memcpy(m_pSamples, curve.m_pSamples, m_nCount * sizeof(icFloatNumber));
1322 else
1323 m_nCount = 0;
1324 }
1325 else{
1326 m_pSamples = NULL;
1327 }
1328
1329 m_firstEntry = curve.m_firstEntry;
1330 m_lastEntry = curve.m_lastEntry;
1332
1334 m_loSlope = curve.m_loSlope;
1336 m_hiSlope = curve.m_hiSlope;
1337}
float icFloatNumber
Definition IccDefs.h:101

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

Referenced by NewCopy().

+ Here is the caller graph for this function:

◆ ~CIccSingleSampledCurve()

CIccSingleSampledCurve::~CIccSingleSampledCurve ( )
virtual

Name: CIccSingleSampledCurve::~CIccSingleSampledCurve

Purpose:

Args:

Return:

1392{
1393 if (m_pSamples)
1394 free(m_pSamples);
1395}

References m_pSamples.

Member Function Documentation

◆ Apply()

icFloatNumber CIccSingleSampledCurve::Apply ( icFloatNumber  v) const
virtual

Name: CIccSingleSampledCurve::Apply

Purpose:

Args:

Return:

Implements CIccCurveSetCurve.

1812{
1813 if (v<m_firstEntry) {
1814 return m_loSlope * v + m_loIntercept;;
1815 }
1816 else if (v>m_lastEntry) {
1817 return m_hiSlope * v + m_hiIntercept;
1818 }
1819
1821 icUInt32Number index = (icUInt32Number) pos;
1822 icFloatNumber remainder = pos - (icFloatNumber)index;
1823
1824 if (remainder==0.0)
1825 return m_pSamples[index];
1826
1827 return (icFloatNumber)((1.0-remainder)*m_pSamples[index] + remainder*m_pSamples[index+1]);
1828}
unsigned long icUInt32Number
Definition icProfileHeader.h:262

References m_firstEntry, m_hiIntercept, m_hiSlope, m_last, m_lastEntry, m_loIntercept, m_loSlope, m_pSamples, and m_range.

◆ Begin()

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

Name: CIccSingleSampledCurve::Begin

Purpose:

Args:

Return:

Implements CIccCurveSetCurve.

1766{
1767 if (m_nCount<2)
1768 return false;
1769
1771 m_last = (icFloatNumber)(m_nCount - 1);
1772 icFloatNumber stepSize = m_range / m_last;
1773
1774 if (m_range == 0.0)
1775 return false;
1776
1777 switch(m_extensionType) {
1779 m_loSlope=0.0;
1781
1782 m_hiSlope=0.0;
1784 break;
1785
1787 m_loSlope = (m_pSamples[1]-m_pSamples[0])/stepSize;
1789
1790 m_hiSlope = (m_pSamples[m_nCount-1] - m_pSamples[m_nCount-2])/stepSize;
1792 break;
1793
1794 default:
1795 return false;
1796 }
1797
1798 return true;
1799}
@ icExtendSingleSampledCurve
Definition icProfileHeader.h:1068

References icClipSingleSampledCurve, icExtendSingleSampledCurve, m_extensionType, m_firstEntry, m_hiIntercept, m_hiSlope, m_last, m_lastEntry, m_loIntercept, m_loSlope, m_nCount, m_pSamples, and m_range.

◆ Create()

CIccCurveSetCurve * CIccCurveSetCurve::Create ( icCurveElemSignature  sig)
staticinherited

Name: CIccCurveSetCurve::Create

Purpose:

Args:

Return:

2961{
2962 switch (sig) {
2964 return new CIccSegmentedCurve();
2966 return new CIccSingleSampledCurve();
2968 return new CIccSampledCalculatorCurve();
2969 default:
2970 return NULL;
2971 }
2972}
@ icSigSegmentedCurve
Definition icProfileHeader.h:1057
@ icSigSampledCalculatorCurve
Definition icProfileHeader.h:1059
@ icSigSingleSampledCurve
Definition icProfileHeader.h:1058
Definition IccMpeBasic.h:249
Definition IccMpeBasic.h:287
Definition IccMpeBasic.h:354

References CIccSampledCalculatorCurve::CIccSampledCalculatorCurve(), CIccSegmentedCurve::CIccSegmentedCurve(), CIccSingleSampledCurve(), icSigSampledCalculatorCurve, icSigSegmentedCurve, and icSigSingleSampledCurve.

Referenced by CIccMpeCurveSet::Read(), and CIccMpeToneMap::Read().

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

◆ Describe()

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

Name: CIccSingleSampledCurve::Describe

Purpose:

Args:

Return:

Implements CIccCurveSetCurve.

1526{
1527 icChar buf[128];
1528
1529 if (m_nCount<2) {
1530 sDescription += "Empty Single Sampled Curve [";
1531 sprintf(buf, "%.8f, ", m_firstEntry);
1532 sDescription += buf;
1533
1534 sprintf(buf, "%.8f", m_lastEntry);
1535 sDescription += buf;
1536
1537 sprintf(buf, "]\n");
1538 sDescription += buf;
1539 }
1540 else {
1541 sDescription += "Single Sampled Curve [";
1542
1543 sprintf(buf, "%.8f, ", m_firstEntry);
1544 sDescription += buf;
1545
1546 sprintf(buf, "%.8f", m_lastEntry);
1547 sDescription += buf;
1548
1549 sprintf(buf, "]\n");
1550 sDescription += buf;
1551
1552 switch(m_storageType) {
1553 case icValueTypeUInt8:
1554 sDescription +="UInt8Number Array\n";
1555 break;
1556 case icValueTypeUInt16:
1557 sDescription +="UInt16Number Array\n";
1558 break;
1559 case icValueTypeFloat16:
1560 sDescription +="Float16Number Array\n";
1561 break;
1562 case icValueTypeFloat32:
1563 sDescription +="Float32Number Array\n";
1564 break;
1565 default:
1566 sDescription +="Unknown Data Type\n";
1567 break;
1568 }
1569
1570 switch(m_extensionType) {
1572 sDescription += "Clip End Points\n";
1573 break;
1575 sDescription += "Extend End Points\n";
1576 break;
1577 default:
1578 sDescription += "Unknown extension handling\n";
1579 break;
1580 }
1581 sDescription += "IN OUT\n";
1582
1584
1587
1588 for (i=0; i<m_nCount; i++) {
1589 sprintf(buf, "%.8f %.8f\n", m_firstEntry + (icFloatNumber)i*range/last, m_pSamples[i]);
1590 sDescription += buf;
1591 }
1592 }
1593 sDescription += "\n";
1594}
@ icValueTypeFloat16
Definition icProfileHeader.h:1087
@ icValueTypeUInt8
Definition icProfileHeader.h:1089
@ icValueTypeUInt16
Definition icProfileHeader.h:1088
char icChar
Definition IccDefs.h:110

References icClipSingleSampledCurve, icExtendSingleSampledCurve, icValueTypeFloat16, icValueTypeFloat32, icValueTypeUInt16, icValueTypeUInt8, m_extensionType, m_firstEntry, m_lastEntry, m_nCount, m_pSamples, and m_storageType.

◆ GetClassName()

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

Implements CIccCurveSetCurve.

296{ return "CIccSingleSampledCurve"; }

◆ GetExtensionType()

icUInt16Number CIccSingleSampledCurve::GetExtensionType ( )
inline
304{ return m_extensionType; }

References m_extensionType.

◆ GetSamples()

virtual icFloatNumber * CIccSingleSampledCurve::GetSamples ( )
inlinevirtual
309{ return m_pSamples; }

References m_pSamples.

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

+ Here is the caller graph for this function:

◆ GetSize()

virtual icUInt32Number CIccSingleSampledCurve::GetSize ( )
inlinevirtual
301{ return m_nCount; }

References m_nCount.

◆ GetStorageType()

icUInt16Number CIccSingleSampledCurve::GetStorageType ( )
inline
307{ return m_storageType; }

References m_storageType.

◆ GetType()

virtual icCurveElemSignature CIccSingleSampledCurve::GetType ( ) const
inlinevirtual

Implements CIccCurveSetCurve.

295{ return icSigSingleSampledCurve; }

References icSigSingleSampledCurve.

Referenced by Read(), and Write().

+ Here is the caller graph for this function:

◆ NewCopy()

virtual CIccCurveSetCurve * CIccSingleSampledCurve::NewCopy ( ) const
inlinevirtual

Implements CIccCurveSetCurve.

292{ return new CIccSingleSampledCurve(*this); }

References CIccSingleSampledCurve().

+ Here is the call graph for this function:

◆ operator=()

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

Name: &CIccSingleSampledCurve::operator=

Purpose:

Args:

Return:

1350{
1351 if (m_pSamples)
1352 free(m_pSamples);
1353
1354 m_nReserved = curve.m_nReserved;
1355 m_nCount = curve.m_nCount;
1356
1359
1360 if (m_nCount) {
1361 m_pSamples = (icFloatNumber*)malloc(m_nCount * sizeof(icFloatNumber));
1362 if (m_pSamples)
1363 memcpy(m_pSamples, curve.m_pSamples, m_nCount * sizeof(icFloatNumber));
1364 else
1365 m_nCount = 0;
1366 }
1367 else {
1368 m_pSamples = NULL;
1369 }
1370
1371 m_firstEntry = curve.m_firstEntry;
1372 m_lastEntry = curve.m_lastEntry;
1373
1375 m_loSlope = curve.m_loSlope;
1377 m_hiSlope = curve.m_hiSlope;
1378 return (*this);
1379}

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.

1607{
1609
1610 icUInt32Number headerSize = sizeof(icTagTypeSignature) +
1611 sizeof(icUInt32Number) +
1612 sizeof(icUInt32Number) +
1613 sizeof(icFloat32Number) +
1614 sizeof(icFloat32Number) +
1615 sizeof(icUInt16Number) +
1616 sizeof(icUInt16Number);
1617
1618 if (headerSize > size)
1619 return false;
1620
1621 if (!pIO) {
1622 return false;
1623 }
1624
1625 if (!pIO->Read32(&sig) || sig!=GetType())
1626 return false;
1627
1628 if (!pIO->Read32(&m_nReserved))
1629 return false;
1630
1631 if (!pIO->Read32(&m_nCount))
1632 return false;
1633
1634 if (!pIO->ReadFloat32Float(&m_firstEntry))
1635 return false;
1636
1637 if (!pIO->ReadFloat32Float(&m_lastEntry))
1638 return false;
1639
1640 if (!pIO->Read16(&m_extensionType))
1641 return false;
1642
1643 if (!pIO->Read16(&m_storageType))
1644 return false;
1645
1646 if (!SetSize(m_nCount, false))
1647 return false;
1648
1649 if (m_nCount > size - headerSize)
1650 return false;
1651
1652 if (m_nCount) {
1653 switch(m_storageType) {
1654 case icValueTypeUInt8:
1655 if (m_nCount * sizeof(icUInt8Number) > size - headerSize)
1656 return false;
1657
1659 return false;
1660 break;
1661 case icValueTypeUInt16:
1662 if (m_nCount * 2 > size - headerSize)
1663 return false;
1664
1666 return false;
1667 break;
1668 case icValueTypeFloat16:
1669 if (m_nCount * 2 > size - headerSize)
1670 return false;
1671
1673 return false;
1674 break;
1675 case icValueTypeFloat32:
1676 if (m_nCount * sizeof(icFloat32Number) > size - headerSize)
1677 return false;
1678
1680 return false;
1681 break;
1682 default:
1683 return false;
1684 }
1685 }
1686
1687 return true;
1688}
unsigned char icUInt8Number
Definition icProfileHeader.h:250
float icFloat32Number
Definition icProfileHeader.h:313
unsigned short icUInt16Number
Definition icProfileHeader.h:256
long icInt32Number
Definition icProfileHeader.h:291
icCurveSegSignature
Definition icProfileHeader.h:1045
icTagTypeSignature
Definition icProfileHeader.h:526
virtual icCurveElemSignature GetType() const
Definition IccMpeBasic.h:295
virtual bool SetSize(icUInt32Number nSize, bool bZeroAlloc=true)
Definition IccMpeBasic.cpp:1488
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

References GetType(), icValueTypeFloat16, icValueTypeFloat32, icValueTypeUInt16, icValueTypeUInt8, m_extensionType, m_firstEntry, m_lastEntry, m_nCount, m_nReserved, m_pSamples, m_storageType, CIccIO::Read16(), CIccIO::Read32(), CIccIO::ReadFloat16Float(), CIccIO::ReadFloat32Float(), CIccIO::ReadUInt16Float(), CIccIO::ReadUInt8Float(), and SetSize().

+ 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

1435{
1436 m_extensionType = nExtensionType;
1437
1438 switch (nExtensionType) {
1441 return true;
1442 }
1443 return false;
1444}

References icClipSingleSampledCurve, icExtendSingleSampledCurve, and m_extensionType.

◆ 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

1409{
1410 if (first < last) {
1411 m_firstEntry = first;
1412 m_lastEntry = last;
1413 }
1414 else {
1415 m_firstEntry = last;
1416 m_lastEntry = first;
1417 }
1418}

References m_firstEntry, and m_lastEntry.

◆ 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.

1489{
1490 if (!nCount) {
1491 if (m_pSamples)
1492 free(m_pSamples);
1493 m_pSamples = NULL;
1494 m_nCount = nCount;
1495 return true;
1496 }
1497
1498 if (m_pSamples) {
1499 free(m_pSamples);
1500 }
1501
1502 if (bZeroAlloc)
1503 m_pSamples = (icFloatNumber*)calloc(nCount, sizeof(icFloatNumber));
1504 else
1505 m_pSamples = (icFloatNumber*)malloc(nCount * sizeof(icFloatNumber));
1506
1507 if (m_pSamples)
1508 m_nCount = nCount;
1509 else
1510 m_nCount = 0;
1511
1512 return (m_pSamples != NULL);
1513}

References m_nCount, and m_pSamples.

Referenced by CDevLinkWriter::begin(), main(), CIccSinglSampledeCurveXml::ParseXml(), and Read().

+ 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

1460{
1461 m_storageType = nStorateType;
1462
1463 switch (nStorateType) {
1464 case icValueTypeUInt8:
1465 case icValueTypeUInt16:
1466 case icValueTypeFloat16:
1467 case icValueTypeFloat32:
1468 return true;
1469 }
1470 return false;
1471}

References icValueTypeFloat16, icValueTypeFloat32, icValueTypeUInt16, icValueTypeUInt8, and m_storageType.

◆ 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.

1841{
1842 CIccInfo Info;
1843 std::string sSigPathName = Info.GetSigPathName(sigPath);
1844
1846 if (m_nReserved) {
1847 sReport += icMsgValidateWarning;
1848 sReport += sSigPathName;
1849 sReport += " single sampled curve has non zero reserved data.\n";
1850 rv = icValidateWarning;
1851 }
1852
1854 sReport += icMsgValidateCriticalError;
1855 sReport += sSigPathName;
1856 sReport += " single sampled curve has unknown extension type\n";
1858 }
1859
1861 sReport += icMsgValidateCriticalError;
1862 sReport += sSigPathName;
1863 sReport += " single sampled curve uses unknown value type\n";
1865 }
1866
1867 if (m_nCount<2) {
1868 sReport += icMsgValidateCriticalError;
1869 sReport += sSigPathName;
1870 sReport += " single sampled curve has too few sample points.\n";
1872 }
1873
1874 if (m_lastEntry-m_firstEntry <= 0.0) {
1875 sReport += icMsgValidateWarning;
1876 sReport += sSigPathName;
1877 sReport += " single sampled curve has an invalid sample range.\r\n";
1879 }
1880
1881 return rv;
1882}
#define icMaxSingleSampledCurveType
Definition icProfileHeader.h:1071
#define icMaxValueType
Definition icProfileHeader.h:1092
icValidateStatus
Definition IccDefs.h:119
@ icValidateOK
Definition IccDefs.h:120
@ icValidateWarning
Definition IccDefs.h:121
@ icValidateCriticalError
Definition IccDefs.h:123
ICCPROFLIB_API const char * icMsgValidateWarning
Definition IccUtil.cpp:90
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

References CIccInfo::GetSigPathName(), icMaxStatus(), icMsgValidateCriticalError, icMsgValidateWarning, icValidateCriticalError, icValidateOK, icValidateWarning, m_extensionType, m_firstEntry, m_lastEntry, m_nCount, m_nReserved, and m_storageType.

+ Here is the call graph for this function:

◆ Write()

bool CIccSingleSampledCurve::Write ( CIccIO pIO)
virtual

Name: CIccSingleSampledCurve::Write

Purpose:

Args:

Return:

Implements CIccCurveSetCurve.

1701{
1703
1704 if (!pIO)
1705 return false;
1706
1707 if (!pIO->Write32(&sig))
1708 return false;
1709
1710 if (!pIO->Write32(&m_nReserved))
1711 return false;
1712
1713 if (!pIO->Write32(&m_nCount))
1714 return false;
1715
1716 if (!pIO->WriteFloat32Float(&m_firstEntry))
1717 return false;
1718
1719 if (!pIO->WriteFloat32Float(&m_lastEntry))
1720 return false;
1721
1722 if (!pIO->Write16(&m_extensionType))
1723 return false;
1724
1725 if (!pIO->Write16(&m_storageType))
1726 return false;
1727
1728 if (m_nCount) {
1729
1730 switch(m_storageType) {
1731 case icValueTypeUInt8:
1733 return false;
1734 break;
1735 case icValueTypeUInt16:
1737 return false;
1738 break;
1739 case icValueTypeFloat16:
1741 return false;
1742 break;
1743 case icValueTypeFloat32:
1745 return false;
1746 break;
1747 default:
1748 return false;
1749 }
1750 }
1751
1752 return true;
1753}
icCurveElemSignature
Definition icProfileHeader.h:1056
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

References GetType(), icValueTypeFloat16, icValueTypeFloat32, icValueTypeUInt16, icValueTypeUInt8, m_extensionType, m_firstEntry, m_lastEntry, m_nCount, m_nReserved, m_pSamples, m_storageType, CIccIO::Write16(), CIccIO::Write32(), CIccIO::WriteFloat16Float(), CIccIO::WriteFloat32Float(), CIccIO::WriteUInt16Float(), and CIccIO::WriteUInt8Float().

+ Here is the call graph for this function:

Field Documentation

◆ m_extensionType

◆ m_firstEntry

◆ m_hiIntercept

icFloatNumber CIccSingleSampledCurve::m_hiIntercept
protected

◆ m_hiSlope

icFloatNumber CIccSingleSampledCurve::m_hiSlope
protected

◆ m_last

icFloatNumber CIccSingleSampledCurve::m_last
protected

◆ m_lastEntry

◆ m_loIntercept

icFloatNumber CIccSingleSampledCurve::m_loIntercept
protected

◆ m_loSlope

icFloatNumber CIccSingleSampledCurve::m_loSlope
protected

◆ m_nCount

◆ m_nReserved

icUInt32Number CIccSingleSampledCurve::m_nReserved
protected

◆ m_pSamples

◆ m_range

icFloatNumber CIccSingleSampledCurve::m_range
protected

◆ m_storageType


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