Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

vetFrameRGB96 Class Reference

#include <vetFrameRGB96.h>

Inheritance diagram for vetFrameRGB96:

vetFrame vetCodec_BMP vetCodec_BMP

Public Types

enum  ChannelRGB { , BLUE }

Public Member Functions

 vetFrameRGB96 ()
 Default constructor, initialize height and width to 0.
 vetFrameRGB96 (unsigned int width, unsigned int height)
 Create an image with the given dimensions, allocates empty data.
 vetFrameRGB96 (vetFrameRGB96 &img)
 Copy Constructor, create an image from another image, copying memory.
 vetFrameRGB96 (vetFrameRGB24 &img)
 Copy Constructor, create an image from another image, copying memory.
 vetFrameRGB96 (vetFrameRGBA32 &img)
 Copy Constructor, create an image from another image, copying memory.
 vetFrameRGB96 (vetFrameGrey &img)
 Copy Constructor, create an image from another image, copying memory.
 ~vetFrameRGB96 ()
 Destructor currenly clear pixel data (array).
VETRESULT setWidth (unsigned int newWidth)
VETRESULT setHeight (unsigned int newHeight)
void * dump_buffer ()
 Read current buffer address.
VETRESULT reAllocCanvas (unsigned int w, unsigned int h)
unsigned int getBufferSize ()
 Read current buffer size (for example the real size of array).
unsigned int getBpp ()
 Get current format's BPP (Bits per Pixel).
VETRESULT setBlack ()
 Initialize image (with current canvas) to black (min brightness).
VETRESULT setWhite ()
 Initialize image (with current canvas) to white (max brightness).
VETRESULT extractBrightness (unsigned char *buffer, unsigned int *size=NULL)
VETRESULT setPixel (unsigned int x, unsigned int y, PixelRGB96 p)
 Set pixel (x, y) to the specified value, conversion to PixelGrey is implemented.
VETRESULT setRGB (unsigned int x, unsigned int y, int red, int green, int blue)
 Set pixel (x, y) to the specified values: Red, Green, Blue.
VETRESULT setChannel (unsigned int x, unsigned int y, ChannelRGB ch, int value)
 Set pixel (x, y) to the specified values: Red, Green, Blue.
VETRESULT getPixel (unsigned int x, unsigned int y, PixelRGB96 &p) const
 Get pixel (x, y) value and store it to p.
const PixelRGB96getPixel (unsigned int x, unsigned int y) const
int getChannel (unsigned int x, unsigned int y, ChannelRGB ch) const
 Get pixel's channel value (x, y).
vetFrameRGB96clear (int=0)
 Clear all pixel to the specified value.
vetFrameRGB96clearWith (PixelRGB96 &bg)
 Clear all pixel to the specified value.
vetFrameRGB96clearChannel (ChannelRGB ch, int bg=0)
 Clear all pixel to the specified value in specified channel.
vetFrameRGB96copy (vetFrameRGB96 &img)
 Copies all pixel data from img Throws an exception if images are of different size.
vetFrameRGB96operator= (vetFrameRGB96 &img)
 Copies all pixel data from img using copy method. Throws an exception if images are of different size.
vetFrameRGB96operator+= (vetFrameRGB96 &img)
 Overload equals-add (+=) operator for two images (pixel += loop) Throws an exception if images are of different size.
vetFrameRGB96operator-= (vetFrameRGB96 &img)
 Overload equals-sub (-=) operator for two images (pixel -= loop) Throws an exception if images are of different size.
vetFrameRGB96operator>> (vetFrameYUV420 &img)
 Ouput operator, export to standard VETLib frame formats, export image data, it's like a copy constructor by parameter side.
vetFrameRGB96operator>> (vetFrameRGB24 &img)
 Ouput operator, export to standard VETLib frame formats, export image data, it's like a copy constructor by parameter side.
vetFrameRGB96operator>> (vetFrameRGBA32 &img)
 Ouput operator, export to standard VETLib frame formats, export image data, it's like a copy constructor by parameter side.
vetFrameRGB96operator>> (vetFrameGrey &img)
 Ouput operator, export to standard VETLib frame formats, export image data, it's like a copy constructor by parameter side.
void operator<< (const vetFrameYUV420 &img)
 Input operator, import standard VETLib frame formats, load image data, it's like a copy constructor.
void operator<< (const vetFrameRGB24 &img)
 Input operator, import standard VETLib frame formats, load image data, it's like a copy constructor.
void operator<< (const vetFrameRGBA32 &img)
 Input operator, import standard VETLib frame formats, load image data, it's like a copy constructor.
