/** Obsolete */ public void setShowAllROIs(boolean showAllROIs) { RoiManager rm = RoiManager.getInstance(); if (rm!=null) rm.runCommand(showAllROIs?"show all":"show none"); }
void specify() { try {IJ.run("Specify...");} catch (Exception e) {return;} runCommand("add"); }
/** Obsolete */ public void setShowAllROIs(boolean showAllROIs) { RoiManager rm = RoiManager.getInstance(); if (rm!=null) rm.runCommand(showAllROIs?"show all":"show none"); }
void specify() { try {IJ.run("Specify...");} catch (Exception e) {return;} runCommand("add"); }
/** Using the specified image, runs the ROI Manager "Add", "Add & Draw", "Update", "Delete", "Measure", "Draw", "Show All", "Show None", "Fill", "Deselect", "Select All", "Combine", "AND", "XOR", "Split", "Sort" or "Multi Measure" command. */ public boolean runCommand(ImagePlus imp, String cmd) { WindowManager.setTempCurrentImage(imp); boolean ok = runCommand(cmd); WindowManager.setTempCurrentImage(null); return ok; }
/** Using the specified image, runs the ROI Manager "Add", "Add & Draw", "Update", "Delete", "Measure", "Draw", "Show All", "Show None", "Fill", "Deselect", "Select All", "Combine", "AND", "XOR", "Split", "Sort" or "Multi Measure" command. */ public boolean runCommand(ImagePlus imp, String cmd) { WindowManager.setTempCurrentImage(imp); boolean ok = runCommand(cmd); WindowManager.setTempCurrentImage(null); return ok; }
void hide() { ImagePlus imp = IJ.getImage(); imp.setHideOverlay(true); RoiManager rm = RoiManager.getInstance(); if (rm!=null) rm.runCommand("show none"); }
void hide() { ImagePlus imp = IJ.getImage(); imp.setHideOverlay(true); RoiManager rm = RoiManager.getInstance(); if (rm!=null) rm.runCommand("show none"); }
public boolean roiManagerSelect(Roi roi, boolean delete) { RoiManager rm=RoiManager.getInstance(); if (rm==null) return false; int index = rm.getRoiIndex(roi); if (index<0) return false; if (delete) { rm.select(imp, index); rm.runCommand("delete"); } else rm.selectAndMakeVisible(imp, index); return true; }
public boolean roiManagerSelect(Roi roi, boolean delete) { RoiManager rm=RoiManager.getInstance(); if (rm==null) return false; int index = rm.getRoiIndex(roi); if (index<0) return false; if (delete) { rm.select(imp, index); rm.runCommand("delete"); } else rm.selectAndMakeVisible(imp, index); return true; }
void show() { ImagePlus imp = IJ.getImage(); imp.setHideOverlay(false); if (imp.getOverlay()==null) { RoiManager rm = RoiManager.getInstance(); if (rm!=null && rm.getCount()>1) { if (!IJ.isMacro()) rm.toFront(); rm.runCommand("show all with labels"); } } }
public void setOverlay(Overlay overlay) { if (overlay==null) { overlayTemplate = null; return; } reset(); overlayTemplate = overlay.create(); setEditMode(null, false); for (int i=0; i<overlay.size(); i++) add(overlay.get(i), i+1); setEditMode(null, true); runCommand("show all"); }
void show() { ImagePlus imp = IJ.getImage(); imp.setHideOverlay(false); if (imp.getOverlay()==null) { RoiManager rm = RoiManager.getInstance(); if (rm!=null && rm.getCount()>1) { if (!IJ.isMacro()) rm.toFront(); rm.runCommand("show all with labels"); } } }
public void setOverlay(Overlay overlay) { if (overlay==null) { overlayTemplate = null; return; } reset(); overlayTemplate = overlay.create(); setEditMode(null, false); for (int i=0; i<overlay.size(); i++) add(overlay.get(i), i+1); setEditMode(null, true); runCommand("show all"); }
if (IJ.isMacOSX()) { RoiManager rm = RoiManager.getInstance(); if (rm!=null) rm.runCommand("enable interrupts");
if (IJ.isMacOSX()) { RoiManager rm = RoiManager.getInstance(); if (rm!=null) rm.runCommand("enable interrupts");
rm.runCommand("add"); rm.allowRecording(false); IJ.setKeyUp(IJ.ALL_KEYS);
Recorder.record("roiManager", mode==DRAW?"Draw":"Fill"); if (showAllCheckbox.getState()) runCommand("show none"); imp.updateAndDraw(); return true;
roiManager.runCommand("reset");
roiManager.runCommand("reset");