Is there a way to run FIji's Stitching from a script?

gui
stitching
plugin
scripting
Tags: #<Tag:0x00007fa30b30cea0> #<Tag:0x00007fa30b30c7e8> #<Tag:0x00007fa30b30c018> #<Tag:0x00007fa30b3179e0>

#1

I think the answer is NO, but just in case I’d like to ask this question: is there a way to automate FIji’s Stitching from a script?

As far as I could see, there is no API prepared for Stitching plugin. So I’ll have to use Fiji’s GUI.

Is there a way to automate the GUI control of Fiji?


#2

I guess you’re referring to Fiji’s Plugins > Stitching > Grid/Collection Stitching command, right? I’m running it in batch from IJ1 macro like this:


From other script languages you can usually call (as recorded from the macro recorder e.g. in Javascript mode):

IJ.run("Grid/Collection stitching", "type=[Positions from file] order=[Defined by TileConfiguration] directory=test layout_file=TileConfiguration.txt fusion_method=[Linear Blending] regression_threshold=0.30 max/avg_displacement_threshold=2.50 absolute_displacement_threshold=3.50 compute_overlap computation_parameters=[Save memory (but be slower)] image_output=[Fuse and display]");

but that will open the result as a new image, which you’d have to get via IJ.getImage() then…

If you’d like to have more control, you can call the Java API directly, as illustrated here:


Note that there’s now BigStitcher which offers a mode that’s scriptable via IJ1 macro language as well:


#3

Thank you. This was much more than I was expecting. Very helpful!!!