Tools for NIfTI and ANALYZE image
Load, save, make, reslice, view (and edit) both NIfTI and ANALYZE data on any platform
You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
Editor's Note: As of Release 2017b, MATLAB now provides support for reading and writing NIfTI image data files in the Image Processing Toolbox
Cite As
Jimmy Shen (2026). Tools for NIfTI and ANALYZE image (https://ch.mathworks.com/matlabcentral/fileexchange/8797-tools-for-nifti-and-analyze-image), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired by: MRI Analyze tools
Inspired: PCG_unwrap_2D(ph_nii, ph_file, mask_nii, max_iter, epsi_con, N), MRIqual, BioImage Suite Web, ExportPngInkscape(filename,dpi,handle), Parametric Mapping Scripts for MRI data, fMRIData Tool, NIfTI Studio, Visualization of multi-modal volume segmentation, Siemens DICOM sort and convert to NIfTI, Bipolar Colormap, Generate synthetic fMRI data, RAPID: a Routine Assurance Pipeline for Imaging of Diffusion, 3D NIfTI Data Viewer
General Information
- Version 1.27.0 (426 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.27.0 | 1. Thanks to the feedback and contribution of Chris McNorgan from Western University, the rri_orient.m now have optional parameter for orientation vector.
|
||
| 1.26.0 | Since voxel size can be less than 0, I will change the default voxel_size in reslice_nii.m from rounded minimum voxel_size in original NIfTI header to absolute minimum voxel_size in original NIfTI header. This fixed reslice_nii bug. |
||
| 1.25.0 | Added some new features and fixed some bugs. For more detail, please visit: |
||
| 1.24.0 | Thanks to the feedback of Matthew Bickell from University of Cape Town, a bug is fixed when edit voxel in millimeter unit. |
||
| 1.23.0 | "make_nii.m" is now able to automatically detect both single and double complex data type. |
||
| 1.22.0 | Fixed a bug for yesterday's release |
||
| 1.21.0 | You can now create RGB NIfTI / ANALYZE file structure using make_nii / make_ana program. |
||
| 1.20.0 | New program "load_untouch_header_only.m" and "save_untouch_slice.m" is provided. Check http://www.rotman-baycrest.on.ca/~jimmy/NIFTI for more details. |
||
| 1.19.0 | New feature is added in "view_nii" program to let you edit voxel values or set landmarks. Also thanks to the code from Roman, which speed up "load_untouch_nii_img" program when the slices are not loaded at once. |
||
| 1.16.0 | 1. Fixed an overlay problem in view_nii.m, so the color of min/max is now showing properly.
|
||
| 1.14.0 | Thanks to the feedback of Roman Fleysher from Yeshiva University, I fixed a bug when loading a quaternion form NIfTI data. |
||
| 1.13.0 | Thanks to Rembrandt from Radboud University Nijmegen (Netherlands), I made 2 small changes to handle the exceptions. |
||
| 1.12.0 | Fixed a bug in "collapse_nii_scan" to collapse Analyze format data. |
||
| 1.11.0 | 1. "load_untouch_nii" now supports loading specific slices of NIfTI or Analyze format.
|
||
| 1.10.0 | "load_untouch_nii" now supports loading specific slices of NIfTI or Analyze format. |
||
| 1.9.0 | While an N-Dimensional matrix can be saved into a NIfTI file using "make_nii / save_nii" command pair, a 3D matrix can also be saved into an ANALYZE file using "make_ana / save_untouch_nii" in order to be compatible with some ANALYZE only programs. |
||
| 1.8.0 | Fixed several bugs, and posted informative table: |
||
| 1.7.0 | Just receive warning from MATLAB: "If I do not license my code with BSD, my code will be removed." |
||
| 1.6.0 | Thanks to the feedback of Kate Fissell from University of Pittsburgh, transformation matrix M will no longer be saved by save_untouch_nii.m. |
||
| 1.5.0 | 1. Thanks to the feedback of Bryce Wilkins from USC, a typo in one of my message display is fixed. 2. Thanks to the suggestion of Ashish Raj from Cornell, 'expand_nii_scan.m' is modified and 'collapse_nii_scan.m' is added. |
||
| 1.4.0 | Default data type for 'make_nii.m' now follows the data type of 'img' matrix, instead of float32. |
||
| 1.3.0 | Fixed a bug in fliplr.m when reading files. |
||
| 1.2.0 | update didn't show up |
||
| 1.1.0 | 1. Properly handle fread/'*char' problem with foreign characters in MATLAB 7 and above; 2. Reordered input parameters for 'reslice_nii.m' program; |
||
| 1.0.0 | Extended Load / Save / Make programs to N-Dimension, where N can be from 3 to 7 for NIfTI data and from 3 to 4 for ANALYZE data. |