PXL_Raster Class Reference

#include <PXL_Raster.h>

Inheritance diagram for PXL_Raster:

UT_SmallObject< PXL_Raster, UT_SMALLOBJECT_CLEANPAGES_OFF, 250, UT_SMALLOBJECT_THREADSAFE_ON > UT_SmallObjectDefaultSuperClass TIL_Raster

List of all members.

Public Member Functions

 PXL_Raster ()
 PXL_Raster (const PXL_Raster &)
 PXL_Raster (const PXL_Raster &, int x1, int y1, int x2, int y2)
 PXL_Raster (PXL_Packing p, PXL_DataFormat f, int xres=0, int yres=0, int clear=0, int alloc=1)
virtual ~PXL_Raster ()
virtual void copy (const PXL_Raster &src)
void setPacking (PXL_Packing p)
void setFormat (PXL_DataFormat f)
void setRes (int x, int y)
void setBWPoints (float black, float white)
void init ()
void setRaster (void *r, bool give_ownership=true, bool use_offset=false)
void * steal ()
int isValid () const
int getXres () const
int getYres () const
int getNumPixels () const
int64 getStride () const
int64 getSize () const
PXL_DataFormat getFormat () const
PXL_Packing getPacking () const
void getBWPoints (float &black, float &white) const
void setDataWindow (const UT_DimRect &new_rect)
const UT_DimRectgetDataWindow () const
bool hasDataWindow () const
void getRange (float &min, float &max, float black=0.0f, float white=1.0f, int comp=-1, bool ignore_farthest=false) const
void * getPixels ()
const void * getPixels () const
const void * getRawPixels () const
void * getPixel (int x, int y, int comp=0)
const void * getPixel (int x, int y, int comp=0) const
void getPixelValue (int x, int y, float *vals) const
int isInterleaved () const
int areComponentsRenderable () const
int64 getNonInterleavedSize () const
void clear (void *color=0)
void clearNormal (float *color, unsigned ib=0, unsigned iw=0)
void readFromRow (int y, void *data) const
void writeToRow (int y, const void *data)
void writeToColumn (int x, const void *data)
virtual void reset (int full=0)
void extract (const PXL_Raster &from, int x1, int y1, int x2, int y2)
void applyLUT (const PXL_Raster *src, float *lptr[4], int comp, float lstart, float lend)
void streakEdges (int x1, int y1, int x2, int y2, PXL_StreakComponents streak_comps=PXL_STREAK_ALL)
void convert8Bit (unsigned b, unsigned w)
void adjustSaturation (float sat)
bool load (UT_IStream &is)
int save (ostream &os, int binary=1) const
int getProxyIndex () const
void setDataWritten (bool written=true)
bool getDataWritten () const
void setTextureID (unsigned int id)
unsigned int getTextureID () const
void clearTextureID ()
void dither (const UT_DimRect &crop)
void dither ()

Protected Member Functions

virtual void initialize ()
void allocRaster (int alloc_mem=1)
void applyLUT8 (const PXL_Raster *src, float *lptr[4], int comp, float lscale, float lshift, int size)
void applyLUT16 (const PXL_Raster *src, float *lptr[4], int comp, float lscale, float lshift, int size)
virtual void attemptRealloc (int64 size)

Protected Attributes

PXL_DataFormat myFormat
PXL_Packing myPacking
unsigned int myRasterOffset
int myXres
int myYres
int64 myStride
int64 myRasterSize
float myBlack
float myWhite
void * myRaster
bool myAmOwner
int myProxyIndex
bool myWriteFlag
unsigned int myTextureID
UT_DimRect myDataWindow


Detailed Description

Definition at line 39 of file PXL_Raster.h.


Constructor & Destructor Documentation

PXL_Raster::PXL_Raster (  ) 

PXL_Raster::PXL_Raster ( const PXL_Raster  ) 

PXL_Raster::PXL_Raster ( const PXL_Raster ,
int  x1,
int  y1,
int  x2,
int  y2 
)

PXL_Raster::PXL_Raster ( PXL_Packing  p,
PXL_DataFormat  f,
int  xres = 0,
int  yres = 0,
int  clear = 0,
int  alloc = 1 
)

virtual PXL_Raster::~PXL_Raster (  )  [virtual]


Member Function Documentation

void PXL_Raster::adjustSaturation ( float  sat  ) 

void PXL_Raster::allocRaster ( int  alloc_mem = 1  )  [protected]

void PXL_Raster::applyLUT ( const PXL_Raster src,
float *  lptr[4],
int  comp,
float  lstart,
float  lend 
)

void PXL_Raster::applyLUT16 ( const PXL_Raster src,
float *  lptr[4],
int  comp,
float  lscale,
float  lshift,
int  size 
) [protected]

void PXL_Raster::applyLUT8 ( const PXL_Raster src,
float *  lptr[4],
int  comp,
float  lscale,
float  lshift,
int  size 
) [protected]

int PXL_Raster::areComponentsRenderable (  )  const

virtual void PXL_Raster::attemptRealloc ( int64  size  )  [protected, virtual]

Reimplemented in TIL_Raster.

void PXL_Raster::clear ( void *  color = 0  ) 

void PXL_Raster::clearNormal ( float *  color,
unsigned  ib = 0,
unsigned  iw = 0 
)

void PXL_Raster::clearTextureID (  ) 

void PXL_Raster::convert8Bit ( unsigned  b,
unsigned  w 
)

virtual void PXL_Raster::copy ( const PXL_Raster src  )  [virtual]

Reimplemented in TIL_Raster.

void PXL_Raster::dither (  ) 

void PXL_Raster::dither ( const UT_DimRect crop  ) 

void PXL_Raster::extract ( const PXL_Raster from,
int  x1,
int  y1,
int  x2,
int  y2 
)

