Processing Library and Analysis Toolkit for Medical Imaging in Python
Project description
PlatiPy (Processing Library and Analysis Toolkit for Medical Imaging in Python)
This library contains tools and scripts used for image processing and analysis of medical images. The code makes use of ITK and VTK and is written in Python. Jupyter notebooks are provided where possible, mainly for guidance on getting started with using the tools.
Getting Started
You can find the PlatiPy documentation here.
Requirements
- Python 3.6 or greater
- See requirements.txt for required Python packages and requirements-dev.txt for librarites needed to contribute.
What can I do with platipy?
A lot! A good place to start is by looking in the examples directory. There are tools for:
- Linear transformation image registration (rigid, affine, etc.)
- Non-linear deformable image registration
- Atlas-based segmentation
- Synthetic deformation field generation
- DICOM tools (reading/writing, bulk conversion)
- Image label operations (comparison metrics, iterative atlas removal, label fusion)
A major part of this package is visualisation, and some examples are shown below!
Overlay a deformation vector field on an image (shown in orthogonal slices):
Overlay a scalar field on an image:
Create a comparison image, with vector fields:
Contributing
Git
Create a branch off of master while you make your changes or implement your new tool. Once complete, head to GitHub to create a pull request to merge your changes into the main branch (master).
Style Guide
Python code written in this repository should conform to PEP 8 Style Guide for Python. You may like to use black to ensure that your code conforms to PEP 8 standards.
Structure
This toolbox is broken up into separate modules. Each module contains several tools, scripts or applications. The following structure should be observed:
- module/
- tool/
- *.py: One or more Python scripts providing some functionality
- README.md: Contains description of tool, authors, etc...
- Sample.ipynb: Jupyter notebook demonstrating the basics of using the tool
- tests/: Directory containing test scripts to be run by pytest
- tool/
Providing command line functionality with click
Where possible, the tools and scripts within this toolbox should provide a way to run them from the command line. A simple Python library to provide this functionality is click. You simply need to annotate the functions you want to have accessible from the command line. See the official click documentation for an introduction to using click.
Writing unit tests for pytest
Automated unit tests are important for code bases to which various authors are contributing, to ensure that their changes don't make any unintended breaking changes to other parts of the code.
This toolbox uses pytest as the testing framework. See the official pytest documentation for an introduction to writing tests with pytest.
Before you submit a pull request, make sure all the tests are passing by running the command:
pytest
from the root directory of the toolbox.
Authors
- Phillip Chlap - phillip.chlap@unsw.edu.au
- Robert Finnegan - rfin5459@uni.sydney.edu.au
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file platipy-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: platipy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 142.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 120d121f569d0759988b55bb42a8867e0a7594add1c91467face806766ee53de |
|
MD5 | 08902186d12e244e222314e9807a1755 |
|
BLAKE2b-256 | 32a773d4a8074f8d5e67da548548a1906c62ebe10d2a0ad086982ed1fdbf73da |