Code to process data for integrating acquisition planning with VENUS
input/
2022-11-16-Scene.mrml
input-pointNormal-Plane-markup.json
input-anatomical-image.nii.gz (e.g. t2.nii.gz)
output/
preprocessing.sh
slice_select.py
write_slicer_markup_json.py
Label the spinal cord, vertebrae and vertebral boundaries within which you want to compute your slices.
Usage: ./preprocessing.sh anatomical_image.nii.gz contrast upper_vertebra lower_vertebra
Labels (integer values) corresponding to each vertebra and disc can be found here.
./preprocessing.sh t2.nii.gz t2 2 5 # 2 = mid C2; 5 = mid C5
Find the indices of N slices (N = 5 in this example) that are equidistant along the centerline.
At each slice, compute a plane that is orthogonal to the centerline.
python slice_select.py t2.nii.gz t2_seg.nii.gz t2_boundary.nii.gz t2 5
input/t2.nii.gz
was downloaded from the SCT t2 single subject tutorial.input/2022-11-16-Scene.mrml
: necessary to generate the planes as a markup file that can be read by slicer.input/input-pointNormal-Plane-markup.json
: necessary to generate the planes as a markup file that can be read by slicer.