brain images: convert between different formats

1 min read

For single file to single file conversion, you usually use mri_convert of freesurfer. For example
mri_convert x.img y.nii

Other options would be LONI Debabeler or MRICro.

Here are some special cases:
multiple 3D ANALYZE to a single 4D Nifti: mri_concat
mri_concat is a program of freesurfer. Assume the original image files are f001.img, f002.img … etc. The output file is f.nii.

mri_concat f???.img --o f.nii

You can also use FSL’s fslmerge to achieve the same thing (but pay attention to your fsl environment setting for default output format).
multiple DICOM to other format
To convert DICOM files to other format, use mri_convert

mri_convert I0001.dcm  T1.mgz

If you have a bunch of DICOM files (slices) for a single brain, you only need to input the 1st one as the argument of mri_convert.

Another way is to use SPM’s DICOM import. In the end you get ANALYZE files.
GE 7 file to ANALYZE or Nifti: makevols and makenifti
.7 files are functional images produced by GE scanners in Stanford. You use makevols to convert.

makevols E*P*.7 I
rename I.V I_ I.V*

You will get a bunch of .img/.hdr files.
To make a Nifti file, you run

makenifti Efilename outfilename

The output is a single nii file (outfilename.nii).

Note: If you rename the .7 files, you might not get makevols to work. For example, if you rename P06144.7 to P06144_mer1.7, makevols doesn’t work (only produces a lot .hdr files but not .img files).

makevols and makenifti are written by Dr. Gary Glover at Stanford University. Here you can download the two programs.

Check out here to see how to convert images with different number of bytes per voxel.


Receive email notification via email 博客有新内容通知我
文献鸟,永远不错过新文献!

Don't want to miss new papers in your field? Check out Stork we developed:


第二十五期 fNIRS Journal Club 视频

来自华东师范大学的胡银莹博士为大家介绍了具体如何计算和验证超扫描实验中脑间同步性,并分享做fNIRS实验相关方面的应用经验。视频如下: Youtube:https://youtu.be/xI_6wKd06io Youku:上传后被youku屏蔽,原因不详。
Xu Cui
3 sec read

第二十五期 fNIRS Journal Club 通知 2021/11/27,10:00am

来自华东师范大学的胡银莹博士将为大家介绍具体如何计算和验证超扫描实验中脑间同步性,并分享做fNIRS实验相关方面的应用经验。热烈欢迎大家参与讨论。 时间: 北京时间2021年11月27日上午10:00地点: https://zoom.com房间号: 846 2034 9158密码: 064380 胡银莹博士要讲解的文章如下: How to Calculate and Validate Inter-brain Synchronization in a fNIRS Hyperscanning Study. Hu, Wang, Song,...
Xu Cui
9 sec read

第二十四期 fNIRS Journal Club 视频

北京时间2021/10/23,10:00am, 来自韩国釜山国立大学Keum-Shik Hong教授团队的杨大林同学为大家介绍了如何结合深度学习和近红外扫描技术实现早期老年痴呆症的识别,并分享深度学习技术在相关方面的应用经验 。 Youtube:https://youtu.be/3OLncoL01o8 Youku:https://v.youku.com/v_show/id_XNTgxNTMxNzkxNg==.html 相关资源: 文献鸟(追踪科学文献)文献大分析(两分钟了解一个领域)
Xu Cui
5 sec read

2 Replies to “brain images: convert between different formats”

  1. Hi Professor,

    Is it possible to convert/merge multiple 3D Analyze files into a single 4D NIFTI using R?

    Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *