Class StackArrangement
Object
org.anchoranalysis.image.bean.nonbean.spatial.arrange.StackArrangement
- All Implemented Interfaces:
Iterable<BoundingBoxEnclosed>
public final class StackArrangement extends Object implements Iterable<BoundingBoxEnclosed>
A list of
BoundingBoxes that indicate where to locate corresponding Stacks on a
unified larger image.- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description StackArrangement(org.anchoranalysis.spatial.box.Extent extent)Create with the overallExtentand no boxes.StackArrangement(org.anchoranalysis.spatial.box.Extent extent, List<BoundingBoxEnclosed> boxes)StackArrangement(org.anchoranalysis.spatial.box.Extent extent, org.anchoranalysis.spatial.box.BoundingBox box)Create with a singleBoundingBox. -
Method Summary
Modifier and Type Method Description voidadd(BoundingBoxEnclosed box)Adds a newBoundingBoxEnclosedto the arrangement.voidadd(org.anchoranalysis.spatial.box.BoundingBox box)Adds a newBoundingBoxto the arrangement, with no padding.List<BoundingBoxEnclosed>boxes()Where to locate a respective image on a larger image.booleanequals(Object o)org.anchoranalysis.spatial.box.Extentextent()The size of the larger image in which all theBoundingBoxes inlistmust fully reside.BoundingBoxEnclosedget(int index)Gets theBoundingBoxcorresponding to a particular index.inthashCode()Iterator<BoundingBoxEnclosed>iterator()StringtoString()
-
Constructor Details
-
StackArrangement
public StackArrangement(org.anchoranalysis.spatial.box.Extent extent)Create with the overallExtentand no boxes.- Parameters:
extent- the size of the larger image in which all theBoundingBoxes inlistmust fully reside.
-
StackArrangement
public StackArrangement(org.anchoranalysis.spatial.box.Extent extent, org.anchoranalysis.spatial.box.BoundingBox box)Create with a singleBoundingBox.- Parameters:
extent- the size of the larger image in which all theBoundingBoxes inlistmust fully reside.box- theBoundingBox.
-
StackArrangement
public StackArrangement(org.anchoranalysis.spatial.box.Extent extent, List<BoundingBoxEnclosed> boxes)
-
-
Method Details
-
add
public void add(org.anchoranalysis.spatial.box.BoundingBox box)Adds a newBoundingBoxto the arrangement, with no padding.- Parameters:
box- theBoundingBoxin which the image should be placed.
-
add
Adds a newBoundingBoxEnclosedto the arrangement.- Parameters:
box- theBoundingBoxin which the image should be placed, together with any enclosing box (e.g. with padding).
-
get
Gets theBoundingBoxcorresponding to a particular index.- Parameters:
index- the index.- Returns:
- the corresponding
BoundingBoxin the arrangement, and any enclosing bounding-box. - Throws:
IndexOutOfBoundsException- if the index is out of range.
-
iterator
- Specified by:
iteratorin interfaceIterable<BoundingBoxEnclosed>
-
extent
public org.anchoranalysis.spatial.box.Extent extent()The size of the larger image in which all theBoundingBoxes inlistmust fully reside. -
boxes
Where to locate a respective image on a larger image. -
equals
-
hashCode
public int hashCode() -
toString
-