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();
67 void GetColumnBoxes(
int y_bottom,
int y_top, ColSegment_LIST *segments);
107 int left,
int right,
int y,
108 int left_margin,
int right_margin,
109 int* first_col,
int* last_col,
110 int* first_spanned_col);
117 int resolution, ColPartition_LIST* used_parts,
118 WorkingPartSet_LIST* working_set);
122 int* total_gap,
int* gap_samples);
129 void AddPartition(
ColPartition* new_part, ColPartition_IT* it);
148 void ComputeCoverage();
152 void AddPartitionCoverageAndBox(
const ColPartition& part);
155 ColPartition_LIST parts_;
157 int good_column_count_;
170 #endif // TESSERACT_TEXTORD_COLPARTITION_H__
void AddToColumnSetsIfUnique(PartSetVector *column_sets, WidthCallback *cb)
ColPartition * ColumnContaining(int x, int y)
ColPartitionSet * Copy(bool good_only)
bool LegalColumnCandidate()
void ChangeWorkColumns(const ICOORD &bleft, const ICOORD &tright, int resolution, ColPartition_LIST *used_parts, WorkingPartSet_LIST *working_set)
void AccumulateColumnWidthsAndGaps(int *total_width, int *width_samples, int *total_gap, int *gap_samples)
const TBOX & bounding_box() const
ColPartition * GetColumnByIndex(int index)
void GetColumnBoxes(int y_bottom, int y_top, ColSegment_LIST *segments)
void DisplayColumnEdges(int y_bottom, int y_top, ScrollView *win)
GenericVector< ColPartitionSet * > PartSetVector
ColumnSpanningType SpanningType(int resolution, int left, int right, 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)
bool CompatibleColumns(bool debug, ColPartitionSet *other, WidthCallback *cb)
int UnmatchedWidth(ColPartitionSet *part_set)