This repository provides reference images for converting between NIfTI and MINC file formats. The Original
files are the source NIfTI images used for subsequent conversions.
Each of the folders that contain images. The In
folder provides MINC conversions as created with the gold standard nii2mnc. The Reference
folder provides the NIfTI images as converted back by the gold standard mnc2nii. Finally, the Out
folder contains NIfTI images converted back using nibabel.
Several scripts facilitate and replicate the conversion process. The bash script create_reference_images.sh
will re-create the images in both the In
and Reference
folders with any NIfTI images in the Original
folder - the output of this conversion is provided in the notes.txt
file. The file batch_mnc2nii.py
will re-create the NIfTI images in the Out
folder with any MINC images in the In
folder. The Python script mnc2nii.py
allows you to manually convert MINC images to NIfTI.
Original/
├── ax.nii.gz
├── cor.nii.gz
└── ...
In/
├── ax.mnc
├── cor.mnc
└── ...
Out/
├── ax.nii.gz
├── cor.nii.gz
└── ...
Reference/
├── ax.nii.gz
├── cor.nii.gz
└── ...
notes.txt
create_reference_images.sh
batch_mnc2nii.py
mnc2nii.py
- nii2mnc command line tool to convert NIfTI images to MINC (e.g.
Original
->In
) - mnc2nii reference command line tool to convert MINC images to NIfTI (e.g.
In
->Ref
) - mincconvert command line tool for converting between MINC1 (netcdf) and MINC2 (HDF5) formats.
- minc2.py nibabel Python class for reading MINC2 (HDF5) images.
- minc1.py nibabel Python class for reading MINC1 (netcdf) images.
- minc_to_nifti.py is a minimal nibabel wrapper for converting MINC images to NIfTI, but unlike
mnc2nii.py
it does not preserve details such as the spatial transfomation affine matrix. - minc-loader is a NiiVue reader plugin for MINC1 and MINC2 images. This JavaScript reader can be used for web pages as well as node command line usage.