microaligner

Image registration (alignment) software for large microscopy images

https://github.com/vasylvaskivskyi/microaligner

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.2%) to scientific vocabulary

Keywords

alignment image-processing microscopy registration
Last synced: 6 months ago · JSON representation ·

Repository

Image registration (alignment) software for large microscopy images

Basic Info
  • Host: GitHub
  • Owner: VasylVaskivskyi
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 172 KB
Statistics
  • Stars: 25
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 1
Topics
alignment image-processing microscopy registration
Created over 3 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

MicroAligner: image registration for large scale microscopy

  • Automatic, no need to manually select points of interest
  • Fast, most of internal tasks are parallelized
  • Memory efficient, keeps only one image page in the memory at a time
  • Scalable, the more cores you have the faster it works
  • Linear and non-linear alignment, gives best results together in that order

There are two main methods that can do alignment, and also a pipeline that can run both of them based on parameters provided in a config file.

Methods:

Affine feature based registration method first finds image features using FAST feature finder. It detects areas with large intensity changes. After that a DAISY feature descriptor collects histograms of oriented gradients for each found feature. Then the described features are matched using FLANN based knn matcher that finds correspondence between features of reference and moving images. The matches are filtered according to the distance between the neighbours. Finally, the coordinates of matched features are aligned using RANSAC algorithm and the affine transformation is computed. This method is good for aligning large linear drifts across images.

Non-linear optical flow based registration uses Farneback method that looks for pixels with the highest similarity in the given window. Then for each pixel it computes a 2D vector that describes movement of the pixel from one image to the other. This method is good for aligning of small local shifts across images.

If you have uneven illumination across the image, and it affects the registration quality, you can try to tackle that by enabling image preprocessing with difference of Gaussians (DOG). It will extract information about strong gradients near the edges and discard gradual changes caused by uneven illumination.

Pipeline:

If images have z-planes, the script perform maximum intensity projection along the z dimension before doing the registration, so the alignment happens only in X-Y coordinates. The output image has OME-TIFF metadata, and dimension order TCZYX.

The pipeline accepts a YAML config file. Please check config_examples folder inside this repo.

Installation

pip install microaligner

Dependencies

numpy tifffile pandas opencv-contrib-python dask scikit-learn scikit-image pint \ Also check up the environment.yaml file.

Example usage

As a pipeline

microaligner config.yaml

For details about the config parameters please refer to the example config.yaml provided in this repository.

As a module

Feature based registration

```python from microaligner import FeatureRegistrator, transformimgwithtmat freg = FeatureRegistrator() freg.refimg = img1 freg.movimg = img2 transformationmatrix = freg.register()

img2featureregaligned = transformimgwithtmat(img2, img2.shape, transformation_matrix) ```

Optical flow based registration

```python from microaligner import OptFlowRegistrator, Warper ofreg = OptFlowRegistrator() ofreg.refimg = img1 ofreg.movimg = img2 flow_map = ofreg.register()

warper = Warper() warper.image = img2 warper.flow = flowmap img2optflowregaligned = warper.warp() ```

Acknowledgments

This package could have never been developed without thorough battle-testing by Tong Li and Jun Sung Park, and guidance from Omer Bayraktar.

Owner

  • Login: VasylVaskivskyi
  • Kind: user
  • Company: OIST

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Vaskivskyi"
  given-names: "Vasyl"
  orcid: "https://orcid.org/0000-0002-4080-4965"
title: "MicroAligner: image registration for large scale microscopy"
version: 1.0.0
date-released: 2022-05-11
license: GPL-3.0
url: "https://github.com/VasylVaskivskyi/MicroAligner"

GitHub Events

Total
  • Watch event: 4
Last Year
  • Watch event: 4

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 2
  • Total pull requests: 0
  • Average time to close issues: about 2 months
  • Average time to close pull requests: N/A
  • Total issue authors: 2
  • Total pull request authors: 0
  • Average comments per issue: 2.5
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • brian1000 (1)
  • kevinjohncutler (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 18 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 1
  • Total maintainers: 1
pypi.org: microaligner

MicroAligner: image registration for large scale microscopy

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 18 Last month
Rankings
Dependent packages count: 10.0%
Stargazers count: 17.7%
Dependent repos count: 21.8%
Forks count: 22.6%
Average: 22.9%
Downloads: 42.6%
Maintainers (1)
Last synced: 6 months ago