The input of 5ttgen in RC3 version

Hi everyone
I felt confused about the input of 5ttgen in RC3 version.
In the document of ACT, ''My personal preference is to register the T1-contrast anatomical image to the diffusion image series before any further processing of the T1 image is performed.- Image registration ‘’,but ‘‘The 5ttgen script using the fsl algorithm interfaces with FSL to generate the necessary image data from the raw T1 image, using BET, FAST and FIRST.- Tissue segmentation’’,
So I wonder the input of 5ttgen is raw T1 image or T1 image coregistered to diffusion image ?
https://mrtrix.readthedocs.io/en/latest/quantitative_structural_connectivity/act.html

Definitely the co-registered T1 – otherwise the output 5TT image will also not be registered to the dMRI data, which will cause issues for e.g. tracking with ACT.

It is possible to run 5ttgen on the raw T1 and then apply the same transformation to the output 5TT image as would be required to register the T1 to the dMRI – but it’s a fair bit simpler and less error-prone just to ensure the T1 is already co-registered…

I agree with your idea, but when I run the command 5ttgen T12FA.nii 5tt.nii -premasked there were warnings…
5ttgen: [WARNING] Voxel size larger than expected for T1-weighted images ([2.0, 2.0, 2.0]); note that ACT does not require re-gridding of T1 image to DWI space, and indeed retaining the original higher resolution of the T1 image is preferable
Command: mrconvert input.mif T1.nii -strides -1,+2,+3
Command: fast T1.nii
5ttgen: [WARNING] Generating 1mm isotropic T1 image for FIRST in hope of preventing failure, since input image is of lower resolution
Command: mrresize T1.nii T1_1mm.nii -voxel 1.0 -interp sinc
Command: run_first_all -m none -s L_Accu,R_Accu,L_Caud,R_Caud,L_Pall,R_Pall,L_Puta,R_Puta,L_Thal,R_Thal,L_Amyg,R_Amyg,L_Hipp,R_Hipp -i T1_1mm.nii -o first -b

Cheers
Liyuan

OK, if you’re using flirt to apply the transformation, it will by default regrid to match the target image (the DWI in this case); you need to avoid that. See this post for more details.

Hi
I have read the post.

“Registration of T1 image to DWIs using FSL flirt . In its default usage, flirt resamples the input image to match the target image. This is unnecessary for ACT. It is better to have flirt provide the calculated transformation matrix, then apply that linear transformation to the T1 image (either using flirt again, or combination of transformconvert and mrtransform ), such that the image header transformation is altered but the image grid / intensities are not

I am a little confused about how to ues the flirt to achieve the goal (the image header transformation is altered but the image grid / intensities are not)?

Besides I want to confirm the combination transformconvert T1BET2FA.mat T1BET.nii FA.nii flirt_import T12FAMrtrix and mrtransform 5TT.nii 5TT2FA.nii -linear T12FAMrtrix is correct?

Cheers
Liyuan

I can’t recall how to get flirt to apply the transformation without regridding, but I’m pretty sure it was a two-step process: a flirt call to estimate the transformation, and a subsequent call to flirt -applyxfm to apply the transformation as such. You’ll need to consult the FSL docs for details…

Otherwise, I think your transformconvert / mrtransform invocation is correct, but as always, you best bet is to try it and verify that it performs as expected…