|
User Documentation |
|
Centre for Vision, Speech & Signal Processing |
Parent Classes:
Variables:
Methods:
- PCPixelC()
-
Default constructor.
- PCPixelC(const PixelC & px,const Point2dC & apnt,RealT ap = 0)
-
Constructor.
- PCPixelC(const PixelC & px,RealT ap = 0)
-
Constructor.
- RealT & P()
-
Access P.
- RealT P() const
-
Access P.
- Point2dC & ClosestPnt()
-
Access closest point.
- const Point2dC & ClosestPnt() const
-
Access closest point.
- void Dummy(void)
-
Dummy routine.
- ostream & WriteGF(ostream & out) const
-
Write out to stream.
- BooleanT operator==(const PixelC & px) const
-
Returns TRUE if coordinates of both pixels are same.
- BooleanT operator!=(const PixelC & px) const
-
Returns TRUE if at least one coordinate of both pixels is different.
- void Set(PixelIndexT r,PixelIndexT c)
-
Sets the pixel coordinates to be (r,c).
- void Set(const PixelC & px)
-
Sets the pixel coordinates to be equal to 'px'.
- PixelC & Right()
-
Changes the pixel coordinates into ones of the right neighbouring pixel.
- PixelC & Left()
-
Changes the pixel coordinates into ones of the left neighbouring pixel.
- PixelC & Up()
-
Changes the pixel coordinates into ones of the up neighbouring pixel.
- PixelC & Down()
-
Changes the pixel coordinates into ones of the down neighbouring pixel.
- PixelC NLeft() const
-
Returns the coordinates of the left neighbouring pixel
- PixelC NRight() const
-
Returns the coordinates of the right neighbouring pixel
- PixelC NDown() const
-
Returns the coordinates of the down neighbouring pixel
- PixelC NUp() const
-
Returns the coordinates of the upper neighbouring pixel
- PixelC NRowOff(const IndexT offset) const
-
Returns the pixel whose row coordinate is shifted by the 'offset'.
- PixelC NColOff(const IndexT offset) const
-
Returns the pixel whose column coordinate is shifted by the 'offset'.
- PixelC operator+(const PixelC & pxl) const
-
Returns the pixel whose coordinates are the sum of this pixel
and the pixel 'pxl'.
- PixelC operator-(const PixelC & pxl) const
-
Returns the pixel whose coordinates are the difference of this pixel
and the pixel 'pxl'.
- PixelC & Step(const CrackCodeC & cd)
-
Translates the pixel in direction
- BooleanT IsInside(const ImageRectangleC & rect) const
-
Returns TRUE if the pixel is inside the image rectangle 'rect'.
- PixelC & Cut(const ImageRectangleC & rect)
-
If the pixel is outside "rect", it is changed to the nearest one inside
"rect", otherwise it is not changed.
- istream & operator>>(istream & inS,PixelC & pxl)
-
- explicit Index2dC(SizeT dim)
-
Creates an index
This is for compatibilty with N-D indexes, which
need to be told there dimentionality.
- const Index2dC & operator=(const Index2dC & i)
-
Sets this index to be equal to 'i'.
Object modification
-------------------
- void Set(const Index2dC & index)
-
Sets this index to be equal to 'index'.
- void Set(IndexT r,IndexT c)
-
Sets this index to be .
- Index2dC & Step(const DirectionRLUDC & dir)
-
Translates the index into direction 'dir'.
- Index2dC & Step(DirectionRLUDT dir)
-
Translates the index into direction 'dir'.
Visual C++ 5.0 won't do an automatic cast from DirectionRLUDT
to DirectionRLUDC.
- Index2dC & Step(CrackCodeT dir)
-
- Index2dC Swapped() const
-
Returns the 2-dimensional index with swapped value I() and J().
- Index2dC & Abs()
-
Changes both indexes to their absolute values.
Access to the member items
----------------------------
- const IndexT & Row() const
-
Constant access to the row index
- const IndexT & Col() const
-
Constant access to the column index
- IndexT & Row()
-
Access to the row index
- IndexT & Col()
-
Access to the column index
- IndexT & operator[](IndexT i)
-
Access to a particular index. If i == 0, it returns the row index,
if i == 1, it returns the column index.
- IndexT operator[](IndexT i) const
-
Returns a particular index. If i == 0, it returns the row index,
if i == 1, it returns the column index.
Logical conditions
------------------
- BooleanT operator==(const Index2dC & index) const
-
Returns TRUE if indexes have the same values.
- BooleanT operator!=(const Index2dC & index) const
-
Returns TRUE if indexes have different values.
- BooleanT IsInside(const IndexRange2dC & range) const
-
Returns TRUE, if this index is in the 'range'.
- BooleanT IsInside(const IndexRectangleC & range) const
-
Returns TRUE, if this index is in the 'range'.
- BooleanT IsMoreUpperLeft(const Index2dC & i) const
-
Returns TRUE, if Row() < i.Row() or
(Row() == i.Row() and Col() < i.Col()).
- BooleanT operator<(const Index2dC & i) const
-
A nick name for the member function IsMoreUpperLeft(i).
Operations on the neighbourhood
-------------------------------
- Index2dC & Right()
-
Shifts the index to the right.
- Index2dC & Left()
-
Shifts the index to the left.
- Index2dC & Up()
-
Shifts the index to the up.
- Index2dC & Down()
-
Shifts the index to the down.
- Index2dC RightN() const
-
Returns the index of the right neighbour.
- Index2dC LeftN() const
-
Returns the index of the left neighbour.
- Index2dC UpN() const
-
Returns the index of the upper neighbour.
- Index2dC DownN() const
-
Returns the index of the down neighbour.
- Index2dC LowerLeftN() const
-
Returns the coordinates of the downleft neighbouring pixel
- Index2dC LowerRightN() const
-
Returns the coordinates of the downright neighbouring pixel
- Index2dC UpperLeftN() const
-
Returns the coordinates of the upperleft neighbouring pixel
- Index2dC UpperRightN() const
-
Returns the coordinates of the upperright neighbouring pixel
- Index2dC Neighbour(const DirectionRLUDC & dir) const
-
Returns the index of the neighbour in the direction 'dir'.
- BooleanT IsRelNeighbour8() const
-
Is '*this' a relative index from 8-neighbourhood?
- BooleanT IsNeighbour8(const Index2dC & pxl) const
-
Is the 'pxl' a neighbouring index of '*this'?
- Index2dC Neighbour(const NeighbourOrderT neighOrder) const
-
Returns the coordinates of the neighbouring index.
- IndexT NeighbourOrder() const
-
Returns the order of the relative index.
- IndexT NeighbourOrder(const Index2dC & ind) const
-
Returns the order of the neighbouring index 'ind'.
Arithmetic operations
---------------------
- Index2dC operator-() const
-
Returns opposite elements (unary minus operator).
- const Index2dC & operator+=(const Index2dC & ind)
-
Adds the index 'ind' to this index.
- const Index2dC & operator-=(const Index2dC & ind)
-
Subtracts the index 'ind' from this index.
- const Index2dC & operator*=(const Index2dC & ind)
-
Multiplies this index by index 'ind' item by item.
- const Index2dC & operator/=(const Index2dC & ind)
-
Divides this index by index 'ind' item by item.
- const Index2dC & operator*=(const IntT alpha)
-
Multiplies this index by number 'alpha'.
- const Index2dC & operator*=(const RealT alpha)
-
Multiplies this index by real number 'alpha'.
- const Index2dC & operator/=(const IntT alpha)
-
Divides this index by number 'alpha'.
- const Index2dC & operator/=(const RealT alpha)
-
Divides this index by real number 'alpha'.
- Index2dC operator+(const Index2dC & ind) const
-
Adds this index and 'ind'.
- Index2dC operator-(const Index2dC & ind) const
-
Subtracts index 'ind' from this index.
- Index2dC operator*(const Index2dC & ind) const
-
Returns this index multiplied by index 'ind' item by item.
- Index2dC operator/(const Index2dC & ind) const
-
Returns this index divided by index 'ind' item by item.
- Index2dC operator*(const IntT alpha) const
-
Multiplies this index by number 'alpha'.
- Index2dC operator*(const RealT alpha) const
-
Multiplies this index by real number 'alpha'.
- Index2dC operator/(const IntT alpha) const
-
Divides this index by number 'alpha'.
- Index2dC operator/(const RealT alpha) const
-
Divides this index by real number 'alpha'.
Distance calculations
---------------------
- GridDistanceT MaxValueDistance(const Index2dC & i) const
-
Returns the distance of two indexes in maximum value metric.
- GridDistanceT CityBlockDistance(const Index2dC & i) const
-
Returns the distance of two indexes in absolute value metric.
- GridDistanceT SqrEuclidDistance(const Index2dC & i) const
-
Returns the distance of two indexes in square Euclid metric.
- RealT EuclidDistance(const Index2dC & i) const
-
Returns the distance of two indexes in Euclid metric.
- GridDistanceT SumSqr() const
-
Returns the sum of coordinate squares.
- GridDistanceT Distance(const Index2dC & i,GridMetricT m) const
-
Returns the distance of two indexes in the specified metric 'm'.
Special member functions
------------------------
- UIntT Hash(void) const
-
Generates a randomised hash value for this index.
- SizeT Dim(void) const
-
Returns a number of dimensions indexed.
- SizeT N() const
-
Returns the number of coordinates of this point.
- AreaT Area2(const Index2dC & second,const Index2dC & third) const
-
Returns twice the signed area of the triangle determined
by this, the second, and the third points. Positive if 'this',
'second', 'third' are oriented counter-clockwise, and negative if
clockwise.
Ref.: - O'Rourke,J.: Computatinal geometry in C;
Cambridge University Press, 1994, pp. 19-20
|
Programmer:Charles Galambos, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001
|