ij.gui
Class PointRoi

java.lang.Object
  extended by ij.gui.Roi
      extended by ij.gui.PolygonRoi
          extended by ij.gui.PointRoi
All Implemented Interfaces:
Serializable, Cloneable

public class PointRoi
extends PolygonRoi

This class represents a collection of points.

See Also:
Serialized Form

Field Summary
static String[] sizes
           
static String[] types
           
 
Fields inherited from class ij.gui.PolygonRoi
maxPoints, nPoints, splinePoints, xp, xp2, xpf, xSpline, yp, yp2, ypf, ySpline
 
Fields inherited from class ij.gui.Roi
ANGLE, asp_bk, aspect, cachedMask, center, clipboard, clipHeight, clipWidth, clipX, clipY, COMPOSITE, constrain, CONSTRUCTING, defaultFillColor, fillColor, FREELINE, FREEROI, HANDLE_SIZE, handleColor, ic, ignoreClipRect, imp, instanceColor, LINE, lineWidth, mag, MOVING, MOVING_HANDLE, nonScalable, NORMAL, NOT_PASTING, oldHeight, oldWidth, oldX, oldY, onePixelWide, OVAL, overlay, pasteMode, POINT, POLYGON, POLYLINE, previousRoi, RECTANGLE, RESIZING, ROIColor, stroke, strokeColor, TRACED_ROI, updateFullWindow, wideLine, xMax, yMax
 
Constructor Summary
PointRoi(double ox, double oy)
          Creates a new PointRoi using the specified offscreen double coordinates.
PointRoi(float[] ox, float[] oy)
          Creates a new PointRoi using the specified float arrays of offscreen coordinates.
PointRoi(float[] ox, float[] oy, int points)
          Creates a new PointRoi using the specified float arrays of offscreen coordinates.
PointRoi(FloatPolygon poly)
          Creates a new PointRoi from a FloatPolygon.
PointRoi(int[] ox, int[] oy, int points)
          Creates a new PointRoi using the specified int arrays of offscreen coordinates.
PointRoi(int ox, int oy)
          Creates a new PointRoi using the specified offscreen int coordinates.
PointRoi(int sx, int sy, ImagePlus imp)
          Creates a new PointRoi using the specified screen coordinates.
PointRoi(Polygon poly)
          Creates a new PointRoi from a Polygon.
 
Method Summary
 PointRoi addPoint(double x, double y)
          Returns a copy of this PointRoi with a point at (x,y) added.
 PointRoi addPoint(int x, int y)
           
 boolean contains(int x, int y)
          Returns true if (x,y) is one of the points in this collection.
 void draw(Graphics g)
          Draws the points on the image.
 void drawPixels(ImageProcessor ip)
          Draws the selection outline on the specified ImageProcessor.
static Color getDefaultCrossColor()
          Deprecated
static String getDefaultMarkerSize()
          Deprecated.  
static int getDefaultSize()
           
static int getDefaultType()
           
 ImageProcessor getMask()
          Always returns null for rectangular Roi's
 int getPointType()
           
 boolean getShowLabels()
           
 int getSize()
           
protected  void handleMouseUp(int sx, int sy)
          With segmented selections, ignore first mouse up and finalize when user double-clicks, control-clicks or clicks in start box.
static void setDefaultCrossColor(Color color)
          Deprecated
static void setDefaultMarkerSize(String size)
          Deprecated.  
static void setDefaultSize(int index)
           
static void setDefaultType(int type)
           
 void setHideLabels(boolean hideLabels)
          Deprecated.  
 void setPointType(int type)
           
 void setShowLabels(boolean showLabels)
           
 void setSize(int index)
           
 boolean subPixelResolution()
          Always returns true.
 PointRoi subtractPoints(Roi roi)
          Subtract the points that intersect the specified ROI and return the result.
 String toString()
           
 
