double getImageCount() { interp.getParens(); return WindowManager.getImageCount(); }
double getImageCount() { interp.getParens(); return WindowManager.getImageCount(); }
void addText() { double value2 = (double)value/1048576L; String s = IJ.d2s(value2,value2>50?0:2)+"MB"; if (maxMemory>0L) { double percent = value*100/maxMemory; s += " ("+(percent<1.0?"<1":IJ.d2s(percent,0)) + "%)"; } g.drawString(s, 2, 15); String images = ""+WindowManager.getImageCount(); g.drawString(images, WIDTH-(5+images.length()*8), 15); }
void addText() { double value2 = (double)value/1048576L; String s = IJ.d2s(value2,value2>50?0:2)+"MB"; if (maxMemory>0L) { double percent = value*100/maxMemory; s += " ("+(percent<1.0?"<1":IJ.d2s(percent,0)) + "%)"; } g.drawString(s, 2, 15); String images = ""+WindowManager.getImageCount(); g.drawString(images, WIDTH-(5+images.length()*8), 15); }
void updateDisplay() { if (updateNeeded && WindowManager.getImageCount()>0) { ImagePlus imp = getImage(); imp.updateAndDraw(); updateNeeded = false; } }
void updateDisplay() { if (updateNeeded && WindowManager.getImageCount()>0) { ImagePlus imp = getImage(); imp.updateAndDraw(); updateNeeded = false; } }
/** Returns the names of all variables and functions with human-readable annotations */ public String[] getVariables() { int nImages = WindowManager.getImageCount(); if (nImages>0) showDebugFunctions = true; int nFunctions = showDebugFunctions?3:0; String[] variables = new String[topOfStack+1+nFunctions]; if (showDebugFunctions) { String title = null; if (nImages>0) { ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null) title = imp.getTitle(); } if (debugMode==Debugger.STEP) System.gc(); variables[0] = "Memory\t" + IJ.freeMemory(); variables[1] = "nImages()\t" + nImages; variables[2] = "getTitle()\t" + (title!=null?"\""+title+"\"":""); } String name; int index = nFunctions; for (int i=0; i<=topOfStack; i++) { name = pgm.table[stack[i].symTabIndex].str; if (i<=topOfGlobals) name += " (g)"; variables[index++] = name + "\t" + stack[i]; } return variables; }
/** Returns the names of all variables and functions with human-readable annotations */ public String[] getVariables() { int nImages = WindowManager.getImageCount(); if (nImages>0) showDebugFunctions = true; int nFunctions = showDebugFunctions?3:0; String[] variables = new String[topOfStack+1+nFunctions]; if (showDebugFunctions) { String title = null; if (nImages>0) { ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null) title = imp.getTitle(); } if (debugMode==Debugger.STEP) System.gc(); variables[0] = "Memory\t" + IJ.freeMemory(); variables[1] = "nImages()\t" + nImages; variables[2] = "getTitle()\t" + (title!=null?"\""+title+"\"":""); } String name; int index = nFunctions; for (int i=0; i<=topOfStack; i++) { name = pgm.table[stack[i].symTabIndex].str; if (i<=topOfGlobals) name += " (g)"; variables[index++] = name + "\t" + stack[i]; } return variables; }
/** For IDs less than zero, returns the ImagePlus with the specified ID. Returns null if no open window has a matching ID or no images are open. For IDs greater than zero, returns the Nth ImagePlus. Returns null if the ID is zero. */ public synchronized static ImagePlus getImage(int imageID) { if (imageID>0) imageID = getNthImageID(imageID); if (imageID==0 || getImageCount()==0) return null; ImagePlus imp2 = Interpreter.getBatchModeImage(imageID); if (imp2!=null) return imp2; ImagePlus imp = null; for (int i=0; i<imageList.size(); i++) { ImageWindow win = (ImageWindow)imageList.get(i); imp2 = win.getImagePlus(); if (imageID==imp2.getID()) { imp = imp2; break; } } imp2 = getCurrentImage(); if (imp==null &&imp2!=null && imp2.getID()==imageID) return imp2; return imp; }
return; int index = 0; int startingCount = WindowManager.getImageCount(); for (int i=0; i<list.length; i++) { if (IJ.escapePressed()) break; ImagePlus imp = IJ.openImage(path); IJ.redirectErrorMessages(false); if (imp==null && WindowManager.getImageCount()>startingCount) imp = WindowManager.getCurrentImage(); if (imp==null)
/** For IDs less than zero, returns the ImagePlus with the specified ID. Returns null if no open window has a matching ID or no images are open. For IDs greater than zero, returns the Nth ImagePlus. Returns null if the ID is zero. */ public synchronized static ImagePlus getImage(int imageID) { if (imageID>0) imageID = getNthImageID(imageID); if (imageID==0 || getImageCount()==0) return null; ImagePlus imp2 = Interpreter.getBatchModeImage(imageID); if (imp2!=null) return imp2; ImagePlus imp = null; for (int i=0; i<imageList.size(); i++) { ImageWindow win = (ImageWindow)imageList.get(i); imp2 = win.getImagePlus(); if (imageID==imp2.getID()) { imp = imp2; break; } } imp2 = getCurrentImage(); if (imp==null &&imp2!=null && imp2.getID()==imageID) return imp2; return imp; }
return; int index = 0; int startingCount = WindowManager.getImageCount(); for (int i=0; i<list.length; i++) { if (IJ.escapePressed()) break; ImagePlus imp = IJ.openImage(path); IJ.redirectErrorMessages(false); if (imp==null && WindowManager.getImageCount()>startingCount) imp = WindowManager.getCurrentImage(); if (imp==null)
for (int i = 1; i <= WindowManager.getImageCount(); i++) { imageMap.registerLegacyImage(WindowManager.getImage(i));
final int n_images = WindowManager.getImageCount();
final int img_count = WindowManager.getImageCount(); final Vector windows = new Vector(); if (file != null) {
if (windowClosed && !changes && Menus.window.getItemCount()>Menus.WINDOW_MENU_ITEMS && !(IJ.macroRunning()&&WindowManager.getImageCount()==0)) { GenericDialog gd = new GenericDialog("ImageJ", this); gd.addMessage("Are you sure you want to quit ImageJ?");
if (windowClosed && !changes && Menus.window.getItemCount()>Menus.WINDOW_MENU_ITEMS && !(IJ.macroRunning()&&WindowManager.getImageCount()==0)) { GenericDialog gd = new GenericDialog("ImageJ", this); gd.addMessage("Are you sure you want to quit ImageJ?");
public void run(String arg) int nbima = WindowManager.getImageCount();
public void run(String arg) int nbima = WindowManager.getImageCount();
@Override public void run(String arg) int nbima = WindowManager.getImageCount();