Coregister lesion mask to T1

Hi experts,

I have a lesion mask that has been created from T1 with a lesion. They are exactly the same but they are in different spaces. I want to register the lesion mask to the T1 but it shows mismatching.

I tried using SPM, flirt and mrtransform
mrtransform lesion.nii output.nii -template T1.nii

Non of them has done the job.!
Screen_Shot|690x428

  • Despite all this, HOW can I register a lesion mask to T1, if they are exactly the same but in different spaces?

Regards,
Salah

Hi Salah,

From which image was the lesion mask created? You would need to register that image to your T1 and apply the resulting transformation on your lesion mask. Directly registering the mask to your T1 will not work (as you noticed) as both images do not have sufficient similarities.

Kr
Thibo

Hi Salah,

There might be a terminology problem here; please see this wiki page. In particular if you have generated the lesion mask from the T1w image, there should be no reason to register that image to the T1w. What I’m hypothesizing might be going on is that you’ve generated the lesion mask from the T1w image before a transformation was applied to the latter, and so now you have an issue where the content of the two images do not overlap. But what you want to do is take the transformation that was applied to the T1w, and also apply it to the lesion mask. This does not involve “image registration”.

I would also note that you mrtransform call is not actually applying any spatial transformation; it is only resampling the data from lesion.nii onto the voxel grid as defined by template image T1.nii.

Rob

1 Like

Hi.

I have a similar issue. I created a lesionmask on my T1 image, then my T1 image underwent freesurfer recon-all for brain extraction and the output file now has different image dimensions (256x256x256) than the lesionmask (192x240x256).

I used the brain-extracted T1 image with the new image dimensions to register it to my DWI image (switching the dimensions to 256x256x126). I now wanted to bring my lesionmask in DWI space as well, however when applying the same transformation matrix to the lesionmask that I previously used on the T1 image (flirt -v -applyxfm -init diff_to_structural_inverse.mat -in lesionmask.nii -ref DWI_b0.nii -out lesionmask_to_DWI.nii), the results seem not correct. Could this be because the image dimensions of the mask are different to the ones from my T1 image?

I tried adjusting the dimensions to the dimensions of the T1 image (mrtransform -template T1.nii lesionmask.nii lesionmask_adjusted.nii), however, when applying the transformation onto that adjusted lesionmask file, the results still seem off.

How can I correctly apply the transformation matrix to my binary lesion mask file? Do you have any idea how to proceed in this case?

Thank you for your help,
Franziska