Created
April 19, 2018 12:42
-
-
Save imagejan/53d106e1bfe5faba9f1d2ffe7feb2a2f to your computer and use it in GitHub Desktop.
Small Groovy code snippets useful when working with ImagePlus and other IJ1 classes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ij.WindowManager | |
/** | |
* Get all open images as list of {@code ImagePlus} | |
*/ | |
def getImagesAsList() { | |
count = WindowManager.getImageCount() | |
return (1..count).collect { WindowManager.getImage(it) } | |
} | |
println getImagesAsList() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment