23
23
// To avoid collision with other typenames include the ABSOLUTE MINIMUM
24
24
// complexity of includes here. Use forward declarations wherever possible
25
25
// and hide includes of complex types in baseapi.cpp.
26
- #include " tess_version.h"
27
26
#include " apitypes.h"
28
27
#include " pageiterator.h"
29
28
#include " platform.h"
30
29
#include " publictypes.h"
31
30
#include " resultiterator.h"
32
31
#include " serialis.h"
32
+ #include " tess_version.h"
33
33
#include " tesscallback.h"
34
34
#include " thresholder.h"
35
35
#include " unichar.h"
@@ -56,7 +56,7 @@ class UNICHARSET;
56
56
class WERD_CHOICE_LIST ;
57
57
58
58
struct INT_FEATURE_STRUCT ;
59
- typedef INT_FEATURE_STRUCT *INT_FEATURE ;
59
+ using INT_FEATURE = INT_FEATURE_STRUCT *;
60
60
struct TBLOB ;
61
61
62
62
namespace tesseract {
@@ -73,20 +73,10 @@ class Tesseract;
73
73
class Trie ;
74
74
class Wordrec ;
75
75
76
- typedef int (Dict::*DictFunc)(void * void_dawg_args,
77
- const UNICHARSET& unicharset,
78
- UNICHAR_ID unichar_id, bool word_end) const ;
79
- typedef double (Dict::*ProbabilityInContextFunc)(const char * lang,
80
- const char * context,
81
- int context_bytes,
82
- const char * character,
83
- int character_bytes);
84
- typedef float (Dict::*ParamsModelClassifyFunc)(
85
- const char *lang, void *path);
86
- typedef void (Wordrec::*FillLatticeFunc)(const MATRIX &ratings,
87
- const WERD_CHOICE_LIST &best_choices,
88
- const UNICHARSET &unicharset,
89
- BlamerBundle *blamer_bundle);
76
+ using DictFunc = int (Dict::*)(void *, const UNICHARSET &, UNICHAR_ID, bool ) const ;
77
+ using ProbabilityInContextFunc = double (Dict::*)(const char *, const char *, int , const char *, int );
78
+ using ParamsModelClassifyFunc = float (Dict::*)(const char *, void *);
79
+ using FillLatticeFunc = void (Wordrec::*)(const MATRIX &, const WERD_CHOICE_LIST &, const UNICHARSET &, BlamerBundle *);
90
80
typedef TessCallback4<const UNICHARSET &, int , PageIterator *, Pix *>
91
81
TruthCallback;
92
82
@@ -404,7 +394,7 @@ class TESS_API TessBaseAPI {
404
394
* If paraids is not nullptr, the paragraph-id of each line within its block is
405
395
* also returned as an array of one element per line. delete [] after use.
406
396
*/
407
- Boxa* GetTextlines (const bool raw_image, const int raw_padding,
397
+ Boxa* GetTextlines (bool raw_image, int raw_padding,
408
398
Pixa** pixa, int ** blockids, int ** paraids);
409
399
/*
410
400
Helper method to extract from the thresholded image. (most common usage)
@@ -453,9 +443,9 @@ class TESS_API TessBaseAPI {
453
443
* instead of the thresholded image and padded with raw_padding.
454
444
* If text_only is true, then only text components are returned.
455
445
*/
456
- Boxa* GetComponentImages (const PageIteratorLevel level,
457
- const bool text_only, const bool raw_image,
458
- const int raw_padding,
446
+ Boxa* GetComponentImages (PageIteratorLevel level,
447
+ bool text_only, bool raw_image,
448
+ int raw_padding,
459
449
Pixa** pixa, int ** blockids, int ** paraids);
460
450
// Helper function to get binary images with no padding (most common usage).
461
451
Boxa* GetComponentImages (const PageIteratorLevel level,
0 commit comments