ij.gui
Class EllipseRoi
java.lang.Object
ij.gui.AbstractRoi
ij.gui.AttributeRoi
ij.gui.Roi
ij.gui.PolygonRoi
ij.gui.EllipseRoi
- All Implemented Interfaces:
- RoiBeans, RoiConstance, java.io.Serializable, java.lang.Cloneable
public class EllipseRoi
- extends PolygonRoi
Elliptical region of interest.
- See Also:
- Serialized Form
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 |
asp_bk, aspect, cachedMask, center, clipboard, clipHeight, clipHeightd, clipWidth, clipWidthd, clipX, clipXd, clipY, clipYd, constrain, defaultFillColor, handleColor, ic, imageID, instanceColor, lineWidth, mag, nonScalable, oldHeight, oldHeightd, oldWidth, oldWidthd, oldX, oldXd, oldY, oldYd, onePixelWide, overlay, pasteMode, previousRoi, roundRect, updateFullWindow |
Fields inherited from class ij.gui.AttributeRoi |
drawDoubleClick, fillColor, fillDoubleClick, imp, ROIColor, stroke, strokeColor, type, wideLine, xMax, yMax |
Fields inherited from interface ij.gui.RoiConstance |
ADD_TO_ROI, ANGLE, COMPOSITE, CONSTRUCTING, DRAW_HANDLE, EVT_HANDLE_SIZE, FILL_HANDLE, FREELINE, FREEROI, HANDLE_SIZE, LINE, MOVING, MOVING_HANDLE, MOVING_ROUNDRECT_HANDLE, NO_MODS, NORMAL, NOT_PASTING, OVAL, POINT, POLYGON, POLYLINE, RECTANGLE, RESIZING, SUBTRACT_FROM_ROI, TRACED_ROI |
Method Summary |
void |
draw(java.awt.Graphics g)
|
double[] |
getFeretValues()
Caculates "Feret" (maximum caliper width), "FeretAngle"
and "MinFeret" (minimum caliper width), "FeretX" and "FeretY". |
double |
getLength()
Returns the perimeter of this ellipse. |
double[] |
getParams()
Returns x1, y1, x2, y2 and aspectRatio as a 5 element array. |
protected void |
grow(int sx,
int sy)
|
protected void |
handleMouseUp(int screenX,
int screenY)
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 handle number if the specified screen coordinates are
inside or near a handle, otherwise returns -1. |
protected void |
moveHandle(int sx,
int sy)
|
Methods inherited from class ij.gui.PolygonRoi |
addOffset, clipRectMargin, clone, contains, deleteHandle, drawPixels, exitConstructingMode, fitSpline, fitSpline, fitSplineForStraightening, getAngle, getConvexHull, getDrawOffset, getFloatPolygon, getMask, getNCoordinates, getNonSplineCoordinates, getNonSplineFloatCoordinates, getPolygon, getUncalibratedLength, getXCoordinates, getYCoordinates, isSplineFit, mouseDownInHandle, removeSplineFit, setDrawOffset, subPixelResolution, updatePolygon |
Methods inherited from class ij.gui.Roi |
abortPaste, drawfillOverlay, drawHandle, drawOverlay, drawPixels, drawPixels, drawRoiHandle, drawStroke, endPaste, equals, fillRoiHandle, getBoundingRect, getBounds, getCornerDiameter, getCurrentPasteMode, getFloatBounds, getHandleSize, getMagnification, getPasteMode, getPrototypeOverlay, getRoundRectArcSize, getScaledStroke, getState, getTypeAsString, handleMouseDown, handleMouseDrag, isArea, isDrawingTool, isLine, isVisible, nudge, nudgeCorner, screenX, screenXD, screenY, screenYD, setCornerDiameter, setImage, setInstanceColor, setLineWidth, setLocation, setNonScalable, setPasteMode, setPrototypeOverlay, setRoundRectArcSize, showStatus, startPaste, temporarilyHide, toFloat, toInt, toInt, toIntR, toString, update, updateClipRect, updateWideLine |
Methods inherited from class ij.gui.AttributeRoi |
copyAttributes, getAngle, getColor, getCPosition, getDefaultFillColor, getFeretsDiameter, getFillColor, getImage, getImageID, getName, getPosition, getStroke, getStrokeColor, getStrokeWidth, getTPosition, getType, getZPosition, setColor, setDefaultFillColor, setFillColor, setName, setPosition, setPosition, setStroke, setStrokeColor, setStrokeWidth, setStrokeWidth |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EllipseRoi
public EllipseRoi(double x1,
double y1,
double x2,
double y2,
double aspectRatio)
EllipseRoi
public EllipseRoi(int sx,
int sy,
ImagePlus imp)
draw
public void draw(java.awt.Graphics g)
- Specified by:
draw
in interface RoiBeans
- Overrides:
draw
in class PolygonRoi
grow
protected void grow(int sx,
int sy)
- Overrides:
grow
in class PolygonRoi
handleMouseUp
protected void handleMouseUp(int screenX,
int screenY)
- 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
moveHandle
protected void moveHandle(int sx,
int sy)
- Overrides:
moveHandle
in class PolygonRoi
isHandle
public int isHandle(int sx,
int sy)
- Description copied from class:
PolygonRoi
- Returns a handle number if the specified screen coordinates are
inside or near a handle, otherwise returns -1.
- Specified by:
isHandle
in interface RoiBeans
- Overrides:
isHandle
in class PolygonRoi
getLength
public double getLength()
- Returns the perimeter of this ellipse.
- Specified by:
getLength
in interface RoiBeans
- Overrides:
getLength
in class PolygonRoi
getParams
public double[] getParams()
- Returns x1, y1, x2, y2 and aspectRatio as a 5 element array.
getFeretValues
public double[] getFeretValues()
- Description copied from class:
AttributeRoi
- Caculates "Feret" (maximum caliper width), "FeretAngle"
and "MinFeret" (minimum caliper width), "FeretX" and "FeretY".
- Specified by:
getFeretValues
in interface RoiBeans
- Overrides:
getFeretValues
in class AttributeRoi