tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
tesseract::BoxChar Class Reference

#include <boxchar.h>

Collaboration diagram for tesseract::BoxChar:

Public Member Functions

 BoxChar (const char *utf8_str, int len)
 
 ~BoxChar ()
 
const std::string & ch () const
 
const Box * box () const
 
const int & page () const
 
void set_rtl_index (int index)
 
const int & rtl_index () const
 
void AddBox (int x, int y, int width, int height)
 
void set_page (int page)
 
std::string * mutable_ch ()
 
Box * mutable_box ()
 
bool operator< (const BoxChar &other) const
 
void GetDirection (int *num_rtl, int *num_ltr) const
 
void ReverseUnicodesInBox ()
 

Static Public Member Functions

static void TranslateBoxes (int xshift, int yshift, std::vector< BoxChar *> *boxes)
 
static void PrepareToWrite (std::vector< BoxChar *> *boxes)
 
static void InsertNewlines (bool rtl_rules, bool vertical_rules, std::vector< BoxChar *> *boxes)
 
static void InsertSpaces (bool rtl_rules, bool vertical_rules, std::vector< BoxChar *> *boxes)
 
static void ReorderRTLText (std::vector< BoxChar *> *boxes)
 
static bool ContainsMostlyRTL (const std::vector< BoxChar *> &boxes)
 
static bool MostlyVertical (const std::vector< BoxChar *> &boxes)
 
static int TotalByteLength (const std::vector< BoxChar *> &boxes)
 
static void RotateBoxes (float rotation, int xcenter, int ycenter, int start_box, int end_box, std::vector< BoxChar *> *boxes)
 
static void WriteTesseractBoxFile (const std::string &name, int height, const std::vector< BoxChar *> &boxes)
 
static std::string GetTesseractBoxStr (int height, const std::vector< BoxChar *> &boxes)
 

Private Attributes

std::string ch_
 
Box * box_
 
int page_
 
int rtl_index_
 

Constructor & Destructor Documentation

◆ BoxChar()

tesseract::BoxChar::BoxChar ( const char *  utf8_str,
int  len 
)

◆ ~BoxChar()

tesseract::BoxChar::~BoxChar ( )

Member Function Documentation

◆ AddBox()

void tesseract::BoxChar::AddBox ( int  x,
int  y,
int  width,
int  height 
)

◆ box()

const Box* tesseract::BoxChar::box ( ) const
inline

◆ ch()

const std::string& tesseract::BoxChar::ch ( ) const
inline

◆ ContainsMostlyRTL()

bool tesseract::BoxChar::ContainsMostlyRTL ( const std::vector< BoxChar *> &  boxes)
static

◆ GetDirection()

void tesseract::BoxChar::GetDirection ( int *  num_rtl,
int *  num_ltr 
) const

◆ GetTesseractBoxStr()

std::string tesseract::BoxChar::GetTesseractBoxStr ( int  height,
const std::vector< BoxChar *> &  boxes 
)
static

◆ InsertNewlines()

void tesseract::BoxChar::InsertNewlines ( bool  rtl_rules,
bool  vertical_rules,
std::vector< BoxChar *> *  boxes 
)
static

◆ InsertSpaces()

void tesseract::BoxChar::InsertSpaces ( bool  rtl_rules,
bool  vertical_rules,
std::vector< BoxChar *> *  boxes 
)
static

◆ MostlyVertical()

bool tesseract::BoxChar::MostlyVertical ( const std::vector< BoxChar *> &  boxes)
static

◆ mutable_box()

Box* tesseract::BoxChar::mutable_box ( )
inline

◆ mutable_ch()

std::string* tesseract::BoxChar::mutable_ch ( )
inline

◆ operator<()

bool tesseract::BoxChar::operator< ( const BoxChar other) const
inline

◆ page()

const int& tesseract::BoxChar::page ( ) const
inline

◆ PrepareToWrite()

void tesseract::BoxChar::PrepareToWrite ( std::vector< BoxChar *> *  boxes)
static

◆ ReorderRTLText()

void tesseract::BoxChar::ReorderRTLText ( std::vector< BoxChar *> *  boxes)
static

◆ ReverseUnicodesInBox()

void tesseract::BoxChar::ReverseUnicodesInBox ( )

◆ RotateBoxes()

void tesseract::BoxChar::RotateBoxes ( float  rotation,
int  xcenter,
int  ycenter,
int  start_box,
int  end_box,
std::vector< BoxChar *> *  boxes 
)
static

◆ rtl_index()

const int& tesseract::BoxChar::rtl_index ( ) const
inline

◆ set_page()

void tesseract::BoxChar::set_page ( int  page)
inline

◆ set_rtl_index()

void tesseract::BoxChar::set_rtl_index ( int  index)
inline

◆ TotalByteLength()

int tesseract::BoxChar::TotalByteLength ( const std::vector< BoxChar *> &  boxes)
static

◆ TranslateBoxes()

void tesseract::BoxChar::TranslateBoxes ( int  xshift,
int  yshift,
std::vector< BoxChar *> *  boxes 
)
static

◆ WriteTesseractBoxFile()

void tesseract::BoxChar::WriteTesseractBoxFile ( const std::string &  name,
int  height,
const std::vector< BoxChar *> &  boxes 
)
static

Member Data Documentation

◆ box_

Box* tesseract::BoxChar::box_
private

◆ ch_

std::string tesseract::BoxChar::ch_
private

◆ page_

int tesseract::BoxChar::page_
private

◆ rtl_index_

int tesseract::BoxChar::rtl_index_
private

The documentation for this class was generated from the following files: