MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / getIDList

Method getIDList

ij/src/main/java/ij/WindowManager.java:172–191  ·  view source on GitHub ↗

Returns a list of the IDs of open images. Returns null if no image windows are open.

()

Source from the content-addressed store, hash-verified

170 /** Returns a list of the IDs of open images. Returns
171 null if no image windows are open. */
172 public synchronized static int[] getIDList() {
173 int nWindows = imageList.size();
174 int[] batchModeImages = Interpreter.getBatchModeImageIDs();
175 int nBatchImages = batchModeImages.length;
176 if ((nWindows+nBatchImages)==0)
177 return null;
178 int[] list = new int[nWindows+nBatchImages];
179 for (int i=0; i<nWindows; i++) {
180 ImageWindow win = (ImageWindow)imageList.get(i);
181 list[i] = win.getImagePlus().getID();
182 }
183 int index = 0;
184 for (int i=nWindows; i<nWindows+nBatchImages; i++)
185 list[i] = batchModeImages[index++];
186 //IJ.log("getIDList");
187 //for (int i=0; i<list.length; i++) {
188 //IJ.log(" "+i+" "+nWindows+" "+nBatchImages+" "+list[i]+" "+getImage((list[i])));
189 //}
190 return list;
191 }
192
193 /** Returns a list of the titles of all open images. */
194 public synchronized static String[] getImageTitles() {

Callers 15

selectWindowMethod · 0.95
runMethod · 0.95
getImageTitlesMethod · 0.95
getNthImageIDMethod · 0.95
getImageMethod · 0.95
getImageWindowMethod · 0.95
repaintImageWindowsMethod · 0.95
closeMethod · 0.95
convertImagesToStackMethod · 0.95
closeAllMethod · 0.95
mergeStacksMethod · 0.95

Calls 5

getBatchModeImageIDsMethod · 0.95
getImagePlusMethod · 0.95
getIDMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected