Hi!
I am trying to align a mean EPI volume and a
Bruker magnitude map from a fieldmap
measurement using tkregister2,
fsl_rigid_register and mri_vol2vol.
Unfortunately, it seems that somewhere, most
likely during fsl_rigid_register, the image
orientation get scrambled, and the output
has the wrong orientation.
Here is what I get from
tkregister2:
target volume epi.nii
movable volume fieldmap0001.nii
reg file mag_2_mocovol.register.dat
LoadVol 0
ZeroCRAS 0
$Id: tkregister2.c,v 1.121.2.1 2011/03/28
20:25:16 greve Exp $
Diagnostic Level -1
INFO: loading target epi.nii
Setting targ orientation to RIA
INFO: target does not conform to COR format,
so I'm going to
reslice to COR. This will not affect the final
registration.
Ttarg: --------------------
-1.000 0.000 0.000 128.000;
0.000 0.000 1.000 -128.000;
0.000 -1.000 0.000 128.000;
0.000 0.000 0.000 1.000;
INFO: loading movable fieldmap0001.nii
Setting mov orientation to RIA
Tmov: --------------------
-0.547 0.000 0.000 17.500;
0.000 0.000 0.547 -17.500;
0.000 -0.547 0.000 17.500;
0.000 0.000 0.000 1.000;
mkheaderreg = 1, float2int = 0
Computing reg from header (and possibly input
matrix)
---- Input registration matrix (computed)
--------
-1.000 0.000 0.000 -0.587;
0.000 1.000 0.000 -2.150;
0.000 0.000 1.000 -2.188;
0.000 0.000 0.000 1.000;
---------------------------------------
---- Input registration matrix --------
-1.000 0.000 0.000 -0.587;
0.000 1.000 0.000 -2.150;
0.000 0.000 1.000 -2.188;
0.000 0.000 0.000 1.000;
Determinant -1
subject = rat
RegMat ---------------------------
1.000 0.000 0.000 -0.587;
0.000 1.000 0.000 -2.150;
0.000 0.000 1.000 -2.188;
0.000 0.000 0.000 1.000;
FSLOUTPUTTYPE NIFTI_GZ
tkreg2FSL: mov det = 0.163555, ref det =
0.154688
INFO: FSL2FreeSurfer: Mov volume is NIFTI with
positive det,
applying LR flip to registration matrix.
INFO: FSL2FreeSurfer: Ref volume is NIFTI with
positive det,
applying LR flip to registration matrix.
here is what I get from fsl_rigid_register:
$Id: fsl_rigid_register,v 1.31 2011/03/02
20:16:39 nicks Exp $
Thu Nov 19 17:13:48 EST 2015
fieldmap0001_reg.nii
Reference is nifti, not converting
Input is nifti, not converting
Output is nifti, not converting
--------------------------------------
/Freiwald/cschwiedrz/rodent/test/Rat_673b_Baseline/Phasemap
calling eval flirt.fsl -in ./fieldmap0001.hdr
-out ./fieldmap0001_reg.hdr -bins 256 -cost
corratio -searchrx -10 10 -searchry -10 10
-searchrz -10 10 -interp trilinear -dof 6 -ref
./epi.hdr -init initxfm.fslmat -omat
./fieldmap0001_reg.fslmat
/Freiwald/cschwiedrz/rodent/test/Rat_673b_Baseline/Phasemap
mri_copy_params --pulse fieldmap0001_reg.nii
fieldmap0001.nii fieldmap0001_reg.nii
only copying pulse parameters
WARNING: volume sizes are different
in_vol : 80, 80, 22
temp_vol : 64, 64, 64
WARNING: voxel sizes are different
in_vol : 0.375, 0.375, 1.1
temp_vol : 0.546875, 0.546875, 0.546875
--------------------------------------
/Freiwald/cschwiedrz/rodent/test/Rat_673b_Baseline/Phasemap
tkregister2_cmdl --targ epi.nii --mov
fieldmap0001.nii --reg
./fsl_rigid_register.28592/reg.dat --fslreg
fieldmap0001_reg.nii.fslmat --noedit
tkregister_tcl
/Freiwald/lab_files/opt/freesurfer-Linux-centos4_x86_64-stable-pub-v5.1.0-full/tktools/tkregister2.tcl
---- FSL registration matrix --------
0.987 -0.164 0.002 0.247;
0.157 0.943 -0.295 -5.691;
0.046 0.291 0.956 7.475;
0.000 0.000 0.000 1.000;
---------------------------------------
target volume epi.nii
movable volume fieldmap0001.nii
reg file
./fsl_rigid_register.28592/reg.dat
LoadVol 0
ZeroCRAS 0
$Id: tkregister2.c,v 1.121.2.1 2011/03/28
20:25:16 greve Exp $
Diagnostic Level -1
INFO: loading target epi.nii
INFO: target does not conform to COR format, so
I'm going to
reslice to COR. This will not affect the final
registration.
Ttarg: --------------------
-1.000 0.000 0.000 128.000;
0.000 0.000 1.000 -128.000;
0.000 -1.000 0.000 128.000;
0.000 0.000 0.000 1.000;
INFO: loading movable fieldmap0001.nii
Tmov: --------------------
-0.547 0.000 0.000 17.500;
0.000 0.000 0.547 -17.500;
0.000 -0.547 0.000 17.500;
0.000 0.000 0.000 1.000;
mkheaderreg = 0, float2int = 0
FSLOUTPUTTYPE NIFTI
fsl2TkReg: mov det = 0.163555, ref det =
0.154688
INFO: FSL2FreeSurfer: Mov volume is NIFTI with
positive det,
applying LR flip to registration matrix.
INFO: FSL2FreeSurfer: Ref volume is NIFTI with
positive det,
applying LR flip to registration matrix.
---- Input registration matrix (computed)
--------
-0.987 0.046 -0.157 0.692;
-0.002 0.956 0.295 -19.148;
-0.164 -0.291 0.943 -0.998;
0.000 0.000 0.000 1.000;
---------------------------------------
---- Input registration matrix --------
-0.987 0.046 -0.157 0.692;
-0.002 0.956 0.295 -19.148;
-0.164 -0.291 0.943 -0.998;
0.000 0.000 0.000 1.000;
Determinant -1
subject = subject-unknown
RegMat ---------------------------
0.987 0.046 -0.157 0.692;
0.002 0.956 0.295 -19.148;
0.164 -0.291 0.943 -0.998;
0.000 0.000 0.000 1.000;
Cleaning up
Started at Thu Nov 19 17:13:48 EST 2015
Ended at Thu Nov 19 17:13:50 EST 2015
fsl_rigid_register Done
if I check the results here using tkmedit -f
epi.nii -aux fieldmap0001_reg.nii
the orientation of fieldmap0001_reg.nii is already
wrong.