Package org.anchoranalysis.test.image
Class MaskFixture
Object
MaskFixture
Creates two or three-dimensional
Mask
s for tests.
The mask has an area of on pixels that is rectangle (2D) or a cuboid (3D) and otherwise pixels are off.
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic Mask
create
(boolean do3D) Creates theMask
with the default corner and no assigned resolution.static Mask
create
(boolean do3D, Optional<Resolution> resolution) Creates theMask
with the default corner and a particular resolution.static Mask
Creates theMask
with a particular corner and no assigned resolution.static Mask
create
(Point3i corner, boolean do3D, Optional<Resolution> resolution) Creates theMask
with a particular corner and a particular resolution.static int
depth
(boolean do3D) The **depth** of the mask that will be created.static int
height()
The **height** of the mask that will be created.static Extent
maskExtent
(boolean do3D) The **size** across multiple dimensions of the mask that will be created.static int
width()
The **width** of the mask that will be created.
-
Method Details
-
create
Creates theMask
with the default corner and no assigned resolution.- Parameters:
do3D
- if true, a 3D mask is created, otherwise 2D.- Returns:
- the mask
-
create
Creates theMask
with the default corner and a particular resolution.- Parameters:
do3D
- if true, a 3D mask is created, otherwise 2D.resolution
- the resolution to assign to the mask- Returns:
- the mask
-
create
Creates theMask
with a particular corner and no assigned resolution.- Parameters:
corner
- the cornerdo3D
- if true, a 3D mask is created, otherwise 2D.- Returns:
- the mask
-
create
Creates theMask
with a particular corner and a particular resolution.- Parameters:
corner
- the corner.do3D
- if true, a 3D mask is created, otherwise 2D.resolution
- the image-resolution for the mask.- Returns:
- the mask.
-
maskExtent
The **size** across multiple dimensions of the mask that will be created.- Parameters:
do3D
- true indicates that a 3D-mask will be assessed, false rather a 2D-mask.- Returns:
- the size.
-
width
public static int width()The **width** of the mask that will be created.- Returns:
- the width.
-
height
public static int height()The **height** of the mask that will be created.- Returns:
- the height.
-
depth
public static int depth(boolean do3D) The **depth** of the mask that will be created.- Parameters:
do3D
- true indicates that a 3D-mask will be assessed, false rather a 2D-mask.- Returns:
- the depth (always 1 for a 2D-mask).
-