-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImagePlus conversion leads to multiple compatible inputs being listed #230
Comments
With a different variation of these scripts, it can happen that a reference to a To reproduce:
#@ ObjectService os
#@ ConvertService cs
#@ OpService ops
#@ DatasetService ds
#@ UIService ui
import ij.ImagePlus
import net.imagej.Dataset
import net.imagej.ImgPlus
import net.imagej.display.ImageDisplay
import ij.WindowManager
img = ops.create().img([32, 64] as int[])
def printAvailableObjects(type) {
println " $type direct:"
os.getObjects(type).each {
println " --- ${it.class} $it"
}
println " $type converted:"
cs.getCompatibleInputs(type).each {
println " --- ${it.class} $it"
}
}
println "***** Before showing:"
printAvailableObjects(ImagePlus.class)
ui.show(img)
println "***** After showing:"
printAvailableObjects(ImagePlus.class)
null Output (as expected)
#@ ImagePlus imp1
#@ ImagePlus imp2
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider this Groovy script (run after opening e.g. the Blobs sample image):
which will output:
Consistently, when using a script like this one:
... three options will be shown for each parameter, despite a single image being open (because the
AbstractInputHarvester
uses the same mechanism to retrieve compatible inputs).The text was updated successfully, but these errors were encountered: