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

#include <IMG_Raster.h>

+ Inheritance diagram for IMG_Raster:

Public Types

typedef void(* img_3SumFunc_8 )(int sums[], UT_RGBA *above, UT_RGBA *center, UT_RGBA *below)
 
typedef void(* img_3SumFunc_16 )(int sums[], UT_BIG_RGBA *above, UT_BIG_RGBA *center, UT_BIG_RGBA *below)
 
typedef void(* img_3x3FilterFunc_8 )(UT_RGBA *out, UT_RGBA *p, int r, int g, int b, int a)
 
typedef void(* img_3x3FilterFunc_16 )(UT_BIG_RGBA *out, UT_BIG_RGBA *p, int r, int g, int b, int a)
 
typedef void(* img_HpassFunc_8 )(img_3x3FilterFunc_8 do_pixel, img_3SumFunc_8 do_sum, UT_RGBA *output, int length, UT_RGBA *above, UT_RGBA *center, UT_RGBA *below)
 
typedef void(* img_HpassFunc_16 )(img_3x3FilterFunc_16 do_pixel, img_3SumFunc_16 do_sum, UT_BIG_RGBA *output, int length, UT_BIG_RGBA *above, UT_BIG_RGBA *center, UT_BIG_RGBA *below)
 
- Public Types inherited from UT_Raster
enum  UT_RasterDepth { UT_RASTER_8, UT_RASTER_16 }
 
enum  UT_ColorModel { UT_MODEL_RGBA, UT_MODEL_ABGR }
 

Public Member Functions

 IMG_Raster ()
 
 IMG_Raster (short xres, short yres, UT_RasterDepth depth)
 
 IMG_Raster (short xres, short yres, UT_RGBA *image=0)
 
 IMG_Raster (short xres, short yres, UT_BIG_RGBA *image)
 
 IMG_Raster (const IMG_Raster &r)
 
virtual ~IMG_Raster ()
 
void setAlpha (float alpha)
 
void setCompositeOp (IMG_CompositeOp op)
 
IMG_CompositeOp getCompositeOp () const
 
void compositePixel (UT_RGBA *dest, UT_RGBA *op)
 
void compositePixel (UT_RGBA *dest, UT_BIG_RGBA *op)
 
void compositePixel (UT_BIG_RGBA *dest, UT_BIG_RGBA *op)
 
void compositePixel (UT_BIG_RGBA *dest, UT_RGBA *op)
 
void composite (IMG_Raster *r, short x=0, short y=0)
 
void filter (IMG_FilterOp op, float arg=0.5, short x=0, short y=0, short w=0, short h=0)
 
void convolveFilter (UT_FilterType xfilter, float xwidth, UT_FilterType yfilter, float ywidth)
 
void size (short w, short h, void *newRaster=0)
 
void crop (short x, short y, short w, short h)
 
void rgbaScale (float rrange[2], float grange[2], float brange[2], float arange[2], short x=0, short y=0, short w=0, short h=0)
 
void setChannelMask (int r, int g, int b, int a)
 
void setEdgeChannel (IMG_Channel chan, unsigned options=0)
 
void setChromaKey (const UT_HSVA c1, const UT_HSVA c2, const UT_HSVA delta, int alpha)
 
void setEmbossParams (const IMG_EMBOSS_PARAMS &bp)
 
void getEmbossParams (IMG_EMBOSS_PARAMS *bp) const
 
virtual UT_RGBAgetPixel (short x, short y) const
 
virtual UT_BIG_RGBAgetDeepPixel (short x, short y) const
 
virtual voidgetVoidPixel (short x, short y) const
 
void resize (short w, short h, UT_FilterType filter=UT_FILTER_POINT)
 
void resizeCopy (IMG_Raster *src, short w, short h, UT_FilterType filt=UT_FILTER_POINT, float filter_width=0.0F)
 
void resizeCopy (IMG_Raster *src, short w, short h, UT_FilterType xfilter, float xwidth, UT_FilterType yfilter, float ywidth)
 
void resizeCropCopy (IMG_Raster *src, short sl, short sb, short sw, short sh, short w, short h)
 
