Giter VIP home page Giter VIP logo

partial-aligner's Introduction

Partial-Aligner

License PyPI Python Version

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:

  1. Load an image of interest (ioi) using standard napari.
  2. Find out meaningful transformation parameters for the ioi (or part of it) based on what you see in the viewer.
  3. (optional) Save the affine transformation matrix (can later be applied to other modalities)
  4. 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.

3D_video.mov

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.

partial-aligner's People

Contributors

mbphys avatar robanko avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.