Package org.anchoranalysis.test.image
Class MaskFixture
Object
org.anchoranalysis.test.image.MaskFixture
public class MaskFixture extends Object
Creates two or three-dimensional
Masks 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 Type Method Description static Maskcreate(boolean do3D)Creates theMaskwith the default corner and no assigned resolution.static Maskcreate(boolean do3D, Optional<Resolution> resolution)Creates theMaskwith the default corner and a particular resolution.static Maskcreate(Point3i corner, boolean do3D)Creates theMaskwith a particular corner and no assigned resolution.static Maskcreate(Point3i corner, boolean do3D, Optional<Resolution> resolution)Creates theMaskwith a particular corner and a particular resolution.static intdepth(boolean do3D)The **depth** of the mask that will be created.static intheight()The **height** of the mask that will be created.static ExtentmaskExtent(boolean do3D)The **size** across multiple dimensions of the mask that will be created.static intwidth()The **width** of the mask that will be created.
-
Method Details
-
create
Creates theMaskwith the default corner and no assigned resolution.- Parameters:
do3D- if true, a 3D mask is created, otherwise 2D.- Returns:
- the mask
-
create
Creates theMaskwith 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 theMaskwith 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 theMaskwith 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).
-