DWI to T2 (mouse)

I know there’s a ton of posts on here about registering to T1-weighted images and the optimal sequence of events, etc. However, I haven’t seen the answer to this question.

Current work flow for my mice is:

  1. Denoise
  2. mrdegibbs
  3. dwifslpreproc

I’d like to output data in T2 space and can certainly compute rigid/affine registration to the high resolution structural image either with ANTs or mrregister (since it’s a similar contrast). If I transformed my preprocessed data at this point, this would require a second interpolation (any interpolation in eddy followed by interpolation to T2-space).

Here’s the question: Can I transform my data using MRtrix in a single interpolation from the unringed image to the T2-space using the matrices from dwifslpreproc and the subsequent registration to T2?

1 Like

Hi,

The answer is essentially no, there is no such tool. The interpolation performed by eddy is complex and non-trivial, especially if using the slice-to-volume correction. It would be very difficult to replicate.

However, if all you need to perform is a rigid registration, then you can apply the transformation without any interpolation, since that all requires in an update of the transform matrix in the image header (and potentially a matching update of the directions in the DW scheme) – you can do this in one shot using the mrtransform command, as long as the image you’re applying this to contains the DW scheme in its header.

Note this won’t be possible for affine or non-linear registration – at least not within MRtrix. Also, if you actually need the DWI data to be resliced to the same voxel grid as the T2, then this approach also won’t be much use to you…

All the best,
Donald.

@jdtournier,

Thanks for the answer. That’s roughly what I figured.

Let’s assume that I don’t care about the single shot issue and just fit a rigid registration for the post-dwifslpreproc data (using ANTs) and want to match the T2 resolution (go from 200 microns to 75 microns), is there a way to do that using mrtrix tools (transformconvert, warptransform, mrgrid) to take advantage of the DW scheme in the header?

Edit: For the sake of clarity, this is all ex-vivo fixed brain analyses, so there’s negligible head motion to deal with.

Ok, if it’s just a matter of regridding without any need for actual registration, then mrgrid with the regrid operation and -template option will do the trick out of the box. If there’s no motion to worry about, this should be all you need to do.

If you need to register before regridding, then you should be able to take the output of the ANTs rigid registration, convert it to a format MRtrix can use using transformconvert with the itk_import operation, and then apply that transformation using mrtransform, providing the transformation file via the -linear option, and the T2 reference image via the -template option. Depending on how the ANTs registration was done, you may also need to invert the transform using the -inverse option. And since you’ll be upsampling, I don’t think that second interpolation step will be too problematic - certainly not a bad as regridding to the same resolution.

I hope I’ve got all this right…

That appears to be what I’m looking for. I’ll give it a shot (as soon as my Singularity image finishes building with the right version of ANTs and MRtrix).

Just going to tack in here that this works well with a few caveats that may be data-dependent. For whatever the reason when converting back to NIFTI I end up with mismatched orientations in one of the dimensions such that a mask in the T2-weighted space is backwards in the read direction resulting in missing the olfactory bulb but getting the neck. Including the strides specification in mrtransform appears to take care of this issue.

I’m using antsRegistration_affine_SyN.sh for registration (minc-toolkit-extras/antsRegistration_affine_SyN.sh at master · CoBrALab/minc-toolkit-extras · GitHub). This is just an optimized parameterization of the antsRegistrationSyN.sh process but should be applicable to any registration using ANTs.

The solve appears to be fairly straightforward so pasting here what I did for posterity and others:

antsRegistration_affine_SyN.sh $STRUCT mean_bzero.nii.gz struct2dwi_ --skip-nonlinear --linear-type rigid
ConvertTransformFile 3 struct2dwi_0GenericAffine.mat struct2dwi_mrtrix.mat --hm --ras
mrtransform unbiased.mif.gz preproc.mif.gz -linear struct2dwi_mrtrix.mat -template $STRUCT -strides $STRUCT -inverse

Software versions:
ANTs 2.3.5
MRtrix 3.0.3

1 Like