|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectij.gui.Roi
ij.gui.PolygonRoi
ij.gui.PointRoi
public class PointRoi
This class represents a collection of points.
| Field Summary | |
|---|---|
static int |
MAX_COUNTERS
|
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)
Adds a point to this PointRoi. |
void |
addPoint(ImagePlus imp,
double ox,
double oy)
Adds a point to this PointRoi. |
Object |
clone()
Returns a copy of this PointRoi. |
boolean |
contains(int x,
int y)
Returns true if (x,y) is one of the points in this collection. |
protected void |
deletePoint(int index)
|
void |
displayCounts()
|
void |
draw(Graphics g)
Draws the points on the image. |
void |
drawPixels(ImageProcessor ip)
Draws the selection outline on the specified ImageProcessor. |
FloatPolygon |
getContainedFloatPoints()
Returns the points as a FloatPolygon. |
Point[] |
getContainedPoints()
Returns the points as an array of Points. |
int |
getCount(int counter)
|
int |
getCounter()
|
static String[] |
getCounterChoices()
|
int[] |
getCounters()
|
static Color |
getDefaultCrossColor()
Deprecated |
static String |
getDefaultMarkerSize()
Deprecated. |
static int |
getDefaultSize()
|
static int |
getDefaultType()
|
ImageProcessor |
getMask()
Always returns null for rectangular Roi's |
int |
getPointPosition(int index)
|
int |
getPointType()
Returns the point type (0=hybrid, 1=crosshair, 2=dot, 3=circle). |
boolean |
getShowLabels()
|
int |
getSize()
Returns the point size (0-4). |
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. |
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. |
Iterator<Point> |
iterator()
Custom iterator for points contained in a PointRoi. |
void |
resetCounters()
|
void |
setCounter(int counter)
|
void |
setCounters(int[] counters)
|
static void |
setDefaultCounter(int counter)
|
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)
Sets the point type (0=hybrid, 1=crosshair, 2=dot, 3=circle). |
void |
setShowLabels(boolean showLabels)
|
void |
setSize(int size)
Sets the point size, where 'size' is 0-4. |
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 java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String[] sizes
public static final String[] types
public static final int MAX_COUNTERS
| Constructor Detail |
|---|
public PointRoi(int[] ox,
int[] oy,
int points)
public PointRoi(float[] ox,
float[] oy,
int points)
public PointRoi(float[] ox,
float[] oy)
public PointRoi(FloatPolygon poly)
public PointRoi(Polygon poly)
public PointRoi(int ox,
int oy)
public PointRoi(double ox,
double oy)
public PointRoi(int sx,
int sy,
ImagePlus imp)
| Method Detail |
|---|
protected void handleMouseUp(int sx,
int sy)
PolygonRoi
handleMouseUp in class PolygonRoipublic void draw(Graphics g)
draw in class PolygonRoipublic void drawPixels(ImageProcessor ip)
Roi
drawPixels in class PolygonRoiImageProcessor.setColor(java.awt.Color),
ImageProcessor.setLineWidth(int)
public void addPoint(ImagePlus imp,
double ox,
double oy)
public PointRoi addPoint(double x,
double y)
protected void deletePoint(int index)
deletePoint in class PolygonRoipublic void resetCounters()
public PointRoi subtractPoints(Roi roi)
public ImageProcessor getMask()
Roi
getMask in class PolygonRoi
public boolean contains(int x,
int y)
contains in class PolygonRoipublic void setShowLabels(boolean showLabels)
public boolean getShowLabels()
public static void setDefaultType(int type)
public static int getDefaultType()
public void setPointType(int type)
public int getPointType()
public static void setDefaultSize(int index)
public static int getDefaultSize()
public void setSize(int size)
public int getSize()
public static void setDefaultCrossColor(Color color)
public static Color getDefaultCrossColor()
public boolean subPixelResolution()
subPixelResolution in class PolygonRoipublic String toString()
toString in class Roipublic void setCounter(int counter)
public int getCounter()
public static void setDefaultCounter(int counter)
public int getCount(int counter)
public int[] getCounters()
public void setCounters(int[] counters)
public int getPointPosition(int index)
public void displayCounts()
public static String[] getCounterChoices()
public int isHandle(int sx,
int sy)
isHandle in class PolygonRoipublic Point[] getContainedPoints()
getContainedPoints in class RoiRoi.getContainedFloatPoints(),
#Iterator()public FloatPolygon getContainedFloatPoints()
getContainedFloatPoints in class RoiRoi.getContainedPoints(),
#Iterator()public Iterator<Point> iterator()
PointRoi.
iterator in interface Iterable<Point>iterator in class RoiRoi.getContainedPoints(),
Roi.getContainedFloatPoints()public Object clone()
clone in class PolygonRoipublic void setHideLabels(boolean hideLabels)
public static void setDefaultMarkerSize(String size)
public static String getDefaultMarkerSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||