tesseract
v5.3.3.20231005
mutableiterator.h
Go to the documentation of this file.
1
2
// File: mutableiterator.h
3
// Description: Iterator for tesseract results providing access to
4
// both high-level API and Tesseract internal data structures.
5
// Author: David Eger
6
//
7
// (C) Copyright 2011, 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 TESSERACT_CCMAIN_MUTABLEITERATOR_H_
21
#define TESSERACT_CCMAIN_MUTABLEITERATOR_H_
22
23
#include <
tesseract/resultiterator.h
>
24
25
class
BLOB_CHOICE_IT;
26
27
namespace
tesseract
{
28
29
class
Tesseract;
30
31
// Class to iterate over tesseract results, providing access to all levels
32
// of the page hierarchy, without including any tesseract headers or having
33
// to handle any tesseract structures.
34
// WARNING! This class points to data held within the TessBaseAPI class, and
35
// therefore can only be used while the TessBaseAPI class still exists and
36
// has not been subjected to a call of Init, SetImage, Recognize, Clear, End
37
// DetectOS, or anything else that changes the internal PAGE_RES.
38
// See tesseract/publictypes.h for the definition of PageIteratorLevel.
39
// See also base class PageIterator, which contains the bulk of the interface.
40
// ResultIterator adds text-specific methods for access to OCR output.
41
// MutableIterator adds access to internal data structures.
42
43
class
TESS_API
MutableIterator
:
public
ResultIterator
{
44
public
:
45
// See argument descriptions in ResultIterator()
46
MutableIterator
(
PAGE_RES
*page_res,
Tesseract
*
tesseract
,
int
scale,
int
scaled_yres,
47
int
rect_left,
int
rect_top,
int
rect_width,
int
rect_height)
48
:
ResultIterator
(
LTRResultIterator
(page_res,
tesseract
, scale, scaled_yres, rect_left,
49
rect_top, rect_width, rect_height)) {}
50
~MutableIterator
()
override
;
51
52
// See PageIterator and ResultIterator for most calls.
53
54
// Return access to Tesseract internals.
55
const
PAGE_RES_IT
*
PageResIt
()
const
{
56
return
it_;
57
}
58
};
59
60
}
// namespace tesseract.
61
62
#endif
// TESSERACT_CCMAIN_MUTABLEITERATOR_H_
resultiterator.h
tesseract
Definition:
baseapi.h:39
tesseract::LTRResultIterator
Definition:
ltrresultiterator.h:45
tesseract::ResultIterator
Definition:
resultiterator.h:32
tesseract::MutableIterator
Definition:
mutableiterator.h:43
tesseract::MutableIterator::PageResIt
const PAGE_RES_IT * PageResIt() const
Definition:
mutableiterator.h:55
tesseract::MutableIterator::MutableIterator
MutableIterator(PAGE_RES *page_res, Tesseract *tesseract, int scale, int scaled_yres, int rect_left, int rect_top, int rect_width, int rect_height)
Definition:
mutableiterator.h:46
tesseract::MutableIterator::~MutableIterator
~MutableIterator() override
tesseract::Tesseract
Definition:
tesseractclass.h:178
tesseract::PAGE_RES
Definition:
pageres.h:77
tesseract::PAGE_RES_IT
Definition:
pageres.h:682
TESS_API
#define TESS_API
Definition:
export.h:32
src
ccmain
mutableiterator.h
Generated on Thu Oct 5 2023 22:10:25 for tesseract by
1.9.4