spinalcordtoolbox / template-dog

Repository to create spinal cord template of dogs. Data from VirginiaTech.
0 stars 0 forks source link

[Update on the template] Details of the newly generated template #20

Closed rohanbanerjee closed 4 months ago

rohanbanerjee commented 4 months ago

[once approved for release, content from here will be shifted to the README and changelog for the new release]

Link to new template (folder): https://drive.google.com/file/d/14iTRfr7w0OnloqBoTtmtQj5lJKyD74p4/view?usp=sharing

The below template was generated using the following parameters:

'symmetric': True,
 'protocol': [{'iter': 3, 'level': 8},
              {'iter': 3, 'level': 4},
              {'iter': 3, 'level': 2},
              {'iter': 3, 'level': 1},
              {'iter': 3, 'level': 0.5}],
 'refine': True

In short this means that were start the template generation process with 3 iteration in 8mm and then in the last step we end it with 3 iterations in 0.5mm. The motivation to do this was to allow limited deformations in the first few rounds and then create a high-resolution template in the end.

What has changed from the previous release:

  1. Centerlines on the subjects were improved to create a perfectly straight template and avoid any wiggling.
  2. The new template has 24 discs when compared to r20240112.
  3. The spacing in between the discs is kept intact w.r.t. to the 5 subjects used for the template creation process.
  4. More precise cord segmentation.

The template along with it's derivatives (in the PAM50 format) can be found in the link above. Here's how they are named: ⚠️ This release only contains the new T2w template.

  1. templatedog_t2w.nii.gz --> T2w template using the 5 subjects
  2. templatedog_level.nii.gz --> T2w spinal cord mask with discrete vertebral levels
  3. templatedog_label_disc.nii.gz --> point-wise intervertebral disc labels
  4. templatedog_cord.nii.gz --> spinal cord mask

SCT version SHA: e5525085b7d8531416a7fee304d8a71714d540ba

Protocol to generate the above derivatives:

  1. templatedog_t2w.nii.gz

    Use the SCT template creation framework along with the initially mentioned parameters: https://github.com/neuropoly/template
  2. templatedog_cord.nii.gz

    Command used: sct_deepseg_sc -i templatedog_t2w.nii.gz -c t2s -o templatedog_cord.nii.gz
    Manual correction was done by Rohan Banerjee on the output from sct_deepseg_sc
  3. templatedog_label_disc.nii.gz

    sct_label_utils -i templatedog_t2w.nii.gz -create-viewer 1:24 -o templatedog_label_disc.nii.gz -qc qc_templatedog_label_disc
  4. templatedog_level.nii.gz

    sct_label_vertebrae -i templatedog_t2w.nii.gz -s templatedog_cord.nii.gz -c t2 -discfile templatedog_label_disc.nii.gz

After this was done, we demonstrate the registration of a subject to the T2w template.

We picked sub-HarshmanDobby for this. [with internal data access] Required data is at the template_dog_virginiatech repository under the rb/update_HB branch [with no internal data access] Please download the below data, with only sub-HarshmanDobby and it's derivatives (contains no sensitive information) reg_to_temp_bids.zip

1. Protocol to segment the spinal cord of the sub-HarshmanDobby
Command used : sct_deepseg_sc -i sub-HarshmanDobby_T2w.nii.gz -c t2 -o sub-HarshmanDobby_T2w_label-SC_seg.nii.gz
Manual correction was done by Rohan Banerjee on the output from sct_deepseg_sc
2. Protocol to get the disc labels
sct_label_utils -i sub-HarshmanDobby_T2w.nii.gz -create-viewer 1:24 -o sub-HarshmanDobby_T2w_labels-disc.nii.gz

The following steps were done for the registration to the template:

sct_register_to_template -i sub-HarshmanDobby_T2w.nii.gz -s sub-HarshmanDobby_T2w_label-SC_seg.nii.gz -ldisc sub-HarshmanDobby_T2w_labels-disc.nii.gz -t <PATH_TO_TEMPLATE_PARENT_FOLDER> -c t2 -s-template-id 2 -param step=1,type=seg,algo=centermassrot:step=2,type=im,algo=syn,metric=CC,iter=3 -ofolder HB_to_temp -qc qc_HB_to_temp

Results:

QC report qc_HB_to_temp.zip

anat2template overlayed on template
https://github.com/spinalcordtoolbox/template-dog/assets/25586344/f753a5b7-cf0b-4882-8137-1bf1072f3ea4
template2anat overlayed on template
https://github.com/spinalcordtoolbox/template-dog/assets/25586344/11743718-fc78-4364-8d79-f4005b2f7399
1. Write about the procedure of generating the template 6. Write the protocol to generate the segmentation, discs, vertebrae on the template 7. Show the example of registering HarshamanDobby to the template -- (with steps to reproduce it) 8. Release the new template (remember to delete the Mac OS overhead files)
rohanbanerjee commented 4 months ago

CC for review @jcohenadad @benjamindeleener

jcohenadad commented 4 months ago

@rohanbanerjee can you please create a PR with the proposed changes (README and CHANGELOG)? thank you

rohanbanerjee commented 4 months ago

For review: