Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.astro.louisville.edu/software/astroimagej/imagej/api/ij/gui/PolygonRoi.html
Дата изменения: Thu Dec 2 23:03:11 2010 Дата индексирования: Mon Oct 1 21:49:38 2012 Кодировка: Поисковые слова: п п п п п п |
|
||||||||||
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 int |
maxPoints
|
protected int |
nPoints
|
protected int |
splinePoints
|
protected int[] |
xp
|
protected int[] |
xp2
|
protected float[] |
xSpline
|
protected int[] |
yp
|
protected int[] |
yp2
|
protected float[] |
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, imp, instanceColor, LINE, lineWidth, mag, MOVING, MOVING_HANDLE, name, nonScalable, NORMAL, NOT_PASTING, oldHeight, oldWidth, oldX, oldY, onePixelWide, OVAL, overlay, pasteMode, POINT, POLYGON, POLYLINE, previousRoi, RECTANGLE, RESIZING, ROIColor, stroke, strokeColor, TRACED_ROI, type, updateFullWindow, wideLine, xMax, yMax |
Constructor Summary | |
---|---|
PolygonRoi(int[] xPoints,
int[] yPoints,
int nPoints,
ImagePlus imp,
int type)
Deprecated. |
|
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()
|
protected int |
clipRectMargin()
|
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 |
exitConstructingMode()
|
void |
fitSpline()
|
void |
fitSpline(int evaluationPoints)
|
void |
fitSplineForStraightening()
|
double |
getAngle()
Returns the angle in degrees between the first two segments of this polyline. |
java.awt.Polygon |
getConvexHull()
Uses the gift wrap algorithm to find the convex hull and returns it as a Polygon. |
FloatPolygon |
getFloatPolygon()
Returns this polygon or polyline as float arrays. |
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 |
getNonSplineCoordinates()
|
java.awt.Polygon |
getPolygon()
Returns this PolygonRoi as a Polygon. |
double |
getUncalibratedLength()
|
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. |
boolean |
isSplineFit()
Returns 'true' if this selection has been fitted with a spline. |
protected void |
mouseDownInHandle(int handle,
int sx,
int sy)
|
protected void |
moveHandle(int sx,
int sy)
|
void |
removeSplineFit()
|
protected void |
updatePolygon()
|
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 float[] xSpline
protected float[] ySpline
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 Roi
public void drawPixels(ImageProcessor ip)
Roi
drawPixels
in class Roi
ImageProcessor.setColor(java.awt.Color)
,
ImageProcessor.setLineWidth(int)
protected void grow(int sx, int sy)
grow
in class Roi
protected void updatePolygon()
public void exitConstructingMode()
protected void moveHandle(int sx, int sy)
moveHandle
in class Roi
protected void mouseDownInHandle(int handle, int sx, int sy)
mouseDownInHandle
in class Roi
public void fitSpline(int evaluationPoints)
public void fitSpline()
public void removeSplineFit()
public boolean isSplineFit()
public void fitSplineForStraightening()
public double getUncalibratedLength()
protected void handleMouseUp(int sx, int sy)
handleMouseUp
in class Roi
protected void addOffset()
public boolean contains(int x, int y)
contains
in class Roi
public int isHandle(int sx, int sy)
isHandle
in class Roi
public ImageProcessor getMask()
getMask
in class Roi
public double getLength()
getLength
in class Roi
public double getAngle()
public int getNCoordinates()
public int[] getXCoordinates()
public int[] getYCoordinates()
public java.awt.Polygon getNonSplineCoordinates()
public java.awt.Polygon getPolygon()
getPolygon
in class Roi
ImageProcessor.setRoi(java.awt.Rectangle)
,
ImageProcessor.drawPolygon(java.awt.Polygon)
,
ImageProcessor.fillPolygon(java.awt.Polygon)
public FloatPolygon getFloatPolygon()
getFloatPolygon
in class Roi
public java.awt.Polygon getConvexHull()
getConvexHull
in class Roi
protected int clipRectMargin()
clipRectMargin
in class Roi
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 |