Ensure Docker is installed and properly configured on your system.
Run the following command to build the Docker image for TOF segmentation:
docker build -t tofsegmentation:latest .
Execute the container using the command below, adjusting the paths as needed for your environment:
docker run --gpus 0 -v /path/to/input/data:/in -v /path/to/output/data:/out -v /path/to/model:/model tofsegmentation:latest \
--src_path /in --dst_path /out --model_path /model \
--filter_series csBTFE_M2D --num_workers 4
- /path/to/input/data: Local directory containing input MRI data.
- /path/to/output/data: Local directory where the results will be saved.
- /path/to/model/: Local directory to the trained model.
To view all available commands and options, run the following command:
docker run tofsegmentation:latest -h
The results will be organized in the output folder under the following structure:
Subfolder for each patient (e.g., patientID):
- Contour_images: Contains JPG images of all slices with contours.
- predicted_TOF.nii.gz: The 4D cine with predicted segmentation masks.
In the root of the output folder, you will find a CSV file named CMR_quantification_UZL.csv, containing quantification data with the following columns for each patient ID:
- patient
- time
- serie
- LV EDV [ml] (Left Ventricular End-Diastolic Volume)
- LV ESV [ml] (Left Ventricular End-Systolic Volume)
- LV EF [%] (Left Ventricular Ejection Fraction)
- LV mass [g] (Left Ventricular Mass)
- RV EDV [ml] (Right Ventricular End-Diastolic Volume)
- RV ESV [ml] (Right Ventricular End-Systolic Volume)
- RV EF [%] (Right Ventricular Ejection Fraction)
- RV mass [g] (Right Ventricular Mass)
Adjust the command and paths according to your specific data and model setup.
Access the model using the following link: model
Unzip the downloaded main_folder.zip file:
unzip main_folder.zip
Ensure the extracted folder is accessible by the Docker container. When running the container, mount the directory as follows:
-v /path/to/main_folder:/model
This work is described in: Automated biventricular quantification in patients with repaired tetralogy of Fallot using a 3D deep learning segmentation model Tilborghs, Sofie et al. Journal of Cardiovascular Magnetic Resonance, Volume 0, Issue 0, 101092.