|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectij.gui.Roi
ij.gui.PolygonRoi
This class represents a polygon region of interest or polyline of interest.
| Field Summary | |
protected int |
maxPoints
|
protected int |
nPoints
|
protected int |
splinePoints
|
protected int[] |
xp
|
protected int[] |
xp2
|
protected int[] |
xScreenSpline
|
protected int[] |
xSpline
|
protected int[] |
yp
|
protected int[] |
yp2
|
protected int[] |
yScreenSpline
|
protected int[] |
ySpline
|
| Fields inherited from class ij.gui.Roi |
ANGLE, cachedMask, center, clipboard, clipHeight, clipWidth, clipX, clipY, COMPOSITE, constrain, CONSTRUCTING, FREELINE, FREEROI, HANDLE_SIZE, handleColor, ic, imp, instanceColor, LINE, mag, MOVING, MOVING_HANDLE, name, NORMAL, NOT_PASTING, oldHeight, oldWidth, oldX, oldY, OVAL, pasteMode, POINT, POLYGON, POLYLINE, previousRoi, RECTANGLE, RESIZING, ROIColor, TRACED_ROI, type, updateFullWindow, xMax, yMax |
| Constructor Summary | |
PolygonRoi(int[] xPoints,
int[] yPoints,
int nPoints,
ImagePlus imp,
int type)
Obsolete |
|
PolygonRoi(int[] xPoints,
int[] yPoints,
int nPoints,
int type)
Creates a new polygon or polyline ROI from x and y coordinate arrays. |
|
PolygonRoi(int sx,
int sy,
ImagePlus imp)
Starts the process of creating a new user-generated polygon or polyline ROI. |
|
PolygonRoi(java.awt.Polygon p,
int type)
Creates a new polygon or polyline ROI from a Polygon. |
|
| Method Summary | |
protected void |
addOffset()
|
java.lang.Object |
clone()
Returns a copy of this PolygonRoi. |
boolean |
contains(int x,
int y)
|
void |
draw(java.awt.Graphics g)
|
void |
drawPixels(ImageProcessor ip)
Draws the selection outline on the specified ImageProcessor. |
void |
fitSpline(int evaluationPoints)
|
double |
getAngle()
Returns the angle in degrees between the first two segments of this polyline. |
double |
getFeretsDiameter()
Returns Feret's diameter, the greatest distance between any two points along the ROI boundary. |
double |
getLength()
Returns the perimeter (for ROIs) or length (for lines). |
ImageProcessor |
getMask()
Override Roi.nudge() to support splines. |
int |
getNCoordinates()
Returns the number of XY coordinates. |
java.awt.Polygon |
getPolygon()
Returns this PolygonRoi as a Polygon. |
int[] |
getXCoordinates()
Returns this ROI's X-coordinates, which are relative to origin of the bounding box. |
int[] |
getYCoordinates()
Returns this ROI's Y-coordinates, which are relative to origin of the bounding box. |
protected void |
grow(int sx,
int sy)
|
protected void |
handleMouseUp(int sx,
int sy)
|
int |
isHandle(int sx,
int sy)
Returns a handle number if the specified screen coordinates are inside or near a handle, otherwise returns -1. |
protected void |
mouseDownInHandle(int handle,
int sx,
int sy)
|
protected void |
moveHandle(int sx,
int sy)
|
protected void |
updatePolygon()
|
| Methods inherited from class ij.gui.Roi |
abortPaste, drawPixels, endPaste, equals, getAngle, getBoundingRect, getBounds, getColor, getCurrentPasteMode, getName, getPasteMode, getState, getType, getTypeAsString, handleMouseDown, handleMouseDrag, isArea, isLine, isVisible, nudge, nudgeCorner, setColor, setImage, setInstanceColor, setLocation, setName, setPasteMode, showStatus, startPaste, toString, update, updateClipRect |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected int maxPoints
protected int[] xp
protected int[] yp
protected int[] xp2
protected int[] yp2
protected int nPoints
protected int[] xSpline
protected int[] ySpline
protected int[] xScreenSpline
protected int[] yScreenSpline
protected int splinePoints
| Constructor Detail |
public PolygonRoi(int[] xPoints,
int[] yPoints,
int nPoints,
int type)
public PolygonRoi(java.awt.Polygon p,
int type)
public PolygonRoi(int[] xPoints,
int[] yPoints,
int nPoints,
ImagePlus imp,
int type)
public PolygonRoi(int sx,
int sy,
ImagePlus imp)
| Method Detail |
public void draw(java.awt.Graphics g)
draw in class Roipublic void drawPixels(ImageProcessor ip)
Roi
drawPixels in class RoiImageProcessor.setColor(java.awt.Color),
ImageProcessor.setLineWidth(int)
protected void grow(int sx,
int sy)
grow in class Roiprotected void updatePolygon()
protected void moveHandle(int sx,
int sy)
moveHandle in class Roi
protected void mouseDownInHandle(int handle,
int sx,
int sy)
mouseDownInHandle in class Roipublic void fitSpline(int evaluationPoints)
protected void handleMouseUp(int sx,
int sy)
handleMouseUp in class Roiprotected void addOffset()
public boolean contains(int x,
int y)
contains in class Roi
public int isHandle(int sx,
int sy)
isHandle in class Roipublic ImageProcessor getMask()
getMask in class Roipublic double getLength()
getLength in class Roipublic double getFeretsDiameter()
getFeretsDiameter in class Roipublic double getAngle()
public int getNCoordinates()
public int[] getXCoordinates()
public int[] getYCoordinates()
public java.awt.Polygon getPolygon()
getPolygon in class RoiImageProcessor.setRoi(java.awt.Rectangle),
ImageProcessor.drawPolygon(java.awt.Polygon),
ImageProcessor.fillPolygon(java.awt.Polygon)public java.lang.Object clone()
clone in class Roi
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||