Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Core - Indexing - IndexRange2dC
 

  PUBLIC
IndexRange2dC::IndexRange2dC(void)
IndexRange2dC::IndexRange2dC(IndexC,IndexC)
IndexRange2dC::IndexRange2dC(IntT,IntT)
IndexRange2dC::IndexRange2dC(const IndexRangeC &,const IndexRangeC &)
IndexRange2dC::IndexRange2dC(const IndexRange2dC &)
IndexRange2dC::IndexRange2dC(const Index2dC &,const Index2dC &)
IndexRange2dC::IndexRange2dC(const Index2dC &,SizeT)
IndexRange2dC::IndexRange2dC(const Index2dC &,SizeT,SizeT)
IndexRange2dC::IndexRange2dC(IndexC,IndexC,IndexC,IndexC)
IndexRange2dC::SetOrigin(const Index2dC &)
IndexRange2dC::Origin(void) const
IndexRange2dC::End(void) const
IndexRange2dC::TopRight(void) const
IndexRange2dC::TopLeft(void) const
IndexRange2dC::BottomLeft(void) const
IndexRange2dC::BottomRight(void) const
IndexRange2dC::Center(void) const
IndexRange2dC::TRow(void) const
IndexRange2dC::LCol(void) const
IndexRange2dC::BRow(void) const
IndexRange2dC::RCol(void) const
IndexRange2dC::TRow(void)
IndexRange2dC::LCol(void)
IndexRange2dC::BRow(void)
IndexRange2dC::RCol(void)
IndexRange2dC::Rows(void) const
IndexRange2dC::Cols(void) const
IndexRange2dC::Size(void) const
IndexRange2dC::Area(void) const
IndexRange2dC::Dilate(void) const
IndexRange2dC::Erode(void) const
IndexRange2dC::Expand(IndexC) const
IndexRange2dC::Shrink(IndexC) const
IndexRange2dC::ClipBy(const IndexRange2dC &)
IndexRange2dC::Contains(const IndexRange2dC &) const
IndexRange2dC::Contains(const Index2dC &) const
IndexRange2dC::operator +=(const Index2dC &)
IndexRange2dC::operator -=(const Index2dC &)
IndexRange2dC::operator +(const Index2dC &) const
IndexRange2dC::operator -(const Index2dC &) const
IndexRange2dC::RowRange(void) const
IndexRange2dC::ColRange(void) const
IndexRange2dC::RowRange(void)
IndexRange2dC::ColRange(void)
IndexRange2dC::Range1(void) const
IndexRange2dC::Range2(void) const
IndexRange2dC::Range1(void)
IndexRange2dC::Range2(void)
IndexRange2dC::Involve(const Index2dC &)
IndexRange2dC::Involve(const IndexRange2dC &)
IndexRange2dC::IsValid(void) const
IndexRange2dC::operator ==(const IndexRange2dC &) const
IndexRange2dC::operator !=(const IndexRange2dC &) const
IndexRange2dC::Rotate180(Index2dC)
IndexRange2dC::IsOverlapping(const IndexRange2dC &) const
IndexRange2dC::operator -=(const IndexRange2dC &)
IndexRange2dC::operator -(const IndexRange2dC &) const
IndexRange2dC::Range(void) const

   IndexRange2dC   
 
An index range of a 2D array
 
include "Ravl/IndexRange2d.hh"
Created:06/08/1995 
Source file:Ravl/Core/Base/IndexRange2d.hh
User Level:Normal
Library:RavlCore
In Scope:RavlN

Derived Classes: Variables:
IndexRangeC rows;

IndexRangeC cols;

Methods:
IndexRange2dC()
Default constructor.

IndexRange2dC(IndexC rowNumber,IndexC colNumber)
Construct from rectangle size.

IndexRange2dC(IntT rowNumber,IntT colNumber)
Construct from rectangle size.

IndexRange2dC(const IndexRangeC & rowRange,const IndexRangeC & colRange)
Constructor.

IndexRange2dC(const IndexRange2dC & range)
Constructor.

IndexRange2dC(const Index2dC & org,const Index2dC & end)
Create an 2d range from corner points.

IndexRange2dC(const Index2dC & center,SizeT size)
Create an 2d range from a center point and a size.
Size is the distance from the center to the edge, so a size of 0 gives a single pixel, and a size of 1 generates a 3x3 square.

IndexRange2dC(const Index2dC & center,SizeT nrows,SizeT ncols)
Create an 2d range from a center point and a size for rows and cols.
The sizes passed to this function are the absolute size of the rectangle, unlike IndexRangeC(Index2dC ¢er,SizeT size). Note: if the rows or cols there will be a half pixel offset in the center of the rectangle.

