Macro Bio-Importer Concatenate all series

Dear all,
I would like to create a macro to process some (a lot) STED pictures (Zstack / several channels), that will concatenate the different channels. When opening the original format pictures (.obf), the channels are considered as series by the Bio-Format Importer


I wrote the following line of code :
run("Bio-Formats Importer", "open=input_name autoscale color_mode=Colorized concatenate_series rois_import=[ROI manager] view=Hyperstack stack_order=XYCZT series_1 series_2");

The code is working and concatenate the different series, but it is also considering them as the same channel but different timepoints (which is not the case), and I can’t change the color of one channel without changing the full concatenate.

Is there a way to work around this Concatenate option to define different channels in the newly created concatenate ? I tried different things but was unsuccessful so far, the “swap dimensions” is not working for instance.


I suppose the other option would be to use the “Open all series” from Bio-Importer, but then I run into problems to rename the series and merge the channels… This first option above with the concatenate would be easier and mroe universal to handle different kind of STED pictures with various channels.

Thanks a lot for you time and help


as a workaround, you can try to let ImageJ re-order the stack after importing with Bio-Formats:

run("Re-order Hyperstack ...", "channels=[Frames (t)] slices=[Slices (z)] frames=[Channels (c)]");

1 Like

Thanks a lot I didn’t know this function it worked perfectly