Methods inherited from class ij.gui.PolygonRoi
addOffset, clipRectMargin, clone, deleteHandle, enableSubPixelResolution, exitConstructingMode, fitSpline, fitSpline, fitSplineForStraightening, getAngle, getConvexHull, getDebugInfo, getDrawOffset, getFloatPolygon, getInterpolatedPolygon, getLength, getNCoordinates, getNonSplineCoordinates, getNonSplineFloatPolygon, getPolygon, getUncalibratedLength, getXCoordinates, getYCoordinates, grow, isHandle, isSplineFit, mouseDownInHandle, mouseMoved, moveHandle, removeSplineFit, setDrawOffset, setLocation, updatePolygon, wipeBack
 
Methods inherited from class ij.gui.Roi
abortPaste, addRoiListener, copyAttributes, drawOverlay, drawPixels, endPaste, equals, getAngle, getBoundingRect, getBounds, getColor, getCornerDiameter, getCPosition, getCurrentPasteMode, getDefaultFillColor, getFeretsDiameter, getFeretValues, getFillColor, getFloatAngle, getFloatBounds, getFloatHeight, getFloatWidth, getHashCode, getImage, getImageID, getInterpolatedPolygon, getInterpolatedPolygon, getMagnification, getName, getPasteMode, getPosition, getProperties, getProperty, getPropertyCount, getPrototypeOverlay, getRoundRectArcSize, getScaledStroke, getState, getStroke, getStrokeColor, getStrokeWidth, getTPosition, getType, getTypeAsString, getXBase, getYBase, getZPosition, handleMouseDown, handleMouseDrag, isActiveOverlayRoi, isArea, isDrawingTool, isLine, isVisible, lineCircleIntersection, mouseDragged, mouseReleased, notifyListeners, nudge, nudgeCorner, removeRoiListener, screenX, screenXD, screenY, screenYD, setColor, setCornerDiameter, setDefaultFillColor, setFillColor, setIgnoreClipRect, setImage, setInstanceColor, setLineWidth, setLocation, setName, setNonScalable, setPasteMode, setPosition, setPosition, setProperties, setProperty, setPrototypeOverlay, setRoundRectArcSize, setStroke, setStrokeColor, setStrokeWidth, setStrokeWidth, showStatus, startPaste, temporarilyHide, toFloat, toInt, toInt, toIntR, update, updateClipRect, updateWideLine
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sizes

public static final String[] sizes

types

public static final 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(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

handleMouseUp

protected void handleMouseUp(int sx,
                             int sy)
Description copied from class: PolygonRoi
With segmented selections, ignore first mouse up and finalize when user double-clicks, control-clicks or clicks in start box.

Overrides:
handleMouseUp in class PolygonRoi

draw

public void draw(Graphics g)
Draws the points on the image.

Overrides:
draw in class PolygonRoi

drawPixels

public void drawPixels(ImageProcessor ip)
Description copied from class: Roi
Draws the selection outline on the specified ImageProcessor.

Overrides:
drawPixels in class PolygonRoi
See Also:
ImageProcessor.setColor(java.awt.Color), ImageProcessor.setLineWidth(int)

addPoint

public PointRoi addPoint(double x,
                         double y)
Returns a copy of this PointRoi with a point at (x,y) added.


addPoint

public PointRoi addPoint(int x,
                         int y)

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.


getMask

public ImageProcessor getMask()
Description copied from class: Roi
Always returns null for rectangular Roi's

Overrides:
getMask in class PolygonRoi

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)

getPointType

public int getPointType()

setDefaultSize

public static void setDefaultSize(int index)

getDefaultSize

public static int getDefaultSize()

setSize

public void setSize(int index)

getSize

public int getSize()

setDefaultCrossColor

public static void setDefaultCrossColor(Color color)
Deprecated


getDefaultCrossColor

public static Color getDefaultCrossColor()
Deprecated


subPixelResolution

public boolean subPixelResolution()
Always returns true.

Overrides:
subPixelResolution in class PolygonRoi

toString

public String toString()
Overrides:
toString in class Roi

setHideLabels

public void setHideLabels(boolean hideLabels)
Deprecated. 


setDefaultMarkerSize

public static void setDefaultMarkerSize(String size)
Deprecated. 


getDefaultMarkerSize

public static String getDefaultMarkerSize()
Deprecated. 



Copyright © 1997–2015 NIH. All rights reserved.