I had a similar question about the -template
option and how the registration to the template is calculated, and was wondering if it would be possible to specify the transform manually for a similar epi_reg application where fieldmaps have been used to correct for EPI distortion.
I think there may be two separate concepts getting blurred together here.
For 5ttgen hsvs
, there is zero image registration or transformation. All the -template
option does is say, when you take the FreeSurfer surface data and map it to a partial volume image, rather than the voxel grid target being the FreeSurfer 1mm image, use this image instead.
I believe this may be contributing to the confusion:
I would like to then perform 5TTgen hsvs with FreeSurfer output, but use epi_reg transform (MRtrix format) to make sure that the 5TT image matches perfectly with the diffusion volume.
Unless you have some explicit justificatin for doing so, there is no need for the 5TT and DWI data to be defined on the same image grid. ACT was deliberately designed to allow for these two distinct sources of information to be defined on different voxel grids. That way, you’re not downsampling your anatomical image data and losing resolution, and you’re not needlessly upsampling your diffusion image data and increasing storage space / processing time.
Calculate EPI distortion and BBR of B0 to FreeSurfer anatomical using epi_reg → save linear transform and distortion warp
I presume you mean b=0 rather than B0?
I’ve never actually used this tool myself so I can’t really comment on how best to use it.
Move FreeSurfer anatomical into diffusion space with mrtransform (no resampling) - using inverse of the calculated transform
I would like to then perform 5ttgen hsvs
with FreeSurfer output, but use epi_reg transform (MRtrix format) to make sure that the 5TT image matches perfectly with the diffusion volume.
I think I may be failing to follow this with sufficient accuracy because of the ambiguity between linear and non-linear components of the transformation. My suggestion here (admittedly again naive to the details of epi_reg) would be that any non-linear component should ideally be dealt with in the context of DWI pre-processing, since these are geometric distortions in the DWIs for which correction must be beneficial. So the question then would be: is it possible to integrate this mode of EPI distortion correction into dwifslpreproc
? This would involve converting the non-linear component of epi_reg
’s output into a field map that could be provided to eddy
, so that correction of such can be done along with all other geometric corrections in a single interpolation step.