Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Math - Geometry - 2D - Boundry - BoundaryC
 

  PUBLIC
BoundaryC::BoundaryC(bool)
BoundaryC::BoundaryC(const DListC &,bool)
BoundaryC::BoundaryC(const DListC> &,bool)
BoundaryC::BoundaryC(const IndexRange2dC &,bool)
BoundaryC::Area(void) const
BoundaryC::Order(const EdgeC &,bool)
BoundaryC::Orient(void) const
BoundaryC::Invert(void)
BoundaryC::BReverse(void)
BoundaryC::Copy(void) const
BoundaryC::ConvexHull(void) const
BoundaryC::BoundingBox(void) const
BoundaryC::CreateHashtable(void) const
BoundaryC::OrderContinuous(const RCHashC> &,const EdgeC &,bool) const
BoundaryC::FindEndpoints(const RCHashC> &) const
DListC::Body(void)
DListC::Body(void) const
DListC::Head(void)
DListC::Head(void) const
DListC::IsEmpty(void) const
DListC::Size(void) const
DListC::Reverse(void)
DListC::Copy(void) const
DListC::InsFirst(const DataT &)
DListC::InsLast(const DataT &)
DListC::PopFirst(void)
DListC::PopLast(void)
DListC::DelFirst(void)
DListC::DelLast(void)
DListC::Empty(void)
DListC::operator +=(const DataT &)
DListC::operator +=(const DListC &)
DListC::MoveFirst(DListC &)
DListC::MoveLast(DListC &)
DListC::MoveFirst(DLIterC &)
DListC::MoveLast(DLIterC &)
DListC::operator ==(const DListC &) const
DListC::operator !=(const DListC &) const
DListC::First(void)
DListC::Last(void)
DListC::First(void) const
DListC::Last(void) const
DListC::Del(const DataT &)
DListC::Contains(const DataT &)
DListC::Nth(int)
DListC::Nth(int) const
DListC::operator <<(ostream &,const DListC &)
DListC::operator >>(istream &,DListC &)
DListC::operator <<(BinOStreamC &,const DListC &)
DListC::operator >>(BinIStreamC &,DListC &)
RCHandleC::operator =(const RCHandleC &)
RCHandleC::DeepCopy(UIntT) const
RCHandleC::operator ==(const RCHandleC &) const
RCHandleC::operator !=(const RCHandleC &) const
RCHandleC::Hash(void) const
RCHandleC::IsValid(void) const
RCHandleC::Invalidate(void)
RCHandleC::IsHandleType(const DT &) const
RCHandleC::CheckHandleType(const DT &) const
RCHandleC::Body(void)
RCHandleC::Body(void) const
RCHandleC::References(void) const
RCHandleC::operator <<(ostream &,const RCHandleC &)
RCHandleC::operator >>(istream &,RCHandleC &)

   BoundaryC   
 
Crack code boundary
 
include "Ravl/Boundary.hh"
Created:26/10/1992 
Source file:Ravl/Math/Geometry/Euclidean/Boundary/Boundary.hh
User Level:Normal
Library:RavlMath
In Scope:RavlN

Comments:
The class BoundaryC represents the 4-connected oriented boundary of a image region.

Parent Classes: Variables:
bool orientation;
Orientation of the boundary. true means that an object is on the left side of edges.

Methods:

Constructors, copies, assigment, and destructor.

BoundaryC(bool orient = true)
Empty boundary with orientation 'orient'.
If orient is true, the object is on the left of the boundry.

BoundaryC(const DListC<EdgeC> & edgeList,bool orient)
Create the boundary from the list of edges with a appropriate orientation.
The 'edgelist' will be a part of boundary. If orient is true, the object is on the left of the boundry.

BoundaryC(const DListC<DLIterC<EdgeC>> & edgeList,bool orient = true)
Creates the boundary from the list of pointers to the elementary edges.
If orient is true, the object is on the left of the boundry.

BoundaryC(const IndexRange2dC & rect,bool asHole = true)
The boundary of the rectangle.
The boundry goes clockwise around the rectancle. If asHole is true, then the rectangle is 'outside' the region. otherwise its inside.

IntT Area() const
Get the area of the region which is determined by the 'boundary'.
Note: The area of the region can be negative, If it is a 'hole' in a plane. This can be inverted with the BReverse() method.

DListC<BoundaryC> Order(const EdgeC & firstEdge,bool orient = true)
Order the edgels of this boundary such that it can be traced continuously along the direction of the first edge. The orientation of the boundary is set according to 'orient'. If the boundary is open, 'firstEdge' and 'orient' are ignored.

bool Orient() const
Return the orientation of the boundary.
true means that an object is on the left side of edges and false that is on the right.

void Invert()
Invert the boundry.

BoundaryC & BReverse()
Reverse the order of the edges.

BoundaryC Copy() const
Create a physical copy of the boundary.

DListC<DLIterC<EdgeC>> ConvexHull() const
Compute the convex hull.
The convex hull is created from the original Jordan boundary using Melkman's method. Ref.: A V Melkman. On-line construction of the convex hull of a simple polyline. Information Processing Letters, 25(1):11-12, 1987. Ref.: M Sonka, V Hlavac: Image Processing.

