Class ClassifiedRegion

java.lang.Object
mpicbg.stitching.fusion.ClassifiedRegion

public class ClassifiedRegion extends Object
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 Details

    • ClassifiedRegion

      public ClassifiedRegion(int size)
      Creates an empty ClassifiedRegion of the indicated size (dimensionality).
    • ClassifiedRegion

      public ClassifiedRegion(Interval... intervals)
      Creates a new region using the given list of intervals.
    • ClassifiedRegion

      public ClassifiedRegion(ClassifiedRegion copy)
      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

      public void addAllClasses(ClassifiedRegion region)
      Merges the classes attached to another region with the classes of this region.
    • coversClasses

      public boolean coversClasses(ClassifiedRegion other)
      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

      public void set(Interval interval, int index)
      Sets the interval of this region for the specified axis (index)
    • get

      public Interval get(int index)
      Gets the interval of this region for the specified axis (index)
    • size

      public int size()
      Returns:
      The dimensionality of this region
    • intersects

      public boolean intersects(ClassifiedRegion other)
      Returns true if this region intersects with the provided target region.
    • equalsRegion

      public boolean equalsRegion(ClassifiedRegion other)
      Test if this region is identical to another region
    • toString

      public String toString()
      Overrides:
      toString in class Object