|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectij.gui.Roi
ij.gui.PolygonRoi
public class PolygonRoi
This class represents a polygon region of interest or polyline of interest.
| Field Summary | |
|---|---|
protected java.awt.Graphics |
g
|
protected int |
maxPoints
|
protected int |
nPoints
|
protected int[] |
xp
|
protected int[] |
xp2
|
protected int[] |
yp
|
protected int[] |
yp2
|
| Fields inherited from class ij.gui.Roi |
|---|
clipboard, clipHeight, clipWidth, clipX, clipY, constrain, CONSTRUCTING, FREELINE, FREEROI, HANDLE_SIZE, ic, imp, LINE, MOVING, NORMAL, oldHeight, oldWidth, oldX, oldY, OVAL, pasteMode, 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)
Creates a new polygon or polyline ROI from x and y coordinate arrays. |
|
PolygonRoi(int ox,
int oy,
ImagePlus imp)
Creates a new user-generated polygon or polyline ROI. |
|
| Method Summary | |
|---|---|
boolean |
contains(int x,
int y)
|
void |
draw(java.awt.Graphics g)
|
void |
drawPixels()
|
double |
getAngle()
Returns the angle in degrees between the first two segments of this polyline. |
double |
getLength()
Returns the perimeter (for ROIs) or length (for lines). |
int[] |
getMask()
|
int |
getNCoordinates()
Returns the number of XY coordinates. |
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 x,
int y)
|
protected void |
handleMouseUp(int sx,
int sy)
|
protected void |
updatePolygon()
|
| Methods inherited from class ij.gui.Roi |
|---|
abortPaste, clone, endPaste, getAngle, getBoundingRect, getColor, getState, getType, handleMouseDown, handleMouseDrag, nudge, nudgeCorner, setColor, setImage, setLocation, setPasteMode, showStatus, toString, updateClipRect |
| Methods inherited from class java.lang.Object |
|---|
equals, 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 java.awt.Graphics g
| Constructor Detail |
|---|
public PolygonRoi(int ox,
int oy,
ImagePlus imp)
public PolygonRoi(int[] xPoints,
int[] yPoints,
int nPoints,
ImagePlus imp,
int type)
| Method Detail |
|---|
public void draw(java.awt.Graphics g)
draw in class Roipublic void drawPixels()
drawPixels in class Roi
protected void grow(int x,
int y)
grow in class Roiprotected void updatePolygon()
protected void handleMouseUp(int sx,
int sy)
handleMouseUp in class Roi
public boolean contains(int x,
int y)
contains in class Roipublic int[] getMask()
getMask in class Roipublic double getLength()
getLength in class Roipublic double getAngle()
public int getNCoordinates()
public int[] getXCoordinates()
public int[] getYCoordinates()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||