19#ifndef TESSERACT_CCUTIL_BOXREAD_H_
20#define TESSERACT_CCUTIL_BOXREAD_H_
47bool ReadAllBoxes(
int target_page,
bool skip_blanks,
const char *filename, std::vector<TBOX> *boxes,
48 std::vector<std::string> *texts, std::vector<std::string> *box_texts,
49 std::vector<int> *pages);
56bool ReadMemBoxes(
int target_page,
bool skip_blanks,
const char *box_data,
bool continue_on_failure,
57 std::vector<TBOX> *boxes, std::vector<std::string> *texts,
58 std::vector<std::string> *box_texts, std::vector<int> *pages);
69bool ReadNextBox(
int *line_number, FILE *box_file, std::string &utf8_str,
TBOX *bounding_box);
74bool ReadNextBox(
int target_page,
int *line_number, FILE *box_file, std::string &utf8_str,
80bool ParseBoxFileStr(
const char *boxfile_str,
int *page_number, std::string &utf8_str,
85void MakeBoxFileStr(
const char *unichar_str,
const TBOX &box,
int page_num, std::string &box_str);
bool ReadMemBoxes(int target_page, bool skip_blanks, const char *box_data, bool continue_on_failure, std::vector< TBOX > *boxes, std::vector< std::string > *texts, std::vector< std::string > *box_texts, std::vector< int > *pages)
bool ParseBoxFileStr(const char *boxfile_str, int *page_number, std::string &utf8_str, TBOX *bounding_box)
void MakeBoxFileStr(const char *unichar_str, const TBOX &box, int page_num, std::string &box_str)
bool ReadAllBoxes(int target_page, bool skip_blanks, const char *filename, std::vector< TBOX > *boxes, std::vector< std::string > *texts, std::vector< std::string > *box_texts, std::vector< int > *pages)
const int kBoxReadBufSize
FILE * OpenBoxFile(const char *fname)
bool ReadNextBox(int *line_number, FILE *box_file, std::string &utf8_str, TBOX *bounding_box)