Skip to main content

napari-dmc-brainmap

DMC-BrainMap is an end-to-end tool for multi-feature brain mapping across species.
This napari plugin was generated with Cookiecutter using napari's cookiecutter-napari-plugin template.

Tests codecov PyPI Python 3.12 | 3.13 | 3.14 napari hub Documentation License: BSD-3-Clause

Quick start

User guides and tutorials are available in the project wiki. The generated technical documentation is published on Read the Docs.

Installation

DMC-BrainMap is a plugin for napari. There are two recommended installation paths, depending on whether you want to use the released plugin or develop the code.

DMC-BrainMap supports Python 3.12 through 3.14. On macOS, Apple Silicon is required; Intel Macs are not supported.

Users

First install napari by following the napari installation guide. DMC-BrainMap requires napari 0.7 or newer, is tested with napari 0.8 and the current release (0.10), and installs into the same environment without replacing your napari version. Then install DMC-BrainMap from napari's graphical plugin manager:

Plugins > Install/Uninstall Plugins...

Search for napari-dmc-brainmap, then install it from the plugin manager. Napari handles the plugin installation graphically.

You can also install the released plugin from the command line, in the same environment as napari:

python -m pip install napari-dmc-brainmap

If you installed napari with uv, use uv pip install napari-dmc-brainmap instead.

Optional registration prediction

PyTorch is optional and is not installed with the standard plugin. To use the registration prediction feature in a pip or napari environment, install the CPU-only build separately:

python -m pip install "torch>=2.12.0" --index-url https://download.pytorch.org/whl/cpu

See the prediction-assisted registration guide for model download, setup, usage, and quality-control guidance.

After installation, open DMC-BrainMap from the napari plugin menu:

Plugins > dmc_brainmap

Developers

For troubleshooting and contributing to repo development, install the repository as an editable project with uv. In editable mode, code changes in this repository are picked up the next time napari is started with uv run napari.

First install uv if needed, following the uv installation guide.

Clone the repository:

git clone https://github.com/hejDMC/napari-dmc-brainmap.git
cd napari-dmc-brainmap

Sync the environment:

uv sync

This creates the project environment with a compatible Python version, installs napari and all required dependencies, and installs napari-dmc-brainmap from the local checkout. Optional prediction support is installed only when the prediction extra is selected as described below.

Optional registration prediction

Enable the prediction extra when synchronizing the development environment:

uv sync --extra prediction

To include both prediction and test dependencies, use:

uv sync --extra prediction --group test

uv sync --all-extras also installs prediction support. A plain uv sync intentionally excludes optional extras and may remove a previously installed PyTorch package during exact synchronization. PyTorch remains recorded in uv.lock so the selected extra stays reproducible.

Start napari:

uv run napari

Then find DMC-BrainMap from the napari plugin menu:

Plugins > dmc_brainmap

Usage

Coordinate convention

DMC-BrainMap uses a left-positive mediolateral convention in result CSV files and user-facing analysis: ML > 0 is anatomical left and ML < 0 is anatomical right. In an unflipped coronal BrainGlobe atlas image, anatomical left appears on image-right because the atlas rl index increases from right to left. See the coordinate and hemisphere conventions for result-file compatibility and mirroring details.

Please refer to the Wiki pages for detailed instructions and a short tutorial on how to use DMC-BrainMap. When working with DMC-BrainMap on your own data, please keep the following points in mind:

  • DMC-BrainMap requires single-channel 16-bit .tif/.tiff images to work (in principle 8-bit also work)
  • DMC-BrainMap requires that your data is organized by animals in separate folders (you can pool data later down the lane)
  • DMC-BrainMap uses 5 channel labels (dapi, green, n3, cy3, cy5) corresponding to blue, green, orange, red and far red channels. However, these are only labels, you can assign them as you please. Hence, you can use DMC-BrainMap also for non-fluorescence data given you converted your images to single-channel 16-bit .tif/.tiff images. Please contact us if you need to use more than 5 channels.
  • It is essential that you structure your data in the following way (hierarchical organization, same name for images in different channels, channel labels are selected by you), otherwise DMC-BrainMap won't work:
animal_id-001
│
└───stitched
│   │
│   └───dapi
│   |    │   animal_id-001_001.tiff
│   |    │   animal_id-001_002.tiff
|   │    |   animal_id-001_003.tiff
│   |    │   animal_id-001_004.tiff
│   |    │   ...
│   │   
│   └───green
│       │   animal_id-001_001.tiff
│       │   animal_id-001_002.tiff
│       │   animal_id-001_003.tiff
│       │   animal_id-001_004.tiff
│       │   ...
│   
animal_id-2
│   ...

Documentation

Seeking help or contributing

DMC-BrainMap is an open-source project, and we welcome contributions of all kinds. If you have any questions, feedback, or suggestions, please feel free to open an issue on this repository.

License

Distributed under the terms of the BSD-3 license, "napari-dmc-brainmap" is free and open source software

Citing DMC-BrainMap

If you use DMC-BrainMap in your scientific work, please cite:

Jung, F., Cao, X., Heymans, L., Carlén, M. (2026) "DMC-BrainMap is an open-source, end-to-end tool for multi-feature brain mapping across species", Cell Reports Methods, https://doi.org/10.1016/j.crmeth.2026.101302

BibTeX:

@article{Jung2026a,
title = {DMC-BrainMap is an open-source, end-to-end tool for multi-feature brain mapping in different species},
journal = {Cell Reports Methods},
volume = {6},
number = {2},
pages = {101302},
year = {2026},
issn = {2667-2375},
doi = {https://doi.org/10.1016/j.crmeth.2026.101302},
url = {https://www.sciencedirect.com/science/article/pii/S2667237526000020},
author = {Felix Jung and Xiao Cao and Loran Heymans and Marie Carlén}
}

Metadata

Release files for napari-dmc-brainmap 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for napari-dmc-brainmap 0.2.3
File Size Uploaded Provenance Actions
napari_dmc_brainmap-0.2.3.tar.gz 443.9 kB Without provenance Details for napari_dmc_brainmap-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for napari-dmc-brainmap 0.2.3
File Interpreter ABI Platform Actions
napari_dmc_brainmap-0.2.3-py3-none-any.whl Python 3 none any Details for napari_dmc_brainmap-0.2.3-py3-none-any.whl

Total release size: 882.4 kB

Release files / napari_dmc_brainmap-0.2.3.tar.gz

Download URL napari_dmc_brainmap-0.2.3.tar.gz
Size 443.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5e83c67ce39b4a86c45224038a4880398b29c48dc91c2b8b1ae30b4ffc42d313
BLAKE2b-256 checksum
How to use checksums
cf98a2c889c21593e3b2d1de499c2f80e15c35ede82c31786507fc378a0d5dd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release files / napari_dmc_brainmap-0.2.3-py3-none-any.whl

Download URL napari_dmc_brainmap-0.2.3-py3-none-any.whl
Size 438.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53f148e04dcf2f34c7dc32ed6468778094e3df51709f8ed4b51da4cc197c2259
BLAKE2b-256 checksum
How to use checksums
c24d1f606d008c2b4be9935bba7640775a8b5c190fd7bf8e4f414de7adbd6698
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Security for napari-dmc-brainmap 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page