MICCAI2024: Resolving Variable Respiratory Motion From Unsorted 4D Computed Tomography [paper link]
Yuliang Huang, Bjoern Eiben, Kris Thielemans, Jamie McClelland
This repository provides pre-compiled executable along with the XCAT phantom dataset* used in our MICCAI paper. We propose surrogate-free/optimized method as an improvement over the surrogate-driven motion model approach (Jamie McClelland et al.), as we found the quality of surrogate signals can impact accuracy of motion estimation (Yuliang Huang et al.). The implementation was adapted from our original software SuPReMo. Keep en eye on this repo as we may incorpoarte the latest developments back to SuPReMo in the future.
*Thanks Prof Paul Segars from Duke University for the permission of releasing this single simulation example. Please contact him if you want to use the XCAT software.
Please cite our paper if you find this repository useful for your research
@inproceedings{huang2024resolving,
title={Resolving Variable Respiratory Motion From Unsorted 4D Computed Tomography},
author={Huang, Yuliang and Eiben, Bjoern and Thielemans, Kris and McClelland, Jamie R},
booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention},
pages={588--597},
year={2024},
organization={Springer}
}
The executable was compiled on WSL1 with gcc/g++ 8.1.0. It has not been tested on other platforms and compilers. To get the manual of the executable, you can type:
./runSupremo -h
Time points of the end-inhalation phase are identified as black dots in the respiration signal plot, with two of them being
Please visit this link to access the phantom dataset. Alternatively, you could also download it with the following commands:
wget -O data.zip https://rdr.ucl.ac.uk/ndownloader/articles/26132077/versions/1?folder_path=data
After downloading the dataset, please extract the compressed folder by running:
unzip data.zip -d ./
The phantom dataset consisted of images at 182 timepoints, each with size 355x280x115 voxels and resolution of 1x1x3mm. The dynamic volumes can be found in data/ground_truth/volumes.zip. Tumor masks for each volume can be found in data/ground_truth/tumor_masks.zip.
The data/timeIndicesPerSliceAndPhase.txt file records the index of timepoint per slice and phase to simulate a realistic 4DCT acquisition pattern. Run the following lines to extract the CT slabs acquired at each timepoint and sort them into 10 respiration phases:
unzip data/ground_truth/volumes.zip -d data/ground_truth/volumes
unzip data/ground_truth/tumor_masks.zip -d data/ground_truth/tumor_masks
python generateData.py
The script above will generate two folders that contain 182 CT slab images (data/unsort_ct_slabs/) and 10 phase sorted 4DCT (data/sorted_4dct/). A text file (data/dynamic_image_files.txt) will also be generated to store the path to each CT slab images, which will later be used by our software.
You can visualize the results by running the following command line and checking the output phantom_animation.gif image:
python plot_phantom_images.py
The simulated RPM signal is stored in data/rpm_signal.txt. The following script will generate surrogate signals to be used by surrogate-driven/optimized method from the RPM signal (data/surrogate_rpm_grad.txt) and sinusoidal surrogate siginals to be used as initial values for surrogate-free method, derived from respiration phase (data/surrogate_phase_derived.txt).
python generate_surrogate_signals.py
When respiration curves used to sort the 4DCT data are available and have strong correlation with internal motion, the surrogate-driven method can be used. In this phantom dataset, however, the rpm signal is not ideal because of the artificially created hysteresis in the simulated breathing motion.
Run the following script to fit the sorrugate-driven motion model and estimate the volumes and tumor masks at each timepoint:
bash run_surrogate_driven_method.sh
To evaluate the results of surrogate-driven method, run the following lines:
python evaluation.py --dir_gtVolume data/ground_truth/volumes/ --dir_gtMask data/ground_truth/tumor_masks/ --dir_estimatedVolume output/surr_driven/estimated_volumes/ --dir_estimatedMask output/surr_driven/estimated_tumormasks/
In clinical practice, the respiration curves are rarely saved. In such case, surrogate-driven method is not applicable due to the lack of surrogate signals. In contrast, surrogate-free method does not require existing respiration signals but optimize the surrogate signals from simple sinusoidal curves.
Run the following script to fit the sorrugate-free motion model and estimate the volumes and tumor masks at each timepoint:
bash run_surrogate_free_method.sh
To evaluate the results of surrogate-free method, run the following lines:
python evaluation.py --dir_gtVolume data/ground_truth/volumes/ --dir_gtMask data/ground_truth/tumor_masks/ --dir_estimatedVolume output/surr_free/estimated_volumes/ --dir_estimatedMask output/surr_free/estimated_tumormasks/
When clinical respiration curves are available, we don't need to be too harsh to ourselves by starting from sinusoidal functions. Instead, the surrogate-optimized method adjusts the clinical respiration surrogates when fitting the motion model, so as to enhance its correlation with the internal motion.
Run the following script to fit the sorrugate-optimized motion model and estimate the volumes and tumor masks at each timepoint:
bash run_surrogate_optimized_method.sh
To evaluate the results of surrogate-optimized method, run the following lines:
python evaluation.py --dir_gtVolume data/ground_truth/volumes/ --dir_gtMask data/ground_truth/tumor_masks/ --dir_estimatedVolume output/surr_optimized/estimated_volumes/ --dir_estimatedMask output/surr_optimized/estimated_tumormasks/
This study was funded by Elekta Ltd., Crawley and the EPSRC-funded UCL Center for Doctoral Training in Intelligent, Integrated Imaging in Healthcare (i4health) (EP/S021930/1). We thank Dr. Gareth Price from the Christie NHS, University of Manchester, UK for providing data from ROSS-LC clinical trial.
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International License.