Mask 2D
-
class mask2d : public mln::se_facade<mask2d>
Creates a 2D structuring element based on a mask. Every non-zero value will add the 2D-point in the set. The SE is assumed to be anchored at the center of the mask, thus the mask must have odd dimensions.
mln::se::mask2d mask = {{0, 0, 1, 0, 0}, {1, 1, 1, 1, 1} {0, 0, 1, 0, 0}};
Public Functions
-
mask2d(std::initializer_list<std::initializer_list<int>> values)
Initializer from a 2D array of values.
- Parameters:
values – List of 0-1 to define the mask
- Throws:
std::runtime_error – if the sizes of the list are not odd.
-
inline int radial_extent() const
Returns the radial extent of the mask.
-
mask2d(std::initializer_list<std::initializer_list<int>> values)