Documentation of 'ij.gui.PointRoi' Java class
PointRoi
ij.gui

Class PointRoi

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<java.awt.Point>


    public class PointRoi
    extends PolygonRoi
    This class represents a collection of points.
    See Also:
    Serialized Form
    • Field Detail

      • sizes

        public static final java.lang.String[] sizes
      • types

        public static final java.lang.String[] types
    • Constructor Detail

      • PointRoi

        public PointRoi(int[] ox,
                        int[] oy,
                        int points)
        Creates a new PointRoi using the specified int arrays of offscreen coordinates.
      • PointRoi

        public PointRoi(float[] ox,
                        float[] oy,
                        int points)
        Creates a new PointRoi using the specified float arrays of offscreen coordinates.
      • PointRoi

        public PointRoi(float[] ox,
                        float[] oy)
        Creates a new PointRoi using the specified float arrays of offscreen coordinates.
      • PointRoi

        public PointRoi(FloatPolygon poly)
        Creates a new PointRoi from a FloatPolygon.
      • PointRoi

        public PointRoi(java.awt.Polygon poly)
        Creates a new PointRoi from a Polygon.
      • PointRoi

        public PointRoi(int ox,
                        int oy)
        Creates a new PointRoi using the specified offscreen int coordinates.
      • PointRoi

        public PointRoi(double ox,
                        double oy)
        Creates a new PointRoi using the specified offscreen double coordinates.
      • PointRoi

        public PointRoi(int sx,
                        int sy,
                        ImagePlus imp)
        Creates a new PointRoi using the specified screen coordinates.
    • Method Detail

      • draw

        public void draw(java.awt.Graphics g)
        Draws the points on the image.
        Overrides:
        draw in class PolygonRoi
      • addPoint

        public void addPoint(ImagePlus imp,
                             double ox,
                             double oy)
        Adds a point to this PointRoi.
      • addPoint

        public PointRoi addPoint(double x,
                                 double y)
        Adds a point to this PointRoi.
      • resetCounters

        public void resetCounters()
      • subtractPoints

        public PointRoi subtractPoints(Roi roi)
        Subtract the points that intersect the specified ROI and return the result. Returns null if there are no resulting points.
      • contains

        public boolean contains(int x,
                                int y)
        Returns true if (x,y) is one of the points in this collection.
        Overrides:
        contains in class PolygonRoi
      • setShowLabels

        public void setShowLabels(boolean showLabels)
      • getShowLabels

        public boolean getShowLabels()
      • setDefaultType

        public static void setDefaultType(int type)
      • getDefaultType

        public static int getDefaultType()
      • setPointType

        public void setPointType(int type)
        Sets the point type (0=hybrid, 1=crosshair, 2=dot, 3=circle).
      • getPointType

        public int getPointType()
        Returns the point type (0=hybrid, 1=crosshair, 2=dot, 3=circle).
      • setDefaultSize

        public static void setDefaultSize(int index)
      • getDefaultSize

        public static int getDefaultSize()
      • setSize

        public void setSize(int size)
        Sets the point size, where 'size' is 0-4.
      • getSize

        public int getSize()
        Returns the point size (0-4).
      • setDefaultCrossColor

        public static void setDefaultCrossColor(java.awt.Color color)
        Deprecated
      • getDefaultCrossColor

        public static java.awt.Color getDefaultCrossColor()
        Deprecated
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Roi
      • setCounter

        public void setCounter(int counter)
      • getCounter

        public int getCounter()
      • getNCounters

        public int getNCounters()
      • counting

        public boolean counting()
      • setDefaultCounter

        public static void setDefaultCounter(int counter)
      • getCount

        public int getCount(int counter)
      • getCounter

        public int getCounter(int index)
        Returns the counter assocated with the specified point.
      • getCounters

        public int[] getCounters()
      • setCounters

        public void setCounters(int[] counters)
      • getPointPosition

        public int getPointPosition(int index)
      • displayCounts

        public void displayCounts()
      • getCounterChoices

        public static java.lang.String[] getCounterChoices()
      • isHandle

        public int isHandle(int sx,
                            int sy)
        Returns a point index if it has been at least one second since the last point was added and the specified screen coordinates are inside or near a point, otherwise returns -1.
        Overrides:
        isHandle in class PolygonRoi
      • clone

        public java.lang.Object clone()
        Returns a copy of this PointRoi.
        Overrides:
        clone in class PolygonRoi
      • setCounterInfo

        public void setCounterInfo(int[] info)
      • getCounterInfo

        public int[] getCounterInfo()
      • setHideLabels

        public void setHideLabels(boolean hideLabels)
        Deprecated. 
      • setDefaultMarkerSize

        public static void setDefaultMarkerSize(java.lang.String size)
        Deprecated. 
      • getDefaultMarkerSize

        public static java.lang.String getDefaultMarkerSize()
        Deprecated. 

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.