Package mpicbg.stitching.fusion
Class ClassifiedRegion
java.lang.Object
mpicbg.stitching.fusion.ClassifiedRegion
Representation of a N-dimensional region with one or more classes/labels
applied to it. Regions are effectively just collections of one or more
Intervals.- Author:
- Mark Hiner hinerm at gmail.com
-
Constructor Summary
ConstructorsConstructorDescriptionClassifiedRegion(int size) Creates an emptyClassifiedRegionof the indicated size (dimensionality).Copying constructor.ClassifiedRegion(Interval... intervals) Creates a new region using the given list of intervals. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllClasses(ClassifiedRegion region) Merges the classes attached to another region with the classes of this region.voidaddClass(int label) Add a class, in the form an int value, to this region.int[]booleancoversClasses(ClassifiedRegion other) booleanequalsRegion(ClassifiedRegion other) Test if this region is identical to another regionget(int index) Gets the interval of this region for the specified axis (index)booleanintersects(ClassifiedRegion other) Returns true if this region intersects with the provided target region.voidSets the interval of this region for the specified axis (index)intsize()toString()
-
Constructor Details
-
ClassifiedRegion
public ClassifiedRegion(int size) Creates an emptyClassifiedRegionof the indicated size (dimensionality). -
ClassifiedRegion
Creates a new region using the given list of intervals. -
ClassifiedRegion
Copying constructor. Creates a shallow copy.
-
-
Method Details
-
addClass
public void addClass(int label) Add a class, in the form an int value, to this region. -
addAllClasses
Merges the classes attached to another region with the classes of this region. -
coversClasses
- Returns:
- True iff this region contains all the classes of another region.
-
classArray
public int[] classArray()- Returns:
- A primitive array of all classes associated with this region.
-
set
Sets the interval of this region for the specified axis (index) -
get
Gets the interval of this region for the specified axis (index) -
size
public int size()- Returns:
- The dimensionality of this region
-
intersects
Returns true if this region intersects with the provided target region. -
equalsRegion
Test if this region is identical to another region -
toString
-