Package ij.gui

Class PolygonRoi

java.lang.Object
ij.gui.Roi
ij.gui.PolygonRoi
All Implemented Interfaces:
Serializable, Cloneable, Iterable<Point>
Direct Known Subclasses:
EllipseRoi, FreehandRoi, PointRoi, RotatedRectRoi

public class PolygonRoi
extends Roi
This class represents a polygon region of interest or polyline of interest.
See Also:
Serialized Form
  • Field Details

    • maxPoints

      protected int maxPoints
    • xp

      protected int[] xp
    • yp

      protected int[] yp
    • xpf

      protected float[] xpf
    • ypf

      protected float[] ypf
    • xp2

      protected int[] xp2
    • yp2

      protected int[] yp2
    • nPoints

      protected int nPoints
    • xSpline

      protected float[] xSpline
    • ySpline

      protected float[] ySpline
    • splinePoints

      protected int splinePoints
  • Constructor Details

    • PolygonRoi

      public PolygonRoi​(int[] xPoints, int[] yPoints, int nPoints, int type)
      Creates a new polygon or polyline ROI from x and y coordinate arrays. Type must be Roi.POLYGON, Roi.FREEROI, Roi.TRACED_ROI, Roi.POLYLINE, Roi.FREELINE or Roi.ANGLE.
    • PolygonRoi

      public PolygonRoi​(float[] xPoints, float[] yPoints, int nPoints, int type)
      Creates a new polygon or polyline ROI from float x and y arrays. Type must be Roi.POLYGON, Roi.FREEROI, Roi.POLYLINE, Roi.FREELINE or Roi.ANGLE.
    • PolygonRoi

      public PolygonRoi​(float[] xPoints, float[] yPoints, int type)
      Creates a new polygon or polyline ROI from float x and y arrays. Type must be Roi.POLYGON, Roi.FREEROI, Roi.POLYLINE, Roi.FREELINE or Roi.ANGLE.
    • PolygonRoi

      public PolygonRoi​(Polygon p, int type)
      Creates a new polygon or polyline ROI from a Polygon. Type must be Roi.POLYGON, Roi.FREEROI, Roi.TRACED_ROI, Roi.POLYLINE, Roi.FREELINE or Roi.ANGLE.
    • PolygonRoi

      public PolygonRoi​(FloatPolygon p, int type)
      Creates a new polygon or polyline ROI from a FloatPolygon. Type must be Roi.POLYGON, Roi.FREEROI, Roi.TRACED_ROI, Roi.POLYLINE, Roi.FREELINE or Roi.ANGLE.
    • PolygonRoi

      public PolygonRoi​(int[] xPoints, int[] yPoints, int nPoints, ImagePlus imp, int type)
      Deprecated.
    • PolygonRoi

      public PolygonRoi​(int sx, int sy, ImagePlus imp)
      Starts the process of creating a new user-generated polygon or polyline ROI.
  • Method Details