Stitches images using a modified version of the algorithm described in Globally optimal stitching of tiled 3D microscopic image acquisitions.
The algorithm is modified to include a system to prioritize tile offset values within a distribution values to improve robustness for images containing periodic, or minimal features.
- Install Rust
- Open command line, change working directory to this repository.
cd stitching
- Run
cd rust
- Run
cargo install --path .
- The stitching program is now installed and can be invoked with the
stitch
command
Set up a stitch_config.json
file in the directory containing your images. The basic format is as follows:
{
"mode": "3d",
"overlap_ratio": [0.2, 0.2, 0.2],
"tiles": [
{
"path": "tile1.dcm",
"x": 0,
"y": 0,
"z": 0,
"width": 100,
"height": 100,
"depth": 100
},
{
"path": "tile2.dcm",
"x": 100,
"y": 0,
"z": 0,
"width": 100,
"height": 100,
"depth": 100
},
{
"path": "tile2.dcm",
"x": 200,
"y": 0,
"z": 0,
"width": 100,
"height": 100,
"depth": 100
}
]
}
You can then run stitch <path_to_stitch_config_file>
to run stitching. The results will be output in the output
folder.
Additionally, you can go to https://webstitch.app/ to easily generate configuration files for both this program and ImageJ.