IndexRange2dC BoundingBox() const
Get the bounding box of the boundary in "boundary's" coordinates.

RCHashC<BVertexC,PairC<BVertexC>> CreateHashtable() const
Returns the hashtable for the boundary; all end points which are only connected to one other point will have at least one invalid neighbour (-1, -1).

BoundaryC OrderContinuous(const RCHashC<BVertexC,PairC<BVertexC>> & hashtable,const EdgeC & firstEdge,bool orient) const
Returns a continous boundary; if the boundary is open, 'orient' will be ignored and 'firstEdge' must be one of the end points of the boundary.

DListC<BVertexC> FindEndpoints(const RCHashC<BVertexC,PairC<BVertexC>> & hashtable) const
Returns the endpoints of the boundary, i.e. if the boundary is closed, the list will be empty.

#include "Ravl/DList.hh"
DListBodyC<EdgeC> & Body()
Access body.

const DListBodyC<EdgeC> & Body() const
Constant access to body.

DLinkC & Head()
Get head of list.

const DLinkC & Head() const
Get head of list.

bool IsEmpty() const
Test is the list is empty.

UIntT Size() const
Count the number of elements in the list.
This is slow! It goes through the list counting the elements.

void Reverse()
Reverse the order of the list.

DListC<EdgeC> Copy() const
Make a copy of this list.

void InsFirst(const EdgeC & dat)
Push element onto the begining of the list.

void InsLast(const EdgeC & dat)
Push element onto the end of the list.

EdgeC PopFirst()
Pop item off front of list.

EdgeC PopLast()
Pop item off end of list.

void DelFirst()
Delete the first element from the list.

void DelLast()
Delete the last element from the list.

void Empty()
Empty the list of all its contents.

DListC<EdgeC> & operator +=(const EdgeC & dat)
Add element to the end of the list.

DListC<EdgeC> & operator +=(const DListC<EdgeC> & dat)
Copy contents of other list to end of this one.

void MoveFirst(DListC<EdgeC> & lst)
Move the entire contents of 'lst' to the beginning of this one.
this leaves 'lst' empty.

void MoveLast(DListC<EdgeC> & lst)
Move the entire contents of 'lst' to the end of this one.
this leaves 'lst' empty.

void MoveFirst(DLIterC<EdgeC> & at)
Move the single item 'at' to the beginning of this list.

void MoveLast(DLIterC<EdgeC> & at)
Move the single item 'at' to the end of this list.

bool operator ==(const DListC<EdgeC> & oth) const
Are lists identical ?
Test if lists have identical content.

bool operator !=(const DListC<EdgeC> & oth) const
Are lists different ?
Test if lists have different content.

EdgeC & First()
Get first element in list.
NB. List MUST be non-empty.

EdgeC & Last()
Get last element in list.
NB. List MUST be non-empty.

const EdgeC & First() const
Get first element in list.
NB. List MUST be non-empty.

const EdgeC & Last() const
Get last element in list.
NB. List MUST be non-empty.

bool Del(const EdgeC & x)
Remove first instance of 'x' found in list.
returns true if the item is found and removed, false otherwise.

bool Contains(const EdgeC & x)
Test if this list contains an element == to 'x'.

EdgeC & Nth(int n)
Find the nth element in the list.
0 is the first element, 2 the second etc. -1 is the last, -2 second from last.

const EdgeC & Nth(int n) const
Find the nth element in the list.
0 is the first element, 2 the second etc. -1 is the last, -2 second from last.

ostream & operator <<(ostream & strm,const DListC<EdgeC> & lst)

istream & operator >>(istream & strm,DListC<EdgeC> & lst)

BinOStreamC & operator <<(BinOStreamC & strm,const DListC<EdgeC> & lst)

BinIStreamC & operator >>(BinIStreamC & strm,DListC<EdgeC> & lst)

#include "Ravl/RefCounter.hh"
const RCHandleC<DListBodyC<DataT>> & operator =(const RCHandleC<DListBodyC<DataT>> & oth)
Assign handle.

RCHandleC<DListBodyC<DataT>> DeepCopy(UIntT levels = ((UIntT))) const
Do a deep copy of the object.

bool operator ==(const RCHandleC<DListBodyC<DataT>> & oth) const
Are handles to the same object ?

bool operator !=(const RCHandleC<DListBodyC<DataT>> & oth) const
Are handles to different objects ?

UIntT Hash() const
Default hash function.
This hashes on the address of the body.

bool IsValid() const
Test if this is a valid handle.

void Invalidate()
Invalidate this handle.
Unattaches the body from the handle.

bool IsHandleType(const DT &) const
Is handle of given type ?

void CheckHandleType(const DT & dummy) const
Check handle type. Throw an expception if not.

DListBodyC<DataT> & Body()
Access body of object.

const DListBodyC<DataT> & Body() const
Constant access to body of object.

UIntT References() const
Find the number of references to the body of this object.

ostream & operator <<(ostream & strm,const RCHandleC<DListBodyC<DataT>> & obj)

istream & operator >>(istream & strm,RCHandleC<DListBodyC<DataT>> & obj)


Maintainer:Radek Marik, Created: 26/10/1992, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002