A microscope can capture a defined area of a sample. This area is called Field-of-View (FOV) and depends on the optical configuration and microscope acquisition device. This is a limiting feature of microscopy. To be able to observe with a higher resolution the total visualized area is reduced. This can be an issue when trying to visualize feature that are bigger than the FOV.
One way to deal with this issue is to acquire multiple images and stitch them together after acquisition. Instead of acquiring adjacent FOV it is best to have partially overlapping regions. These regions will help to stitch images together.
While many softwares provide proprietary stitching solution we will focus here on the free and versatile plugin for ImageJ named Grid Collection Stitching.
Developed by Stephan Preibisch, this plugin is also part of FIJI distribution of ImageJ.
Stitching usually occurs in 3 steps:
Three pieces of information can be used to define the layout.
1. Images metadata
Modern microscopes use motorized stages to move the sample in X and Y. These coordinates can be stored in the image metadata and used during stitching. Knowing the approximate position of each tile greatly help stitching as you just have to compute the fine matching between the different images.
2. Tiles configuration and acquisition order
if you have 25 images (Image 1, Image 2,....) and know that it comes from a 5 x 5 acquisition from the top left to the bottom righ, by row from left to right; then you can quickly place your images to their approximate positions. Sometimes the tile configuration is directly saved into the file names (Image X1Y1, Image X2Y1 etc.), this can also be used to define the approximate tile layout
3. Images themselves
The data in the image can also be used to define the layout. It requires computing power as it usually parse all possible pairwise combination and compute a correlation coefficient. It then matches images with highest correlation.
Once the layout is defined, the images need to be finely adjusted one to another. Because microscopes are not perfect some translation and rotation can be used to finely match identified features in adjacent images. To do this images are usually acquired with a 10 to 20% overlapping region. This region will be used to finely match adjacent images.
A blending can be applied to the overlapping region to ensure a smooth tiled result.
Your files are saved under Tile_x001_y001.tif, you know the grid size and the percentage overlap
Several options are available I recommend using the following:
Your files are saved under Tile_001.tif, you know the grid size, the acquisition order and the percentage overlap
Several options are available I recommend using the following:
Your are capturing images with a manual stage. If you read this before the acquisition I would suggest to acquire your tiles using a given size and scheme (for example 3x3 snake horizontal right). This will allow to use the process above (except Type Grid: Snake by rows). Make sure to have some overlap between images to be able to finely place them. Since you are probably reading this after your acquisition you would have file saved as Tile_001.tif... but you do not know the grid size or the acquisition order nor the percentage overlap
Several options are available I recommend using the following:
If you choose Type: Grid the plugin except sequential continuous files i i+1 etc...
If you choose Positions from File the plugin expect one single file multiseries file. To Combine several files into one single T series, open the images individually or all together Then combine them as a stack
Image>Stacks>Images to Stack
Check use tiltes as labels
then convert the Stack to a T serie
Image>Hyperstacks>Stacks to Hyperstacks
Slices (z)=1 Frames (t)=number that was in z and you have replaced by 1
In my experience proprietary softwares do not encode X and Y values in the metadata properly so this method is not often used
Type: Positions from file
Use this is you want to use the image metadata to define the tile positions. This only works if you have one single input file with all the tiles inside. In my experience this works when the file issaved under the acquisition software proprietary format.
You can also use this type of stitching if you have an additional text files defining the position of each image. You can also create this file yourself
# Define the number of dimensions we are working on dim = 3 # Define the image coordinates (in pixels) img_01.tif; ; (0.0, 0.0, 0.0) img_05.tif; ; (409.0, 0.0, 0.0) img_10.tif; ; (0.0, 409.0, 0.0) img_15.tif; ; (409.0, 409.0, 0.0) img_20.tif; ; (0.0, 818.0, 0.0) img_25.tif; ; (409.0, 818.0, 0.0) |
The higher the overlap the more computing power required. It is much easier to stitch when the layout is known. It is much easier to stitch images when there are many visible features: slide of tissue is easier than sparse cell culture; bright field images are easier than fluorescence images |
You can easily rename files on a mac using Automator. On a PC you can use Bulk Rename Utility |
More information