java.lang.Object
imagingbook.common.filter.mask.BinaryMask
- Direct Known Subclasses:
CircularMask
This class defines a binary mask, as used in filters, for example.
- Version:
- 2022/09/10
-
Constructor Summary
ConstructorsConstructorDescriptionBinaryMask
(byte[][] mask) BinaryMask
(byte[][] mask, int centerX, int centerY) -
Method Summary
Modifier and TypeMethodDescriptionbyte[][]
Returns abyte[x][y]
with outside mask element values zero, inside mask elements non-zero.Returns abyte[x][y]
with outside mask element values zero, inside mask elements non-zero.int
Returns the x-coordinate of the mask's reference point.int
Returns the y-coordinate of the mask's reference point.int
Returns the number of inside-mask (1) elements.int
int
getWidth()
-
Constructor Details
-
BinaryMask
-
BinaryMask
-
-
Method Details
-
getWidth
-
getHeight
-
getCenterX
Returns the x-coordinate of the mask's reference point.- Returns:
- the x-coordinate of the mask's reference point
-
getCenterY
Returns the y-coordinate of the mask's reference point.- Returns:
- the y-coordinate of the mask's reference point
-
getElementCount
Returns the number of inside-mask (1) elements.- Returns:
- the number of inside-mask elements
-
getByteArray
Returns abyte[x][y]
with outside mask element values zero, inside mask elements non-zero. The first array index corresponds to the horizontal coordinate.- Returns:
- the mask as a
byte[][]
-
getByteProcessor
Returns abyte[x][y]
with outside mask element values zero, inside mask elements non-zero. The first array index corresponds to the horizontal coordinate.- Returns:
- the mask as a
byte[][]
-