PyStack3D

PyStack3D: A python package for fast image stack correction - Published in JOSS (2024)

https://github.com/cea-metrocarac/pystack3d

Science Score: 95.0%

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

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    1 of 4 committers (25.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Scientific Fields

Mathematics Computer Science - 88% confidence
Economics Social Sciences - 85% confidence
Last synced: 4 months ago · JSON representation

Repository

Package to process images stacks (typically from 3D FIB-SEM)

Basic Info
  • Host: GitHub
  • Owner: CEA-MetroCarac
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Size: 179 MB
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 2
  • Open Issues: 0
  • Releases: 6
Created about 2 years ago · Last pushed 4 months ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.md

PyPI Github Doc status

Introduction

PyStack3D is a package dedicated to images correction intended -for instance- to FIB-SEM stack images postprocessing before image segmentation.

The pystack3d workflow includes the following process steps which can be activated or not and executed in any order:

  • cropping to reduce the image field of view to a ROI (Region Of Interest)
  • background removal to reduce from polynomial approximations artefacts issued for instance from shadowing, charging, ...
  • intensity rescaling to homogenize the 'gray' intensity distribution between successive frames/slices
  • registration to correct the images misalignment due to shifting, drift, rotation, ... during the images acquisition
  • destriping to minimize artefacts like stripes that can appear in some image acquisition techniques
  • resampling to correct non uniform spatial steps

An additional step named cropping_final can be used to eliminate artefacts produced near the edges during the image processing or to select another ROI at the end.

Pystack3d can be launched in scripting mode using .toml configuration files (see documentation), or through a dedicated GUI designed with Napari.


a) Synthetic case illustrating the defects to be removed by PyStack3D. b) Corrected stack. c) Ground truth.


Illustration of a FIB-SEM image correction using some of the PyStack3D process steps.

Installation

For a simple install (execution by scripts):

pip install pystack3d

For a GUI install and execution:

pip install pystack3d[gui] pip install PyQt5 # or PyQt6, PySide2, PySide6, if no Qt backend have been already installed in your env. pystack3d

(The GUI install required ~900MB free space on disk)

For a GPU acceleration during the destriping process:

python -m pyvsnr.install_cupy

Refer to pyvsnr for more details.

Tests and examples execution

For tests and examples execution, the full pystack3d project has to be installed via git:

git clone https://github.com/CEA-MetroCarac/pystack3d.git cd [path_to_your_pystack3d_project]

Once the project has been cloned, the python environment has to be created and completed with the pytest package (for testing):

pip install . pip install pytest

Then the tests and the examples can be executed as follows:

pytest cd examples python ex_synthetic_stack.py python ex_real_stack.py

Usage

Refer to the PyStack3D documentation.

Contributing / Reporting an issue

Contributions and issue reporting are more than welcome! Please read through our Developers notes.

Acknowledgements

This work, carried out on the CEA - Platform for Nanocharacterisation (PFNC), was supported by the Recherche Technologique de Base program of the French National Research Agency (ANR).

Warm thanks to the JOSS reviewers (@kasasxav, @sklumpe and @xiuliren) and editor (@mstimberg) for their contributions to enhancing PyStack3D.

Citations

In case you use the results of this code in an article, please cite:

  • Qumr P., David T. (2024). PyStack3D: A Python package for fast image stack correction. Journal of Open Source Software. https://joss.theoj.org/papers/10.21105/joss.07079. (See the About section).

additional citations for the destriping:

  • Pavy K., Qumr P. (2024). Pyvsnr 2.0.0. Zenodo. https://doi.org/10.5281/zenodo.10623640.

  • Fehrenbach J., Weiss P., Lorenzo C. (2012). Variational algorithms to remove stationary noise: applications to microscopy imaging. IEEE Transactions on Image Processing 21.10 (2012): 4420-4430.

additional citation for the registration:

  • Thvenaz P., Ruttimann U.E., Unser M. (1998), A Pyramid Approach to Subpixel Registration Based on Intensity, IEEE Transactions on Image Processing, vol. 7, no. 1, pp. 27-41, January 1998.

Owner

  • Name: CEA-MetroCarac
  • Login: CEA-MetroCarac
  • Kind: organization
  • Location: France

Metrology and Characterization activities at the French Alternative Energies and Atomic Energy Commission

JOSS Publication

PyStack3D: A python package for fast image stack correction
Published
September 23, 2024
Volume 9, Issue 101, Page 7079
Authors
Patrick Quéméré ORCID
Univ. Grenoble Alpes, CEA, Leti, Grenoble, France
Thomas David ORCID
Univ. Grenoble Alpes, CEA, LITEN, Grenoble, France
Editor
Marcel Stimberg ORCID
Tags
stack image processing correction cropping background removal registration intensity rescaling destriping curtaining resampling multithreading multiprocessing FIB-SEM TOF-SIMS

GitHub Events

Total
  • Release event: 13
  • Delete event: 1
  • Push event: 18
  • Pull request event: 2
  • Create event: 6
Last Year
  • Release event: 13
  • Delete event: 1
  • Push event: 18
  • Pull request event: 2
  • Create event: 6

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 227
  • Total Committers: 4
  • Avg Commits per committer: 56.75
  • Development Distribution Score (DDS): 0.053
Past Year
  • Commits: 77
  • Committers: 4
  • Avg Commits per committer: 19.25
  • Development Distribution Score (DDS): 0.052
Top Committers
Name Email Commits
patquem p****e@c****r 215
TomDavFr 1****r 9
Marcel Stimberg m****g@s****r 2
David Haberthür e****l@d****h 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 3
  • Total pull requests: 2
  • Average time to close issues: 22 days
  • Average time to close pull requests: 23 minutes
  • Total issue authors: 2
  • Total pull request authors: 2
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.5
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 2
  • Average time to close issues: 1 day
  • Average time to close pull requests: 23 minutes
  • Issue authors: 1
  • Pull request authors: 2
  • Average comments per issue: 2.5
  • Average comments per pull request: 0.5
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • kasasxav (2)
  • Kevin-Mattheus-Moerman (1)
Pull Request Authors
  • mstimberg (2)
  • habi (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 128 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 5
  • Total maintainers: 1
pypi.org: pystack3d

Pystack3D: A Python package for fast image stack correction

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 128 Last month
Rankings
Dependent packages count: 10.8%
Average: 35.7%
Dependent repos count: 60.6%
Maintainers (1)
Last synced: 4 months ago

Dependencies

.github/workflows/draft-pdf.yml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v1 composite
  • openjournals/openjournals-draft-action master composite
pyproject.toml pypi
  • Pillow *
  • lxml *
  • matplotlib *
  • numpy *
  • parse *
  • pystackreg *
  • pyvsnr *
  • scikit-image *
  • scipy *
  • statsmodels *
  • tifffile *
  • tomli *
  • tomlkit *
.github/workflows/pytest.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/gen-doc.yml actions
  • actions/checkout v4 composite
  • actions/download-artifact v4 composite
  • actions/setup-python v5 composite
  • actions/upload-pages-artifact v3.0.1 composite
.github/workflows/pypi-publish.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • pypa/gh-action-pypi-publish release/v1 composite
doc_requirements.txt pypi
  • ipython *
  • matplotlib *
  • nbsphinx *
  • nbsphinx-link *
  • sphinx <7
  • sphinx-copybutton *
  • sphinx-mdinclude *
  • sphinx-rtd-theme *