IccMAX 2.1.27
Color Profile Tools
Loading...
Searching...
No Matches
CIccDumpXmlCLUT Class Reference
+ Inheritance diagram for CIccDumpXmlCLUT:
+ Collaboration diagram for CIccDumpXmlCLUT:

Public Member Functions

 CIccDumpXmlCLUT (std::string *xml, icConvertType nType, std::string blanks, icUInt16Number nSamples, icUInt8Number nPixelsPerRow)
 
void Finish ()
 
virtual void PixelOp (icFloatNumber *pGridAdr, icFloatNumber *pData)
 

Data Fields

std::string m_blanks
 
icUInt32Number m_nCurPixel
 
icUInt8Number m_nPixelsPerRow
 
icUInt16Number m_nSamples
 
icConvertType m_nType
 
std::string * m_xml
 

Detailed Description

Constructor & Destructor Documentation

◆ CIccDumpXmlCLUT()

CIccDumpXmlCLUT::CIccDumpXmlCLUT ( std::string *  xml,
icConvertType  nType,
std::string  blanks,
icUInt16Number  nSamples,
icUInt8Number  nPixelsPerRow 
)
inline
426 {
427 m_xml = xml;
428 m_nType = nType;
429 m_blanks = blanks;
430 m_nSamples = nSamples;
431 m_nPixelsPerRow = nPixelsPerRow;
432 m_nCurPixel = 0;
433 }
icUInt32Number m_nCurPixel
Definition IccUtilXml.cpp:482
icConvertType m_nType
Definition IccUtilXml.cpp:478
icUInt16Number m_nSamples
Definition IccUtilXml.cpp:480
icUInt8Number m_nPixelsPerRow
Definition IccUtilXml.cpp:481
std::string * m_xml
Definition IccUtilXml.cpp:477
std::string m_blanks
Definition IccUtilXml.cpp:479

References m_blanks, m_nCurPixel, m_nPixelsPerRow, m_nSamples, m_nType, and m_xml.

Referenced by icCLUTDataToXml().

+ Here is the caller graph for this function:

Member Function Documentation

◆ Finish()

void CIccDumpXmlCLUT::Finish ( )
inline
471 {
473 *m_xml += "\n";
474 }
475 }

References m_nCurPixel, m_nPixelsPerRow, and m_xml.

Referenced by icCLUTDataToXml().

+ Here is the caller graph for this function:

◆ PixelOp()

virtual void CIccDumpXmlCLUT::PixelOp ( icFloatNumber pGridAdr,
icFloatNumber pData 
)
inlinevirtual

Implements IIccCLUTExec.

436 {
437 int i;
438 char buf[128];
439
441 *m_xml += m_blanks;
442
443 switch(m_nType) {
444 case icConvert8Bit:
445 for (i=0; i<m_nSamples; i++) {
446 sprintf(buf, " %3d", (icUInt8Number)(pData[i]*255.0 + 0.5));
447 *m_xml += buf;
448 }
449 break;
450 case icConvert16Bit:
451 for (i=0; i<m_nSamples; i++) {
452 sprintf(buf, " %5d", (icUInt16Number)(pData[i]*65535.0 + 0.5));
453 *m_xml += buf;
454 }
455 break;
456 case icConvertFloat:
457 default:
458 for (i=0; i<m_nSamples; i++) {
459 sprintf(buf, " %13.8f", pData[i]);
460 *m_xml += buf;
461 }
462 break;
463 }
464 m_nCurPixel++;
465 if (!(m_nCurPixel % m_nPixelsPerRow)) {
466 *m_xml += "\n";
467 }
468 }
unsigned char icUInt8Number
Definition icProfileHeader.h:250
unsigned short icUInt16Number
Definition icProfileHeader.h:256
@ icConvert8Bit
Definition IccXmlConfig.h:68
@ icConvertFloat
Definition IccXmlConfig.h:70
@ icConvert16Bit
Definition IccXmlConfig.h:69

References icConvert16Bit, icConvert8Bit, icConvertFloat, m_blanks, m_nCurPixel, m_nPixelsPerRow, m_nSamples, m_nType, and m_xml.

Field Documentation

◆ m_blanks

std::string CIccDumpXmlCLUT::m_blanks

Referenced by CIccDumpXmlCLUT(), and PixelOp().

◆ m_nCurPixel

icUInt32Number CIccDumpXmlCLUT::m_nCurPixel

Referenced by CIccDumpXmlCLUT(), Finish(), and PixelOp().

◆ m_nPixelsPerRow

icUInt8Number CIccDumpXmlCLUT::m_nPixelsPerRow

Referenced by CIccDumpXmlCLUT(), Finish(), and PixelOp().

◆ m_nSamples

icUInt16Number CIccDumpXmlCLUT::m_nSamples

Referenced by CIccDumpXmlCLUT(), and PixelOp().

◆ m_nType

icConvertType CIccDumpXmlCLUT::m_nType

Referenced by CIccDumpXmlCLUT(), and PixelOp().

◆ m_xml

std::string* CIccDumpXmlCLUT::m_xml

Referenced by CIccDumpXmlCLUT(), Finish(), and PixelOp().


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