public class EllipseRoi extends PolygonRoi
maxPoints, nPoints, splinePoints, xp, xp2, xpf, xSpline, yp, yp2, ypf, ySpline
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 and Description |
---|
EllipseRoi(double x1,
double y1,
double x2,
double y2,
double aspectRatio) |
EllipseRoi(int sx,
int sy,
ImagePlus imp) |
Modifier and Type | Method and Description |
---|---|
void |
draw(java.awt.Graphics g) |
double[] |
getFeretValues()
Returns an array with the following values:
[0] "Feret" (maximum caliper width) [1] "FeretAngle" (angle of diameter with maximum caliper width, between 0 and 180 deg) [2] "MinFeret" (minimum caliper width) [3][4] , "FeretX" and "FeretY", the X and Y coordinates of the starting point (leftmost point) of the maximum-caliper-width diameter. |
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) |
void |
nudgeCorner(int key)
Nudge lower right corner of rectangular and oval ROIs by
one pixel based on arrow key press.
|
void |
showStatus() |
boolean |
subPixelResolution()
Always returns true.
|
addOffset, clipRectMargin, clone, contains, containsPoint, deleteHandle, deletePoint, drawPixels, enableSubPixelResolution, exitConstructingMode, fitSpline, fitSpline, fitSplineForStraightening, getAngle, getClosestPoint, getDebugInfo, getEquidistantPoints, getFloatPolygon, getInterpolatedPolygon, getMask, getNCoordinates, getNonSplineCoordinates, getNonSplineFloatPolygon, getPolygon, getUncalibratedLength, getXCoordinates, getYCoordinates, isSplineFit, mouseDownInHandle, mouseMoved, removeSplineFit, resetBoundingRect, setLocation, size, updatePolygon, wipeBack
abortModification, abortPaste, addRoiListener, convertLineToArea, convertToPolygon, copyAttributes, create, create, drawOverlay, drawPixels, endPaste, equals, getAngle, getAntiAlias, getBoundingRect, getBounds, getColor, getContainedFloatPoints, getContainedPoints, getContourCentroid, getConvexHull, getCornerDiameter, getCPosition, getCurrentPasteMode, getDefaultFillColor, getDefaultGroup, getDefaultHandleSize, getDefaultStrokeWidth, getDrawOffset, getFeretsDiameter, getFillColor, getFloatAngle, getFloatBounds, getFloatConvexHull, getFloatHeight, getFloatPolygon, getFloatWidth, getGroup, getHandleSize, getHashCode, getImage, getImageID, getInterpolatedPolygon, getInterpolatedPolygon, getInverse, getMagnification, getName, getPasteMode, getPosition, getProperties, getProperty, getPropertyCount, getPrototypeOverlay, getRotationCenter, getRoundRectArcSize, getScaledStroke, getScaleStrokeWidth, getState, getStatistics, getStroke, getStrokeColor, getStrokeWidth, getTPosition, getType, getTypeAsString, getXBase, getYBase, getZPosition, handleMouseDown, handleMouseDrag, hasHyperStackPosition, isActiveOverlayRoi, isArea, isCursor, isDrawingTool, isInteger, isLine, isLineOrPoint, isVisible, iterator, lineCircleIntersection, magnificationForSubPixel, magnificationForSubPixel, mouseDragged, mouseReleased, notifyListeners, nudge, offScreenX, offScreenXD, offScreenY, offScreenYD, removeRoiListener, resetDefaultHandleSize, screenX, screenXD, screenY, screenYD, setAntiAlias, setBounds, setColor, setCornerDiameter, setDefaultColor, setDefaultFillColor, setDefaultGroup, setDefaultStrokeWidth, setDrawOffset, setFillColor, setFlattenScale, setGroup, setHandleSize, setIgnoreClipRect, setImage, setInstanceColor, setIsCursor, setLineWidth, setLocation, setName, setNonScalable, setPasteMode, setPosition, setPosition, setPosition, setProperties, setProperty, setPrototypeOverlay, setRenderingHint, setRotationCenter, setRoundRectArcSize, setStroke, setStrokeColor, setStrokeWidth, setStrokeWidth, setUnscalableStrokeWidth, startPaste, temporarilyHide, toFloat, toInt, toInt, toIntR, toString, update, updateClipRect, updateWideLine, useLineSubpixelConvention
public EllipseRoi(double x1, double y1, double x2, double y2, double aspectRatio)
public EllipseRoi(int sx, int sy, ImagePlus imp)
public void draw(java.awt.Graphics g)
draw
in class PolygonRoi
protected void grow(int sx, int sy)
grow
in class PolygonRoi
public void showStatus()
showStatus
in class Roi
public void nudgeCorner(int key)
Roi
nudgeCorner
in class Roi
protected void handleMouseUp(int screenX, int screenY)
PolygonRoi
handleMouseUp
in class PolygonRoi
protected void moveHandle(int sx, int sy)
moveHandle
in class PolygonRoi
public int isHandle(int sx, int sy)
PolygonRoi
isHandle
in class PolygonRoi
public double getLength()
getLength
in class PolygonRoi
public double[] getParams()
public double[] getFeretValues()
Roi
The following array elements are end points of the maximum and minimum caliper diameter,
in unscaled image pixel coordinates:
[8][9] "FeretX1", "FeretY1"; unscaled versions of "FeretX" and "FeretY"
(subclasses may use any end of the diameter, not necessarily the left one)
[10][11] "FeretX2", "FeretY2", end point of the maxium-caliper-width diameter.
Both of these points are vertices of the convex hull.
The final four array elements are the starting and end points of the minimum caliper width,
[12],[13] "MinFeretX", "MinFeretY", and
[14],[15] "MinFeretX2", "MinFeretY2". These two pooints are not sorted by x,
but the first point point (MinFeretX, MinFeretY) is guaranteed to be a vertex of the convex hull,
while second point (MinFeretX2, MinFeretY2) usually is not a vertex point but at a
boundary line of the convex hull.
getFeretValues
in class Roi
public boolean subPixelResolution()
subPixelResolution
in class Roi