Development of Python-based 2D section -> 3D atlas registration tool

Hi all,

During the development of cellfinder and amap, I have been asked many times about registration of 2D tissue sections to a 3D anatomical atlas, and there appears to be demand for a new Python-based tool to do this.

To be clear, there are already many excellent tools that do just this, and my previous response was to point users to these tools, and to avoid reinventing the wheel. However, it appears that for one reason or another, these existing tools are not suitable for everyone.

There will soon be someone recruited specifically for this project, but rather than developing this in private and then releasing to the world, we are following the lead of @haesleinhuepf (and many others) by developing entirely in the open. We are inviting anyone interested to get in touch and help develop core functionality, work on new features, test the software or suggest improvements.

I have set up a GitHub organisation to coordinate the development of this tool, so if you are interested in joining the discussion, send me your GitHub username and I can add you. Alternatively, feel free to message me on here, or via twitter.

As GitHub organisation discussions are private, I’ve copied the initial message below.

If you have any questions, please get in touch.


Hi all,

Thanks for responding to the call about developing a Python-based 2D section -> 3D atlas registration tool.


The motivation behind this is due to the many requests I received about adding 2D data support for cellfinder and amap.

To be clear, there are many excellent tools that already do this, including (but not limited to):

However, there appears to be a demand for a new Python-based approach to solving these problems. Benefits could include:

  • A more comfortable development environment, for the many biologists moving to Python to take advantage of new tools (such as the excellent DeepLabCut.
  • Easier integration with Python-based tools, such as napari for visualisation and tensorflow for machine learning.
  • Integration with cellfinder and amap.This would allow the use of additional features developed for these tools, and exploration of multi-modal data.
  • Integration with additional tools for visualisation, such as brainrender by @FedeClaudi.
  • Compatibility with any atlas from any species via the brainglobe project. First version to be released soon, with multiple atlases for mouse, rat, zebrafish and human.


Although amap works well and has been valdated. It is limited to a specific type of data (full 3D images of an entire mouse brain). amap will be extended to other species and atlases via the brainglobe project, and registering smaller 3D volumes should also be possible (see issue).

What is missing is a 2D image to 3D atlas registration package, which will:

  • Be compatible with any existing atlas
  • Support arbitrary planes of section
  • Deal with sample imperfections (tilts, rotations, damage)
  • Support many sample preparation and staining techniques
  • Support multiple imaging modalities
  • Support the transformation of detected features (cells, fibre tracts) into standard space
  • Allow manual curation
  • Have batch functionality (for processing many sections from one organ)

I’m sure many of these aims have been achieved by existing software. We in no way want to reinvent the wheel, but as it stands, it seems that the available tools are not appropriate for all users. With this in mind, if you know of any existing tools (or have developed them), we would love to work together to make them compatible.

Why does this organisation exist?

Although this project aims for compatibility with cellfinder, amap and brainrender, it will be a standalone tool, and the development will be lead by @jonnykohl and his lab.

Rather that develop a tool for one application in a single lab, we want to make a tool with and for the community. Too much software in academia is released with little attention to how easy it is to use, and with no plan for longer term support.

With this in mind, we would like your help to develop this software collaboratively. This could include:

  • Suggesting features we may not have thought of, and which could help your research
  • Testing early versions of the software and submitting bug reports
  • Contributing to the project:
    • Developing core functionality
    • Addition additional functionality
    • Writing and improving documentation and tutorials

What’s in it for me?

The reason we are developing all this in the open is to prevent duplication of effort. By contributing to this project, you can help develop the perfect tool for your research, without having to develop the whole thing.

How can I help?

Initially you can help in three ways:

  • Get the ball rolling, and submit a pull request. Take a look at the (slightly out of date) roadmap which will give some hints on how to get started.
  • Comment here, or raise issues on the slicereg repository about features you would like to see.
  • Spread the word, and tell anyone else you think might be interested.

N.B. initial development may be a bit slow, until the person with the main responsibility for this work starts


If anyone want’s to be paid to work on this, Johannes Kohl’s lab at the Francis Crick Institute in London (U.K.) is hiring for a 12 month (potentially remote position). More details to follow, but get in touch with me if you’re interested.

job_description_sliceReg.pdf (72.8 KB)

1 Like

Application now live here: Deadline July 26th.

1 Like