Structure that represents an area of interest in the image. More...
#include <cvb/area_2d.hpp>
Public Member Functions | |
Area2D () noexcept=default | |
Default constructor for an empty area. More... | |
Area2D (Point2D< double > p0, Point2D< double > p1, Point2D< double > p2) noexcept | |
Constructor for an area. More... | |
Area2D (Rect< double > rect, AffineMatrix2D affineMatrix) noexcept | |
Creates an area from the given rectangle using a transformation. More... | |
Area2D (double x0, double y0, double x1, double y1, double x2, double y2) noexcept | |
Constructor for Area2D. More... | |
Area2D (Rect< double > rect) noexcept | |
Create an area from the given rectangle. More... | |
Area2D (double radius) noexcept | |
Constructor for Area2D. More... | |
Point2D< double > | P0 () const noexcept |
Gets P0 of the area (top left corner). More... | |
void | SetP0 (Point2D< double > p0) noexcept |
Sets P0 of the area (top left corner). More... | |
Point2D< double > | P1 () const noexcept |
Gets P1 of the area (lower left corner). More... | |
void | SetP1 (Point2D< double > p1) noexcept |
Sets P1 of the area (lower left corner). More... | |
Point2D< double > | P2 () const noexcept |
Gets P2 of the area (top right corner). More... | |
void | SetP2 (Point2D< double > p2) noexcept |
Sets P2 of the area (top right corner). More... | |
Point2D< double > | P3 () const noexcept |
Gets the calculated P3 of the area (lower right corner). More... | |
Rect< double > | BoundingRectangle () const noexcept |
Gets the bounding box of this area. More... | |
Size2D< double > | Size () const noexcept |
Size (width and height) of the area of interest. More... | |
double | Area () const noexcept |
Size (in pixels) of the area of interest. More... | |
void | Transform (Matrix2D matrix) noexcept |
Transform this Area2D using a matrix. More... | |
void | Transform (AffineMatrix2D affineMatrix) noexcept |
Transform this Area2D using a AffineMatrix2D. More... | |
void | SwapOrientation () noexcept |
Let the vertices P1 and P2 swap their place. More... | |
CoordinateSystemType | CoordinateSystem () const noexcept |
Indicates the coordinate system, in which this object is being measured (when used as an area of interest). More... | |
bool | operator== (const Area2D &area) const noexcept |
Compares to an other area. More... | |
bool | operator!= (const Area2D &area) const noexcept |
Compares to an other area. More... | |
Structure that represents an area of interest in the image.
The pixels of this type are always specified in image coordinates.
|
defaultnoexcept |
Default constructor for an empty area.
Does | not throw any exception. |
Constructor for an area.
[in] | p0 | P0 (top left corner of the area). |
[in] | p1 | P1 (top right corner of the area). |
[in] | p2 | P2 (bottom left corner of the area). |
Does | not throw any exception. |
|
inlinenoexcept |
Creates an area from the given rectangle using a transformation.
[in] | rect | Rectangle to convert to image coordinates via the matrix. |
[in] | affineMatrix | Affine matrix to transform pixel coordinates to image. |
Does | not throw any exception. |
|
inlinenoexcept |
Constructor for Area2D.
[in] | x0 | X component of P0. |
[in] | y0 | Y component of P0. |
[in] | x1 | X component of P1. |
[in] | y1 | Y component of P1. |
[in] | x2 | X component of P2. |
[in] | y2 | Y component of P2. |
Does | not throw any exception. |
Create an area from the given rectangle.
[in] | rect | Rectangle to create the Area2D from. |
Does | not throw any exception. |
|
inlinenoexcept |
Constructor for Area2D.
[in] | radius | Radius to construct the area with. |
Does | not throw any exception. |
|
inlinenoexcept |
Size (in pixels) of the area of interest.
Does | not throw any exception. |
As the area is a parallelogram the area (in pixels) is not simply "width * height".
|
inlinenoexcept |
Gets the bounding box of this area.
Does | not throw any exception. |
|
inlinenoexcept |
Indicates the coordinate system, in which this object is being measured (when used as an area of interest).
Does | not throw any exception. |
|
inlinenoexcept |
Compares to an other area.
[in] | area | Other area. |
Does | not throw any exception. |
|
inlinenoexcept |
Compares to an other area.
[in] | area | Other area. |
Does | not throw any exception. |
|
inlinenoexcept |
Gets P0 of the area (top left corner).
Does | not throw any exception. |
|
inlinenoexcept |
Gets P1 of the area (lower left corner).
Does | not throw any exception. |
|
inlinenoexcept |
Gets P2 of the area (top right corner).
Does | not throw any exception. |
|
inlinenoexcept |
Gets the calculated P3 of the area (lower right corner).
Does | not throw any exception. |
|
inlinenoexcept |
Sets P0 of the area (top left corner).
[in] | p0 | The point. |
Does | not throw any exception. |
|
inlinenoexcept |
Sets P1 of the area (lower left corner).
[in] | p1 | The point. |
Does | not throw any exception. |
|
inlinenoexcept |
Sets P2 of the area (top right corner).
[in] | p2 | The point. |
Does | not throw any exception. |
|
inlinenoexcept |
Size (width and height) of the area of interest.
Does | not throw any exception. |
|
inlinenoexcept |
Let the vertices P1 and P2 swap their place.
Does | not throw any exception. |
Effectively altering the scan direction of the AOI without changing the area covered by the AOI.
|
inlinenoexcept |
Transform this Area2D using a AffineMatrix2D.
[in] | affineMatrix | Matrix to transform this area with. |
Does | not throw any exception. |