Class MaskFixture

Object
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 Mask
    create(boolean do3D)
    Creates the Mask with the default corner and no assigned resolution.
    static Mask
    create(boolean do3D, Optional<Resolution> resolution)
    Creates the Mask with the default corner and a particular resolution.
    static Mask
    create(Point3i corner, boolean do3D)
    Creates the Mask with a particular corner and no assigned resolution.
    static Mask
    create(Point3i corner, boolean do3D, Optional<Resolution> resolution)
    Creates the Mask with a particular corner and a particular resolution.
    static int
    depth(boolean do3D)
    The **depth** of the mask that will be created.
    static int
    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
    The **width** of the mask that will be created.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • create

      public static Mask create(boolean do3D)
      Creates the Mask with the default corner and no assigned resolution.
      Parameters:
      do3D - if true, a 3D mask is created, otherwise 2D.
      Returns:
      the mask
    • create

      public static Mask create(boolean do3D, Optional<Resolution> resolution)
      Creates the Mask 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

      public static Mask create(Point3i corner, boolean do3D)
      Creates the Mask with a particular corner and no assigned resolution.
      Parameters:
      corner - the corner
      do3D - if true, a 3D mask is created, otherwise 2D.
      Returns:
      the mask
    • create

      public static Mask create(Point3i corner, boolean do3D, Optional<Resolution> resolution)
      Creates the Mask 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

      public static Extent maskExtent(boolean do3D)
      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).