Spinal cord gray matter imaging challenge for the 5th Spinal Cord Workshop (June 22nd 2018, Paris). The objective for this challenge is to propose a protocol that will generate the best image quality. For more details, please see: https://goo.gl/2owcL7.
Download the dataset of the challenge:
git clone https://github.com/sct-pipeline/gm-challenge-data.git
Download this repository and go in it:
git clone https://github.com/sct-pipeline/gm-challenge.git
cd gm-challenge
Create virtual environment, activate it and install package:
virtualenv venv # You only need to run this once
source venv/bin/activate # You need to run this everytime you with to process the data
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
Run (you need to have SCT installed):
sct_run_batch -script process_data.sh -jobs -1 -path-data <PATH_DATA> -path-output <PATH_OUT>
with:
At the end of the processing, you can review:
Subject | SNR_diff | SNR_single | Contrast |
---|---|---|---|
9604 | 17.955421557112000 | 15.036597989806800 | 0.1532358378597440 |
9605 | 24.851538876483400 | 18.7942962516352 | 0.1238874277356780 |
9584 | 18.45677255732030 | 14.395098187990800 | 0.124765433521577 |
9418 | 20.29502533086980 | 16.989013170063300 | 0.1093208813636860 |
Two NIfTI files are required: an initial scan and a re-scan without repositioning. The analysis script process_data.sh
includes the following steps:
SNR_diff
using the two-image subtraction method (Dietrich et al. J Magn Reson Imaging, 2007) in the WMe mask.SNR_single
using the first scan, by dividing the mean in the WMe mask and the STD in the WMe masks. Contrast
by dividing the mean signal in the GM by that in the WM, on a slice-by-slice basis and then
average across slices.A similar analysis can also be run on the spine-generic dataset. However, given that only one scan was available,
SNR_diff could not be calculated. The command is similar to the one earlier, except the
sct_run_batch -script <PATH_REPOSITORY>/process_data.sh -path-data <PATH_DATA> -path-out <PATH_OUTPUT>
After running this script, figures can be generated as follows:
generate_figure_spinegeneric -ip <PATH_DATA>/participants.tsv -ir cd <PATH_OUT>/results/results.csv -o fig
Generate synthetic phantom of WM and GM that can be used to validate the proposed evaluation metrics. The phantoms are generated with random (Gaussian) noise, so running the script multiple times will not produce the same output. This script is meant to be run twice in order to assess the metrics with the following functions. Example:
simu_create_phantom -o simu_phantom1
simu_create_phantom -o simu_phantom2
Once both sets of phantom data are generated, process these. The next script will look for CSV files, which are
generated by simu_create_phantom.py
, and which contain file names of the NIfTI phantom data:
simu_process_data -i simu_phantom1/ simu_phantom2/
Finally, make figures to assess metrics sensitivity to image quality across two smoothing values:
simu_make_figures -i simu_results/results_all.csv -s 0
simu_make_figures -i simu_results/results_all.csv -s 1
PATH
crontab -e
):
python niftyweb/setup/daemon_SOFTWEB_2files.py WMGM
Stephanie Alley, Ferran Prados, Julien Cohen-Adad
See: LICENSE