Closed imagejan closed 2 years ago
Consider the following macro, using the File > Import > Image... command:
#@ File input setBatchMode(true); run("Image... ", "source=[" + input +"] crop=false autoscale=true computeminmax=false x=0 y=0 w=0 h=0 groupfiles=false mode=Auto range=0"); run("Z Project...", "projection=[Max Intensity] all"); setBatchMode("show");
This will throw and error:
There are no images open in line 4
Changing line 2 to setBatchMode(false); makes it work as expected.
setBatchMode(false);
I guess the issue is that Dataset objects are not (or too lazily) synced with IJ1 ImagePluses.
Dataset
ImagePlus
Note that despite the fix this won't work running headlessly currently.
Consider the following macro, using the File > Import > Image... command:
This will throw and error:
Changing line 2 to
setBatchMode(false);
makes it work as expected.I guess the issue is that
Dataset
objects are not (or too lazily) synced with IJ1ImagePlus
es.