|
||||||||||
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 | |
---|---|
protected double |
asp_bk
|
protected boolean |
aspect
|
protected ImageProcessor |
cachedMask
|
protected boolean |
center
|
protected ImagePlus |
clipboard
|
protected int |
clipHeight
|
protected int |
clipWidth
|
protected int |
clipX
|
protected int |
clipY
|
protected boolean |
constrain
|
protected static java.awt.Color |
defaultFillColor
|
protected java.awt.Color |
handleColor
|
protected ImageCanvas |
ic
|
protected java.awt.Color |
instanceColor
|
protected static int |
lineWidth
|
protected double |
mag
|
protected boolean |
nonScalable
|
protected int |
oldHeight
|
protected int |
oldWidth
|
protected int |
oldX
|
protected int |
oldY
|
static java.awt.BasicStroke |
onePixelWide
|
protected boolean |
overlay
|
protected static int |
pasteMode
|
static Roi |
previousRoi
|
protected boolean |
updateFullWindow
|
Fields inherited from class ij.gui.AttributeRoi |
---|
fillColor, imp, ROIColor, stroke, strokeColor, type, wideLine, xMax, yMax |
Fields inherited from interface ij.gui.RoiConstance |
---|
ADD_TO_ROI, ANGLE, COMPOSITE, CONSTRUCTING, FREELINE, FREEROI, HANDLE_SIZE, LINE, MOVING, MOVING_HANDLE, NO_MODS, NORMAL, NOT_PASTING, OVAL, POINT, POLYGON, POLYLINE, RECTANGLE, RESIZING, SUBTRACT_FROM_ROI, TRACED_ROI |
Constructor Summary | |
---|---|
RoundRectangleRoi(double x,
double y,
double width,
double height)
Creates a rectangular ROI using double arguments. |
Method Summary | |
---|---|
protected int |
clipRectMargin()
|
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. |
protected double |
getMagnification()
|
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(). |
protected java.awt.BasicStroke |
getScaledStroke()
Returns the Stroke used to draw this ROI, or null if no Stroke is used. |
int |
getState()
Returns the ID of the image associated with this ROI. |
int |
getType()
|
java.lang.String |
getTypeAsString()
Convenience method that converts Roi type to a human-readable form. |
protected void |
grow(int sx,
int sy)
|
protected void |
handleMouseDown(int sx,
int sy)
|
protected void |
handleMouseDrag(int sx,
int sy,
int flags)
|
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. |
protected void |
mouseDownInHandle(int handle,
int sx,
int sy)
|
protected void |
moveHandle(int sx,
int sy)
|
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. |
protected int |
screenX(int ox)
|
protected int |
screenXD(double ox)
|
protected int |
screenY(int oy)
|
protected int |
screenYD(double oy)
|
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(). |
protected void |
showStatus()
|
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. |
protected void |
updateClipRect()
|
void |
updateWideLine(float width)
|
Methods inherited from class ij.gui.Roi |
---|
abortPaste, endPaste, handleMouseUp, setCornerDiameter, startPaste, temporarilyHide, toFloat, toInt, toInt, toIntR |
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 |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static Roi previousRoi
public static final java.awt.BasicStroke onePixelWide
protected static int pasteMode
protected static int lineWidth
protected static java.awt.Color defaultFillColor
protected ImageCanvas ic
protected int oldX
protected int oldY
protected int oldWidth
protected int oldHeight
protected int clipX
protected int clipY
protected int clipWidth
protected int clipHeight
protected ImagePlus clipboard
protected boolean constrain
protected boolean center
protected boolean aspect
protected boolean updateFullWindow
protected double mag
protected double asp_bk
protected ImageProcessor cachedMask
protected java.awt.Color handleColor
protected java.awt.Color instanceColor
protected boolean nonScalable
protected boolean overlay
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()
Roi
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
protected void grow(int sx, int sy)
grow
in class Roi
protected void moveHandle(int sx, int sy)
moveHandle
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
protected void updateClipRect()
updateClipRect
in class Roi
protected int clipRectMargin()
clipRectMargin
in class Roi
protected void handleMouseDrag(int sx, int sy, int flags)
handleMouseDrag
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
protected void mouseDownInHandle(int handle, int sx, int sy)
mouseDownInHandle
in class Roi
protected void handleMouseDown(int sx, int sy)
handleMouseDown
in class Roi
public void update(boolean add, boolean subtract)
update
in interface RoiBeans
update
in class Roi
protected void showStatus()
showStatus
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
protected java.awt.BasicStroke getScaledStroke()
getScaledStroke
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
protected double getMagnification()
getMagnification
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
protected int screenX(int ox)
screenX
in class Roi
protected int screenY(int oy)
screenY
in class Roi
protected int screenXD(double ox)
screenXD
in class Roi
protected int screenYD(double oy)
screenYD
in class Roi
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |