Skip to main content

Radiomics features library for python

Project description

pyradiomics v3.0.1

Build Status

Linux macOS Windows

Radiomics feature extraction in Python

This is an open-source python package for the extraction of Radiomics features from medical imaging.

With this package we aim to establish a reference standard for Radiomic Analysis, and provide a tested and maintained open-source platform for easy and reproducible Radiomic Feature extraction. By doing so, we hope to increase awareness of radiomic capabilities and expand the community.

The platform supports both the feature extraction in 2D and 3D and can be used to calculate single values per feature for a region of interest ("segment-based") or to generate feature maps ("voxel-based").

Not intended for clinical use.

If you publish any work which uses this package, please cite the following publication: van Griethuysen, J. J. M., Fedorov, A., Parmar, C., Hosny, A., Aucoin, N., Narayan, V., Beets-Tan, R. G. H., Fillion-Robin, J. C., Pieper, S., Aerts, H. J. W. L. (2017). Computational Radiomics System to Decode the Radiographic Phenotype. Cancer Research, 77(21), e104–e107. https://doi.org/10.1158/0008-5472.CAN-17-0339

Join the Community!

Join the PyRadiomics community on google groups here.

Feature Classes

Currently supports the following feature classes:

  • First Order Statistics
  • Shape-based (2D and 3D)
  • Gray Level Cooccurence Matrix (GLCM)
  • Gray Level Run Length Matrix (GLRLM)
  • Gray Level Size Zone Matrix (GLSZM)
  • Gray Level Dependece Matrix (GLDM)
  • Neighboring Gray Tone Difference Matrix (NGTDM)

Filter Classes

Aside from the feature classes, there are also some built-in optional filters:

  • Laplacian of Gaussian (LoG, based on SimpleITK functionality)
  • Wavelet (using the PyWavelets package)
  • Square
  • Square Root
  • Logarithm
  • Exponential
  • Gradient (Magnitude)
  • Local Binary Pattern (LBP) 2D / 3D

Supporting reproducible extraction

Aside from calculating features, the pyradiomics package includes provenance information in the output. This information contains information on used image and mask, as well as applied settings and filters, thereby enabling fully reproducible feature extraction.

Documentation

For more information, see the sphinx generated documentation available here.

Alternatively, you can generate the documentation by checking out the master branch and running from the root directory:

python setup.py build_sphinx

The documentation can then be viewed in a browser by opening PACKAGE_ROOT\build\sphinx\html\index.html.

Furthermore, an instruction video is available here.

Installation

PyRadiomics is OS independent and compatible with Python >= 3.5. Pre-built binaries are available on PyPi and Conda. To install PyRadiomics, ensure you have python installed and run:

`python -m pip install pyradiomics`

Detailed installation instructions, as well as instructions for building PyRadiomics from source, are available in the documentation.

Docker

PyRadiomics also supports Dockers. Currently, 2 dockers are available:

The first one is a Jupyter notebook with PyRadiomics pre-installed with example Notebooks.

To get the Docker:

docker pull radiomics/pyradiomics:latest

The radiomics/notebook Docker has an exposed volume (/data) that can be mapped to the host system directory. For example, to mount the current directory:

docker run --rm -it --publish 8888:8888 -v `pwd`:/data radiomics/notebook

or for a less secure notebook, skip the randomly generated token

docker run --rm -it --publish 8888:8888 -v `pwd`:/data radiomics/notebook start-notebook.sh --NotebookApp.token=''

and open the local webpage at http://localhost:8888/ with the current directory at http://localhost:8888/tree/data.

The second is a docker which exposes the PyRadiomics CLI interface. To get the CLI-Docker:

docker pull radiomics/pyradiomics:CLI

You can then use the PyRadiomics CLI as follows:

docker run radiomics/pyradiomics:CLI --help

For more information on using docker, see here

Usage

PyRadiomics can be easily used in a Python script through the featureextractor module. Furthermore, PyRadiomics provides a commandline script, pyradiomics, for both single image extraction and batchprocessing. Finally, a convenient front-end interface is provided as the 'Radiomics' extension for 3D Slicer, available here.

3rd-party packages used in pyradiomics:

  • SimpleITK (Image loading and preprocessing)
  • numpy (Feature calculation)
  • PyWavelets (Wavelet filter)
  • pykwalify (Enabling yaml parameters file checking)
  • six (Python 3 Compatibility)
  • scipy (Only for LBP filter, install separately to enable this filter)
  • scikit-image (Only for LBP filter, install separately to enable this filter)
  • trimesh (Only for LBP filter, install separately to enable this filter)

See also the requirements file.

3D Slicer

PyRadiomics is also available as an extension to 3D Slicer. Download and install the 3D slicer nightly build, the extension is then available in the extension manager under "SlicerRadiomics".

License

This package is covered by the open source 3-clause BSD License.

Developers

1Department of Radiation Oncology, Dana-Farber Cancer Institute, Brigham and Women's Hospital, Harvard Medical School, Boston, MA, 2Department of Radiology, Brigham and Women's Hospital, Harvard Medical School, Boston, MA, 3Department of Radiology, Netherlands Cancer Institute, Amsterdam, The Netherlands, 4GROW-School for Oncology and Developmental Biology, Maastricht University Medical Center, Maastricht, The Netherlands, 5Kitware, 6Isomics

Contact

We are happy to help you with any questions. Please contact us on the Radiomics community section of the 3D Slicer Discourse.

We welcome contributions to PyRadiomics. Please read the contributing guidelines on how to contribute to PyRadiomics.

This work was supported in part by the US National Cancer Institute grant 5U24CA194354, QUANTITATIVE RADIOMICS SYSTEM DECODING THE TUMOR PHENOTYPE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyradiomics-3.0.1.tar.gz (34.5 MB view details)

Uploaded Source

Built Distributions

pyradiomics-3.0.1-cp37-cp37m-win_amd64.whl (121.4 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyradiomics-3.0.1-cp37-cp37m-manylinux1_x86_64.whl (188.3 kB view details)

Uploaded CPython 3.7m

pyradiomics-3.0.1-cp37-cp37m-macosx_10_13_x86_64.whl (114.5 kB view details)

Uploaded CPython 3.7m macOS 10.13+ x86-64

pyradiomics-3.0.1-cp36-cp36m-win_amd64.whl (121.4 kB view details)

Uploaded CPython 3.6m Windows x86-64

pyradiomics-3.0.1-cp36-cp36m-manylinux1_x86_64.whl (157.5 kB view details)

Uploaded CPython 3.6m

pyradiomics-3.0.1-cp36-cp36m-macosx_10_13_x86_64.whl (114.5 kB view details)

Uploaded CPython 3.6m macOS 10.13+ x86-64

pyradiomics-3.0.1-cp35-cp35m-manylinux1_x86_64.whl (157.6 kB view details)

Uploaded CPython 3.5m

File details

Details for the file pyradiomics-3.0.1.tar.gz.

File metadata

  • Download URL: pyradiomics-3.0.1.tar.gz
  • Upload date:
  • Size: 34.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.50.2 CPython/3.6.8

File hashes

Hashes for pyradiomics-3.0.1.tar.gz
Algorithm Hash digest
SHA256 47c57f441d6cb7973fa3b2ea48d3948df78e3348e1c69e1e2ff19001601fc2f5
MD5 6c9ea1051be999265240fae5c9f4d088
BLAKE2b-256 1b35c7f7fb7affd302fd8107dcee6b6e7aaf3708b75ad69d5f9a3dfcadb73eaa

See more details on using hashes here.

File details

Details for the file pyradiomics-3.0.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pyradiomics-3.0.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 121.4 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/2.7.17

File hashes

Hashes for pyradiomics-3.0.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 757db4e545e5b367fbde832f32e2a1ea7d21206fd82d8c9aa92b87286ad8d89a
MD5 23bd0a1dcf6dbf06a5722052bf3b4328
BLAKE2b-256 7038a1e4d22e2c41ab5415354e1389cffe9dd1c4812c069d67815b554cbe61b8

See more details on using hashes here.

File details

Details for the file pyradiomics-3.0.1-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyradiomics-3.0.1-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 188.3 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.50.2 CPython/3.6.8

File hashes

Hashes for pyradiomics-3.0.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 319501840245a739591298a8484f9db5392c98f48eff0d321184aef8b43ba903
MD5 e8bec6b96ac9dc257435f48a32f0bbd2
BLAKE2b-256 8c03694a45860268a3b96c9a8b88f7064d959d383332c7d7adb4a72a49035ac2

See more details on using hashes here.

File details

Details for the file pyradiomics-3.0.1-cp37-cp37m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: pyradiomics-3.0.1-cp37-cp37m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 114.5 kB
  • Tags: CPython 3.7m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/2.7.17

File hashes

Hashes for pyradiomics-3.0.1-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 c94ad61b0e2924c115e3c1dd4f391a726e636f2f17631cd08832d684693eafe3
MD5 89ade3607ab48aa35dc9bd8bf1293607
BLAKE2b-256 8874ff626bdb2617bd2b68eebbc3464d08ec626d9565e4970ae6808f298f9635

See more details on using hashes here.

File details

Details for the file pyradiomics-3.0.1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pyradiomics-3.0.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 121.4 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/2.7.17

File hashes

Hashes for pyradiomics-3.0.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 5edc6d3e09751a868d9acbaf5178cf7b501140eb1cc7ae28f4059e5cab11ed9a
MD5 60e58c62fb99ad6fa428955224c01143
BLAKE2b-256 8ea6f4e6d4fa43573b0fd0057038bd5ce5b01cbafc7b4a2008b456df31ce1a27

See more details on using hashes here.

File details

Details for the file pyradiomics-3.0.1-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyradiomics-3.0.1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 157.5 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.50.2 CPython/3.6.8

File hashes

Hashes for pyradiomics-3.0.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ab9cf7f58c490bf148686cd37a67d37a0585dab0c35fcf26bf34e2eb7a6648e5
MD5 317bc96765c8e771d0f4de33f49261de
BLAKE2b-256 3badbbf185d864945c96b67390abc01b3450692816d53e9489de3a87c321f947

See more details on using hashes here.

File details

Details for the file pyradiomics-3.0.1-cp36-cp36m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: pyradiomics-3.0.1-cp36-cp36m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 114.5 kB
  • Tags: CPython 3.6m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/2.7.17

File hashes

Hashes for pyradiomics-3.0.1-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 aa1c805206c4f9c4bc7814ad4fb16b068bf54ca9e6b0c7ea228cc1ae97421b05
MD5 bd452e90f5c0c122051c93a820a61e7d
BLAKE2b-256 03de9884a04101671e6f17ce0b2de8d24340fb0c2740adc6c307e1f304095dea

See more details on using hashes here.

File details

Details for the file pyradiomics-3.0.1-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyradiomics-3.0.1-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 157.6 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.50.2 CPython/3.6.8

File hashes

Hashes for pyradiomics-3.0.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 872f2e66679b72c1d6ef64993567454aaf32abad314fccdb748f315be8855066
MD5 e9947f6f4d5ad78f9ea48f7e49192ad7
BLAKE2b-256 c18dba8d1717354cf82dc265c384f2ed47425d90d5cdea35d6cb67ebeab6fd29

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page