#include <Region.h>
A n-D rectangle region, defined by its front and back positions (both inclusive), or front position and shape.
Like Position, this class stores no pixel values, but coordinates.
Static Public Member Functions | |
| static Region< N > | fromShape (Position< N > frontPosition, Position< N > shape) |
| Create a region from a front position and shape. | |
| static Region< N > | whole () |
| Create an unlimited region. More... | |
Public Member Functions | |
| long | dimension () const |
| Get the number of dimensions. | |
| Position< N > | shape () const |
| Compute the region shape. | |
| long | size () const |
| Compute the region size, i.e. number of pixels. | |
Public Attributes | |
| Position< N > | back |
| The back position in the region. | |
| Position< N > | front |
| The front position in the region. | |
Related Functions | |
(Note that these are not member functions.) | |
| template<long N = 2> | |
| PositionIterator< N > | begin (const Region< N > ®ion) |
| Iterator to the front position of a region. | |
| template<long N = 2> | |
| PositionIterator< N > | end (const Region< N > ®ion) |
| Iterator to one past the back position of a region. | |
| template<long N = 2> | |
| bool | operator!= (const Region< N > &lhs, const Region< N > &rhs) |
| Check whether two regions are different. | |
| template<long N = 2> | |
| Region< N > | operator+ (const Region< N > &lhs, const Position< N > &rhs) |
| Add a region and a position. | |
| template<long N = 2> | |
| Region< N > | operator+ (const Region< N > &lhs, long rhs) |
| Add a region and a scalar. | |
| template<long N = 2> | |
| Region< N > | operator+ (const Region< N > &rhs) |
| Identity. | |
| template<long N = 2> | |
| Region< N > & | operator++ (Region< N > &lhs) |
| Add 1 to each coordinate. | |
| template<long N = 2> | |
| Region< N > | operator++ (Region< N > &lhs, int) |
| Return the current region and then add 1 to each coordinate. | |
| template<long N = 2> | |
| Region< N > & | operator+= (Region< N > &lhs, const Position< N > &rhs) |
| Add a position. | |
| template<long N = 2> | |
| Region< N > & | operator+= (Region< N > &lhs, long rhs) |
| Add a scalar to each coordinate. | |
| template<long N = 2> | |
| Region< N > | operator- (const Region< N > &lhs, const Position< N > &rhs) |
| Subtract a region and a position. | |
| template<long N = 2> | |
| Region< N > | operator- (const Region< N > &lhs, long rhs) |
| Subtract a region and a scalar. | |
| template<long N = 2> | |
| Region< N > | operator- (const Region< N > &rhs) |
| Change the sign of each coordinate. | |
| template<long N = 2> | |
| Region< N > & | operator-- (Region< N > &lhs) |
| Subtract 1 to each coordinate. | |
| template<long N = 2> | |
| Region< N > | operator-- (Region< N > &lhs, int) |
| Return the current region and then subtract 1 to each coordinate. | |
| template<long N = 2> | |
| Region< N > & | operator-= (Region< N > &lhs, const Position< N > &rhs) |
| Subtract a position. | |
| template<long N = 2> | |
| Region< N > & | operator-= (Region< N > &lhs, long rhs) |
| Subtract a scalar to each coordinate. | |
| template<long N = 2> | |
| bool | operator== (const Region< N > &lhs, const Region< N > &rhs) |
| Check whether two regions are equal. | |