00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PAGEWALK_H
00021 #define PAGEWALK_H
00022
00023 #include "ocrblock.h"
00024 #include "ocrrow.h"
00025 #include "werd.h"
00026 #include "polyblob.h"
00027 #include "stepblob.h"
00028 #include "rect.h"
00029 #include "varable.h"
00030 #include "notdll.h"
00031 #include "tesseractclass.h"
00032
00033 #define BLOCK_SPACING 20
00034
00035 extern BOOL_VAR_H (current_word_quit, FALSE, "Stop processing this word");
00036 extern DLLSYM BOOL_VAR_H (selection_quit, FALSE,
00037 "Stop processing this selection");
00038 TBOX block_list_bounding_box(
00039 BLOCK_LIST *block_list
00040 );
00041 const TBOX block_list_compress(
00042 BLOCK_LIST *block_list);
00043 void block_list_move(
00044 BLOCK_LIST *block_list,
00045 ICOORD vec
00046 );
00047 int block_name_order(
00048 const void *block1p,
00049 const void *block2p
00050 );
00051 void process_all_blobs (
00052 BLOCK_LIST * block_list,
00053 BOOL8 blob_processor (
00054
00055 BLOCK *, ROW *, WERD *, PBLOB *), BOOL8 c_blob_processor (
00056 BLOCK
00057 *,
00058 ROW
00059 *,
00060 WERD
00061 *,
00062 C_BLOB
00063 *));
00064 void process_selected_blobs (
00065 BLOCK_LIST * block_list,
00066
00067 TBOX & selection_box, BOOL8 blob_processor (
00068
00069 BLOCK *, ROW *, WERD *, PBLOB *), BOOL8 c_blob_processor (
00070 BLOCK
00071 *,
00072 ROW
00073 *,
00074 WERD
00075 *,
00076 C_BLOB
00077 *));
00078 void process_all_words (
00079 BLOCK_LIST * block_list,
00080 BOOL8 word_processor (
00081 BLOCK *, ROW *, WERD *));
00082 void process_selected_words (
00083 BLOCK_LIST * block_list,
00084
00085 TBOX & selection_box, BOOL8 word_processor (
00086 BLOCK
00087 *,
00088 ROW
00089 *,
00090 WERD
00091 *));
00092
00093 void process_all_words_it (
00094 BLOCK_LIST * block_list,
00095 BOOL8 word_processor (
00096 BLOCK *,
00097 ROW *,
00098 WERD *,
00099 BLOCK_IT &,
00100 ROW_IT &, WERD_IT &));
00101 void process_selected_words_it (
00102 BLOCK_LIST * block_list,
00103
00104 TBOX & selection_box, BOOL8 word_processor (
00105 BLOCK
00106 *,
00107 ROW
00108 *,
00109 WERD
00110 *,
00111 BLOCK_IT
00112 &,
00113 ROW_IT
00114 &,
00115 WERD_IT
00116 &));
00117 void process_all_blocks (
00118 BLOCK_LIST * block_list,
00119 BOOL8 block_processor (
00120 BLOCK *));
00121 void process_selected_blocks (
00122 BLOCK_LIST * block_list,
00123
00124 TBOX & selection_box, BOOL8 block_processor (
00125 BLOCK
00126 *));
00127 void process_all_rows (
00128 BLOCK_LIST * block_list,
00129 BOOL8 row_processor (
00130 BLOCK *, ROW *));
00131 void process_selected_rows (
00132 BLOCK_LIST * block_list,
00133
00134 TBOX & selection_box, BOOL8 row_processor (
00135 BLOCK
00136 *,
00137 ROW
00138 *));
00139 void process_all_rows_it (
00140 BLOCK_LIST * block_list,
00141 BOOL8 row_processor (
00142 BLOCK *,
00143 ROW *,
00144 BLOCK_IT &, ROW_IT &));
00145 void process_selected_rows_it (
00146 BLOCK_LIST * block_list,
00147
00148 TBOX & selection_box, BOOL8 row_processor (
00149 BLOCK
00150 *,
00151 ROW
00152 *,
00153 BLOCK_IT
00154 &,
00155 ROW_IT
00156 &));
00157 #endif