We are trying to register the mean functional image to the PAM50 using 2 steps: func2T1w and T1w2PAM50. The second step looks good (see video t1w2pam50) but we have some issues with the first one (see video func2pam50):
First when defining the destination file (sct_register_multimodal ):
If we use t2 we have the cord is enlarged.
If we use t2s, I notice that the first slices of the template (around C1 level) are missing and I have registration problem for the corresponding slices
We also tested two different combinations of parameters and had trouble finding the best compromise:
My deepest apologies for the late response. I am writing to let you know that @jcohenadad is currently out of office, and will return on August 28th.
I will check in with other members of the lab to see if they can provide insight into your question. But, otherwise, I thank you for patience until Julien returns.
Hi Caroline, thank you for reaching out. I agree the T1wtoPAM50 registration looks good, and hopefully robust across your population. As for the GRE-EPI registration, itās a bit hard for me to advise without looking at the data. If you could share 2-3 representative subjects, organised in BIDS format, Iāll look for an optimal solution.
Sorry for the slow response. I am looking at your data now, but I donāt see any script that I can use to reproduce your results and perform further optimization. Could you please send me your script that I can use with sct_run_batch to process the two subjects you shared?
itās my turn to reply late! Iāve added a .sh script that can be run from the terminal + a readme file.
Iām not familiar with the sct_run_batch script and it would take me some time to use it so I hope this format works with you!
The pipeline was not end-to-end but assumed some preprocessing were done before, e.g. segmentation of cord on T1w, registration between T1w and PAM50 template, etc. It is important to always provide a comprehensive pipeline script to make sure results are reproducible. I wrote the full pipeline (see below).
Your script required manual interventions (eg: āSUBJECT=āsub-A011ā # can be change by sub-006ā), which is prone to human error. I made it fully automatic to run across a directory of subjects using sct_run_batch (see instructions below).
Your script did not include QC report generation. I strongly recommend using QC report generation to facilitate, systematize and make shareable the QC procedure, which is essential in any image analysis pipeline. Iāve added QC report generation in the script below.
Your script registered funcā>T1w and then T1wā>PAM50. I recommend doing funcā>PAM50, using the T1wā>PAM50 intermediate warping field, to minimize the accumulation of registration errors. See new script.
The new script registers using C2 and C5 vertebral levels. Please change according to the regions you are most interested in (eg: C4-C7).
I used a mask (dilated spinal cord) to improve the performance of the PAM50->func registration
The data are not BIDS-compatible, making the analysis script ācustomā and not shareable. For example, the suffix ā_scā in an image file under anat/ is not authorized: sub-A006_T1w_sc.nii.gz. See BIDS specification and online BIDS validator.
I encourage you to watch the latest SCT course, especially the part on analysis pipeline.
Automatic vertebral labeling failed for sub-A006, so this should be corrected manually. See function label_if_does_not_exist in the script. You just need to create 2 points and place them under the derivatives/labels folder. Also see Analysis pipeline ā spine-generic documentation for inspiration about how to QC, manually correct, store corrections, and then use the corrections for re-running the analysis pipeline.
Cord segmentation for both subjects on the EPI scans need to be manually corrected (see previous point). This will positively impact the quality of the registration.
Dear Julien,
Thank you very much for taking the time to provide me an exemple and for these feedbacks,
Youāre right I didnāt follow the standards because my initial image covered both brain and spinal cord in this dataset and I have to play with different toolboxes (SPM, FSL, SCT) in a single preprocessing Python script. Iāll try to improve the coding of the script for my next studies!
For the QC, I systematically check all images (brain + sc) with fsleyes after moco, segmentation, Coreg, denoising and also the tSNR improvement etcā¦ (again, to have the same tool to examine QC for both brain and SC)
I have done the labelling of all vertebrae (Iām interested in all cervical spinal levels)
A careful manual correction of the segmentation (T1w and func) was done before the coreg step.
Sorry, I had to change a little the BIDS format and include an additional level that I named āstructureā to distinguish the brain or sc (spinal cord) after cropping my inital images in two. That is why I have the sub??_T1w_sc.nii.gz and the sub??_T1w_brain.nii.gz images for each individual. I hope to find a better standard in the future!
Thank you for pointing out the courses Iām going to improve my brain and spinal cord pipeline and trying to find a standard that matches as much as possible both the brain and spinal cord communities!
Finally, your recommendation func > PAM50 using func>T1w intermediate warping field was a great solution! It improves my coregistration. I have done some tests and the coregistration looks a little better when Iām using PAM50_t2s compared to PAM50_t2, except for the upper slices (z>960). In fact, these slices are missing in PAM50_t2s. Do you have a complete version of the PAm50_t2s image so I can test it on the entire cervical SC?
Unfortunately I donāt. The PAM50 was built with the T2w data and coverage available at that time. However the T2w is pretty close to the T2w in terms of contrast, so I recommend you use the T2w for registration if you need coverage above z=960