I’m using SCT v7.2 to process PSIR (named t1.nii.gz), T2w (named t2.nii.gz), and MT images to compute MTR in the whole SC, WM, GM between C2-C4 in people with MS. Ideally, I’d like to use PSIR (t1.nii.gz) since it’s available for all participants. However, I’ve also tested using T2w (t2.nii.gz) although T2w data is available for only half of the participants. I’m closely following the batch_single_subject_v7.2.sh pipeline from the December 2025 SCT course.
I had a question regarding sct_register_to_template and sct_warp_template using t1.nii.gz or t2.nii.gz and the impact on downstream MTR analysis.
I then use the resulting warp (warp_template2anat.nii.gz) to initialize MT registration and extract MTR metrics (whole SC, GM, WM between C2-C4).
However, in the QC outputs from sct_warp_template (see attached), I consistently observe that the warped atlas (GM/WM) is not accurate. The SC segmentation itself looks fine.
My understanding is that this misalignment will lead to inaccurate WM/GM MTR estimates in later steps:
Is it correct to assume that GM/WM atlas misalignment will affect the MT registration step, given that the T1/T2-derived warp will be used for initialization? If so, are there specific parameter adjustments that could improve GM/WM segmentation? Or do you recommend to limit the analysis to whole SC MTR only?
Is whole SC MTR (using -l 50) still reliable in this situation?
As an alternative approach, could I simply use MT-on image to segment GM/WM, or is this not recommended due to still relative noise for MT sequence and the fact that SCT relies on template warping for GM/WM?
I’d be happy to share example data, script (draft, work in progress), and full QC report privately to your email, if helpful (following hospital data-sharing policies).
Thank you so much for your help in advance. I appreciate your support!
Thank you so much for your post! We would be happy to help answer your (very thoughtful!) questions.
Question 1.
Looking at all of the steps you’ve shared (PSIR reg, T2 reg, MTR warp, etc.), it looks like the entire pipeline is based solely on SC segmentation masks. (For example, the use of -iseg PAM50_cord.nii.gz + -dseg mt_on_seg.nii.gz, as well as the -initwarp ../t1/warp_template2anat.nii.gz step, which was also based solely on the SC seg of the PSIR data.)
So, even though the intermediate “warped PAM50 WM” files look very poor, as long as those specific masks are not directly used in any further steps, there isn’t an immediate risk. (See also: My “Aside” at the very end of this reply.)
Question 2.
Assuming the warped SC seg for PSIR looks okay (and I believe you’ve indicated that it does!), the subsequent registration steps could still work well. The initwarp is used only as a coarse initial registration step – all of the refinement of the registration (e.g. slicewise deformation) is done purely using the MT data anyway. So, assuming sufficient detail in the MT image/mask, I don’t think there is too much to be concerned about.
Note: The use of -initwarp is largely useful for adding landmark alignment (e.g. disc/vertebral labels) for images that do not have easy-to-distinguish landmarks. So, it would be worth double-checking the SI-axis alignment for the PAM50->PSIR warped data (e.g. by looking at the warped PAM50_levels.nii.gz file), and making sure that the alignment adds information that the MT data alone would lack).
Question 3.
This sample image is of the MT data, right? (I ask because the screenshot is captioned sct_register_multimodal - MT, so I wanted to make sure.)
Note: SCT has a new contrast-agnostic gray matter model (sct_deepseg graymatter), and so you may wish to substitute in this model for the existing sct_deepseg_gm step in the first tutorial above. We are currently in progress for updating the documentation!
WM-informed template registration allows you to largely keep the registration the same (due to the same SC segmentation used as the outer boundary for -iseg and -dseg), while also slightly tweaking the registration to match the inner boundary of the GM. This may result in more accurate registration / atlas warping, and the end result may be improved even if the GM segmentation alone was not sufficient for computing metrics.
Feel free to try this approach on a sample subject and share the GM seg + registration results, and we would be happy to assess whether the approach is worth pursuing.
Kind regards,
Joshua
Aside: Returning back to Question 1, if you wish to dig more deeply into why the intermediate warped PAM50->PSIR/T2 white matter masks look so misaligned, we can definitely do that (for the sake of building shared understanding – I’m interested too!).
Investigation into poor warped WM masks from QC
This is a very good observation. While there will typically be some GM/WM inaccuracies when registering T1 data using only the SC mask, the inaccuracies generally should not be as severe as what you’ve shown in your sample QC report. (I mention this because the SC mask does not encode the shape of the GM/WM, but despite this, using the SC mask shouldn’t create the broken WM masks you see in the QC.)
I am wondering about the resolution of your data, and whether the sct_warp_template step loses its accuracy when trying to warp the PAM50 WM mask to the PSIR space. When looking at a sample slice of the source image in the PAM50 space, we see a rather detailed mask:
And checking the original PAM50 T1 resolution, we see that the template is 0.5mm isotropic:
If we are warping this mask to a suitably detailed destination image, the details should be largely preserved. For example, on our test T2 data, we see:
If instead we were to warp this mask to a coarser-resolution image (such as – I am guessing – your PSIR data), however, the finer details would inevitably be lost.
Just as an initial step, you can try sharing the output of the debugging command (sct_image -header -i [YOUR_IMAGE]) for both the PSIR and T2 data, and compare what you see to our sample data above?
(NB: I have also asked my colleagues to look over this thread and make sure that I haven’t missed anything. So, there should be a follow-up reply later when they have a moment.)
we only see the static PNG-- would be useful to see the PNG with overlay that can be toggled-- pls share QC report-- easier for us-- from the PNG where we see the overlaid WM mask, I don’t see anything shocking-- can you elaborate on what concerns you?
now your questions:
Is it correct to assume that GM/WM atlas misalignment will affect the MT registration step, given that the T1/T2-derived warp will be used for initialization? If so, are there specific parameter adjustments that could improve GM/WM segmentation? Or do you recommend to limit the analysis to whole SC MTR only?
only slightly-- obv it depends on your reg param for the MT phase-- if you share qc report which includes syntax it,s easier for us to review-- i have no time to review an entire script–
Is whole SC MTR (using -l 50) still reliable in this situation?
depends what you mean by reliable-- you’ll get a mix of WM and GM since -l 50 is the whole cord-- so not reliable if you only care about WM–
As an alternative approach, could I simply use MT-on image to segment GM/WM, or is this not recommended due to still relative noise for MT sequence and the fact that SCT relies on template warping for GM/WM?
not a question of noise but of contrast-- based on your 3rd PNG contrast seems ok-- did you try the latest GM seg model? regardless you’ll need information about disc level