The minc-loader is a NiiVue plugin that converts MINC format .mnc volumes into NIfTI volumes. It adapts code from brainbrowser library to read .mnc files (stored in both the older NetCDF and the more recent HDF5 structures).
To illustrate this library, minc2nii.js
is a node.js converter that can be run from the command line. The command npm run test
runs some regression tests. The command npm run cli
converts a MINC file to NIfTI from the command line. Finally, the command node ./src/minc2nii.js /path/to/minc/minc.mnc
allows you to specify specific files to convert.
git clone [email protected]:rordenlab/minc-loader.git
cd minc-loader
npm install
npm run test
npm run cli
node ./src/minc2nii.js ./tests/testData/ax.mnc
You can also embed this loader into a hot-reloadable NiiVue web page to evaluate integration:
git clone [email protected]:rordenlab/minc-loader.git
cd minc-loader
npm install
npm run dev
- mnc2nii.py provides a Python nibabel conversion script and sample images.
- brainbrowser code for hdf5 and netcdf reading is used here.
- 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.