void PXL_Raster::getBWPoints ( float &  black,
float &  white 
) const

const UT_DimRect& PXL_Raster::getDataWindow (  )  const [inline]

Definition at line 90 of file PXL_Raster.h.

bool PXL_Raster::getDataWritten (  )  const [inline]

Definition at line 177 of file PXL_Raster.h.

PXL_DataFormat PXL_Raster::getFormat (  )  const [inline]

Definition at line 84 of file PXL_Raster.h.

int64 PXL_Raster::getNonInterleavedSize (  )  const

int PXL_Raster::getNumPixels (  )  const [inline]

Definition at line 81 of file PXL_Raster.h.

PXL_Packing PXL_Raster::getPacking (  )  const [inline]

Definition at line 85 of file PXL_Raster.h.

const void* PXL_Raster::getPixel ( int  x,
int  y,
int  comp = 0 
) const

void* PXL_Raster::getPixel ( int  x,
int  y,
int  comp = 0 
)

const void* PXL_Raster::getPixels (  )  const [inline]

Definition at line 108 of file PXL_Raster.h.

void* PXL_Raster::getPixels (  )  [inline]

Examples:
SOP/SOP_CopRaster.C.

Definition at line 105 of file PXL_Raster.h.

void PXL_Raster::getPixelValue ( int  x,
int  y,
float *  vals 
) const

int PXL_Raster::getProxyIndex (  )  const [inline]

Definition at line 173 of file PXL_Raster.h.

void PXL_Raster::getRange ( float &  min,
float &  max,
float  black = 0.0f,
float  white = 1.0f,
int  comp = -1,
bool  ignore_farthest = false 
) const

const void* PXL_Raster::getRawPixels (  )  const [inline]

Definition at line 112 of file PXL_Raster.h.

int64 PXL_Raster::getSize ( void   )  const [inline]

Examples:
SOP/SOP_CopRaster.C.

Definition at line 83 of file PXL_Raster.h.

int64 PXL_Raster::getStride (  )  const [inline]

Definition at line 82 of file PXL_Raster.h.

unsigned int PXL_Raster::getTextureID (  )  const

int PXL_Raster::getXres (  )  const [inline]

Examples:
SOP/SOP_CopRaster.C.

Definition at line 79 of file PXL_Raster.h.

int PXL_Raster::getYres (  )  const [inline]

Examples:
SOP/SOP_CopRaster.C.

Definition at line 80 of file PXL_Raster.h.

bool PXL_Raster::hasDataWindow (  )  const [inline]

Definition at line 92 of file PXL_Raster.h.

void PXL_Raster::init (  ) 

virtual void PXL_Raster::initialize (  )  [protected, virtual]

Reimplemented in TIL_Raster.

int PXL_Raster::isInterleaved (  )  const

int PXL_Raster::isValid ( void   )  const [inline]

Definition at line 77 of file PXL_Raster.h.

bool PXL_Raster::load ( UT_IStream is  ) 

void PXL_Raster::readFromRow ( int  y,
void *  data 
) const

virtual void PXL_Raster::reset ( int  full = 0  )  [virtual]

Reimplemented in TIL_Raster.

int PXL_Raster::save ( ostream &  os,
int  binary = 1 
) const

void PXL_Raster::setBWPoints ( float  black,
float  white 
)

void PXL_Raster::setDataWindow ( const UT_DimRect new_rect  ) 

void PXL_Raster::setDataWritten ( bool  written = true  )  [inline]

Definition at line 175 of file PXL_Raster.h.

void PXL_Raster::setFormat ( PXL_DataFormat  f  ) 

void PXL_Raster::setPacking ( PXL_Packing  p  ) 

void PXL_Raster::setRaster ( void *  r,
bool  give_ownership = true,
bool  use_offset = false 
)

void PXL_Raster::setRes ( int  x,
int  y 
)

void PXL_Raster::setTextureID ( unsigned int  id  )  [inline]

Definition at line 179 of file PXL_Raster.h.

void* PXL_Raster::steal (  ) 

void PXL_Raster::streakEdges ( int  x1,
int  y1,
int  x2,
int  y2,
PXL_StreakComponents  streak_comps = PXL_STREAK_ALL 
)

void PXL_Raster::writeToColumn ( int  x,
const void *  data 
)

void PXL_Raster::writeToRow ( int  y,
const void *  data 
)


Member Data Documentation

bool PXL_Raster::myAmOwner [protected]

Definition at line 210 of file PXL_Raster.h.

float PXL_Raster::myBlack [protected]

Definition at line 208 of file PXL_Raster.h.

Definition at line 215 of file PXL_Raster.h.

Definition at line 202 of file PXL_Raster.h.

Definition at line 203 of file PXL_Raster.h.

int PXL_Raster::myProxyIndex [protected]

Definition at line 211 of file PXL_Raster.h.

void* PXL_Raster::myRaster [protected]

Definition at line 209 of file PXL_Raster.h.

unsigned int PXL_Raster::myRasterOffset [protected]

Definition at line 204 of file PXL_Raster.h.

Definition at line 207 of file PXL_Raster.h.

Definition at line 206 of file PXL_Raster.h.

unsigned int PXL_Raster::myTextureID [protected]

Definition at line 213 of file PXL_Raster.h.

float PXL_Raster::myWhite [protected]

Definition at line 208 of file PXL_Raster.h.

bool PXL_Raster::myWriteFlag [protected]

Definition at line 212 of file PXL_Raster.h.

int PXL_Raster::myXres [protected]

Definition at line 205 of file PXL_Raster.h.

int PXL_Raster::myYres [protected]

Definition at line 205 of file PXL_Raster.h.


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

Generated on Fri May 25 00:10:35 2012 for HDK by  doxygen 1.5.9