open-discussion > Mrregister and the IIT HARDI template
Showing 1-11 of 11 posts
Display:
Results per page:
Oct 9, 2017  03:10 PM | Eric Moulton
Mrregister and the IIT HARDI template
Hello,

I am trying to use mrregister from MRtrix to register fod images of a patient population to the IIT HARDI template. I have encountered a problem that is rather strange. In particular, the registered images always end up just a bit smaller than the IIT HARDI template. The major subcortical structures are well aligned, but the cortex seems to have squeezed itself in. I believe this problem is coming from the non-linear part of the algorithm because when I run mrregister with just an affine transformation, the edges of the registered brain and the IIT HARDI template align quite well. It's only when I run affine+nonlinear that my brains end up a bit smaller.
For my preprocessing, I have done denoising, topup and eddy, bias_correction, dwi2response dhollander, and dwi2fod msmt_csd (from FSL and MRtrix commands). In particular, the image for which I am sending a screenshot was acquired with four shells (b=0,b=300,b=700,b=1500, > 100 directions total, and PA AP phase encoding). I am, however, observing the same behavior with data from a different subject, scanner, and acquisition parameters (b=0,b=1000, 30 direction). Since I would like to combine these populations, and the max lmax I can have is 4 (due to my population where only 30 directions are acquired), I have resampled the IIT HARDI template to lmax = 4 using sh2amp and amp2sh from MRtrix (although, I still observe this behavior with the lmax=6 of the original template). I would also like to point out that I have tried FA-based and DTI-based (DTI-TK) registration with the proper IIT template files, and the size of the brains are the same as the template. This seems to be coming only from mrregister from MRtrix. I would like to get this to work, because my end goal is to compare the different types of registration.

Here is my command for the non-linear transformation:

mrregister fod_wm.nii.gz IIT_HARDI_256_lmax4.nii.gz -force -transformed fod_wm_warped.nii.gz -nl_warp fod_wm_warp.nii.gz fod_wm_invwarp.nii.gz -mask1 fod_wm_mask.nii.gz -mask2 IITmean_tensor_mask_256.nii.gz

And here is my command for the only affine transformation

mrregister -force fod_wm.nii.gz IIT_HARDI_256_lmax4.nii.gz -type affine -transformed fod_wm_aff.nii.gz -mask1 fod_wm_mask.nii.gz -mask2 IITmean_tensor_mask_256.nii.gz

Attached is a picture where I show the curser on the IIT HARDI template, on my affine only transformed image, and on my nonlinear transformed image. As you can see, the nonlinear image is squeezed inward all around the brain, whereas the affine image aligns well with the size of the template. This can also be seen on the axial and sagittal planes where the brain appears smaller. I'm very confused as to what about the algorithm in the non-linear part is making my images shrink into the template, especially since the affine gives such a great initial alignment!

If anyone has used the IIT HARDI template for registering images and observed similar behavior or if anyone can give me any insight on this, I would be very appreciative.

Best regards,
Eric
Oct 9, 2017  04:10 PM | Konstantinos Arfanakis - Illinois Institute of Technology
RE: Mrregister and the IIT HARDI template
Hi Eric,

I am afraid I don't have a good answer to your question. We have not seen this shrinking for HARDI registration before. And as you mentioned we have never seen this for tensor-based registration either. But I would greatly appreciate it if you shared your solution with us in this thread when you figure it out.
A couple of questions.
1) How good is the brain extraction of your subjects? Are any signals outside the brain still left?
2) What would happen if you repeat your process after first masking the IIT HARDI template by setting a threshold of ~0.5 for both the IIT_WM_tissue_prob and IIT_GM_tissue_prob? This masking of the IIT HARDI template should eliminate signals from outside the brain. I am wondering if those signals mislead mrregister of MRtrix in your case.

Regards,
Konstantinos
Oct 9, 2017  06:10 PM | Eric Moulton
RE: Mrregister and the IIT HARDI template
Hi Konstantinos,

