#include <imagedata.h>
Definition at line 186 of file imagedata.h.
| tesseract::DocumentData::DocumentData |
( |
const STRING & |
name | ) |
|
|
explicit |
Definition at line 343 of file imagedata.cpp.
344 : document_name_(name), pages_offset_(0), total_pages_(0),
345 memory_used_(0), max_memory_(0), reader_(NULL) {}
| tesseract::DocumentData::~DocumentData |
( |
| ) |
|
| void tesseract::DocumentData::AddPageToDocument |
( |
ImageData * |
page | ) |
|
Definition at line 433 of file imagedata.cpp.
434 pages_.push_back(page);
435 memory_used_ += page->MemoryUsed();
| const STRING& tesseract::DocumentData::document_name |
( |
| ) |
const |
|
inline |
Definition at line 202 of file imagedata.h.
203 return document_name_;
| const ImageData * tesseract::DocumentData::GetPage |
( |
int |
index | ) |
|
Definition at line 380 of file imagedata.cpp.
381 index =
Modulo(index, total_pages_);
382 if (index < pages_offset_ || index >= pages_offset_ + pages_.size()) {
383 pages_offset_ = index;
384 if (!ReCachePages())
return NULL;
386 return pages_[index - pages_offset_];
| bool tesseract::DocumentData::LoadDocument |
( |
const char * |
filename, |
|
|
const char * |
lang, |
|
|
int |
start_page, |
|
|
inT64 |
max_memory, |
|
|
FileReader |
reader |
|
) |
| |
Definition at line 351 of file imagedata.cpp.
356 pages_offset_ = start_page;
357 max_memory_ = max_memory;
359 return ReCachePages();
| inT64 tesseract::DocumentData::memory_used |
( |
| ) |
const |
|
inline |
| int tesseract::DocumentData::NumPages |
( |
| ) |
const |
|
inline |
| bool tesseract::DocumentData::SaveDocument |
( |
const char * |
filename, |
|
|
FileWriter |
writer |
|
) |
| |
| bool tesseract::DocumentData::SaveToBuffer |
( |
GenericVector< char > * |
buffer | ) |
|
Definition at line 372 of file imagedata.cpp.
374 fp.OpenWrite(buffer);
375 return pages_.Serialize(&fp);
| ImageData* tesseract::DocumentData::TakePage |
( |
int |
index | ) |
|
|
inline |
Definition at line 215 of file imagedata.h.
216 ImageData* page = pages_[index];
217 pages_[index] = NULL;
The documentation for this class was generated from the following files: