{"id":13654518,"url":"https://github.com/pyplati/platipy","last_synced_at":"2025-04-23T09:33:35.451Z","repository":{"id":38108622,"uuid":"297524144","full_name":"pyplati/platipy","owner":"pyplati","description":"Processing Library and Analysis Toolkit for Medical Imaging in Python","archived":false,"fork":false,"pushed_at":"2025-04-18T17:38:28.000Z","size":208057,"stargazers_count":129,"open_issues_count":25,"forks_count":29,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-22T07:03:29.917Z","etag":null,"topics":["image-analysis","medical-imaging","python","registration","segmentation","visualization"],"latest_commit_sha":null,"homepage":"https://pyplati.github.io/platipy/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyplati.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-09-22T03:24:09.000Z","updated_at":"2025-04-14T18:20:29.000Z","dependencies_parsed_at":"2023-09-25T02:36:35.851Z","dependency_job_id":"9fb37d51-5568-404b-ac5c-3f34c6b01b20","html_url":"https://github.com/pyplati/platipy","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyplati%2Fplatipy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyplati%2Fplatipy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyplati%2Fplatipy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyplati%2Fplatipy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyplati","download_url":"https://codeload.github.com/pyplati/platipy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250407715,"owners_count":21425549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image-analysis","medical-imaging","python","registration","segmentation","visualization"],"created_at":"2024-08-02T03:00:36.451Z","updated_at":"2025-04-23T09:33:31.297Z","avatar_url":"https://github.com/pyplati.png","language":"Python","funding_links":[],"categories":["Libraries"],"sub_categories":[],"readme":"# PlatiPy\n\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.05374/status.svg)](https://doi.org/10.21105/joss.05374)\n\n## Processing Library and Analysis Toolkit for Medical Imaging in Python\n\nPlatiPy is a library of **amazing** tools for image processing and analysis - designed specifically\nfor medical imaging!\n\nCheck out the [PlatiPy documentation](https://pyplati.github.io/platipy/) for more info.\n\nThis project was motivated by the need for a simple way to use, visualise, process, and analyse\nmedical images. Many of the tools and algorithms are designed in the context of radiation therapy,\nalthough they are more widely applicable to other fields that use 2D, 3D, or 4D imaging.\n\nPlatiPy is written in Python, and uses SimpleITK, VTK, and standard Python libraries. Jupyter\nnotebooks are provided where possible, mainly for guidance on getting started with using the tools.\nWe welcome feedback and contributions from the community (yes, you!) and you can find more\ninformation about contributing [here](https://pyplati.github.io/platipy/contributing.html).\n\n## What can I do with **platipy**?\n\nA lot! A good place to start is by looking in the\n[examples directory](https://github.com/pyplati/platipy/tree/master/examples).\n\nOr checkout this presentation by Rob Finnegan at MRI Together 2023 for a great overview of PlatiPy:\n\n[![Unlocking medical imaging with PlatiPy (R. Finnegan)](https://img.youtube.com/vi/nNkjonnK1RI/0.jpg)](https://www.youtube.com/watch?v=nNkjonnK1RI)\n\nSome examples of what PlatiPy can do:\n\n- DICOM organising and converting:\n  - Bulk convert from multiple series and studies with a single function\n  - Convert DICOM-RT structure and dose files to NIfTI images\n  - Create DICOM-RT structure files from binary masks e.g. from automatic contouring algorithms\n- Image registration\n  - Register images and transform labels with a few lines of code\n  - Linear transformations: rigid, affine, similarity\n  - Non-linear deformable transformations: demons, b-splines\n  - Multiple metrics for optimisation\n- Atlas-based segmentation\n  - A suite of tools that can be used out-of-the-box\n  - Includes advanced algorithms for\n      [iterative atlas selection](https://doi.org/10.1088/1361-6560/ab652a/) and\n      [vessel splining](https://doi.org/10.1088/1361-6560/abcb1d/)\n- Synthetic deformation field generation\n  - Simulate anatomically realistic shifts, expansions, and bending\n  - Compare DIR results from clinical systems\n- Basic tools for image processing and analysis\n  - Computing label similarity metrics: DSC, mean distance to agreement, Hausdorff distance, and more\n  - Cropping images to a region of interest\n  - Rotate images and generate maximum/mean intensity projections (beams eye view modelling)\n\nA major part of this package is **visualisation**, and some examples are shown below!\n\n#### Visualise some contours\n\n``` python\nfrom platipy.imaging import ImageVisualiser\n\nvis = ImageVisualiser(image)\nvis.add_contour(contours)\nfig = vis.show()\n```\n\n![Figure 1](assets/figure_1.png)\n\n#### Register some images\n\n```python\nfrom platipy.imaging.registration.linear import linear_registration\n\nimage_2_registered, tfm = linear_registration(\nimage_1,\nimage_2\n)\n\nvis = ImageVisualiser(image_1)\nvis.add_comparison_overlay(image_2_registered)\nfig = vis.show()\n```\n\n![Figure 2](assets/figure_2.png)\n\n#### Calculate deformation vector fields\n\n```python\nfrom platipy.imaging.registration.deformable import fast_symmetric_forces_demons_registration\n\nimage_2_deformed, tfm_dir, dvf = fast_symmetric_forces_demons_registration(\nimage_1,\nimage_2_registered\n)\n\nvis = ImageVisualiser(image_2_deformed, axis=\"z\")\nvis.add_vector_overlay(\n    dvf,\n    subsample=12,\n    arrow_scale=1,\n    arrow_width=2,\n    colormap=plt.cm.magma,\n    name=\"DVF magnitude [mm]\",\n    color_function=\"magnitude\"\n)\nfig = vis.show()\n```\n\n![Figure 3](assets/figure_3.png)\n\n## Getting started\n\nThere aren't many requirements, just an installed Python interpreter (3.7 or greater). PlatiPy can\nbe installed with **pip**:\n\n```bash\npip install platipy\n```\n\nThe base installation of platipy does not include some large libraries needed for various\ncomponents of platipy. The following extras are available to install to run specific platipy tools:\n\n```bash\npip install platipy[cardiac]\npip install platipy[nnunet]\npip install platipy[backend]\n```\n\n## Authors\n\n- **Phillip Chlap** - [phillip.chlap@unsw.edu.au](phillip.chlap@unsw.edu.au)\n- **Robert Finnegan** - [robert.finnegan@sydney.edu.au](robert.finnegan@sydney.edu.au)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyplati%2Fplatipy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyplati%2Fplatipy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyplati%2Fplatipy/lists"}