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

vetFrameT< T > Class Template Reference

#include <vetFrameT.h>

Inheritance diagram for vetFrameT< T >:

vetFrame

Public Member Functions

 vetFrameT ()
 Default constructor, initialize height and width to 0.
 vetFrameT (unsigned int w, unsigned int h)
 vetFrameT (unsigned int w, unsigned int h, vetFrame::VETFRAME_PROFILE prof, vetFrame::VETFRAME_CHANNEL_TYPE dataTy=vetFrame::VETFRAME_CT_PLANAR)
 Create an image with the given dimensions, allocates empty data.
 vetFrameT (vetFrameT &img)
 Copy Constructor, create an image from another image, copying memory.
 ~vetFrameT ()
 Destructor currenly clear pixel data (array).
bool isBuiltInSupportedProfile (VETFRAME_PROFILE pr)
unsigned int getWidth () const
 read current image's width.
unsigned int getWidth ()
 Read current image's width.
unsigned int getHeight () const
 read current image's height.
unsigned int getHeight ()
 Read current image's height.
void * dump_buffer ()
 Read current buffer address.
VETRESULT reAllocCanvas (unsigned int w, unsigned int h)
VETRESULT extractBrightness (unsigned char *buffer, unsigned int *size=NULL)
unsigned int getBpp ()
 Get current format's BPP (Bits per Pixel).
unsigned int getBufferSize ()
 Read current buffer size (for example the real size of array).
VETRESULT setBlack ()
 Initialize image (with current canvas) to black (min brightness).
VETRESULT setWhite ()
 Initialize image (with current canvas) to white (max brightness).
VETRESULT setPixel (unsigned int x, unsigned int y, T p)
 Set pixel (x, y) to the specified value.
VETRESULT getPixel (unsigned int x, unsigned int y, T &p)
 Get pixel (x, y) value and store it to p.
vetFrameToperator= (vetFrameT &img)
 Copies all pixel data from img. Throws an exception if images are of different size.
vetFrameToperator+= (vetFrameT &img)
 Overload equals-add (+=) operator for two images (pixel += loop) Throws an exception if images are of different size.
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

unsigned int width
unsigned int height
bool autoFreeData
VETFRAME_PROFILE profile
VETFRAME_CHANNEL_TYPE dataType
T * data

Detailed Description

template<class T>
class vetFrameT< T >

Bug:
Warning:
Todo:
See also:

vetFrame

Version:
0.6
Date:
12/07/2005 - //2005
Author:
Alessandro Polo
VETLib Framework 1.0.2 Copyright (C) Alessandro Polo 2006 http://www.ewgate.net/vetlib

Definition at line 45 of file vetFrameT.h.


Constructor & Destructor Documentation

template<class T>
vetFrameT< T >::vetFrameT unsigned int  w,
unsigned int  h,
vetFrame::VETFRAME_PROFILE  prof,
vetFrame::VETFRAME_CHANNEL_TYPE  dataTy = vetFrame::VETFRAME_CT_PLANAR
[inline]
 

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

Parameters:
w Width of the image.
h Height of the image.

Definition at line 103 of file vetFrameT.h.

template<class T>
vetFrameT< T >::vetFrameT vetFrameT< T > &  img  )  [inline]
 

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

Parameters:
img source image.

Definition at line 117 of file vetFrameT.h.


Member Function Documentation

template<class T>
void* vetFrameT< T >::dump_buffer  )  [inline, virtual]
 

Read current buffer address.

Returns:
pointer to current buffer.

Implements vetFrame.

Definition at line 177 of file vetFrameT.h.

template<class T>
unsigned int vetFrameT< T >::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 224 of file vetFrameT.h.

template<class T>
unsigned int vetFrameT< T >::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 245 of file vetFrameT.h.

Referenced by vetFilterNoiseChannel::generateNoise(), vetFrameT< unsigned char >::operator=(), vetFrameT< unsigned char >::setBlack(), vetFrameT< unsigned char >::setWhite(), and vetFrameT< unsigned char >::vetFrameT().

template<class T>
VETFRAME_CHANNEL_TYPE vetFrameT< T >::getChannelType  )  [inline, virtual]
 

Returns:
.

Implements vetFrame.

Definition at line 446 of file vetFrameT.h.

template<class T>
int vetFrameT< T >::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 449 of file vetFrameT.h.

template<class T>
unsigned int vetFrameT< T >::getHeight  )  [inline]
 

Read current image's height.

Returns:
Height in pixel.

Reimplemented from vetFrame.

Definition at line 174 of file vetFrameT.h.

template<class T>
unsigned int vetFrameT< T >::getHeight  )  const [inline]
 

read current image's height.

Returns:
Height in pixel.

Reimplemented from vetFrame.

Definition at line 173 of file vetFrameT.h.

Referenced by vetCodec_IMG::load(), and vetCodec_BMP::load().

template<class T>
VETRESULT vetFrameT< T >::getPixel unsigned int  x,
unsigned int  y,
T &  p
[inline]
 

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.
Note:
No check is made that x and y are in range.

Definition at line 363 of file vetFrameT.h.

template<class T>
VETFRAME_PROFILE vetFrameT< T >::getProfile  )  [inline, virtual]
 

Returns:
.

Implements vetFrame.

Definition at line 444 of file vetFrameT.h.

template<class T>
unsigned int vetFrameT< T >::getWidth  )  [inline]
 

Read current image's width.

Returns:
Width in pixel.

Reimplemented from vetFrame.

Definition at line 166 of file vetFrameT.h.

template<class T>
unsigned int vetFrameT< T >::getWidth  )  const [inline]
 

read current image's width.

Returns:
Width in pixel.

Reimplemented from vetFrame.

Definition at line 165 of file vetFrameT.h.

Referenced by vetCodec_IMG::load(), and vetCodec_BMP::load().

template<class T>
vetFrameT& vetFrameT< T >::operator+= vetFrameT< T > &  img  )  [inline]
 

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 419 of file vetFrameT.h.

template<class T>
vetFrameT& vetFrameT< T >::operator= vetFrameT< T > &  img  )  [inline]
 

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 389 of file vetFrameT.h.

template<class T>
VETRESULT vetFrameT< T >::setPixel unsigned int  x,
unsigned int  y,
p
[inline]
 

Set pixel (x, y) to the specified value.

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 335 of file vetFrameT.h.


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