Coverage Report

Created: 2026-02-14 06:30

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/tesseract/src/textord/gap_map.h
Line
Count
Source
1
// Licensed under the Apache License, Version 2.0 (the "License");
2
// you may not use this file except in compliance with the License.
3
// You may obtain a copy of the License at
4
// http://www.apache.org/licenses/LICENSE-2.0
5
// Unless required by applicable law or agreed to in writing, software
6
// distributed under the License is distributed on an "AS IS" BASIS,
7
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
// See the License for the specific language governing permissions and
9
// limitations under the License.
10
11
#ifndef GAP_MAP_H
12
#define GAP_MAP_H
13
14
#include "blobbox.h"
15
16
namespace tesseract {
17
18
class GAPMAP {
19
public:
20
  GAPMAP( // constructor
21
      TO_BLOCK *block);
22
23
15.7k
  ~GAPMAP() { // destructor
24
15.7k
    delete[] map;
25
15.7k
  }
26
27
  bool table_gap(     // Is gap a table?
28
      int16_t left,   // From here
29
      int16_t right); // To here
30
31
private:
32
  int16_t total_rows;  // in block
33
  int16_t min_left;    // Left extreme
34
  int16_t max_right;   // Right extreme
35
  int16_t bucket_size; // half an x ht
36
  int16_t *map;        // empty counts
37
  int16_t map_max;     // map[0..max_map] defined
38
  bool any_tabs;
39
};
40
41
/*-----------------------------*/
42
43
extern BOOL_VAR_H(gapmap_debug);
44
extern BOOL_VAR_H(gapmap_use_ends);
45
extern BOOL_VAR_H(gapmap_no_isolated_quanta);
46
extern double_VAR_H(gapmap_big_gaps);
47
48
} // namespace tesseract
49
50
#endif