Constructor and Description |
---|
Overlay()
Constructs an empty Overlay.
|
Overlay(Roi roi)
Constructs an Overlay and adds the specified ROI.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Roi roi)
Adds an ROI to this Overlay.
|
void |
add(Roi roi,
java.lang.String name)
Adds an ROI to this Overlay using the specified name.
|
void |
addElement(Roi roi)
Adds an ROI to this Overlay.
|
void |
clear()
Removes all the ROIs in this Overlay.
|
boolean |
contains(Roi roi)
Returns 'true' if this Overlay contains the specified ROI.
|
Overlay |
create()
Returns a new Overlay that has the same properties as this one.
|
static Overlay |
createStackOverlay(Roi[] rois) |
void |
crop(int firstSlice,
int lastSlice)
Removes ROIs having positions outside of the
interval defined by firstSlice and lastSlice.
|
void |
crop(int firstC,
int lastC,
int firstZ,
int lastZ,
int firstT,
int lastT)
Removes ROIs having a C, Z or T coordinate outside the volume
defined by firstC, lastC, firstZ, lastZ, firstT and lastT.
|
Overlay |
crop(java.awt.Rectangle bounds) |
void |
drawBackgrounds(boolean b) |
void |
drawLabels(boolean b) |
void |
drawNames(boolean b) |
Overlay |
duplicate()
Returns a clone of this Overlay.
|
Roi |
get(int index)
Returns the ROI with the specified index or null if the index is invalid.
|
Roi |
get(java.lang.String name)
Returns the ROI with the specified name or null if not found.
|
boolean |
getDrawBackgrounds() |
boolean |
getDrawLabels() |
boolean |
getDrawNames() |
int |
getIndex(java.lang.String name)
Returns the index of the ROI with the specified name, or -1 if not found.
|
java.awt.Color |
getLabelColor() |
java.awt.Font |
getLabelFont() |
int |
indexAt(int x,
int y)
Returns the index of the last ROI that contains the point (x,y)
or null if no ROI contains the point.
|
boolean |
isCalibrationBar() |
boolean |
isSelectable()
Returns 'true' if ROIs in this overlay can be activated
by clicking on their labels or by a long press.
|
java.util.Iterator<Roi> |
iterator() |
ResultsTable |
measure(ImagePlus imp)
Measures the ROIs in this overlay on the specified image
and returns the results as a ResultsTable.
|
void |
remove(int index)
Removes the ROI with the specified index from this Overlay.
|
void |
remove(Roi roi)
Removes the specified ROI from this Overlay.
|
void |
remove(java.lang.String name)
Removes all ROIs that have the specified name.
|
Overlay |
rotate(double angle,
double xcenter,
double ycenter)
Returns a rotated version of this Overlay.
|
boolean |
scalableLabels() |
Overlay |
scale(double xscale,
double yscale)
Returns a scaled version of this Overlay.
|
void |
selectable(boolean selectable)
Set 'false' to prevent ROIs in this overlay from being activated
by clicking on their labels or by a long clicking.
|
void |
set(Roi roi,
int index)
Replaces the ROI at the specified index.
|
void |
setFillColor(java.awt.Color color)
Sets the fill color of all the ROIs in this overlay.
|
void |
setIsCalibrationBar(boolean b) |
void |
setLabelColor(java.awt.Color c) |
void |
setLabelFont(java.awt.Font font) |
void |
setLabelFont(java.awt.Font font,
boolean scalable) |
void |
setLabelFontSize(int size,
java.lang.String options)
Set the label font size with options.
|
void |
setStrokeColor(java.awt.Color color)
Sets the stroke color of all the ROIs in this overlay.
|
void |
setStrokeWidth(java.lang.Double width)
Sets the stroke width of all the ROIs in this overlay.
|
int |
size()
Returns the number of ROIs in this Overlay.
|
Roi[] |
toArray()
Returns on array containing the ROIs in this Overlay.
|
java.lang.String |
toString() |
void |
translate(double dx,
double dy)
Moves all the ROIs in this overlay.
|
void |
translate(int dx,
int dy)
Moves all the ROIs in this overlay.
|
static void |
updateTableOverlay(ImagePlus imp,
int first,
int last,
int tableSize)
Updates overlays created by the particle analyzer
after rows are deleted from the Results table.
|
public Overlay()
public Overlay(Roi roi)
public void add(Roi roi)
public void add(Roi roi, java.lang.String name)
public void addElement(Roi roi)
public void set(Roi roi, int index)
public void remove(int index)
public void remove(Roi roi)
public void remove(java.lang.String name)
public void clear()
public Roi get(int index)
public Roi get(java.lang.String name)
public int getIndex(java.lang.String name)
public int indexAt(int x, int y)
public boolean contains(Roi roi)
public int size()
public Roi[] toArray()
public void setStrokeColor(java.awt.Color color)
public void setStrokeWidth(java.lang.Double width)
public void setFillColor(java.awt.Color color)
public void translate(int dx, int dy)
public void translate(double dx, double dy)
public ResultsTable measure(ImagePlus imp)
public Overlay crop(java.awt.Rectangle bounds)
public void crop(int firstSlice, int lastSlice)
public void crop(int firstC, int lastC, int firstZ, int lastZ, int firstT, int lastT)
public Overlay create()
public Overlay duplicate()
public Overlay scale(double xscale, double yscale)
public Overlay rotate(double angle, double xcenter, double ycenter)
public void drawLabels(boolean b)
public boolean getDrawLabels()
public void drawNames(boolean b)
public boolean getDrawNames()
public void drawBackgrounds(boolean b)
public boolean getDrawBackgrounds()
public void setLabelColor(java.awt.Color c)
public java.awt.Color getLabelColor()
public void setLabelFont(java.awt.Font font)
public void setLabelFont(java.awt.Font font, boolean scalable)
public void setLabelFontSize(int size, java.lang.String options)
public java.awt.Font getLabelFont()
public void setIsCalibrationBar(boolean b)
public boolean isCalibrationBar()
public void selectable(boolean selectable)
public boolean isSelectable()
public boolean scalableLabels()
public java.lang.String toString()
toString
in class java.lang.Object
public static void updateTableOverlay(ImagePlus imp, int first, int last, int tableSize)