int save (const char *pathname, bool quiet=false)
 
int save (const char *pathname, int fullHeight, void *tag, int(*more)(IMG_Raster *r, void *, int, int), unsigned margin=0)
 
int save (std::ostream &os, int binary=1) const
 
voidopenSave (const char *pathname, int fullHeight)
 
voidsaveMore (void *handle)
 
void abortSave (void *handle)
 
int load (const char *pathname, IMG_ScaleOp scaled=IMG_SCALE_NONE, UT_FilterType filter=UT_FILTER_POINT, short size=100, bool watermarked=false, bool topremult=true)
 
int load (const char *pathname, short xres, short yres, IMG_ScaleOp scaled=IMG_SCALE_SIZE, UT_FilterType filter=UT_FILTER_BOX, short yJump=0, short yThrow=0, short xJump=0, short xThrow=0, short yHave=0)
 
bool load (UT_IStream &is)
 
int stat (const char *pathname, short *xres, short *yres)
 
void setClipOffset (short x, short y)
 
void setClipSize (short w, short h)
 
short getClipX () const
 
short getClipY () const
 
short getClipW () const
 
short getClipH () const
 
void getClippedOp (short *x, short *y, short *w, short *h) const
 
void operator= (const IMG_Raster &r)
 
void operator= (const IMG_RasterHSVA &r)
 
- Public Member Functions inherited from UT_Raster
 UT_Raster ()
 
virtual ~UT_Raster ()
 
short Xres () const
 
short Yres () const
 
void clear (const UT_RGBA &pixel)
 
void clear (const UT_BIG_RGBA &pixel)
 
void clear (const UT_Color &color, fpreal alpha=1.0f)
 
void clear (int x1, int y1, int x2, int y2, const UT_RGBA &color)
 
void clear (int x1, int y1, int x2, int y2, const UT_BIG_RGBA &color)
 
UT_RasterDepth getRasterDepth (void) const
 
void setRasterDepth (UT_RasterDepth depth)
 
UT_ColorModel getColorModel (void) const
 
void setColorModel (UT_ColorModel model)
 
void byteSwapRaster ()
 
UT_RGBAgetRaster () const
 
UT_BIG_RGBAgetDeepRaster () const
 
voidgetVoidRaster () const
 
int getBytesPerPixel (void)
 
void setNewRaster (UT_RGBA *r)
 
void setNewRaster (UT_BIG_RGBA *r)
 
void setPhantom (short b, short t)
 
short getPbot (void)
 
short getPtop (void)
 

Static Public Member Functions

static void mult_8_8 (UT_RGBA *pixel, unsigned int alpha, unsigned int *a, unsigned int *b, unsigned int *g, unsigned int *r)
 
static void mult_8_16 (UT_RGBA *pixel, unsigned int alpha, unsigned int *a, unsigned int *b, unsigned int *g, unsigned int *r, unsigned int point_five)
 
static void mult_16_8 (UT_BIG_RGBA *pixel, unsigned int alpha, unsigned int *a, unsigned int *b, unsigned int *g, unsigned int *r, unsigned int point_five)
 
static void mult_16_16 (UT_BIG_RGBA *pixel, unsigned int alpha, unsigned int *a, unsigned int *b, unsigned int *g, unsigned int *r)
 

Protected Member Functions

void blurOp_8 (float weight=0.5)
 
void blurOp_16 (float weight=0.5)
 
void bumpOp_8 (float weight=0.5)
 
void bumpOp_16 (float weight=0.5)
 
void edgeOp_8 (float weight=0.5)
 
void edgeOp_16 (float weight=0.5)
 
void sharpenOp_8 (float weight=0.5)
 
void sharpenOp_16 (float weight=0.5)
 
void composite_8_8 (IMG_Raster *, short x, short y)
 
void composite_8_16 (IMG_Raster *, short x, short y)
 
void composite_16_8 (IMG_Raster *, short x, short y)
 
void composite_16_16 (IMG_Raster *, short x, short y)
 
void setCompositeOp_8_8 (IMG_CompositeOp op)
 
void setCompositeOp_8_16 (IMG_CompositeOp op)
 
