ZBar Bar Code Reader Library  version 0.10
zbar::Image Class Reference

stores image data samples along with associated format and size metadata More...

Inheritance diagram for zbar::Image:
Collaboration diagram for zbar::Image:

Classes

class  Handler
 general Image result handler. More...
 
class  SymbolIterator
 

Public Member Functions

 Image (unsigned width=0, unsigned height=0, const std::string &format="", const void *data=NULL, unsigned long length=0)
 constructor. More...
 
 ~Image ()
 
Image convert (unsigned long format) const
 image format conversion. More...
 
Image convert (unsigned long format, unsigned width, unsigned height) const
 image format conversion with crop/pad. More...
 
const voidget_data () const
 return the image sample data. More...
 
unsigned long get_data_length () const
 return the size of the image sample data. More...
 
unsigned long get_format () const
 retrieve the image format. More...
 
unsigned get_height () const
 retrieve the height of the image. More...
 
unsigned get_sequence () const
 retrieve a "sequence" (page/frame) number associated with this image. More...
 
const SymbolSet get_symbols () const
 
unsigned get_width () const
 retrieve the width of the image. More...
 
 operator const zbar_image_t * () const
 cast to C image object More...
 
 operator zbar_image_t * ()
 cast to C image object More...
 
void set_data (const void *data, unsigned long length)
 specify image sample data. More...
 
void set_format (unsigned long format)
 specify the fourcc image format code for image sample data. More...
 
void set_format (const std::string &format)
 specify the fourcc image format code for image sample data. More...
 
void set_sequence (unsigned sequence_num)
 associate a "sequence" (page/frame) number with this image. More...
 
void set_size (unsigned width, unsigned height)
 specify the pixel size of the image. More...
 
void set_symbols (const SymbolSet &syms)
 
SymbolIterator symbol_begin () const
 create a new SymbolIterator over decoded results. More...
 
SymbolIterator symbol_end () const
 return a SymbolIterator suitable for ending iteration. More...
 

Protected Member Functions

 Image (zbar_image_t *src, int refs=0)
 constructor. More...
 

Static Protected Member Functions

static void _cleanup (zbar_image_t *img)
 default data cleanup (noop) More...
 

Private Attributes

zbar_image_t_img
 

Friends

class Video
 

Detailed Description

stores image data samples along with associated format and size metadata

Constructor & Destructor Documentation

zbar::Image::Image ( unsigned  width = 0,
unsigned  height = 0,
const std::string &  format = "",
const void data = NULL,
unsigned long  length = 0 
)
inline

constructor.

create a new Image with the specified parameters

References _img, test_zbar::data, format, scan_image::height, set_data(), set_format(), set_size(), scan_image::width, and zbar::zbar_image_set_userdata().

Referenced by convert().

Here is the call graph for this function:

Here is the caller graph for this function:

zbar::Image::~Image ( )
inline

References _img, and zbar::zbar_image_ref().

Here is the call graph for this function:

zbar::Image::Image ( zbar_image_t src,
int  refs = 0 
)
inlineprotected

constructor.

create a new Image from a zbar_image_t C object

References _img, zbar::zbar_image_ref(), and zbar::zbar_image_set_userdata().

Here is the call graph for this function:

Member Function Documentation

static void zbar::Image::_cleanup ( zbar_image_t img)
inlinestaticprotected

default data cleanup (noop)

References zbar::zbar_image_get_userdata().

Referenced by set_data().

Here is the call graph for this function:

Here is the caller graph for this function:

Image zbar::Image::convert ( unsigned long  format) const
inline

image format conversion.

see zbar_image_convert()

References _img, Image(), and zbar::zbar_image_convert().

Referenced by zbar::QZBarThread::processImage().

Here is the call graph for this function:

Here is the caller graph for this function:

Image zbar::Image::convert ( unsigned long  format,
unsigned  width,
unsigned  height 
) const
inline

image format conversion with crop/pad.

see zbar_image_convert_resize()

