Voxels outside of mask in sct_register_multimodal

Hello SCT –

We are using sct_register_multimodal (after segmenting/registering anatomical data) to register fMRI data to the PAM50 template space.

We are using a binary mask of the spinal cord (manually drawn on motion corrected fMRI mean data) as the input for -dseg. I have a couple of questions related to this function input:

  • How are voxels that are outside of the given input to -dseg (outside of the mask) taken into account when the warp fields are being computed?
  • What is the difference between -dseg and -m in this function?

For reference,
sct_register_multimodal -i PAM50_t2s.nii.gz -iseg PAM50_cord.nii.gz -iseg PAM50_cord.nii.gz -dseg fmri_mean_mask.nii.gz -param step=1,type=seg,algo=centermass:step=2,type=seg,algo=bsplinesyn,slicewise=1,iter=3 -initwarp warp_template2anat.nii.gz -initwarpinv warp_anat2template.nii.gz

Thank you so much!

– Kim

1 Like

Hi @khemmerling,

Thank you for taking the time to ask such thoughtful questions, and for providing your reference command in advance. :smile:

The following answers are courtesy of @jcohenadad:

From @jcohenadad:

Tricky question: my answer would be: it depends on the registration method.

  • For example, the ‘syn’ algo will mostly consider voxels in the mask, and not so much those outside, so if there is a strong deformation the ones outside will be ignored and left untouched. The ‘bsplinesyn’ has spatial regularization, so more voxels outside the mask will be warped.
  • The other extreme, ‘affine’ or ‘rigid’, there all voxels in the image will be considered by the transformation.
  • And then, there are the algo in-between, for example ‘centermass’ which you use at step1 in your example. There: all voxels in the image will be affected by the same slice-wise translation.

Note that when you register to the template, it does a succession of these algorithms, the first one (step0, not listed in the -param option but always done by default) being a label-based affine, so all voxels in the FOV will be considered. Then, it depends on the algo you choose for the other steps in the registration.


From @jcohenadad:

the -dseg flag identifies the segmentation that is to be used by the algorithm, for the purpose of registration (if type=seg is selected). For example, algo centermass , bsplinesyn syn will try to match the input segmentation with the PAM50 segmentation.

On the other hand, -m refers to the voxels that are considered in the image to compute the transformation with ANTs-based algorithms. (It is directly tied to the -x option in antsRegistration and antsSliceRegularizedRegistration). If you specify a mask that closely encompass the spinal cord, the registration algorithm will only focus on these voxels, and not on the rest of the tissue in the image (eg: bones, muscles, fat, etc.) which could hamper the performance of the registration algorithm (since, at the end of the day, you want to register the spinal cord, not the rest of the tissues)

I would also personally add that, you would not necessarily use the same mask for both -dseg and -m:

  • -dseg: Typically a spinal cord segmentation that precisely highlights the spinal cord region.
  • -m: Typically a slightly wider mask that includes the vertebrae, CSF, and a small portion of the surrounding tissue, with the main goal being to include the other (non-SC) tissue.

See the following example (and associated tutorial page) for a comparison between mask typpes:

I hope this helps!

Kind regards,
Joshua

3 Likes

Thank you both so much for your time in answering my question – the response was very helpful!!

3 Likes