void setCompositeOp_16_8 (IMG_CompositeOp op)
 
void setCompositeOp_16_16 (IMG_CompositeOp op)
 
- Protected Member Functions inherited from UT_Raster
void setBaseSize (short width, short height, void *newRaster=0)
 
voidallocateMemory (int size)
 
voidreAllocateMemory (void *mem, int size)
 
void freeMemory (void *mem)
 
void init ()
 

Static Protected Member Functions

static unsigned short ut_chanR_8 (UT_RGBA *p)
 
static unsigned short ut_chanG_8 (UT_RGBA *p)
 
static unsigned short ut_chanB_8 (UT_RGBA *p)
 
static unsigned short ut_chanA_8 (UT_RGBA *p)
 
static unsigned short ut_chanL_8 (UT_RGBA *p)
 
static unsigned short ut_chanH_8 (UT_RGBA *p)
 
static unsigned short ut_chanS_8 (UT_RGBA *p)
 
static unsigned short ut_chanV_8 (UT_RGBA *p)
 
static unsigned short ut_chanR_16 (UT_BIG_RGBA *p)
 
static unsigned short ut_chanG_16 (UT_BIG_RGBA *p)
 
static unsigned short ut_chanB_16 (UT_BIG_RGBA *p)
 
static unsigned short ut_chanA_16 (UT_BIG_RGBA *p)
 
static unsigned short ut_chanL_16 (UT_BIG_RGBA *p)
 
static unsigned short ut_chanH_16 (UT_BIG_RGBA *p)
 
static unsigned short ut_chanS_16 (UT_BIG_RGBA *p)
 
static unsigned short ut_chanV_16 (UT_BIG_RGBA *p)
 
static voidcompositeThreadMgr (void *data)
 

Protected Attributes

IMG_Compositebit_8_8 compositebit_8_8
 
IMG_Compositebit_8_16 compositebit_8_16
 
IMG_Compositebit_16_16 compositebit_16_16
 
IMG_Compositebit_16_8 compositebit_16_8
 
IMG_CompositeOp compositeOp
 
short channelMask
 
short clip_x
 
short clip_y
 
short clip_w
 
short clip_h
 
short op_x
 
short op_y
 
short op_w
 
short op_h
 
img_ioState * io
 
- Protected Attributes inherited from UT_Raster
UT_BIG_RGBAraster16
 
UT_RGBAraster
 
UT_RGBA ** scanlines
 
UT_RasterDepth pixelDepth
 
UT_ColorModel myModel
 
short xres
 
short yres
 
short pBot
 
short pTop
 

Additional Inherited Members

- Static Public Attributes inherited from UT_Raster
static UT_RGBA zeroPixel
 
static UT_RGBA onePixel
 

Detailed Description

Examples:
SOP/SOP_CopRaster.h.

Definition at line 50 of file IMG_Raster.h.

Member Typedef Documentation

typedef void(* IMG_Raster::img_3SumFunc_16)(int sums[], UT_BIG_RGBA *above, UT_BIG_RGBA *center, UT_BIG_RGBA *below)

Definition at line 257 of file IMG_Raster.h.

typedef void(* IMG_Raster::img_3SumFunc_8)(int sums[], UT_RGBA *above, UT_RGBA *center, UT_RGBA *below)

Definition at line 252 of file IMG_Raster.h.

typedef void(* IMG_Raster::img_3x3FilterFunc_16)(UT_BIG_RGBA *out, UT_BIG_RGBA *p, int r, int g, int b, int a)

Definition at line 266 of file IMG_Raster.h.

typedef void(* IMG_Raster::img_3x3FilterFunc_8)(UT_RGBA *out, UT_RGBA *p, int r, int g, int b, int a)

Definition at line 263 of file IMG_Raster.h.

typedef void(* IMG_Raster::img_HpassFunc_16)(img_3x3FilterFunc_16 do_pixel, img_3SumFunc_16 do_sum, UT_BIG_RGBA *output, int length, UT_BIG_RGBA *above, UT_BIG_RGBA *center, UT_BIG_RGBA *below)

Definition at line 278 of file IMG_Raster.h.

