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

#include <imagedata.h>

Collaboration diagram for tesseract::ImageData:

Public Member Functions

 ImageData ()
 
 ImageData (bool vertical, Pix *pix)
 
 ~ImageData ()
 
bool Serialize (TFile *fp) const
 
bool DeSerialize (TFile *fp)
 
const STRINGimagefilename () const
 
void set_imagefilename (const STRING &name)
 
int page_number () const
 
void set_page_number (int num)
 
const GenericVector< char > & image_data () const
 
const STRINGlanguage () const
 
void set_language (const STRING &lang)
 
const STRINGtranscription () const
 
const GenericVector< TBOX > & boxes () const
 
const GenericVector< STRING > & box_texts () const
 
const STRINGbox_text (int index) const
 
void SetPix (Pix *pix)
 
Pix * GetPix () const
 
Pix * PreScale (int target_height, int max_height, float *scale_factor, int *scaled_width, int *scaled_height, GenericVector< TBOX > *boxes) const
 
int MemoryUsed () const
 
void Display () const
 
void AddBoxes (const GenericVector< TBOX > &boxes, const GenericVector< STRING > &texts, const GenericVector< int > &box_pages)
 

Static Public Member Functions

static ImageDataBuild (const char *name, int page_number, const char *lang, const char *imagedata, int imagedatasize, const char *truth_text, const char *box_text)
 
static bool SkipDeSerialize (TFile *fp)
 

Private Member Functions

bool AddBoxes (const char *box_text)
 

Static Private Member Functions

static void SetPixInternal (Pix *pix, GenericVector< char > *image_data)
 
static Pix * GetPixInternal (const GenericVector< char > &image_data)
 

Private Attributes

STRING imagefilename_
 
int32_t page_number_
 
GenericVector< char > image_data_
 
STRING language_
 
STRING transcription_
 
GenericVector< TBOXboxes_
 
GenericVector< STRINGbox_texts_
 
bool vertical_text_
 

Constructor & Destructor Documentation

◆ ImageData() [1/2]

tesseract::ImageData::ImageData ( )

◆ ImageData() [2/2]

tesseract::ImageData::ImageData ( bool  vertical,
Pix *  pix 
)

◆ ~ImageData()

tesseract::ImageData::~ImageData ( )

Member Function Documentation

◆ AddBoxes() [1/2]

void tesseract::ImageData::AddBoxes ( const GenericVector< TBOX > &  boxes,
const GenericVector< STRING > &  texts,
const GenericVector< int > &  box_pages 
)

◆ AddBoxes() [2/2]

bool tesseract::ImageData::AddBoxes ( const char *  box_text)
private

◆ box_text()

const STRING& tesseract::ImageData::box_text ( int  index) const
inline

◆ box_texts()

const GenericVector<STRING>& tesseract::ImageData::box_texts ( ) const
inline

◆ boxes()

const GenericVector<TBOX>& tesseract::ImageData::boxes ( ) const
inline

◆ Build()

ImageData * tesseract::ImageData::Build ( const char *  name,
int  page_number,
const char *  lang,
const char *  imagedata,
int  imagedatasize,
const char *  truth_text,
const char *  box_text 
)
static

◆ DeSerialize()

bool tesseract::ImageData::DeSerialize ( TFile fp)

◆ Display()

void tesseract::ImageData::Display ( ) const

◆ GetPix()

Pix * tesseract::ImageData::GetPix ( ) const

◆ GetPixInternal()

Pix * tesseract::ImageData::GetPixInternal ( const GenericVector< char > &  image_data)
staticprivate

◆ image_data()

const GenericVector<char>& tesseract::ImageData::image_data ( ) const
inline

◆ imagefilename()

const STRING& tesseract::ImageData::imagefilename ( ) const
inline

◆ language()

const STRING& tesseract::ImageData::language ( ) const
inline

◆ MemoryUsed()

int tesseract::ImageData::MemoryUsed ( ) const

◆ page_number()

int tesseract::ImageData::page_number ( ) const
inline

◆ PreScale()

Pix * tesseract::ImageData::PreScale ( int  target_height,
int  max_height,
float *  scale_factor,
int *  scaled_width,
int *  scaled_height,
GenericVector< TBOX > *  boxes 
) const

◆ Serialize()

bool tesseract::ImageData::Serialize ( TFile fp) const

◆ set_imagefilename()

void tesseract::ImageData::set_imagefilename ( const STRING name)
inline

◆ set_language()

void tesseract::ImageData::set_language ( const STRING lang)
inline

◆ set_page_number()

void tesseract::ImageData::set_page_number ( int  num)
inline

◆ SetPix()

void tesseract::ImageData::SetPix ( Pix *  pix)

◆ SetPixInternal()

void tesseract::ImageData::SetPixInternal ( Pix *  pix,
GenericVector< char > *  image_data 
)
staticprivate

◆ SkipDeSerialize()

bool tesseract::ImageData::SkipDeSerialize ( TFile fp)
static

◆ transcription()

const STRING& tesseract::ImageData::transcription ( ) const
inline

Member Data Documentation

◆ box_texts_

GenericVector<STRING> tesseract::ImageData::box_texts_
private

◆ boxes_

GenericVector<TBOX> tesseract::ImageData::boxes_
private

◆ image_data_

GenericVector<char> tesseract::ImageData::image_data_
private

◆ imagefilename_

STRING tesseract::ImageData::imagefilename_
private

◆ language_

STRING tesseract::ImageData::language_
private

◆ page_number_

int32_t tesseract::ImageData::page_number_
private

◆ transcription_

STRING tesseract::ImageData::transcription_
private

◆ vertical_text_

bool tesseract::ImageData::vertical_text_
private

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