Thanks for getting back to me so quickly. I'll try to answer your questions as  best as I can.
1) I've tried with two brain extractions, one where there is the classic "halo" around the FSL bet extraction, and another where the mask was eroded, so it was pretty much all brain matter. They both gave the same results.
2) That sounds like a good idea to put in a mask of the white matter. I will try that as well and see what the result is (although I did try two brain extractions and it didn't change much, so I don't know what the extent to which non-white matter signals affect the registration).

Would you be willing to share a subject who you normalised to the HARDI template? Do you think you could provide me with the native and registered fod image so I could compare? If you are able to discuss further, my email is eric.moulton.jr@gmail.com . I am really stumped on this, and the mrregister command doesn't let you change too many parameters, so I'm not sure what to tinker with. 

Thanks again for your quick response. If I find anything, I'll be sure to post back here.

Best,
Eric
Oct 9, 2017  06:10 PM | Konstantinos Arfanakis - Illinois Institute of Technology
RE: Mrregister and the IIT HARDI template
Hi Eric,

Just a clarification about my suggestion regarding masking.
What I was proposing was to mask the IIT HARDI template by creating a more brain-specific mask. To make that mask you can:
1) mask the WM probability map we provide using a threshold of ~0.5,
2) mask the GM probability map we provide using a threshold of ~0.5,
3) combine the two masks (OR).

You can then apply the mask to the IIT HARDI template (which will better restrict the template to brain tissue) and redo the registrations.

Regards,
Konstantinos
Oct 9, 2017  07:10 PM | Eric Moulton
RE: Mrregister and the IIT HARDI template
Hi Konstantinos,

I tried what you suggested, but it still didn't help much. I've attached a screenshot of the registered FOD and the IIT HARDI template in FSLview (the IIT HARDI is overlaid on the FOD and transparent 30%). As you can see, there is still a shrinkage of the cortex. It's very strange...

Any other suggestions? I've left a message on the MRtrix community website, but no one has responded as of yet.

Thanks again,
Eric
Oct 9, 2017  09:10 PM | Konstantinos Arfanakis - Illinois Institute of Technology
RE: Mrregister and the IIT HARDI template
Indeed. So have you tried using MRtrix to register to a single subject?
Do you see shrinking in that case?

Konstantinos
Oct 12, 2017  02:10 PM | Eric Moulton
RE: Mrregister and the IIT HARDI template
Hi Konstantinos,

Thanks again for being so responsive.
Just to be clear, so far, I've only been registering single subjects to the IIT HARDI templates.
I've been trying a couple of things to figure this out, and I've also upgraded and redone some preprocessing with the new MRtrix version 3.0 (dwi2response, dwi2fod)
Here are a couple other results to show how weird this is getting.

Here is a figure of some registered images along with the IIT HARDI template. The cursor is on the same voxel on all of the images.
A. IIT HARDI template
B. A registered FA map onto the IITmean_FA template using ANTs and the cross-correlation metric for the non-linear registration
C. A registered FOD map onto the IIT HARDI template
D. A registered FA map onto the IITmean_FA template using mrregister
E. A registered FA map onto the IITmean_FA template using ANTs and the Squared Difference metric for the non-linear registration like in mrregister

Here are the commands that I used to perform the registrations in B-E
B.
antsRegistration --verbose 1 --dimensionality 3 --output [dti_FA_,dti_FA_Warped.nii.gz,dti_FA_InverseWarped] --interpolation Linear --winsorize-image-intensities [0.005,0.995] --initial-moving-transform [IITmean_FA_256.nii.gz,dti_FA.nii.gz,1] --transform Rigid[0.1] --metric MI[IITmean_FA_256.nii.gz,dti_FA.nii.gz,1,32,Regular,0.25] --convergence [1000x500x250x100,1e-6,10] --shrink-factors 8x4x2x1 --smoothing-sigmas 3x2x1x0vox --transform Affine[0.1] --metric MI[IITmean_FA_256.nii.gz,dti_FA.nii.gz,1,32,Regular,0.25] --convergence [1000x500x250x100,1e-6,10] --shrink-factors 8x4x2x1 --smoothing-sigmas 3x2x1x0vox --transform SyN[0.1,3,0] --metric CC[IITmean_FA_256.nii.gz,dti_FA.nii.gz,1,4] --convergence [100x70x50x20,1e-6,10] --shrink-factors 8x4x2x1 --smoothing-sigmas 3x2x1x0vox -x [IIT_mean_tensor_mask_256.nii.gz, dti_FA_mask.nii.gz] --float 0 --collapse-output-transforms 1 --use-histogram-matching 0
C.
mrregister fod_wm.nii.gz IIT_HARDI_256_lmax4.nii.gz -force -transformed fod_wm_Warped.nii.gz -nl_warp fod_wm_Warp.nii.gz fod_wm_InverseWarp.nii.gz -mask1 fod_wm_mask.nii.gz -mask2 IITmean_tensor_mask_256.nii.gz
D.
mrregister dti_FA.nii.gz IITmean_FA_256.nii.gz -type rigid_affine_nonlinear -force -transformed dti_FA_Warped_mrregister.nii.gz -mask1 dti_FA_mask.nii.gz -mask2 IITmean_tensor_mask_256.nii.gz -rigid_scale 0.125,0.25,0.5,1.0 -rigid_niter 1000,500,200,100 -affine_scale 0.125,0.25,0.5,1.0 -affine_niter 1000,500,250,100 -nl_scale 0.125,0.25,0.5,1.0 -nl_niter 100,70,50,20 -nl_grad_step 0.1
E.
antsRegistration --verbose 1 --dimensionality 3 --output dti_FA_eroded_SD_ --interpolation Linear --winsorize-image-intensities [0.005,0.995] --initial-moving-transform [IITmean_FA_256.nii.gz,dti_FA.nii.gz,1] --transform Rigid[0.1] --metric MeanSquares[IITmean_FA_256.nii.gz,dti_FA.nii.gz,1,NA,Regular,0.25] --convergence [1000x500x250x100,1e-6,10] --shrink-factors 8x4x2x1 --smoothing-sigmas 3x2x1x0vox --transform Affine[0.1] --metric MeanSquares[IITmean_FA_256.nii.gz,dti_FA.nii.gz,1,NA,Regular,0.25] --convergence [1000x500x250x100,1e-6,10] --shrink-factors 8x4x2x1 --smoothing-sigmas 3x2x1x0vox --transform SyN[0.1,3,0] --metric MeanSquares[IITmean_FA_256.nii.gz,dti_FA.nii.gz,1,NA,Regular,0.25] --convergence [100x70x50x20,1e-6,10] --shrink-factors 8x4x2x1 --smoothing-sigmas 3x2x1x0vox -x [IIT_mean_tensor_mask_256.nii.gz,dti_FA_mask.nii.gz] --float 0 --collapse-output-transforms 1 --use-histogram-matching 0

B represents the typical registration using antsRegistration.
C represents the typical registration using mrregister for fod images
D represents the typical registration using mrregister for FA images (and I also added an additional scaling level and changed the gradient step to see if it would be closer to the registration in B)
E represents the antsRegistration using the MeanSquares metric instead of the Mutual Information for the rigid+affine steps and the Cross-Correlation for the Non-Linear Steps.

What seems to be aligning my images best so far - that is, visually - is antsRegistration. It respects the size of my FA maps and really aligns them well with the IITmean_FA template. When registering the same subject's FOD maps with mrregister, I am unable to get a registered FOD map that is of the same size as the template; however, the deep subcortical white matter structures are well aligned (corpus callosum, corticospinal tract, inferior fronto-occipital fasciculus, superior longitudinal fasciculus, etc.). Moreover, when I use mrregister to register the scalar FA maps, I get a pretty bad registration, and the final size of my image looks like my registered fod map with mrregister. Finally, when I use antsRegistration with the MeanSquares metric, I get something that approaches what mrregister does (although it's not exactly the same).

