https://github.com/antsx/antspy
A fast medical imaging analysis library in Python with algorithms for registration, segmentation, and more.
Science Score: 46.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
-
✓Academic publication links
Links to: scholar.google, pubmed.ncbi, ncbi.nlm.nih.gov -
✓Committers with academic emails
5 of 35 committers (14.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.9%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
A fast medical imaging analysis library in Python with algorithms for registration, segmentation, and more.
Basic Info
- Host: GitHub
- Owner: ANTsX
- License: apache-2.0
- Language: Python
- Default Branch: master
- Homepage: https://antspyx.readthedocs.io
- Size: 90.8 MB
Statistics
- Stars: 760
- Watchers: 14
- Forks: 175
- Open Issues: 45
- Releases: 17
Topics
Metadata Files
README.md
Advanced Normalization Tools in Python
The ANTsPy library wraps the well-established C++ biomedical image processing framework ANTs. It includes blazing-fast reading and writing of medical images, algorithms for registration, segmentation, and statistical learning, as well as functions to create publication-ready visualizations.
If you are looking to train deep learning models on medical imaging datasets, you might be interested in ANTsPyNet which provides tools for training and visualizing deep learning models.
Installation
Pre-compiled binaries
The easiest way to install ANTsPy is via the latest pre-compiled binaries from PyPI.
bash
pip install antspyx
Or alternatively from conda:
bash
conda install conda-forge::antspyx
Because of limited storage space, pip binaries are not available for every combination of python version and platform. We also have had to delete older releases to make space. If you cannot find a binary you need on PyPI, you can check the Releases page for archived binaries.
Some Mac OS Python installations have compatibility issues with the pre-compiled
binaries. This means pip will not install binaries targeted for the current Mac OS
version, and will instead try to compile from source. The compatibility checks can be
disabled by setting the environment variable SYSTEM_VERSION_COMPAT=0. More details on
the wiki.
Windows users will need a compatible Microsoft Visual C++ Redistributable installation.
Building from source
In some scenarios, it can make sense to build from source. In general, you can build ANTsPy as you would any other Python package.
git clone https://github.com/antsx/antspy
cd antspy
python -m pip install .
Further details about installing ANTsPy or building it from source can be found in the Installation Tutorial.
Quickstart
Here is a basic overview of some of the things you can do with ANTsPy. The main functionality includes reading / writing images, basic and advanced image operations, segmentation, registration, and visualization.
```python import ants
read / write images
img = ants.imageread('path/to/image.nii.gz') ants.imagewrite(img, 'path/to/image.nii.gz')
basic operations
img + img2 img - img2 img[:20,:20,:20] # indexing returns an image
advanced operations
img = ants.smoothimage(img, 2) img = ants.resampleimage(img, (3,3,3)) img.smoothimage(2).resampleimage((3,3,3)) # chaining
convert to or from numpy
arr = img.numpy() img2 = ants.from_numpy(arr * 2)
segmentation
result = ants.atropos(a=img, m='[0.2,1x1]', c='[2,0]', i='kmeans[3]', x=ants.get_mask(img))
registration
result = ants.registration(fixedimage, movingimage, typeoftransform = 'SyN' )
plotting
ants.plot(img, overlay = img > img.mean()) ```
Tutorials
Resources for learning about ANTsPy can be found in the tutorials folder. A selection of especially useful tutorials is presented below.
- Basic overview [Link]
- Composite registrations [Link]
- Multi-metric registration [Link]
- Image math operations [Link]
- Wrapping ITK code [Link]
More tutorials can be found in the ANTs repository.
Contributing
If you have a question or bug report the best way to get help is by posting an issue on the GitHub page. We welcome any new contributions and ideas. If you want to add code, the best way to get started is by reading the contributors guide that runs through the structure of the project and how we go about wrapping ITK and ANTs code in C++.
You can support our work by starring the repository, citing our methods when relevant, or suggesting new features in the issues tab. These actions help increase the project's visibility and community reach.
References
The main references can be found at the main ANTs repo. A Google Scholar search also reveals plenty of explanation of methods and evaluation results by the community and by ourselves.
Owner
- Name: Advanced Normalization Tools Ecosystem
- Login: ANTsX
- Kind: organization
- Location: Cambridge, MA; Philadelphia, PA; Southern California
- Website: https://www.ants.dev
- Repositories: 8
- Profile: https://github.com/ANTsX
Ecosystem supporting multi-modality biomedical image analysis across programming languages.
GitHub Events
Total
- Fork event: 13
- Create event: 52
- Commit comment event: 9
- Release event: 2
- Issues event: 98
- Watch event: 119
- Delete event: 43
- Issue comment event: 311
- Push event: 135
- Pull request review event: 12
- Pull request review comment event: 11
- Gollum event: 5
- Pull request event: 126
Last Year
- Fork event: 13
- Create event: 52
- Commit comment event: 9
- Release event: 2
- Issues event: 98
- Watch event: 119
- Delete event: 43
- Issue comment event: 311
- Push event: 135
- Pull request review event: 12
- Pull request review comment event: 11
- Gollum event: 5
- Pull request event: 126
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| ncullen93 | n****h@d****u | 524 |
| stnava | s****a@g****m | 431 |
| Ravnoor Gill | r****r@g****m | 216 |
| Nick Tustison | n****n@g****m | 161 |
| Philip Cook | c****a@p****u | 154 |
| ncullen93 | n****n@m****e | 130 |
| muschellij2 | m****2@g****m | 43 |
| Daniel Gomez | d****z@p****g | 14 |
| Jennings Zhang | j****h@p****m | 14 |
| Andrew Berger | a****r@g****m | 6 |
| seogier | s****r@g****m | 3 |
| Thiago Franco de Moraes | t****e@g****m | 3 |
| Glad Mihai | g****i@a****m | 2 |
| sai8951 | s****a@g****m | 2 |
| Vasco Diogo | 3****a | 2 |
| Asaph Zylbertal | 3****l | 2 |
| Bryn Lloyd | d****b | 2 |
| Dean Rance | d****4@g****m | 2 |
| Pradeep Reddy Raamana | r****p@p****u | 2 |
| Evert de Man | e****n@p****m | 1 |
| Martin Schober | m****r@f****e | 1 |
| Philipp Stephan | p****n@m****e | 1 |
| Richard Beare | R****e@m****u | 1 |
| Sadegh | s****i@g****m | 1 |
| Dženan Zukić | d****c@k****m | 1 |
| FeynmanDNA | 2****A | 1 |
| Jirka Borovec | B****a | 1 |
| Oscar Esteban | c****e@o****s | 1 |
| Patrick Scheibe | p****k@h****e | 1 |
| Robert Haase | h****f | 1 |
| and 5 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 264
- Total pull requests: 413
- Average time to close issues: 7 months
- Average time to close pull requests: 9 days
- Total issue authors: 150
- Total pull request authors: 27
- Average comments per issue: 4.34
- Average comments per pull request: 1.51
- Merged pull requests: 325
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 69
- Pull requests: 130
- Average time to close issues: 6 days
- Average time to close pull requests: 3 days
- Issue authors: 43
- Pull request authors: 9
- Average comments per issue: 2.41
- Average comments per pull request: 1.59
- Merged pull requests: 113
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- cookpa (34)
- ntustison (11)
- rueberger (11)
- ncullen93 (6)
- dipterix (6)
- samtorrisi (5)
- stnava (5)
- dyollb (4)
- FIrgolitsch (4)
- ninusch (4)
- poldrack (3)
- galenlynch (3)
- amirreza1998 (3)
- yuanpengpeng (2)
- QuentinMesnildrey (2)
Pull Request Authors
- cookpa (205)
- ncullen93 (91)
- ntustison (69)
- ravnoor (6)
- sai8951 (4)
- rueberger (4)
- dyollb (4)
- seogier (2)
- DeanTM (2)
- dzenanz (2)
- FeynmanDNA (2)
- lankabelgezogen (2)
- evertdeman (2)
- crossmanith (2)
- sarthakpati (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 19,961 last-month
- Total docker downloads: 3,976
- Total dependent packages: 23
- Total dependent repositories: 41
- Total versions: 13
- Total maintainers: 4
pypi.org: antspyx
A fast medical imaging analysis library in Python with algorithms for registration, segmentation, and more.
- Homepage: https://github.com/antsx/antspy
- Documentation: https://antspyx.readthedocs.io/
- License: Apache Software License
-
Latest release: 0.6.1
published 8 months ago
Rankings
Dependencies
- sphinx *
- Pillow *
- matplotlib *
- nibabel *
- numpy *
- pandas *
- pyyaml *
- scikit-image *
- scikit-learn *
- sklearn *
- statsmodels *
- webcolors *
- Pillow *
- chart_studio *
- matplotlib *
- nibabel *
- numpy *
- pandas *
- pyyaml *
- scikit-image *
- scikit-learn *
- scipy *
- statsmodels *
- webcolors *
- matplotlib
- numpy
- pandas
- pillow
- pip
- pyyaml
- scikit-image
- scikit-learn
- statsmodels
- actions/checkout v2 composite
- docker/build-push-action v3 composite
- docker/login-action v1 composite
- docker/metadata-action v3 composite
- docker/setup-buildx-action v2 composite
- docker/setup-qemu-action v2 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- ilammy/msvc-dev-cmd v1 composite
- continuumio/miniconda3 22.11.1 build
- debian bullseye-20230109-slim build
- sphinx ==6.2.1