Class Overlay
java.lang.Object
org.micromanager.ndviewer.overlay.Overlay
public class Overlay extends Object
An Overlay is a list of ROIs that can be drawn non-destructively on an Image.
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description voidadd(Roi roi)Adds an ROI to this Overlay.voidadd(Roi roi, String name)Adds an ROI to this Overlay using the specified name.voidaddElement(Roi roi)Adds an ROI to this Overlay.voidclear()Removes all the ROIs in this Overlay.booleancontains(Roi roi)Returns 'true' if this Overlay contains the specified ROI.Overlaycreate()Returns a new Overlay that has the same properties as this one.voidcrop(int firstSlice, int lastSlice)Removes ROIs having positions outside of the interval defined by firstSlice and lastSlice.voidcrop(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.voiddrawBackgrounds(boolean b)voiddrawLabels(boolean b)voiddrawNames(boolean b)Roiget(int index)Returns the ROI with the specified index or null if the index is invalid.booleangetDrawBackgrounds()booleangetDrawLabels()booleangetDrawNames()intgetIndex(String name)Returns the index of the ROI with the specified name, or -1 if not found.ColorgetLabelColor()FontgetLabelFont()booleanisCalibrationBar()voidremove(int index)Removes the ROI with the specified index from this Overlay.voidremove(String name)Removes all ROIs that have the specified name.voidremove(Roi roi)Removes the specified ROI from this Overlay.voidsetFillColor(Color color)Sets the fill color of all the ROIs in this overlay.voidsetIsCalibrationBar(boolean b)voidsetLabelColor(Color c)voidsetLabelFont(Font font)voidsetStrokeColor(Color color)Sets the stroke color of all the ROIs in this overlay.intsize()Returns the number of ROIs in this Overlay.Roi[]toArray()Returns on array containing the ROIs in this Overlay.StringtoString()voidtranslate(double dx, double dy)Moves all the ROIs in this overlay.voidtranslate(int dx, int dy)Moves all the ROIs in this overlay.
-
Constructor Details
-
Method Details
-
add
Adds an ROI to this Overlay. -
add
Adds an ROI to this Overlay using the specified name. -
addElement
Adds an ROI to this Overlay. -
remove
public void remove(int index)Removes the ROI with the specified index from this Overlay. -
remove
Removes the specified ROI from this Overlay. -
remove
Removes all ROIs that have the specified name. -
clear
public void clear()Removes all the ROIs in this Overlay. -
get
Returns the ROI with the specified index or null if the index is invalid. -
getIndex
Returns the index of the ROI with the specified name, or -1 if not found. -
contains
Returns 'true' if this Overlay contains the specified ROI. -
size
public int size()Returns the number of ROIs in this Overlay. -
toArray
Returns on array containing the ROIs in this Overlay. -
setStrokeColor
Sets the stroke color of all the ROIs in this overlay. -
setFillColor
Sets the fill color of all the ROIs in this overlay. -
translate
public void translate(int dx, int dy)Moves all the ROIs in this overlay. -
translate
public void translate(double dx, double dy)Moves all the ROIs in this overlay. Marcel Boeglin, October 2013 -
crop
public void crop(int firstSlice, int lastSlice)Removes ROIs having positions outside of the interval defined by firstSlice and lastSlice. Marcel Boeglin, September 2013 -
crop
public 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. Marcel Boeglin, September 2013 -
create
Returns a new Overlay that has the same properties as this one. -
toString
-
drawLabels
public void drawLabels(boolean b) -
getDrawLabels
public boolean getDrawLabels() -
drawNames
public void drawNames(boolean b) -
getDrawNames
public boolean getDrawNames() -
drawBackgrounds
public void drawBackgrounds(boolean b) -
getDrawBackgrounds
public boolean getDrawBackgrounds() -
setLabelColor
-
getLabelColor
-
setLabelFont
-
getLabelFont
-
setIsCalibrationBar
public void setIsCalibrationBar(boolean b) -
isCalibrationBar
public boolean isCalibrationBar()
-