tesseract
3.05.02
|
#include <shapetable.h>
Public Member Functions | |
ShapeTable () | |
ShapeTable (const UNICHARSET &unicharset) | |
bool | Serialize (FILE *fp) const |
bool | DeSerialize (bool swap, FILE *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 264 of file shapetable.h.
tesseract::ShapeTable::ShapeTable | ( | ) |
Definition at line 243 of file shapetable.cpp.
|
explicit |
Definition at line 245 of file shapetable.cpp.
int tesseract::ShapeTable::AddShape | ( | int | unichar_id, |
int | font_id | ||
) |
Definition at line 346 of file shapetable.cpp.
int tesseract::ShapeTable::AddShape | ( | const Shape & | other | ) |
Definition at line 357 of file shapetable.cpp.
void tesseract::ShapeTable::AddShapeToResults | ( | const ShapeRating & | shape_rating, |
GenericVector< int > * | unichar_map, | ||
GenericVector< UnicharRating > * | results | ||
) | const |
Definition at line 697 of file shapetable.cpp.
void tesseract::ShapeTable::AddShapeToShape | ( | int | shape_id, |
const Shape & | other | ||
) |
Definition at line 386 of file shapetable.cpp.
void tesseract::ShapeTable::AddToShape | ( | int | shape_id, |
int | unichar_id, | ||
int | font_id | ||
) |
Definition at line 379 of file shapetable.cpp.
bool tesseract::ShapeTable::AlreadyMerged | ( | int | shape_id1, |
int | shape_id2 | ||
) | const |
Definition at line 449 of file shapetable.cpp.
bool tesseract::ShapeTable::AnyMultipleUnichars | ( | ) | const |
Definition at line 454 of file shapetable.cpp.
void tesseract::ShapeTable::AppendMasterShapes | ( | const ShapeTable & | other, |
GenericVector< int > * | shape_map | ||
) |
Definition at line 666 of file shapetable.cpp.
int tesseract::ShapeTable::BuildFromShape | ( | const Shape & | shape, |
const ShapeTable & | master_shapes | ||
) |
Definition at line 423 of file shapetable.cpp.
bool tesseract::ShapeTable::CommonFont | ( | int | shape_id1, |
int | shape_id2 | ||
) | const |
Definition at line 651 of file shapetable.cpp.
bool tesseract::ShapeTable::CommonUnichars | ( | int | shape_id1, |
int | shape_id2 | ||
) | const |
Definition at line 639 of file shapetable.cpp.
STRING tesseract::ShapeTable::DebugStr | ( | int | shape_id | ) | const |
Definition at line 291 of file shapetable.cpp.
void tesseract::ShapeTable::DeleteShape | ( | int | shape_id | ) |
Definition at line 371 of file shapetable.cpp.
bool tesseract::ShapeTable::DeSerialize | ( | bool | swap, |
FILE * | fp | ||
) |
Definition at line 256 of file shapetable.cpp.
bool tesseract::ShapeTable::EqualUnichars | ( | int | shape_id1, |
int | shape_id2 | ||
) | const |
Definition at line 597 of file shapetable.cpp.
int tesseract::ShapeTable::FindShape | ( | int | unichar_id, |
int | font_id | ||
) | const |
Definition at line 396 of file shapetable.cpp.
void tesseract::ShapeTable::ForceFontMerges | ( | int | start, |
int | end | ||
) |
Definition at line 478 of file shapetable.cpp.
void tesseract::ShapeTable::GetFirstUnicharAndFont | ( | int | shape_id, |
int * | unichar_id, | ||
int * | font_id | ||
) | const |
Definition at line 414 of file shapetable.cpp.
|
inline |
Definition at line 323 of file shapetable.h.
int tesseract::ShapeTable::MasterDestinationIndex | ( | int | shape_id | ) | const |
Definition at line 541 of file shapetable.cpp.
int tesseract::ShapeTable::MasterFontCount | ( | int | shape_id | ) | const |
Definition at line 502 of file shapetable.cpp.
int tesseract::ShapeTable::MasterUnicharCount | ( | int | shape_id | ) | const |
Definition at line 496 of file shapetable.cpp.
int tesseract::ShapeTable::MaxNumUnichars | ( | ) | const |
Definition at line 465 of file shapetable.cpp.
int tesseract::ShapeTable::MergedUnicharCount | ( | int | shape_id1, |
int | shape_id2 | ||
) | const |
Definition at line 513 of file shapetable.cpp.
bool tesseract::ShapeTable::MergeEqualUnichars | ( | int | merge_id1, |
int | merge_id2, | ||
int | shape_id | ||
) | const |
Definition at line 614 of file shapetable.cpp.
void tesseract::ShapeTable::MergeShapes | ( | int | shape_id1, |
int | shape_id2 | ||
) |
Definition at line 523 of file shapetable.cpp.
bool tesseract::ShapeTable::MergeSubsetUnichar | ( | int | merge_id1, |
int | merge_id2, | ||
int | shape_id | ||
) | const |
Definition at line 571 of file shapetable.cpp.
|
inline |
Definition at line 326 of file shapetable.h.
int tesseract::ShapeTable::NumFonts | ( | ) | const |
Definition at line 264 of file shapetable.cpp.
int tesseract::ShapeTable::NumMasterShapes | ( | ) | const |
Definition at line 680 of file shapetable.cpp.
|
inline |
Definition at line 278 of file shapetable.h.
void tesseract::ShapeTable::ReMapClassIds | ( | const GenericVector< int > & | unicharset_map | ) |
Definition at line 281 of file shapetable.cpp.
bool tesseract::ShapeTable::Serialize | ( | FILE * | fp | ) | const |
Definition at line 250 of file shapetable.cpp.
|
inline |
Definition at line 289 of file shapetable.h.
bool tesseract::ShapeTable::SubsetUnichar | ( | int | shape_id1, |
int | shape_id2 | ||
) | const |
Definition at line 553 of file shapetable.cpp.
STRING tesseract::ShapeTable::SummaryStr | ( | ) | const |
Definition at line 323 of file shapetable.cpp.
void tesseract::ShapeTable::SwapShapes | ( | int | shape_id1, |
int | shape_id2 | ||
) |
Definition at line 533 of file shapetable.cpp.
|
inline |
Definition at line 281 of file shapetable.h.