[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
Classes | |
class | Diff2D |
Two dimensional difference vector. More... | |
class | Dist2D |
struct | MeshGridAccessor |
class | Point2D |
Two dimensional point or position. More... | |
class | Rect2D |
Two dimensional rectangle. More... | |
class | Size2D |
Two dimensional size object. More... | |
Functions | |
triple< Diff2D, Diff2D, MeshGridAccessor > | meshGrid (Diff2D upperLeft, Diff2D lowerRight) |
template<class ITERATOR > | |
value_type | operator() (ITERATOR const &i) const |
template<class ITERATOR , class DIFFERENCE > | |
value_type | operator() (ITERATOR const &i, DIFFERENCE const &diff) const |
Diff2D | operator+ (Diff2D const &a, Diff2D const &b) |
Point2D | operator+ (Size2D const &s, Point2D const &p) |
Size2D | operator+ (Size2D const &a, Diff2D const &b) |
Point2D | operator+ (Point2D const &a, Diff2D const &b) |
Size2D | operator- (Point2D const &s, Point2D const &p) |
Size2D | operator- (Size2D const &s, Diff2D const &offset) |
Diff2D | operator- (Diff2D const &a, Diff2D const &b) |
Point2D | operator- (Point2D const &s, Diff2D const &offset) |
Specify a 2D position, extent, or rectangle.
Diff2D vigra::operator- | ( | Diff2D const & | a, |
Diff2D const & | b | ||
) |
Create vector by subtracting specified offset.
Size2D vigra::operator- | ( | Size2D const & | s, |
Diff2D const & | offset | ||
) |
Create size by subtracting specified offset.
Point2D vigra::operator- | ( | Point2D const & | s, |
Diff2D const & | offset | ||
) |
Calculate size of rect between two points.
Size2D vigra::operator- | ( | Point2D const & | s, |
Point2D const & | p | ||
) |
The difference of two points is a size
Diff2D vigra::operator+ | ( | Diff2D const & | a, |
Diff2D const & | b | ||
) |
Create vector by adding specified offset.
Size2D vigra::operator+ | ( | Size2D const & | a, |
Diff2D const & | b | ||
) |
Create size by adding specified offset.
Point2D vigra::operator+ | ( | Point2D const & | a, |
Diff2D const & | b | ||
) |
Create point by adding specified offset.
Point2D vigra::operator+ | ( | Size2D const & | s, |
Point2D const & | p | ||
) |
Add size and point
value_type operator() | ( | ITERATOR const & | i | ) | const |
read the current data item
value_type operator() | ( | ITERATOR const & | i, |
DIFFERENCE const & | diff | ||
) | const |
read the data item at an offset (can be 1D or 2D or higher order difference).
triple<Diff2D, Diff2D, MeshGridAccessor> vigra::meshGrid | ( | Diff2D | upperLeft, |
Diff2D | lowerRight | ||
) |
Create a mesh grid for the specified rectangle.
The mesh grid concept is adapted from MATLAB. It is a two banded image (i.e. with 2D vector pixel type) whose first band contains the x-coordinates of the current pixel, and whose second band contains the y-coordinates. If upperLeft is not the point (0,0), the mesh grid is translated relative to the pixel indices.
Declarations:
triple<Diff2D, Diff2D, MeshGridAccessor> meshGrid(Diff2D upperLeft, Diff2D lowerRight); triple<Diff2D, Diff2D, MeshGridAccessor> meshGrid(Rect2D const & r);
Usage:
#include <vigra/meshgrid.hxx> // create an image whose values are equal to each pixel's distance from the image center int width = 5, height = 7; int xc = width/2, yc = height/2; // the image center FImage dist(width, height); Point2D upperLeft(-xc, -yc); using namespace vigra::functor; transformImage(meshGrid(upperLeft, upperLeft+dist.size()), destImage(dist), norm(Arg1()));
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|