21 #ifndef TESSERACT_TEXTORD_COLPARTITIONSET_H__ 22 #define TESSERACT_TEXTORD_COLPARTITIONSET_H__ 31 class WorkingPartSet_LIST;
32 class ColSegment_LIST;
54 return parts_.empty();
57 return parts_.length();
70 void GetColumnBoxes(
int y_bottom,
int y_top, ColSegment_LIST *segments);
110 int left,
int right,
int height,
int y,
111 int left_margin,
int right_margin,
112 int* first_col,
int* last_col,
113 int* first_spanned_col);
120 int resolution, ColPartition_LIST* used_parts,
121 WorkingPartSet_LIST* working_set);
125 int* total_gap,
int* gap_samples);
132 void AddPartition(
ColPartition* new_part, ColPartition_IT* it);
151 void ComputeCoverage();
155 void AddPartitionCoverageAndBox(
const ColPartition& part);
158 ColPartition_LIST parts_;
160 int good_column_count_;
173 #endif // TESSERACT_TEXTORD_COLPARTITION_H__
bool CompatibleColumns(bool debug, ColPartitionSet *other, WidthCallback *cb)
bool LegalColumnCandidate()
const TBOX & bounding_box() const
int UnmatchedWidth(ColPartitionSet *part_set)
ColumnSpanningType SpanningType(int resolution, int left, int right, int height, int y, int left_margin, int right_margin, int *first_col, int *last_col, int *first_spanned_col)
void ImproveColumnCandidate(WidthCallback *cb, PartSetVector *src_sets)
int GoodColumnCount() const
void AccumulateColumnWidthsAndGaps(int *total_width, int *width_samples, int *total_gap, int *gap_samples)
void GetColumnBoxes(int y_bottom, int y_top, ColSegment_LIST *segments)
void AddToColumnSetsIfUnique(PartSetVector *column_sets, WidthCallback *cb)
void DisplayColumnEdges(int y_bottom, int y_top, ScrollView *win)
ColPartition * GetColumnByIndex(int index)
void ChangeWorkColumns(const ICOORD &bleft, const ICOORD &tright, int resolution, ColPartition_LIST *used_parts, WorkingPartSet_LIST *working_set)
ColPartitionSet * Copy(bool good_only)
GenericVector< ColPartitionSet * > PartSetVector
ColPartition * ColumnContaining(int x, int y)