girl::contour Class Reference

Closed contour class. More...

#include <girl/girlContour.hpp>


Public Member Functions

 contour (const girl::point &startPt=girl::point(0, 0))
 Default constructor.
 contour (const girl::point &startPt, const std::deque< girl::direction > &dirs)
 Constructor.
void set (const girl::point &startPt, const std::deque< girl::direction > &dirs)
 Set freemanCodePath from a starting point startPt and a deque of directions dirs.
girl::point startPt () const
 Gives starting point of path self.
size_t length () const
 Path length, i.e. number of directions.
bool isPositivelyOriented () const
 Checks if contour self is positively oriented.
void invertOrientation ()
 Inverts orientation of contour.


Detailed Description

Closed contour class.

Constructor & Destructor Documentation

girl::contour::contour ( const girl::point startPt = girl::point(0, 0)  )  [inline]

Default constructor.

Creates an empty contour.

girl::contour::contour ( const girl::point startPt,
const std::deque< girl::direction > &  dirs 
) [inline]

Constructor.

Construct a freemanCodePath from a starting point startPt and a deque of directions dirs.

Warning:
directions must describe a closed contour.


Member Function Documentation

void girl::contour::invertOrientation (  )  [inline]

Inverts orientation of contour.

For example, a contour with four directions Right, Up, Left, and Down, will be changed to Up, Right, Down, and Left.

bool girl::contour::isPositivelyOriented (  )  const

Checks if contour self is positively oriented.

Returns:
true if contour is positively oriented, false if not.

true for empty freemanCodePath.

size_t girl::contour::length (  )  const [inline]

Path length, i.e. number of directions.

O(1).

void girl::contour::set ( const girl::point startPt,
const std::deque< girl::direction > &  dirs 
) [inline]

Set freemanCodePath from a starting point startPt and a deque of directions dirs.

Warning:
directions must describe a closed contour.


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

Generated on Thu Jun 4 14:30:33 2009 for GIRL: General Image Representation Library by  doxygen 1.5.7.1