Class SizeXY

Object
org.anchoranalysis.bean.AnchorBean<SizeXY>
org.anchoranalysis.image.bean.spatial.SizeXY

public class SizeXY
extends AnchorBean<SizeXY>
The size of an entity in the X and Y dimensions.

i.e. the width and height of an entity.

Author:
Owen Feehan
  • Constructor Details

    • SizeXY

      public SizeXY​(org.anchoranalysis.spatial.box.Extent extent)
      Create form an Extent.

      Note the z-dimension in extent is ignored.

      Parameters:
      extent - the extent.
    • SizeXY

      public SizeXY()
    • SizeXY

      public SizeXY​(int width, int height)
  • Method Details

    • asExtent

      public org.anchoranalysis.spatial.box.Extent asExtent()
      Creates an extent with identical width and height and depth (z-extent) of 1.
      Returns:
      the newly created extent.
    • asExtent

      public org.anchoranalysis.spatial.box.Extent asExtent​(int depth)
      Creates an extent with identical width and height and a specific depth (z-extent).
      Parameters:
      depth - the depth for the extent.
      Returns:
      the newly created extent.
    • toString

      public String toString()
      Overrides:
      toString in class AnchorBean<SizeXY>
    • equals

      public boolean equals​(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual​(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getWidth

      public int getWidth()
      Size in X dimension. The width.
    • setWidth

      public void setWidth​(int width)
      Size in X dimension. The width.
    • getHeight

      public int getHeight()
      Size in Y dimension. The height.
    • setHeight

      public void setHeight​(int height)
      Size in Y dimension. The height.