A two dimensional mask.
More...
#include <Mask.h>
|
| | Mask (Shape const &shape={}, bool value=true) |
| | Create a constant mask.
|
| |
| std::size_t | size () const |
| | Return the total number of points in the mask.
|
| |
| Shape const & | shape () const |
| | Return the shape of the mask.
|
| |
| std::size_t | count () const |
| | Return the number of enabled points.
|
| |
| Mask & | enable (Point const &p) |
| | Enable a point.
|
| |
| Mask & | disable (Point const &p) |
| | Disable a point.
|
| |
| bool | enabled (Point const &p) const |
| | Check whether the point is enabled.
|
| |
| Mask & | flip () |
| | Switch the status of all points (enabled ↔ disabled)
|
| |
| Mask & | operator|= (Mask const &right) |
| | In-place union of two masks.
|
| |
| Mask & | operator&= (Mask const &right) |
| | In-place intersection of two masks.
|
| |
| Points | enabledPoints () const |
| | Return a vector of enabled points.
|
| |
|
| static bool | lessX (Point const &p, Point const &q) |
| | Compare points according to their x coordinate.
|
| |
| static bool | lessY (Point const &p, Point const &q) |
| | Compare points according to their y coordinate.
|
| |
|
| std::size_t | _index (Point const &p) const |
| | Return the linear index corresponding to a point.
|
| |
◆ Point
2D point, as (column, row)
◆ Shape
Shape of the mask, as (column, row)
◆ Points
◆ Mask()
| msl::Mask::Mask |
( |
Shape const & | shape = {}, |
|
|
bool | value = true ) |
◆ lessX()
| static bool msl::Mask::lessX |
( |
Point const & | p, |
|
|
Point const & | q ) |
|
inlinestatic |
Compare points according to their x coordinate.
◆ lessY()
| static bool msl::Mask::lessY |
( |
Point const & | p, |
|
|
Point const & | q ) |
|
inlinestatic |
Compare points according to their y coordinate.
◆ size()
| std::size_t msl::Mask::size |
( |
| ) |
const |
Return the total number of points in the mask.
◆ shape()
| Shape const & msl::Mask::shape |
( |
| ) |
const |
Return the shape of the mask.
◆ count()
| std::size_t msl::Mask::count |
( |
| ) |
const |
Return the number of enabled points.
◆ enable()
◆ disable()
◆ enabled()
| bool msl::Mask::enabled |
( |
Point const & | p | ) |
const |
Check whether the point is enabled.
◆ flip()
| Mask & msl::Mask::flip |
( |
| ) |
|
Switch the status of all points (enabled ↔ disabled)
◆ operator|=()
| Mask & msl::Mask::operator|= |
( |
Mask const & | right | ) |
|
In-place union of two masks.
◆ operator&=()
| Mask & msl::Mask::operator&= |
( |
Mask const & | right | ) |
|
In-place intersection of two masks.
◆ enabledPoints()
| Points msl::Mask::enabledPoints |
( |
| ) |
const |
Return a vector of enabled points.
◆ _index()
| std::size_t msl::Mask::_index |
( |
Point const & | p | ) |
const |
|
protected |
Return the linear index corresponding to a point.
◆ _shape
◆ _mask
| boost::dynamic_bitset msl::Mask::_mask |
|
protected |
The documentation for this class was generated from the following file: