Class Align
Align the bounding-box to the
larger
without resizing.- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BoundingBox
alignAfterCheck
(BoundingBox smaller, BoundingBox larger) protected BoundingBox
alignAfterCheck
(Extent smaller, BoundingBox larger) protected BoundingBox
alignAfterCheck
(Extent smaller, Extent larger) alignCorner
(BoundingBox smaller, Extent larger) The minimum corner at which the entity should be locate after alignment, ignoring the space to the left.void
checkMisconfigured
(BeanInstanceMap defaultInstances) Checks that a bean's properties conform to expectations.Creates a new bean that deep-copies every property value.Indicates how to align the image across the X-axis (i.e. horizontally): one ofleft, right, center
.Indicates how to align the image across the Y-axis (i.e. vertically): one oftop, bottom, center
.Indicates how to align the image across the Z-axis: one oftop, bottom, center, repeat
.void
Indicates how to align the image across the X-axis (i.e. horizontally): one ofleft, right, center
.void
Indicates how to align the image across the Y-axis (i.e. vertically): one oftop, bottom, center
.void
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, align
Methods 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
Description copied from class:AnchorBean
Checks that a bean's properties conform to expectations.- Overrides:
checkMisconfigured
in classAnchorBean<BoxAligner>
- Parameters:
defaultInstances
- all available default instances if theDefaultInstance
annotation is used- Throws:
BeanMisconfiguredException
- if the bean has not been configured properly as XML
-
alignAfterCheck
Description copied from class:BoxAligner
- Specified by:
alignAfterCheck
in 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 BoundingBox alignAfterCheck(Extent smaller, Extent larger) throws OperationFailedException Description copied from class:BoxAligner
- Specified by:
alignAfterCheck
in 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 BoundingBox alignAfterCheck(Extent smaller, BoundingBox larger) throws OperationFailedException Description copied from class:BoxAligner
- Specified by:
alignAfterCheck
in 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
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
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 classAnchorBean<BoxAligner>
- Returns:
- the newly created bean
-
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
.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
Indicates how to align the image across the Z-axis: one oftop, 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.
-