Quick Question on Using transformconvert for invBBR.mat

Hello everyone,

I have a quick question about the correct usage of transformconvert in MRtrix3. I’m currently working with a 5TT image (5TT.mif) generated using 5ttgen hsvs. My aim is to register this to diffusion space.

Here’s what I have done so far:
I registered the b0 image to T1-weighted (T1w) image to obtain the transformation matrix BBR.mat, and then inverted it to get invBBR.mat with the following commands:

epi_reg --epi=b0_brain --t1=T1WI --t1brain=T1WI_brain --out=BBR
convert_xfm -omat invBBR.mat -inverse BBR.mat

Now, I want to convert the transformation matrix to a format usable by MRtrix3 using transformconvert:

transformconvert invBBR.mat T1WI_brain.nii.gz b0_brain.nii.gz flirt_import V_to_D1.txt

Is the order of the arguments correct in the transformconvert command, particularly, am I correct in providing the images in the sequence of transformation source to destination (i.e., T1WI_brain.nii.gz to b0_brain.nii.gz), since invBBR.mat represents the registration from T1w to b0 brain?

Thank you for your insights!