PPL Logo

ImageData Class Reference

#include <ImageData.h>

Collaboration diagram for ImageData:

Collaboration graph
[legend]

Public Member Functions

 ImageData (int bytesPerPixel)
 ~ImageData ()
int GetBuffSize (const int &startx, const int &starty, const int &sizex, const int &sizey, const int req_wid, const int req_ht, const byte *src)
int GetImageDataSize (void)
int AddImage (const int req_wid, byte *dest=NULL)
void WriteHeader (ImageDataCombine_t combine, const liveVizRequest *req, byte *dest)
void ReadHeader (ImageDataCombine_t &combine, liveVizRequest *req, const byte *src)
int CombineImageDataSize (int nMsg, CkReductionMsg **msgs)
void CombineImageData (int nMsg, CkReductionMsg **msgs, byte *dest)
byteConstructImage (byte *src, liveVizRequest &req)

Private Member Functions

int CopyImageData (byte *dest, int n, const CkReductionMsg *msg, ImageDataCombine_t reducer)
byteGetClippedImage (const byte *img, const int &startx, const int &starty, const int &sizex, const int &sizey, const int req_wid, const int req_ht)
bool IsPixelOn (const byte *pixel)
void CopyPixel (byte *dest, const byte *src)
int NumNonNullLists (int *pos, const int *size, const int &n)
int GetNonNullListIndex (const int *pos, const int &n)
void SetSize (int nLines, int nPixels)
 Make our image size be this many lines and pixels.
LineHeadergetHeader (void *src, int lineNo)
 Get the header for this line of this compressed image.
 ImageData ()

Private Attributes

int m_bytesPerPixel
int m_size
int m_headerSize
int m_numDataLines
bytem_header
bytem_clippedImage
bool m_clippedImageAllocated
int m_startx
int m_starty
int m_sizex
int m_sizey

Data Structures

class  ImageHeader
 This header is stored as the first thing in our buffer. More...
class  LineHeader
 Describes a row of image data. More...

Detailed Description

Definition at line 13 of file ImageData.h.


Constructor & Destructor Documentation

ImageData::ImageData ( int  bytesPerPixel  ) 

ImageData::~ImageData (  ) 

Definition at line 18 of file ImageData.C.

References m_clippedImage, m_clippedImageAllocated, and m_header.

ImageData::ImageData (  )  [inline, private]

Definition at line 298 of file ImageData.h.


Member Function Documentation

int ImageData::GetBuffSize ( const int startx,
const int starty,
const int sizex,
const int sizey,
const int  req_wid,
const int  req_ht,
const byte src 
)

Definition at line 67 of file ImageData.C.

References AddImage(), and GetClippedImage().

Referenced by liveVizPollDeposit().

int ImageData::GetImageDataSize ( void   )  [inline]

Definition at line 37 of file ImageData.h.

References m_size.

int ImageData::AddImage ( const int  req_wid,
byte dest = NULL 
)

void ImageData::WriteHeader ( ImageDataCombine_t  combine,
const liveVizRequest req,
byte dest 
)

Definition at line 31 of file ImageData.C.

References ImageData::ImageHeader::m_combine, and ImageData::ImageHeader::m_req.

Referenced by liveVizPollDeposit().

void ImageData::ReadHeader ( ImageDataCombine_t combine,
liveVizRequest req,
const byte src 
)

Definition at line 43 of file ImageData.C.

References ImageData::ImageHeader::m_combine, and ImageData::ImageHeader::m_req.

int ImageData::CombineImageDataSize ( int  nMsg,
CkReductionMsg **  msgs 
)

"buff" consists of two totally different things: 1.) It's got a compressed image header and lineheaders for the merged image. 2.) It's got the "pos" and "size" arrays used for sorting.

Definition at line 478 of file ImageData.C.

References getHeader(), GetNonNullListIndex(), m_header, ImageData::LineHeader::m_pos, m_size, ImageData::LineHeader::m_size, NumNonNullLists(), SetSize(), and size.

Referenced by imagePollCombineReducer().

void ImageData::CombineImageData ( int  nMsg,
CkReductionMsg **  msgs,
byte dest 
)

Definition at line 672 of file ImageData.C.

References CopyImageData(), m_header, m_headerSize, m_numDataLines, and m_size.

Referenced by imagePollCombineReducer().

byte * ImageData::ConstructImage ( byte src,
liveVizRequest req 
)

int ImageData::CopyImageData ( byte dest,
int  n,
const CkReductionMsg *  msg,
ImageDataCombine_t  reducer 
) [private]

byte * ImageData::GetClippedImage ( const byte img,
const int startx,
const int starty,
const int sizex,
const int sizey,
const int  req_wid,
const int  req_ht 
) [private]

bool ImageData::IsPixelOn ( const byte pixel  )  [inline, private]

Definition at line 150 of file ImageData.h.

References m_bytesPerPixel.

Referenced by AddImage().

void ImageData::CopyPixel ( byte dest,
const byte src 
) [inline, private]

Definition at line 168 of file ImageData.h.

References m_bytesPerPixel.

Referenced by AddImage().

int ImageData::NumNonNullLists ( int pos,
const int size,
const int n 
) [inline, private]

Definition at line 178 of file ImageData.h.

Referenced by CombineImageDataSize().

int ImageData::GetNonNullListIndex ( const int pos,
const int n 
) [inline, private]

Definition at line 200 of file ImageData.h.

Referenced by CombineImageDataSize().

void ImageData::SetSize ( int  nLines,
int  nPixels 
) [inline, private]

Make our image size be this many lines and pixels.

Definition at line 238 of file ImageData.h.

References m_bytesPerPixel, m_headerSize, m_numDataLines, and m_size.

Referenced by AddImage(), and CombineImageDataSize().

LineHeader* ImageData::getHeader ( void *  src,
int  lineNo 
) [inline, private]

Get the header for this line of this compressed image.

Definition at line 247 of file ImageData.h.

Referenced by CombineImageDataSize().


Field Documentation

Definition at line 218 of file ImageData.h.

Referenced by AddImage(), CopyPixel(), GetClippedImage(), ImageData(), IsPixelOn(), and SetSize().

Definition at line 229 of file ImageData.h.

Referenced by CombineImageData(), ImageData(), and SetSize().

Definition at line 234 of file ImageData.h.

Referenced by AddImage(), CombineImageData(), ImageData(), and SetSize().

Definition at line 260 of file ImageData.h.

Referenced by CombineImageData(), CombineImageDataSize(), ImageData(), and ~ImageData().

Definition at line 268 of file ImageData.h.

Referenced by AddImage(), GetClippedImage(), ImageData(), and ~ImageData().

Definition at line 273 of file ImageData.h.

Referenced by GetClippedImage(), ImageData(), and ~ImageData().

Definition at line 278 of file ImageData.h.

Referenced by AddImage(), GetClippedImage(), and ImageData().

Definition at line 283 of file ImageData.h.

Referenced by AddImage(), GetClippedImage(), and ImageData().

Definition at line 288 of file ImageData.h.

Referenced by AddImage(), GetClippedImage(), and ImageData().

Definition at line 293 of file ImageData.h.

Referenced by AddImage(), GetClippedImage(), and ImageData().


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

Generated on Fri May 25 08:03:49 2012 for Charm++ by  doxygen 1.5.5