A napari plugin for manual registration of (a part of) an image
Project description
Partial-Aligner
A napari plugin to affine transform images and parts of images in 2D and 3D. It was developed in the context of brain slice registration and solves multiple, related problems when working with histology slices.
Installation
You can install Partial-Aligner
via pip:
pip install Partial-Aligner
To make full use of this plugin, please also install the sister plugins:
pip install Label-Creator
pip install Layer-Data-Replace
pip install World2Data
Usage
It is important to note that this plugin is part of a group of plugins (Label-Creator, Layer-Data-Replace, World2Data) which are intended to be used together.
The principle workflow with this plugin is as follows:
- Load an image of interest (ioi) using standard napari.
- Find out meaningful transformation parameters for the ioi (or part of it) based on what you see in the viewer.
- (optional) Save the affine transformation matrix (can later be applied to other modalities)
- Apply the transformation to create a new, altered version of the ioi (use plugin World2Data)
Decisions on the parameters (step 2) are made based on the problem at hand:
- Registration: You have a second (fixed) image and you want to align your ioi to that image? Transform your whole ioi! Just play with the transformation parameters until you are happy with the alignment of ioi and fixed image.
DAPI staining (red) before (left) and after (right) manual registration on an MRI image (green).
- Histology artifact repair: Parts of your histology slice are misplaced? Transform the misplaced parts! Label them and change the transformation parameters for the misplaced parts until you are happy with their alignment with the rest of the image.
Original slice with misplaced region (left), marked using the label function (middle) and after manual adjustment (right), where the misplaced region (green) was cut and newly positioned.
To make this plugin run reasonably fast, the affine transformations are not applied to the image data in real time. Instead, the internal napari viewing parameters are changed according to the transformation parameters. Therefore, to save transformed image data, the World2Data plugin is used, which calculates and saves the resulting image based on the internal napari viewing parameters.
Here we showcase a resulting multimodal 3D alignment of a whole mouse brain. The modalities are CT, MRI, simulated radiation dose distributions, DAPI staining and DNA-damage repair foci, with a Nissl-staining mouse atlas as template.
Contributing
Contributions are very welcome. Tests can be run with tox.
License
Distributed under the terms of the BSD-3 license, "Partial-Aligner" is free and open source software.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for Partial_Aligner-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e0a80b233ee814dd635be5d918d0e38ef470b7e5aa3d5b84edcad4fc4fc914d |
|
MD5 | 5152f4ea3073ca1f321e6880aa02be96 |
|
BLAKE2b-256 | 14bea7b9afabccb9560a9b48d9c95dd854a88c81fb3c23e9f1ed52c86c48ca83 |