@Override public int setup(String arg, ImagePlus imp) { if (imp == null) { IJ.noImage(); return DONE; } this.imagePlus = imp; return DOES_ALL | NO_CHANGES; }
@Override public int setup(String arg, ImagePlus imp) { if (imp == null) { IJ.noImage(); return DONE; } this.imagePlus = imp; return DOES_ALL | NO_CHANGES; }
@Override public int setup(String arg, ImagePlus imp) { if (imp == null) { IJ.noImage(); return DONE; } this.imagePlus = imp; return DOES_ALL | NO_CHANGES; }
/** Returns a reference to the active image, or displays an error message and aborts the plugin or macro if no images are open. */ public static ImagePlus getImage() { ImagePlus img = WindowManager.getCurrentImage(); if (img==null) { IJ.noImage(); if (ij==null) System.exit(0); else abort(); } return img; }
void undo() { ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null) Undo.undo(); else IJ.noImage(); }
void copy(boolean cut) { ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null) { imp.copy(cut); if (cut) imp.changes = true; } else IJ.noImage(); }
void revert() { ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null) imp.revert(); else IJ.noImage(); }
void revert() { ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null) imp.revert(); else IJ.noImage(); }
void copy(boolean cut) { ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null) { imp.copy(cut); if (cut) imp.changes = true; } else IJ.noImage(); }
void undo() { ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null) Undo.undo(); else IJ.noImage(); }
public int setup(String arg, ImagePlus imp) { this.imp = imp; if (imp==null) {IJ.noImage(); return DONE;} stackSize = imp.getStackSize(); if (imp.getProperty("FHT")!=null) { IJ.error("FFT Custom Filter", "Spatial domain (non-FFT) image required"); return DONE; } else return processStack?DOES_ALL+DOES_STACKS:DOES_ALL; }
@Override public void run(final String arg) { IJ.register(Make_Montage.class); final ImagePlus imp = WindowManager.getCurrentImage(); if (imp == null) { IJ.noImage(); return; } makeMontage(imp); }
public int setup(String arg, ImagePlus imp) { this.imp = imp; if (imp==null) {IJ.noImage(); return DONE;} stackSize = imp.getStackSize(); if (imp.getProperty("FHT")!=null) { IJ.error("FFT Custom Filter", "Spatial domain (non-FFT) image required"); return DONE; } else return processStack?DOES_ALL+DOES_STACKS:DOES_ALL; }
public void run(String arg) { imp = WindowManager.getCurrentImage(); if (imp!=null) { if (showDialog(imp) && imp.getStackSize()>1 && labelAll) labelSlices(imp); } else IJ.noImage(); }
public void run(String arg) { imp = WindowManager.getCurrentImage(); if (imp!=null) { if (showDialog(imp) && imp.getStackSize()>1 && labelAll) labelSlices(imp); } else IJ.noImage(); }
void closeImage(ImagePlus imp) { if (imp==null) { IJ.noImage(); return; } imp.close(); if (Recorder.record && !IJ.isMacro()) { if (Recorder.scriptMode()) Recorder.recordCall("imp.close();"); else Recorder.record("close"); Recorder.setCommand(null); // don't record run("Close") } }
void flatten() { ImagePlus imp = WindowManager.getCurrentImage(); if (imp==null) {IJ.noImage(); return;} ImageCanvas ic = imp.getCanvas(); if ((ic!=null && ic.getShowAllList()==null) && imp.getOverlay()==null && imp.getRoi()==null) error("Image does not have an overlay or ROI"); else IJ.doCommand("Flatten"); // run Image>Flatten in separate thread }
void flatten() { ImagePlus imp = WindowManager.getCurrentImage(); if (imp==null) {IJ.noImage(); return;} ImageCanvas ic = imp.getCanvas(); if ((ic!=null && ic.getShowAllList()==null) && imp.getOverlay()==null && imp.getRoi()==null) error("Image does not have an overlay or ROI"); else IJ.doCommand("Flatten"); // run Image>Flatten in separate thread }
void save() { ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null) { if (imp.getStackSize()>1) { imp.setIgnoreFlush(true); new FileSaver(imp).save(); imp.setIgnoreFlush(false); } else new FileSaver(imp).save(); } else IJ.noImage(); }
void save() { ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null) { if (imp.getStackSize()>1) { imp.setIgnoreFlush(true); new FileSaver(imp).save(); imp.setIgnoreFlush(false); } else new FileSaver(imp).save(); } else IJ.noImage(); }