BLOCK Class Reference
#include <ocrblock.h>
List of all members.
Public Member Functions |
| | BLOCK () |
| | BLOCK (const char *name, BOOL8 prop, inT16 kern, inT16 space, inT16 xmin, inT16 ymin, inT16 xmax, inT16 ymax) |
| | ~BLOCK () |
| void | set_stats (BOOL8 prop, inT16 kern, inT16 space, inT16 ch_pitch) |
| void | set_xheight (inT32 height) |
| | set char size
|
| void | set_font_class (inT16 font) |
| | set font class
|
| BOOL8 | prop () const |
| | return proportional
|
| bool | right_to_left () const |
| void | set_right_to_left (bool value) |
| inT32 | fixed_pitch () const |
| | return pitch
|
| inT16 | kern () const |
| | return kerning
|
| inT16 | font () const |
| | return font class
|
| inT16 | space () const |
| | return spacing
|
| const char * | name () const |
| | return filename
|
| inT32 | x_height () const |
| | return xheight
|
| float | cell_over_xheight () const |
| void | set_cell_over_xheight (float ratio) |
| ROW_LIST * | row_list () |
| | get rows
|
| void | compute_row_margins () |
| PARA_LIST * | para_list () |
| C_BLOB_LIST * | blob_list () |
| | get blobs
|
| C_BLOB_LIST * | reject_blobs () |
| FCOORD | re_rotation () const |
| void | set_re_rotation (const FCOORD &rotation) |
| FCOORD | classify_rotation () const |
| void | set_classify_rotation (const FCOORD &rotation) |
| FCOORD | skew () const |
| void | set_skew (const FCOORD &skew) |
| const ICOORD & | median_size () const |
| void | set_median_size (int x, int y) |
| Pix * | render_mask () |
| void | reflect_polygon_in_y_axis () |
| void | rotate (const FCOORD &rotation) |
| void | sort_rows () |
| | decreasing y order
|
| void | compress () |
| | shrink white space
|
| void | check_pitch () |
| | check proportional
|
| void | compress (const ICOORD vec) |
| | shrink white space and move by vector
|
| void | print (FILE *fp, BOOL8 dump) |
| | dump whole table
|
| BLOCK & | operator= (const BLOCK &source) |
Friends |
| class | BLOCK_RECT_IT |
Constructor & Destructor Documentation
| BLOCK::BLOCK |
( |
|
) |
[inline] |
| BLOCK::~BLOCK |
( |
|
) |
[inline] |
Member Function Documentation
| C_BLOB_LIST* BLOCK::blob_list |
( |
|
) |
[inline] |
| float BLOCK::cell_over_xheight |
( |
|
) |
const [inline] |
| void BLOCK::check_pitch |
( |
|
) |
|
check proportional
BLOCK::check_pitch
Check whether the block is fixed or prop, set the flag, and set the pitch if it is fixed.
| FCOORD BLOCK::classify_rotation |
( |
|
) |
const [inline] |
| void BLOCK::compress |
( |
const ICOORD |
vec |
) |
|
shrink white space and move by vector
BLOCK::compress
Compress and move in a single operation.
shrink white space
BLOCK::compress
Delete space between the rows. (And maybe one day, compress the rows) Fill space of block from top down, left aligning rows.
| void BLOCK::compute_row_margins |
( |
|
) |
|
| inT32 BLOCK::fixed_pitch |
( |
|
) |
const [inline] |
| inT16 BLOCK::font |
( |
|
) |
const [inline] |
| inT16 BLOCK::kern |
( |
|
) |
const [inline] |
| const ICOORD& BLOCK::median_size |
( |
|
) |
const [inline] |
| const char* BLOCK::name |
( |
|
) |
const [inline] |
BLOCK::operator=
Assignment - duplicate the block structure, but with an EMPTY row list.
| PARA_LIST* BLOCK::para_list |
( |
|
) |
[inline] |
| void BLOCK::print |
( |
FILE * |
fp, |
|
|
BOOL8 |
dump | |
|
) |
| | |
| BOOL8 BLOCK::prop |
( |
|
) |
const [inline] |
| FCOORD BLOCK::re_rotation |
( |
|
) |
const [inline] |
| void BLOCK::reflect_polygon_in_y_axis |
( |
|
) |
|
| C_BLOB_LIST* BLOCK::reject_blobs |
( |
|
) |
[inline] |
| Pix* BLOCK::render_mask |
( |
|
) |
[inline] |
| bool BLOCK::right_to_left |
( |
|
) |
const [inline] |
| void BLOCK::rotate |
( |
const FCOORD & |
rotation |
) |
|
BLOCK::rotate
Rotate the polygon by the given rotation and recompute the bounding_box.
| ROW_LIST* BLOCK::row_list |
( |
|
) |
[inline] |
| void BLOCK::set_cell_over_xheight |
( |
float |
ratio |
) |
[inline] |
| void BLOCK::set_classify_rotation |
( |
const FCOORD & |
rotation |
) |
[inline] |
| void BLOCK::set_font_class |
( |
inT16 |
font |
) |
[inline] |
| void BLOCK::set_median_size |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | [inline] |
| void BLOCK::set_re_rotation |
( |
const FCOORD & |
rotation |
) |
[inline] |
| void BLOCK::set_right_to_left |
( |
bool |
value |
) |
[inline] |
| void BLOCK::set_skew |
( |
const FCOORD & |
skew |
) |
[inline] |
set space size etc.
- Parameters:
-
| prop | proportional |
| kern | inter char size |
| space | inter word size |
| ch_pitch | pitch if fixed |
| void BLOCK::set_xheight |
( |
inT32 |
height |
) |
[inline] |
| FCOORD BLOCK::skew |
( |
|
) |
const [inline] |
| void BLOCK::sort_rows |
( |
|
) |
|
decreasing y order
BLOCK::sort_rows
Order rows so that they are in order of decreasing Y coordinate
| inT16 BLOCK::space |
( |
|
) |
const [inline] |
| inT32 BLOCK::x_height |
( |
|
) |
const [inline] |
Friends And Related Function Documentation
Reimplemented from PDBLK.
The documentation for this class was generated from the following files:
- /home/rays/src/opensrc/tesseract-ocr/ccstruct/ocrblock.h
- /home/rays/src/opensrc/tesseract-ocr/ccstruct/ocrblock.cpp