PlatiPy

PlatiPy: Processing Library and Analysis Toolkit for Medical Imaging in Python - Published in JOSS (2023)

https://github.com/pyplati/platipy

Science Score: 100.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
    Found 8 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    1 of 12 committers (8.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

image-analysis medical-imaging python registration segmentation visualization

Keywords from Contributors

mesh

Scientific Fields

Computer Science Computer Science - 88% confidence
Artificial Intelligence and Machine Learning Computer Science - 83% confidence
Last synced: 4 months ago · JSON representation ·

Repository

Processing Library and Analysis Toolkit for Medical Imaging in Python

Basic Info
Statistics
  • Stars: 135
  • Watchers: 3
  • Forks: 29
  • Open Issues: 30
  • Releases: 15
Topics
image-analysis medical-imaging python registration segmentation visualization
Created over 5 years ago · Last pushed 7 months ago
Metadata Files
Readme Contributing Citation

README.md

PlatiPy

DOI

Processing Library and Analysis Toolkit for Medical Imaging in Python

PlatiPy is a library of amazing tools for image processing and analysis - designed specifically for medical imaging!

Check out the PlatiPy documentation for more info.

This project was motivated by the need for a simple way to use, visualise, process, and analyse medical images. Many of the tools and algorithms are designed in the context of radiation therapy, although they are more widely applicable to other fields that use 2D, 3D, or 4D imaging.

PlatiPy is written in Python, and uses SimpleITK, VTK, and standard Python libraries. Jupyter notebooks are provided where possible, mainly for guidance on getting started with using the tools. We welcome feedback and contributions from the community (yes, you!) and you can find more information about contributing here.

What can I do with platipy?

A lot! A good place to start is by looking in the examples directory.

Or checkout this presentation by Rob Finnegan at MRI Together 2023 for a great overview of PlatiPy:

Unlocking medical imaging with PlatiPy (R. Finnegan)

Some examples of what PlatiPy can do:

  • DICOM organising and converting:
    • Bulk convert from multiple series and studies with a single function
    • Convert DICOM-RT structure and dose files to NIfTI images
    • Create DICOM-RT structure files from binary masks e.g. from automatic contouring algorithms
  • Image registration
    • Register images and transform labels with a few lines of code
    • Linear transformations: rigid, affine, similarity
    • Non-linear deformable transformations: demons, b-splines
    • Multiple metrics for optimisation
  • Atlas-based segmentation
  • Synthetic deformation field generation
    • Simulate anatomically realistic shifts, expansions, and bending
    • Compare DIR results from clinical systems
  • Basic tools for image processing and analysis
    • Computing label similarity metrics: DSC, mean distance to agreement, Hausdorff distance, and more
    • Cropping images to a region of interest
    • Rotate images and generate maximum/mean intensity projections (beams eye view modelling)

A major part of this package is visualisation, and some examples are shown below!

Visualise some contours

``` python from platipy.imaging import ImageVisualiser

vis = ImageVisualiser(image) vis.add_contour(contours) fig = vis.show() ```

Figure 1

Register some images

```python from platipy.imaging.registration.linear import linear_registration

image2registered, tfm = linearregistration( image1, image_2 )

vis = ImageVisualiser(image1) vis.addcomparisonoverlay(image2_registered) fig = vis.show() ```

Figure 2

Calculate deformation vector fields

```python from platipy.imaging.registration.deformable import fastsymmetricforcesdemonsregistration

image2deformed, tfmdir, dvf = fastsymmetricforcesdemonsregistration( image1, image2registered )

vis = ImageVisualiser(image2deformed, axis="z") vis.addvectoroverlay( dvf, subsample=12, arrowscale=1, arrowwidth=2, colormap=plt.cm.magma, name="DVF magnitude [mm]", color_function="magnitude" ) fig = vis.show() ```

Figure 3

Getting started

There aren't many requirements, just an installed Python interpreter (3.7 or greater). PlatiPy can be installed with pip:

bash pip install platipy

The base installation of platipy does not include some large libraries needed for various components of platipy. The following extras are available to install to run specific platipy tools:

bash pip install platipy[cardiac] pip install platipy[nnunet] pip install platipy[backend]

Authors

Owner

  • Name: pyplati
  • Login: pyplati
  • Kind: organization

JOSS Publication

PlatiPy: Processing Library and Analysis Toolkit for Medical Imaging in Python
Published
June 26, 2023
Volume 8, Issue 86, Page 5374
Authors
Phillip Chlap ORCID
South Western Sydney Clinical School, University of New South Wales, Australia, Ingham Institute for Applied Medical Research, Australia, Liverpool Cancer Therapy Centre, Liverpool Hospital, Australia
Robert N. Finnegan ORCID
University of Sydney, Australia, Ingham Institute for Applied Medical Research, Australia, Northern Sydney Cancer Centre, Royal North Shore Hospital, Australia
Editor
Samuel Forbes ORCID
Tags
medical image analysis radiotherapy visualisation DICOM

Citation (CITATION.cff)

cff-version: "1.2.0"
authors:
- family-names: Chlap
  given-names: Phillip
  orcid: "https://orcid.org/0000-0002-6517-8745"
- family-names: Finnegan
  given-names: Robert N.
  orcid: "https://orcid.org/0000-0003-4728-8462"
doi: 10.5281/zenodo.8032858
message: If you use this software, please cite our article in the
  Journal of Open Source Software.
preferred-citation:
  authors:
  - family-names: Chlap
    given-names: Phillip
    orcid: "https://orcid.org/0000-0002-6517-8745"
  - family-names: Finnegan
    given-names: Robert N.
    orcid: "https://orcid.org/0000-0003-4728-8462"
  date-published: 2023-06-26
  doi: 10.21105/joss.05374
  issn: 2475-9066
  issue: 86
  journal: Journal of Open Source Software
  publisher:
    name: Open Journals
  start: 5374
  title: "PlatiPy: Processing Library and Analysis Toolkit for Medical
    Imaging in Python"
  type: article
  url: "https://joss.theoj.org/papers/10.21105/joss.05374"
  volume: 8
title: "PlatiPy: Processing Library and Analysis Toolkit for Medical
  Imaging in Python"

GitHub Events

Total
  • Issues event: 9
  • Watch event: 19
  • Delete event: 2
  • Issue comment event: 17
  • Push event: 4
  • Pull request review event: 4
  • Pull request event: 11
  • Fork event: 2
  • Create event: 5
Last Year
  • Issues event: 9
  • Watch event: 19
  • Delete event: 2
  • Issue comment event: 17
  • Push event: 4
  • Pull request review event: 4
  • Pull request event: 11
  • Fork event: 2
  • Create event: 5

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 744
  • Total Committers: 12
  • Avg Commits per committer: 62.0
  • Development Distribution Score (DDS): 0.402
Past Year
  • Commits: 10
  • Committers: 4
  • Avg Commits per committer: 2.5
  • Development Distribution Score (DDS): 0.5
Top Committers
Name Email Commits
Phillip Chlap p****p@u****u 445
rnfinnegan r****n@g****m 240
dependabot[bot] 4****] 41
Simon Biggs s****s@r****i 8
Phillip Chlap p****p@s****u 3
S. Gay s****7@g****m 1
Justin Kirby 2****u 1
Jing Zhang j****r@g****m 1
Gabriele g****b@g****m 1
David Barbee b****d@g****m 1
Daniel Al Mouiee d****e@g****m 1
Phillip Chlap p****p@r****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 48
  • Total pull requests: 72
  • Average time to close issues: about 1 year
  • Average time to close pull requests: 25 days
  • Total issue authors: 31
  • Total pull request authors: 9
  • Average comments per issue: 2.13
  • Average comments per pull request: 0.17
  • Merged pull requests: 60
  • Bot issues: 0
  • Bot pull requests: 38
