Tesseract 3.02

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
tesseract::ColSegment Class Reference

`#include <tablefind.h>`

Inheritance diagram for tesseract::ColSegment:

List of all members.

## Public Member Functions
| ColSegment ()
| ~ColSegment ()
const TBOX & | bounding_box () const
void | set_top (int y)
void | set_bottom (int y)
void | set_left (int x)
void | set_right (int x)
void | set_bounding_box (const TBOX &other)
int | get_num_table_cells () const
void | set_num_table_cells (int n)
int | get_num_text_cells () const
void | set_num_text_cells (int n)
ColSegType | type () const
void | set_type ()
ScrollView::Color | BoxColor () const
void | InsertBox (const TBOX &other)
Public Member Functions inherited from ELIST_LINK
| ELIST_LINK ()
| ELIST_LINK (const ELIST_LINK &)
void | operator= (const ELIST_LINK &)

## Detailed Description

Definition at line 46 of file tablefind.h.

## Constructor & Destructor Documentation

tesseract::ColSegment::ColSegment | ( |  | ) |

Definition at line 2135 of file tablefind.cpp.

: ELIST_LINK(),
num_table_cells_(0),
num_text_cells_(0),
type_(COL_UNKNOWN) {
}

tesseract::ColSegment::~ColSegment | ( |  | ) |

Definition at line 2141 of file tablefind.cpp.

{
}

## Member Function Documentation

const TBOX& tesseract::ColSegment::bounding_box | ( |  | ) | const
| inline

Definition at line 52 of file tablefind.h.

{
return bounding_box_;
}

ScrollView::Color tesseract::ColSegment::BoxColor | ( |  | ) | const

Definition at line 2145 of file tablefind.cpp.

{
const ScrollView::Color kBoxColors[PT_COUNT] = {
ScrollView::YELLOW,
ScrollView::BLUE,
ScrollView::YELLOW,
ScrollView::MAGENTA,
};
return kBoxColors[type_];
}

int tesseract::ColSegment::get_num_table_cells | ( |  | ) | const
| inline

Definition at line 76 of file tablefind.h.

{
return num_table_cells_;
}

int tesseract::ColSegment::get_num_text_cells | ( |  | ) | const
| inline

Definition at line 85 of file tablefind.h.

{
return num_text_cells_;
}

void tesseract::ColSegment::InsertBox | ( | const TBOX & | other | ) |

Definition at line 2156 of file tablefind.cpp.

{
bounding_box_ = bounding_box_.bounding_union(other);
}

void tesseract::ColSegment::set_bottom | ( | int | y | ) |
| inline

Definition at line 60 of file tablefind.h.

{
bounding_box_.set_bottom(y);
}

void tesseract::ColSegment::set_bounding_box | ( | const TBOX & | other | ) |
| inline

Definition at line 72 of file tablefind.h.

{
bounding_box_ = other;
}

void tesseract::ColSegment::set_left | ( | int | x | ) |
| inline

Definition at line 64 of file tablefind.h.

{
bounding_box_.set_left(x);
}

void tesseract::ColSegment::set_num_table_cells | ( | int | n | ) |
| inline

Definition at line 81 of file tablefind.h.

{
num_table_cells_ = n;
}

void tesseract::ColSegment::set_num_text_cells | ( | int | n | ) |
| inline

Definition at line 90 of file tablefind.h.

{
num_text_cells_ = n;
}

void tesseract::ColSegment::set_right | ( | int | x | ) |
| inline

Definition at line 68 of file tablefind.h.

{
bounding_box_.set_right(x);
}

void tesseract::ColSegment::set_top | ( | int | y | ) |
| inline

Definition at line 56 of file tablefind.h.

{
bounding_box_.set_top(y);
}

void tesseract::ColSegment::set_type | ( |  | ) |

Definition at line 2162 of file tablefind.cpp.

{
if (num_table_cells_ > kTableColumnThreshold * num_text_cells_)
type_ = COL_TABLE;
else if (num_text_cells_ > num_table_cells_)
type_ = COL_TEXT;
else
type_ = COL_MIXED;
}

ColSegType tesseract::ColSegment::type | ( |  | ) | const
| inline

Definition at line 94 of file tablefind.h.

{
return type_;
}

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

- /mnt/data/src/tesseract-ocr/textord/tablefind.h
- /mnt/data/src/tesseract-ocr/textord/tablefind.cpp