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::WorkingPartSet Class Reference

`#include <workingpartset.h>`

Inheritance diagram for tesseract::WorkingPartSet:

List of all members.

## Public Member Functions

| WorkingPartSet ()
| WorkingPartSet (ColPartition *column)
ColPartition * | column () const
void | set_column (ColPartition *col)
void | AddPartition (ColPartition *part)
void | ExtractCompletedBlocks (const ICOORD &bleft, const ICOORD &tright, int resolution, ColPartition_LIST *used_parts, BLOCK_LIST *blocks, TO_BLOCK_LIST *to_blocks)
void | InsertCompletedBlocks (BLOCK_LIST *blocks, TO_BLOCK_LIST *to_blocks)
Public Member Functions inherited from ELIST_LINK
| ELIST_LINK ()
| ELIST_LINK (const ELIST_LINK &)
void | operator= (const ELIST_LINK &)

## Detailed Description

Definition at line 32 of file workingpartset.h.

## Constructor & Destructor Documentation

tesseract::WorkingPartSet::WorkingPartSet | ( |  | ) |

inline

Definition at line 34 of file workingpartset.h.

{
}

tesseract::WorkingPartSet::WorkingPartSet | ( | ColPartition * | column | ) |

inlineexplicit

Definition at line 36 of file workingpartset.h.

: column_(column), latest_part_(NULL), part_it_(&part_set_) {
}

## Member Function Documentation

void tesseract::WorkingPartSet::AddPartition | ( | ColPartition * | part | ) |

Definition at line 31 of file workingpartset.cpp.

{
ColPartition* partner = part->SingletonPartner(true);
if (partner != NULL) {
ASSERT_HOST(partner->SingletonPartner(false) == part);
}
if (latest_part_ == NULL || partner == NULL) {
// This partition goes at the end of the list
part_it_.move_to_last();
} else if (latest_part_->SingletonPartner(false) != part) {
// Reposition the iterator to the correct partner, or at the end.
for (part_it_.move_to_first(); !part_it_.at_last() &&
part_it_.data() != partner;
part_it_.forward());
}
part_it_.add_after_then_move(part);
latest_part_ = part;
}

ColPartition* tesseract::WorkingPartSet::column | ( |  | ) | const

inline

Definition at line 41 of file workingpartset.h.

{
return column_;
}

void tesseract::WorkingPartSet::ExtractCompletedBlocks | ( | const ICOORD & | bleft,
|  | const ICOORD & | tright,
|  | int | resolution,
|  | ColPartition_LIST * | used_parts,
|  | BLOCK_LIST * | blocks,
|  | TO_BLOCK_LIST * | to_blocks
| ) |  |

Definition at line 55 of file workingpartset.cpp.

{
MakeBlocks(bleft, tright, resolution, used_parts);
BLOCK_IT block_it(blocks);
block_it.move_to_last();
block_it.add_list_after(&completed_blocks_);
TO_BLOCK_IT to_block_it(to_blocks);
to_block_it.move_to_last();
to_block_it.add_list_after(&to_blocks_);
}

void tesseract::WorkingPartSet::InsertCompletedBlocks | ( | BLOCK_LIST * | blocks,
|  | TO_BLOCK_LIST * | to_blocks
| ) |  |

Definition at line 72 of file workingpartset.cpp.

{
BLOCK_IT block_it(&completed_blocks_);
block_it.add_list_before(blocks);
TO_BLOCK_IT to_block_it(&to_blocks_);
to_block_it.add_list_before(to_blocks);
}

void tesseract::WorkingPartSet::set_column | ( | ColPartition * | col | ) |

inline

Definition at line 44 of file workingpartset.h.

{
column_ = col;
}

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

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