HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PXL_Lookup Class Reference

#include <PXL_Lookup.h>

Public Types

enum  Dir { LINEAR_TO_GAMMA, GAMMA_TO_LINEAR }
 

Public Member Functions

 PXL_Lookup ()
 
 ~PXL_Lookup ()
 
int64 getMemoryUsage (bool inclusive) const
 
void reset ()
 
void evalLUT (float color[3]) const
 
void setLUT (const CL_Clip &clip)
 
void set3DLUT (int size, float *lut)
 
void applyLUT (PXL_Raster &r, float gamma=1.0f, float black=0.0f, float white=1.0f, int comp=-1) const
 
fpreal indexToValue (int i) const
 
bool isValid () const
 
PXL_LookupType getType () const
 
bool getLogSampling () const
 
float getLogBias () const
 
int getNumChannels () const
 
int getTableSize () const
 
float getBlackPoint () const
 
float getWhitePoint () const
 
void getDomain (float &s, float &e) const
 
void getRange (float &s, float &e) const
 
bool hasSpecificFormat (PXL_DataFormat &format) const
 
bool hasLUTfor (PXL_LookupType type) const
 
void setType (PXL_LookupType type)
 
void setLogSampling (bool log)
 
void setLogBias (float bias)
 
void setSpecificFormat (PXL_DataFormat format)
 
void setNumChannels (int num)
 
void setTableSize (int size)
 
void setBlackWhitePoints (float b, float w)
 
void setDomain (float s, float e)
 
void setRange (float s, float e)
 
void invert (int newsize=0)
 
bool isHalfPrec () const
 
bool is3DLUT () const
 
int get3DSize () const
 
fprealgetRawLUT (PXL_LookupType type)
 
const fprealgetRawLUT (PXL_LookupType type) const
 
bool evalLUT (PXL_LookupType, int nsamples, float *data, unsigned b=0, unsigned w=0) const
 
bool evalLUT (PXL_LookupType, int nsamples, float *data, float black, float white, float from=0.0f, float to=1.0f) const
 
float evalLUT (PXL_LookupType, float pos) const
 
void eval1DLUT (float color[3]) const
 
void get1DLUT (float *lut[4], int size, float b, float w, float sc, float sh, float gamma) const
 
void apply1DLUT (PXL_Raster &raster, float gamma=1.0f, float black=0.0f, float white=1.0f, int comp=-1) const
 
void eval3DLUT (float color[3]) const
 
void copy3DLUT (float *lut, float *prelut=0) const
 
void copy3DLUT (fpreal16 *lut, fpreal16 *prelut=0) const
 
void clamp3DLUT ()
 
void apply3DLUT (PXL_Raster &r, float gamma=1.0f, float black=0.0f, float white=1.0f, int component=-1) const
 
bool load (const char *filename, bool header_only=false)
 
bool save (const char *filename, bool half_prec=false) const
 
bool load (FILE *fp, bool header_only)
 
bool loadBinary (FILE *fp, bool header_only)
 
bool save (FILE *fp) const
 
bool saveBinary (FILE *fp, bool half_prec=false) const
 
bool buildGamma (fpreal gamma, PXL_Lookup::Dir dir=LINEAR_TO_GAMMA, int lutsize=1024)
 
bool buildSRGB (PXL_Lookup::Dir dir=LINEAR_TO_GAMMA, int lutsize=1024)
 
bool buildREC709 (PXL_Lookup::Dir dir=LINEAR_TO_GAMMA, int lutsize=1024)
 
bool buildOpenColorIO (const char *src_color_space, const char *dest_color_space, const char *looks=NULL)
 
UT_FileLUTgetCineonLUT (bool forward, const char *filename=0) const
 
bool mergeLUTs (const PXL_Lookup &first_lut, const PXL_Lookup &second_lut)
 
void setTextureID (void *id)
 
voidgetTextureID () const
 
void clearTextureID ()
 
void setPreLutID (void *id)
 
voidgetPreLutID () const
 

Detailed Description

Definition at line 51 of file PXL_Lookup.h.

Member Enumeration Documentation

Enumerator
LINEAR_TO_GAMMA 
GAMMA_TO_LINEAR 

Definition at line 177 of file PXL_Lookup.h.

Constructor & Destructor Documentation

PXL_Lookup::PXL_Lookup ( )
PXL_Lookup::~PXL_Lookup ( )

Member Function Documentation

void PXL_Lookup::apply1DLUT ( PXL_Raster raster,
float  gamma = 1.0f,
float  black = 0.0f,
float  white = 1.0f,
int  comp = -1 
) const
void PXL_Lookup::apply3DLUT ( PXL_Raster r,
float  gamma = 1.0f,
float  black = 0.0f,
float  white = 1.0f,
int  component = -1 
) const
void PXL_Lookup::applyLUT ( PXL_Raster r,
float  gamma = 1.0f,
float  black = 0.0f,
float  white = 1.0f,
int  comp = -1 
) const
bool PXL_Lookup::buildGamma ( fpreal  gamma,
PXL_Lookup::Dir  dir = LINEAR_TO_GAMMA,
int  lutsize = 1024 
)
bool PXL_Lookup::buildOpenColorIO ( const char *  src_color_space,
const char *  dest_color_space,
const char *  looks = NULL 
)
bool PXL_Lookup::buildREC709 ( PXL_Lookup::Dir  dir = LINEAR_TO_GAMMA,
int  lutsize = 1024 
)
bool PXL_Lookup::buildSRGB ( PXL_Lookup::Dir  dir = LINEAR_TO_GAMMA,
int  lutsize = 1024 
)
void PXL_Lookup::clamp3DLUT ( )
void PXL_Lookup::clearTextureID ( )
void PXL_Lookup::copy3DLUT ( float *  lut,
float *  prelut = 0 
) const
void PXL_Lookup::copy3DLUT ( fpreal16 lut,
fpreal16 prelut = 0 
) const
void PXL_Lookup::eval1DLUT ( float  color[3]) const
void PXL_Lookup::eval3DLUT ( float  color[3]) const
void PXL_Lookup::evalLUT ( float  color[3]) const
bool PXL_Lookup::evalLUT ( PXL_LookupType  ,
int  nsamples,
float *  data,
unsigned  b = 0,
unsigned  w = 0 
) const
bool PXL_Lookup::evalLUT ( PXL_LookupType  ,
int  nsamples,
float *  data,
float  black,
float  white,
float  from = 0.0f,
float  to = 1.0f 
) const
float PXL_Lookup::evalLUT ( PXL_LookupType  ,
float  pos 
) const
void PXL_Lookup::get1DLUT ( float *  lut[4],
int  size,
float  b,
float  w,
float  sc,
float  sh,
float  gamma 
) const
int PXL_Lookup::get3DSize ( ) const
inline

Definition at line 118 of file PXL_Lookup.h.

float PXL_Lookup::getBlackPoint ( ) const
UT_FileLUT* PXL_Lookup::getCineonLUT ( bool  forward,
const char *  filename = 0 
) const
void PXL_Lookup::getDomain ( float &  s,
float &  e 
) const
float PXL_Lookup::getLogBias ( ) const
bool PXL_Lookup::getLogSampling ( ) const
int64 PXL_Lookup::getMemoryUsage ( bool  inclusive) const
int PXL_Lookup::getNumChannels ( ) const
void* PXL_Lookup::getPreLutID ( ) const
void PXL_Lookup::getRange ( float &  s,
float &  e 
) const
fpreal* PXL_Lookup::getRawLUT ( PXL_LookupType  type)
const fpreal* PXL_Lookup::getRawLUT ( PXL_LookupType  type) const
int PXL_Lookup::getTableSize ( ) const
void* PXL_Lookup::getTextureID ( ) const
PXL_LookupType PXL_Lookup::getType ( ) const
float PXL_Lookup::getWhitePoint ( ) const
bool PXL_Lookup::hasLUTfor ( PXL_LookupType  type) const
bool PXL_Lookup::hasSpecificFormat ( PXL_DataFormat format) const
fpreal PXL_Lookup::indexToValue ( int  i) const
void PXL_Lookup::invert ( int  newsize = 0)
bool PXL_Lookup::is3DLUT ( ) const
inline

Definition at line 117 of file PXL_Lookup.h.

bool PXL_Lookup::isHalfPrec ( ) const
inline

Definition at line 114 of file PXL_Lookup.h.

bool PXL_Lookup::isValid ( ) const
bool PXL_Lookup::load ( const char *  filename,
bool  header_only = false 
)
bool PXL_Lookup::load ( FILE *  fp,
bool  header_only 
)
bool PXL_Lookup::loadBinary ( FILE *  fp,
bool  header_only 
)
bool PXL_Lookup::mergeLUTs ( const PXL_Lookup first_lut,
const PXL_Lookup second_lut 
)
void PXL_Lookup::reset ( )
bool PXL_Lookup::save ( const char *  filename,
bool  half_prec = false 
) const
bool PXL_Lookup::save ( FILE *  fp) const
bool PXL_Lookup::saveBinary ( FILE *  fp,
bool  half_prec = false 
) const
void PXL_Lookup::set3DLUT ( int  size,
float *  lut 
)
void PXL_Lookup::setBlackWhitePoints ( float  b,
float  w 
)
void PXL_Lookup::setDomain ( float  s,
float  e 
)
void PXL_Lookup::setLogBias ( float  bias)
void PXL_Lookup::setLogSampling ( bool  log)
void PXL_Lookup::setLUT ( const CL_Clip clip)
void PXL_Lookup::setNumChannels ( int  num)
void PXL_Lookup::setPreLutID ( void id)
inline

Definition at line 213 of file PXL_Lookup.h.

void PXL_Lookup::setRange ( float  s,
float  e 
)
void PXL_Lookup::setSpecificFormat ( PXL_DataFormat  format)
void PXL_Lookup::setTableSize ( int  size)
void PXL_Lookup::setTextureID ( void id)
inline

Definition at line 209 of file PXL_Lookup.h.

void PXL_Lookup::setType ( PXL_LookupType  type)

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