Computer · Electronics&Communication

NIfTI 2 MAT Converter

This is an easy-to-use, GUI-based NIfTI <-> Matlab converter.
This program based on The Tools for NIfTI and ANALYZE for Matlab toolbox, written by Jimmy Shen.
Its primary function is to read NIfTI-1 format files (such as .nii, .hdr and .img) and save them into Matlab .mat matrices.
It can also convert matrices back to NIfTI-1 files as well.


I wrote this small application mainly for my convenience during my own research, but I guess many people will find it useful.
This is an experimental program though, so using it at your own risk.
I will gradually improve it as time passes.
If there is any comments or bug notices, please leave it in the comment. 


* This program requires Matlab Compiler Runtime (MCR) to run. If you don’t have Matlab installed on your PC, you can download the MCR from here

Creative Commons Licence

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

—-  Current version —-
0.2 : Read and save NIfTI-1 files and .mat files.

4 thoughts on “NIfTI 2 MAT Converter

  1. Hi I’m trying to get this to work but I keep getting the error
    ‘Could not find version 7.15 of the MCR.
    Attempting to load mclmcrrt7_15.dll
    Please install the correct version of MCR.
    Contact your vendor if you do have an installer for the MCR’

    I’m running a windows 8 and I have both the current matlab complier and the 7.15 version installed. I can see the mclmcrrt7_15.dll in the program files. Any suggestions? Do you know of any other way to convet .img files to .mat ?

      1. Hi, I had smith’s issue and I was wondering if you can give me the functions I can use from NIFTI tool to achieve the conversion using only matlab.

      2. If you just want to convert back and forth between NIFTI and Matlab, just use load_nii and save_nii functions.
        load_nii function takes .nii or .hdr files (NIFTI-1 format) and output a matlab object.
        Inside such object you can find all the header properties of NIFTI and the data itself in matrix form ready to use.

        save_nii does the opposite and change the matlab object back into .nii file.

        The other functions provide very comprehensive tools to manipulate the NIFTI file itself.
        Hope this help.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s