Protocol to merge files

Hi everybody,

I wonder if a protocol already exists in Icy to do the following please (I looked but couldn’t find one):

I have a folder with single channel sequences, which have a similar start of file name.
ex: Image1_GFP, Image1_TxRed, Image1_GFP_segmentation and Image1_TxRed_segmentation.
The folder contains many images, each having the four channels individually.

I would like to combine these four channels and save the resulting multi-channel image, in batch mode.

Does anyone have an Icy protocol to do this please?

Many thanks in advance for your help!


It looks like I found a solution with a FIJI macro, but if something turns up in Icy I’d love to hear about it!

It would require a bloc to look at file name, get the four images with identical start of the file name, find the end of the name where the channel info is (GFP, TxRed etc), order the channels correctly (0, 1, 2 and 3), create a merge with four channels and save it as TIFF.

At the moment there is a bloc called Combine Channels, but only two inputs.
Is it possible to use a sequence of 2 or 3 blocs to merge more than two channels?

Many thanks!

1 Like

Dear David,

Indeed the channel block can combine only two channels. The documentation says “Combine Channels: combine two channels from two sequence (possibly the same). For more than 2 channels, you will have to use more “Combine Channels” blocks”.

I am not sure a protocol would be appropriate here because 1) operations on file names in protocols quickly require an important number of blocks and 2) Icy definitely lacks some blocks to do what you would like to do (detect a pattern in a string for instance or combine several channels at a time).

I would rather go for scripting (JavaScript or Jython), as you did in Fiji, and, for instance, build something upon this script example.

Best regards,


Thank you Marion, and thanks too for the very useful script!

All the best,


1 Like