This repository contains the Python implementation of the paper:
Cepeda S, Romero-Oraá R, García-Pérez D, Blasco G, Luppino LT, Kuttner S, Arrese I, Solheim O, Eikenes L, Karlberg A, Pérez-Núñez A, Escudero T, Hornero R, Sarabia R. Postoperative glioblastoma segmentation: Development of a fully automated pipeline using deep convolutional neural networks and comparison with currently available models. Pre-print at arXiv arXiv:2404.11725 https://arxiv.org/abs/2404.11725
RH-GlioSeg-nnU-Net segmentation
This work presents a fully automated pipeline that incorporates the processing of multiparametric magnetic resonance imaging (MRI) and the automatic segmentation of tumor subregions and surgical cavity in postoperative scans. It includes the following stages:
- DICOM to NifTI conversion
- ADC computation
- Image registration
- Skull stripping
- Intensity normalization
- Tumor segmentation
All required packages can be installed using the following command:
pip install -r requirements.txt
Note
You should install PyTorch as described on their website based on your system settings (OS, CUDA version, etc.)
The pipeline accepts DICOM images (*.DCM) grouped as follows:
INPUT_FOLDER
├── Subject_1
│ ├── TimePoint_1
│ │ ├── dwi/adc (optional)
│ │ │ ├── *.DCM
│ │ │ ├── *.DCM
│ │ │ ├── ...
│ │ ├── flair
│ │ │ ├── ...
│ │ ├── t1
│ │ │ ├── ...
│ │ ├── t1ce
│ │ │ ├── ...
│ │ ├── t2
│ │ │ ├── ...
│ ├── TimePoint_2
│ ├── TimePoint_3
├── Subject_2
│ ├── ...
├── Subject_3
│ ├── ...
The input folder must be organized with a separate folder for each subject, named with an ID number. Within each subject folder, there should be a folder for each time point, also named with a number. As per convention, '0' denotes the preoperative scan, '1' represents the early postoperative scan, and subsequent numbers correspond to follow-up scans.
Within each time point folder, there should be four specific folders: flair, t1, t1ce, and t2, each containing a set of DICOM files.
The user has the flexibility to either provide dwi DICOM files, allowing the pipeline to calculate ADC maps and integrate them into processing alongside other sequences, or directly supply DICOM files with ADC already calculated.
Also, you have to create an empty folder to output the results of the pipeline.
The pipeline comes with a grafical user interface (GUI) to easily run the pipeline.
python.exe main.py -i INPUT_FOLDER -o OUTPUT_FOLDER
If you find this pipeline useful for your academic purposes, please include the following citations:
- DICOM to NiFTI converter:
dcm2niix
, available at https://github.com/rordenlab/dcm2niix/releases/tag/v1.0.20220720- Li X, Morgan PS, Ashburner J, Smith J, Rorden C. The first step for neuroimaging data analysis: DICOM to NIfTI conversion. J Neurosci Methods. 2016;264:47-56. doi:10.1016/j.jneumeth.2016.03.001.
- REGISTRATION:
SimpleElastix
: A user-friendly, multi-lingual library for medical image registration, available at https://simpleelastix.github.io/- Marstal K, Berendsen F, Staring M, Klein S. SimpleElastix: A user-friendly, multi-lingual library for medical image registration. Computer Methods and Programs in Biomedicine. 2018;154:103-119. doi:10.1016/j.cmpb.2017.11.010.
- SKULL STRIPPING:
SynthStrip
: A tool for brain MRI skull stripping and synthetic MRI generation, available at link_to_synthstrip- Engwer C, Schwaiger BJ, Maaß A, Würfl T, Langkammer C, Haynor DR, Schölkopf B, Golland P, Menze BH, Ronneberger O. SynthStrip: A tool for brain MRI skull stripping and synthetic MRI generation. Medical Image Analysis. 2021;71:102091. doi:10.1016/j.media.2021.102091.
- SEGMENTATION:
nnUNet
: A framework for automated segmentation of medical image data, available at link_to_nnUNet- Isensee F, Jaeger PF, Kohl SAA, Petersen J, Maier-Hein KH. nnU-Net: Breaking the Spell on Successful Medical Image Segmentation. arXiv:1809.10486. 2018.
Creative Commons Attribution-NonCommercial License: This repository is licensed under the Creative Commons Attribution-NonCommercial (CC BY-NC) license. This license allows others to freely use, modify, and distribute the software for non-commercial purposes only. You are granted the right to use this software for personal, educational, and non-profit projects, but commercial use is not permitted without explicit permission. For more details, please refer to the LICENSE file.