ij.gui
Class Roi
- java.lang.Object
-
- ij.gui.Roi
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<java.awt.Point>
public class Roi extends java.lang.Object implements java.lang.Cloneable, java.io.Serializable, java.lang.Iterable<java.awt.Point>A rectangular region of interest and superclass for the other ROI classes. This class implementsIterable<Point>and can thus be used to iterate over the contained coordinates. Usage example:Roi roi = ...; for (Point p : roi) { // process p }- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static intANGLEstatic intCOMPOSITEstatic intCONSTRUCTINGstatic intFREELINEstatic intFREEROIstatic intHANDLE_SIZEstatic intLINEstatic intMOVINGstatic intMOVING_HANDLEstatic intNORMALstatic intNOT_PASTINGstatic java.awt.BasicStrokeonePixelWidestatic intOVALstatic intPOINTstatic intPOLYGONstatic intPOLYLINEstatic RoipreviousRoistatic intRECTANGLEstatic intRESIZINGstatic intTRACED_ROI
-
Constructor Summary
Constructors Constructor and Description Roi(double x, double y, double width, double height)Creates a rectangular ROI using double arguments.Roi(double x, double y, double width, double height, int cornerDiameter)Creates a rounded rectangular ROI using double arguments.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 sx, int sy, ImagePlus imp, int cornerDiameter)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 rectangular ROI.Roi(int x, int y, int width, int height, ImagePlus imp)Deprecated.Roi(int x, int y, int width, int height, int cornerDiameter)Creates a new rounded rectangular ROI.Roi(java.awt.Rectangle r)Creates a new rectangular Roi.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description voidabortPaste()static voidaddRoiListener(RoiListener listener)java.lang.Objectclone()Returns a copy of this roi.booleancontains(int x, int y)voidcopyAttributes(Roi roi2)Copy the attributes (outline color, fill color, outline width) of 'roi2' to the this selection.voiddraw(java.awt.Graphics g)voiddrawOverlay(java.awt.Graphics g)voiddrawPixels()Deprecated.replaced by drawPixels(ImageProcessor)voiddrawPixels(ImageProcessor ip)Draws the selection outline on the specified ImageProcessor.voidenableSubPixelResolution()voidendPaste()booleanequals(java.lang.Object obj)Checks whether two rectangles are equal.doublegetAngle()Overridden by PolygonRoi (angle between first two points), TextRoi (text angle) and Line (line angle).doublegetAngle(int x1, int y1, int x2, int y2)Returns the angle in degrees between the specified line and a horizontal line.java.awt.RectanglegetBoundingRect()Deprecated.replaced by getBounds()java.awt.RectanglegetBounds()Return this selection's bounding rectangle.static java.awt.ColorgetColor()Returns the default (global) color used for drawing ROI outlines.FloatPolygongetContainedFloatPoints()Returns the coordinates of the pixels inside this ROI as a FloatPolygon.java.awt.Point[]getContainedPoints()Returns the coordinates of the pixels inside this ROI as an array of Points.double[]getContourCentroid()java.awt.PolygongetConvexHull()intgetCornerDiameter()Returns the rounded rectangle corner diameter (pixels).intgetCPosition()Returns the channel position of this ROI, or zero if this ROI is not associated with a particular channel.static intgetCurrentPasteMode()Returns the current paste transfer mode.java.lang.StringgetDebugInfo()static java.awt.ColorgetDefaultFillColor()booleangetDrawOffset()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..doublegetFeretsDiameter()Returns Feret's diameter, the greatest distance between any two points along the ROI boundary.double[]getFeretValues()Caculates "Feret" (maximum caliper width), "FeretAngle" and "MinFeret" (minimum caliper width), "FeretX" and "FeretY".java.awt.ColorgetFillColor()Returns the fill color used to display this ROI, or null if it is displayed transparently.doublegetFloatAngle(double x1, double y1, double x2, double y2)Returns the angle in degrees between the specified line and a horizontal line.java.awt.geom.Rectangle2D.DoublegetFloatBounds()Return this selection's bounding rectangle.doublegetFloatHeight()FloatPolygongetFloatPolygon()doublegetFloatWidth()intgetHashCode()Returns a hashcode for this Roi that typically changes if it is moved, even though it is still the same object.ImagePlusgetImage()Returns the ImagePlus associated with this ROI, or null.intgetImageID()Returns the ID of the image associated with this ROI.FloatPolygongetInterpolatedPolygon()Returns, as a FloatPolygon, an interpolated version of this selection that has points spaced 1.0 pixel apart.FloatPolygongetInterpolatedPolygon(double interval, boolean smooth)Returns, as a FloatPolygon, an interpolated version of this selection with points spaced 'interval' pixels apart.doublegetLength()Returns the perimeter length.ImageProcessorgetMask()Always returns null for rectangular Roi'sjava.lang.StringgetName()Returns the name of this ROI, or null.intgetPasteMode()Returns the current paste transfer mode, or NOT_PASTING (-1) if no paste operation is in progress.java.awt.PolygongetPolygon()Returns the outline of this selection as a Polygon, or null if this is a straight line selection.intgetPosition()Returns the stack position (image number) of this ROI, or zero if the ROI is not associated with a particular stack image.java.lang.StringgetProperties()java.lang.StringgetProperty(java.lang.String property)intgetPropertyCount()OverlaygetPrototypeOverlay()FloatPolygongetRotationCenter()intgetRoundRectArcSize()Obsolete; replaced by getCornerDiameter().intgetState()ImageStatisticsgetStatistics()java.awt.BasicStrokegetStroke()Returns the Stroke used to draw this ROI, or null if no Stroke is used.java.awt.ColorgetStrokeColor()Returns the the color used to draw the ROI outline or null if the default color is being used.floatgetStrokeWidth()Returns the lineWidth.intgetTPosition()Returns the frame position of this ROI, or zero if this ROI is not associated with a particular frame.intgetType()java.lang.StringgetTypeAsString()Convenience method that converts Roi type to a human-readable form.doublegetXBase()doublegetYBase()intgetZPosition()Returns the slice position of this ROI, or zero if this ROI is not associated with a particular slice.booleanhasHyperStackPosition()Returns 'true' if setPosition(C,Z,T) has been called.booleanisActiveOverlayRoi()Returns 'true' if this ROI is displayed and is also in an overlay.booleanisArea()Returns 'true' if this is an area selection.booleanisCursor()booleanisDrawingTool()Returns 'true' if this is an ROI primarily used from drawing (e.g., TextRoi or Arrow).intisHandle(int sx, int sy)Returns a handle number if the specified screen coordinates are inside or near a handle, otherwise returns -1.booleanisLine()Returns 'true' if this is a line selection.booleanisVisible()Returns true if this ROI is currently displayed on an image.java.util.Iterator<java.awt.Point>iterator()Required by theIterableinterface.static double[]lineCircleIntersection(double ax, double ay, double bx, double by, double cx, double cy, double rad, boolean ignoreOutside)Calculates intersections of a line segment with a circle Author N.Vischer ax, ay, bx, by: points A and B of line segment cx, cy, rad: Circle center and radius.voidmouseDragged(java.awt.event.MouseEvent e)voidmouseMoved(java.awt.event.MouseEvent e)voidmouseReleased(java.awt.event.MouseEvent e)voidnotifyListeners(int id)voidnudge(int key)Nudge ROI one pixel on arrow key press.voidnudgeCorner(int key)Nudge lower right corner of rectangular and oval ROIs by one pixel based on arrow key press.static voidremoveRoiListener(RoiListener listener)static voidsetColor(java.awt.Color c)Sets the default (global) color used for ROI outlines.voidsetCornerDiameter(int cornerDiameter)Sets the rounded rectangle corner diameter (pixels).static voidsetDefaultFillColor(java.awt.Color color)voidsetDrawOffset(boolean drawOffset)voidsetFillColor(java.awt.Color color)Sets the fill color used to display this ROI, or set to null to display it transparently.voidsetFlattenScale(double scale)voidsetIgnoreClipRect(boolean ignoreClipRect)voidsetImage(ImagePlus imp)voidsetInstanceColor(java.awt.Color c)Deprecated.replaced by setStrokeColor()voidsetIsCursor(boolean isCursor)voidsetLineWidth(int width)Deprecated.replaced by setStrokeWidth(int)voidsetLocation(double x, double y)Set the location of the ROI in image coordinates.voidsetLocation(int x, int y)Set the location of the ROI in image coordinates.voidsetName(java.lang.String name)Sets the name of this ROI.voidsetNonScalable(boolean nonScalable)Set 'nonScalable' true to have TextRois in a display list drawn at a fixed location and size.static voidsetPasteMode(int transferMode)Sets the Paste transfer mode.voidsetPosition(ImagePlus imp)Sets the position of this ROI based on the stack position of the specified image.voidsetPosition(int n)Sets the stack position (image number) of this ROI.voidsetPosition(int channel, int slice, int frame)Sets the hyperstack position of this ROI.voidsetProperties(java.lang.String properties)voidsetProperty(java.lang.String key, java.lang.String value)voidsetPrototypeOverlay(Overlay overlay)voidsetRotationCenter(double x, double y)voidsetRoundRectArcSize(int cornerDiameter)Obsolete; replaced by setCornerDiameter().voidsetStroke(java.awt.BasicStroke stroke)Sets the Stroke used to draw this ROI.voidsetStrokeColor(java.awt.Color c)Sets the color used by this ROI to draw its outline.voidsetStrokeWidth(double width)This is a version of setStrokeWidth() that accepts a double argument.voidsetStrokeWidth(float width)Sets the width of the line used to draw this ROI.voidstartPaste(ImagePlus clipboard)booleansubPixelResolution()Returns true if this is a slection that supports sub-pixel resolution.voidtemporarilyHide()Deprecatedstatic float[]toFloat(int[] arr)Converts an int array to a float array.static int[]toInt(float[] arr)Converts a float array to an int array using truncation.static int[]toInt(float[] arr, int[] arr2, int size)static int[]toIntR(float[] arr)Converts a float array to an int array using rounding.java.lang.StringtoString()voidupdate(boolean add, boolean subtract)If 'add' is true, adds this selection to the previous one.voidupdateWideLine(float width)
-
-
-
Field Detail
-
CONSTRUCTING
public static final int CONSTRUCTING
- See Also:
- Constant Field Values
-
MOVING
public static final int MOVING
- See Also:
- Constant Field Values
-
RESIZING
public static final int RESIZING
- See Also:
- Constant Field Values
-
NORMAL
public static final int NORMAL
- See Also:
- Constant Field Values
-
MOVING_HANDLE
public static final int MOVING_HANDLE
- See Also:
- Constant Field Values
-
RECTANGLE
public static final int RECTANGLE
- See Also:
- Constant Field Values
-
OVAL
public static final int OVAL
- See Also:
- Constant Field Values
-
POLYGON
public static final int POLYGON
- See Also:
- Constant Field Values
-
FREEROI
public static final int FREEROI
- See Also:
- Constant Field Values
-
TRACED_ROI
public static final int TRACED_ROI
- See Also:
- Constant Field Values
-
LINE
public static final int LINE
- See Also:
- Constant Field Values
-
POLYLINE
public static final int POLYLINE
- See Also:
- Constant Field Values
-
FREELINE
public static final int FREELINE
- See Also:
- Constant Field Values
-
ANGLE
public static final int ANGLE
- See Also:
- Constant Field Values
-
COMPOSITE
public static final int COMPOSITE
- See Also:
- Constant Field Values
-
POINT
public static final int POINT
- See Also:
- Constant Field Values
-
HANDLE_SIZE
public static final int HANDLE_SIZE
- See Also:
- Constant Field Values
-
NOT_PASTING
public static final int NOT_PASTING
- See Also:
- Constant Field Values
-
previousRoi
public static Roi previousRoi
-
onePixelWide
public static final java.awt.BasicStroke onePixelWide
-
-
Constructor Detail
-
Roi
public Roi(int x, int y, int width, int height)Creates a rectangular ROI.
-
Roi
public Roi(double x, double y, double width, double height)Creates a rectangular ROI using double arguments.
-
Roi
public Roi(int x, int y, int width, int height, int cornerDiameter)Creates a new rounded rectangular ROI.
-
Roi
public Roi(double x, double y, double width, double height, int cornerDiameter)Creates a rounded rectangular ROI using double arguments.
-
Roi
public Roi(java.awt.Rectangle r)
Creates a new rectangular Roi.
-
Roi
public 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
public Roi(int sx, int sy, ImagePlus imp, int cornerDiameter)Starts the process of creating a user-defined rectangular Roi, where sx and sy are the starting screen coordinates.
-
Roi
public Roi(int x, int y, int width, int height, ImagePlus imp)Deprecated.
-
-
Method Detail
-
setLocation
public void setLocation(int x, int y)Set the location of the ROI in image coordinates.
-
setLocation
public void setLocation(double x, double y)Set the location of the ROI in image coordinates.
-
setImage
public void setImage(ImagePlus imp)
-
getImage
public ImagePlus getImage()
Returns the ImagePlus associated with this ROI, or null.
-
getImageID
public int getImageID()
Returns the ID of the image associated with this ROI.
-
getType
public int getType()
-
getState
public int getState()
-
getLength
public double getLength()
Returns the perimeter length.
-
getFeretsDiameter
public double getFeretsDiameter()
Returns Feret's diameter, the greatest distance between any two points along the ROI boundary.
-
getFeretValues
public double[] getFeretValues()
Caculates "Feret" (maximum caliper width), "FeretAngle" and "MinFeret" (minimum caliper width), "FeretX" and "FeretY".
-
getConvexHull
public java.awt.Polygon getConvexHull()
-
getBounds
public java.awt.Rectangle getBounds()
Return this selection's bounding rectangle.
-
getFloatBounds
public java.awt.geom.Rectangle2D.Double getFloatBounds()
Return this selection's bounding rectangle.
-
getBoundingRect
public java.awt.Rectangle getBoundingRect()
Deprecated. replaced by getBounds()
-
getPolygon
public java.awt.Polygon getPolygon()
Returns the outline of this selection as a Polygon, or null if this is a straight line selection.
-
getFloatPolygon
public FloatPolygon getFloatPolygon()
-
getInterpolatedPolygon
public FloatPolygon getInterpolatedPolygon()
Returns, as a FloatPolygon, an interpolated version of this selection that has points spaced 1.0 pixel apart.
-
getInterpolatedPolygon
public FloatPolygon getInterpolatedPolygon(double interval, boolean smooth)
Returns, as a FloatPolygon, an interpolated version of this selection with points spaced 'interval' pixels apart. If 'smooth' is true, traced and freehand selections are first smoothed using a 3 point running average.
-
getContainedPoints
public java.awt.Point[] getContainedPoints()
Returns the coordinates of the pixels inside this ROI as an array of Points.- See Also:
getContainedFloatPoints(),iterator()
-
getContainedFloatPoints
public FloatPolygon getContainedFloatPoints()
Returns the coordinates of the pixels inside this ROI as a FloatPolygon.- See Also:
getContainedPoints(),iterator()
-
lineCircleIntersection
public static double[] lineCircleIntersection(double ax, double ay, double bx, double by, double cx, double cy, double rad, boolean ignoreOutside)Calculates intersections of a line segment with a circle Author N.Vischer ax, ay, bx, by: points A and B of line segment cx, cy, rad: Circle center and radius. ignoreOutside: if true, ignores intersections outside the line segment A-B Returns an array of 0, 2 or 4 coordinates (for 0, 1, or 2 intersection points). If two intersection points are returned, they are listed in travel direction A->B
-
clone
public java.lang.Object clone()
Returns a copy of this roi. See Thinking is Java by Bruce Eckel (www.eckelobjects.com) for a good description of object cloning.- Overrides:
clonein classjava.lang.Object
-
nudge
public void nudge(int key)
Nudge ROI one pixel on arrow key press.
-
nudgeCorner
public void nudgeCorner(int key)
Nudge lower right corner of rectangular and oval ROIs by one pixel based on arrow key press.
-
draw
public void draw(java.awt.Graphics g)
-
drawOverlay
public void drawOverlay(java.awt.Graphics g)
-
drawPixels
public void drawPixels()
Deprecated. replaced by drawPixels(ImageProcessor)
-
drawPixels
public void drawPixels(ImageProcessor ip)
Draws the selection outline on the specified ImageProcessor.
-
contains
public boolean contains(int x, int y)
-
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.
-
update
public void update(boolean add, boolean subtract)If 'add' is true, adds this selection to the previous one. If 'subtract' is true, subtracts it from the previous selection. Called by the IJ.doWand() method, and the makeRectangle(), makeOval(), makePolygon() and makeSelection() macro functions.
-
getMask
public ImageProcessor getMask()
Always returns null for rectangular Roi's
-
startPaste
public void startPaste(ImagePlus clipboard)
-
endPaste
public void endPaste()
-
abortPaste
public void abortPaste()
-
getAngle
public double getAngle(int x1, int y1, int x2, int y2)Returns the angle in degrees between the specified line and a horizontal line.
-
getFloatAngle
public double getFloatAngle(double x1, double y1, double x2, double y2)Returns the angle in degrees between the specified line and a horizontal line.
-
setColor
public static void setColor(java.awt.Color c)
Sets the default (global) color used for ROI outlines.- See Also:
getColor(),setStrokeColor(Color)
-
getColor
public static java.awt.Color getColor()
Returns the default (global) color used for drawing ROI outlines.- See Also:
setColor(Color),getStrokeColor()
-
setStrokeColor
public void setStrokeColor(java.awt.Color c)
Sets the color used by this ROI to draw its outline. This color, if not null, overrides the global color set by the static setColor() method.
-
getStrokeColor
public java.awt.Color getStrokeColor()
Returns the the color used to draw the ROI outline or null if the default color is being used.- See Also:
setStrokeColor(Color)
-
setFillColor
public void setFillColor(java.awt.Color color)
Sets the fill color used to display this ROI, or set to null to display it transparently.- See Also:
getFillColor(),setStrokeColor(java.awt.Color)
-
getFillColor
public java.awt.Color getFillColor()
Returns the fill color used to display this ROI, or null if it is displayed transparently.- See Also:
setFillColor(java.awt.Color),getStrokeColor()
-
setDefaultFillColor
public static void setDefaultFillColor(java.awt.Color color)
-
getDefaultFillColor
public static java.awt.Color getDefaultFillColor()
-
copyAttributes
public void copyAttributes(Roi roi2)
Copy the attributes (outline color, fill color, outline width) of 'roi2' to the this selection.
-
setInstanceColor
public void setInstanceColor(java.awt.Color c)
Deprecated. replaced by setStrokeColor()
-
setLineWidth
public void setLineWidth(int width)
Deprecated. replaced by setStrokeWidth(int)
-
updateWideLine
public void updateWideLine(float width)
-
setNonScalable
public void setNonScalable(boolean nonScalable)
Set 'nonScalable' true to have TextRois in a display list drawn at a fixed location and size.
-
setStrokeWidth
public void setStrokeWidth(float width)
Sets the width of the line used to draw this ROI. Set the width to 0.0 and the ROI will be drawn using a a 1 pixel stroke width regardless of the magnification.
-
setStrokeWidth
public void setStrokeWidth(double width)
This is a version of setStrokeWidth() that accepts a double argument.
-
getStrokeWidth
public float getStrokeWidth()
Returns the lineWidth.
-
setStroke
public void setStroke(java.awt.BasicStroke stroke)
Sets the Stroke used to draw this ROI.
-
getStroke
public java.awt.BasicStroke getStroke()
Returns the Stroke used to draw this ROI, or null if no Stroke is used.
-
getName
public java.lang.String getName()
Returns the name of this ROI, or null.
-
setName
public void setName(java.lang.String name)
Sets the name of this ROI.
-
setPasteMode
public static void setPasteMode(int transferMode)
Sets the Paste transfer mode.- See Also:
Blitter
-
setCornerDiameter
public void setCornerDiameter(int cornerDiameter)
Sets the rounded rectangle corner diameter (pixels).
-
getCornerDiameter
public int getCornerDiameter()
Returns the rounded rectangle corner diameter (pixels).
-
setRoundRectArcSize
public void setRoundRectArcSize(int cornerDiameter)
Obsolete; replaced by setCornerDiameter().
-
getRoundRectArcSize
public int getRoundRectArcSize()
Obsolete; replaced by getCornerDiameter().
-
setPosition
public void setPosition(int n)
Sets the stack position (image number) of this ROI. In an overlay, this ROI is only displayed when the stack is at the specified position. Set to zero to have the ROI displayed on all images in the stack.- See Also:
Overlay
-
getPosition
public int getPosition()
Returns the stack position (image number) of this ROI, or zero if the ROI is not associated with a particular stack image.- See Also:
Overlay
-
setPosition
public void setPosition(int channel, int slice, int frame)Sets the hyperstack position of this ROI. In an overlay, this ROI is only displayed when the hyperstack is at the specified position.- See Also:
Overlay
-
hasHyperStackPosition
public boolean hasHyperStackPosition()
Returns 'true' if setPosition(C,Z,T) has been called.
-
setPosition
public void setPosition(ImagePlus imp)
Sets the position of this ROI based on the stack position of the specified image.
-
getCPosition
public final int getCPosition()
Returns the channel position of this ROI, or zero if this ROI is not associated with a particular channel.
-
getZPosition
public final int getZPosition()
Returns the slice position of this ROI, or zero if this ROI is not associated with a particular slice.
-
getTPosition
public final int getTPosition()
Returns the frame position of this ROI, or zero if this ROI is not associated with a particular frame.
-
setPrototypeOverlay
public void setPrototypeOverlay(Overlay overlay)
-
getPrototypeOverlay
public Overlay getPrototypeOverlay()
-
getPasteMode
public int getPasteMode()
Returns the current paste transfer mode, or NOT_PASTING (-1) if no paste operation is in progress.- See Also:
Blitter
-
getCurrentPasteMode
public static int getCurrentPasteMode()
Returns the current paste transfer mode.
-
isArea
public boolean isArea()
Returns 'true' if this is an area selection.
-
isLine
public boolean isLine()
Returns 'true' if this is a line selection.
-
isDrawingTool
public boolean isDrawingTool()
Returns 'true' if this is an ROI primarily used from drawing (e.g., TextRoi or Arrow).
-
getTypeAsString
public java.lang.String getTypeAsString()
Convenience method that converts Roi type to a human-readable form.
-
isVisible
public boolean isVisible()
Returns true if this ROI is currently displayed on an image.
-
subPixelResolution
public boolean subPixelResolution()
Returns true if this is a slection that supports sub-pixel resolution.
-
getDrawOffset
public 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..
-
setDrawOffset
public void setDrawOffset(boolean drawOffset)
-
setIgnoreClipRect
public void setIgnoreClipRect(boolean ignoreClipRect)
-
isActiveOverlayRoi
public final boolean isActiveOverlayRoi()
Returns 'true' if this ROI is displayed and is also in an overlay.
-
equals
public boolean equals(java.lang.Object obj)
Checks whether two rectangles are equal.- Overrides:
equalsin classjava.lang.Object
-
toInt
public static int[] toInt(float[] arr)
Converts a float array to an int array using truncation.
-
toInt
public static int[] toInt(float[] arr, int[] arr2, int size)
-
toIntR
public static int[] toIntR(float[] arr)
Converts a float array to an int array using rounding.
-
toFloat
public static float[] toFloat(int[] arr)
Converts an int array to a float array.
-
setProperty
public void setProperty(java.lang.String key, java.lang.String value)
-
getProperty
public java.lang.String getProperty(java.lang.String property)
-
setProperties
public void setProperties(java.lang.String properties)
-
getProperties
public java.lang.String getProperties()
-
getPropertyCount
public int getPropertyCount()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
temporarilyHide
public void temporarilyHide()
Deprecated
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
-
getXBase
public double getXBase()
-
getYBase
public double getYBase()
-
getFloatWidth
public double getFloatWidth()
-
getFloatHeight
public double getFloatHeight()
-
getAngle
public double getAngle()
Overridden by PolygonRoi (angle between first two points), TextRoi (text angle) and Line (line angle).
-
enableSubPixelResolution
public void enableSubPixelResolution()
-
setIsCursor
public void setIsCursor(boolean isCursor)
-
isCursor
public boolean isCursor()
-
getDebugInfo
public java.lang.String getDebugInfo()
-
getStatistics
public ImageStatistics getStatistics()
-
getRotationCenter
public FloatPolygon getRotationCenter()
-
setRotationCenter
public void setRotationCenter(double x, double y)
-
getContourCentroid
public double[] getContourCentroid()
-
getHashCode
public int getHashCode()
Returns a hashcode for this Roi that typically changes if it is moved, even though it is still the same object.
-
setFlattenScale
public void setFlattenScale(double scale)
-
notifyListeners
public void notifyListeners(int id)
-
addRoiListener
public static void addRoiListener(RoiListener listener)
-
removeRoiListener
public static void removeRoiListener(RoiListener listener)
-
iterator
public java.util.Iterator<java.awt.Point> iterator()
Required by theIterableinterface. Use to iterate over the contained coordinates. Usage example:for (Point p : roi) { // process p }Author: Wilhelm Burger- Specified by:
iteratorin interfacejava.lang.Iterable<java.awt.Point>- See Also:
getContainedPoints(),getContainedFloatPoints()
-
-
DMelt 3.0 © DataMelt by jWork.ORG