typedef void(* IMG_Raster::img_HpassFunc_8)(img_3x3FilterFunc_8 do_pixel, img_3SumFunc_8 do_sum, UT_RGBA *output, int length, UT_RGBA *above, UT_RGBA *center, UT_RGBA *below)

Definition at line 270 of file IMG_Raster.h.

Constructor & Destructor Documentation

IMG_Raster::IMG_Raster ( )
IMG_Raster::IMG_Raster ( short  xres,
short  yres,
UT_RasterDepth  depth 
)
IMG_Raster::IMG_Raster ( short  xres,
short  yres,
UT_RGBA image = 0 
)
IMG_Raster::IMG_Raster ( short  xres,
short  yres,
UT_BIG_RGBA image 
)
IMG_Raster::IMG_Raster ( const IMG_Raster r)
virtual IMG_Raster::~IMG_Raster ( )
virtual

Member Function Documentation

void IMG_Raster::abortSave ( void handle)
void IMG_Raster::blurOp_16 ( float  weight = 0.5)
protected
void IMG_Raster::blurOp_8 ( float  weight = 0.5)
protected
void IMG_Raster::bumpOp_16 ( float  weight = 0.5)
protected
void IMG_Raster::bumpOp_8 ( float  weight = 0.5)
protected
void IMG_Raster::composite ( IMG_Raster r,
short  x = 0,
short  y = 0 
)
void IMG_Raster::composite_16_16 ( IMG_Raster ,
short  x,
short  y 
)
protected
void IMG_Raster::composite_16_8 ( IMG_Raster ,
short  x,
short  y 
)
protected
void IMG_Raster::composite_8_16 ( IMG_Raster ,
short  x,
short  y 
)
protected
void IMG_Raster::composite_8_8 ( IMG_Raster ,
short  x,
short  y 
)
protected
void IMG_Raster::compositePixel ( UT_RGBA dest,
UT_RGBA op 
)
inline

Definition at line 64 of file IMG_Raster.h.

void IMG_Raster::compositePixel ( UT_RGBA dest,
UT_BIG_RGBA op 
)
inline

Definition at line 67 of file IMG_Raster.h.

void IMG_Raster::compositePixel ( UT_BIG_RGBA dest,
UT_BIG_RGBA op 
)
inline

Definition at line 70 of file IMG_Raster.h.

void IMG_Raster::compositePixel ( UT_BIG_RGBA dest,
UT_RGBA op 
)
inline

Definition at line 73 of file IMG_Raster.h.

static void* IMG_Raster::compositeThreadMgr ( void data)
staticprotected
void IMG_Raster::convolveFilter ( UT_FilterType  xfilter,
float  xwidth,
UT_FilterType  yfilter,
float  ywidth 
)
void IMG_Raster::crop ( short  x,
short  y,
short  w,
short  h 
)
void IMG_Raster::edgeOp_16 ( float  weight = 0.5)
protected
void IMG_Raster::edgeOp_8 ( float  weight = 0.5)
protected
void IMG_Raster::filter ( IMG_FilterOp  op,
float  arg = 0.5,
short  x = 0,
short  y = 0,
short  w = 0,
short  h = 0 
)
short IMG_Raster::getClipH ( ) const
inline

Definition at line 169 of file IMG_Raster.h.

void IMG_Raster::getClippedOp ( short *  x,
short *  y,
short *  w,
short *  h 
) const
short IMG_Raster::getClipW ( ) const
inline

Definition at line 168 of file IMG_Raster.h.

short IMG_Raster::getClipX ( ) const
inline

Definition at line 166 of file IMG_Raster.h.

short IMG_Raster::getClipY ( ) const
inline

Definition at line 167 of file IMG_Raster.h.

IMG_CompositeOp IMG_Raster::getCompositeOp ( ) const
inline

Definition at line 62 of file IMG_Raster.h.

virtual UT_BIG_RGBA* IMG_Raster::getDeepPixel ( short  x,
short  y 
) const
virtual
void IMG_Raster::getEmbossParams ( IMG_EMBOSS_PARAMS bp) const
virtual UT_RGBA* IMG_Raster::getPixel ( short  x,
short  y 
) const
virtual
virtual void* IMG_Raster::getVoidPixel ( short  x,
short  y 
) const
virtual
int IMG_Raster::load ( const char *  pathname,
IMG_ScaleOp  scaled = IMG_SCALE_NONE,
UT_FilterType  filter = UT_FILTER_POINT,
short  size = 100,
bool  watermarked = false,
bool  topremult = true 
)
Examples:
SOP/SOP_CopRaster.C.
int IMG_Raster::load ( const char *  pathname,
short  xres,
short  yres,
IMG_ScaleOp  scaled = IMG_SCALE_SIZE,
UT_FilterType  filter = UT_FILTER_BOX,
short  yJump = 0,
short  yThrow = 0,
short  xJump = 0,
short  xThrow = 0,
short  yHave = 0 
)
bool IMG_Raster::load ( UT_IStream is)
static void IMG_Raster::mult_16_16 ( UT_BIG_RGBA pixel,
unsigned int  alpha,
unsigned int a,
unsigned int b,
unsigned int g,
unsigned int r 
)
static
static void IMG_Raster::mult_16_8 ( UT_BIG_RGBA pixel,
unsigned int  alpha,
unsigned int a,
unsigned int b,
unsigned int g,
unsigned int r,
unsigned int  point_five 
)
static
static void IMG_Raster::mult_8_16 ( UT_RGBA pixel,
unsigned int  alpha,
unsigned int a,
unsigned int b,
unsigned int g,
unsigned int r,
unsigned int  point_five 
)
static
static void IMG_Raster::mult_8_8 ( UT_RGBA pixel,
unsigned int  alpha,
unsigned int a,
unsigned int b,
unsigned int g,
unsigned int r 
)
static
void* IMG_Raster::openSave ( const char *  pathname,
int  fullHeight 
)
void IMG_Raster::operator= ( const IMG_Raster r)
void IMG_Raster::operator= ( const IMG_RasterHSVA &  r)
void IMG_Raster::resize ( short  w,
short  h,
UT_FilterType  filter = UT_FILTER_POINT 
)
void IMG_Raster::resizeCopy ( IMG_Raster src,
short  w,
short  h,
UT_FilterType  filt = UT_FILTER_POINT,
float  filter_width = 0.0F 
)
inline

Definition at line 118 of file IMG_Raster.h.

void IMG_Raster::resizeCopy ( IMG_Raster src,
short  w,
short  h,
UT_FilterType  xfilter,
float  xwidth,
UT_FilterType  yfilter,
float  ywidth 
)
void IMG_Raster::resizeCropCopy ( IMG_Raster src,
short  sl,
short  sb,
short  sw,
short  sh,
short  w,
short  h 
)
void IMG_Raster::rgbaScale ( float  rrange[2],
float  grange[2],
float  brange[2],
float  arange[2],
short  x = 0,
short  y = 0,
short  w = 0,
short  h = 0 
)
int IMG_Raster::save ( const char *  pathname,
bool  quiet = false 
)
int IMG_Raster::save ( const char *  pathname,
int  fullHeight,
void tag,
int(*)(IMG_Raster *r, void *, int, int more,
unsigned  margin = 0 
)
int IMG_Raster::save ( std::ostream &  os,
int  binary = 1 
) const
void* IMG_Raster::saveMore ( void handle)
void IMG_Raster::setAlpha ( float  alpha)
void IMG_Raster::setChannelMask ( int  r,
int  g,
int  b,
int  a 
)
void IMG_Raster::setChromaKey ( const UT_HSVA  c1,
const UT_HSVA  c2,
const UT_HSVA  delta,
int  alpha 
)
void IMG_Raster::setClipOffset ( short  x,
short  y 
)
void IMG_Raster::setClipSize ( short  w,
short  h 
)
void IMG_Raster::setCompositeOp ( IMG_CompositeOp  op)
void IMG_Raster::setCompositeOp_16_16 ( IMG_CompositeOp  op)
protected
void IMG_Raster::setCompositeOp_16_8 ( IMG_CompositeOp  op)
protected
void IMG_Raster::setCompositeOp_8_16 ( IMG_CompositeOp  op)
protected
void IMG_Raster::setCompositeOp_8_8 ( IMG_CompositeOp  op)
protected
void IMG_Raster::setEdgeChannel ( IMG_Channel  chan,
unsigned  options = 0 
)
void IMG_Raster::setEmbossParams ( const IMG_EMBOSS_PARAMS bp)
void IMG_Raster::sharpenOp_16 ( float  weight = 0.5)
protected
void IMG_Raster::sharpenOp_8 ( float  weight = 0.5)
protected
void IMG_Raster::size ( short  w,
short  h,
void newRaster = 0 
)
Examples:
SOP/SOP_CopRaster.C.
int IMG_Raster::stat ( const char *  pathname,
short *  xres,
short *  yres 
)
static unsigned short IMG_Raster::ut_chanA_16 ( UT_BIG_RGBA p)
staticprotected
static unsigned short IMG_Raster::ut_chanA_8 ( UT_RGBA p)
staticprotected
static unsigned short IMG_Raster::ut_chanB_16 ( UT_BIG_RGBA p)
staticprotected
static unsigned short IMG_Raster::ut_chanB_8 ( UT_RGBA p)
staticprotected
static unsigned short IMG_Raster::ut_chanG_16 ( UT_BIG_RGBA p)
staticprotected
static unsigned short IMG_Raster::ut_chanG_8 ( UT_RGBA p)
staticprotected
static unsigned short IMG_Raster::ut_chanH_16 ( UT_BIG_RGBA p)
staticprotected
static unsigned short IMG_Raster::ut_chanH_8 ( UT_RGBA p)
staticprotected
static unsigned short IMG_Raster::ut_chanL_16 ( UT_BIG_RGBA p)
staticprotected
static unsigned short IMG_Raster::ut_chanL_8 ( UT_RGBA p)
staticprotected
static unsigned short IMG_Raster::ut_chanR_16 ( UT_BIG_RGBA p)
staticprotected
static unsigned short IMG_Raster::ut_chanR_8 ( UT_RGBA p)
staticprotected
static unsigned short IMG_Raster::ut_chanS_16 ( UT_BIG_RGBA p)
staticprotected
static unsigned short IMG_Raster::ut_chanS_8 ( UT_RGBA p)
staticprotected
static unsigned short IMG_Raster::ut_chanV_16 ( UT_BIG_RGBA p)
staticprotected
static unsigned short IMG_Raster::ut_chanV_8 ( UT_RGBA p)
staticprotected

Member Data Documentation

short IMG_Raster::channelMask
protected

Definition at line 237 of file IMG_Raster.h.

short IMG_Raster::clip_h
protected

Definition at line 241 of file IMG_Raster.h.

short IMG_Raster::clip_w
protected

Definition at line 240 of file IMG_Raster.h.

short IMG_Raster::clip_x
protected

Definition at line 238 of file IMG_Raster.h.

short IMG_Raster::clip_y
protected

Definition at line 239 of file IMG_Raster.h.

IMG_Compositebit_16_16 IMG_Raster::compositebit_16_16
protected

Definition at line 232 of file IMG_Raster.h.

IMG_Compositebit_16_8 IMG_Raster::compositebit_16_8
protected

Definition at line 233 of file IMG_Raster.h.

IMG_Compositebit_8_16 IMG_Raster::compositebit_8_16
protected

Definition at line 231 of file IMG_Raster.h.

IMG_Compositebit_8_8 IMG_Raster::compositebit_8_8
protected

Definition at line 230 of file IMG_Raster.h.

IMG_CompositeOp IMG_Raster::compositeOp
protected

Definition at line 235 of file IMG_Raster.h.

img_ioState* IMG_Raster::io
protected

Definition at line 247 of file IMG_Raster.h.

short IMG_Raster::op_h
protected

Definition at line 245 of file IMG_Raster.h.

short IMG_Raster::op_w
protected

Definition at line 244 of file IMG_Raster.h.

short IMG_Raster::op_x
protected

Definition at line 242 of file IMG_Raster.h.

short IMG_Raster::op_y
protected

Definition at line 243 of file IMG_Raster.h.


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