IndexRange2dC(IndexC minRow,IndexC maxRow,IndexC minCol,IndexC maxCol)
Create rectangle from indvidual values.

const IndexRange2dC & SetOrigin(const Index2dC & newOrigin)
Set the origin of the range to 'newOrigin'
Returns a reference to this rectangle.

Index2dC Origin() const
Returns the top-left index of the rectangle.

Index2dC End() const
Returns the bottom-right index of the rectangle.

Index2dC TopRight() const
Returns the top-right index of the rectangle.

Index2dC TopLeft() const
Returns the top-left index of the rectangle.

Index2dC BottomLeft() const
Returns the bottom-left index of the rectangle.

Index2dC BottomRight() const
Returns the bottom-right index of the rectangle.

Index2dC Center() const
Returns the index which is in the middle of the rectangle

IndexC TRow() const
Returns the top row index.

IndexC LCol() const
Returns the left side column index.

IndexC BRow() const
Returns the bottom row index.

IndexC RCol() const
Returns the right side column index.

IndexC & TRow()
Returns the top row index.

IndexC & LCol()
Returns the left side column index.

IndexC & BRow()
Returns the bottom row index.

IndexC & RCol()
Returns the right side column index.

SizeT Rows() const
The number of rows in the rectangle.

SizeT Cols() const
The number of rows in the rectangle.

Index2dC Size() const
Get size of range as an Index2dC.

SizeT Area() const
Returns the area of the image rectangle expressed in number of indexs.

IndexRange2dC Dilate() const
Returns a new rectangle one index larger on each side.

IndexRange2dC Erode() const
Returns an rectangle with each side 1 index closer to the center.

IndexRange2dC Expand(IndexC n) const
Returns an rectangle expanded by 'n' indexs on each side.

IndexRange2dC Shrink(IndexC n) const
Returns a new rectangle which has layer of the width of 'n' indexs removed.

IndexRange2dC & ClipBy(const IndexRange2dC & r)
This index range is clipped to contain at most the index range 'r'.

bool Contains(const IndexRange2dC & oth) const
Returns true if this range contains the subrange 'oth'.

bool Contains(const Index2dC & oth) const
Returns true if this range contains the subrange 'oth'.

const IndexRange2dC & operator +=(const Index2dC & offset)
Shifts the rectangle to the new position.

const IndexRange2dC & operator -=(const Index2dC & offset)
Shifts the rectangle to the new position.

IndexRange2dC operator +(const Index2dC & offset) const
Shifts the rectangle to the new position.

IndexRange2dC operator -(const Index2dC & offset) const
Shifts the rectangle to the new position.

const IndexRangeC & RowRange() const
Access row range.

const IndexRangeC & ColRange() const
Access col range.

IndexRangeC & RowRange()
Access row range.

IndexRangeC & ColRange()
Access col range.

const IndexRangeC & Range1() const
Access row range.

const IndexRangeC & Range2() const
Access col range.

IndexRangeC & Range1()
Access row range.

IndexRangeC & Range2()
Access col range.

void Involve(const Index2dC & index)
Ensures this rectangle contains given index.
This method checks and changes, if necessary, the 2 dimensional range to contain the 'index'.

void Involve(const IndexRange2dC & subrectangle)
Ensures this rectangle contains given sub rectangle.
This method checks and changes, if necessary, the 2 dimensional range to contain the 'subrectangle'.

bool IsValid() const
Returns true if this rectangle contains at least one index.

bool operator ==(const IndexRange2dC & oth) const
Are two ranges equal ?

bool operator !=(const IndexRange2dC & oth) const
Are two ranges unequal ?

IndexRange2dC Rotate180(Index2dC centre = Index2dC (0))
Rotate rectangle 180 degree's around the given center.

bool IsOverlapping(const IndexRange2dC & r) const
Returns true if this range contains at least one common index with the range 'r'.

const IndexRange2dC & operator -=(const IndexRange2dC & sr)
Subtract the 'sr' from this rectangle.
This does TRow() -= sr.TRow(), BRow() -= sr.BRow().....

IndexRange2dC operator -(const IndexRange2dC & sr) const
Subtract the 'sr' from this rectangle.
As operator-=(const IndexRange2dC &sr), but returns the modified rectangle.

const IndexRange2dC & Range() const


Maintainer:Radek Marik, Created: 06/08/1995, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002