ij.gui
Class OvalRoi

java.lang.Object
  extended by ij.gui.Roi
      extended by ij.gui.OvalRoi
All Implemented Interfaces:
Serializable, Cloneable

public class OvalRoi
extends Roi

Oval region of interest

See Also:
Serialized Form

Field Summary
 
Fields inherited from class ij.gui.Roi
ANGLE, asp_bk, aspect, cachedMask, center, clipboard, clipHeight, clipWidth, clipX, clipY, COMPOSITE, constrain, CONSTRUCTING, defaultFillColor, fillColor, 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
OvalRoi(double x, double y, double width, double height)
          Creates an OvalRoi using double arguments.
OvalRoi(int x, int y, ImagePlus imp)
          Starts the process of creating a user-defined OvalRoi.
OvalRoi(int x, int y, int width, int height)
          Creates an OvalRoi.
OvalRoi(int x, int y, int width, int height, ImagePlus imp)
          Deprecated.  
 
Method Summary
 boolean contains(int ox, int oy)
          Tests if the specified point is inside the boundary of this OvalRoi.
 void draw(Graphics g)
           
 void drawPixels(ImageProcessor ip)
          Draws an outline of this OvalRoi on the image.
 FloatPolygon getFloatPolygon()
          Returns this OvalRoi as a FloatPolygon.
 double getLength()
          Returns the perimeter length.
 ImageProcessor getMask()
          Always returns null for rectangular Roi's
 Polygon getPolygon()
          Returns this OvalRoi as a Polygon.
 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.Roi
abortPaste, clipRectMargin, clone, copyAttributes, drawOverlay, drawPixels, enableSubPixelResolution, endPaste, equals, getAngle, getAngle, getBoundingRect, getBounds, getColor, getConvexHull, getCornerDiameter, getCPosition, getCurrentPasteMode, getDebugInfo, getDefaultFillColor, getDrawOffset, getFeretsDiameter, getFeretValues, getFillColor, getFloatAngle, getFloatBounds, getFloatHeight, getFloatWidth, getHashCode, getImage, getImageID, getInterpolatedPolygon, getInterpolatedPolygon, getInterpolatedPolygon, getMagnification, getName, getPasteMode, getPosition, getProperties, getProperty, getPropertyCount, getPrototypeOverlay, getRoundRectArcSize, getScaledStroke, getState, getStroke, getStrokeColor, getStrokeWidth, getTPosition, getType, getTypeAsString, getXBase, getYBase, getZPosition, grow, handleMouseDown, handleMouseDrag, handleMouseUp, isActiveOverlayRoi, isArea, isDrawingTool, isLine, isVisible, lineCircleIntersection, mouseDownInHandle, mouseDragged, mouseMoved, mouseReleased, nudge, nudgeCorner, screenX, screenXD, screenY, screenYD, setColor, setCornerDiameter, setDefaultFillColor, setDrawOffset, setFillColor, setIgnoreClipRect, setImage, setInstanceColor, setLineWidth, setLocation, setLocation, setName, setNonScalable, setPasteMode, setPosition, setPosition, setProperties, setProperty, setPrototypeOverlay, setRoundRectArcSize, setStroke, setStrokeColor, setStrokeWidth, setStrokeWidth, showStatus, startPaste, subPixelResolution, temporarilyHide, toFloat, toInt, toInt, toIntR, toString, update, updateClipRect, updateWideLine
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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

public OvalRoi(int x,
               int y,
               ImagePlus imp)
Starts the process of creating a user-defined OvalRoi.


OvalRoi

public OvalRoi(int x,
               int y,
               int width,
               int height,
               ImagePlus imp)
Deprecated. 

Method Detail

moveHandle

protected void moveHandle(int sx,
                          int sy)
Overrides:
moveHandle in class Roi

draw

public void draw(Graphics g)
Overrides:
draw in class Roi

drawPixels

public void drawPixels(ImageProcessor ip)
Draws an outline of this OvalRoi on the image.

Overrides:
drawPixels in class Roi
See Also:
ImageProcessor.setColor(java.awt.Color), ImageProcessor.setLineWidth(int)

getPolygon

public Polygon getPolygon()
Returns this OvalRoi as a Polygon.

Overrides:
getPolygon in class Roi
See Also:
ImageProcessor.setRoi(java.awt.Rectangle), ImageProcessor.drawPolygon(java.awt.Polygon), ImageProcessor.fillPolygon(java.awt.Polygon)

getFloatPolygon

public FloatPolygon getFloatPolygon()
Returns this OvalRoi as a FloatPolygon.

Overrides:
getFloatPolygon in class Roi

contains

public boolean contains(int ox,
                        int oy)
Tests if the specified point is inside the boundary of this OvalRoi. Authors: Barry DeZonia and Michael Schmid

Overrides:
contains in class Roi

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.

Overrides:
isHandle in class Roi

getMask

public ImageProcessor getMask()
Description copied from class: Roi
Always returns null for rectangular Roi's

Overrides:
getMask in class Roi

getLength

public double getLength()
Returns the perimeter length.

Overrides:
getLength in class Roi


Copyright © 1997–2014 NIH. All rights reserved.