java.lang.Object
ij.gui.Roi
ij.gui.OvalRoi
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Point>
Oval region of interest
- See Also:
-
Field Summary
Fields inherited from class ij.gui.Roi
ANGLE, asp_bk, aspect, cachedMask, center, clipboard, clipHeight, clipWidth, clipX, clipY, COMPOSITE, constrain, CONSTRUCTING, defaultColor, defaultFillColor, FERET_ARRAY_POINTOFFSET, FERET_ARRAYSIZE, 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 -
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(int ox, int oy) Tests whether the center of the specified pixel is inside the boundary of this OvalRoi.boolean
containsPoint
(double x, double y) Returns whether coordinate (x,y) is contained in the Roi.static OvalRoi
create
(double x, double y, double width, double height) Creates an OvalRoi.void
void
Draws an outline of this OvalRoi on the image.double[]
Feret (caliper width) values, see ij.gui.Roi.getFeretValues().Returns this OvalRoi as a FloatPolygon approximating the ellipse.Returns this OvalRoi as a 4 point FloatPolygon (x,y,w,h).double
Returns the perimeter length using Ramanujan's approximation for the circumference of an ellipsegetMask()
Always returns null for rectangular Roi'sReturns this OvalRoi as a Polygon that outlines the mask, in image pixel coordinates.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) int
size()
Returns the number of corner points in the mask of this selection; equivalent to getPolygon().npoints.Methods inherited from class ij.gui.Roi
abortModification, abortPaste, addRoiListener, clipRectMargin, clone, convertLineToArea, convertToPolygon, copyAttributes, create, drawOverlay, drawPixels, enableSubPixelResolution, endPaste, equals, getAngle, getAngle, getAntiAlias, getBoundingRect, getBounds, getColor, getContainedFloatPoints, getContainedPoints, getContourCentroid, getConvexHull, getCornerDiameter, getCPosition, getCurrentPasteMode, getDebugInfo, getDefaultFillColor, getDefaultGroup, getDefaultHandleSize, getDefaultStrokeWidth, getDrawOffset, getFeretsDiameter, getFillColor, getFloatAngle, getFloatBounds, getFloatConvexHull, getFloatHeight, getFloatPolygon, getFloatWidth, getGroup, getGroupName, getGroupNames, getHandleSize, getHashCode, getImage, getImageID, getInterpolatedPolygon, getInterpolatedPolygon, getInterpolatedPolygon, getInverse, getListeners, getMagnification, getName, getPasteMode, getPosition, getPreviousRoi, getProperties, getProperty, getPropertyCount, getPrototypeOverlay, getRotationCenter, getRoundRectArcSize, getScaledStroke, getScaleStrokeWidth, getState, getStatistics, getStroke, getStrokeColor, getStrokeWidth, getTPosition, getType, getTypeAsString, getXBase, getYBase, getZPosition, grow, handleMouseDown, handleMouseDrag, handleMouseUp, hasHyperStackPosition, isActiveOverlayRoi, isArea, isCursor, isDrawingTool, isInteger, isLine, isLineOrPoint, isVisible, iterator, lineCircleIntersection, magnificationForSubPixel, magnificationForSubPixel, mouseDownInHandle, mouseDragged, mouseMoved, mouseReleased, notifyListeners, nudge, nudgeCorner, offScreenX, offScreenXD, offScreenY, offScreenYD, removeRoiListener, resetDefaultHandleSize, saveGroupNames, screenX, screenXD, screenY, screenYD, setAntiAlias, setBounds, setColor, setCornerDiameter, setDefaultColor, setDefaultFillColor, setDefaultGroup, setDefaultStrokeWidth, setDrawOffset, setFillColor, setFlattenScale, setGroup, setGroupName, setGroupNames, setHandleSize, setIgnoreClipRect, setImage, setInstanceColor, setIsCursor, setLineWidth, setLocation, setLocation, setName, setNonScalable, setPasteMode, setPosition, setPosition, setPosition, setPreviousRoi, setProperties, setProperty, setPrototypeOverlay, setRenderingHint, setRotationCenter, setRoundRectArcSize, setStroke, setStrokeColor, setStrokeWidth, setStrokeWidth, setUnscalableStrokeWidth, showStatus, startPaste, subPixelResolution, temporarilyHide, toFloat, toInt, toInt, toIntR, toString, update, updateClipRect, updateWideLine, useLineSubpixelConvention, xor
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 Details
-
OvalRoi
public OvalRoi(int x, int y, int width, int height) Creates an OvalRoi. -
OvalRoi
public OvalRoi(double x, double y, double width, double height) Creates an OvalRoi using double arguments. -
OvalRoi
Starts the process of creating a user-defined OvalRoi. -
OvalRoi
Deprecated.
-
-
Method Details
-
create
Creates an OvalRoi. -
getFeretValues
public double[] getFeretValues()Feret (caliper width) values, see ij.gui.Roi.getFeretValues(). The superclass method of calculating this via the convex hull is less accurate for the MinFeret because it does not get the exact minor axis.- Overrides:
getFeretValues
in classRoi
-
moveHandle
protected void moveHandle(int sx, int sy) - Overrides:
moveHandle
in classRoi
-
draw
-
drawPixels
Draws an outline of this OvalRoi on the image.- Overrides:
drawPixels
in classRoi
- See Also:
-
getPolygon
Returns this OvalRoi as a Polygon that outlines the mask, in image pixel coordinates. -
getFloatPolygon
Returns this OvalRoi as a FloatPolygon approximating the ellipse.- Overrides:
getFloatPolygon
in classRoi
-
getFloatPolygon4
Returns this OvalRoi as a 4 point FloatPolygon (x,y,w,h). -
size
public int size()Returns the number of corner points in the mask of this selection; equivalent to getPolygon().npoints. -
contains
public boolean contains(int ox, int oy) Tests whether the center of the specified pixel is inside the boundary of this OvalRoi. Authors: Barry DeZonia and Michael Schmid -
containsPoint
public boolean containsPoint(double x, double y) Returns whether coordinate (x,y) is contained in the Roi. Note that the coordinate (0,0) is the top-left corner of pixel (0,0). Use contains(int, int) to determine whether a given pixel is contained in the Roi.- Overrides:
containsPoint
in classRoi
-
isHandle
public int isHandle(int sx, int sy) Returns a handle number if the specified screen coordinates are inside or near a handle, otherwise returns -1. -
getMask
Description copied from class:Roi
Always returns null for rectangular Roi's -
getLength
public double getLength()Returns the perimeter length using Ramanujan's approximation for the circumference of an ellipse
-