Hi Kim

are you really sure that you want to use analyze format? I doesn't keep track of the direction cosines properly so once you go to it it is hard to know left from right. SPM should be fine with nifti. In any case conversion should be something like:

mri_convert file.mgz file.nii

or

mri_convert file.mgz file.img

although again, I wouldn't recommend using analyze

cheers
Bruce


On Sat, 4 Apr 2020, Kim, Gwang-Won wrote:


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

 


_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Reply via email to