void operator<< (const vetFrameGrey &img)
 Input operator, import standard VETLib frame formats, load image data, it's like a copy constructor.
VETFRAME_PROFILE getProfile ()
VETFRAME_CHANNEL_TYPE getChannelType ()
 
int getFOURCC ()
 Get FOURCC code of current data format, visit http://www.fourcc.org for all codes.

Data Fields

bool autoFreeData
PixelRGB96data

Detailed Description

An image consisting of red, green and blue pixels.

The image is stored as an array of ints, each pixel spanning three ints (one for each of its red, green and blue values).

Definition at line 46 of file vetFrameRGB96.h.


Member Enumeration Documentation

enum vetFrameRGB96::ChannelRGB
 

Enumerator:
BLUE  Select the red field so the operation is only performed on the red values of the image data.

Select the green field so the opertion is only performed on the green values of the image data.

Select the blue field so the operation is only performed on the blue values of the image data

Definition at line 73 of file vetFrameRGB96.h.


Constructor & Destructor Documentation

vetFrameRGB96::vetFrameRGB96 unsigned int  width,
unsigned int  height
 

Create an image with the given dimensions, allocates empty data.

Parameters:
width Width of the image
height Height of the image

Definition at line 28 of file vetFrameRGB96.cpp.

References data, DEBUG, vetFrame::height, INFO, reAllocCanvas(), and vetFrame::width.

vetFrameRGB96::vetFrameRGB96 vetFrameRGB96 img  ) 
 

Copy Constructor, create an image from another image, copying memory.

Parameters:
img source color image.

Definition at line 47 of file vetFrameRGB96.cpp.

References data, DEBUG, vetFrame::height, INFO, reAllocCanvas(), and vetFrame::width.

vetFrameRGB96::vetFrameRGB96 vetFrameRGB24 img  ) 
 

Copy Constructor, create an image from another image, copying memory.

Parameters:
img source color image.

Definition at line 65 of file vetFrameRGB96.cpp.

References data, DEBUG, vetFrame::height, INFO, reAllocCanvas(), and vetFrame::width.

vetFrameRGB96::vetFrameRGB96 vetFrameRGBA32 img  ) 
 

Copy Constructor, create an image from another image, copying memory.

Parameters:
img source color image.

Definition at line 82 of file vetFrameRGB96.cpp.

References data, DEBUG, vetFrame::height, INFO, reAllocCanvas(), and vetFrame::width.

vetFrameRGB96::vetFrameRGB96 vetFrameGrey img  ) 
 

Copy Constructor, create an image from another image, copying memory.

Parameters:
img source grey image.

vetFrameRGB96::~vetFrameRGB96  ) 
 

Destructor currenly clear pixel data (array).

Destructor for vetFrameRGB96 class. Frees memory allocated to array:

Definition at line 103 of file vetFrameRGB96.cpp.

References autoFreeData, data, and INFO.


Member Function Documentation

vetFrameRGB96 & vetFrameRGB96::clear int  = 0  ) 
 

Clear all pixel to the specified value.

Parameters:
bg a PixelRGB to overwrite on all image.
Returns:
current instance address.

Definition at line 287 of file vetFrameRGB96.cpp.

References data, DEBUGMSG, vetFrame::height, and vetFrame::width.

vetFrameRGB96 & vetFrameRGB96::clearChannel ChannelRGB  ch,
int  bg = 0
 

Clear all pixel to the specified value in specified channel.

Parameters:
ch the channel to clear.
bg pixel color to overwrite on the channel.
Returns:
current instance address.

Definition at line 328 of file vetFrameRGB96.cpp.

References data, DEBUG, vetFrame::height, INFO, and vetFrame::width.

vetFrameRGB96 & vetFrameRGB96::clearWith PixelRGB96 bg  ) 
 

Clear all pixel to the specified value.

Parameters:
bg a PixelRGB to overwrite on all image.
Returns:
current instance address.

Definition at line 306 of file vetFrameRGB96.cpp.

References BLUE, data, DEBUGMSG, vetFrame::height, and vetFrame::width.

vetFrameRGB96 & vetFrameRGB96::copy vetFrameRGB96 img  ) 
 

Copies all pixel data from img Throws an exception if images are of different size.

Parameters:
img The image to copy the data from.
Returns:
current instance.

Definition at line 370 of file vetFrameRGB96.cpp.

References data, vetFrame::height, INFO, and vetFrame::width.

Referenced by operator=().

