I am looking into scripting BigStitcher to stitch *.vsi files written by our Olympus SpinSR spinning disc acquired with the cellSens dimension software.
Thanks to the documentation for headless mode I found my way easily, but I did encounter a few hurdles.
There seems to be an issue with the metadata of my images. While defining the dataset using the automatic loader fails, it does work with the manual loader (using Bio-formats). The relative positions of the tiles to each other are read correctly as well, but unfortunately the tiles are flipped in both X and Y.
However, there is a convenient way to correct this using the BigStitcher GUI (Arrange Views > Flip Axes ).
Is the Flip X and Y functionality also available for the headless / scripting mode, or would you know another way of how to correct this during scripting, e.g. by reading from my own TileConfiguration file?
Thank you for your help!
The log confims that the transormation was done and that the .xml was updated. When opend in the BigStitcher GUI, the individual coordinates of the tiles are now listed with the oposite sign, i.e. what Jan was suggesting.
However, the orientation of the tiles did not change. The correct orientation can be seen using Arrange Views > Flip Axes > X & Y in the BigStitcher GUI.
So I probably still miss / did not fully understand something
Please feel free to have a look for yourself onmy example dataset (already hdf5/xml, but no transformations applied).
So my first thing was obviously very wrong so I decided to have anopther look and use the FlipAxes command instead.
Here is a first version of it on Gist.
Now that I have seen through it, I would like some help from @StephanPreibisch et al. if there is a way to grab the current instance of BigStitcher instead of using the XML file. Something like BigStitcher.getOpenInstances()?
I am hoping to make this command either work on the currently open BigStitcher or on the XML file if it is not. that would be nice
PS: @CellKai I’ll be looking forward to a beer next time we meet
@ctrueden I notice that when I try to record this script, the recorder outputs
Error: Unrecognized command: "script:C:FijipluginsScriptsPluginsBigStitcherCustom ScriptsBigStitcher_Flip_Axes.groovy" in line 1:
var ; initializeSciJavaParameters ( ) ; run ( "script:C:FijipluginsScriptsPluginsBigStitcherCustom ScriptsBigStitcher_F...
I meant to do macro-scriptable version of that for some time, sorry it took so long!
I finally got around to doing it and just saw that you beat me to it, @oburri
Now I feel kinda bad that you had to do all the work, but thanks a lot anyway!!!
I’ve added flipping (and skewing) as macro-scriptable Commands with the following commit, it will be part of the next release: