Multi Stack Montage

Multi Stack Montage (ImageJ)
Author Olivier Burri, Romain Guiet
Maintainer Olivier Burri
File Multi_Stack_Montage.jar
Source on GitHub
Initial release August 2015
Latest version August 2015
Development status stable
Category Stacks|Montage|Visualization
Website BIOP Staff Page


This plugin brings a bit more functionality that was not available using the Make Montage... Plugin, namely making montages out of multiple stacks and hyperstacks.


This plugin is available from the BIOP Update Site This places it in a "BIOP" Folder in the plugins directory of Fiji/ImageJ


Call up the plugin using Plugins->BIOP->Multi Stack Montage... and select the stacks that you wish to use.

Interface of the plugin

In the case that there would be many images open, the plugin does not pre-select any images.

Example on RGB Stacks. Also works on multichannel, multislice, timepoints and any combination

This plugin is useful when montaging multiple views or when montaging RGB datasets all in one go.

Macro Recordable

Making use of the GenericDialog class, the plugin is macro-recordable.

run("Multi Stack Montage...", "stack_1=Image1 stack_2=[Another Image] stack_3=Image3 rows=2 columns=2");

Running from a Plugin

What you need to run this in a plugin is

import ch.epfl.biop.StackMontage;

And then call the static method

ImagePlus montaged_image = StackMontage.montageImages(ArrayList<ImagePlus> theimages, int nrows, int ncols);

You can have a look at this minimal plugin that runs StackMontage.

import ij.*;
import ij.plugin.*;

// Required by StackMontage
import java.util.ArrayList;
import ch.epfl.biop.StackMontage;

 * Short example on making hyperstack montages
 * @author Romain Guiet, Olivier Burri
 * @version 1.0
public class My_Plugin implements PlugIn {

	public void run(String arg) {

		// Make some nice images
		ImagePlus imp = IJ.openImage("");
		String imageName = imp.getTitle();

		// Recolor them
		ImagePlus imp1 = new Duplicator().run(imp, 1, 2, 1, 25, 1, 1);, "Blue", "");
		ImagePlus imp2 = new Duplicator().run(imp1, 1, 2, 1, 25, 1, 1);
		imp2.setC(2);, "Magenta", "");
		ImagePlus imp3 = new Duplicator().run(imp2, 1, 2, 1, 25, 1, 1);
		imp3.setC(1);, "Cyan", "");
		imp3.setTitle(imageName+"c1Cyan_c2Magenta");, "RGB Color", "slices");, "RGB Color", "slices");, "RGB Color", "slices");, "RGB Color", "slices");

		// Montage Options
		int nrows = 2;
		int ncols = 2;
		// Prepare container for images
		ArrayList<ImagePlus> images = new ArrayList<ImagePlus>();
		// Add images to ArrayList for the montage

		// Make the montage
		ImagePlus impr = StackMontage.montageImages(images, nrows, ncols);
		// Show the result;



The Dialog is limited to 10 elements so as not to make a window potentially larger than the monitor's vertical resolution. However, it is unlimited if calling it from the macro recorder.

You do not need to enter "*None*" as the last stack.