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

#include <IMG_TileOptions.h>

Public Member Functions

 IMG_TileOptions ()=default
 If the format is a null pointer, it will be inferred from the filename. More...
 
virtual ~IMG_TileOptions ()=default
 
virtual IMG_TileOptionsclone () const
 Create a new copy of myself. More...
 
void setPlaneInfo (const UT_StringHolder &filename, const UT_StringHolder &channel, const UT_StringHolder &format, IMG_DataType dtype=IMG_DT_ANY, IMG_ColorModel cmodel=IMG_CM_ANY, IMG_TypeInfo tinfo=IMG_TI_COLOR)
 
void setPlaneInfo (const char *filename, const char *channel, const char *format, IMG_DataType dtype=IMG_DT_ANY, IMG_ColorModel cmodel=IMG_CM_ANY, IMG_TypeInfo tinfo=IMG_TI_COLOR)
 
fpreal gamma () const
 
void setGamma (fpreal gamma)
 
PXL_ColorSpace colorSpace () const
 
bool changeFileExtension ()
 
void clearOptions ()
 
void setFormatOptions (const char *string)
 
void setFormatOptions (int argc, const char *const argv[])
 
void setFormatOptions (const UT_StringArray &options)
 
void setFormatOption (const char *token, const char *value)
 
void setFormatOptions (const UT_Options &options)
 
virtual const IMG_FormatgetFormat (IMG_Format::AccessType access=IMG_Format::READ_ACCESS) const
 
const char * getFilename () const
 
const char * getChannel () const
 
const char * getFormatName () const
 
IMG_DataType getDataType () const
 
IMG_ColorModel getColorModel () const
 
IMG_TypeInfo getTypeInfo () const
 
const UT_OptionsgetLocalOptions () const
 
virtual bool getOption (const char *token, UT_String &value) const
 
virtual void setTextureOptions (UT_Options &options)
 
virtual int packOptionsString (UT_String &result) const
 
void dump (UT_JSONWriter &w) const
 
void dump () const
 

Protected Member Functions

void copy (const IMG_TileOptions &src)
 

Protected Attributes

UT_StringHolder myFilename
 
UT_StringHolder myChannel
 
UT_StringHolder myFormatName
 
UT_Options myOptions
 
IMG_DataType myDataType = IMG_DT_ANY
 
IMG_ColorModel myColorModel = IMG_CM_ANY
 
IMG_TypeInfo myTypeInfo = IMG_TI_UNDEFINED
 
fpreal myGamma = 1
 

Detailed Description

Examples:
standalone/tiledevice.C.

Definition at line 23 of file IMG_TileOptions.h.

Constructor & Destructor Documentation

IMG_TileOptions::IMG_TileOptions ( )
default

If the format is a null pointer, it will be inferred from the filename.

virtual IMG_TileOptions::~IMG_TileOptions ( )
virtualdefault

Member Function Documentation

bool IMG_TileOptions::changeFileExtension ( )
void IMG_TileOptions::clearOptions ( )

There are sevaral ways to set format options: 1) A sting (which is parsed into token/value pairs) 2) A set of token/value pairs specified as a linear array

virtual IMG_TileOptions* IMG_TileOptions::clone ( ) const
virtual

Create a new copy of myself.

PXL_ColorSpace IMG_TileOptions::colorSpace ( ) const
void IMG_TileOptions::copy ( const IMG_TileOptions src)
protected
void IMG_TileOptions::dump ( UT_JSONWriter w) const

Dump options

void IMG_TileOptions::dump ( ) const

Dump options

fpreal IMG_TileOptions::gamma ( ) const
inline

Definition at line 52 of file IMG_TileOptions.h.

const char* IMG_TileOptions::getChannel ( ) const
IMG_ColorModel IMG_TileOptions::getColorModel ( ) const
IMG_DataType IMG_TileOptions::getDataType ( ) const
const char* IMG_TileOptions::getFilename ( ) const
virtual const IMG_Format* IMG_TileOptions::getFormat ( IMG_Format::AccessType  access = IMG_Format::READ_ACCESS) const
virtual

Get the IMG_Format associated with these options. This will possibly return a null ptr.

const char* IMG_TileOptions::getFormatName ( ) const
const UT_Options& IMG_TileOptions::getLocalOptions ( ) const
virtual bool IMG_TileOptions::getOption ( const char *  token,
UT_String value 
) const
virtual

Getting the option will return true/false based on whether the option was defined. If the option was not defined, the value will not be touched (i.e. it will remain unchanged).

IMG_TypeInfo IMG_TileOptions::getTypeInfo ( ) const
virtual int IMG_TileOptions::packOptionsString ( UT_String result) const
virtual

Pack all options into a single string. Returns the number of options packed.

void IMG_TileOptions::setFormatOption ( const char *  token,
const char *  value 
)
void IMG_TileOptions::setFormatOptions ( const char *  string)
void IMG_TileOptions::setFormatOptions ( int  argc,
const char *const  argv[] 
)
void IMG_TileOptions::setFormatOptions ( const UT_StringArray options)
void IMG_TileOptions::setFormatOptions ( const UT_Options options)
void IMG_TileOptions::setGamma ( fpreal  gamma)
inline

Definition at line 53 of file IMG_TileOptions.h.

void IMG_TileOptions::setPlaneInfo ( const UT_StringHolder filename,
const UT_StringHolder channel,
const UT_StringHolder format,
IMG_DataType  dtype = IMG_DT_ANY,
IMG_ColorModel  cmodel = IMG_CM_ANY,
IMG_TypeInfo  tinfo = IMG_TI_COLOR 
)
void IMG_TileOptions::setPlaneInfo ( const char *  filename,
const char *  channel,
const char *  format,
IMG_DataType  dtype = IMG_DT_ANY,
IMG_ColorModel  cmodel = IMG_CM_ANY,
IMG_TypeInfo  tinfo = IMG_TI_COLOR 
)
inline

Definition at line 39 of file IMG_TileOptions.h.

virtual void IMG_TileOptions::setTextureOptions ( UT_Options options)
virtual

Texture options are only output for specific file formats. These texture options are used to pass information from the calling application to the device (where required). The application can write directly to the UT_Options, which will then be output in the file.

Member Data Documentation

UT_StringHolder IMG_TileOptions::myChannel
protected

Definition at line 109 of file IMG_TileOptions.h.

IMG_ColorModel IMG_TileOptions::myColorModel = IMG_CM_ANY
protected

Definition at line 113 of file IMG_TileOptions.h.

IMG_DataType IMG_TileOptions::myDataType = IMG_DT_ANY
protected

Definition at line 112 of file IMG_TileOptions.h.

UT_StringHolder IMG_TileOptions::myFilename
protected

Definition at line 108 of file IMG_TileOptions.h.

UT_StringHolder IMG_TileOptions::myFormatName
protected

Definition at line 110 of file IMG_TileOptions.h.

fpreal IMG_TileOptions::myGamma = 1
protected

Definition at line 115 of file IMG_TileOptions.h.

UT_Options IMG_TileOptions::myOptions
protected

Definition at line 111 of file IMG_TileOptions.h.

IMG_TypeInfo IMG_TileOptions::myTypeInfo = IMG_TI_UNDEFINED
protected

Definition at line 114 of file IMG_TileOptions.h.


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