void* vetFrameRGB96::dump_buffer  )  [inline, virtual]
 

Read current buffer address.

Returns:
pointer to current buffer.

Implements vetFrame.

Definition at line 125 of file vetFrameRGB96.h.

References data.

unsigned int vetFrameRGB96::getBpp  )  [inline, virtual]
 

Get current format's BPP (Bits per Pixel).

Returns:
number of bits for a single pixel (or macropixel).

Implements vetFrame.

Definition at line 133 of file vetFrameRGB96.h.

unsigned int vetFrameRGB96::getBufferSize  )  [inline, virtual]
 

Read current buffer size (for example the real size of array).

Returns:
size in bytes of current buffer.

Implements vetFrame.

Definition at line 130 of file vetFrameRGB96.h.

References vetFrame::height, and vetFrame::width.

VETRESULT vetFrameRGB96::getChannel unsigned int  x,
unsigned int  y,
ChannelRGB  ch
const
 

Get pixel's channel value (x, y).

Parameters:
x x position of the pixel.
y y position of the pixel.
ch selected channel (R, G, B enumeration).
Returns:
value of the selected channel in position (x, y)

Definition at line 266 of file vetFrameRGB96.cpp.

References VETRET_OK.

VETFRAME_CHANNEL_TYPE vetFrameRGB96::getChannelType  )  [inline, virtual]
 

Returns:
.

Implements vetFrame.

Definition at line 345 of file vetFrameRGB96.h.

int vetFrameRGB96::getFOURCC  )  [inline, virtual]
 

Get FOURCC code of current data format, visit http://www.fourcc.org for all codes.

Returns:
int value (usually defined as HEX 0x...).

Implements vetFrame.

Definition at line 347 of file vetFrameRGB96.h.

VETRESULT vetFrameRGB96::getPixel unsigned int  x,
unsigned int  y,
PixelRGB96 p
const
 

Get pixel (x, y) value and store it to p.

Parameters:
x x position of the pixel.
y y position of the pixel.
p address to store selected pixel's value.

Definition at line 231 of file vetFrameRGB96.cpp.

References VETRET_OK.

VETFRAME_PROFILE vetFrameRGB96::getProfile  )  [inline, virtual]
 

Returns:
.

Implements vetFrame.

Definition at line 344 of file vetFrameRGB96.h.

vetFrameRGB96 & vetFrameRGB96::operator+= vetFrameRGB96 img  ) 
 

Overload equals-add (+=) operator for two images (pixel += loop) Throws an exception if images are of different size.

Parameters:
img The image to add to current data.
Returns:
current instance.

Definition at line 395 of file vetFrameRGB96.cpp.

References data, vetFrame::height, INFO, and vetFrame::width.

vetFrameRGB96 & vetFrameRGB96::operator-= vetFrameRGB96 img  ) 
 

Overload equals-sub (-=) operator for two images (pixel -= loop) Throws an exception if images are of different size.

Parameters:
img The image to subtract to current data.
Returns:
current instance.

Definition at line 409 of file vetFrameRGB96.cpp.

References data, vetFrame::height, INFO, and vetFrame::width.

void vetFrameRGB96::operator<< const vetFrameGrey img  ) 
 

Input operator, import standard VETLib frame formats, load image data, it's like a copy constructor.

Parameters:
[in] img Greyscale VETLib Frame to be loaded.

Definition at line 595 of file vetFrameRGB96.cpp.

References BLUE_COEF, data, vetFrameGrey::data, GREEN_COEF, vetFrame::height, INFO, reAllocCanvas(), RED_COEF, and vetFrame::width.

void vetFrameRGB96::operator<< const vetFrameRGBA32 img  ) 
 

Input operator, import standard VETLib frame formats, load image data, it's like a copy constructor.

Parameters:
[in] img Color VETLib Frame to be loaded.

Definition at line 565 of file vetFrameRGB96.cpp.

References data, vetFrameRGBA32::data, vetFrame::height, INFO, reAllocCanvas(), and vetFrame::width.

void vetFrameRGB96::operator<< const vetFrameRGB24 img  ) 
 

Input operator, import standard VETLib frame formats, load image data, it's like a copy constructor.

Parameters:
[in] img VETLib Cache24 Frame to be loaded.

Definition at line 540 of file vetFrameRGB96.cpp.

References BLUE, vetFrameRGB24::data, data, vetFrame::height, INFO, reAllocCanvas(), and vetFrame::width.

void vetFrameRGB96::operator<< const vetFrameYUV420 img  ) 
 

Input operator, import standard VETLib frame formats, load image data, it's like a copy constructor.

Parameters:
[in] img VETLib Cache Frame to be loaded.

Definition at line 519 of file vetFrameRGB96.cpp.

References vetFrame::height, INFO, reAllocCanvas(), and vetFrame::width.

Referenced by vetCodec_BMP::importFrom(), and vetCodec_BMP::vetCodec_BMP().

vetFrameRGB96& vetFrameRGB96::operator= vetFrameRGB96 img  )  [inline]
 

Copies all pixel data from img using copy method. Throws an exception if images are of different size.

Parameters:
img The image to copy the data from.
Returns:
current instance.

Definition at line 246 of file vetFrameRGB96.h.

References copy().

vetFrameRGB96 & vetFrameRGB96::operator>> vetFrameGrey img  ) 
 

Ouput operator, export to standard VETLib frame formats, export image data, it's like a copy constructor by parameter side.

Parameters:
[out] img Greyscale VETLib Frame to store data.
Returns:
Address of current instance.

Definition at line 497 of file vetFrameRGB96.cpp.

References vetFrame::height, INFO, vetFrameGrey::reAllocCanvas(), and vetFrame::width.

vetFrameRGB96 & vetFrameRGB96::operator>> vetFrameRGBA32 img  ) 
 

Ouput operator, export to standard VETLib frame formats, export image data, it's like a copy constructor by parameter side.

Parameters:
[out] img Color VETLib Frame to store data.
Returns:
Address of current instance.

Definition at line 476 of file vetFrameRGB96.cpp.

References vetFrame::height, INFO, vetFrameRGBA32::reAllocCanvas(), and vetFrame::width.

vetFrameRGB96 & vetFrameRGB96::operator>> vetFrameRGB24 img  ) 
 

Ouput operator, export to standard VETLib frame formats, export image data, it's like a copy constructor by parameter side.

Parameters:
[out] img VETLib Cache24 Frame to store data.
Returns:
Address of current instance.

Reimplemented in vetCodec_BMP, and vetCodec_BMP.

Definition at line 449 of file vetFrameRGB96.cpp.

References BLUE, data, vetFrameRGB24::data, vetFrame::height, INFO, vetFrameRGB24::reAllocCanvas(), and vetFrame::width.

vetFrameRGB96 & vetFrameRGB96::operator>> vetFrameYUV420 img  ) 
 

Ouput operator, export to standard VETLib frame formats, export image data, it's like a copy constructor by parameter side.

Parameters:
[out] img VETLib Cache Frame to store data.
Returns:
Address of current instance.

Reimplemented in vetCodec_BMP, and vetCodec_BMP.

Definition at line 422 of file vetFrameRGB96.cpp.

References vetFrame::height, INFO, vetFrameYUV420::reAllocCanvas(), and vetFrame::width.

Referenced by vetCodec_BMP::extractTo().

VETRESULT vetFrameRGB96::setChannel unsigned int  x,
unsigned int  y,
ChannelRGB  ch,
int  value
 

Set pixel (x, y) to the specified values: Red, Green, Blue.

Parameters:
x x position of the pixel.
y y position of the pixel.
ch selected channel (R, G, B enumeration).
value selected channel's value of the selected pixel.

Definition at line 209 of file vetFrameRGB96.cpp.

References data, vetFrame::height, VETRET_OK, and vetFrame::width.

VETRESULT vetFrameRGB96::setPixel unsigned int  x,
unsigned int  y,
PixelRGB96  p
 

Set pixel (x, y) to the specified value, conversion to PixelGrey is implemented.

Parameters:
x x position of the pixel.
y y position of the pixel.
p new value for the selected coords.
Note:
No check is made that x and y are in range.

Definition at line 166 of file vetFrameRGB96.cpp.

References data, vetFrame::height, VETRET_OK, and vetFrame::width.

VETRESULT vetFrameRGB96::setRGB unsigned int  x,
unsigned int  y,
int  red,
int  green,
int  blue
 

Set pixel (x, y) to the specified values: Red, Green, Blue.

Parameters:
x x position of the pixel.
y y position of the pixel.
red red channel's value of the selected pixel.
green green channel's value of the selected pixel.
blue blue channel's value of the selected pixel.

Definition at line 184 of file vetFrameRGB96.cpp.

References BLUE, data, vetFrame::height, VETRET_OK, and vetFrame::width.


The documentation for this class was generated from the following files:
Generated on Tue Jan 24 11:59:37 2006 for VETLib by  doxygen 1.4.4