20#ifndef TESSERACT_TEXTORD_COLPARTITIONSET_H_
21#define TESSERACT_TEXTORD_COLPARTITIONSET_H_
29class WorkingPartSet_LIST;
51 return parts_.empty();
54 return parts_.length();
68 void GetColumnBoxes(
int y_bottom,
int y_top, ColSegment_LIST *segments);
110 int height,
int y,
int left_margin,
111 int right_margin,
int *first_col,
112 int *last_col,
int *first_spanned_col);
119 int resolution, ColPartition_LIST *used_parts,
120 WorkingPartSet_LIST *working_set);
124 int *total_gap,
int *gap_samples);
131 void AddPartition(
ColPartition *new_part, ColPartition_IT *it);
150 void ComputeCoverage();
154 void AddPartitionCoverageAndBox(
const ColPartition &part);
157 ColPartition_LIST parts_;
159 int good_column_count_;
#define ELISTIZEH(CLASSNAME)
std::function< bool(int)> WidthCallback
std::vector< ColPartitionSet * > PartSetVector
int GoodColumnCount() const
void AccumulateColumnWidthsAndGaps(int *total_width, int *width_samples, int *total_gap, int *gap_samples)
void DisplayColumnEdges(int y_bottom, int y_top, ScrollView *win)
bool CompatibleColumns(bool debug, ColPartitionSet *other, const WidthCallback &cb)
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)
ColPartition * GetColumnByIndex(int index)
~ColPartitionSet()=default
void ChangeWorkColumns(const ICOORD &bleft, const ICOORD &tright, int resolution, ColPartition_LIST *used_parts, WorkingPartSet_LIST *working_set)
ColPartitionSet * Copy(bool good_only)
ColPartition * ColumnContaining(int x, int y)
bool LegalColumnCandidate()
ColPartitionSet()=default
const TBOX & bounding_box() const
void AddToColumnSetsIfUnique(PartSetVector *column_sets, const WidthCallback &cb)
int UnmatchedWidth(ColPartitionSet *part_set)
void ImproveColumnCandidate(const WidthCallback &cb, PartSetVector *src_sets)
void GetColumnBoxes(int y_bottom, int y_top, ColSegment_LIST *segments)