tesseract
5.0.0-alpha-619-ge9db
|
#include <shapetable.h>
Public Member Functions | |
ShapeTable () | |
ShapeTable (const UNICHARSET &unicharset) | |
bool | Serialize (FILE *fp) const |
bool | DeSerialize (TFile *fp) |
int | NumShapes () const |
const UNICHARSET & | unicharset () const |
int | NumFonts () const |
void | set_unicharset (const UNICHARSET &unicharset) |
void | ReMapClassIds (const GenericVector< int > &unicharset_map) |
STRING | DebugStr (int shape_id) const |
STRING | SummaryStr () const |
int | AddShape (int unichar_id, int font_id) |
int | AddShape (const Shape &other) |
void | DeleteShape (int shape_id) |
void | AddToShape (int shape_id, int unichar_id, int font_id) |
void | AddShapeToShape (int shape_id, const Shape &other) |
int | FindShape (int unichar_id, int font_id) const |
void | GetFirstUnicharAndFont (int shape_id, int *unichar_id, int *font_id) const |
const Shape & | GetShape (int shape_id) const |
Shape * | MutableShape (int shape_id) |
int | BuildFromShape (const Shape &shape, const ShapeTable &master_shapes) |
bool | AlreadyMerged (int shape_id1, int shape_id2) const |
bool | AnyMultipleUnichars () const |
int | MaxNumUnichars () const |
void | ForceFontMerges (int start, int end) |
int | MasterUnicharCount (int shape_id) const |
int | MasterFontCount (int shape_id) const |
int | MergedUnicharCount (int shape_id1, int shape_id2) const |
void | MergeShapes (int shape_id1, int shape_id2) |
void | SwapShapes (int shape_id1, int shape_id2) |
void | AppendMasterShapes (const ShapeTable &other, GenericVector< int > *shape_map) |
int | NumMasterShapes () const |
int | MasterDestinationIndex (int shape_id) const |
bool | SubsetUnichar (int shape_id1, int shape_id2) const |
bool | MergeSubsetUnichar (int merge_id1, int merge_id2, int shape_id) const |
bool | EqualUnichars (int shape_id1, int shape_id2) const |
bool | MergeEqualUnichars (int merge_id1, int merge_id2, int shape_id) const |
bool | CommonUnichars (int shape_id1, int shape_id2) const |
bool | CommonFont (int shape_id1, int shape_id2) const |
void | AddShapeToResults (const ShapeRating &shape_rating, GenericVector< int > *unichar_map, GenericVector< UnicharRating > *results) const |
Definition at line 261 of file shapetable.h.
tesseract::ShapeTable::ShapeTable | ( | ) |
Definition at line 234 of file shapetable.cpp.
|
explicit |
Definition at line 236 of file shapetable.cpp.
int tesseract::ShapeTable::AddShape | ( | const Shape & | other | ) |
Definition at line 347 of file shapetable.cpp.
int tesseract::ShapeTable::AddShape | ( | int | unichar_id, |
int | font_id | ||
) |
Definition at line 336 of file shapetable.cpp.
void tesseract::ShapeTable::AddShapeToResults | ( | const ShapeRating & | shape_rating, |
GenericVector< int > * | unichar_map, | ||
GenericVector< UnicharRating > * | results | ||
) | const |
Definition at line 687 of file shapetable.cpp.
void tesseract::ShapeTable::AddShapeToShape | ( | int | shape_id, |
const Shape & | other | ||
) |
Definition at line 376 of file shapetable.cpp.
void tesseract::ShapeTable::AddToShape | ( | int | shape_id, |
int | unichar_id, | ||
int | font_id | ||
) |
Definition at line 369 of file shapetable.cpp.
bool tesseract::ShapeTable::AlreadyMerged | ( | int | shape_id1, |
int | shape_id2 | ||
) | const |
Definition at line 439 of file shapetable.cpp.
bool tesseract::ShapeTable::AnyMultipleUnichars | ( | ) | const |
Definition at line 444 of file shapetable.cpp.
void tesseract::ShapeTable::AppendMasterShapes | ( | const ShapeTable & | other, |
GenericVector< int > * | shape_map | ||
) |
Definition at line 656 of file shapetable.cpp.
int tesseract::ShapeTable::BuildFromShape | ( | const Shape & | shape, |
const ShapeTable & | master_shapes | ||
) |
Definition at line 413 of file shapetable.cpp.
bool tesseract::ShapeTable::CommonFont | ( | int | shape_id1, |
int | shape_id2 | ||
) | const |
Definition at line 641 of file shapetable.cpp.
bool tesseract::ShapeTable::CommonUnichars | ( | int | shape_id1, |
int | shape_id2 | ||
) | const |
Definition at line 629 of file shapetable.cpp.
STRING tesseract::ShapeTable::DebugStr | ( | int | shape_id | ) | const |
Definition at line 281 of file shapetable.cpp.
void tesseract::ShapeTable::DeleteShape | ( | int | shape_id | ) |
Definition at line 361 of file shapetable.cpp.
bool tesseract::ShapeTable::DeSerialize | ( | TFile * | fp | ) |
Definition at line 246 of file shapetable.cpp.
bool tesseract::ShapeTable::EqualUnichars | ( | int | shape_id1, |
int | shape_id2 | ||
) | const |
Definition at line 587 of file shapetable.cpp.
int tesseract::ShapeTable::FindShape | ( | int | unichar_id, |
int | font_id | ||
) | const |
Definition at line 386 of file shapetable.cpp.
void tesseract::ShapeTable::ForceFontMerges | ( | int | start, |
int | end | ||
) |
Definition at line 468 of file shapetable.cpp.
void tesseract::ShapeTable::GetFirstUnicharAndFont | ( | int | shape_id, |
int * | unichar_id, | ||
int * | font_id | ||
) | const |
Definition at line 404 of file shapetable.cpp.
|
inline |
Definition at line 319 of file shapetable.h.
int tesseract::ShapeTable::MasterDestinationIndex | ( | int | shape_id | ) | const |
Definition at line 531 of file shapetable.cpp.
int tesseract::ShapeTable::MasterFontCount | ( | int | shape_id | ) | const |
Definition at line 492 of file shapetable.cpp.
int tesseract::ShapeTable::MasterUnicharCount | ( | int | shape_id | ) | const |
Definition at line 486 of file shapetable.cpp.
int tesseract::ShapeTable::MaxNumUnichars | ( | ) | const |
int tesseract::ShapeTable::MergedUnicharCount | ( | int | shape_id1, |
int | shape_id2 | ||
) | const |
Definition at line 503 of file shapetable.cpp.
bool tesseract::ShapeTable::MergeEqualUnichars | ( | int | merge_id1, |
int | merge_id2, | ||
int | shape_id | ||
) | const |
Definition at line 604 of file shapetable.cpp.
void tesseract::ShapeTable::MergeShapes | ( | int | shape_id1, |
int | shape_id2 | ||
) |
Definition at line 513 of file shapetable.cpp.
bool tesseract::ShapeTable::MergeSubsetUnichar | ( | int | merge_id1, |
int | merge_id2, | ||
int | shape_id | ||
) | const |
Definition at line 561 of file shapetable.cpp.
|
inline |
Definition at line 322 of file shapetable.h.
int tesseract::ShapeTable::NumFonts | ( | ) | const |
Definition at line 254 of file shapetable.cpp.
int tesseract::ShapeTable::NumMasterShapes | ( | ) | const |
Definition at line 670 of file shapetable.cpp.
|
inline |
Definition at line 274 of file shapetable.h.
void tesseract::ShapeTable::ReMapClassIds | ( | const GenericVector< int > & | unicharset_map | ) |
Definition at line 271 of file shapetable.cpp.
bool tesseract::ShapeTable::Serialize | ( | FILE * | fp | ) | const |
Definition at line 241 of file shapetable.cpp.
|
inline |
Definition at line 285 of file shapetable.h.
bool tesseract::ShapeTable::SubsetUnichar | ( | int | shape_id1, |
int | shape_id2 | ||
) | const |
Definition at line 543 of file shapetable.cpp.
STRING tesseract::ShapeTable::SummaryStr | ( | ) | const |
Definition at line 313 of file shapetable.cpp.
void tesseract::ShapeTable::SwapShapes | ( | int | shape_id1, |
int | shape_id2 | ||
) |
Definition at line 523 of file shapetable.cpp.
|
inline |
Definition at line 277 of file shapetable.h.