Skip to content

Commit 2cbe723

Browse files
committed
Fix doxygen comments
Signed-off-by: Stefan Weil <[email protected]>
1 parent b3bd23e commit 2cbe723

File tree

13 files changed

+121
-128
lines changed

13 files changed

+121
-128
lines changed

src/ccmain/thresholder.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,14 @@ class TESS_API ImageThresholder {
171171
/// The pix will always be PixDestroy()ed on destruction of the class.
172172
Pix* pix_;
173173

174-
int image_width_; //< Width of source pix_.
175-
int image_height_; //< Height of source pix_.
176-
int pix_channels_; //< Number of 8-bit channels in pix_.
177-
int pix_wpl_; //< Words per line of pix_.
174+
int image_width_; ///< Width of source pix_.
175+
int image_height_; ///< Height of source pix_.
176+
int pix_channels_; ///< Number of 8-bit channels in pix_.
177+
int pix_wpl_; ///< Words per line of pix_.
178178
// Limits of image rectangle to be processed.
179-
int scale_; //< Scale factor from original image.
180-
int yres_; //< y pixels/inch in source image.
181-
int estimated_res_; //< Resolution estimate from text size.
179+
int scale_; ///< Scale factor from original image.
180+
int yres_; ///< y pixels/inch in source image.
181+
int estimated_res_; ///< Resolution estimate from text size.
182182
int rect_left_;
183183
int rect_top_;
184184
int rect_width_;

src/ccstruct/ocrblock.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ ELISTIZE (BLOCK)
3131
*
3232
* Constructor for a simple rectangular block.
3333
*/
34-
BLOCK::BLOCK(const char *name, //< filename
35-
BOOL8 prop, //< proportional
36-
int16_t kern, //< kerning
37-
int16_t space, //< spacing
38-
int16_t xmin, //< bottom left
39-
int16_t ymin, int16_t xmax, //< top right
34+
BLOCK::BLOCK(const char *name, ///< filename
35+
BOOL8 prop, ///< proportional
36+
int16_t kern, ///< kerning
37+
int16_t space, ///< spacing
38+
int16_t xmin, ///< bottom left
39+
int16_t ymin, int16_t xmax, ///< top right
4040
int16_t ymax)
4141
: pdblk(xmin, ymin, xmax, ymax),
4242
filename(name),
@@ -192,8 +192,8 @@ void BLOCK::compress( // squash it up
192192
*/
193193

194194
void BLOCK::print( //print list of sides
195-
FILE*, //< file to print on
196-
bool dump //< print full detail
195+
FILE*, ///< file to print on
196+
bool dump ///< print full detail
197197
) {
198198
ICOORDELT_IT it = &pdblk.leftside; //iterator
199199

src/ccstruct/ocrblock.h

+24-24
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ class BLOCK:public ELIST_LINK
3939
right_to_left_ = false;
4040
pdblk.hand_poly = nullptr;
4141
}
42-
BLOCK(const char *name, //< filename
43-
BOOL8 prop, //< proportional
44-
int16_t kern, //< kerning
45-
int16_t space, //< spacing
46-
int16_t xmin, //< bottom left
42+
BLOCK(const char *name, ///< filename
43+
BOOL8 prop, ///< proportional
44+
int16_t kern, ///< kerning
45+
int16_t space, ///< spacing
46+
int16_t xmin, ///< bottom left
4747
int16_t ymin,
48-
int16_t xmax, //< top right
48+
int16_t xmax, ///< top right
4949
int16_t ymax);
5050

5151
~BLOCK () = default;
@@ -189,26 +189,26 @@ class BLOCK:public ELIST_LINK
189189
void print(FILE* fp, bool dump);
190190

191191
BLOCK& operator=(const BLOCK & source);
192-
PDBLK pdblk; //< Page Description Block
192+
PDBLK pdblk; ///< Page Description Block
193193

194194
private:
195-
BOOL8 proportional; //< proportional
196-
bool right_to_left_; //< major script is right to left.
197-
int8_t kerning; //< inter blob gap
198-
int16_t spacing; //< inter word gap
199-
int16_t pitch; //< pitch of non-props
200-
int16_t font_class; //< correct font class
201-
int32_t xheight; //< height of chars
202-
float cell_over_xheight_; //< Ratio of cell height to xheight.
203-
STRING filename; //< name of block
204-
ROW_LIST rows; //< rows in block
205-
PARA_LIST paras_; //< paragraphs of block
206-
C_BLOB_LIST c_blobs; //< before textord
207-
C_BLOB_LIST rej_blobs; //< duff stuff
208-
FCOORD re_rotation_; //< How to transform coords back to image.
209-
FCOORD classify_rotation_; //< Apply this before classifying.
210-
FCOORD skew_; //< Direction of true horizontal.
211-
ICOORD median_size_; //< Median size of blobs.
195+
BOOL8 proportional; ///< proportional
196+
bool right_to_left_; ///< major script is right to left.
197+
int8_t kerning; ///< inter blob gap
198+
int16_t spacing; ///< inter word gap
199+
int16_t pitch; ///< pitch of non-props
200+
int16_t font_class; ///< correct font class
201+
int32_t xheight; ///< height of chars
202+
float cell_over_xheight_; ///< Ratio of cell height to xheight.
203+
STRING filename; ///< name of block
204+
ROW_LIST rows; ///< rows in block
205+
PARA_LIST paras_; ///< paragraphs of block
206+
C_BLOB_LIST c_blobs; ///< before textord
207+
C_BLOB_LIST rej_blobs; ///< duff stuff
208+
FCOORD re_rotation_; ///< How to transform coords back to image.
209+
FCOORD classify_rotation_; ///< Apply this before classifying.
210+
FCOORD skew_; ///< Direction of true horizontal.
211+
ICOORD median_size_; ///< Median size of blobs.
212212
};
213213

214214
// A function to print segmentation stats for the given block list.

src/ccstruct/pdblock.h

+15-15
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ struct Pix;
3030
CLISTIZEH (PDBLK)
3131
///page block
3232
class PDBLK {
33-
friend class BLOCK_RECT_IT; //< block iterator
34-
friend class BLOCK; //< Page Block
33+
friend class BLOCK_RECT_IT; ///< block iterator
34+
friend class BLOCK; ///< Page Block
3535

3636
public:
3737
/// empty constructor
@@ -40,9 +40,9 @@ class PDBLK {
4040
index_ = 0;
4141
}
4242
/// simple constructor
43-
PDBLK(int16_t xmin, //< bottom left
43+
PDBLK(int16_t xmin, ///< bottom left
4444
int16_t ymin,
45-
int16_t xmax, //< top right
45+
int16_t xmax, ///< top right
4646
int16_t ymax);
4747

4848
/// set vertex lists
@@ -93,11 +93,11 @@ class PDBLK {
9393
PDBLK &operator=(const PDBLK &source);
9494

9595
protected:
96-
POLY_BLOCK *hand_poly; //< weird as well
97-
ICOORDELT_LIST leftside; //< left side vertices
98-
ICOORDELT_LIST rightside; //< right side vertices
99-
TBOX box; //< bounding box
100-
int index_; //< Serial number of this block.
96+
POLY_BLOCK *hand_poly; ///< weird as well
97+
ICOORDELT_LIST leftside; ///< left side vertices
98+
ICOORDELT_LIST rightside; ///< right side vertices
99+
TBOX box; ///< bounding box
100+
int index_; ///< Serial number of this block.
101101
};
102102

103103
class DLLSYM BLOCK_RECT_IT //rectangle iterator
@@ -134,10 +134,10 @@ class DLLSYM BLOCK_RECT_IT //rectangle iterator
134134
}
135135

136136
private:
137-
int16_t ymin; //< bottom of rectangle
138-
int16_t ymax; //< top of rectangle
139-
PDBLK *block; //< block to iterate
140-
ICOORDELT_IT left_it; //< boundary iterators
137+
int16_t ymin; ///< bottom of rectangle
138+
int16_t ymax; ///< top of rectangle
139+
PDBLK *block; ///< block to iterate
140+
ICOORDELT_IT left_it; ///< boundary iterators
141141
ICOORDELT_IT right_it;
142142
};
143143

@@ -167,8 +167,8 @@ class DLLSYM BLOCK_LINE_IT
167167
int16_t &xext);
168168

169169
private:
170-
PDBLK * block; //< block to iterate
171-
BLOCK_RECT_IT rect_it; //< rectangle iterator
170+
PDBLK * block; ///< block to iterate
171+
BLOCK_RECT_IT rect_it; ///< rectangle iterator
172172
};
173173

174174
#endif

src/ccstruct/points.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ class ICOORD
155155
bool DeSerialize(bool swap, FILE* fp);
156156

157157
protected:
158-
int16_t xcoord; //< x value
159-
int16_t ycoord; //< y value
158+
int16_t xcoord; ///< x value
159+
int16_t ycoord; ///< y value
160160
};
161161

