Class ROIArea

java.lang.Object
java.awt.geom.Area
com.xinapse.multisliceimage.roi.ROIArea
All Implemented Interfaces:
Shape, Cloneable

class ROIArea extends Area
An Area for representing ROIs.
  • Constructor Details

    • ROIArea

      public ROIArea()
      Creates a new empty ROIArea
    • ROIArea

      public ROIArea(Shape s)
      Creates a new ROIArea, setting the shape from the supplied Shape.
      Parameters:
      s - the Shape from which to set this ROIArea.
  • Method Details

    • getSquareArea

      public double getSquareArea() throws ROIException
      Returns the area of the region bounded by this ROIArea.
      Returns:
      the area of the region bounded by this ROIArea.
      Throws:
      ROIException - if the ROIArea is invalid.
    • getBounds2D

      public Rectangle2D getBounds2D()
      Default method getBounds2D() is over-ridden because it is not guaranteed to return the minimum bounding rectangle when Areas have been intersected with other areas. For example is a Rectangle2D is intersected with another shape, getBounds2D() always returns the bounds of the original rectangle.
      Specified by:
      getBounds2D in interface Shape
      Overrides:
      getBounds2D in class Area
    • toString

      public String toString()
      Overrides:
      toString in class Object