Remove helpers.h from public API

Remove also outdated references to apitypes.h which no longer exists.

Signed-off-by: Stefan Weil <sw@weil.de>
This commit is contained in:
Stefan Weil 2020-12-31 09:03:56 +01:00
parent 7b8af67eb5
commit fc4002dda8
62 changed files with 63 additions and 72 deletions

View File

@ -700,25 +700,19 @@ install(EXPORT TesseractTargets NAMESPACE Tesseract:: DESTINATION lib/cmake/tess
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cmake DESTINATION lib)
install(FILES
# from api/makefile.am
include/tesseract/apitypes.h
include/tesseract/baseapi.h
include/tesseract/capi.h
include/tesseract/renderer.h
${CMAKE_CURRENT_BINARY_DIR}/include/tesseract/version.h
#from ccmain/makefile.am
include/tesseract/thresholder.h
include/tesseract/ltrresultiterator.h
include/tesseract/pageiterator.h
include/tesseract/resultiterator.h
include/tesseract/osdetect.h
#from ccstruct/makefile.am
include/tesseract/publictypes.h
#from ccutil/makefile.am
include/tesseract/helpers.h
include/tesseract/ocrclass.h
include/tesseract/platform.h
include/tesseract/unichar.h

View File

@ -46,10 +46,8 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = tesseract.pc
pkginclude_HEADERS = $(top_builddir)/include/tesseract/version.h
pkginclude_HEADERS += include/tesseract/apitypes.h
pkginclude_HEADERS += include/tesseract/baseapi.h
pkginclude_HEADERS += include/tesseract/capi.h
pkginclude_HEADERS += include/tesseract/helpers.h
pkginclude_HEADERS += include/tesseract/ltrresultiterator.h
pkginclude_HEADERS += include/tesseract/ocrclass.h
pkginclude_HEADERS += include/tesseract/osdetect.h
@ -325,6 +323,7 @@ noinst_HEADERS += src/ccutil/errcode.h
noinst_HEADERS += src/ccutil/fileerr.h
noinst_HEADERS += src/ccutil/genericheap.h
noinst_HEADERS += src/ccutil/genericvector.h
noinst_HEADERS += src/ccutil/helpers.h
noinst_HEADERS += src/ccutil/host.h
noinst_HEADERS += src/ccutil/kdpair.h
noinst_HEADERS += src/ccutil/lsterr.h

View File

@ -40,7 +40,7 @@ class Tesseract;
// therefore can only be used while the TessBaseAPI class still exists and
// has not been subjected to a call of Init, SetImage, Recognize, Clear, End
// DetectOS, or anything else that changes the internal PAGE_RES.
// See apitypes.h for the definition of PageIteratorLevel.
// See tesseract/publictypes.h for the definition of PageIteratorLevel.
// See also base class PageIterator, which contains the bulk of the interface.
// LTRResultIterator adds text-specific methods for access to OCR output.

View File

@ -3,7 +3,6 @@
// Description: Iterator for tesseract page structure that avoids using
// tesseract internal data structures.
// Author: Ray Smith
// Created: Fri Feb 26 11:01:06 PST 2010
//
// (C) Copyright 2010, Google Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
@ -45,7 +44,7 @@ class Tesseract;
* therefore can only be used while the TessBaseAPI class still exists and
* has not been subjected to a call of Init, SetImage, Recognize, Clear, End
* DetectOS, or anything else that changes the internal PAGE_RES.
* See apitypes.h for the definition of PageIteratorLevel.
* See tesseract/publictypes.h for the definition of PageIteratorLevel.
* See also ResultIterator, derived from PageIterator, which adds in the
* ability to access OCR output with text-specific methods.
*/
@ -219,8 +218,8 @@ class TESS_API PageIterator {
bool Empty(PageIteratorLevel level) const;
/**
* Returns the type of the current block. See apitypes.h for
* PolyBlockType.
* Returns the type of the current block.
* See tesseract/publictypes.h for PolyBlockType.
*/
PolyBlockType BlockType() const;

View File

@ -28,7 +28,6 @@ namespace tesseract {
// but not for the low-level tesseract code to include top-level API code.
// This file should not use other Tesseract types, as that would drag
// their includes into the API-level.
// API-level code should include apitypes.h in preference to this file.
/** Number of printers' points in an inch. The unit of the pointsize return. */
constexpr int kPointsPerInch = 72;

View File

@ -65,7 +65,7 @@
#include <tesseract/resultiterator.h> // for ResultIterator
#include "strngs.h" // for STRING
#include <tesseract/thresholder.h> // for ImageThresholder
#include <tesseract/helpers.h> // for IntCastRounded, chomp_string
#include "helpers.h" // for IntCastRounded, chomp_string
#include <tesseract/ocrclass.h> // for ETEXT_DESC
#include <tesseract/osdetect.h> // for OSResults, OSBestResult, OrientationId...

View File

@ -24,7 +24,7 @@
#include "tprintf.h"
#include <tesseract/baseapi.h>
#include <tesseract/helpers.h> // for Swap
#include "helpers.h" // for Swap
#include <tesseract/renderer.h>
#include <cmath>
#include <cstring>

View File

@ -31,7 +31,7 @@
#include "ratngs.h"
#include "tesseractclass.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include <algorithm>
#include <cfloat>

View File

@ -3,7 +3,6 @@
// Description: Iterator for tesseract results providing access to
// both high-level API and Tesseract internal data structures.
// Author: David Eger
// Created: Thu Feb 24 19:01:06 PST 2011
//
// (C) Copyright 2011, Google Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
@ -36,7 +35,7 @@ class Tesseract;
// therefore can only be used while the TessBaseAPI class still exists and
// has not been subjected to a call of Init, SetImage, Recognize, Clear, End
// DetectOS, or anything else that changes the internal PAGE_RES.
// See tesseract/apitypes.h for the definition of PageIteratorLevel.
// See tesseract/publictypes.h for the definition of PageIteratorLevel.
// See also base class PageIterator, which contains the bulk of the interface.
// ResultIterator adds text-specific methods for access to OCR output.
// MutableIterator adds access to internal data structures.

View File

@ -26,7 +26,7 @@
#include "reject.h"
#endif
#include <tesseract/helpers.h>
#include "helpers.h"
#include <cctype>
#include <cerrno>

View File

@ -19,7 +19,7 @@
#include <tesseract/pageiterator.h>
#include "allheaders.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "pageres.h"
#include "tesseractclass.h"
@ -354,7 +354,8 @@ bool PageIterator::Empty(PageIteratorLevel level) const {
return false;
}
/** Returns the type of the current block. See tesseract/apitypes.h for PolyBlockType. */
/** Returns the type of the current block.
* See tesseract/publictypes.h for PolyBlockType. */
PolyBlockType PageIterator::BlockType() const {
if (it_->block() == nullptr || it_->block()->block == nullptr)
return PT_UNKNOWN; // Already at the end!

View File

@ -25,7 +25,7 @@
#include <algorithm> // for max
#include <memory> // for unique_ptr
#include "genericvector.h" // for GenericVector, GenericVectorEqEq
#include <tesseract/helpers.h> // for UpdateRange, ClipToRange
#include "helpers.h" // for UpdateRange, ClipToRange
#include "host.h" // for NearlyEqual
#include "mutableiterator.h" // for MutableIterator
#include "ocrblock.h" // for BLOCK

View File

@ -44,7 +44,7 @@ int16_t Tesseract::safe_dict_word(const WERD_RES *werd_res) {
#include "tesseractclass.h"
#include "genericvector.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include <cctype>
#include <cerrno>

View File

@ -28,7 +28,7 @@
#include "host.h" // for NearlyEqual
#include "points.h" // for operator+=, ICOORD::rotate
#include <tesseract/helpers.h> // for UpdateRange, IntCastRounded
#include "helpers.h" // for UpdateRange, IntCastRounded
#include "allheaders.h" // for pixGetHeight, pixGetPixel

View File

@ -37,7 +37,7 @@
#include "polyaprx.h"
#include "werd.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include <algorithm>

View File

@ -24,7 +24,7 @@
#include "strngs.h" // for STRING
#include "tprintf.h" // for tprintf
#include <tesseract/helpers.h> // for chomp_string
#include "helpers.h" // for chomp_string
#include <tesseract/unichar.h> // for UNICHAR
#include <cstring> // for strchr, strcmp

View File

@ -30,7 +30,7 @@
#include "errcode.h" // for ASSERT_HOST
#include "normalis.h" // for DENORM
#include <tesseract/helpers.h> // for ClipToRange, IntCastRounded, Modulo
#include "helpers.h" // for ClipToRange, IntCastRounded, Modulo
#include "allheaders.h" // for pixSetPixel, pixGetData, pixRasterop, pixGe...
#include "pix.h" // for Pix (ptr only), PIX_DST, PIX_NOT

View File

@ -28,7 +28,7 @@
#include "scrollview.h" // for ScrollView, ScrollView::CYAN, ScrollView::NONE
#include "tprintf.h" // for tprintf
#include <tesseract/helpers.h> // for IntCastRounded, TRand, ClipToRange, Modulo
#include "helpers.h" // for IntCastRounded, TRand, ClipToRange, Modulo
#include "serialis.h" // for TFile
#include "allheaders.h" // for pixDestroy, pixGetHeight, pixGetWidth, lept_...

View File

@ -25,7 +25,7 @@
#define TESSERACT_CCSTRUCT_MATRIX_H_
#include "errcode.h" // for ASSERT_HOST
#include <tesseract/helpers.h> // for ReverseN, ClipToRange
#include "helpers.h" // for ReverseN, ClipToRange
#include "kdpair.h" // for KDPairInc
#include "points.h" // for ICOORD

View File

@ -21,7 +21,7 @@
#include "allheaders.h"
#include "blobs.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "matrix.h"
#include "ocrblock.h"
#include "unicharset.h"

View File

@ -21,7 +21,7 @@
#include <cstring>
#include "allheaders.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#if defined(USE_OPENCL)
#include "openclwrapper.h" // for OpenclDevice
#endif

View File

@ -20,7 +20,7 @@
#include "points.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "serialis.h"
#include <algorithm>

View File

@ -27,7 +27,7 @@
#include "scrollview.h"
#include "tprintf.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include <cstring>
#include <cmath>

View File

@ -25,7 +25,7 @@
#include "linlsq.h"
#include <tesseract/helpers.h>
#include "helpers.h"
namespace tesseract {

View File

@ -20,7 +20,7 @@
#include "ambigs.h"
#include <cstdio>
#include <tesseract/helpers.h>
#include "helpers.h"
#include "universalambigs.h"
#if defined(_WIN32) && !defined(__GNUC__)

View File

@ -22,7 +22,7 @@
#include "bitvector.h"
#include <algorithm>
#include <cstring>
#include <tesseract/helpers.h>
#include "helpers.h"
#include "serialis.h" // for tesseract::Serialize
namespace tesseract {

View File

@ -20,7 +20,7 @@
#define TESSERACT_CCUTIL_GENERICVECTOR_H_
#include "serialis.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include <algorithm>
#include <cassert>

View File

@ -20,7 +20,7 @@
#include "errcode.h"
#include <tesseract/helpers.h> // for ReverseN
#include "helpers.h" // for ReverseN
#include <cstdio>
#include <limits.h> // for INT_MAX

View File

@ -20,7 +20,7 @@
#include "errcode.h" // for ASSERT_HOST
#include <tesseract/helpers.h> // for ReverseN
#include "helpers.h" // for ReverseN
#include "serialis.h" // for TFile
#include <cassert> // for assert

View File

@ -31,7 +31,7 @@
#endif
#include "errcode.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "serialis.h"
#include "strngs.h"
#include <tesseract/version.h>

View File

@ -23,7 +23,7 @@
#include "unicharmap.h"
#include "genericvector.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "serialis.h"
#include "strngs.h"
#include <tesseract/unichar.h>

View File

@ -62,7 +62,7 @@
#include "genericvector.h" // for GenericVector
#include "serialis.h" // for TFile
#include "strngs.h" // for STRING
#include <tesseract/helpers.h> // for IntCastRounded, ClipToRange
#include "helpers.h" // for IntCastRounded, ClipToRange
#include <tesseract/unichar.h> // for UNICHAR_ID, INVALID_UNICHAR_ID
#include <algorithm> // for max, min

View File

@ -25,7 +25,7 @@
#include "matrix.h"
#include "tprintf.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include <cfloat> // for FLT_MAX
#include <cmath> // for M_PI

View File

@ -23,7 +23,7 @@
#include <string> // for std::string
#include "classify.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "serialis.h"
#include <tesseract/unichar.h>

View File

@ -22,7 +22,7 @@
#include "classify.h"
#include "picofeat.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#define MAX_INT_CHAR_NORM (INT_CHAR_NORM_RANGE - 1)

View File

@ -29,7 +29,7 @@
#include "statistc.h"
#include "trainingsample.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "allheaders.h"

View File

@ -28,7 +28,7 @@
#include "classify.h"
#include "shapetable.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include <cassert>
#include <cmath>

View File

@ -36,7 +36,7 @@
#include "shapetable.h"
#include "svmnode.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include <algorithm>
#include <cmath> // for M_PI, std::floor

View File

@ -22,7 +22,7 @@
#include "classify.h"
#include "clusttool.h"
#include "emalloc.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "normfeat.h"
#include "unicharset.h"
#include "params.h"

View File

@ -23,7 +23,7 @@
#include <cmath> // for M_PI
#include "allheaders.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "intfeaturemap.h"
#include "normfeat.h"
#include "shapetable.h"

View File

@ -23,7 +23,7 @@
#include "dawg.h"
#include "dict.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "strngs.h"
#include "tprintf.h"

View File

@ -26,7 +26,7 @@
#endif
#include "ccutil.h"
#include "dict.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "matchdefs.h"
#include "pageres.h"
#include "params.h"

View File

@ -25,7 +25,7 @@
#include "dawg.h"
#include "dict.h"
#include "genericvector.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "kdpair.h"
namespace tesseract {

View File

@ -18,7 +18,7 @@
#ifndef TESSERACT_LSTM_FUNCTIONS_H_
#define TESSERACT_LSTM_FUNCTIONS_H_
#include <tesseract/helpers.h>
#include "helpers.h"
// Setting this to 1 or more causes massive dumps of debug data: weights,
// updates, internal calculations etc, and reduces the number of test iterations

View File

@ -25,7 +25,7 @@
#include "allheaders.h"
#include "dict.h"
#include "genericheap.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "imagedata.h"
#include "input.h"
#include "lstm.h"

View File

@ -19,7 +19,7 @@
#define TESSERACT_LSTM_LSTMRECOGNIZER_H_
#include "ccutil.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "imagedata.h"
#include "matrix.h"
#include "network.h"

View File

@ -24,7 +24,7 @@
#include "static_shape.h"
#include "strngs.h" // for STRING
#include "tprintf.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include <cstdio>
#include <cmath>

View File

@ -24,7 +24,7 @@
#include <vector>
#include "genericvector.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "static_shape.h"
#include "stridemap.h"
#include "weightmatrix.h"

View File

@ -31,7 +31,7 @@
#include "blobbox.h"
#include "detlinefit.h"
#include "drawtord.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "linlsq.h"
#include "makerow.h"
#include "textord.h"

View File

@ -18,7 +18,7 @@
///////////////////////////////////////////////////////////////////////
#include "bbgrid.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "ocrblock.h"
namespace tesseract {

View File

@ -25,7 +25,7 @@
#include <cctype>
#include <cmath>
#include <tesseract/helpers.h>
#include "helpers.h"
namespace tesseract {

View File

@ -32,7 +32,7 @@
#include "tovars.h"
#include "wordseg.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include <memory>

View File

@ -25,7 +25,7 @@
#include "tesseractclass.h"
#include <tesseract/baseapi.h>
#include <tesseract/helpers.h>
#include "helpers.h"
int main(int argc, char** argv) {
tesseract::CheckSharedLibraryVersion();

View File

@ -23,7 +23,7 @@
#include <cstdlib>
#include "allheaders.h" // from leptonica
#include "genericvector.h"
#include <tesseract/helpers.h> // For TRand.
#include "helpers.h" // For TRand.
#include "rect.h"
namespace tesseract {

View File

@ -22,7 +22,7 @@
#include "allheaders.h"
#include "genericvector.h"
#include <tesseract/helpers.h> // For TRand.
#include "helpers.h" // For TRand.
#include "rect.h"
namespace tesseract {

View File

@ -43,7 +43,7 @@
#include "degradeimage.h"
#include "errcode.h"
#include "fileio.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "normstrngs.h"
#include "stringrenderer.h"
#include "tlog.h"

View File

@ -23,7 +23,7 @@
#include "commontraining.h" // CheckSharedLibraryVersion
#include "dawg.h"
#include "dict.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "serialis.h"
#include "trie.h"
#include "unicharset.h"

View File

@ -21,7 +21,7 @@
----------------------------------------------------------------------*/
#include "blobs.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "matrix.h"
#include "ratngs.h"
#include "seam.h"

View File

@ -20,7 +20,7 @@
#include "absl/strings/str_cat.h"
#include "tprintf.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "functions.h"
#include "lang_model_helpers.h"

View File

@ -17,7 +17,7 @@
#include <string>
#include "allheaders.h"
#include <tesseract/baseapi.h>
#include <tesseract/helpers.h>
#include "helpers.h"
#include "log.h"
#include "include_gunit.h"

View File

@ -22,7 +22,7 @@
#include "normstrngs.h"
#include "unicharset_training_utils.h"
#include <tesseract/helpers.h>
#include "helpers.h"
#include "absl/strings/str_format.h" // for absl::StrFormat