hi all,
when a .img extension file is passed to freesurfer routines, it is read in
as analyze even if the header says it's a nifti image. we have observed that
this causes a left-right flip in some cases. since a .img cannot exist
without a header to be meaningful, shouldn't the appropriate type be
detected from the header?
also it would be good to know if this behavior is consistent across all of
freesurfer or restricted to certain binaries.
see below for mri_info output
cheers,
satra
$ mri_info con_0001.img
Volume information for con_0001.img
type: analyze4d
dimensions: 79 x 95 x 68
voxel sizes: 2.0000, 2.0000, 2.0000
type: FLOAT (3)
fov: 79.000
dof: 0
xstart: -39.5, xend: 39.5
ystart: -47.5, yend: 47.5
zstart: -34.0, zend: 34.0
TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00
degrees
nframes: 1
PhEncDir: UNKNOWN
ras xform present
xform info: x_r = -1.0000, y_r = 0.0000, z_r = 0.0000, c_r =
-1.0000
: x_a = 0.0000, y_a = 1.0000, z_a = 0.0000, c_a =
-17.0000
: x_s = 0.0000, y_s = 0.0000, z_s = 1.0000, c_s =
18.0000
Orientation : LAS
Primary Slice Direction: axial
voxel to ras transform:
-2.0000 0.0000 0.0000 78.0000
0.0000 2.0000 0.0000 -112.0000
0.0000 0.0000 2.0000 -50.0000
0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant -8
ras to voxel transform:
-0.5000 0.0000 0.0000 39.0000
-0.0000 0.5000 -0.0000 56.0000
-0.0000 -0.0000 0.5000 25.0000
0.0000 0.0000 0.0000 1.0000
$ mri_info con_0001.hdr
Volume information for con_0001.hdr
type: nifti1
dimensions: 79 x 95 x 68
voxel sizes: 2.0000, 2.0000, 2.0000
type: FLOAT (3)
fov: 79.000
dof: 0
xstart: -39.5, xend: 39.5
ystart: -47.5, yend: 47.5
zstart: -34.0, zend: 34.0
TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00
degrees
nframes: 1
PhEncDir: UNKNOWN
ras xform present
xform info: x_r = -1.0000, y_r = 0.0000, z_r = 0.0000, c_r =
-1.0000
: x_a = 0.0000, y_a = 1.0000, z_a = 0.0000, c_a =
-17.0000
: x_s = 0.0000, y_s = 0.0000, z_s = 1.0000, c_s =
18.0000
Orientation : LAS
Primary Slice Direction: axial
voxel to ras transform:
-2.0000 0.0000 0.0000 78.0000
0.0000 2.0000 0.0000 -112.0000
0.0000 0.0000 2.0000 -50.0000
0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant -8
ras to voxel transform:
-0.5000 0.0000 0.0000 39.0000
-0.0000 0.5000 -0.0000 56.0000
-0.0000 -0.0000 0.5000 25.0000
0.0000 0.0000 0.0000 1.0000