IccMAX 2.1.27
Color Profile Tools
|
#include <IccTagLut.h>
Public Member Functions | |
CIccCLUT (const CIccCLUT &ICLUT) | |
CIccCLUT (icUInt8Number nInputChannels, icUInt16Number nOutputChannels, icUInt8Number nPrecision=2) | |
virtual | ~CIccCLUT () |
void | Begin () |
void | DumpLut (std::string &sDescription, const icChar *szName, icColorSpaceSignature csInput, icColorSpaceSignature csOutput, int nVerboseness, bool bUseLegacy=false) |
icFloatNumber * | GetData (int index) |
icUInt32Number | GetDimSize (icUInt8Number nIndex) const |
icUInt8Number | GetInputDim () const |
CIccApplyCLUT * | GetNewApply () |
icUInt32Number | GetNumOffset () const |
icUInt32Number | GetOffset (int index) const |
icUInt16Number | GetOutputChannels () const |
icUInt8Number | GetPrecision () |
icUInt8Number | GridPoint (int index) const |
const icUInt8Number * | GridPointArray () const |
icUInt8Number | GridPoints () const |
bool | Init (const icUInt8Number *pGridPoints, icUInt32Number nMaxSize=0, icUInt8Number nBytesPerPoint=4) |
bool | Init (icUInt8Number nGridPoints, icUInt32Number nMaxSize=0, icUInt8Number nBytesPerPoint=4) |
void | Interp1d (icFloatNumber *destPixel, const icFloatNumber *srcPixel) const |
void | Interp2d (icFloatNumber *destPixel, const icFloatNumber *srcPixel) const |
void | Interp3d (icFloatNumber *destPixel, const icFloatNumber *srcPixel) const |
void | Interp3dTetra (icFloatNumber *destPixel, const icFloatNumber *srcPixel) const |
void | Interp4d (icFloatNumber *destPixel, const icFloatNumber *srcPixel) const |
void | Interp5d (icFloatNumber *destPixel, const icFloatNumber *srcPixel) const |
void | Interp6d (icFloatNumber *destPixel, const icFloatNumber *srcPixel) const |
void | InterpND (icFloatNumber *destPixel, const icFloatNumber *srcPixel, CIccApplyCLUT *pApply) const |
void | Iterate (IIccCLUTExec *pExec) |
icUInt32Number | MaxGridPoint (int index) const |
icUInt32Number | NumPoints () const |
CIccCLUT & | operator= (const CIccCLUT &CLUTClass) |
icFloatNumber & | operator[] (int index) |
bool | Read (icUInt32Number size, CIccIO *pIO) |
bool | ReadData (icUInt32Number size, CIccIO *pIO, icUInt8Number nPrecision) |
void | SetClipFunc (icCLUTCLIPFUNC ClipFunc) |
void | SetPrecision (icUInt8Number nPrecision) |
icValidateStatus | Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const |
bool | Write (CIccIO *pIO) |
bool | WriteData (CIccIO *pIO, icUInt8Number nPrecision) |
Protected Member Functions | |
void | Iterate (std::string &sDescription, icUInt8Number nIndex, icUInt32Number nPos, bool bUseLegacy=false) |
void | SubIterate (IIccCLUTExec *pExec, icUInt8Number nIndex, icUInt32Number nPos) |
Class: CIccCLUT
Purpose: The base multidimensional color look-up table (CLUT) class
CIccCLUT::CIccCLUT | ( | icUInt8Number | nInputChannels, |
icUInt16Number | nOutputChannels, | ||
icUInt8Number | nPrecision = 2 |
||
) |
Name: CIccCLUT::CIccCLUT
Purpose: Constructor
Args: nInputChannels = number of input channels, nOutputChannels = number of output channels
References ClutUnitClip(), m_nInput, m_nOffset, m_nOutput, m_nPrecision, m_nReserved2, m_pData, and UnitClip.
Referenced by CDevLinkWriter::begin(), CIccMpeEmissionCLUT::Begin(), CIccMpeReflectanceCLUT::Begin(), icCLutFromXml(), main(), CIccMBB::NewCLUT(), CIccMBB::NewCLUT(), CIccMpeCLUT::Read(), CIccMpeExtCLUT::Read(), CIccMpeSpectralCLUT::Read(), CIccTagLutAtoB::Read(), CIccTagLut8::Read(), and CIccTagLut16::Read().
CIccCLUT::CIccCLUT | ( | const CIccCLUT & | ICLUT | ) |
Name: CIccCLUT::CIccCLUT
Purpose: Copy Constructor
Args: ICLUT = The CIccCLUT object to be copied
References m_csInput, m_csOutput, m_DimSize, m_GridAdr, m_GridPoints, m_nInput, m_nNumPoints, m_nOffset, m_nOutput, m_nPrecision, m_nReserved2, m_pData, NumPoints(), and UnitClip.
Referenced by CIccMBB::CIccMBB(), CIccMpeCLUT::CIccMpeCLUT(), CIccMpeSpectralCLUT::CIccMpeSpectralCLUT(), CIccMpeSpectralCLUT::copyData(), CIccMBB::operator=(), and CIccMpeCLUT::operator=().
|
virtual |
void CIccCLUT::Begin | ( | ) |
Name: CIccCLUT::Begin
Purpose: Initializes the CLUT. Must be called before Apply().
References m_DimSize, m_GridPoints, m_MaxGridPoint, m_nInput, m_nNodes, m_nOffset, m_nPower, n000, n001, n010, n011, n100, n1000, n10000, n100000, n101, n110, and n111.
Referenced by CIccMpeCLUT::Begin(), CIccMpeEmissionCLUT::Begin(), and CIccMpeReflectanceCLUT::Begin().
void CIccCLUT::DumpLut | ( | std::string & | sDescription, |
const icChar * | szName, | ||
icColorSpaceSignature | csInput, | ||
icColorSpaceSignature | csOutput, | ||
int | nVerboseness, | ||
bool | bUseLegacy = false |
||
) |
Name: CIccCLUT::DumpLut
Purpose: Dump data associated with the tag to a string.
Args: sDescription = string to concatenate tag dump to, szName = name of the LUT to be printed, csInput = color space signature of the input data, csOutput = color space signature of the output data nVerboseness = how verbose the output is (bigger = more verbose)
References icColorIndexName(), icColorValue(), Iterate(), m_csInput, m_csOutput, m_GridAdr, m_GridPoints, m_nInput, m_nOutput, m_pOutText, m_pVal, and NumPoints().
Referenced by CIccMpeCLUT::Describe(), CIccMpeExtCLUT::Describe(), CIccMpeSpectralCLUT::Describe(), and CIccMBB::Describe().
|
inline |
References m_pData.
Referenced by CDevLinkWriter::begin(), CIccMpeEmissionCLUT::Begin(), CIccMpeReflectanceCLUT::Begin(), icCLutFromXml(), main(), CIccMpeCLUT::Read(), CIccMpeExtCLUT::Read(), CIccMpeSpectralCLUT::Read(), CIccMpeCLUT::Write(), CIccMpeExtCLUT::Write(), and CIccMpeSpectralCLUT::Write().
|
inline |
|
inline |
References m_nInput.
Referenced by icCLUTDataToXml(), CIccMBB::SetCLUT(), CIccMpeCLUT::SetCLUT(), and CIccMpeSpectralCLUT::SetData().
CIccApplyCLUT * CIccCLUT::GetNewApply | ( | ) |
References CIccApplyCLUT::CIccApplyCLUT(), CIccApplyCLUT::Init(), m_nInput, and m_nNodes.
Referenced by CIccMpeCLUT::GetNewApply(), and CIccMpeSpectralCLUT::GetNewApply().
|
inline |
|
inline |
|
inline |
References m_nOutput.
Referenced by CIccMpeEmissionCLUT::Begin(), CIccMpeReflectanceCLUT::Begin(), icCLUTDataToXml(), icCLutFromXml(), CIccMBB::SetCLUT(), and CIccMpeCLUT::SetCLUT().
|
inline |
References m_nPrecision.
Referenced by icCLUTDataToXml().
|
inline |
References m_GridPoints.
Referenced by icCLUTDataToXml(), icCLUTToXml(), CIccMpeCLUT::Write(), CIccMpeExtCLUT::Write(), and CIccMpeSpectralCLUT::Write().
|
inline |
References m_GridPoints.
Referenced by CIccMpeEmissionCLUT::Begin(), and CIccMpeReflectanceCLUT::Begin().
|
inline |
References m_GridPoints.
Referenced by CIccEvalCompare::EvaluateProfile(), CIccTagLut8::Write(), and CIccTagLut16::Write().
bool CIccCLUT::Init | ( | const icUInt8Number * | pGridPoints, |
icUInt32Number | nMaxSize = 0 , |
||
icUInt8Number | nBytesPerPoint = 4 |
||
) |
Name: CIccCLUT::Init
Purpose: Initializes and sets the size of the CLUT
Args: pGridPoints = number of grid points in the CLUT
References m_DimSize, m_GridPoints, m_nInput, m_nNumPoints, m_nOutput, m_nReserved2, m_pData, and NumPoints().
Referenced by CIccMpeEmissionCLUT::Begin(), CIccMpeReflectanceCLUT::Begin(), icCLutFromXml(), Init(), CIccMBB::NewCLUT(), CIccMpeCLUT::Read(), CIccMpeExtCLUT::Read(), CIccMpeSpectralCLUT::Read(), and Read().
bool CIccCLUT::Init | ( | icUInt8Number | nGridPoints, |
icUInt32Number | nMaxSize = 0 , |
||
icUInt8Number | nBytesPerPoint = 4 |
||
) |
Name: CIccCLUT::Init
Purpose: Initializes and sets the size of the CLUT
Args: nGridPoints = number of grid points in the CLUT
References Init(), m_GridPoints, and m_nInput.
Referenced by CDevLinkWriter::begin(), icCLutFromXml(), main(), CIccMBB::NewCLUT(), CIccTagLut8::Read(), and CIccTagLut16::Read().
void CIccCLUT::Interp1d | ( | icFloatNumber * | destPixel, |
const icFloatNumber * | srcPixel | ||
) | const |
Name: CIccCLUT::Interp1d
Purpose: One dimensional interpolation function
Args: Pixel = Pixel value to be found in the CLUT. Also used to store the result.
References m_MaxGridPoint, m_nOutput, m_pData, n000, n001, and UnitClip.
Referenced by CIccMpeCLUT::Apply(), and CIccMpeSpectralCLUT::Apply().
void CIccCLUT::Interp2d | ( | icFloatNumber * | destPixel, |
const icFloatNumber * | srcPixel | ||
) | const |
Name: CIccCLUT::Interp2d
Purpose: Two dimensional interpolation function
Args: Pixel = Pixel value to be found in the CLUT. Also used to store the result.
References m_MaxGridPoint, m_nOutput, m_pData, n000, n001, n010, n011, and UnitClip.
Referenced by CIccMpeCLUT::Apply(), and CIccMpeSpectralCLUT::Apply().
void CIccCLUT::Interp3d | ( | icFloatNumber * | destPixel, |
const icFloatNumber * | srcPixel | ||
) | const |
Name: CIccCLUT::Interp3d
Purpose: Three dimensional interpolation function
Args: Pixel = Pixel value to be found in the CLUT. Also used to store the result.
References m_MaxGridPoint, m_nOutput, m_pData, n000, n001, n010, n011, n100, n101, n110, n111, and UnitClip.
Referenced by CIccMpeCLUT::Apply(), and CIccMpeSpectralCLUT::Apply().
void CIccCLUT::Interp3dTetra | ( | icFloatNumber * | destPixel, |
const icFloatNumber * | srcPixel | ||
) | const |
Name: CIccCLUT::Interp3dTetra
Purpose: Tetrahedral interpolation function
Args: Pixel = Pixel value to be found in the CLUT. Also used to store the result.
References m_MaxGridPoint, m_nOutput, m_pData, n000, n001, n010, n011, n100, n101, n110, n111, and UnitClip.
Referenced by CIccMpeCLUT::Apply(), and CIccMpeSpectralCLUT::Apply().
void CIccCLUT::Interp4d | ( | icFloatNumber * | destPixel, |
const icFloatNumber * | srcPixel | ||
) | const |
Name: CIccCLUT::Interp4d
Purpose: Four dimensional interpolation function
Args: Pixel = Pixel value to be found in the CLUT. Also used to store the result.
References m_MaxGridPoint, m_nOffset, m_nOutput, m_pData, n001, n010, n100, n1000, and UnitClip.
Referenced by CIccMpeCLUT::Apply(), and CIccMpeSpectralCLUT::Apply().
void CIccCLUT::Interp5d | ( | icFloatNumber * | destPixel, |
const icFloatNumber * | srcPixel | ||
) | const |
Name: CIccCLUT::Interp5d
Purpose: Five dimensional interpolation function
Args: Pixel = Pixel value to be found in the CLUT. Also used to store the result.
References m_MaxGridPoint, m_nOffset, m_nOutput, m_pData, n001, n010, n100, n1000, n10000, and UnitClip.
Referenced by CIccMpeCLUT::Apply(), and CIccMpeSpectralCLUT::Apply().
void CIccCLUT::Interp6d | ( | icFloatNumber * | destPixel, |
const icFloatNumber * | srcPixel | ||
) | const |
Name: CIccCLUT::Interp6d
Purpose: Six dimensional interpolation function
Args: Pixel = Pixel value to be found in the CLUT. Also used to store the result.
References m_MaxGridPoint, m_nOffset, m_nOutput, m_pData, n001, n010, n100, n1000, n10000, n100000, and UnitClip.
Referenced by CIccMpeCLUT::Apply(), and CIccMpeSpectralCLUT::Apply().
void CIccCLUT::InterpND | ( | icFloatNumber * | destPixel, |
const icFloatNumber * | srcPixel, | ||
CIccApplyCLUT * | pApply | ||
) | const |
Name: CIccCLUT::InterpND
Purpose: Generic N-dimensional interpolation function
Args: Pixel = Pixel value to be found in the CLUT. Also used to store the result.
References CIccApplyCLUT::m_df, m_DimSize, CIccApplyCLUT::m_g, CIccApplyCLUT::m_ig, m_MaxGridPoint, m_nInput, m_nNodes, m_nOffset, m_nOutput, m_nPower, m_pData, CIccApplyCLUT::m_s, and UnitClip.
Referenced by CIccMpeCLUT::Apply(), and CIccMpeSpectralCLUT::Apply().
void CIccCLUT::Iterate | ( | IIccCLUTExec * | pExec | ) |
Name: CIccCLUT::Iterate
Purpose: Iterate through the CLUT to get the data and execute PixelOp
Args: pExec = pointer to the IIccCLUTExec object that implements the IIccCLUTExec::Apply() function
References m_DimSize, m_fGridAdr, m_GridPoints, m_nInput, m_pData, IIccCLUTExec::PixelOp(), and SubIterate().
Referenced by icCLUTDataToXml().
|
protected |
Name: CIccCLUT::Iterate
Purpose: Iterate through the CLUT to dump the data
Args: sDescription = string to concatenate data dump to, nIndex = the channel number, nPos = the current position in the CLUT
References icColorValue(), Iterate(), m_csInput, m_csOutput, m_DimSize, m_GridAdr, m_GridPoints, m_nInput, m_nOutput, m_pData, m_pOutText, and m_pVal.
Referenced by DumpLut(), and Iterate().
|
inline |
References m_MaxGridPoint.
|
inline |
References m_nNumPoints.
Referenced by CIccCLUT(), CDevLinkWriter::begin(), CIccMpeEmissionCLUT::Begin(), CIccMpeReflectanceCLUT::Begin(), DumpLut(), icCLutFromXml(), Init(), main(), operator=(), CIccMpeCLUT::Read(), CIccMpeExtCLUT::Read(), CIccMpeSpectralCLUT::Read(), ReadData(), CIccMpeCLUT::Write(), CIccMpeExtCLUT::Write(), CIccMpeSpectralCLUT::Write(), and WriteData().
Name: CIccCLUT::operator=
Purpose: Copy Operator
Args: CLUTTag = The CIccCLUT object to be copied
References m_csInput, m_csOutput, m_DimSize, m_GridAdr, m_GridPoints, m_nInput, m_nNumPoints, m_nOutput, m_nPrecision, m_nReserved2, m_pData, NumPoints(), and UnitClip.
|
inline |
bool CIccCLUT::Read | ( | icUInt32Number | size, |
CIccIO * | pIO | ||
) |
Name: CIccCLUT::Read
Purpose: Read in the tag contents into a data block
Args: size - # of bytes in tag, pIO - IO object to read tag from
Return: true = successful, false = failure
References Init(), m_GridPoints, m_nPrecision, m_nReserved2, CIccIO::Read8(), and ReadData().
Referenced by CIccTagLutAtoB::Read().
bool CIccCLUT::ReadData | ( | icUInt32Number | size, |
CIccIO * | pIO, | ||
icUInt8Number | nPrecision | ||
) |
Name: CIccCLUT::ReadData
Purpose: Reads the CLUT data points into the data buffer
Args: size = # of bytes in the tag, pIO = IO object to read data from, nPrecision = data precision (8bit encoded as 1 or 16bit encoded as 2)
Return: true = data read succesfully, false = read data failed
References m_nOutput, m_pData, NumPoints(), CIccIO::ReadUInt16Float(), and CIccIO::ReadUInt8Float().
Referenced by Read(), CIccTagLut8::Read(), and CIccTagLut16::Read().
|
inline |
References UnitClip.
Referenced by CIccMpeEmissionCLUT::Begin(), CIccMpeReflectanceCLUT::Begin(), CIccMpeCLUT::Read(), CIccMpeExtCLUT::Read(), CIccMpeSpectralCLUT::Read(), CIccMpeCLUT::SetCLUT(), and CIccMpeSpectralCLUT::SetData().
|
inline |
References m_nPrecision.
Referenced by icCLutFromXml().
|
protected |
Name: CIccCLUT::SubIterate
Purpose: Iterate through the CLUT to get the data
Args: pExec = pointer to the IIccCLUTExec object that implements the IIccCLUTExec::Apply() function, nIndex = the channel number, nPos = the current position in the CLUT
References m_DimSize, m_fGridAdr, m_GridPoints, m_nInput, m_pData, IIccCLUTExec::PixelOp(), and SubIterate().
Referenced by Iterate(), and SubIterate().
icValidateStatus CIccCLUT::Validate | ( | std::string | sigPath, |
std::string & | sReport, | ||
const CIccProfile * | pProfile = NULL |
||
) | const |
Name: CIccCLUT::Validate
Purpose: Check tag data validity.
Args: sig = signature of tag being validated, sReport = String to add report information to
Return: icValidateStatusOK if valid, or other error status.
References CIccInfo::GetSigPathName(), icGetFirstSigPathSig(), icMaxStatus(), icMsgValidateCriticalError, icMsgValidateNonCompliant, icSigLutAtoBType, icSigLutBtoAType, icValidateCriticalError, icValidateNonCompliant, icValidateOK, m_GridPoints, m_nInput, and m_nReserved2.
Referenced by CIccMBB::Validate().
bool CIccCLUT::Write | ( | CIccIO * | pIO | ) |
Name: CIccCLUT::Write
Purpose: Write the tag to a file
Args: pIO - The IO object to write tag to.
Return: true = succesful, false = failure
References m_GridPoints, m_nPrecision, m_nReserved2, CIccIO::Write8(), and WriteData().
Referenced by CIccTagLutAtoB::Write().
bool CIccCLUT::WriteData | ( | CIccIO * | pIO, |
icUInt8Number | nPrecision | ||
) |
Name: CIccCLUT::WriteData
Purpose: Writes the CLUT data points from the data buffer
Args: pIO = IO object to write data to, nPrecision = data precision (8bit encoded as 1 or 16bit encoded as 2)
Return: true = data written succesfully, false = write operation failed
References m_nOutput, m_pData, NumPoints(), CIccIO::WriteUInt16Float(), and CIccIO::WriteUInt8Float().
Referenced by Write(), CIccTagLut8::Write(), and CIccTagLut16::Write().
|
protected |
Referenced by CIccCLUT(), DumpLut(), Iterate(), and operator=().
|
protected |
Referenced by CIccCLUT(), DumpLut(), Iterate(), and operator=().
|
protected |
Referenced by CIccCLUT(), Begin(), GetDimSize(), Init(), InterpND(), Iterate(), Iterate(), operator=(), and SubIterate().
|
protected |
Referenced by Iterate(), and SubIterate().
|
protected |
Referenced by CIccCLUT(), DumpLut(), Iterate(), and operator=().
|
protected |
Referenced by CIccCLUT(), Begin(), DumpLut(), GridPoint(), GridPointArray(), GridPoints(), Init(), Init(), Iterate(), Iterate(), operator=(), Read(), SubIterate(), Validate(), and Write().
|
protected |
Referenced by Begin(), Interp1d(), Interp2d(), Interp3d(), Interp3dTetra(), Interp4d(), Interp5d(), Interp6d(), InterpND(), and MaxGridPoint().
|
protected |
Referenced by CIccCLUT(), CIccCLUT(), Begin(), DumpLut(), GetInputDim(), GetNewApply(), Init(), Init(), InterpND(), Iterate(), Iterate(), operator=(), SubIterate(), and Validate().
|
protected |
Referenced by Begin(), GetNewApply(), GetNumOffset(), and InterpND().
|
protected |
Referenced by CIccCLUT(), Init(), NumPoints(), and operator=().
|
protected |
Referenced by CIccCLUT(), CIccCLUT(), ~CIccCLUT(), Begin(), GetOffset(), Interp4d(), Interp5d(), Interp6d(), and InterpND().
|
protected |
Referenced by CIccCLUT(), CIccCLUT(), DumpLut(), GetOutputChannels(), Init(), Interp1d(), Interp2d(), Interp3d(), Interp3dTetra(), Interp4d(), Interp5d(), Interp6d(), InterpND(), Iterate(), operator=(), ReadData(), and WriteData().
|
protected |
Referenced by Begin(), and InterpND().
|
protected |
Referenced by CIccCLUT(), CIccCLUT(), GetPrecision(), operator=(), Read(), SetPrecision(), and Write().
|
protected |
Referenced by CIccCLUT(), CIccCLUT(), Init(), operator=(), Read(), Validate(), and Write().
|
protected |
Referenced by CIccCLUT(), CIccCLUT(), ~CIccCLUT(), GetData(), Init(), Interp1d(), Interp2d(), Interp3d(), Interp3dTetra(), Interp4d(), Interp5d(), Interp6d(), InterpND(), Iterate(), Iterate(), operator=(), operator[](), ReadData(), SubIterate(), and WriteData().
|
protected |
Referenced by Begin(), Interp1d(), Interp2d(), Interp3d(), and Interp3dTetra().
|
protected |
Referenced by Begin(), Interp1d(), Interp2d(), Interp3d(), Interp3dTetra(), Interp4d(), Interp5d(), and Interp6d().
|
protected |
Referenced by Begin(), Interp2d(), Interp3d(), Interp3dTetra(), Interp4d(), Interp5d(), and Interp6d().
|
protected |
Referenced by Begin(), Interp2d(), Interp3d(), and Interp3dTetra().
|
protected |
Referenced by Begin(), Interp3d(), Interp3dTetra(), Interp4d(), Interp5d(), and Interp6d().
|
protected |
Referenced by Begin(), Interp4d(), Interp5d(), and Interp6d().
|
protected |
Referenced by Begin(), Interp5d(), and Interp6d().
|
protected |
Referenced by Begin(), and Interp6d().
|
protected |
Referenced by Begin(), Interp3d(), and Interp3dTetra().
|
protected |
Referenced by Begin(), Interp3d(), and Interp3dTetra().
|
protected |
Referenced by Begin(), Interp3d(), and Interp3dTetra().
|
protected |
Referenced by CIccCLUT(), CIccCLUT(), Interp1d(), Interp2d(), Interp3d(), Interp3dTetra(), Interp4d(), Interp5d(), Interp6d(), InterpND(), operator=(), and SetClipFunc().