ReadFramework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rdf::Pixel Class Reference

This class represents a single instance of super pixels which are needed for the layout analysis. More...

#include <Pixel.h>

Inheritance diagram for rdf::Pixel:
Collaboration diagram for rdf::Pixel:

Public Types

enum  DrawFlag {
  draw_ellipse_only = 0, draw_stats_only, draw_ellipse_stats, draw_all,
  draw_end
}
 

Public Member Functions

 Pixel ()
 
 Pixel (const Ellipse &ellipse, const Rect &bbox, const QString &id=QString())
 
bool isNull () const
 
Vector2D center () const
 
Rect bbox () const
 
Vector2D size () const
 
double angle () const
 
Ellipse ellipse () const
 
void addStats (const QSharedPointer< PixelStats > &stats)
 
QSharedPointer< PixelStatsstats (int idx=-1) const
 
void setTabStop (const PixelTabStop &tabStop)
 
PixelTabStop tabStop () const
 Returns tab stop statistics or NULL if tab stops are not computed. PixelTabStop stores if the Pixel is a tab stop (left/right) candidate or not. More...
 
void setLabel (const PixelLabel &label)
 
PixelLabel label () const
 
cv::KeyPoint toKeyPoint () const
 
void draw (QPainter &p, double alpha=0.3, const DrawFlag &df=draw_stats_only) const
 
- Public Member Functions inherited from rdf::BaseElement
 BaseElement (const QString &id=QString())
 This class keeps an ID to keep track of transformed elements during a processing chain. You can e.g. generate Pixel elements from MserBlobs. After filtering, processing etc. you can map back to the (pixel accurate) MserBlob using this ID. More...
 
QString id () const
 Returns the elment's id. More...
 

Protected Attributes

bool mIsNull = true
 
Ellipse mEllipse
 
Rect mBBox
 
QVector< QSharedPointer
< PixelStats > > 
mStats
 
PixelTabStop mTabStop
 
PixelLabel mLabel
 
- Protected Attributes inherited from rdf::BaseElement
QString mId
 

Detailed Description

This class represents a single instance of super pixels which are needed for the layout analysis.

See Also
BaseElement

Member Enumeration Documentation

Enumerator
draw_ellipse_only 
draw_stats_only 
draw_ellipse_stats 
draw_all 
draw_end 

Constructor & Destructor Documentation

rdf::Pixel::Pixel ( )
rdf::Pixel::Pixel ( const Ellipse ellipse,
const Rect bbox,
const QString &  id = QString() 
)

Member Function Documentation

void rdf::Pixel::addStats ( const QSharedPointer< PixelStats > &  stats)
double rdf::Pixel::angle ( ) const
Rect rdf::Pixel::bbox ( ) const
inline
Vector2D rdf::Pixel::center ( ) const
inline
void rdf::Pixel::draw ( QPainter &  p,
double  alpha = 0.3,
const DrawFlag df = draw_stats_only 
) const
Ellipse rdf::Pixel::ellipse ( ) const
bool rdf::Pixel::isNull ( ) const
PixelLabel rdf::Pixel::label ( ) const
void rdf::Pixel::setLabel ( const PixelLabel label)
void rdf::Pixel::setTabStop ( const PixelTabStop tabStop)
Vector2D rdf::Pixel::size ( ) const
QSharedPointer< PixelStats > rdf::Pixel::stats ( int  idx = -1) const
PixelTabStop rdf::Pixel::tabStop ( ) const

Returns tab stop statistics or NULL if tab stops are not computed. PixelTabStop stores if the Pixel is a tab stop (left/right) candidate or not.

Returns
Tab stop statistics.
cv::KeyPoint rdf::Pixel::toKeyPoint ( ) const

Member Data Documentation

Rect rdf::Pixel::mBBox
protected
Ellipse rdf::Pixel::mEllipse
protected
bool rdf::Pixel::mIsNull = true
protected
PixelLabel rdf::Pixel::mLabel
protected
QVector<QSharedPointer<PixelStats> > rdf::Pixel::mStats
protected
PixelTabStop rdf::Pixel::mTabStop
protected

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