I’m trying to use mrregister to correct for susceptibility artefacts (instead of using FSL’s topup). Basically I have a b0.nii.gz and a b0_rp.nii.gz (rp stands for reversed phase encoding). Both have the same voxel grid.
I then register (affine and nonlinear) the b0.nii.gz to the b0_rp.nii.gz and save the midway images:
The average of these midway images should give me a good approximation of the b0 corrected for susceptibility artefacts. However, they are defined on a different grid than the b0.nii.gz and b0_rp.nii.gz input images. Of course I could again regrid the output, but I want to avoid multiple interpolations. Therefore a first question: what defines the midway grid in mrregister?
Eventually my goal is to apply the full_warp to bring a dwi series to this midway space, thus correcting for the susceptibility artefact. For this I would do:
This would however mean that my dwi_corrected.mif is in the same grid as the midway images (which seems to be different than the input b0s).
[update] a solution to this last issue is to regrid the full_warp.mif image to the grid of the original b0’s first, and then applying that using the above command. So at this point I’m only still wondering why the midway space has a different grid?
I would use FSL topup unless you have specific reasons to write your own custom susceptibility correction.
mrregister and mrtransform use interpolation to determine the intensity for positions off the original grid. They do not apply intensity modulation, topup uses the determinant of the jacobian of the warps to correct for this. Therefore signal hyperintensities due to susceptibility artefacts are not corrected using mrtransform. You could do this yourself using the jacobian filter in mrfilter but besides the final output, also the registration might be affected by those hypterintense artefacts. Finally if you wanted to correct for inter- or intra-volume motion (eddy) you’d need to write your own scripts again which would likely require further interpolations if you want to stick to the tools currently available in MRtrix3.
The midway space is the coordinate grid that lies between the first and second input image to mrregister. This is to reduce bias due to different degrees of interpolation during registration. More precisely, the average space grid is calculated using the average of the (smallest possible) rotations that align the first and second input images’ scanner coordinate systems to the (unsigned) scanner coordinate system using quaternions. The midway space voxel spacing is the average of the two input images’ voxel unit vectors projected onto these new axes.