IMAGELINE Class Reference

#include <img.h>

List of all members.


Detailed Description

One line of image class.

Definition at line 253 of file img.h.

Public Member Functions

Public Attributes

Private Attributes

Friends


Constructor & Destructor Documentation

IMAGELINE::IMAGELINE (  )  [inline]

Definition at line 263 of file img.h.

References NULL.

00263                 {  //default constructor
00264       linewidth = 0;
00265       line = NULL;
00266       pixels = line;
00267       bpp = 8;
00268     }

IMAGELINE::~IMAGELINE (  )  [inline]

Definition at line 282 of file img.h.

References free_mem(), and NULL.

00282                   {              //destructor
00283       if (line != NULL)
00284         free_mem(line); 
00285     }


Member Function Documentation

void IMAGELINE::init (  )  [inline]

Definition at line 295 of file img.h.

References NULL.

00295                 { 
00296       if (line == NULL)
00297         init (0);
00298       else {
00299         pixels = line;
00300         bpp = 8;
00301       }
00302     }

void IMAGELINE::init ( INT32  width  )  [inline]

Definition at line 269 of file img.h.

References alloc_mem(), free_mem(), MAXIMAGEWIDTH, and NULL.

Referenced by block_edges(), PIXROW::char_clip_image(), IMAGE::convolver(), TessBaseAPI::DumpPGM(), enlarge_sub_image(), fast_reduce_sub_image(), IMAGE::get_column(), IMAGE::get_line(), match1(), read_tif_image(), reduce_sub_image(), and TessBaseAPI::ThresholdRect().

00270                            {  //size of line
00271       if (width <= 0)
00272         width = MAXIMAGEWIDTH;
00273       if (width > linewidth) {
00274         if (line != NULL)
00275           free_mem(line); 
00276         linewidth = width;
00277         line = (UINT8 *) alloc_mem (linewidth * sizeof (UINT8));
00278       }
00279       pixels = line;
00280       bpp = 8;
00281     }

COLOUR_PIX IMAGELINE::operator[] ( INT32  index  )  [inline]

Definition at line 258 of file img.h.

00259                  {
00260       return &pixels[index * 3]; //coercion access op
00261     }

void IMAGELINE::set_bpp ( INT8  new_bpp  )  [inline]

Definition at line 287 of file img.h.

Referenced by IMAGE::convolver(), and reduce_sub_image().

00288                                {
00289       if (new_bpp <= 8)
00290         bpp = 8;
00291       else
00292         bpp = 24;
00293     }


Friends And Related Function Documentation

void IMAGE::fast_get_line ( INT32  x,
INT32  y,
INT32  width,
IMAGELINE linebuf 
) [friend]

void IMAGE::fast_put_line ( INT32  x,
INT32  y,
INT32  width,
IMAGELINE linebuf 
) [friend]

void IMAGE::get_column ( INT32  x,
INT32  y,
INT32  height,
IMAGELINE linebuf,
INT32  margins 
) [friend]

void IMAGE::get_line ( INT32  x,
INT32  y,
INT32  width,
IMAGELINE linebuf,
INT32  margins 
) [friend]

void IMAGE::put_column ( INT32  x,
INT32  y,
INT32  height,
IMAGELINE linebuf,
INT32  margins 
) [friend]

void IMAGE::put_line ( INT32  x,
INT32  y,
INT32  width,
IMAGELINE linebuf,
INT32  margins 
) [friend]


Member Data Documentation

INT8 IMAGELINE::bpp

Definition at line 257 of file img.h.

Referenced by enlarge_sub_image(), IMAGE::fast_get_line(), fast_reduce_sub_image(), IMAGE::get_line(), IMAGE::put_column(), and IMAGE::put_line().

UINT8* IMAGELINE::line [private]

Definition at line 343 of file img.h.

Referenced by IMAGE::fast_put_line(), IMAGE::get_column(), and IMAGE::get_line().

INT32 IMAGELINE::linewidth [private]

Definition at line 344 of file img.h.

UINT8* IMAGELINE::pixels

Definition at line 256 of file img.h.

Referenced by CHAR_PROTO::add_sample(), bias_sub_image(), block_edges(), PIXROW::char_clip_image(), CHAR_PROTO::CHAR_PROTO(), PIXROW::contract(), IMAGE::convolver(), copy_sub_image(), TessBaseAPI::DumpPGM(), enlarge_sub_image(), PIXROW::extend(), IMAGE::fast_get_line(), fast_reduce_sub_image(), IMAGE::get_column(), IMAGE::get_line(), invert_image(), CHAR_PROTO::make_image(), match1(), IMAGE::put_column(), IMAGE::put_line(), read_tif_image(), reduce_sub_image(), scale_image(), starbase_to_normal(), TessBaseAPI::ThresholdRect(), and whiteout_block().


The documentation for this class was generated from the following file:
Generated on Wed Feb 28 19:49:32 2007 for Tesseract by  doxygen 1.5.1