|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectij.gui.AbstractRoi
ij.gui.AttributeRoi
ij.gui.Roi
ij.gui.RoundRectangleRoi
public class RoundRectangleRoi
A rectangular region of interest and superclass for the other ROI classes.
Field Summary | |
---|---|
static java.awt.BasicStroke |
onePixelWide
|
static Roi |
previousRoi
|
Fields inherited from class ij.gui.Roi |
---|
roundRect |
Fields inherited from interface ij.gui.RoiConstance |
---|
ADD_TO_ROI, ANGLE, COMPOSITE, CONSTRUCTING, DRAW_HANDLE, DUPLICATE_HANDLE, EVT_HANDLE_SIZE, FILL_HANDLE, FREELINE, FREEROI, HANDLE_SIZE, LINE, MAG_HANDLE, MOVING, MOVING_HANDLE, MOVING_ROUNDRECT_HANDLE, NO_MODS, NORMAL, NOT_PASTING, OVAL, POINT, POLYGON, POLYLINE, RECTANGLE, RESIZING, SUBTRACT_FROM_ROI, TRACED_ROI, UNDO_HANDLE |
Constructor Summary | |
---|---|
RoundRectangleRoi(double x,
double y,
double width,
double height)
Creates a rectangular ROI using double arguments. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a copy of this roi. |
boolean |
contains(int x,
int y)
|
void |
draw(java.awt.Graphics g)
|
void |
drawHandle(java.awt.Graphics g,
int x,
int y)
|
void |
drawOverlay(java.awt.Graphics g)
|
void |
drawPixels()
Deprecated. replaced by drawPixels(ImageProcessor) |
void |
drawPixels(ImageProcessor ip)
Draws the selection outline on the specified ImageProcessor. |
void |
drawPixels(ImageProcessor ip,
java.awt.geom.GeneralPath path)
Draws the selection outline on the specified ImageProcessor. |
boolean |
equals(java.lang.Object obj)
Checks whether two rectangles are equal. |
java.awt.Rectangle |
getBoundingRect()
Deprecated. replaced by getBounds() |
java.awt.Rectangle |
getBounds()
Return this selection's bounding rectangle. |
int |
getCornerDiameter()
Returns the rounded rectangle corner diameter (pixels). |
static int |
getCurrentPasteMode()
Returns the current paste transfer mode. |
boolean |
getDrawOffset()
Returns true if this is a PolygonRoi that supports sub-pixel resolution and polygons are drawn on zoomed images offset down and to the right by 0.5 pixels.. |
java.awt.geom.Rectangle2D.Double |
getFloatBounds()
Return this selection's bounding rectangle. |
FloatPolygon |
getFloatPolygon()
|
int |
getHandleSize()
|
ImagePlus |
getImage()
Returns the ImagePlus associated with this ROI, or null. |
int |
getImageID()
Returns the ID of the image associated with this ROI. |
double |
getLength()
Returns the perimeter length. |
ImageProcessor |
getMask()
Always returns null for rectangular Roi's |
int |
getPasteMode()
Returns the current paste transfer mode, or NOT_PASTING (-1) if no paste operation is in progress. |
java.awt.Polygon |
getPolygon()
Returns the outline of this selection as a Polygon, or null if this is a straight line selection. |
Overlay |
getPrototypeOverlay()
|
int |
getRoundRectArcSize()
Obsolete; replaced by getCornerDiameter(). |
int |
getState()
|
int |
getType()
|
java.lang.String |
getTypeAsString()
Convenience method that converts Roi type to a human-readable form. |
boolean |
isArea()
Returns 'true' if this is an area selection. |
boolean |
isDrawingTool()
Returns 'true' if this is an ROI primarily used from drawing (e.g., TextRoi or Arrow). |
int |
isHandle(int sx,
int sy)
Returns a handle number if the specified screen coordinates are inside or near a handle, otherwise returns -1. |
boolean |
isLine()
Returns 'true' if this is a line selection. |
boolean |
isVisible()
Returns true if this ROI is currently displayed on an image. |
void |
nudge(int key)
Nudge ROI one pixel on arrow key press. |
void |
nudgeCorner(int key)
Nudge lower right corner of rectangular and oval ROIs by one pixel based on arrow key press. |
void |
setDrawOffset(boolean drawOffset)
|
void |
setImage(ImagePlus imp)
|
void |
setInstanceColor(java.awt.Color c)
Deprecated. replaced by setStrokeColor() |
void |
setLineWidth(int width)
Deprecated. replaced by setStrokeWidth(int) |
void |
setLocation(int x,
int y)
Set the location of the ROI in image coordinates. |
void |
setNonScalable(boolean nonScalable)
Set 'nonScalable' true to have TextRois in a display list drawn at a fixed location and size. |
static void |
setPasteMode(int transferMode)
Sets the Paste transfer mode. |
void |
setPrototypeOverlay(Overlay overlay)
Returns the frame position of this ROI, or zero if this ROI is not associated with a particular frame. |
void |
setRoundRectArcSize(int cornerDiameter)
Obsolete; replaced by setCornerDiameter(). |
boolean |
subPixelResolution()
Returns true if this is a PolygonRoi that supports sub-pixel resolution. |
java.lang.String |
toString()
|
void |
update(boolean add,
boolean subtract)
If 'add' is true, adds this selection to the previous one. |
void |
updateWideLine(float width)
|
Methods inherited from class ij.gui.Roi |
---|
abortPaste, appRoiHandle, drawfillOverlay, drawRoiHandle, drawStroke, endPaste, fillRoiHandle, magRoiHandle, setCornerDiameter, startPaste, temporarilyHide, toFloat, toInt, toInt, toIntR, undoRoiHandle |
Methods inherited from class ij.gui.AttributeRoi |
---|
copyAttributes, getAngle, getColor, getConvexHull, getCPosition, getDefaultFillColor, getFeretsDiameter, getFeretValues, getFillColor, getName, getPosition, getStroke, getStrokeColor, getStrokeWidth, getTPosition, 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 |
Field Detail |
---|
public static Roi previousRoi
public static final java.awt.BasicStroke onePixelWide
Constructor Detail |
---|
public RoundRectangleRoi(double x, double y, double width, double height)
Method Detail |
---|
public void setLocation(int x, int y)
setLocation
in interface RoiBeans
setLocation
in class Roi
public void setImage(ImagePlus imp)
setImage
in interface RoiBeans
setImage
in class Roi
public ImagePlus getImage()
AttributeRoi
getImage
in interface RoiBeans
getImage
in class AttributeRoi
public int getImageID()
AttributeRoi
getImageID
in interface RoiBeans
getImageID
in class AttributeRoi
public int getType()
getType
in interface RoiBeans
getType
in class AttributeRoi
public int getState()
getState
in interface RoiBeans
getState
in class Roi
public double getLength()
getLength
in interface RoiBeans
getLength
in class Roi
public java.awt.Rectangle getBounds()
getBounds
in interface RoiBeans
getBounds
in class Roi
public java.awt.geom.Rectangle2D.Double getFloatBounds()
getFloatBounds
in interface RoiBeans
getFloatBounds
in class Roi
public java.awt.Rectangle getBoundingRect()
getBoundingRect
in interface RoiBeans
getBoundingRect
in class Roi
public java.awt.Polygon getPolygon()
getPolygon
in interface RoiBeans
getPolygon
in class Roi
ImageProcessor.setRoi(java.awt.Rectangle)
,
ImageProcessor.drawPolygon(java.awt.Polygon)
,
ImageProcessor.fillPolygon(java.awt.Polygon)
public FloatPolygon getFloatPolygon()
getFloatPolygon
in interface RoiBeans
getFloatPolygon
in class Roi
public void nudge(int key)
nudge
in interface RoiBeans
nudge
in class Roi
public void nudgeCorner(int key)
nudgeCorner
in interface RoiBeans
nudgeCorner
in class Roi
public int getHandleSize()
getHandleSize
in interface RoiBeans
getHandleSize
in class Roi
public void draw(java.awt.Graphics g)
draw
in interface RoiBeans
draw
in class Roi
public void drawOverlay(java.awt.Graphics g)
drawOverlay
in interface RoiBeans
drawOverlay
in class Roi
public void drawHandle(java.awt.Graphics g, int x, int y)
drawHandle
in interface RoiBeans
drawHandle
in class Roi
public void drawPixels()
drawPixels
in interface RoiBeans
drawPixels
in class Roi
public void drawPixels(ImageProcessor ip)
drawPixels
in interface RoiBeans
drawPixels
in class Roi
ImageProcessor.setColor(java.awt.Color)
,
ImageProcessor.setLineWidth(int)
public void drawPixels(ImageProcessor ip, java.awt.geom.GeneralPath path)
drawPixels
in class Roi
ImageProcessor.setColor(java.awt.Color)
,
ImageProcessor.setLineWidth(int)
public boolean contains(int x, int y)
contains
in interface RoiBeans
contains
in class Roi
public int isHandle(int sx, int sy)
isHandle
in interface RoiBeans
isHandle
in class Roi
public void update(boolean add, boolean subtract)
update
in interface RoiBeans
update
in class Roi
public ImageProcessor getMask()
getMask
in interface RoiBeans
getMask
in class Roi
public void setInstanceColor(java.awt.Color c)
setInstanceColor
in interface RoiBeans
setInstanceColor
in class Roi
public void setLineWidth(int width)
setLineWidth
in interface RoiBeans
setLineWidth
in class Roi
public void updateWideLine(float width)
updateWideLine
in interface RoiBeans
updateWideLine
in class Roi
public void setNonScalable(boolean nonScalable)
setNonScalable
in interface RoiBeans
setNonScalable
in class Roi
public int getCornerDiameter()
getCornerDiameter
in interface RoiBeans
getCornerDiameter
in class Roi
public void setRoundRectArcSize(int cornerDiameter)
setRoundRectArcSize
in interface RoiBeans
setRoundRectArcSize
in class Roi
public int getRoundRectArcSize()
getRoundRectArcSize
in interface RoiBeans
getRoundRectArcSize
in class Roi
public void setPrototypeOverlay(Overlay overlay)
setPrototypeOverlay
in interface RoiBeans
setPrototypeOverlay
in class Roi
public Overlay getPrototypeOverlay()
getPrototypeOverlay
in interface RoiBeans
getPrototypeOverlay
in class Roi
public static void setPasteMode(int transferMode)
Blitter
public int getPasteMode()
getPasteMode
in interface RoiBeans
getPasteMode
in class Roi
Blitter
public static int getCurrentPasteMode()
public boolean isArea()
isArea
in interface RoiBeans
isArea
in class Roi
public boolean isLine()
isLine
in interface RoiBeans
isLine
in class Roi
public boolean isDrawingTool()
isDrawingTool
in interface RoiBeans
isDrawingTool
in class Roi
public java.lang.String getTypeAsString()
getTypeAsString
in interface RoiBeans
getTypeAsString
in class Roi
public boolean isVisible()
isVisible
in interface RoiBeans
isVisible
in class Roi
public boolean subPixelResolution()
subPixelResolution
in interface RoiBeans
subPixelResolution
in class Roi
public boolean getDrawOffset()
getDrawOffset
in interface RoiBeans
getDrawOffset
in class Roi
public void setDrawOffset(boolean drawOffset)
setDrawOffset
in interface RoiBeans
setDrawOffset
in class Roi
public java.lang.Object clone()
clone
in class Roi
public boolean equals(java.lang.Object obj)
equals
in interface RoiBeans
equals
in class Roi
public java.lang.String toString()
toString
in interface RoiBeans
toString
in class Roi
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |