72#pragma warning( disable: 4786)
86#ifdef USEREFICCMAXNAMESPACE
104 m_startPoint = start;
208 sDescription +=
"Segment [";
210 sDescription +=
"-Infinity, ";
212 sprintf(buf,
"%.8f, ", m_startPoint);
216 sDescription +=
"+Infinity";
218 sprintf(buf,
"%.8f", m_endPoint);
221 sprintf(buf,
"]\nFunctionType: %04Xh\n", m_nFunctionType);
224 switch(m_nFunctionType) {
227 sprintf(buf,
"Y = %.8f\n\n", m_params[3]);
230 sprintf(buf,
"Y = X\n\n");
232 sprintf(buf,
"Y = %.8f * X + %.8f\n\n",
233 m_params[1], m_params[3]);
235 sprintf(buf,
"Y = (%.8f * X + %.8f)^%.4f + %.8f\n\n",
236 m_params[1], m_params[2], m_params[0], m_params[3]);
241 sprintf(buf,
"Y = %.8f * log (%.8f * (X ^ %.8f) + %.8f) + %.8f\n\n",
242 m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
247 sprintf(buf,
"Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\n\n",
248 m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
254 sprintf(buf,
"Y = %.8f\n\n", m_params[3]);
258 sprintf(buf,
"Y = X\n\n");
261 sprintf(buf,
"Y = %.8f * X + %.8f\n\n",
262 m_params[2], m_params[3]);
265 sprintf(buf,
"Y = %.8f * X + %.8f\n\n",
266 m_params[1], m_params[3]);
268 sprintf(buf,
"Y = %8f * (%.8f * X + %.8f)^%.4f + %.8f\n\n",
269 m_params[1], m_params[2], m_params[3], m_params[0], m_params[4]);
275 sprintf(buf,
"Y = %.8f * ln(%.8f * X^%8.f - %.8f) + %.8f\n\n",
276 m_params[1], m_params[4], m_params[0], m_params[2], m_params[3]);
278 sprintf(buf,
"Y = %.8f * ln(%.8f * X - %.8f) + %.8f\n\n",
279 m_params[1], m_params[4], m_params[2], m_params[3]);
286 sprintf(buf,
"Y = %.8f * exp((%.8f * X^%.8f - %.8f) / %.8f) + %.8f\n\n",
287 m_params[5], m_params[4], m_params[0], m_params[3], m_params[1], m_params[2]);
289 sprintf(buf,
"Y = %.8f * exp((%.8f * X - %.8f) / %.8f) + %.8f\n\n",
290 m_params[5], m_params[4], m_params[3], m_params[1], m_params[2]);
297 sprintf(buf,
"Y = %.8f * (max[(%.8f * X^%.8f - %.8f), 0] / (%.8f - %.8f * X^%.8f))^%.8f\n\n",
298 m_params[5], m_params[6], m_params[1], m_params[2], m_params[3], m_params[4], m_params[1], m_params[0]);
300 sprintf(buf,
"Y = %.8f * (max[(%.8f * X - %.8f), 0] / (%.8f - %.8f * X))^%.8f\n\n",
301 m_params[5], m_params[6], m_params[2], m_params[3], m_params[4], m_params[0]);
307 sprintf(buf,
"Y = %.8f * ((%.8f + %.8f * X^%.8f) / (1 + %.8f * X^%.8f))^%.8f\n\n",
308 m_params[5], m_params[2], m_params[3], m_params[1], m_params[4], m_params[1], m_params[0]);
310 sprintf(buf,
"Y = %.8f * ((%.8f + %.8f * X) / (1 + %.8f * X))^%.8f\n\n",
311 m_params[5], m_params[2], m_params[3], m_params[4], m_params[0]);
317 sprintf(buf,
"Unknown Function with %d parameters:\n\n", m_nParameters);
320 for (i=0; i<m_nParameters; i++) {
321 sprintf(buf,
"Param[%d] = %.8lf\n\n", i, m_params[i]);
343 if (num_parameters) {
346 memcpy(m_params, parameters, num_parameters *
sizeof(
icFloatNumber));
351 m_nFunctionType = functionType;
352 m_nParameters = num_parameters;
374 if (headerSize > size)
384 if (!pIO->
Read32(&m_nReserved))
387 if (!pIO->
Read16(&m_nFunctionType))
390 if (!pIO->
Read16(&m_nReserved2))
397 switch(m_nFunctionType) {
458 if (!pIO->
Write32(&m_nReserved))
461 if (!pIO->
Write16(&m_nFunctionType))
464 if (!pIO->
Write16(&m_nReserved2))
467 switch(m_nFunctionType) {
469 if (m_nParameters!=4)
477 if (m_nParameters!=5)
483 if (m_nParameters != 6)
488 if (m_nParameters != 7)
513 switch (m_nFunctionType) {
515 if (!m_params || m_nParameters<4)
521 else if (
icIsNear(m_params[2], 0.0))
523 else if (
icIsNear(m_params[3], 0.0))
535 if (!m_params || m_nParameters<5)
542 if (!m_params || m_nParameters < 5)
546 if (!m_params || m_nParameters < 5)
558 if (!m_params || m_nParameters < 6)
570 if (!m_params || m_nParameters < 7)
582 if (!m_params || m_nParameters < 6)
620 switch (m_nFunctionType) {
623 switch (m_nShortcutType) {
626 return (
icFloatNumber)(pow(m_params[1] * v + m_params[2], m_params[0]) + m_params[3]);
628 return (m_params[1] * v);
630 return (m_params[1] * v + m_params[3]);
632 return (m_params[1] * v + m_params[2]);
634 return (m_params[1] * v + m_params[2] + m_params[3]);
639 return (
icFloatNumber)(m_params[1] * log10(m_params[2] * pow(v, m_params[0]) + m_params[3]) + m_params[4]);
643 return (
icFloatNumber)(m_params[0] * pow(m_params[1], m_params[2] * v + m_params[3]) + m_params[4]);
647 return (
icFloatNumber)(m_params[1] *
clipPow(m_params[2] * v + m_params[3], m_params[0]) + m_params[4]);
651 if (m_nShortcutType != 1)
652 return (
icFloatNumber)(m_params[1] * log(m_params[4] * pow(v, m_params[0]) - m_params[2]) + m_params[3]);
654 return (
icFloatNumber)(m_params[1] * log(m_params[4] * v - m_params[2]) + m_params[3]);
658 if (m_nShortcutType != 1)
659 return (
icFloatNumber)(m_params[5] * exp((m_params[4] * pow(v, m_params[0]) - m_params[3]) / m_params[1]) + m_params[2]);
661 return (
icFloatNumber)(m_params[5] * exp((m_params[4] * v - m_params[3]) / m_params[1]) + m_params[2]);
665 if (m_nShortcutType!=1) {
667 (m_params[3] - m_params[4] * pow(v, m_params[1])), m_params[0]));
671 (m_params[3] - m_params[4] * v), m_params[0]));
676 if (m_nShortcutType != 1) {
677 return (
icFloatNumber)(m_params[5] * pow((m_params[2] + m_params[3] * pow(v, m_params[1])) /
678 (1.0 + m_params[4] * pow(v, m_params[1])), m_params[0]));
681 return (
icFloatNumber)(m_params[5] * pow((m_params[2] + m_params[3] * v) /
682 (1.0 + m_params[4] * v), m_params[0]));
706 if (m_nReserved || m_nReserved2) {
708 sReport += sSigPathName;
709 sReport +=
" formula curve has non zero reserved data.\n";
713 switch (m_nFunctionType) {
715 if (!m_params || m_nParameters<4) {
717 sReport += sSigPathName;
718 sReport +=
" formula curve has Invalid formulaCurveSegment parameters.\n";
721 else if (m_nParameters > 4) {
723 sReport += sSigPathName;
724 sReport +=
" formula curve has too many formulaCurveSegment parameters.\n";
730 if (!m_params || m_nParameters<5) {
732 sReport += sSigPathName;
733 sReport +=
" formula curve has Invalid formulaCurveSegment parameters.\n";
736 else if (m_nParameters > 5) {
738 sReport += sSigPathName;
739 sReport +=
" formula curve has too many formulaCurveSegment parameters.\n";
745 if (!m_params || m_nParameters<5) {
747 sReport += sSigPathName;
748 sReport +=
" formula curve has Invalid formulaCurveSegment parameters.\n";
751 else if (m_nParameters > 5) {
753 sReport += sSigPathName;
754 sReport +=
" formula curve has too many formulaCurveSegment parameters.\n";
760 if (!m_params || m_nParameters<5) {
762 sReport += sSigPathName;
763 sReport +=
" formula curve has Invalid formulaCurveSegment parameters.\n";
766 else if (m_nParameters > 5) {
768 sReport += sSigPathName;
769 sReport +=
" formula curve has too many formulaCurveSegment parameters.\n";
775 if (!m_params || m_nParameters < 5) {
777 sReport += sSigPathName;
778 sReport +=
" formula curve has Invalid formulaCurveSegment parameters.\n";
781 else if (m_nParameters > 5) {
783 sReport += sSigPathName;
784 sReport +=
" formula curve has too many formulaCurveSegment parameters.\n";
790 if (!m_params || m_nParameters < 6) {
792 sReport += sSigPathName;
793 sReport +=
" formula curve has Invalid formulaCurveSegment parameters.\n";
796 else if (m_nParameters > 6) {
798 sReport += sSigPathName;
799 sReport +=
" formula curve has too many formulaCurveSegment parameters.\n";
805 if (!m_params || m_nParameters < 6) {
807 sReport += sSigPathName;
808 sReport +=
" formula curve has Invalid formulaCurveSegment parameters.\n";
811 else if (m_nParameters > 6) {
813 sReport += sSigPathName;
814 sReport +=
" formula curve has too many formulaCurveSegment parameters.\n";
820 if (!m_params || m_nParameters < 6) {
822 sReport += sSigPathName;
823 sReport +=
" formula curve has Invalid formulaCurveSegment parameters.\n";
826 else if (m_nParameters > 6) {
828 sReport += sSigPathName;
829 sReport +=
" formula curve has too many formulaCurveSegment parameters.\n";
838 sReport += sSigPathName;
839 sprintf(buf,
" formula curve uses unknown formulaCurveSegment function type %d\n", m_nFunctionType);
861 m_startPoint = start;
863 m_range = end - start;
884 m_range = m_endPoint - m_startPoint;
991 return (m_pSamples != NULL);
1009 sDescription +=
"Empty Segment [";
1011 sDescription +=
"-Infinity, ";
1013 sprintf(buf,
"%.8f, ", m_startPoint);
1014 sDescription += buf;
1017 sDescription +=
"+Infinity";
1019 sprintf(buf,
"%.8f", m_endPoint);
1020 sDescription += buf;
1023 sprintf(buf,
"]\n");
1024 sDescription += buf;
1027 sDescription +=
"Sampled Segment [";
1029 sDescription +=
"-Infinity, ";
1031 sprintf(buf,
"%.8f, ", m_startPoint);
1032 sDescription += buf;
1035 sDescription +=
"+Infinity";
1037 sprintf(buf,
"%.8f", m_endPoint);
1038 sDescription += buf;
1040 sprintf(buf,
"]\n");
1041 sDescription += buf;
1042 sDescription +=
"IN OUT\n";
1049 for (i=1; i<m_nCount; i++) {
1050 sprintf(buf,
"%.8f %.8f\n", m_startPoint + (
icFloatNumber)i*range/last, m_pSamples[i]);
1051 sDescription += buf;
1054 sDescription +=
"\n";
1075 if (headerSize > size)
1085 if (!pIO->
Read32(&m_nReserved))
1088 if (!pIO->
Read32(&m_nCount))
1091 if (m_nCount > size - headerSize || m_nCount *
sizeof(
icFloat32Number) > size - headerSize)
1097 if (!SetSize(m_nCount,
false))
1131 if (!pIO->
Write32(&m_nReserved))
1137 nCount = m_nCount -1;
1168 m_range = m_endPoint - m_startPoint;
1171 if (m_endPoint-m_startPoint == 0.0)
1178 m_pSamples[0] = pPrevSeg->Apply(m_startPoint);
1197 else if (v>m_endPoint)
1205 return m_pSamples[index];
1207 return (
icFloatNumber)((1.0-remainder)*m_pSamples[index] + remainder*m_pSamples[index+1]);
1228 sReport += sSigPathName;
1229 sReport +=
" sampled curve has non zero reserved data.\n";
1235 sReport += sSigPathName;
1236 sReport +=
" sampled curve has too few sample points.\n";
1239 else if (m_endPoint-m_startPoint == 0.0) {
1241 sReport += sSigPathName;
1242 sReport +=
" sampled curve has a range of zero.\n";
1272 m_firstEntry = first;
1276 m_firstEntry = last;
1277 m_lastEntry = first;
1280 m_range = m_lastEntry - m_firstEntry;
1283 m_hiIntercept = 1.0;
1318 m_range = m_lastEntry - m_firstEntry;
1398 m_firstEntry = first;
1402 m_firstEntry = last;
1403 m_lastEntry = first;
1423 m_extensionType = nExtensionType;
1425 switch (nExtensionType) {
1448 m_storageType = nStorateType;
1450 switch (nStorateType) {
1499 return (m_pSamples != NULL);
1517 sDescription +=
"Empty Single Sampled Curve [";
1518 sprintf(buf,
"%.8f, ", m_firstEntry);
1519 sDescription += buf;
1521 sprintf(buf,
"%.8f", m_lastEntry);
1522 sDescription += buf;
1524 sprintf(buf,
"]\n");
1525 sDescription += buf;
1528 sDescription +=
"Single Sampled Curve [";
1530 sprintf(buf,
"%.8f, ", m_firstEntry);
1531 sDescription += buf;
1533 sprintf(buf,
"%.8f", m_lastEntry);
1534 sDescription += buf;
1536 sprintf(buf,
"]\n");
1537 sDescription += buf;
1539 switch(m_storageType) {
1541 sDescription +=
"UInt8Number Array\n";
1544 sDescription +=
"UInt16Number Array\n";
1547 sDescription +=
"Float16Number Array\n";
1550 sDescription +=
"Float32Number Array\n";
1553 sDescription +=
"Unknown Data Type\n";
1557 switch(m_extensionType) {
1559 sDescription +=
"Clip End Points\n";
1562 sDescription +=
"Extend End Points\n";
1565 sDescription +=
"Unknown extension handling\n";
1568 sDescription +=
"IN OUT\n";
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;
1580 sDescription +=
"\n";
1605 if (headerSize > size)
1615 if (!pIO->
Read32(&m_nReserved))
1618 if (!pIO->
Read32(&m_nCount))
1627 if (!pIO->
Read16(&m_extensionType))
1630 if (!pIO->
Read16(&m_storageType))
1633 if (!SetSize(m_nCount,
false))
1636 if (m_nCount > size - headerSize)
1640 switch(m_storageType) {
1649 if (m_nCount * 2 > size - headerSize)
1656 if (m_nCount * 2 > size - headerSize)
1697 if (!pIO->
Write32(&m_nReserved))
1709 if (!pIO->
Write16(&m_extensionType))
1712 if (!pIO->
Write16(&m_storageType))
1717 switch(m_storageType) {
1757 m_range = m_lastEntry - m_firstEntry;
1764 switch(m_extensionType) {
1767 m_loIntercept = m_pSamples[0];
1770 m_hiIntercept = m_pSamples[m_nCount-1];
1774 m_loSlope = (m_pSamples[1]-m_pSamples[0])/stepSize;
1775 m_loIntercept = m_pSamples[0] - m_loSlope*m_firstEntry;
1777 m_hiSlope = (m_pSamples[m_nCount-1] - m_pSamples[m_nCount-2])/stepSize;
1778 m_hiIntercept = m_pSamples[m_nCount-1] - m_hiSlope*m_lastEntry;
1800 if (v<m_firstEntry) {
1801 return m_loSlope * v + m_loIntercept;;
1803 else if (v>m_lastEntry) {
1804 return m_hiSlope * v + m_hiIntercept;
1812 return m_pSamples[index];
1814 return (
icFloatNumber)((1.0-remainder)*m_pSamples[index] + remainder*m_pSamples[index+1]);
1835 sReport += sSigPathName;
1836 sReport +=
" single sampled curve has non zero reserved data.\n";
1842 sReport += sSigPathName;
1843 sReport +=
" single sampled curve has unknown extension type\n";
1849 sReport += sSigPathName;
1850 sReport +=
" single sampled curve uses unknown value type\n";
1856 sReport += sSigPathName;
1857 sReport +=
" single sampled curve has too few sample points.\n";
1861 if (m_lastEntry-m_firstEntry <= 0.0) {
1863 sReport += sSigPathName;
1864 sReport +=
" single sampled curve has an invalid sample range.\r\n";
1895 m_firstEntry = first;
1899 m_firstEntry = last;
1900 m_lastEntry = first;
1905 m_hiIntercept = 1.0;
2037 m_firstEntry = first;
2041 m_firstEntry = last;
2042 m_lastEntry = first;
2062 m_extensionType = nExtensionType;
2064 switch (nExtensionType) {
2116 m_nDesiredSize = nSize;
2160 return (m_pSamples != NULL);
2178 sDescription +=
"Empty Sampled Calculator Curve [";
2179 sprintf(buf,
"%.8f, ", m_firstEntry);
2180 sDescription += buf;
2182 sprintf(buf,
"%.8f,", m_lastEntry);
2183 sDescription += buf;
2185 sprintf(buf,
"%d", m_nDesiredSize);
2186 sDescription += buf;
2188 sprintf(buf,
"]\r\n");
2189 sDescription += buf;
2192 sDescription +=
"Sampled Calculator Curve [";
2194 sprintf(buf,
"%.8f, ", m_firstEntry);
2195 sDescription += buf;
2197 sprintf(buf,
"%.8f,", m_lastEntry);
2198 sDescription += buf;
2200 sprintf(buf,
"%d", m_nDesiredSize);
2201 sDescription += buf;
2203 sprintf(buf,
"]\r\n");
2204 sDescription += buf;
2206 switch (m_extensionType) {
2208 sDescription +=
"Clip End Points\n";
2211 sDescription +=
"Extend End Points\n";
2214 sDescription +=
"Unknown extension handling\n";
2217 m_pCalc->Describe(sDescription, nVerboseness);
2219 sDescription +=
"\r\n";
2244 if (headerSize >= size)
2254 if (!pIO->
Read32(&m_nReserved))
2257 if (!pIO->
Read32(&m_nDesiredSize))
2266 if (!pIO->
Read16(&m_extensionType))
2269 if (!pIO->
Read16(&m_nReserved2))
2275 if (!m_pCalc->Read(size - headerSize, pIO))
2301 if (!pIO->
Write32(&m_nReserved))
2304 if (!pIO->
Write32(&m_nDesiredSize))
2313 if (!pIO->
Write16(&m_extensionType))
2316 if (!pIO->
Write16(&m_nReserved2))
2319 if (m_pCalc && m_pCalc->Write(pIO)) {
2338 if (m_nDesiredSize < 2 || !m_pCalc || !m_pCalc->Begin(nInterp, pMPE))
2349 m_range = m_lastEntry - m_firstEntry;
2363 m_pCalc->
Apply(pApply, &dst, &src);
2364 m_pSamples[i] = dst;
2370 switch (m_extensionType) {
2373 m_loIntercept = m_pSamples[0];
2376 m_hiIntercept = m_pSamples[m_nCount - 1];
2380 m_loSlope = (m_pSamples[1] - m_pSamples[0]) / stepSize;
2381 m_loIntercept = m_pSamples[0] - m_loSlope*m_firstEntry;
2383 m_hiSlope = (m_pSamples[m_nCount - 1] - m_pSamples[m_nCount - 2]) / stepSize;
2384 m_hiIntercept = m_pSamples[m_nCount - 1] - m_hiSlope*m_lastEntry;
2406 if (v < m_firstEntry) {
2407 return m_loSlope * v + m_loIntercept;;
2409 else if (v > m_lastEntry) {
2410 return m_hiSlope * v + m_hiIntercept;
2417 if (remainder == 0.0)
2418 return m_pSamples[index];
2420 return (
icFloatNumber)((1.0 - remainder)*m_pSamples[index] + remainder*m_pSamples[index + 1]);
2439 if (m_nReserved || m_nReserved2) {
2441 sReport += sSigPathName;
2442 sReport +=
" sampled calculator curve has non zero reserved data.\r\n";
2448 sReport += sSigPathName;
2449 sReport +=
" sampled calculator curve has unknown extension type\r\n";
2453 if (m_nDesiredSize < 2) {
2455 sReport += sSigPathName;
2456 sReport +=
" sampled calculator curve has too few desired sample points.\r\n";
2460 if (m_lastEntry - m_firstEntry <= 0.0) {
2462 sReport += sSigPathName;
2463 sReport +=
" sampled calculator curve has an invalid sample range.\n";
2469 sReport += sSigPathName;
2470 sReport +=
" sampled calculator curve is not supported by version of profile.\n";
2476 sReport += sSigPathName;
2477 sReport +=
" sampled calculator curve has no calculator element\r\n";
2481 icValidateStatus stat = m_pCalc->Validate(sSigPathName, sReport, pMPE, pProfile);
2544 CIccCurveSegmentList::iterator i;
2548 for (i=curve.
m_list->begin(); i!=curve.
m_list->end(); i++) {
2549 m_list->push_back((*i)->NewCopy());
2570 CIccCurveSegmentList::iterator i;
2572 for (i=curve.
m_list->begin(); i!=curve.
m_list->end(); i++) {
2573 m_list->push_back((*i)->NewCopy());
2611 CIccCurveSegmentList::iterator i;
2613 sDescription +=
"BEGIN_CURVE\n";
2614 for (i=m_list->begin(); i!=m_list->end(); i++) {
2615 (*i)->Describe(sDescription, nVerboseness);
2642 if (headerSize > size)
2655 if (!pIO->
Read32(&m_nReserved1))
2660 if (!pIO->
Read16(&nSegments))
2663 if (!pIO->
Read16(&m_nReserved2))
2673 if (
sizeof(segSig) > size - headerSize)
2676 if (!pIO->
Read32(&segSig))
2684 if (!pSeg->
Read(size-(pos-startPos), pIO)) {
2689 m_list->push_back(pSeg);
2691 else if (nSegments) {
2692 if (nSegments > size - headerSize)
2706 for (i=0; i<nSegments; i++) {
2708 if (!pIO->
Read32(&segSig)) {
2717 else if (i==nSegments-1)
2727 if (!pSeg->
Read(size-(pos-startPos), pIO)) {
2733 m_list->push_back(pSeg);
2763 if (!pIO->
Write32(&m_nReserved1))
2768 if (!pIO->
Write16(&nSegments))
2771 if (!pIO->
Write16(&m_nReserved2))
2774 CIccCurveSegmentList::iterator i;
2779 for (i++; i!=m_list->end(); i++) {
2780 breakpoint = (*i)->StartPoint();
2785 for (i=m_list->begin(); i!=m_list->end(); i++) {
2786 if (!(*i)->Write(pIO))
2806 CIccCurveSegmentList::iterator i;
2808 for (i=m_list->begin(); i!=m_list->end(); i++) {
2827 CIccCurveSegmentList::reverse_iterator last = m_list->rbegin();
2829 if (last!=m_list->rend()) {
2830 if (pCurveSegment->
StartPoint() == (*last)->EndPoint()) {
2831 m_list->push_back(pCurveSegment);
2836 m_list->push_back(pCurveSegment);
2856 if (m_list->size()==0)
2859 CIccCurveSegmentList::iterator i;
2862 for (i=m_list->begin(); i!=m_list->end(); i++) {
2863 if (!(*i)->Begin(pLast))
2884 CIccCurveSegmentList::iterator i;
2886 for (i=m_list->begin(); i!=m_list->end(); i++) {
2887 if (v <= (*i)->EndPoint())
2888 return (*i)->
Apply(v);
2909 if (m_nReserved1 || m_nReserved2) {
2911 sReport += sSigPathName;
2912 sReport +=
" Segmented curve has non zero reserved data.\n";
2916 if (m_list->size()==0) {
2918 sReport += sSigPathName;
2919 sReport +=
" Has Empty CurveSegment!\n";
2923 CIccCurveSegmentList::iterator i;
2925 for (i=m_list->begin(); i!=m_list->end(); i++) {
2971 m_nInputChannels = m_nOutputChannels = nSize;
2976 m_nInputChannels = m_nOutputChannels = 0;
2982typedef std::map<icCurveSetCurvePtr, icCurveSetCurvePtr>
icCurveMap;
3006 for (i=0; i<m_nInputChannels; i++) {
3011 map[ptr] = m_curve[i];
3014 m_curve[i] = map[ptr];
3019 m_nInputChannels = m_nOutputChannels = 0;
3036 m_nReserved = m_nReserved;
3050 for (i=0; i<m_nInputChannels; i++) {
3055 map[ptr] = m_curve[i];
3058 m_curve[i] = map[ptr];
3063 m_nInputChannels = m_nOutputChannels = 0;
3101 for (i=0; i<m_nInputChannels; i++) {
3102 if (!map[m_curve[i]]) {
3118 m_nInputChannels = m_nOutputChannels = 0;
3128 m_nInputChannels = m_nOutputChannels = 0;
3131 m_nInputChannels = m_nOutputChannels = nNewSize;
3135 m_nInputChannels = m_nOutputChannels = 0;
3153 if (nIndex<0 || nIndex>m_nInputChannels)
3159 for (i=0; i<m_nInputChannels; i++)
3160 if (i!=nIndex && m_curve[i]==m_curve[nIndex])
3163 if (i==m_nInputChannels && m_curve[nIndex]) {
3164 delete m_curve[nIndex];
3167 m_curve[nIndex] = newCurve;
3189 sprintf(buf,
"BEGIN_CURVE_SET %d\n", m_nInputChannels);
3190 sDescription += buf;
3192 for (i=0; i<m_nInputChannels; i++) {
3193 sprintf(buf,
"Curve %d of %d\n", i+1, m_nInputChannels);
3194 sDescription += buf;
3196 m_curve[i]->Describe(sDescription, nVerboseness);
3199 sDescription +=
"END_CURVE_SET\n";
3227 if (headerSize > size)
3239 if (!pIO->
Read32(&m_nReserved))
3242 if (!pIO->
Read16(&nInputChannels))
3245 if (!pIO->
Read16(&nOutputChannels))
3248 if (nInputChannels != nOutputChannels)
3251 if (nInputChannels > size - headerSize || nInputChannels * 2*
sizeof(
icUInt32Number) > size - headerSize)
3254 if (!SetSize(nInputChannels))
3260 if (headerSize + m_nInputChannels*2*
sizeof(
icUInt32Number) > size)
3263 for (i=0; i<m_nInputChannels; i++) {
3264 if (!pIO->
Read32(&m_position[i].offset)) {
3267 if (!pIO->
Read32(&m_position[i].size)) {
3274 for (i=0; i<m_nInputChannels; i++) {
3275 if (!map[m_position[i].offset]) {
3277 if (!m_position[i].offset || !m_position[i].size) {
3281 pos = startPos + m_position[i].offset;
3286 if (!pIO->
Read32(&curveSig)) {
3299 if (!m_curve[i]->Read(m_position[i].size, pIO)) {
3303 map[m_position[i].offset] = m_curve[i];
3306 m_curve[i] = map[m_position[i].offset];
3336 if (!pIO->
Write32(&m_nReserved))
3339 if (!pIO->
Write16(&m_nInputChannels))
3342 if (!pIO->
Write16(&m_nInputChannels))
3345 if (m_curve && m_nInputChannels) {
3355 for (i=0; i<m_nInputChannels; i++) {
3356 if (pIO->
Write32(&zeros[0], 2)!=2)
3361 for (i=0; i<m_nInputChannels; i++) {
3363 if (map.find(m_curve[i])==map.end()) {
3364 start = pIO->
Tell();
3365 m_curve[i]->Write(pIO);
3368 position.
offset = start - elemStart;
3369 position.
size = end - start;
3370 map[m_curve[i]] = position;
3372 m_position[i] = map[m_curve[i]];
3379 for (i=0; i<m_nInputChannels; i++) {
3380 if (!pIO->
Write32(&m_position[i].offset))
3382 if (!pIO->
Write32(&m_position[i].size))
3410 for (i=0; i<m_nInputChannels; i++) {
3414 if (!map[m_curve[i]]) {
3415 if (!m_curve[i]->Begin(nInterp, pMPE)) {
3439 for (i=0; i<m_nInputChannels; i++) {
3440 *pDestPixel++ = m_curve[i]->Apply(*pSrcPixel++);
3456 std::string mpeSigPath = sigPath +
icGetSigPath(GetType());
3462 for (i=0; !empty && i<m_nInputChannels; i++) {
3467 rv =
icMaxStatus(rv, m_curve[i]->Validate(mpeSigPath, sReport, pMPE, pProfile));
3479 sReport += sSigPathName;
3480 sReport +=
" - Has Empty Curve Element(s)!\n";
3500 m_nInputChannels = 1;
3501 m_nOutputChannels = nVectorSize;
3505typedef std::map<icCurveSetCurvePtr, icCurveSetCurvePtr>
icCurveMap;
3541 m_nReserved = m_nReserved;
3584 m_nOutputChannels = nVectorSize;
3621 sprintf(buf,
"BEGIN_TINT_ARRAY %d\n", m_nOutputChannels);
3622 sDescription += buf;
3624 m_Array->Describe(sDescription, nVerboseness);
3626 sDescription +=
"END_TINT_ARRAY\n";
3667 if (!pIO->
Read32(&m_nReserved))
3670 if (!pIO->
Read16(&nInputChannels))
3673 if (!pIO->
Read16(&nOutputChannels))
3676 if (nInputChannels != 1 || !nOutputChannels)
3679 m_nInputChannels = nInputChannels;
3680 m_nOutputChannels = nOutputChannels;
3685 if (!pIO->
Read32(&tagType))
3698 if (!m_Array->Read(size-headerSize, pIO)) {
3703 if (nVals/m_nOutputChannels <2 || (nVals%m_nOutputChannels) != 0) {
3733 if (!pIO->
Write32(&m_nReserved))
3736 if (!pIO->
Write16(&m_nInputChannels))
3739 if (!pIO->
Write16(&m_nOutputChannels))
3742 return m_Array->Write(pIO);
3762 if (nVals/m_nOutputChannels<2 || nVals % m_nOutputChannels != 0)
3781 m_Array->Interpolate(pDestPixel, *pSrcPixel, m_nOutputChannels);
3784 memset(pDestPixel, 0, m_nOutputChannels*
sizeof(
icFloatNumber));
3799 std::string mpeSigPath = sigPath +
icGetSigPath(GetType());
3802 if (m_nInputChannels!=1) {
3807 sReport += sSigPathName;
3808 sReport +=
" - Bad number of input channels!\n";
3812 if (!m_nOutputChannels) {
3817 sReport += sSigPathName;
3818 sReport +=
" - Bad number of output channels!\n";
3827 sReport += sSigPathName;
3828 sReport +=
" - Has no tint values(s)!\n";
3850 if ((nVals % m_nOutputChannels)!=0) {
3855 sReport += sSigPathName;
3856 sReport +=
" - Array size must be multiple of output channels!\n";
3870 m_nFunctionType = 0;
3886 if (&toneMapFunc ==
this)
3920 if (m_nFunctionType == 0)
3927 m_nFunctionType = nFunc;
3932 int nArgs = NumArgs();
3934 if (nArgs && pParams) {
3940 return nParams == NumArgs();
3947 sprintf(buf,
"ToneFunctionType: %04Xh\n", m_nFunctionType);
3948 sDescription += buf;
3950 switch (m_nFunctionType) {
3952 sprintf(buf,
"Y = %.8f * M * ( X + %.8f) + %.8f\n\n", m_params[0], m_params[1], m_params[2]);
3953 sDescription += buf;
3958 sprintf(buf,
"Unknown Function with %d parameters:\n\n", m_nParameters);
3959 sDescription += buf;
3961 for (i = 0; i < m_nParameters; i++) {
3962 sprintf(buf,
"Param[%d] = %.8lf\n\n", i, m_params[i]);
3963 sDescription += buf;
3978 if (headerSize > size)
3991 if (!pIO->
Read32(&m_nReserved))
3994 if (!pIO->
Read16(&m_nFunctionType))
3997 if (!pIO->
Read16(&m_nReserved2))
4006 if (m_nParameters) {
4033 if (!pIO->
Write32(&m_nReserved))
4036 if (!pIO->
Write16(&m_nFunctionType))
4039 if (!pIO->
Write16(&m_nReserved2))
4043 if (m_nParameters != NumArgs())
4046 if (m_nParameters) {
4057 if (m_nFunctionType != 0x0000)
4060 if (m_nParameters < NumArgs() || !m_params)
4068 if (!m_nFunctionType && m_params) {
4069 return m_params[0] * lumValue * (pixelValue + m_params[1]) + m_params[2];
4081 if (m_nReserved || m_nReserved2) {
4083 sReport +=
" formula curve has non zero reserved data.\n";
4087 switch (m_nFunctionType) {
4089 if (!m_params || m_nParameters < 3) {
4091 sReport +=
" Tone mapping function has invalid parameters.\n";
4094 else if (m_nParameters > 3) {
4096 sReport +=
" tone mapping function has too many formulaCurveSegment parameters.\n";
4105 sprintf(buf,
" tone mapping function uses unknown function type %d\n", m_nFunctionType);
4130 m_nInputChannels = nOutputChannels + 1;
4131 m_nOutputChannels = nOutputChannels;
4133 m_pToneFuncs = NULL;
4135 SetNumOutputChannels(nOutputChannels);
4163 m_pToneFuncs = NULL;
4178 if (&toneMap ==
this)
4200 m_pToneFuncs = NULL;
4235 if (!m_pToneFuncs || m_nOutputChannels==0)
4242 rv[0] = m_pToneFuncs[0] ? m_pToneFuncs[0]->
NewCopy() : NULL;
4245 for (
int i = 1; i < m_nOutputChannels; i++) {
4246 for (j = 0; j < i; j++)
4247 if (m_pToneFuncs[j] == m_pToneFuncs[i])
4252 rv[i] = m_pToneFuncs[i] ? m_pToneFuncs[i]->
NewCopy() : NULL;
4273 if (m_nOutputChannels) {
4274 if (m_pToneFuncs[0])
4275 delete m_pToneFuncs[0];
4278 for (
int i = 1; i < m_nOutputChannels; i++) {
4279 for (j = 0; j < i; j++)
4280 if (m_pToneFuncs[j] == m_pToneFuncs[i])
4282 if (j == i && m_pToneFuncs[i])
4283 delete m_pToneFuncs[i];
4288 m_pToneFuncs = NULL;
4304 if (pLumCurve == m_pLumCurve)
4310 m_pLumCurve = pLumCurve;
4327 m_nOutputChannels = nVectorSize;
4328 if (m_nOutputChannels) {
4347 if (!m_pToneFuncs || m_nFunc >= m_nOutputChannels)
4350 m_pToneFuncs[m_nFunc++] = pToneMapFunc;
4370 sprintf(buf,
"BEGIN_TONE_MAP %d\n", m_nOutputChannels);
4371 sDescription += buf;
4374 sDescription +=
"LUM_FUNCTION:\n";
4375 m_pLumCurve->Describe(sDescription, nVerboseness);
4379 for (
int i = 0; i < m_nOutputChannels; i++) {
4380 sprintf(buf,
"TONE_FUNCTION_%d:\n", i);
4381 sDescription += buf;
4382 if (m_pToneFuncs[i])
4383 m_pToneFuncs[i]->Describe(sDescription, nVerboseness);
4387 sDescription +=
"END_TINT_ARRAY\n";
4430 if (!pIO->
Read32(&m_nReserved))
4433 if (!pIO->
Read16(&nInputChannels))
4436 if (!pIO->
Read16(&nOutputChannels))
4439 if (nInputChannels != nOutputChannels+1 || !nOutputChannels)
4442 m_nInputChannels = nInputChannels;
4443 SetNumOutputChannels(nOutputChannels);
4455 if (lumPos.
size <
sizeof(curveSig))
4459 if (!pIO->
Read32(&curveSig))
4469 if (!pCurve->
Read(lumPos.
size, pIO)) {
4473 SetLumCurve(pCurve);
4492 for (
int i = 0; i < m_nOutputChannels; i++) {
4494 !pIO->
Read32(&funcPos[i].size) ||
4504 for (j = 0; j < i; j++) {
4513 m_pToneFuncs[0] = NewToneMapFunc();
4514 if (!m_pToneFuncs[0]) {
4519 if (!m_pToneFuncs[0]->Read(funcPos[0].size, pIO)) {
4524 for (
int i = 1; i < m_nOutputChannels; i++) {
4525 for (j = 0; j < i; i++) {
4526 if (funcPos[j].offset == funcPos[i].offset)
4530 m_pToneFuncs[i] = m_pToneFuncs[j];
4532 m_pToneFuncs[i] = NewToneMapFunc();
4533 if (!m_pToneFuncs[i]) {
4538 if (!m_pToneFuncs[i]->Read(funcPos[i].size, pIO)) {
4546 m_nFunc = m_nOutputChannels;
4563 if (!m_pLumCurve || !m_pToneFuncs || !m_nOutputChannels)
4576 if (!pIO->
Write32(&m_nReserved))
4579 if (!pIO->
Write16(&m_nInputChannels))
4582 if (!pIO->
Write16(&m_nOutputChannels))
4594 for (
int i = 0; i < m_nOutputChannels; i++) {
4604 if (!m_pLumCurve->Write(pIO))
4616 funcPos[0].
offset = pIO->
Tell() - nTagStartPos;
4617 if (!m_pToneFuncs[0]->Write(pIO)) {
4621 funcPos[0].
size = pIO->
Tell() - (funcPos[0].
offset + nTagStartPos);
4624 for (
int i = 1; i < m_nOutputChannels; i++) {
4625 for (j = 0; j < i; j++)
4626 if (m_pToneFuncs[j] == m_pToneFuncs[i])
4629 funcPos[i] = funcPos[j];
4632 funcPos[i].
offset = pIO->
Tell() - nTagStartPos;
4633 if (!m_pToneFuncs[i]->Write(pIO)) {
4637 funcPos[i].
size = pIO->
Tell() - (funcPos[i].
offset + nTagStartPos);
4655 for (
int i = 0; i < m_nOutputChannels; i++) {
4657 !pIO->
Write32(&funcPos[i].size)) {
4682 if (!m_pLumCurve || !m_pToneFuncs)
4685 if (!m_pLumCurve->Begin(nInterp, pMPE))
4688 if (!m_pToneFuncs[0] || !m_pToneFuncs[0]->Begin())
4692 for (
int i=1; i<m_nOutputChannels; i++) {
4693 for (j = 0; j < i; j++)
4694 if (m_pToneFuncs[j] == m_pToneFuncs[i])
4696 if (j==i && (!m_pToneFuncs[i] || !m_pToneFuncs[i]->Begin()))
4715 icFloatNumber lum = m_pLumCurve->Apply(pSrcPixel[m_nOutputChannels]);
4716 for (
int i = 0; i < m_nOutputChannels; i++) {
4717 pDestPixel[i] = m_pToneFuncs[i]->Apply(lum, pSrcPixel[i]);
4733 std::string mpeSigPath = sigPath +
icGetSigPath(GetType());
4736 if (m_nInputChannels != m_nOutputChannels + 1) {
4741 sReport += sSigPathName;
4742 sReport +=
" - Bad number of input channels!\n";
4746 if (!m_nOutputChannels) {
4751 sReport += sSigPathName;
4752 sReport +=
" - Bad number of output channels!\n";
4761 sReport += sSigPathName;
4762 sReport +=
" - Has no luminance mapping curve!\n";
4766 rv =
icMaxStatus(rv, m_pLumCurve->Validate(mpeSigPath, sReport, pMPE, pProfile));
4769 if (!m_pToneFuncs) {
4774 sReport += sSigPathName;
4775 sReport +=
" - Has no tone mapping functions!\n";
4779 for (
int i = 0; i < m_nOutputChannels; i++) {
4780 std::string funcReport;
4782 sprintf(buf,
"#%d", i);
4783 if (!m_pToneFuncs[i]) {
4788 sReport += sSigPathName;
4789 sReport += std::string(
" - Missing Tone function #") + buf +
"\n";
4800 sReport += sSigPathName;
4801 sReport += std::string(
" - Tone Function #") + buf +
" status:\n" + funcReport;
4826 m_nInputChannels = m_nOutputChannels = 0;
4829 m_pConstants = NULL;
4854 memcpy(m_pMatrix, matrix.
m_pMatrix, num);
4865 m_pConstants = NULL;
4867 m_bApplyConstants =
true;
4894 memcpy(m_pMatrix, matrix.
m_pMatrix, num);
4908 m_pConstants = NULL;
4952 m_pConstants = NULL;
4963 if (bUseConstants) {
4970 m_nInputChannels = nInputChannels;
4971 m_nOutputChannels = nOutputChannels;
4992 sprintf(buf,
"BEGIN_ELEM_MATRIX %d %d\n", m_nInputChannels, m_nOutputChannels);
4993 sDescription += buf;
4995 for (j=0; j<m_nOutputChannels; j++) {
4997 for (i=0; i<m_nInputChannels; i++) {
4999 sDescription +=
" ";
5000 sprintf(buf,
"%12.8lf", data[i]);
5001 sDescription += buf;
5004 sprintf(buf,
" + %12.8lf\n", m_pConstants[j]);
5005 sDescription += buf;
5010 sprintf(buf,
"ZeroRow + %12.8lf\n", m_pConstants[j]);
5011 sDescription += buf;
5014 sDescription +=
"END_ELEM_MATRIX\n";
5036 if (headerSize > size)
5050 if (!pIO->
Read32(&m_nReserved))
5053 if (!pIO->
Read16(&nInputChannels))
5056 if (!pIO->
Read16(&nOutputChannels))
5062 if (!SetSize(nInputChannels, nOutputChannels,
false))
5075 if (!SetSize(0, nOutputChannels))
5078 m_nInputChannels = nInputChannels;
5081 if (pIO->
ReadFloat32Float(m_pConstants, m_nOutputChannels)!=m_nOutputChannels)
5086 ((
icUInt32Number)nInputChannels*nOutputChannels + nOutputChannels) > dataSize ||
5091 if (!SetSize(nInputChannels, nOutputChannels))
5105 if (pIO->
ReadFloat32Float(m_pConstants, m_nOutputChannels)!=m_nOutputChannels)
5132 if (!pIO->
Write32(&m_nReserved))
5135 if (!pIO->
Write16(&m_nInputChannels))
5138 if (!pIO->
Write16(&m_nOutputChannels))
5155 for (i = 0; i < m_nOutputChannels; i++) {
5176 m_bApplyConstants =
false;
5179 for (i = 0; i < m_nOutputChannels; i++) {
5181 m_bApplyConstants =
true;
5187 if (m_nInputChannels==3 && m_nOutputChannels==3)
5189 else if (m_nInputChannels==3 && m_nOutputChannels==4)
5191 else if (m_nInputChannels==4 && m_nOutputChannels==3)
5193 else if (m_nInputChannels==4 && m_nOutputChannels==4)
5215 if (m_bApplyConstants) {
5218 *dstPixel++ = data[ 0]*srcPixel[0] + data[ 1]*srcPixel[1] + data[ 2]*srcPixel[2] + m_pConstants[0];
5219 *dstPixel++ = data[ 3]*srcPixel[0] + data[ 4]*srcPixel[1] + data[ 5]*srcPixel[2] + m_pConstants[1];
5220 *dstPixel = data[ 6]*srcPixel[0] + data[ 7]*srcPixel[1] + data[ 8]*srcPixel[2] + m_pConstants[2];
5224 *dstPixel++ = data[ 0]*srcPixel[0] + data[ 1]*srcPixel[1] + data[ 2]*srcPixel[2] + m_pConstants[0];
5225 *dstPixel++ = data[ 3]*srcPixel[0] + data[ 4]*srcPixel[1] + data[ 5]*srcPixel[2] + m_pConstants[1];
5226 *dstPixel++ = data[ 6]*srcPixel[0] + data[ 7]*srcPixel[1] + data[ 8]*srcPixel[2] + m_pConstants[2];
5227 *dstPixel = data[ 9]*srcPixel[0] + data[10]*srcPixel[1] + data[11]*srcPixel[2] + m_pConstants[3];
5231 *dstPixel++ = data[ 0]*srcPixel[0] + data[ 1]*srcPixel[1] + data[ 2]*srcPixel[2] + data[ 3]*srcPixel[3] + m_pConstants[0];
5232 *dstPixel++ = data[ 4]*srcPixel[0] + data[ 5]*srcPixel[1] + data[ 6]*srcPixel[2] + data[ 7]*srcPixel[3] + m_pConstants[1];
5233 *dstPixel = data[ 8]*srcPixel[0] + data[ 9]*srcPixel[1] + data[10]*srcPixel[2] + data[11]*srcPixel[3] + m_pConstants[2];
5237 *dstPixel++ = data[ 0]*srcPixel[0] + data[ 1]*srcPixel[1] + data[ 2]*srcPixel[2] + data[ 3]*srcPixel[3] + m_pConstants[0];
5238 *dstPixel++ = data[ 4]*srcPixel[0] + data[ 5]*srcPixel[1] + data[ 6]*srcPixel[2] + data[ 7]*srcPixel[3] + m_pConstants[1];
5239 *dstPixel++ = data[ 8]*srcPixel[0] + data[ 9]*srcPixel[1] + data[10]*srcPixel[2] + data[11]*srcPixel[3] + m_pConstants[2];
5240 *dstPixel = data[12]*srcPixel[0] + data[13]*srcPixel[1] + data[14]*srcPixel[2] + data[15]*srcPixel[3] + m_pConstants[3];
5248 for (j=0; j<m_nOutputChannels; j++) {
5249 *dstPixel = m_pConstants[j];
5251 for (i=0; i<m_nInputChannels; i++) {
5252 *dstPixel += data[i]*srcPixel[i];
5265 *dstPixel++ = data[0] * srcPixel[0] + data[1] * srcPixel[1] + data[2] * srcPixel[2];
5266 *dstPixel++ = data[3] * srcPixel[0] + data[4] * srcPixel[1] + data[5] * srcPixel[2];
5267 *dstPixel = data[6] * srcPixel[0] + data[7] * srcPixel[1] + data[8] * srcPixel[2];
5271 *dstPixel++ = data[0] * srcPixel[0] + data[1] * srcPixel[1] + data[2] * srcPixel[2];
5272 *dstPixel++ = data[3] * srcPixel[0] + data[4] * srcPixel[1] + data[5] * srcPixel[2];
5273 *dstPixel++ = data[6] * srcPixel[0] + data[7] * srcPixel[1] + data[8] * srcPixel[2];
5274 *dstPixel = data[9] * srcPixel[0] + data[10] * srcPixel[1] + data[11] * srcPixel[2];
5278 *dstPixel++ = data[0] * srcPixel[0] + data[1] * srcPixel[1] + data[2] * srcPixel[2] + data[3] * srcPixel[3];
5279 *dstPixel++ = data[4] * srcPixel[0] + data[5] * srcPixel[1] + data[6] * srcPixel[2] + data[7] * srcPixel[3];
5280 *dstPixel = data[8] * srcPixel[0] + data[9] * srcPixel[1] + data[10] * srcPixel[2] + data[11] * srcPixel[3];
5284 *dstPixel++ = data[0] * srcPixel[0] + data[1] * srcPixel[1] + data[2] * srcPixel[2] + data[3] * srcPixel[3];
5285 *dstPixel++ = data[4] * srcPixel[0] + data[5] * srcPixel[1] + data[6] * srcPixel[2] + data[7] * srcPixel[3];
5286 *dstPixel++ = data[8] * srcPixel[0] + data[9] * srcPixel[1] + data[10] * srcPixel[2] + data[11] * srcPixel[3];
5287 *dstPixel = data[12] * srcPixel[0] + data[13] * srcPixel[1] + data[14] * srcPixel[2] + data[15] * srcPixel[3];
5295 for (j = 0; j < m_nOutputChannels; j++) {
5298 for (i = 0; i < m_nInputChannels; i++) {
5299 *dstPixel += data[i] * srcPixel[i];
5310 else if (m_bApplyConstants) {
5311 memcpy(dstPixel, m_pConstants, m_nOutputChannels*
sizeof(
icFloatNumber));
5314 memset(dstPixel, 0, m_nOutputChannels *
sizeof(
icFloatNumber));
5330 std::string mpeSigPath = sigPath +
icGetSigPath(GetType());
5333 if (!m_pConstants) {
5338 sReport += sSigPathName;
5339 sReport +=
" - Has Empty Matrix Constant data!\n";
5365 m_nInputChannels = 0;
5366 m_nOutputChannels = 0;
5497 if (headerSize > size)
5509 if (!pIO->
Read32(&m_nReserved))
5512 if (!pIO->
Read16(&m_nInputChannels))
5515 if (!pIO->
Read16(&m_nOutputChannels))
5520 if (pIO->
Read8(gridPoints, 16)!=16) {
5526 if (m_nInputChannels > 16 || nPoints > dataSize || nPoints *
sizeof (
icFloat32Number) > dataSize)
5534 m_pCLUT->SetClipFunc(
NoClip);
5536 m_pCLUT->Init(gridPoints);
5543 nPoints = m_pCLUT->NumPoints()*m_nOutputChannels;
5571 if (!pIO->
Write32(&m_nReserved))
5574 if (!pIO->
Write16(&m_nInputChannels))
5577 if (!pIO->
Write16(&m_nOutputChannels))
5584 for (i=0; i<16; i++)
5585 gridPoints[i] = m_pCLUT->GridPoint(i);
5587 if (pIO->
Write8(gridPoints, 16)!=16)
5591 icInt32Number nPoints = m_pCLUT->NumPoints()*m_nOutputChannels;
5617 switch (m_nInputChannels) {
5660 switch(m_interpType) {
5662 pCLUT->
Interp1d(dstPixel, srcPixel);
5665 pCLUT->
Interp2d(dstPixel, srcPixel);
5671 pCLUT->
Interp3d(dstPixel, srcPixel);
5674 pCLUT->
Interp4d(dstPixel, srcPixel);
5677 pCLUT->
Interp5d(dstPixel, srcPixel);
5680 pCLUT->
Interp6d(dstPixel, srcPixel);
5701 std::string mpeSigPath = sigPath +
icGetSigPath(GetType());
5709 sReport += sSigPathName;
5710 sReport +=
" - Has No CLUT!\n";
5869 switch (nStorateType) {
5902 if (headerSize > size)
5931 if (pIO->
Read8(gridPoints, 16)!=16) {
5957 if (nPoints > dataSize)
5967 if (nPoints * 2 > dataSize)
5975 if (nPoints * 2 > dataSize)
6032 for (i=0; i<16; i++)
6035 if (pIO->
Write8(gridPoints, 16)!=16)
6091 sReport += sSigPathName;
6092 sReport +=
" - Invalid value type!\n";
6123 if (headerSize > size)
6220 sDescription +=
"Begin ";
6222 sDescription +=
"\n";
6229 sprintf(line,
"WhitePoint (X=%f, Y=%f, Z=%f)\n", xyz[0], xyz[1], xyz[2]);
6230 sDescription += line;
6233 sDescription += line;
6236 sDescription += line;
6239 sDescription += line;
6242 sDescription += line;
6245 sDescription += line;
6248 sDescription +=
"End";
6250 sDescription +=
"\n";
6260 sReport +=
"CAM Element Must have 3 input channels\n";
6265 sReport +=
"CAM Element Must have 3 output channels";
6270 sReport +=
"Invalid CAM";
6387#ifdef USEREFICCMAXNAMESPACE
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
@ icValidateCriticalError
static icFloatNumber clipPow(double v, double g)
static icFloatNumber NoClip(icFloatNumber v)
std::map< icCurveSetCurvePtr, icCurveSetCurvePtr > icCurveMap
std::map< CIccCurveSetCurve *, icPositionNumber > icCurvePtrMap
std::map< icUInt32Number, CIccCurveSetCurve * > icCurveOffsetMap
std::list< CIccCurveSegment * > CIccCurveSegmentList
#define ICC_MAXCALCCURVESIZE
icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Name: icMaxStatus.
std::string icGetSigPath(icUInt32Number nSig)
const char * icMsgValidateWarning
bool icValidTagPos(const icPositionNumber &pos, icUInt32Number nTagHeaderSize, icUInt32Number nTagSize, bool bAllowEmpty)
Name: icValidTagPos.
bool icIsNear(icFloatNumber v1, icFloatNumber v2, icFloatNumber nearRange)
Name: icIsNear.
const char * icMsgValidateInformation
icFloatNumber icMax(icFloatNumber v1, icFloatNumber v2)
icUInt32Number icIntMin(icUInt32Number v1, icUInt32Number v2)
icUInt8Number icGetStorageTypeBytes(icUInt16Number nStorageType)
const char * icMsgValidateCriticalError
bool icValidOverlap(const icPositionNumber &pos1, const icPositionNumber &pos2, bool bAllowSame)
Name: icValidOverlap.
unsigned int icUInt32Number
CIccApplyMpeCLUT(CIccMultiProcessElement *pElem, CIccApplyCLUT *pApply)
Name: CIccApplyMpeCLUT::CIccApplyMpeCLUT.
virtual ~CIccApplyMpeCLUT()
Name: CIccApplyMpeCLUT::~CIccApplyMpeCLUT.
void Apply(icFloatNumber *pDestPixel, const icFloatNumber *pSrcPixel)
Class: CIccTagMultiProcessElement.
void Interp4d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Name: CIccCLUT::Interp4d.
icUInt8Number GetInputDim() const
icUInt16Number GetOutputChannels() const
void SetClipFunc(icCLUTCLIPFUNC ClipFunc)
void Interp2d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Name: CIccCLUT::Interp2d.
void Interp6d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Name: CIccCLUT::Interp6d.
void Interp3d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Name: CIccCLUT::Interp3d.
void DumpLut(std::string &sDescription, const icChar *szName, icColorSpaceSignature csInput, icColorSpaceSignature csOutput, int nVerboseness, bool bUseLegacy=false)
Name: CIccCLUT::DumpLut.
void Interp5d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Name: CIccCLUT::Interp5d.
icUInt32Number NumPoints() const
icUInt8Number GridPoint(int index) const
icFloatNumber * GetData(int index)
void Interp3dTetra(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Name: CIccCLUT::Interp3dTetra.
void Interp1d(icFloatNumber *destPixel, const icFloatNumber *srcPixel) const
Name: CIccCLUT::Interp1d.
void InterpND(icFloatNumber *destPixel, const icFloatNumber *srcPixel, CIccApplyCLUT *pApply) const
Name: CIccCLUT::InterpND.
bool Init(icUInt8Number nGridPoints, icUInt32Number nMaxSize=0, icUInt8Number nBytesPerPoint=4)
Name: CIccCLUT::Init.
void JabToXYZ(const icFloatNumber *jab, icFloatNumber *xyz, int nbr)
void SetParameter_Nc(icFloatNumber Nc)
void SetParameter_La(icFloatNumber La)
void SetParameter_F(icFloatNumber F)
void GetParameter_WhitePoint(icFloatNumber *whitePoint)
void SetParameter_C(icFloatNumber c)
icFloatNumber GetParameter_C()
icFloatNumber GetParameter_Nc()
icFloatNumber GetParameter_Yb()
void XYZToJab(const icFloatNumber *xyz, icFloatNumber *jab, int nbr)
icFloatNumber GetParameter_F()
void SetParameter_Yb(icFloatNumber YB)
icFloatNumber GetParameter_La()
void SetParameter_WhitePoint(icFloatNumber *whitePoint)
icFloatNumber StartPoint()
icFloatNumber m_startPoint
virtual bool Read(icUInt32Number size, CIccIO *pIO)=0
static CIccCurveSegment * Create(icCurveSegSignature sig, icFloatNumber start, icFloatNumber end)
Name: CIccCurveSegment::Create.
icUInt32Number m_nReserved
virtual icFloatNumber Apply(icFloatNumber v) const =0
Class: CIccCurveSetCurve.
static CIccCurveSetCurve * Create(icCurveElemSignature sig)
Name: CIccCurveSetCurve::Create.
virtual bool Read(icUInt32Number size, CIccIO *pIO)=0
virtual CIccCurveSetCurve * NewCopy() const =0
icInt32Number ReadFloat16Float(void *pBufFloat, icInt32Number nNum=1)
icInt32Number ReadFloat32Float(void *pBufFloat, icInt32Number nNum=1)
virtual icInt32Number Write8(void *pBuf8, icInt32Number nNum=1)
icInt32Number Write16(void *pBuf16, icInt32Number nNum=1)
virtual icInt32Number Read8(void *pBuf8, icInt32Number nNum=1)
icInt32Number Read16(void *pBuf16, icInt32Number nNum=1)
icInt32Number WriteFloat16Float(void *pBuf16, icInt32Number nNum=1)
virtual icInt32Number Tell()
bool Align32()
Write operation to make sure that filelength is evenly divisible by 4.
icInt32Number ReadUInt8Float(void *pBufFloat, icInt32Number nNum=1)
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
virtual icInt32Number Seek(icInt32Number nOffset, icSeekVal pos)
icInt32Number WriteFloat32Float(void *pBufFloat, icInt32Number nNum=1)
icInt32Number WriteUInt8Float(void *pBuf16, icInt32Number nNum=1)
icInt32Number ReadUInt16Float(void *pBufFloat, icInt32Number nNum=1)
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
icInt32Number WriteUInt16Float(void *pBuf16, icInt32Number nNum=1)
std::string GetSigPathName(std::string sigPath)
virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)
virtual const icChar * GetXformName() const =0
void SetCAM(CIccCamConverter *pCAM)
CIccCamConverter * m_pCAM
virtual icElemTypeSignature GetType() const =0
virtual bool Write(CIccIO *pIO)
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
Name: CIccProcessElement::Validate.
virtual bool Read(icUInt32Number size, CIccIO *pIO)
virtual void Describe(std::string &sDescription, int nVerboseness)
virtual void Describe(std::string &sDescription, int nVerboseness)
Name: CIccMpeCLUT::Describe.
virtual bool Write(CIccIO *pIO)
Name: CIccMpeCLUT::Write.
virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)
Name: CIccMpeCLUT::Begin.
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
Name: CIccMpeCLUT::Validate.
void SetCLUT(CIccCLUT *pCLUT)
Name: CIccMpeCLUT::SetCLUT.
virtual ~CIccMpeCLUT()
Name: CIccMpeCLUT::~CIccMpeCLUT.
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Name: CIccMpeCLUT::Read.
virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const
Name: CIccMpeCLUT::Apply.
virtual CIccApplyMpe * GetNewApply(CIccApplyTagMpe *pApplyTag)
Name: CIccMpeCLUT::Begin.
CIccMpeCLUT()
Name: CIccMpeCLUT::CIccMpeCLUT.
CIccMpeCLUT & operator=(const CIccMpeCLUT &clut)
Name: &CIccMpeCLUT::operator=.
Class: CIccMpeCalculator.
virtual CIccMpeCalculator * NewCopy() const
virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)
Name: CIccMpeCurveSet::Begin.
virtual ~CIccMpeCurveSet()
Name: CIccMpeCurveSet::~CIccMpeCurveSet.
bool SetSize(int nNewSize)
Name: CIccMpeCurveSet::SetSize.
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Name: CIccMpeCurveSet::Read.
virtual void Describe(std::string &sDescription, int nVerboseness)
Name: CIccMpeCurveSet::Describe.
virtual bool Write(CIccIO *pIO)
Name: CIccMpeCurveSet::Write.
CIccMpeCurveSet & operator=(const CIccMpeCurveSet &curveSet)
Name: &CIccMpeCurveSet::operator=.
icCurveSetCurvePtr * m_curve
bool SetCurve(int nIndex, icCurveSetCurvePtr newCurve)
Name: CIccMpeCurveSet::SetCurve.
CIccMpeCurveSet(int nSize=0)
Name: CIccMpeCurveSet::CIccMpeCurveSet.
virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const
Name: CIccMpeCurveSet::Apply.
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
Name: CIccMpeCurveSet::Validate.
CIccMpeExtCLUT()
Name: CIccMpeExtCLUT::CIccMpeExtCLUT.
bool SetStorageType(icUInt16Number nStorateType)
Name: CIccMpeExtCLUT::SetStorageType.
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Name: CIccMpeExtCLUT::Read.
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
Name: CIccMpeExtCLUT::Validate.
virtual void Describe(std::string &sDescription, int nVerboseness)
Name: CIccMpeExtCLUT::Describe.
icUInt16Number m_nReserved2
CIccMpeExtCLUT & operator=(const CIccMpeExtCLUT &clut)
Name: &CIccMpeExtCLUT::operator=.
virtual icElemTypeSignature GetType() const
virtual bool Write(CIccIO *pIO)
Name: CIccMpeExtCLUT::Write.
icUInt16Number m_storageType
virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const
virtual ~CIccMpeJabToXYZ()
CIccMpeJabToXYZ & operator=(const CIccMpeJabToXYZ &cam)
icFloatNumber * m_pConstants
virtual ~CIccMpeMatrix()
Name: CIccMpeMatrix::~CIccMpeMatrix.
CIccMpeMatrix & operator=(const CIccMpeMatrix &ParamCurveTag)
Name: &CIccMpeMatrix::operator=.
virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)
Name: CIccMpeMatrix::Begin.
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
Name: CIccMpeMatrix::Validate.
virtual bool Write(CIccIO *pIO)
Name: CIccMpeMatrix::Write.
CIccMpeMatrix()
Name: CIccMpeMatrix::CIccMpeMatrix.
bool SetSize(icUInt16Number nInputChannels, icUInt16Number nOutputChannels, bool bUseConstants=true)
Name: CIccMpeMatrix::SetSize.
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Name: CIccMpeMatrix::Read.
virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const
Name: CIccMpeMatrix::Apply.
icFloatNumber * m_pMatrix
virtual void Describe(std::string &sDescription, int nVerboseness)
Name: CIccMpeMatrix::Describe.
void SetVectorSize(int nVectorSize)
Name: CIccMpeTintArray::SetVectorSize.
virtual ~CIccMpeTintArray()
Name: CIccMpeTintArray::~CIccMpeTintArray.
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Name: CIccMpeTintArray::Read.
CIccTagNumArray * m_Array
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
Name: CIccMpeTintArray::Validate.
CIccMpeTintArray(int nVectorSize=1)
Name: CIccMpeTintArray::CIccMpeTintArray.
virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const
Name: CIccMpeTintArray::Apply.
CIccMpeTintArray & operator=(const CIccMpeTintArray &tintArray)
Name: &CIccMpeTintArray::operator=.
virtual void Describe(std::string &sDescription, int nVerboseness=0)
Name: CIccMpeTintArray::Describe.
virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)
Name: CIccMpeTintArray::Begin.
void SetArray(CIccTagNumArray *pTag)
Name: CIccMpeTintArray::SetCurve.
virtual bool Write(CIccIO *pIO)
Name: CIccMpeTintArray::Write.
virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)
Name: CIccMpeToneMap::Begin.
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Name: CIccMpeToneMap::Read.
CIccToneMapFunc ** m_pToneFuncs
virtual bool Write(CIccIO *pIO)
Name: CIccMpeToneMap::Write.
CIccMpeToneMap(icUInt16Number nOutputChannels=1)
Name: CIccMpeToneMap::CIccMpeToneMap.
virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const
Name: CIccMpeToneMap::Apply.
void ClearToneFuncs()
Name: CIccMpeToneMap::ClearToneFuncs.
void SetNumOutputChannels(icUInt16Number nOutputChannels)
Name: CIccMpeToneMap::SetNumOutputChannels.
bool Insert(CIccToneMapFunc *pToneMapFunc)
Name: CIccMpeToneMap::PushBackFunc.
void SetLumCurve(CIccCurveSetCurve *pLumCurve)
Name: CIccMpeToneMap::SetLumCurve.
CIccCurveSetCurve * m_pLumCurve
virtual ~CIccMpeToneMap()
Name: CIccMpeToneMap::~CIccMpeToneMap.
CIccToneMapFunc ** CopyToneFuncs() const
Name: CIccMpeToneMap::CopyToneFuncs.
CIccMpeToneMap & operator=(const CIccMpeToneMap &toneMap)
Name: &CIccMpeToneMap::operator=.
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
Name: CIccMpeToneMap::Validate.
virtual void Describe(std::string &sDescription, int nVerboseness=0)
Name: CIccMpeToneMap::Describe.
virtual ~CIccMpeXYZToJab()
CIccMpeXYZToJab & operator=(const CIccMpeXYZToJab &cam)
virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *dstPixel, const icFloatNumber *srcPixel) const
Class: CIccMultiProcessElement.
icUInt16Number m_nOutputChannels
static CIccMultiProcessElement * Create(icElemTypeSignature sig)
Name: CIccMultiProcessElement::Create.
icUInt16Number m_nInputChannels
icUInt32Number m_nReserved
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const =0
Name: CIccProcessElement::Validate.
Class: CIccSampledCalculatorCurve.
icUInt32Number m_nDesiredSize
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Name: CIccSampledCalculatorCurve::Read.
icUInt32Number m_nReserved
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
Name: CIccSampledCalculatorCurve::Validate.
virtual ~CIccSampledCalculatorCurve()
Name: CIccSampledCalculatorCurve::~CIccSampledCalculatorCurve.
icUInt16Number m_extensionType
CIccSampledCalculatorCurve & operator=(const CIccSampledCalculatorCurve &SampledCurve)
Name: &CIccSampledCalculatorCurve::operator=.
CIccSampledCalculatorCurve(icFloatNumber first=0.0, icFloatNumber last=1.0)
Name: CIccSampledCalculatorCurve::CIccSampledCalculatorCurve.
icUInt16Number m_nReserved2
icFloatNumber m_hiIntercept
virtual bool Write(CIccIO *pIO)
Name: CIccSampledCalculatorCurve::Write.
icFloatNumber m_firstEntry
virtual bool SetRecommendedSize(icUInt32Number nSize)
Name: CIccSampledCalculatorCurve::SetRecommendedSize.
icFloatNumber m_lastEntry
CIccMpeCalculator * m_pCalc
bool SetExtensionType(icUInt16Number nExtensionType)
Name: CIccSampledCalculatorCurve::SetExtensionType.
bool SetCalculator(CIccMpeCalculator *pCalc)
Name: CIccSampledCalculatorCurve::SetCalculator Purpose: Sets calculator associated with the curve.
virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)
Name: CIccSampledCalculatorCurve::Begin.
virtual bool SetSize(icUInt32Number nSize, bool bZeroAlloc=true)
Name: CIccSampledCalculatorCurve::SetSize.
virtual void Describe(std::string &sDescription, int nVerboseness=100)
Name: CIccSampledCalculatorCurve::Describe.
virtual icFloatNumber Apply(icFloatNumber v) const
Name: CIccSampledCalculatorCurve::Apply.
void SetRange(icFloatNumber first=0.0f, icFloatNumber last=1.0f)
Name: CIccSampledCalculatorCurve::SetRange.
icFloatNumber m_loIntercept
icFloatNumber * m_pSamples
Class: CIccSampledCurveSegment.
virtual icFloatNumber Apply(icFloatNumber v) const
Name: CIccSampledCurveSegment::Apply.
icFloatNumber * m_pSamples
CIccSampledCurveSegment & operator=(const CIccSampledCurveSegment &ParamCurveTag)
Name: &CIccSampledCurveSegment::operator=.
virtual bool SetSize(icUInt32Number nSize, bool bZeroAlloc=true)
Name: CIccSampledCurveSegment::SetSize.
CIccSampledCurveSegment(icFloatNumber start, icFloatNumber end)
Name: CIccSampledCurveSegment::CIccSampledCurveSegment.
virtual bool Begin(CIccCurveSegment *pPrevSeg)
Name: CIccSampledCurveSegment::Begin.
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Name: CIccSampledCurveSegment::Read.
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
Name: CIccSampledCurveSegment::Validate.
virtual ~CIccSampledCurveSegment()
Name: CIccSampledCurveSegment::~CIccSampledCurveSegment.
virtual bool Write(CIccIO *pIO)
Name: CIccSampledCurveSegment::Write.
virtual void Describe(std::string &sDescription, int nVerboseness)
Name: CIccSampledCurveSegment::Describe.
Class: CIccSegmentedCurve.
icUInt32Number m_nReserved2
virtual ~CIccSegmentedCurve()
Name: CIccSegmentedCurve::~CIccSegmentedCurve.
CIccSegmentedCurve & operator=(const CIccSegmentedCurve &ParamCurveTag)
Name: &CIccSegmentedCurve::operator=.
virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)
Name: CIccSegmentedCurve::Begin.
virtual void Describe(std::string &sDescription, int nVerboseness)
Name: CIccSegmentedCurve::Describe.
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Name: CIccSegmentedCurve::Read.
void Reset()
Name: CIccSegmentedCurve::Reset.
bool Insert(CIccCurveSegment *pCurveSegment)
Name: CIccSegmentedCurve::Insert.
CIccCurveSegmentList * m_list
icUInt32Number m_nReserved1
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
Name: CIccSegmentedCurve::Validate.
virtual bool Write(CIccIO *pIO)
Name: CIccSegmentedCurve::Write.
virtual icFloatNumber Apply(icFloatNumber v) const
Name: CIccSegmentedCurve::Apply.
CIccSegmentedCurve()
Name: CIccSegmentedCurve::CIccSegmentedCurve.
Class: CIccSingleSampledCurve.
icUInt32Number m_nReserved
icFloatNumber m_firstEntry
icUInt16Number m_extensionType
bool SetStorageType(icUInt16Number nStorateType)
Name: CIccSingleSampledCurve::SetStorageType.
void SetRange(icFloatNumber first=0.0f, icFloatNumber last=1.0f)
Name: CIccSingleSampledCurve::SetRange.
virtual icFloatNumber Apply(icFloatNumber v) const
Name: CIccSingleSampledCurve::Apply.
virtual ~CIccSingleSampledCurve()
Name: CIccSingleSampledCurve::~CIccSingleSampledCurve.
virtual void Describe(std::string &sDescription, int nVerboseness)
Name: CIccSingleSampledCurve::Describe.
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Name: CIccSingleSampledCurve::Read.
virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)
Name: CIccSingleSampledCurve::Begin.
icFloatNumber m_lastEntry
icFloatNumber m_loIntercept
icFloatNumber * m_pSamples
bool SetExtensionType(icUInt16Number nExtensionType)
Name: CIccSingleSampledCurve::SetExtensionType.
icUInt16Number m_storageType
CIccSingleSampledCurve(icFloatNumber first=0.0, icFloatNumber last=1.0)
Name: CIccSingleSampledCurve::CIccSingleSampledCurve.
virtual bool SetSize(icUInt32Number nSize, bool bZeroAlloc=true)
Name: CIccSingleSampledCurve::SetSize.
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
Name: CIccSingleSampledCurve::Validate.
CIccSingleSampledCurve & operator=(const CIccSingleSampledCurve &SampledCurve)
Name: &CIccSingleSampledCurve::operator=.
icFloatNumber m_hiIntercept
virtual bool Write(CIccIO *pIO)
Name: CIccSingleSampledCurve::Write.
static CIccTag * Create(icTagTypeSignature sig)
Name: CIccTag::Create.
virtual bool IsNumArrayType() const
virtual CIccTag * NewCopy() const
Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.
Class: CIccTagMultiProcessElement.
icUInt16Number m_nReserved2
virtual ~CIccToneMapFunc()
CIccToneMapFunc & operator=(const CIccToneMapFunc &toneMap)
icUInt32Number m_nReserved
void Describe(std::string &sDescription, int nVerboseness=0)
icUInt16Number m_nFunctionType
icUInt8Number m_nParameters
icFloatNumber Apply(icFloatNumber lumValue, icFloatNumber pixelValue) const
icValidateStatus Validate(std::string &sFuncReport, int nVerboseness=0) const
bool SetFunction(icUInt16Number nFunc, icUInt8Number, icFloatNumber *pParams)
bool Read(icUInt32Number size, CIccIO *pIO)
virtual CIccToneMapFunc * NewCopy() const