Skip to main content

Raidionics reporting and data system backend (RADS)

Project description

Raidionics processing backend for performing segmentation and computation of standardized report (RADS)

License Paper Open In Colab

The code corresponds to the Raidionics backend for running processing pipelines over MRI/CT scans. The segmentation of a few organs or tumor types, as well as the generation of standardized reports are included.
The module can either be used as a Python library, as CLI, or as Docker container.

Installation

pip install git+https://github.com/dbouget/raidionics_rads_lib.git

Continuous integration

Operating System Status
Windows Build Windows
Ubuntu Build Ubuntu
macOS Build macOS
macOS ARM Build macOS ARM

Getting started

Notebooks

Below are Jupyter Notebooks including different examples on how to get started with the segmentation and reporting tasks, either over the brain or mediastinal area.

Notebook Clinical target Colab GitHub
Preoperative Segmentation :brain: Neuro Open In Colab View on GitHub
Preoperative Segmentation :lungs: Mediastinum Open In Colab View on GitHub
Postoperative Segmentation :brain: Neuro Open In Colab View on GitHub
Simple Reporting :brain: Neuro Open In Colab View on GitHub
Surgical Reporting :brain: Neuro Open In Colab View on GitHub
Batch processing :brain: Neuro - View on GitHub

CLI

raidionicsrads -c CONFIG (-v debug)

CONFIG should point to a configuration file (*.ini), specifying all runtime parameters, according to the pattern from blank_main_config.ini.

Python module

from raidionicsrads.compute import run_rads
run_rads(config_filename="/path/to/main_config.ini")

Docker

When calling Docker images, the --user flag must be properly used in order for the folders and files created inside the container to inherit the proper read/write permissions. The user ID is retrieved on-the-fly in the following examples, but it can be given in a more hard-coded fashion if known by the user.

:warning: The Docker image can only perform inference using the CPU, there is no GPU support at this stage.

docker pull dbouget/raidionics-rads:v1.1-py38-cpu

For opening the Docker image and interacting with it, run:

docker run --entrypoint /bin/bash -v /home/<username>/<resources_path>:/workspace/resources -t -i --runtime=nvidia --network=host --ipc=host --user $(id -u) dbouget/raidionics-rads:v1.1-py38-cpu

The /home/<username>/<resources_path> before the column sign has to be changed to match a directory on your local machine containing the data to expose to the docker image. Namely, it must contain folder(s) with images you want to run inference on, as long as a folder with the trained models to use, and a destination folder where the results will be placed.

For launching the Docker image as a CLI, run:

docker run -v /home/<username>/<resources_path>:/workspace/resources -t -i --runtime=nvidia --network=host --ipc=host --user $(id -u) dbouget/raidionics-rads:v1.1-py38-cpu -c /workspace/resources/<path>/<to>/main_config.ini -v <verbose>

The <path>/<to>/main_config.ini must point to a valid configuration file on your machine, as a relative path to the /home/<username>/<resources_path> described above. For example, if the file is located on my machine under /home/myuser/Data/RADS/main_config.ini, and that /home/myuser/Data is the mounted resources partition mounted on the Docker image, the new relative path will be RADS/main_config.ini.
The <verbose> level can be selected from [debug, info, warning, error].

How to cite

If you are using Raidionics in your research, please cite the following references.

The final software including updated performance metrics for preoperative tumors and introducing postoperative tumor segmentation:

@article{bouget2023raidionics,
    author = {Bouget, David and Alsinan, Demah and Gaitan, Valeria and Holden Helland, Ragnhild and Pedersen, André and Solheim, Ole and Reinertsen, Ingerid},
    year = {2023},
    month = {09},
    pages = {},
    title = {Raidionics: an open software for pre-and postoperative central nervous system tumor segmentation and standardized reporting},
    volume = {13},
    journal = {Scientific Reports},
    doi = {10.1038/s41598-023-42048-7},
}

For the preliminary preoperative tumor segmentation validation and software features:

@article{bouget2022preoptumorseg,
    title={Preoperative Brain Tumor Imaging: Models and Software for Segmentation and Standardized Reporting},
    author={Bouget, David and Pedersen, André and Jakola, Asgeir S. and Kavouridis, Vasileios and Emblem, Kyrre E. and Eijgelaar, Roelant S. and Kommers, Ivar and Ardon, Hilko and Barkhof, Frederik and Bello, Lorenzo and Berger, Mitchel S. and Conti Nibali, Marco and Furtner, Julia and Hervey-Jumper, Shawn and Idema, Albert J. S. and Kiesel, Barbara and Kloet, Alfred and Mandonnet, Emmanuel and Müller, Domenique M. J. and Robe, Pierre A. and Rossi, Marco and Sciortino, Tommaso and Van den Brink, Wimar A. and Wagemakers, Michiel and Widhalm, Georg and Witte, Marnix G. and Zwinderman, Aeilko H. and De Witt Hamer, Philip C. and Solheim, Ole and Reinertsen, Ingerid},
    journal={Frontiers in Neurology},
    volume={13},
    year={2022},
    url={https://www.frontiersin.org/articles/10.3389/fneur.2022.932219},
    doi={10.3389/fneur.2022.932219},
    issn={1664-2295}
}

Models

The trained models are automatically downloaded when running Raidionics or Raidionics-Slicer. Alternatively, all existing Raidionics models can be browsed here directly.

Developers

git clone https://github.com/dbouget/raidionics_rads_lib.git --recurse-submodules

For running inference on GPU through the raidionics_seg_lib backend, your machine must be properly configured (cf. here)

The ANTs library can be manually installed (from source) and be used as a cpp backend rather than Python. Visit https://github.com/ANTsX/ANTs.

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

raidionicsrads-1.3.0.tar.gz (45.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

raidionicsrads-1.3.0-py3-none-any.whl (45.3 MB view details)

Uploaded Python 3

File details

Details for the file raidionicsrads-1.3.0.tar.gz.

File metadata

  • Download URL: raidionicsrads-1.3.0.tar.gz
  • Upload date:
  • Size: 45.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for raidionicsrads-1.3.0.tar.gz
Algorithm Hash digest
SHA256 86eb8045e8eeda4cffa19d795e3e4b6decfeaa6fa5bf3a323cad340f9e4269eb
MD5 8f5d28a91f6ce831b875f4f5263e7e42
BLAKE2b-256 f32e67e7919a284f40db1388d830876ceb2c2dac46282f312bbd8d9dce6d4aec

See more details on using hashes here.

File details

Details for the file raidionicsrads-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: raidionicsrads-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 45.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for raidionicsrads-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 02669ac7a8718d064737340c2e7d71d1d053b2b265df082846938491fddbf3f1
MD5 4543517b70344400133c6627b45700bf
BLAKE2b-256 1dca6dd0e2058e7eecfb4fcde88b65f9a1a1fcd6675983bdfe4dc2b87ce267bd

See more details on using hashes here.

Supported by

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