ij.gui
Class EllipseRoi

java.lang.Object
  extended by ij.gui.AbstractRoi
      extended by ij.gui.AttributeRoi
          extended by ij.gui.Roi
              extended by ij.gui.PolygonRoi
                  extended by 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

Field Summary
 
Fields inherited from class ij.gui.Roi
onePixelWide, previousRoi, roundRect
 
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
 
Constructor Summary
EllipseRoi(double x1, double y1, double x2, double y2, double aspectRatio)
           
EllipseRoi(int sx, int sy, ImagePlus imp)
           
 
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.
 int isHandle(int sx, int sy)
          Returns a handle number if the specified screen coordinates are inside or near a handle, otherwise returns -1.
 
Methods inherited from class ij.gui.PolygonRoi
clone, contains, deleteHandle, drawPixels, exitConstructingMode, fitSpline, fitSpline, fitSplineForStraightening, getAngle, getConvexHull, getDrawOffset, getFloatPolygon, getMask, getNCoordinates, getNonSplineCoordinates, getNonSplineFloatCoordinates, getPolygon, getUncalibratedLength, getXCoordinates, getYCoordinates, isSplineFit, removeSplineFit, setDrawOffset, subPixelResolution
 
Methods inherited from class ij.gui.Roi
abortPaste, drawfillOverlay, drawHandle, drawOverlay, drawPixels, drawPixels, drawRoiHandle, drawStroke, endPaste, equals, fillRoiHandle, getBoundingRect, getBounds, getCornerDiameter, getCurrentPasteMode, getFloatBounds, getHandleSize, getPasteMode, getPrototypeOverlay, getRoundRectArcSize, getState, getTypeAsString, isArea, isDrawingTool, isLine, isVisible, nudge, nudgeCorner, setCornerDiameter, setImage, setInstanceColor, setLineWidth, setLocation, setNonScalable, setPasteMode, setPrototypeOverlay, setRoundRectArcSize, startPaste, temporarilyHide, toFloat, toInt, toInt, toIntR, toString, update, 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
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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(java.awt.Graphics g)
Specified by:
draw in interface RoiBeans
Overrides:
draw 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