Class Align
Object
org.anchoranalysis.bean.AnchorBean<BoxAligner>
org.anchoranalysis.image.bean.spatial.arrange.align.BoxAligner
org.anchoranalysis.image.bean.spatial.arrange.align.Align
public class Align extends BoxAligner
Align the bounding-box to the
larger without resizing.- Author:
- Owen Feehan
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected org.anchoranalysis.spatial.box.BoundingBoxalignAfterCheck(org.anchoranalysis.spatial.box.BoundingBox smaller, org.anchoranalysis.spatial.box.BoundingBox larger)Determines aBoundingBoxto use forsmallerBoundingBoxso that it fits insidelargerBoundingBox.protected org.anchoranalysis.spatial.box.BoundingBoxalignAfterCheck(org.anchoranalysis.spatial.box.Extent smaller, org.anchoranalysis.spatial.box.BoundingBox larger)Determines aBoundingBoxto use forsmallerExtentso that it fits insidelargerBoundingBox.protected org.anchoranalysis.spatial.box.BoundingBoxalignAfterCheck(org.anchoranalysis.spatial.box.Extent smaller, org.anchoranalysis.spatial.box.Extent larger)Determines aBoundingBoxto use forsmallerExtentso that it fits insidelargerExtent.org.anchoranalysis.spatial.point.Point3ialignCorner(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.voidcheckMisconfigured(BeanInstanceMap defaultInstances)AlignduplicateBean()StringgetAlignX()Indicates how to align the image across the X-axis (i.e.StringgetAlignY()Indicates how to align the image across the Y-axis (i.e.StringgetAlignZ()Indicates how to align the image across the Z-axis: one oftop, bottom, center, repeat.voidsetAlignX(String alignX)Indicates how to align the image across the X-axis (i.e.voidsetAlignY(String alignY)Indicates how to align the image across the Y-axis (i.e.voidsetAlignZ(String alignZ)Indicates how to align the image across the Z-axis: one oftop, bottom, center, repeat.Methods inherited from class org.anchoranalysis.image.bean.spatial.arrange.align.BoxAligner
align, align, alignMethods inherited from class org.anchoranalysis.bean.AnchorBean
describeBean, describeChildren, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
Align
Creates with alignment text for each axis.- Parameters:
alignX- indicates how to align the image across the X-axis: one oftop, bottom, center.alignY- indicates how to align the image across the Y-axis (i.e. vertically): one oftop, bottom, center.alignZ- indicates how to align the image across the Z-axis: one oftop, bottom, center, repeat. SeealignZ.
-
Align
public Align()
-
-
Method Details
-
checkMisconfigured
- Overrides:
checkMisconfiguredin classAnchorBean<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:BoxAlignerDetermines aBoundingBoxto use forsmallerBoundingBoxso that it fits insidelargerBoundingBox.- Specified by:
alignAfterCheckin classBoxAligner- Parameters:
smaller- the smaller bounding-box, relative to the minimum-corner oflarger. Often this is(0, 0, 0)if it sits at the minimum corner oflarger.larger- the larger bounding-box absolute coordinates.- Returns:
- absolute coordinates for
smaller, while remaining insidelarger.
-
alignAfterCheck
protected org.anchoranalysis.spatial.box.BoundingBox alignAfterCheck(org.anchoranalysis.spatial.box.Extent smaller, org.anchoranalysis.spatial.box.Extent larger) throws OperationFailedExceptionDescription copied from class:BoxAlignerDetermines aBoundingBoxto use forsmallerExtentso that it fits insidelargerExtent.- Specified by:
alignAfterCheckin classBoxAligner- Parameters:
smaller- the smaller bounding-box, relative to the minimum-corner oflarger. Often this is(0, 0, 0)if it sits at the minimum corner oflarger.larger- the larger bounding-box absolute coordinates.- Returns:
- absolute coordinates for
smaller, while remaining insidelarger. - 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 OperationFailedExceptionDescription copied from class:BoxAlignerDetermines aBoundingBoxto use forsmallerExtentso that it fits insidelargerBoundingBox.- Specified by:
alignAfterCheckin classBoxAligner- Parameters:
smaller- the smaller bounding-box, relative to the minimum-corner oflarger. Often this is(0, 0, 0)if it sits at the minimum corner oflarger.larger- the larger bounding-box absolute coordinates.- Returns:
- absolute coordinates for
smaller, while remaining insidelarger. - 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 withlarger.larger- the larger size to align against as a reference.- Returns:
- the minimum corner to use for the aligned box, newly-created.
-
duplicateBean
- Overrides:
duplicateBeanin classAnchorBean<BoxAligner>
-
getAlignX
Indicates how to align the image across the X-axis (i.e. horizontally): one ofleft, right, center. -
setAlignX
Indicates how to align the image across the X-axis (i.e. horizontally): one ofleft, right, center. -
getAlignY
Indicates how to align the image across the Y-axis (i.e. vertically): one oftop, bottom, center. -
setAlignY
Indicates how to align the image across the Y-axis (i.e. vertically): one oftop, bottom, center. -
getAlignZ
Indicates how to align the image across the Z-axis: one oftop, bottom, center, repeat.repeatis 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
Indicates how to align the image across the Z-axis: one oftop, bottom, center, repeat.repeatis a special-case where a single z-slice overlay will be duplicated across the z-dimension of the stack onto which it is overlayed.
-