|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ij.gui.Roi
public class Roi
A rectangular region of interest and superclass for the other ROI classes.
Field Summary | |
---|---|
static int |
ANGLE
|
protected ImageProcessor |
cachedMask
|
protected boolean |
center
|
protected ImagePlus |
clipboard
|
protected int |
clipHeight
|
protected int |
clipWidth
|
protected int |
clipX
|
protected int |
clipY
|
static int |
COMPOSITE
|
protected boolean |
constrain
|
static int |
CONSTRUCTING
|
static int |
FREELINE
|
static int |
FREEROI
|
static int |
HANDLE_SIZE
|
protected java.awt.Color |
handleColor
|
protected ImageCanvas |
ic
|
protected ImagePlus |
imp
|
static int |
LINE
|
protected double |
mag
|
static int |
MOVING
|
static int |
MOVING_HANDLE
|
protected java.lang.String |
name
|
static int |
NORMAL
|
static int |
NOT_PASTING
|
protected int |
oldHeight
|
protected int |
oldWidth
|
protected int |
oldX
|
protected int |
oldY
|
static int |
OVAL
|
protected static int |
pasteMode
|
static int |
POINT
|
static int |
POLYGON
|
static int |
POLYLINE
|
static Roi |
previousRoi
|
static int |
RECTANGLE
|
static int |
RESIZING
|
protected static java.awt.Color |
ROIColor
|
static int |
TRACED_ROI
|
protected int |
type
|
protected boolean |
updateFullWindow
|
protected int |
xMax
|
protected int |
yMax
|
Constructor Summary | |
---|---|
Roi(int sx,
int sy,
ImagePlus imp)
Starts the process of creating a user-defined rectangular Roi, where sx and sy are the starting screen coordinates. |
|
Roi(int x,
int y,
int width,
int height)
Creates a new rectangular Roi. |
|
Roi(int x,
int y,
int width,
int height,
ImagePlus imp)
Obsolete |
|
Roi(java.awt.Rectangle r)
Creates a new rectangular Roi. |
Method Summary | |
---|---|
void |
abortPaste()
|
java.lang.Object |
clone()
Returns a copy of this roi. |
boolean |
contains(int x,
int y)
|
void |
draw(java.awt.Graphics g)
|
void |
drawPixels()
Obsolete, use drawPixels(ImageProcessor) |
void |
drawPixels(ImageProcessor ip)
Draws the selection outline on the specified ImageProcessor. |
void |
endPaste()
|
double |
getAngle(int x1,
int y1,
int x2,
int y2)
Returns the angle in degrees between the specified line and a horizontal line. |
java.awt.Rectangle |
getBoundingRect()
This obsolete method has been replaced by getBounds(). |
java.awt.Rectangle |
getBounds()
Return this selection's bounding rectangle. |
static java.awt.Color |
getColor()
Returns the color used for drawing ROI outlines. |
static int |
getCurrentPasteMode()
Returns the current paste transfer mode. |
double |
getFeretsDiameter()
Returns Feret's diameter, the greatest distance between any two points along the ROI boundary. |
double |
getLength()
Returns the perimeter length. |
ImageProcessor |
getMask()
|
java.lang.String |
getName()
Returns the name of this ROI, or null. |
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. |
int |
getState()
|
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)
|
protected void |
handleMouseUp(int screenX,
int screenY)
|
boolean |
isArea()
Returns true if this is an area selection. |
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. |
static void |
setColor(java.awt.Color c)
Sets the color used for ROI outline to the specified value. |
void |
setImage(ImagePlus imp)
|
void |
setLocation(int x,
int y)
|
void |
setName(java.lang.String name)
Sets the name of this ROI. |
static void |
setPasteMode(int transferMode)
Sets the Paste transfer mode. |
protected void |
showStatus()
|
void |
startPaste(ImagePlus clipboard)
|
java.lang.String |
toString()
|
void |
update(boolean add,
boolean subtract)
If 'add' is true, adds this selection to the previous one. |
protected void |
updateClipRect()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int CONSTRUCTING
public static final int MOVING
public static final int RESIZING
public static final int NORMAL
public static final int MOVING_HANDLE
public static final int RECTANGLE
public static final int OVAL
public static final int POLYGON
public static final int FREEROI
public static final int TRACED_ROI
public static final int LINE
public static final int POLYLINE
public static final int FREELINE
public static final int ANGLE
public static final int COMPOSITE
public static final int POINT
public static final int HANDLE_SIZE
public static final int NOT_PASTING
public static Roi previousRoi
protected static java.awt.Color ROIColor
protected static int pasteMode
protected int type
protected int xMax
protected int yMax
protected ImagePlus imp
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 updateFullWindow
protected double mag
protected java.lang.String name
protected ImageProcessor cachedMask
protected java.awt.Color handleColor
Constructor Detail |
---|
public Roi(int x, int y, int width, int height)
public Roi(java.awt.Rectangle r)
public Roi(int sx, int sy, ImagePlus imp)
public Roi(int x, int y, int width, int height, ImagePlus imp)
Method Detail |
---|
public void setLocation(int x, int y)
public void setImage(ImagePlus imp)
public int getType()
public int getState()
public double getLength()
public double getFeretsDiameter()
public java.awt.Rectangle getBounds()
public java.awt.Rectangle getBoundingRect()
public java.awt.Polygon getPolygon()
ImageProcessor.setRoi(java.awt.Rectangle)
,
ImageProcessor.drawPolygon(java.awt.Polygon)
,
ImageProcessor.fillPolygon(java.awt.Polygon)
public java.lang.Object clone()
clone
in class java.lang.Object
protected void grow(int sx, int sy)
protected void moveHandle(int sx, int sy)
public void nudge(int key)
public void nudgeCorner(int key)
protected void updateClipRect()
protected void handleMouseDrag(int sx, int sy, int flags)
public void draw(java.awt.Graphics g)
public void drawPixels()
public void drawPixels(ImageProcessor ip)
ImageProcessor.setColor(java.awt.Color)
,
ImageProcessor.setLineWidth(int)
public boolean contains(int x, int y)
public int isHandle(int sx, int sy)
protected void mouseDownInHandle(int handle, int sx, int sy)
protected void handleMouseDown(int sx, int sy)
protected void handleMouseUp(int screenX, int screenY)
public void update(boolean add, boolean subtract)
protected void showStatus()
public ImageProcessor getMask()
public void startPaste(ImagePlus clipboard)
public void endPaste()
public void abortPaste()
public double getAngle(int x1, int y1, int x2, int y2)
public static java.awt.Color getColor()
public static void setColor(java.awt.Color c)
public java.lang.String getName()
public void setName(java.lang.String name)
public static void setPasteMode(int transferMode)
Blitter
public int getPasteMode()
Blitter
public static int getCurrentPasteMode()
public boolean isArea()
public boolean isLine()
public java.lang.String getTypeAsString()
public boolean isVisible()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |