I’m trying to develop a Jython Script using the Grid/Collection stitching plugin.
Using the macro recorder I’ve figure out I can something like the following :
from ij import IJ inDir = "/panoramas/data/D8/" outDir = "/panoramas/data/D8/" IJ.run("Grid/Collection stitching", "type=[Sequential Images] " + "order=[All files in directory] " + "directory=" + inDir + " " + "output_textfile_name=TileConfiguration.txt " + "fusion_method=[Linear Blending] " + "regression_threshold=0.30 " + "max/avg_displacement_threshold=2.50 " + "absolute_displacement_threshold=3.50 " + "frame=1 " + "subpixel_accuracy " + "display_fusion " + "computation_parameters=[Save computation time (but use more RAM)] " + "image_output=[Write to disk] " + "output_directory=" + outDir);
The problem is most of my data isn’t organized into a folders for each collection to be stitched. I can manage this but is there a way to pass a series of
ImagePlus objects to the plugin rather than point it at a folder on the drive?
Likewise, is there a way to specify the output image name was it’s written to disk? Currently it seems to default to
img_t1_z1_c1 without a file extension. This is obviously problematic if I’m writing more than one stitched file to a single location.
Finally, I would have expected the
display_fusion command to have displayed the resulting stitched image, however, this appears not tow work when used in conjunction with
image_output=[Write to disk].
Is there a lower level means of accessing the functionality I’m looking for rather than using