Changing the masks on the template as you have suggested hasn't had any positive effect on my registrations so far. As you can imagine, I am really stumped. I would really appreciate any help possible. Please let me know if you have any other suggestions. If you have some time, could I send you this subject to see if you get the same result when registering to the IIT HARDI template?

Thanks again for all of your help,
Eric
Oct 12, 2017  02:10 PM | Konstantinos Arfanakis - Illinois Institute of Technology
RE: Mrregister and the IIT HARDI template
Hi Eric,

You are welcome. And thank you for providing all the details.
So here is how I translate your findings. It seems like ANTS based on cross-correlation gives you a good match with the IIT DTI template, while mrregister does not give you a good match for neither the FOD registration to the IIT HARDI template nor the FA registration to the IIT DTI template.
If you try DTI-TK tensor-based (not only FA) registration to the IIT DTI template it should give you an even better match to IIT space (even better than FA-based ANTs). Would it help your project to use that deformation and appropriately reorient the FODs?
Also, did you try registering individual subjects to each other using mrregister? I am wondering if you get the same problem.
To me, your findings show that the issue is specific to mrregister and I hope you get some help from the developers.
If you'd like, you can also send me the data of this subject and we can give it a try. Just send me a google drive link (or similar) to mri at iit.edu

Regards,
Konstantinos
Oct 13, 2017  12:10 PM | Eric Moulton
RE: Mrregister and the IIT HARDI template
Hi Konstantinos,

First, I sent you an email at mri@iit.edu with some files for a patient. Thank you for agreeing to look at my data.

I have indeed tried DTI-TK on the IIT DTI template, and it works very well ! It is moreover for this reason that I am somewhat disappointed with the fod normalization, because I thought that the higher dimensionality of the fod data would result in a better registration, as shown in Raffelt, D. et al (2011). Symmetric diffeomorphic registration of fibre orientation distributions. NeuroImage, 56(3), 1171–1180.

Ideally, for the project I had in mind, I was pretty keen on comparing both types of registration for a particular question I had in mind.

In response to your question "did you try registering individual subjects to each other using mrregister", I tried registering two patients, and I also registered my patient to a healthy population template (fod) from a different study, just to compare. Indeed, the warped fod files don't seem to always match up with the borders of the template or reference fod. I am curious to see if this is something you observe in your data or if you observe this as well with the file I sent you.

Much thanks again,
Eric
Oct 23, 2017  10:10 PM | Konstantinos Arfanakis - Illinois Institute of Technology
RE: Mrregister and the IIT HARDI template
Hi Eric,

We tried MRtrix registration using your data. The results are similar to yours. See attached figure. We see shrinking of the brain near the cortex. Based on your tests, it seems that mrregister will shrink the edges of the brain independent on if you are using FODs or FA maps. I wish I had a solution for you. I don't think this is something we can control. I think this is more of an MRtrix issue. I would still be curious to know if you find a solution to this problem.

Regards,
Konstantinos
Oct 24, 2017  07:10 AM | Eric Moulton
RE: Mrregister and the IIT HARDI template
Hi Konstantinos,

Thanks for all your help and the time you took to look at my data. Indeed, I think these are the limits of mrregister as of now. I contacted the makers of MRtrix on their online forum with a similar question (http://community.mrtrix.org/t/poor-regis...). While they gave me some tips, which did in fact improve my registration (i.e., adjusting the average intensity, adding more subsampling levels), I am not able to get anything comparable to using ANTs or other scalar methods as of now.

I recently asked them how they were able to use the cross-correlation metric as in Raffelt et al. 2011 Neuroimage (http://community.mrtrix.org/t/cross-corr...). I'm hoping that I will be able to create a pipeline using a combination of ANTs and MRtrix for each iteration in order to estimate the deformation fields with a cross-correlation metric and then apply it to the FODs.

If you are interested, follow the second post. Hopefully they will give me some direction.

Best regards,
Eric