Package ij.gui
Class EllipseRoi
- java.lang.Object
-
- ij.gui.Roi
-
- ij.gui.PolygonRoi
-
- ij.gui.EllipseRoi
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Point>
public class EllipseRoi extends PolygonRoi
This class implements the ellipse selection tool.- See Also:
- Serialized Form
-
-
Field Summary
-
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, flattenScale, 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, type, updateFullWindow, wideLine, xMax, yMax
-
-
Constructor Summary
Constructors Constructor Description EllipseRoi(double x1, double y1, double x2, double y2, double aspectRatio)
EllipseRoi(int sx, int sy, ImagePlus imp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
draw(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)
boolean
subPixelResolution()
Always returns true.-
Methods inherited from class ij.gui.PolygonRoi
addOffset, clipRectMargin, clone, contains, deleteHandle, deletePoint, drawPixels, enableSubPixelResolution, exitConstructingMode, fitSpline, fitSpline, fitSplineForStraightening, getAngle, getClosestPoint, getConvexHull, getDebugInfo, getDrawOffset, getFloatPolygon, getInterpolatedPolygon, getMask, getNCoordinates, getNonSplineCoordinates, getNonSplineFloatPolygon, getPolygon, getUncalibratedLength, getXCoordinates, getYCoordinates, isSplineFit, mouseDownInHandle, mouseMoved, removeSplineFit, resetBoundingRect, setDrawOffset, setLocation, size, updatePolygon, wipeBack
-
Methods inherited from class ij.gui.Roi
abortPaste, addRoiListener, copyAttributes, drawOverlay, drawPixels, endPaste, equals, getAngle, getBoundingRect, getBounds, getColor, getContainedFloatPoints, getContainedPoints, getContourCentroid, getCornerDiameter, getCPosition, getCurrentPasteMode, getDefaultFillColor, getFeretsDiameter, getFillColor, getFloatAngle, getFloatBounds, getFloatHeight, getFloatWidth, getHashCode, getImage, getImageID, getInterpolatedPolygon, getInterpolatedPolygon, getMagnification, getName, getPasteMode, getPosition, getProperties, getProperty, getPropertyCount, getPrototypeOverlay, getRotationCenter, getRoundRectArcSize, getScaledStroke, getState, getStatistics, getStroke, getStrokeColor, getStrokeWidth, getTPosition, getType, getTypeAsString, getXBase, getYBase, getZPosition, handleMouseDown, handleMouseDrag, hasHyperStackPosition, isActiveOverlayRoi, isArea, isCursor, isDrawingTool, isLine, isVisible, iterator, lineCircleIntersection, mouseDragged, mouseReleased, notifyListeners, nudge, nudgeCorner, removeRoiListener, screenX, screenXD, screenY, screenYD, setColor, setCornerDiameter, setDefaultFillColor, setFillColor, setFlattenScale, setIgnoreClipRect, setImage, setInstanceColor, setIsCursor, setLineWidth, setLocation, setName, setNonScalable, setPasteMode, setPosition, setPosition, setPosition, setProperties, setProperty, setPrototypeOverlay, setRotationCenter, setRoundRectArcSize, setStroke, setStrokeColor, setStrokeWidth, setStrokeWidth, showStatus, startPaste, temporarilyHide, toFloat, toInt, toInt, toIntR, toString, update, updateClipRect, updateWideLine
-
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
EllipseRoi
public EllipseRoi(double x1, double y1, double x2, double y2, double aspectRatio)
-
EllipseRoi
public EllipseRoi(int sx, int sy, ImagePlus imp)
-
-
Method Detail
-
draw
public void draw(Graphics g)
- Overrides:
draw
in classPolygonRoi
-
grow
protected void grow(int sx, int sy)
- Overrides:
grow
in classPolygonRoi
-
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 classPolygonRoi
-
moveHandle
protected void moveHandle(int sx, int sy)
- Overrides:
moveHandle
in classPolygonRoi
-
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.- Overrides:
isHandle
in classPolygonRoi
-
getLength
public double getLength()
Returns the perimeter of this ellipse.- Overrides:
getLength
in classPolygonRoi
-
getParams
public double[] getParams()
Returns x1, y1, x2, y2 and aspectRatio as a 5 element array.
-
getFeretValues
public double[] getFeretValues()
Description copied from class:Roi
Caculates "Feret" (maximum caliper width), "FeretAngle" and "MinFeret" (minimum caliper width), "FeretX" and "FeretY".- Overrides:
getFeretValues
in classRoi
-
subPixelResolution
public boolean subPixelResolution()
Always returns true.- Overrides:
subPixelResolution
in classPolygonRoi
-
-