162162
class DLLSYM ICOORDELT:public ELIST_LINK, public ICOORD

src/ccstruct/werd.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
#include "config_auto.h"
2727
#endif
2828

29-
#define FIRST_COLOUR ScrollView::RED //< first rainbow colour
30-
#define LAST_COLOUR ScrollView::AQUAMARINE //< last rainbow colour
31-
#define CHILD_COLOUR ScrollView::BROWN //< colour of children
29+
#define FIRST_COLOUR ScrollView::RED ///< first rainbow colour
30+
#define LAST_COLOUR ScrollView::AQUAMARINE ///< last rainbow colour
31+
#define CHILD_COLOUR ScrollView::BROWN ///< colour of children
3232

3333
const ERRCODE CANT_SCALE_EDGESTEPS =
3434
"Attempted to scale an edgestep format word";
@@ -115,8 +115,8 @@ WERD::WERD(C_BLOB_LIST *blob_list, uint8_t blank_count, const char *text)
115115
* The C_BLOBs are not copied so the source list is emptied.
116116
*/
117117

118-
WERD::WERD(C_BLOB_LIST * blob_list, //< In word order
119-
WERD * clone) //< Source of flags
118+
WERD::WERD(C_BLOB_LIST * blob_list, ///< In word order
119+
WERD * clone) ///< Source of flags
120120
: flags(clone->flags),
121121
script_id_(clone->script_id_),
122122
correct(clone->correct) {

src/ccstruct/werd.h

+19-19
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,30 @@
2828

2929
enum WERD_FLAGS
3030
{
31-
W_SEGMENTED, //< correctly segmented
32-
W_ITALIC, //< italic text
33-
W_BOLD, //< bold text
34-
W_BOL, //< start of line
35-
W_EOL, //< end of line
36-
W_NORMALIZED, //< flags
37-
W_SCRIPT_HAS_XHEIGHT, //< x-height concept makes sense.
38-
W_SCRIPT_IS_LATIN, //< Special case latin for y. splitting.
39-
W_DONT_CHOP, //< fixed pitch chopped
40-
W_REP_CHAR, //< repeated character
41-
W_FUZZY_SP, //< fuzzy space
42-
W_FUZZY_NON, //< fuzzy nonspace
43-
W_INVERSE //< white on black
31+
W_SEGMENTED, ///< correctly segmented
32+
W_ITALIC, ///< italic text
33+
W_BOLD, ///< bold text
34+
W_BOL, ///< start of line
35+
W_EOL, ///< end of line
36+
W_NORMALIZED, ///< flags
37+
W_SCRIPT_HAS_XHEIGHT, ///< x-height concept makes sense.
38+
W_SCRIPT_IS_LATIN, ///< Special case latin for y. splitting.
39+
W_DONT_CHOP, ///< fixed pitch chopped
40+
W_REP_CHAR, ///< repeated character
41+
W_FUZZY_SP, ///< fuzzy space
42+
W_FUZZY_NON, ///< fuzzy nonspace
43+
W_INVERSE ///< white on black
4444
};
4545

4646
enum DISPLAY_FLAGS
4747
{
4848
/* Display flags bit number allocations */
49-
DF_BOX, //< Bounding box
50-
DF_TEXT, //< Correct ascii
51-
DF_POLYGONAL, //< Polyg approx
52-
DF_EDGE_STEP, //< Edge steps
53-
DF_BN_POLYGONAL, //< BL normalisd polyapx
54-
DF_BLAMER //< Blamer information
49+
DF_BOX, ///< Bounding box
50+
DF_TEXT, ///< Correct ascii
51+
DF_POLYGONAL, ///< Polyg approx
52+
DF_EDGE_STEP, ///< Edge steps
53+
DF_BN_POLYGONAL, ///< BL normalisd polyapx
54+
DF_BLAMER ///< Blamer information
5555
};
5656

5757
class ROW; //forward decl

src/ccutil/unicodes.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ namespace tesseract {
2424

2525
extern const char *kUTF8LineSeparator;
2626
extern const char *kUTF8ParagraphSeparator;
27-
extern const char *kLRM; //< Left-to-Right Mark
28-
extern const char *kRLM; //< Right-to-Left Mark
29-
extern const char *kRLE; //< Right-to-Left Embedding
30-
extern const char *kPDF; //< Pop Directional Formatting
27+
extern const char *kLRM; ///< Left-to-Right Mark
28+
extern const char *kRLM; ///< Right-to-Left Mark
29+
extern const char *kRLE; ///< Right-to-Left Embedding
30+
extern const char *kPDF; ///< Pop Directional Formatting
3131

3232
/// The following are confusable internal word punctuation symbols
3333
/// which we normalize to the first variant when matching in dawgs.

src/classify/clusttool.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@
2424
using tesseract::TFile;
2525

2626
//---------------Global Data Definitions and Declarations--------------------
27-
#define TOKENSIZE 80 //< max size of tokens read from an input file
27+
#define TOKENSIZE 80 ///< max size of tokens read from an input file
2828
#define QUOTED_TOKENSIZE "79"
29-
#define MAXSAMPLESIZE 65535 //< max num of dimensions in feature space
30-
//#define MAXBLOCKSIZE 65535 //< max num of samples in a character (block
31-
// size)
29+
#define MAXSAMPLESIZE 65535 ///< max num of dimensions in feature space
3230

3331
/**
3432
* This routine reads a single integer from the specified

src/classify/kdtree.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ class MinK {
6969
const Element* elements() { return elements_; }
7070

7171
private:
72-
const Key max_key_; //< the maximum possible Key
73-
Element *elements_; //< unsorted array of elements
74-
int elements_count_; //< the number of results collected so far
75-
int k_; //< the number of results we want from the search
76-
int max_index_; //< the index of the result with the largest key
72+
const Key max_key_; ///< the maximum possible Key
73+
Element *elements_; ///< unsorted array of elements
74+
int elements_count_; ///< the number of results collected so far
75+
int k_; ///< the number of results we want from the search
76+
int max_index_; ///< the index of the result with the largest key
7777
};
7878

7979
template<typename Key, typename Value>
@@ -132,8 +132,8 @@ class KDTreeSearch {
132132

133133
KDTREE *tree_;
134134
float *query_point_;
135-
float *sb_min_; //< search box minimum
136-
float *sb_max_; //< search box maximum
135+
float *sb_min_; ///< search box minimum
136+
float *sb_max_; ///< search box maximum
137137
MinK<float, void *> results_;
138138
};
139139

src/textord/blkocc.cpp

+12-17
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
/*****************************************************************************
22
*
3-
* File: blkocc.cpp (Formerly blockocc.c)
3+
* File: blkocc.cpp (Formerly blockocc.c)
44
* Description: Block Occupancy routines
55
* Author: Chris Newton
6-
* Created: Fri Nov 8
7-
* Modified:
8-
* Language: C++
9-
* Package: N/A
10-
* Status: Experimental (Do Not Distribute)
116
*
127
* (c) Copyright 1991, Hewlett-Packard Company.
138
** Licensed under the Apache License, Version 2.0 (the "License");
@@ -51,13 +46,13 @@ static void horizontal_coutline_projection(C_OUTLINE *outline,
5146
*/
5247

5348
bool test_underline( //look for underlines
54-
bool testing_on, //< drawing blob
55-
C_BLOB* blob, //< blob to test
56-
int16_t baseline, //< coords of baseline
57-
int16_t xheight //< height of line
49+
bool testing_on, ///< drawing blob
50+
C_BLOB* blob, ///< blob to test
51+
int16_t baseline, ///< coords of baseline
52+
int16_t xheight ///< height of line
5853
) {
5954
int16_t occ;
60-
int16_t blob_width; //width of blob
55+
int16_t blob_width; //width of blob
6156
TBOX blob_box; //bounding box
6257
int32_t desc_occ;
6358
int32_t x_occ;
@@ -121,8 +116,8 @@ bool test_underline( //look for underlines
121116
*/
122117

123118
static void horizontal_cblob_projection( //project outlines
124-
C_BLOB *blob, //< blob to project
125-
STATS *stats //< output
119+
C_BLOB *blob, ///< blob to project
120+
STATS *stats ///< output
126121
) {
127122
//outlines of blob
128123
C_OUTLINE_IT out_it = blob->out_list ();
@@ -141,13 +136,13 @@ static void horizontal_cblob_projection( //project outlines
141136
*/
142137

143138
static void horizontal_coutline_projection( //project outlines
144-
C_OUTLINE *outline, //< outline to project
145-
STATS *stats //< output
139+
C_OUTLINE *outline, ///< outline to project
140+
STATS *stats ///< output
146141
) {
147142
ICOORD pos; //current point
148143
ICOORD step; //edge step
149-
int32_t length; //of outline
150-
int16_t stepindex; //current step
144+
int32_t length; //of outline
145+
int16_t stepindex; //current step
151146
C_OUTLINE_IT out_it = outline->child ();
152147

153148
pos = outline->start_pos ();

0 commit comments

Comments
 (0)