I’m experiencing some weird behaviour when working with the @ Parameter stuff from jython scripts. I have some scripts generating
ImagePlusses and some others creating
Imgs. Now, I would like to combine these images in another script and get the images as parameters; ideally as
Datasets. The pulldowns in the dialog are build in a weird way. This is my minimal code example for creating these images:
#@UIService ui #@OpService ops from ij.gui import NewImage from net.imglib2.util import Intervals imp = NewImage.createByteImage("test1", 100, 100, 10, NewImage.FILL_BLACK); imp.show(); img = ops.create().img(Intervals.createMinSize([0,0,0,100,100,10])); ui.show("test2", img);
This script works nicely and afterwards two images are shown: test1 and test2.
If I write and run this tiny script
#@Dataset data1 #@Dataset data2 print("Hello world");
the popping up dialog looks like this:
Thus, I cannot select image test2! This is a pitty as I actually need it as Dataset
Then, I wrote a script like this
#@ImagePlus imp1 #@ImagePlus imp2 print("Hello world");
which opens this dialog and pulldown:
This pulldown contains test2. But again, I need the input images as
If I write that:
#@Img data1 #@Img data2 print("Hello world");
the dialog looks like this:
Last but not least, mixed inputs:
#@ImagePlus imp1 #@Dataset data2 #@Img img3 print("Hello world");
and the corresponding dialog:
Note: The dialog shows only one pulldown!
Actually, I would be happy if I could select the images using the Dataset-parameter-way-of life. I just posted the other examples for completeness. Is there a way of showing an img as a Dataset so that it appears in the pulldowns?
Any hint would be helpful.