In file contour/Constraints2D.h:

class RectangleContour2DConstraint : public Constraint

a class corresponding to a position constraint where all contour edges located outside the rectangle are removed

Inheritance:


Public Methods

virtual void apply ()
the apply fonction that cuts all parts of the contour outside the rectangle
void setFirstCorner (const Vec2 &position)
sets the first corner of the rectangle
void setSecondCorner (const Vec2 &position)
sets the second corner of the rectangle
Vec2 getFirstCorner () const
get the second corner of the rectangle
Vec2 getSecondCorner () const
get the second corner of the rectangle
bool insideRectangle (Vec2 &pos)
returns a boolean corresponding to the test if a point is inside a rectangle

Public

Constructors
RectangleContour2DConstraint (ActiveContour2D *_contour=0, const unsigned int _frequency=1, const Vec2 _first_corner=Vec2(0.0, 0.), const Vec2 _second_corner=Vec2(1., 1.)) throw(MissingContour)
constructor of the RectangleContour2DConstraint
destructor
virtual ~RectangleContour2DConstraint (void)
empty destructor

Private Fields

Vec2 corner [2]
the 2 corners of the rectangle
constructor
MissingContour (const std::string& from)
constructor from a string
ActiveContour2D* contour
the ActiveContour2D where the constraint is applied

Documentation

a class corresponding to a position constraint where all contour edges located outside the rectangle are removed
Vec2 corner[2]
the 2 corners of the rectangle

constructor

MissingContour(const std::string& from)
constructor from a string
Parameters:
from - a string indicating where the exception where thrown

ActiveContour2D* contour
the ActiveContour2D where the constraint is applied

virtual void apply()
the apply fonction that cuts all parts of the contour outside the rectangle

void setFirstCorner(const Vec2 &position)
sets the first corner of the rectangle

void setSecondCorner(const Vec2 &position)
sets the second corner of the rectangle

Vec2 getFirstCorner() const
get the second corner of the rectangle

Vec2 getSecondCorner() const
get the second corner of the rectangle

bool insideRectangle(Vec2 &pos)
returns a boolean corresponding to the test if a point is inside a rectangle

Constructors

RectangleContour2DConstraint(ActiveContour2D *_contour=0, const unsigned int _frequency=1, const Vec2 _first_corner=Vec2(0.0, 0.), const Vec2 _second_corner=Vec2(1., 1.)) throw(MissingContour)
constructor of the RectangleContour2DConstraint
Throws:
MissingContour when the active contour pointer is 0
Parameters:
_contour - the active contour on which the constraint apply
_frequency - the frequency at which the constraint is called
_first_corner - the first corner of the rectangle
_second_corner - the second corner of the rectangle

destructor

virtual ~RectangleContour2DConstraint(void)
empty destructor


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de