libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Friends | List of all members
Layout::Page Class Reference

XML Alto Page element. More...

#include <CRNAltoLayout.hpp>

+ Inheritance diagram for Layout::Page:
+ Collaboration diagram for Layout::Page:

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< SpaceSpacePtr
 

Public Member Functions

 Page (const Page &)=delete
 
 Page (Page &&)=default
 
virtual ~Page () override
 
Pageoperator= (const Page &)=delete
 
Pageoperator= (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< QualityGetQuality () 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< PositionGetPosition () 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...
 
SpaceGetSpace (const Id &sid)
 Returns a space. More...
 
SpaceAddTopMargin (const Id &id_, double x, double y, double w, double h)
 Adds a top margin. More...
 
SpaceAddLeftMargin (const Id &id_, double x, double y, double w, double h)
 Adds a left margin. More...
 
SpaceAddRightMargin (const Id &id_, double x, double y, double w, double h)
 Adds a right margin. More...
 
SpaceAddBottomMargin (const Id &id_, double x, double y, double w, double h)
 Adds a bottom margin. More...
 
SpaceAddPrintSpace (const Id &id_, double x, double y, double w, double h)
 Adds the print space. More...
 
std::vector< SpacePtrGetSpaces () const
 Returns the list of all spaces. More...
 
void RemoveSpace (const Id &sid)
 Removes a space. More...
 

Friends

class Layout
 

Detailed Description

XML Alto Page element.

Author
Yann LEYDIER

Definition at line 50 of file CRNAltoLayout.hpp.

Member Typedef Documentation

typedef std::weak_ptr<Space> Layout::Page::SpacePtr

Definition at line 112 of file CRNAltoLayout.hpp.

Member Enumeration Documentation

Enumerator
Undef 
Left 
Right 
Foldout 
Single 
Cover 

Definition at line 53 of file CRNAltoLayout.hpp.

enum Layout::Page::Quality
strong
Enumerator
Undef 
Ok 
Missing 
MissingInOriginal 
Damaged 
Retained 
Target 
AsInOriginal 

Definition at line 89 of file CRNAltoLayout.hpp.

Constructor & Destructor Documentation

Layout::Page::Page ( const Page )
delete
Layout::Page::Page ( Page &&  )
default
virtual Layout::Page::~Page ( )
inlineoverridevirtual

Definition at line 57 of file CRNAltoLayout.hpp.

Member Function Documentation

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].

SpacePtr Layout::Page::GetBottomMargin ( )
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.

const Id& Layout::Page::GetId ( ) const
inline

Returns the id of the element.

Definition at line 62 of file CRNAltoLayout.hpp.

SpacePtr Layout::Page::GetLeftMargin ( )
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.

SpacePtr Layout::Page::GetPrintSpace ( )
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.

SpacePtr Layout::Page::GetRightMargin ( )
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.

SpacePtr Layout::Page::GetTopMargin ( )
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.

Page& Layout::Page::operator= ( const Page )
delete
Page& Layout::Page::operator= ( Page &&  )
default
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.

Friends And Related Function Documentation

friend class Layout
friend

Definition at line 155 of file CRNAltoLayout.hpp.


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