Since
0.4

References _img, Image(), and zbar::zbar_image_convert_resize().

Here is the call graph for this function:

const void* zbar::Image::get_data ( ) const
inline

return the image sample data.

see zbar_image_get_data()

References _img, and zbar::zbar_image_get_data().

Here is the call graph for this function:

unsigned long zbar::Image::get_data_length ( ) const
inline

return the size of the image sample data.

see zbar_image_get_data_length()

Since
0.6

References _img, and zbar::zbar_image_get_data_length().

Here is the call graph for this function:

unsigned long zbar::Image::get_format ( ) const
inline

retrieve the image format.

see zbar_image_get_format()

References _img, and zbar::zbar_image_get_format().

Here is the call graph for this function:

unsigned zbar::Image::get_height ( ) const
inline

retrieve the height of the image.

see zbar_image_get_height()

References _img, and zbar::zbar_image_get_height().

Here is the call graph for this function:

unsigned zbar::Image::get_sequence ( ) const
inline

retrieve a "sequence" (page/frame) number associated with this image.

see zbar_image_get_sequence()

Since
0.6

References _img, and zbar::zbar_image_get_sequence().

Here is the call graph for this function:

const SymbolSet zbar::Image::get_symbols ( ) const
inline

References _img, and zbar::zbar_image_get_symbols().

Referenced by zbar::QZBarThread::processImage(), and symbol_begin().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned zbar::Image::get_width ( ) const
inline

retrieve the width of the image.

see zbar_image_get_width()

References _img, and zbar::zbar_image_get_width().

Here is the call graph for this function:

zbar::Image::operator const zbar_image_t * ( ) const
inline

cast to C image object

References _img.

zbar::Image::operator zbar_image_t * ( )
inline

cast to C image object

References _img.

void zbar::Image::set_data ( const void data,
unsigned long  length 
)
inline

specify image sample data.

see zbar_image_set_data()

References _cleanup(), _img, and zbar::zbar_image_set_data().

Referenced by Image(), main(), and zbar::QZBarImage::QZBarImage().

Here is the call graph for this function:

Here is the caller graph for this function:

void zbar::Image::set_format ( unsigned long  format)
inline

specify the fourcc image format code for image sample data.

see zbar_image_set_format()

References _img, and zbar::zbar_image_set_format().

Referenced by Image(), and zbar::QZBarImage::QZBarImage().

Here is the call graph for this function:

Here is the caller graph for this function:

void zbar::Image::set_format ( const std::string &  format)
inline

specify the fourcc image format code for image sample data.

see zbar_image_set_format()

References _img, fourcc, and zbar::zbar_image_set_format().

Here is the call graph for this function:

void zbar::Image::set_sequence ( unsigned  sequence_num)
inline

associate a "sequence" (page/frame) number with this image.

see zbar_image_set_sequence()

Since
0.6

References _img, and zbar::zbar_image_set_sequence().

Here is the call graph for this function:

void zbar::Image::set_size ( unsigned  width,
unsigned  height 
)
inline

specify the pixel size of the image.

see zbar_image_set_size()

References _img, and zbar::zbar_image_set_size().

Referenced by Image(), and zbar::QZBarImage::QZBarImage().

Here is the call graph for this function:

Here is the caller graph for this function:

void zbar::Image::set_symbols ( const SymbolSet syms)
inline

References _img, and zbar::zbar_image_set_symbols().

Referenced by zbar::QZBarThread::processImage().

Here is the call graph for this function:

Here is the caller graph for this function:

SymbolIterator zbar::Image::symbol_begin ( ) const
inline

create a new SymbolIterator over decoded results.

References get_symbols().

Referenced by zbar::QZBarThread::image_callback(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

SymbolIterator zbar::Image::symbol_end ( ) const
inline

return a SymbolIterator suitable for ending iteration.

Referenced by zbar::QZBarThread::image_callback(), and main().

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class Video
friend

Member Data Documentation


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