public class Align extends BoxAligner
Align the bounding-box to the larger without resizing.
Author:
Owen Feehan
  • Constructor Details

    • Align

      public Align(String alignX, String alignY, String alignZ)
      Creates with alignment text for each axis.
      Parameters:
      alignX - indicates how to align the image across the X-axis: one of top, bottom, center.
      alignY - indicates how to align the image across the Y-axis (i.e. vertically): one of top, bottom, center.
      alignZ - indicates how to align the image across the Z-axis: one of top, bottom, center, repeat. See alignZ.
    • Align

      public Align()
  • Method Details

    • checkMisconfigured

      public void checkMisconfigured(BeanInstanceMap defaultInstances) throws BeanMisconfiguredException
      Description copied from class: AnchorBean
      Checks that a bean's properties conform to expectations.
      Overrides:
      checkMisconfigured in class AnchorBean<BoxAligner>
      Parameters:
      defaultInstances - all available default instances if the DefaultInstance annotation is used
      Throws:
      BeanMisconfiguredException - if the bean has not been configured properly as XML
    • alignAfterCheck

      protected BoundingBox alignAfterCheck(BoundingBox smaller, BoundingBox larger)
      Description copied from class: BoxAligner
      Determines a BoundingBox to use for smaller BoundingBox so that it fits inside larger BoundingBox.
      Specified by:
      alignAfterCheck in class BoxAligner
      Parameters:
      smaller - the smaller bounding-box, relative to the minimum-corner of larger. Often this is (0, 0, 0) if it sits at the minimum corner of larger.
      larger - the larger bounding-box absolute coordinates.
      Returns:
      absolute coordinates for smaller, while remaining inside larger.
    • alignAfterCheck

      protected BoundingBox alignAfterCheck(Extent smaller, Extent larger) throws OperationFailedException
      Description copied from class: BoxAligner
      Determines a BoundingBox to use for smaller Extent so that it fits inside larger Extent.
      Specified by:
      alignAfterCheck in class BoxAligner
      Parameters:
      smaller - the smaller bounding-box, relative to the minimum-corner of larger. Often this is (0, 0, 0) if it sits at the minimum corner of larger.
      larger - the larger bounding-box absolute coordinates.
      Returns:
      absolute coordinates for smaller, while remaining inside larger.
      Throws:
      OperationFailedException - if an unrecognized parameter or illegal state exists preventing successful alignment.
    • alignAfterCheck

      protected BoundingBox alignAfterCheck(Extent smaller, BoundingBox larger) throws OperationFailedException
      Description copied from class: BoxAligner
      Determines a BoundingBox to use for smaller Extent so that it fits inside larger BoundingBox.
      Specified by:
      alignAfterCheck in class BoxAligner
      Parameters:
      smaller - the smaller bounding-box, relative to the minimum-corner of larger. Often this is (0, 0, 0) if it sits at the minimum corner of larger.
      larger - the larger bounding-box absolute coordinates.
      Returns:
      absolute coordinates for smaller, while remaining inside larger.
      Throws:
      OperationFailedException - if an unrecognized parameter or illegal state exists preventing successful alignment.
    • alignCorner

      public Point3i alignCorner(BoundingBox smaller, Extent larger)
      The minimum corner at which the entity should be locate after alignment, ignoring the space to the left.
      Parameters:
      smaller - the smaller size to align with larger.
      larger - the larger size to align against as a reference.
      Returns:
      the minimum corner to use for the aligned box, newly-created.
    • duplicateBean

      public Align duplicateBean()
      Description copied from class: AnchorBean
      Creates a new bean that deep-copies every property value.

      Any state that is not a BeanField is ignored.

      Overrides:
      duplicateBean in class AnchorBean<BoxAligner>
      Returns:
      the newly created bean
    • getAlignX

      public String getAlignX()
      Indicates how to align the image across the X-axis (i.e. horizontally): one of left, right, center.
    • setAlignX

      public void setAlignX(String alignX)
      Indicates how to align the image across the X-axis (i.e. horizontally): one of left, right, center.
    • getAlignY

      public String getAlignY()
      Indicates how to align the image across the Y-axis (i.e. vertically): one of top, bottom, center.
    • setAlignY

      public void setAlignY(String alignY)
      Indicates how to align the image across the Y-axis (i.e. vertically): one of top, bottom, center.
    • getAlignZ

      public String getAlignZ()
      Indicates how to align the image across the Z-axis: one of top, bottom, center, repeat.

      repeat is a special-case where a single z-slice overlay will be duplicated across the z-dimension of the stack onto which it is overlayed.

    • setAlignZ

      public void setAlignZ(String alignZ)
      Indicates how to align the image across the Z-axis: one of top, bottom, center, repeat.

      repeat is a special-case where a single z-slice overlay will be duplicated across the z-dimension of the stack onto which it is overlayed.