Skip to content

About

An automated point-set based registration algorithm for correlative light and electron microscopy (CLEM)

Resources

Stars

23 stars

Watchers

3 watching

Forks

Repository files navigation

napari-clemreg

An automated point cloud based registration algorithm for correlative light and volume electron microscopy

Paper PyPIPyPI - Downloads github github

Overview

CLEM-Reg fully automates the registration step for vCLEM datasets by first segmenting mitochondria in both image modalities, sampling point clouds from these segmentations and registering them. Once registered, the point cloud alignment is used to warp the fluorescence microscopy onto the volume electron microscopy. width=200

Installation

Local Installation

To install napari-clemreg it is recommended to create a fresh conda environment with Python 3.9:

conda create -n clemreg_env python=3.9

Now we must activate the conda environment.

conda activate clemreg_env

Next, install napari with the following command via pip:

pip install "napari[all]"

Then, napari-clemreg can be installed with:

pip install napari-clemreg

Finally, to run napari run the following.

napari

Watch the video

Docker Container

If you would like to run napari-clemreg in a docker container instead of installing it as above, please follow the instructions in our Docker guide

Watch the video

Usage

CLEM-reg is the combination of 5 main steps, electron microscopy segmentation, fluorescence microscopy segmentation, point cloud sampling, point cloud registration and image warping. These 5 steps can be run all at once using the run registration widget. Alternatively, they can be run individually with the numbered widgets.

clemreg_widget_options.png

Run Registration

registration_labels.png

  1. Fluorescence Microscopy Image (FM) - Here you select the layer with the fluorescence microscopy image.
  2. FM Pixel Size (xy) - Here you can set the xy pixel size of your FM image and its corresponding unit.
  3. FM Pixel Size (z) - Here you can set the z pixel size of your FM image and its corresponding unit.
  4. Mask ROI - Here you can select a mask layer which will be used to crop the resulting segmentation mask in the FM.
  5. Electron Microscopy (EM) - Here you can select the layer with the electron microscopy image.
  6. EM Pixel Size (xy) - Here you can set the xy pixel size of your EM image and its corresponding unit.
  7. EM Pixel Size (z) - Here you can set the z pixel size of your EM image and its corresponding unit.
  8. Registration Algorithm - Here you can decide which type of registration algorith will be used for the registration of inputted LM and EM. In terms of speed of each algorithm the following is the generally true, Rigid CPD > Affine CPD > BCPD.
  9. Parameters from JSON - Here you can select a JSON file containing the parameters for the registration.
  10. Parameters custom - If you select this, you will be able to edit the default parameters.
  11. MitoNet Segmentation Parameters - Here are the advanced options for the segmentation of the mitochondria in the EM data.
    1. Prediction Across Three Axis - By selecting this option MitoNet will run segmentation across all three axis of the EM volume and then these three predictions will be aggregate.
  12. LoG Segmentation Parameters - Here are the advanced options for the segmentation of the mitochondria in the LM data.
    1. Sigma - Sigma value for the Laplacian of Gaussian filter.
    2. Threshold - Threshold value for the segmenting the LM data.
    3. Apply size filter to segmentation - If you select this, you can then select a lower and upper volume threshold to filter out spurious segmentation.
  13. Point Cloud Sampling - Here are the advanced options for the point cloud sampling of the segmentations of the LM and EM data.
    1. Sampling Frequency - Frequency of point sampling from the fixed and moving segmentation. The greater the value the more points in the point cloud.
    2. Voxel Size - The size voxel size of each point. Smaller the size the less memory consumption.
    3. Sigma - Sigma value for the canny edge filter.
  14. Point Cloud Registration - Here are the advanced options for the registration of the point clouds of both the LM and EM data.
    1. Maximum Iterations - The number of round of point cloud registration. If too small it won't converge on an opitmal registration.
  15. Image Warping - Here are the advanced options for the image warping of the moving images.
    1. Interpolation Order - The order of the spline interpolation.
    2. Aproximate Grid - Controls the "resolution" of the grid onto which you're warping. A higher value reduces the step size between coordinates.
    3. Sub-division Factor - Controls the size of the chunk when applying the warping.
  16. Save Parameters - Here you can select the option to save the advanced options you've selected to a JSON file which can be kept for reproducibility as well as running the registration again.
  17. Visualise Intermediate Results - Here you can select to view the outputs of each step as they are completed.
  18. Registration direction - Here you can select which of the modalities will be registered to the other. Either EM to FM or FM to EM.

Watch the video

Split Registration

As well as being able to run all the steps of CLEM-reg in one widget (the Run registration widget), you are also able to do all these steps independently using the Split Registration functionality.

There are four separate widgets that encapsulate the 5 steps of CLEM-reg each of which have their own unique input and output:

  1. Electron Micrscopy (EM) Segmentation
    • Input: EM Image
    • Output: EM Segmentation
  2. Fluorescence Microscopy (FM) Segmentation
    • Input: LM Image
    • Output: LM Segmentation
  3. Point Cloud Sampling
    • Input: LM Segmentation & EM Segmentation
    • Output: LM Point Cloud & LM Point Cloud
  4. Point Cloud Registration & Image Warping
    • Input: EM Image, LM Image, LM Point Cloud & EM Point Cloud
    • Output: Registered LM Image, Registered LM Point Cloud

Watch the video

Registering Multiple LM Channels

One can register multiple LM channels at once by doing the following.

  1. Start by splitting the LM channels into the separate layers by right-clicking on the layer and then selecting Split Stack. merged-channel-split-options.png This will result in each of the channels having their own individual layer.

  2. Once this is done we must link all the LM layers together, this is done by selecting all the layers which will highlight them in blue, once again right-clicking on the layer and then selecting Link Layers. split-channels-link-layers.png

  3. When you finally go to run CLEM-reg ensure that for the Moving Image you select the LM layer that contains mitochondria.

Datasets

Below are the links to the datasets that were used as part of this study.

EMPIAR-10819

EMPIAR-11537

Here is a sample dataset which is the binned version of EMPIAR-10819: https://zenodo.org/records/7936982.

How to cite

@article{krentzel2025clem,
  title={CLEM-Reg: an automated point cloud-based registration algorithm for volume correlative light and electron microscopy},
  author={Krentzel, Daniel and Elphick, Matou{\v{s}} and Domart, Marie-Charlotte and Peddie, Christopher J and Laine, Romain F and Shand, Cameron and Henriques, Ricardo and Collinson, Lucy M and Jones, Martin L},
  journal={Nature Methods},
  pages={1--12},
  year={2025},
  publisher={Nature Publishing Group US New York}
}

License

Distributed under the terms of the MIT licence, "napari-clemreg" is free and open source software

About

An automated point-set based registration algorithm for correlative light and electron microscopy (CLEM)

Resources

Stars

23 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages