Dear expert,

 

I'd like to convert .mgz (or .nii) file to .hdr file (.hdr and .img) to use .hdr in SPM software.

I tried to convert the file using "mri_convert". But, there were the error messages below.

Please, let me know how to onvert  .mgz (or .nii) file to .hdr file (.hdr and .img).

 

1) convert  .nii file to .hdr file (.hdr and .img) 

[latifah:kim] (nmr-stable6-env) mri_convert -it nii -ot spm BB.nii RE
mri_convert.bin -it nii -ot spm BB.nii RE
$Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
reading from BB.nii...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, 0, -1)
k_ras = (0, 1, 0)
writing to RE...
ANALYZE FORMAT ERROR: ncols 163842 in volume exceeds 32768

 

 

2) convert  .mgh file to .hdr file (.hdr and .img)

[latifah:kim] (nmr-stable6-env) mri_convert -it mgh -ot spm AA.mgh RE.hdr
mri_convert.bin -it mgh -ot spm AA.mgh RE.hdr
$Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
reading from AA.mgh...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, 0, -1)
k_ras = (0, 1, 0)
writing to RE.hdr...
ANALYZE FORMAT ERROR: ncols 163842 in volume exceeds 32768