Past Year
  • Issues: 10
  • Pull requests: 14
  • Average time to close issues: 5 days
  • Average time to close pull requests: 2 days
  • Issue authors: 9
  • Pull request authors: 4
  • Average comments per issue: 1.2
  • Average comments per pull request: 0.21
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 7
Top Authors
Issue Authors
  • pchlap (5)
  • dalmouiee (5)
  • rnfinnegan (5)
  • MarkGardnerUSyd (3)
  • Ken32g (2)
  • CrytoGen (2)
  • denbonte (2)
  • jaketakes (1)
  • 1413194910 (1)
  • bwheelz36 (1)
  • YYAN97 (1)
  • brendan-whelan-seetreat (1)
  • dlbarbee (1)
  • MLK97 (1)
  • VincentBourbon (1)
Pull Request Authors
  • dependabot[bot] (61)
  • pchlap (30)
  • rnfinnegan (3)
  • kirbyju (2)
  • dlbarbee (2)
  • dalmouiee (2)
  • jizhang02 (2)
  • tomaroberts (2)
  • StellarStorm (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (61) python (7)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 1,125 last-month
  • Total docker downloads: 674
  • Total dependent packages: 3
  • Total dependent repositories: 9
  • Total versions: 20
  • Total maintainers: 1
pypi.org: platipy

Processing Library and Analysis Toolkit for Medical Imaging in Python

  • Versions: 20
  • Dependent Packages: 3
  • Dependent Repositories: 9
  • Downloads: 1,125 Last month
  • Docker Downloads: 674
Rankings
Docker downloads count: 2.0%
Dependent packages count: 2.4%
Average: 4.3%
Dependent repos count: 4.9%
Downloads: 7.8%
Maintainers (1)
Last synced: 4 months ago

Dependencies

services/nnunet/requirements-nnunet.txt pypi
  • torch *
  • torchaudio *
  • torchvision *
services/radiomics/requirements-radiomics.txt pypi
  • pyradiomics ==3.0.1
.github/workflows/build_docs.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • peaceiris/actions-gh-pages v3 composite
.github/workflows/package.yml actions
  • actions/checkout v2 composite
  • docker/build-push-action v2 composite
  • docker/login-action v1 composite
  • docker/setup-buildx-action v1 composite
  • docker/setup-qemu-action v1 composite
.github/workflows/pull_request.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/release.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • peaceiris/actions-gh-pages v3 composite
  • peter-evans/repository-dispatch v1 composite
Dockerfile docker
  • ubuntu 20.04 build
docker-compose.yml docker
  • platipy/platipy dev
  • redis latest
services/bronchus/Dockerfile docker
  • platipy/platipy service build
services/cardiac/Dockerfile docker
  • platipy/platipy service build
services/dirqa/Dockerfile docker
  • platipy/platipy service build
services/jupyter/Dockerfile docker
  • platipy/platipy latest build
services/jupyter/docker-compose.yml docker
  • platipy/platipy jupyter
services/mridixon/Dockerfile docker
  • platipy/platipy service build
services/nnunet/Dockerfile docker
  • platipy/platipy service build
services/pinnacle/Dockerfile docker
  • platipy/platipy service build
services/radiomics/Dockerfile docker
  • platipy/platipy service build
services/sample/Dockerfile docker
  • platipy/platipy service build
poetry.lock pypi
  • 202 dependencies
pyproject.toml pypi
  • Flask ^2.1.0
  • Flask-RESTful >=0.3.8
  • Flask-SQLAlchemy ^2.4.4
  • Jinja2 ^3.1
  • SimpleITK ^2.0.2
  • celery ^5.2.3
  • click ^8.0.3
  • gunicorn ^20.0.4
  • matplotlib ^3.2.2
  • nnunet ^1.7.0
  • pandas ^1.3.0
  • psutil ^5.8.0
  • pydicom ^2.1.2
  • pymedphys >=0.38.0
  • pynetdicom ^2.0.2
  • python ^3.8.0
  • redis ^3.5.3
  • requests ^2.25.1
  • rt-utils ^1.1.4
  • scikit-image >=0.18.1
  • vtk ^9.1.0
services/totalsegmentator/Dockerfile docker
  • nvidia/cuda 12.2.0-runtime-ubuntu22.04 build
services/dirqa/requirements-dirqa.txt pypi
services/totalsegmentator/requirements-totalseg.txt pypi
  • TotalSegmentator *
  • torch *
  • torchaudio *
  • torchvision *