Interface IROI

All Superinterfaces:
org.eclipse.january.INameable, Serializable
All Known Subinterfaces:
IFitROI, IOrientableROI, IParametricROI, IPolylineROI, IRectangularROI
All Known Implementing Classes:
CircularFitROI, CircularROI, EllipticalFitROI, EllipticalROI, FreeDrawROI, GridROI, HyperbolicROI, Line3DROI, LinearROI, MxGridROI, OrientableROIBase, ParabolicROI, PerimeterBoxROI, PointROI, PolygonalROI, PolylineROI, RectangularROI, ResolutionEllipseROI, RingROI, ROIBase, SectorROI, SurfacePlotROI, XAxisBoxROI, XAxisLineBoxROI, YAxisBoxROI, YAxisLineBoxROI

public interface IROI extends Serializable, org.eclipse.january.INameable
Region of interest interface. A region may be one or two dimensional and may enclose an area. If it is open (or does not enclose an area) then a point is consider to be inside it when it lies on its outline to within the accuracy given by that point's coordinates.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addPoint(double[] pt)
    Add an offset to start (or centre) point
    void
    addPoint(double x, double y)
    Add an offset to start (or centre) point
    void
    addPoint(int[] pt)
    Add an offset to start (or centre) point
    boolean
    containsPoint(double x, double y)
     
     
    void
    downsample(double subFactor)
    To account for a down-sampling of the dataset, change ROI
    double[]
    Calculate x values at which ROI will intersect horizontal line of given y
     
    int[]
     
    double[]
     
    double[]
     
    double
     
    double
     
    double
    getValue(int i)
     
    boolean
     
    boolean
    isNearOutline(double x, double y, double distance)
     
    boolean
     
    void
    setFixed(boolean fixed)
     
    void
    setPlot(boolean require)
     
    void
    setPoint(double[] point)
     
    void
    setPoint(double x, double y)
     
    void
    setPoint(int[] point)
     
    void
    setPoint(int x, int y)
     
    void
    setValue(int i, double value)
    Set the start (or centre) point's i-th value

    Methods inherited from interface org.eclipse.january.INameable

    getName, setName
  • Method Details

    • setValue

      void setValue(int i, double value)
      Set the start (or centre) point's i-th value
      Parameters:
      i - index of dimension
      value -
    • setPoint

      void setPoint(double[] point)
      Parameters:
      point - The start (or centre) point to set
    • setPoint

      void setPoint(int[] point)
      Parameters:
      point - The start (or centre) point to set
    • setPoint

      void setPoint(int x, int y)
      Parameters:
      x -
      y -
    • setPoint

      void setPoint(double x, double y)
      Parameters:
      x -
      y -
    • getPointRef

      double[] getPointRef()
      Returns:
      Returns reference to the start (or centre) point
    • getPoint

      double[] getPoint()
      Returns:
      Returns copy of the start (or centre) point
    • getValue

      double getValue(int i)
      Parameters:
      i - index of dimension
      Returns:
      Returns the start (or centre) point's i-th value
    • getPointX

      double getPointX()
      Returns:
      Returns the start (or centre) point's x value
    • getPointY

      double getPointY()
      Returns:
      Returns the start (or centre) point's y value
    • getIntPoint

      int[] getIntPoint()
      Returns:
      Returns the start (or centre) point
    • addPoint

      void addPoint(int[] pt)
      Add an offset to start (or centre) point
      Parameters:
      pt -
    • addPoint

      void addPoint(double[] pt)
      Add an offset to start (or centre) point
      Parameters:
      pt -
    • addPoint

      void addPoint(double x, double y)
      Add an offset to start (or centre) point
      Parameters:
      x -
      y -
    • downsample

      void downsample(double subFactor)
      To account for a down-sampling of the dataset, change ROI
      Parameters:
      subFactor -
    • setPlot

      void setPlot(boolean require)
      Parameters:
      require - set true if plot required
    • isPlot

      boolean isPlot()
      Returns:
      true if plot is enabled
    • setFixed

      void setFixed(boolean fixed)
      Parameters:
      fixed - set true if ROI is not user-changeable
    • isFixed

      boolean isFixed()
      Returns:
      true if ROI is not user-changeable
    • getBounds

      IRectangularROI getBounds()
      Returns:
      bounding box as rectangular ROI
    • containsPoint

      boolean containsPoint(double x, double y)
      Parameters:
      x -
      y -
      Returns:
      true if given point is in ROI
    • isNearOutline

      boolean isNearOutline(double x, double y, double distance)
      Parameters:
      x -
      y -
      distance -
      Returns:
      true if given point within distance of outline of ROI
    • findHorizontalIntersections

      double[] findHorizontalIntersections(double y)
      Calculate x values at which ROI will intersect horizontal line of given y
      Parameters:
      y -
      Returns:
      x values in ascending order, is null in the non-intersecting case
    • copy

      IROI copy()
      Returns:
      a copy of ROI