@Override public void actionPerformed(final ActionEvent e) { IJ.runPlugIn("ij.plugin.BrowserLauncher", URL); } });
@Override public void actionPerformed(final ActionEvent e) { IJ.runPlugIn("ij.plugin.BrowserLauncher", URL); } });
@Override public void run() { IJ.runPlugIn(Context.class.getName(), null); } };
/** Save the image in Gif format using the specified path. Returns false if the image is not 8-bits or there is an I/O error. */ public boolean saveAsGif(String path) { IJ.runPlugIn(imp, "ij.plugin.GifWriter", path); updateImp(fi, FileInfo.GIF_OR_JPG); return true; }
/** Save the image in BMP format using the specified path. */ public boolean saveAsBmp(String path) { IJ.runPlugIn(imp, "ij.plugin.BMP_Writer", path); updateImp(fi, FileInfo.BMP); return true; }
/** Saves grayscale images in PGM (portable graymap) format and RGB images in PPM (portable pixmap) format, using the specified path. */ public boolean saveAsPgm(String path) { IJ.runPlugIn(imp, "ij.plugin.PNM_Writer", path); updateImp(fi, FileInfo.PGM); return true; }
/** Save the image in PNG format using the specified path. */ public boolean saveAsPng(String path) { IJ.runPlugIn(imp, "ij.plugin.PNG_Writer", path); updateImp(fi, FileInfo.IMAGEIO); return true; }
private synchronized static void initialize() { if (initialized) return; if (context == null) context = (Context) IJ.runPlugIn("org.scijava.Context", ""); if (logService == null) logService = context.getService(LogService.class); initialized = true; }
/** Runs the specified plugin using the specified image. */ public static Object runPlugIn(ImagePlus imp, String className, String arg) { if (imp!=null) { ImagePlus temp = WindowManager.getTempCurrentImage(); WindowManager.setTempCurrentImage(imp); Object o = runPlugIn("", className, arg); WindowManager.setTempCurrentImage(temp); return o; } else return runPlugIn(className, arg); }
protected void showMacroFunctions() { String url= "/developer/macro/functions.html"; String selText = ta.getSelectedText().replace("\n", " "); String[] selectedWords = Tools.split(selText, "/,(,[\"\'&+"); if (selectedWords.length==1 && selectedWords[0].length()>0) url += "#" +selectedWords[0];//append selection as hash tag IJ.runPlugIn("ij.plugin.BrowserLauncher", IJ.URL+url); }
/** Save the image in FITS format using the specified path. */ public boolean saveAsFits(String path) { if (!okForFits(imp)) return false; IJ.runPlugIn(imp, "ij.plugin.FITS_Writer", path); updateImp(fi, FileInfo.FITS); return true; }
void edit() { if (open("", "Open macro or plugin")) { Editor ed = (Editor)IJ.runPlugIn("ij.plugin.frame.Editor", ""); if (ed!=null) ed.open(dir, name); } }
public void run() { IJ.resetEscape(); IJ.runPlugIn("ij.plugin.ClassChecker", ""); runCompiledPlugin(plugin); }
private void showSource(String name) { if (IJ.shiftKeyDown()) { IJ.runPlugIn("ij.plugin.BrowserLauncher", IJ.URL+"/source/ij/plugin/tool/"+name+"Tool.java"); IJ.setKeyUp(KeyEvent.VK_SHIFT); } }
private void interpolateRois() { IJ.runPlugIn("ij.plugin.RoiInterpolator", ""); if (record()) Recorder.record("roiManager", "Interpolate ROIs"); }
/** Save the image in FITS format using the specified path. */ public boolean saveAsFits(String path) { if (!okForFits(imp)) return false; IJ.runPlugIn(imp, "ij.plugin.FITS_Writer", path); updateImp(fi, FileInfo.FITS); return true; }
void compileAndRun() { if (path==null) saveAs(); if (path!=null) { save(); String text = ta.getText(); if (text.contains("implements PlugInFilter") && text.contains("IJ.run(")) IJ.log("<<Plugins that call IJ.run() should probably implement PlugIn, not PlugInFilter.>>"); IJ.runPlugIn("ij.plugin.Compiler", path); } }
void compileAndRun() { if (path==null) saveAs(); if (path!=null) { save(); String text = ta.getText(); if (text.contains("implements PlugInFilter") && text.contains("IJ.run(")) IJ.log("<<Plugins that call IJ.run() should probably implement PlugIn, not PlugInFilter.>>"); IJ.runPlugIn("ij.plugin.Compiler", path); } }
private void threshold() { LabelThresholder_.min = ((SpinnerNumberModel) minThreshold.getModel()).getNumber().intValue(); LabelThresholder_.max = ((SpinnerNumberModel) maxThreshold.getModel()).getNumber().intValue(); IJ.runPlugIn("LabelThresholder_", ""); }
public static void updateImageJMenus() { jarFiles = macroFiles = null; Menus m = new Menus(IJ.getInstance(), IJ.getApplet()); String err = m.addMenuBar(); if (err!=null) IJ.error(err); m.installStartupMacroSet(); IJ.resetClassLoader(); IJ.runPlugIn("ij.plugin.ClassChecker", ""); IJ.showStatus("Menus updated: "+m.nPlugins + " commands, " + m.nMacros + " macros"); }