Class Align


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

    Constructors 
    Constructor Description
    Align()  
    Align​(String alignX, String alignY, String alignZ)
    Creates with alignment text for each axis.
  • Method Summary

    Modifier and Type Method Description
    protected org.anchoranalysis.spatial.box.BoundingBox alignAfterCheck​(org.anchoranalysis.spatial.box.BoundingBox smaller, org.anchoranalysis.spatial.box.BoundingBox larger)
    Determines a BoundingBox to use for smaller BoundingBox so that it fits inside larger BoundingBox.
    protected org.anchoranalysis.spatial.box.BoundingBox alignAfterCheck​(org.anchoranalysis.spatial.box.Extent smaller, org.anchoranalysis.spatial.box.BoundingBox larger)
    Determines a BoundingBox to use for smaller Extent so that it fits inside larger BoundingBox.
    protected org.anchoranalysis.spatial.box.BoundingBox alignAfterCheck​(org.anchoranalysis.spatial.box.Extent smaller, org.anchoranalysis.spatial.box.Extent larger)
    Determines a BoundingBox to use for smaller Extent so that it fits inside larger Extent.
    org.anchoranalysis.spatial.point.Point3i alignCorner​(org.anchoranalysis.spatial.box.BoundingBox smaller, org.anchoranalysis.spatial.box.Extent larger)
    The minimum corner at which the entity should be locate after alignment, ignoring the space to the left.
    void checkMisconfigured​(BeanInstanceMap defaultInstances)  
    Align duplicateBean()  
    String getAlignX()
    Indicates how to align the image across the X-axis (i.e.
    String getAlignY()
    Indicates how to align the image across the Y-axis (i.e.
    String getAlignZ()
    Indicates how to align the image across the Z-axis: one of top, bottom, center, repeat.
    void setAlignX​(String alignX)
    Indicates how to align the image across the X-axis (i.e.
    void setAlignY​(String alignY)
    Indicates how to align the image across the Y-axis (i.e.
    void setAlignZ​(String alignZ)
    Indicates how to align the image across the Z-axis: one of top, bottom, center, repeat.

    Methods inherited from class org.anchoranalysis.image.bean.spatial.arrange.align.BoxAligner

    align, align, align

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    describeBean, describeChildren, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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
      Overrides:
      checkMisconfigured in class AnchorBean<BoxAligner>
      Throws:
      BeanMisconfiguredException
    • alignAfterCheck

      protected org.anchoranalysis.spatial.box.BoundingBox alignAfterCheck​(org.anchoranalysis.spatial.box.BoundingBox smaller, org.anchoranalysis.spatial.box.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 org.anchoranalysis.spatial.box.BoundingBox alignAfterCheck​(org.anchoranalysis.spatial.box.Extent smaller, org.anchoranalysis.spatial.box.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 org.anchoranalysis.spatial.box.BoundingBox alignAfterCheck​(org.anchoranalysis.spatial.box.Extent smaller, org.anchoranalysis.spatial.box.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 org.anchoranalysis.spatial.point.Point3i alignCorner​(org.anchoranalysis.spatial.box.BoundingBox smaller, org.anchoranalysis.spatial.box.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()
      Overrides:
      duplicateBean in class AnchorBean<BoxAligner>
    • 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.