This repository contains all the code used to run our code, to register in vivo and ex vivo images. Note that we assume that the cells in the images are segmented properly (we used Cellpose with some training data which works great).
- ex vivo image (as the target)
- in vivo image (as the source)
- ex vivo segmented result
- in vivo segmented result.
- Segmentation (not in this repo)
- Find the potentially matching cells using ICP to incorporate the information on cell morphology as well as the context.
- Find the consensus set by finding consensus matches and the maximum-rotation-set.
- Include more cells to learn the scale of the transformation by neighbor mathching.
- Fine-tuning using iterative non-rigid transformation based on the phase correlation
All our functions are available from ./functions.
Simply run the jupyter notebook ./run_registration.ipynb. This notebook runs the above steps and output the following as the results:
- transformation parameters learned
- registered image
- number of the matching cells.
- Python 3.9.7
- MATLAB2021b
- Python package dependencies:
# platform: linux-64
scipy==1.7.3
numpy==1.21.2
scikit-image==0.18.3
matplotlib==3.5.0
connected-components-3d==3.8.0
open3d==0.14.1
opencv-python==4.5.5.62
pandas==1.3.5
scikit-image==0.18.3
tqdm==4.62.3