/** Opens and displays the nth image in the specified tiff stack. */ public static void open(String path, int n) { if (ij==null && Menus.getCommands()==null) init(); ImagePlus imp = openImage(path, n); if (imp!=null) imp.show(); }
/** Opens and displays the nth image in the specified tiff stack. */ public static void open(String path, int n) { if (ij==null && Menus.getCommands()==null) init(); ImagePlus imp = openImage(path, n); if (imp!=null) imp.show(); }
/** Opens and displays a tiff, dicom, fits, pgm, jpeg, bmp, gif, lut, roi, or text file. Displays an error message if the specified file is not in one of the supported formats, or if it is not found. With 1.41k or later, opens images specified by a URL. */ public static void open(String path) { if (ij==null && Menus.getCommands()==null) init(); Opener o = new Opener(); macroRunning = true; if (path==null || path.equals("")) o.open(); else o.open(path); macroRunning = false; }
/** Opens and displays a tiff, dicom, fits, pgm, jpeg, bmp, gif, lut, roi, or text file. Displays an error message if the specified file is not in one of the supported formats, or if it is not found. With 1.41k or later, opens images specified by a URL. */ public static void open(String path) { if (ij==null && Menus.getCommands()==null) init(); Opener o = new Opener(); macroRunning = true; if (path==null || path.equals("")) o.open(); else o.open(path); macroRunning = false; }
/** Runs an ImageJ command, with options that are passed to the GenericDialog and OpenDialog classes. Does not return until the command has finished executing. To generate run() calls, start the recorder (Plugins/Macro/Record) and run commands from the ImageJ menu bar. */ public static void run(String command, String options) { //IJ.log("run1: "+command+" "+Thread.currentThread().hashCode()+" "+options); if (ij==null && Menus.getCommands()==null) init(); Macro.abort = false; Macro.setOptions(options); Thread thread = Thread.currentThread(); if (previousThread==null || thread!=previousThread) { String name = thread.getName(); if (!name.startsWith("Run$_")) thread.setName("Run$_"+name); } command = convert(command); previousThread = thread; macroRunning = true; Executer e = new Executer(command); e.run(); macroRunning = false; Macro.setOptions(null); testAbort(); macroInterpreter = null; //IJ.log("run2: "+command+" "+Thread.currentThread().hashCode()); }
/** Runs an ImageJ command, with options that are passed to the GenericDialog and OpenDialog classes. Does not return until the command has finished executing. To generate run() calls, start the recorder (Plugins/Macro/Record) and run commands from the ImageJ menu bar. */ public static void run(String command, String options) { //IJ.log("run1: "+command+" "+Thread.currentThread().hashCode()+" "+options); if (ij==null && Menus.getCommands()==null) init(); Macro.abort = false; Macro.setOptions(options); Thread thread = Thread.currentThread(); if (previousThread==null || thread!=previousThread) { String name = thread.getName(); if (!name.startsWith("Run$_")) thread.setName("Run$_"+name); } command = convert(command); previousThread = thread; macroRunning = true; Executer e = new Executer(command); e.run(); macroRunning = false; Macro.setOptions(null); testAbort(); macroInterpreter = null; //IJ.log("run2: "+command+" "+Thread.currentThread().hashCode()); }
/** Runs an ImageJ command using the specified image and options. To generate run() calls, start the recorder (Plugins/Macro/Record) and run commands from the ImageJ menu bar.*/ public static void run(ImagePlus imp, String command, String options) { if (ij==null && Menus.getCommands()==null) init(); if (imp!=null) { ImagePlus temp = WindowManager.getTempCurrentImage(); WindowManager.setTempCurrentImage(imp); run(command, options); WindowManager.setTempCurrentImage(temp); } else run(command, options); }
/** Runs an ImageJ command using the specified image and options. To generate run() calls, start the recorder (Plugins/Macro/Record) and run commands from the ImageJ menu bar.*/ public static void run(ImagePlus imp, String command, String options) { if (ij==null && Menus.getCommands()==null) init(); if (imp!=null) { ImagePlus temp = WindowManager.getTempCurrentImage(); WindowManager.setTempCurrentImage(imp); run(command, options); WindowManager.setTempCurrentImage(temp); } else run(command, options); }
add("South", statusBar); IJ.init(this, applet); addKeyListener(this); addWindowListener(this);
add("South", statusBar); IJ.init(this, applet); addKeyListener(this); addWindowListener(this);