How to transfer Nifti file into .mat Matlab file?

2020-05-03 12:32发布

I have a Nifti file, the size of which is 62*62*38. How can I transfer the Nifti file to .mat Matlab file?

3条回答
Ridiculous、
2楼-- · 2020-05-03 12:47

This can read NIFTI as well as many other medical image file types into MATLAB arrays, which you can then save as .mat files.

查看更多
祖国的老花朵
3楼-- · 2020-05-03 12:54

Most medical imaging data can be manipulated effectively using some kind of toolbox, such as SPM. However, if you need to gain access to the raw matrix I've always used NIfTI tools from the Mathworks file exchange site (here).

There are two functions that are relevant here: load_nii and load_untouched_nii. The first function load_nii takes care of situations where the header in the NiFTI contains transformations that haven't been applied to the underlying data matrix. If you know that no such transformations exist, you can use load_untouched_nii to avoid the reslicing being done. Both functions return a structure, and the data matrix is located in the img field of the returned structure.

查看更多
兄弟一词,经得起流年.
4楼-- · 2020-05-03 13:02

FreeSurfer has a MATLAB function called "MRIread". It can read NIFTI (.nii, .nii.gz) files into a MATLAB structure, which can then be saved to a MAT file if so desired.

查看更多
登录 后发表回答