libcrn
3.9.5
A document image processing library
|
XML Alto Page element. More...
#include <CRNAltoLayout.hpp>
Public Types | |
enum | Position { Position::Undef = 0, Position::Left, Position::Right, Position::Foldout, Position::Single, Position::Cover } |
enum | Quality { Quality::Undef = 0, Quality::Ok, Quality::Missing, Quality::MissingInOriginal, Quality::Damaged, Quality::Retained, Quality::Target, Quality::AsInOriginal } |
typedef std::weak_ptr< Space > | SpacePtr |
Public Member Functions | |
Page (const Page &)=delete | |
Page (Page &&)=default | |
virtual | ~Page () override |
Page & | operator= (const Page &)=delete |
Page & | operator= (Page &&)=default |
const Id & | GetId () const |
Returns the id of the element. More... | |
Option< StringUTF8 > | GetPageClass () const |
Returns the class of the page (user defined class such as "title") More... | |
void | SetPageClass (const StringUTF8 &s) |
Sets the class of the page (user defined class such as "title") More... | |
std::vector< Id > | GetStyles () const |
Returns the list of style references. More... | |
void | AddStyle (const Id &styleid) |
Adds a reference to a style. More... | |
void | RemoveStyle (const Id &styleid) |
Removes a reference to a style. More... | |
Option< int > | GetHeight () const |
Returns the height of the page. More... | |
void | SetHeight (int i) |
Sets the height of the page. More... | |
Option< int > | GetWidth () const |
Returns the width of the page. More... | |
void | SetWidth (int i) |
Sets the width of the page. More... | |
int | GetPhysicalImageNumber () const |
Returns the number of the page within the document. More... | |
void | SetPhysicalImageNumber (int pnum) |
Sets the number of the page within the document. More... | |
Option< StringUTF8 > | GetPrintedImageNumber () const |
Returns the page number that is printed on the document. More... | |
void | SetPrintedImageNumber (const StringUTF8 &s) |
Sets the page number that is printed on the document. More... | |
Option< Quality > | GetQuality () const |
Returns the quality of the original page. More... | |
void | SetQuality (Quality q) |
Sets the quality of the original page. More... | |
Option< StringUTF8 > | GetQualityDetail () const |
Returns details on the quality of the original page. More... | |
void | SetQualityDetail (const StringUTF8 &s) |
Sets the details on the quality of the original page. More... | |
Option< Position > | GetPosition () const |
Returns the position of the page. More... | |
Option< Id > | GetProcessing () const |
Returns the id of the processing applied to the page. More... | |
Option< double > | GetAccuracy () const |
Returns the estimated % of OCR accuracy on the page [0, 100]. More... | |
void | SetAccuracy (double acc) |
Sets the estimated % of OCR accuracy on the page [0, 100]. More... | |
Option< double > | GetPageConfidence () const |
Returns the confidence of OCR on the page [0, 1]. More... | |
void | SetPageConfidence (double c) |
Sets the confidence of OCR on the page [0, 1]. More... | |
SpacePtr | GetTopMargin () |
Returns the top margin. More... | |
SpacePtr | GetLeftMargin () |
Returns the left margin. More... | |
SpacePtr | GetRightMargin () |
Returns the right margin. More... | |
SpacePtr | GetBottomMargin () |
Returns the bottom margin. More... | |
SpacePtr | GetPrintSpace () |
Returns the main print space. More... | |
Space & | GetSpace (const Id &sid) |
Returns a space. More... | |
Space & | AddTopMargin (const Id &id_, double x, double y, double w, double h) |
Adds a top margin. More... | |
Space & | AddLeftMargin (const Id &id_, double x, double y, double w, double h) |
Adds a left margin. More... | |
Space & | AddRightMargin (const Id &id_, double x, double y, double w, double h) |
Adds a right margin. More... | |
Space & | AddBottomMargin (const Id &id_, double x, double y, double w, double h) |
Adds a bottom margin. More... | |
Space & | AddPrintSpace (const Id &id_, double x, double y, double w, double h) |
Adds the print space. More... | |
std::vector< SpacePtr > | GetSpaces () const |
Returns the list of all spaces. More... | |
void | RemoveSpace (const Id &sid) |
Removes a space. More... | |
Friends | |
class | Layout |
XML Alto Page element.
Definition at line 50 of file CRNAltoLayout.hpp.
typedef std::weak_ptr<Space> Layout::Page::SpacePtr |
Definition at line 112 of file CRNAltoLayout.hpp.
|
strong |
Enumerator | |
---|---|
Undef | |
Left | |
Right | |
Foldout | |
Single | |
Cover |
Definition at line 53 of file CRNAltoLayout.hpp.
|
strong |
Enumerator | |
---|---|
Undef | |
Ok | |
Missing | |
MissingInOriginal | |
Damaged | |
Retained | |
Target | |
AsInOriginal |
Definition at line 89 of file CRNAltoLayout.hpp.
|
delete |
|
default |
|
inlineoverridevirtual |
Definition at line 57 of file CRNAltoLayout.hpp.
Space& Layout::Page::AddBottomMargin | ( | const Id & | id_, |
double | x, | ||
double | y, | ||
double | w, | ||
double | h | ||
) |
Adds a bottom margin.
Space& Layout::Page::AddLeftMargin | ( | const Id & | id_, |
double | x, | ||
double | y, | ||
double | w, | ||
double | h | ||
) |
Adds a left margin.
Space& Layout::Page::AddPrintSpace | ( | const Id & | id_, |
double | x, | ||
double | y, | ||
double | w, | ||
double | h | ||
) |
Adds the print space.
Space& Layout::Page::AddRightMargin | ( | const Id & | id_, |
double | x, | ||
double | y, | ||
double | w, | ||
double | h | ||
) |
Adds a right margin.
void Layout::Page::AddStyle | ( | const Id & | styleid | ) |
Adds a reference to a style.
Space& Layout::Page::AddTopMargin | ( | const Id & | id_, |
double | x, | ||
double | y, | ||
double | w, | ||
double | h | ||
) |
Adds a top margin.
Option<double> Layout::Page::GetAccuracy | ( | ) | const |
Returns the estimated % of OCR accuracy on the page [0, 100].
|
inline |
Returns the bottom margin.
Definition at line 120 of file CRNAltoLayout.hpp.
Option<int> Layout::Page::GetHeight | ( | ) | const |
Returns the height of the page.
|
inline |
Returns the id of the element.
Definition at line 62 of file CRNAltoLayout.hpp.
|
inline |
Returns the left margin.
Definition at line 116 of file CRNAltoLayout.hpp.
Option<StringUTF8> Layout::Page::GetPageClass | ( | ) | const |
Returns the class of the page (user defined class such as "title")
Option<double> Layout::Page::GetPageConfidence | ( | ) | const |
Returns the confidence of OCR on the page [0, 1].
int Layout::Page::GetPhysicalImageNumber | ( | ) | const |
Returns the number of the page within the document.
Option<Position> Layout::Page::GetPosition | ( | ) | const |
Returns the position of the page.
Option<StringUTF8> Layout::Page::GetPrintedImageNumber | ( | ) | const |
Returns the page number that is printed on the document.
|
inline |
Returns the main print space.
Definition at line 122 of file CRNAltoLayout.hpp.
Option<Id> Layout::Page::GetProcessing | ( | ) | const |
Returns the id of the processing applied to the page.
Option<Quality> Layout::Page::GetQuality | ( | ) | const |
Returns the quality of the original page.
Option<StringUTF8> Layout::Page::GetQualityDetail | ( | ) | const |
Returns details on the quality of the original page.
|
inline |
Returns the right margin.
Definition at line 118 of file CRNAltoLayout.hpp.
Space& Layout::Page::GetSpace | ( | const Id & | sid | ) |
Returns a space.
std::vector<SpacePtr> Layout::Page::GetSpaces | ( | ) | const |
Returns the list of all spaces.
std::vector<Id> Layout::Page::GetStyles | ( | ) | const |
Returns the list of style references.
|
inline |
Returns the top margin.
Definition at line 114 of file CRNAltoLayout.hpp.
Option<int> Layout::Page::GetWidth | ( | ) | const |
Returns the width of the page.
void Layout::Page::RemoveSpace | ( | const Id & | sid | ) |
Removes a space.
void Layout::Page::RemoveStyle | ( | const Id & | styleid | ) |
Removes a reference to a style.
void Layout::Page::SetAccuracy | ( | double | acc | ) |
Sets the estimated % of OCR accuracy on the page [0, 100].
void Layout::Page::SetHeight | ( | int | i | ) |
Sets the height of the page.
void Layout::Page::SetPageClass | ( | const StringUTF8 & | s | ) |
Sets the class of the page (user defined class such as "title")
void Layout::Page::SetPageConfidence | ( | double | c | ) |
Sets the confidence of OCR on the page [0, 1].
void Layout::Page::SetPhysicalImageNumber | ( | int | pnum | ) |
Sets the number of the page within the document.
void Layout::Page::SetPrintedImageNumber | ( | const StringUTF8 & | s | ) |
Sets the page number that is printed on the document.
void Layout::Page::SetQuality | ( | Quality | q | ) |
Sets the quality of the original page.
void Layout::Page::SetQualityDetail | ( | const StringUTF8 & | s | ) |
Sets the details on the quality of the original page.
void Layout::Page::SetWidth | ( | int | i | ) |
Sets the width of the page.
|
friend |
Definition at line 155 of file CRNAltoLayout.hpp.