Hi,
I've used `bbregister` to generate a transform `bold2T1.lta` from `bold.nii` to `T1.mgz` (assume we have a `T1.nii` as well for the sake of ANTs).
The following produces a well-aligned output:
mri_convert --apply_transform bold2T1.lta bold.nii bold_space-T1.nii
As does the following:
lta_convert --inlta bold2T1.lta --outfsl bold2T1.mat
c3d_affine_tool -ref T1.nii -src bold.nii bold2T1.mat -fsl2ras -oitk bold2T1.txt
antsApplyTransforms -i bold.nii -r T1.nii -o bold_space-T1.nii -t bold2T1.txt
However, if one skips the FSL step, the registration is quite far off:
lta_convert --inlta bold2T1.lta --outitk bold2T1.txt
antsApplyTransforms -i bold.nii -r T1.nii -o bold_space-T1.nii -t bold2T1.txt
Comparing the ITK transform files:
LTA-FSL-ITK
#Insight Transform File V1.0
#Transform 0
Transform: MatrixOffsetTransformBase_double_3_3
Parameters: 0.9895096215486424 0.011126830936108464 -0.00042204653562094823 -0.01079971161879626 0.872329255299452 -0.42602926756857834 -0.004755964529051335 0.42420535065804454 0.8878552541301569 -1.3066136395454464 -45.60342165876236 -43.10584860730749
FixedParameters: 0 0 0
LTA-ITK
#Insight Transform File V1.0
#Transform 0
Transform: AffineTransform_double_3_3
Parameters: 0.98950976133346558 0.011126830242574215 -0.00042204943019896746 -0.010799713432788849 0.87232941389083862 -0.42602935433387756 -0.0047559700906276703 0.42420542240142822 0.88785547018051147 -2.2848172187805176 -2.9065067768096924 11.744022369384766
FixedParameters: 0 0 0
To 5 significant digits, these are the same, except the last three (translation) parameters. And the `AffineTransform_double_3_3` is different from `MatrixOffsetTransformBase_double_3_3`, though I'm not sure whether this has any effect.
Here is the original LTA:
type = 1 # LINEAR_RAS_TO_RAS
nxforms = 1
mean = 0.0000 0.0000 0.0000
sigma = 1.0000
1 4 4
1.010462999343872e+00 -1.063966564834118e-02 4.625014495104551e-03 -2.332115173339844e+00
1.228639855980873e-02 9.293417930603027e-01 -4.459420144557953e-01 2.507942199707031e+00
4.575361963361502e-04 4.440840482711792e-01 9.132194519042969e-01 -1.201664733886719e+01
0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 9.999998807907104e-01
src volume info
valid = 1 # volume info valid
filename = /scratch/fmriprep_wf/single_subject_02_wf/func_preproc_task_short_wf/bold_reg_wf/bbreg_wf/bbregister/uni_masked_xform.nii.gz
volume = 64 64 34
voxelsize = 3.125000000000000e+00 3.125000000000000e+00 4.000000000000000e+00
xras = -1.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
yras = 0.000000000000000e+00 1.000000000000000e+00 0.000000000000000e+00
zras = 0.000000000000000e+00 0.000000000000000e+00 1.000000000000000e+00
cras = -1.090248107910156e+00 -1.071614074707031e+01 1.619928741455078e+01
dst volume info
valid = 1 # volume info valid
filename = /scratch/fmriprep_wf/single_subject_02_wf/anat_preproc_wf/t1_merge/sub-02_T1w_template.nii.gz
volume = 160 192 192
voxelsize = 1.000000000000000e+00 1.333333015441895e+00 1.333333015441895e+00
xras = 1.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
yras = 0.000000000000000e+00 1.000000000000000e+00 0.000000000000000e+00
zras = 0.000000000000000e+00 0.000000000000000e+00 1.000000000000000e+00
cras = -3.000000000000000e+00 2.999969482421875e+00 -8.000030517578125e+00
subject sub-02
fscale 0.100000
If it would be useful, I can provide any relevant images for testing.
--
Chris Markiewicz
Center for Reproducible Neuroscience
Stanford University