Returns a list of the IDs of open images. Returns null if no image windows are open.
()
| 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() { |
no test coverage detected