tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
pgedit.h
1 // File: pgedit.h
3 // Description: Page structure file editor
4 // Author: Joern Wanke
5 // Created: Wed Jul 18 10:05:01 PDT 2007
6 //
7 // (C) Copyright 2007, Google Inc.
8 // Licensed under the Apache License, Version 2.0 (the "License");
9 // you may not use this file except in compliance with the License.
10 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 // See the License for the specific language governing permissions and
16 // limitations under the License.
17 //
19 
20 #ifndef PGEDIT_H
21 #define PGEDIT_H
22 
23 #include "params.h" // for INT_VAR_H, IntParam, STRING_VAR_H, StringParam
24 #include "scrollview.h" // for SVEvent (ptr only), SVEventHandler, ScrollView
25 
26 class BLOCK_LIST;
27 class PAGE_RES;
28 
29 namespace tesseract {
30  class Tesseract;
31 }
32 
33 // A small event handler class to process incoming events to
34 // this window.
36  public:
37  PGEventHandler(tesseract::Tesseract* tess) : tess_(tess) {
38  }
39  void Notify(const SVEvent* sve);
40  private:
42 };
43 
44 extern BLOCK_LIST *current_block_list;
45 extern STRING_VAR_H (editor_image_win_name, "EditorImage",
46 "Editor image window name");
47 extern INT_VAR_H (editor_image_xpos, 590, "Editor image X Pos");
48 extern INT_VAR_H (editor_image_ypos, 10, "Editor image Y Pos");
49 extern INT_VAR_H (editor_image_height, 680, "Editor image height");
50 extern INT_VAR_H (editor_image_width, 655, "Editor image width");
51 extern INT_VAR_H (editor_image_word_bb_color, BLUE,
52 "Word bounding box colour");
53 extern INT_VAR_H (editor_image_blob_bb_color, YELLOW,
54 "Blob bounding box colour");
55 extern INT_VAR_H (editor_image_text_color, WHITE, "Correct text colour");
56 extern STRING_VAR_H (editor_dbwin_name, "EditorDBWin",
57 "Editor debug window name");
58 extern INT_VAR_H (editor_dbwin_xpos, 50, "Editor debug window X Pos");
59 extern INT_VAR_H (editor_dbwin_ypos, 500, "Editor debug window Y Pos");
60 extern INT_VAR_H (editor_dbwin_height, 24, "Editor debug window height");
61 extern INT_VAR_H (editor_dbwin_width, 80, "Editor debug window width");
62 extern STRING_VAR_H (editor_word_name, "BlnWords",
63 "BL normalised word window");
64 extern INT_VAR_H (editor_word_xpos, 60, "Word window X Pos");
65 extern INT_VAR_H (editor_word_ypos, 510, "Word window Y Pos");
66 extern INT_VAR_H (editor_word_height, 240, "Word window height");
67 extern INT_VAR_H (editor_word_width, 655, "Word window width");
68 extern double_VAR_H (editor_smd_scale_factor, 1.0, "Scaling for smd image");
69 
70 ScrollView* bln_word_window_handle(); //return handle
71 void build_image_window(int width, int height);
72 void pgeditor_msg( //message display
73  const char *msg);
74 void pgeditor_show_point( //display coords
75  SVEvent *event);
76  //put bln word in box
77 void show_point(PAGE_RES* page_res, float x, float y);
78 
79 #endif
Definition: scrollview.h:61
PGEventHandler(tesseract::Tesseract *tess)
Definition: pgedit.h:37
tesseract::Tesseract * tess_
Definition: pgedit.h:41
Definition: baseapi.cpp:94
double_VAR_H(textord_tabvector_vertical_gap_fraction, 0.5, "Max fraction of mean blob width allowed for vertical gaps in vertical text")
Definition: scrollview.h:102
Definition: tesseractclass.h:173
Definition: pageres.h:77
Definition: scrollview.h:86
Definition: pgedit.h:35