Using flirt in command mode (no optimize: -applyxfm and use s-form:
-usesqform) I was able to align a big DWI image to its corresponding T1
(higher resolution) image using the s-form info. However, the generated
image cannot be read by FSLVIew, which throws the following error:
** ERROR: nifti_image_open(.../fsl/data/DWI1/DWI1_rescaled): bad header info
Error: failed to open file .../fsl/data/DWI1/DWI1_rescaled
terminate called after throwing an instance of 'Image::Exception'
what(): Failed to open file .../fsl/data/DWI1/DWI1_rescaled
.../fsl/bin/fslview: line 7: 898 Abort trap
${FSLDIR}/bin/fslview.app/Contents/MacOS/fslview $@
(I added the "..." to avoid providing here the full path)
However, the header seems to be fine, as read by the nifti1_test and
fslcorrecthd utilities:
could it be its huge size??? I can load this image using slicer 3D (although
it probably reads only the first volume). This happens on my laptop and also
on a cluster.
<nifti_image
nifti_type = 'NIFTI-1+'
header_filename =
'/Users/shirleymorillo/Desktop/fsl/data/DWI1_rescaled.nii.gz'
image_filename = '/Users/shirleymorillo/Desktop/fsl/data/DWI1_rescaled.nii.gz'
image_offset = '352'
ndim = '4'
nx = '208'
ny = '256'
nz = '176'
nt = '301'
dx = '1'
dy = '1'
dz = '1'
dt = '1'
datatype = '16'
datatype_name = 'FLOAT32'
nvox = '2820866048'
nbyper = '4'
byteorder = 'LSB_FIRST'
scl_slope = '1'
scl_inter = '0'
xyz_units = '2'
xyz_units_name = 'mm'
time_units = '8'
time_units_name = 's'
descrip = 'FSL4.0'
qform_code = '1'
qform_code_name = 'Scanner Anat'
qto_xyz_matrix = '0 0 1 -90.4148 -1 0 -0 124.62 0 1 -0 -149.787 0 0 0 1'
qto_ijk_matrix = '-0 -1 0 124.62 0 0 1 149.787 1 -0 -0 90.4148 0 0 0 1'
quatern_b = '0.5'
quatern_c = '-0.5'
quatern_d = '-0.5'
qoffset_x = '-90.4148'
qoffset_y = '124.62'
qoffset_z = '-149.787'
qfac = '-1'
qform_i_orientation = 'Anterior-to-Posterior'
qform_j_orientation = 'Inferior-to-Superior'
qform_k_orientation = 'Left-to-Right'
sform_code = '1'
sform_code_name = 'Scanner Anat'
sto_xyz_matrix = '0 0 1 -90.4148 -1 0 0 124.62 0 1 0 -149.787 0 0 0 1'
sto_ijk matrix = '-0 -1 -0 124.62 -0 -0 1 149.787 1 -0 -0 90.4148 0 0 0 1'
sform_i_orientation = 'Anterior-to-Posterior'
sform_j_orientation = 'Inferior-to-Superior'
sform_k_orientation = 'Left-to-Right'
num_ext = '0'
/>
|