NiftyMIC is a Python-based open-source toolkit for research developed within the GIFT-Surg project to reconstruct an isotropic, high-resolution volume from multiple, possibly motion-corrupted, stacks of low-resolution 2D slices. The framework relies on slice-to-volume registration algorithms for motion correction and reconstruction-based Super-Resolution (SR) techniques for the volumetric reconstruction. Please note that currently only Python 2 is supported.
The algorithm and software were developed by Michael Ebner at the Translational Imaging Group in the Centre for Medical Image Computing at University College London (UCL).
If you have any questions or comments, please drop an email to [email protected]
.
Several methods have been implemented to solve the Super-Resolution Reconstruction (SRR) problem
to obtain the (vectorized) high-resolution 3D MRI volume from multiple, possibly motion corrupted, low-resolution stacks of (vectorized) 2D MR slices with for for a variety of regularizers and data loss functions . The linear operator represents the combined operator describing the (rigid) motion , the blurring operator and the downsampling operator .
The provided data loss functions are motivated by SciPy and allow for robust outlier rejection. Implemented data loss functions are:
The available regularizers include
- Zeroth-order Tikhonov (TK0):
- First-order Tikhonov (TK1):
- Isotropic Total Variation (TV):
- Huber Function:
Additionally, the choice of finding optimal reconstruction parameters is facilitated by the Numerical Solver Library (NSoL).
NiftyMIC supports medical image registration and volumetric reconstruction for ultra-fast 2D MRI. It has not been tested on larger cohort data yet. NiftyMIC is not intended for clinical use.
If you use this software in your work, please cite Ebner et al., 2018.
- Ebner, M., Chung, K. K., Prados, F., Cardoso, M. J., Chard, D. T., Vercauteren, T., & Ourselin, S. (2018). Volumetric reconstruction from printed films: Enabling 30 year longitudinal analysis in MR neuroimaging. NeuroImage, 165, 238–250.
NiftyMIC is currently supported for Python 2 only and was tested on
- Mac OS X 10.10 and 10.12
- Ubuntu 14.04 and 16.04
NiftyMIC builds on a couple of additional libraries developed within the GIFT-Surg project including
whose installation requirements need to be met. Therefore, the installation comes in three steps:
Provided the input MR image data in NIfTI format (nii
or nii.gz
), NiftyMIC can reconstruct an isotropic, high-resolution volume from multiple, possibly motion-corrupted, stacks of low-resolution 2D slices.
Leveraging a two-step registration-reconstruction approach an isotropic, high-resolution 3D volume can be generated from multiple stacks of low-resolution slices.
Examples for basic usage are:
niftymic_reconstruct_volume \
--dir-input dir-with-multiple-stacks \
--dir-output output-dir \
--suffix-mask _mask
niftymic_reconstruct_volume \
--filenames path-to-stack1.nii.gz ... path-to-stackN.nii.gz \
--dir-output output-dir \
--suffix-mask _mask
The obtained motion-correction transformations can be stored for further processing, e.g. by using niftymic_reconstruct_volume_from_slices.py
to solve the SRR problem for a variety of different regularization and data loss function types.
After performed motion correction (or having static data in the first place),
- different solvers and regularizers can be used to solve the SRR problem for comparison, and
- parameter studies can be performed to find optimal reconstruction parameters.
Solve the SRR problem for motion corrected data:
niftymic_reconstruct_volume_from_slices \
--dir-input dir-to-motion-correction \
--dir-output output-dir \
--reconstruction-type HuberL2 \
--alpha 0.003
niftymic_reconstruct_volume_from_slices \
--dir-input dir-to-motion-correction \
--dir-output output-dir \
--reconstruction-type TK1L2 \
--alpha 0.03
Solve the SRR problem for static data:
niftymic_reconstruct_volume_from_slices \
--filenames path-to-stack1.nii.gz ... path-to-stackN.nii.gz \
--dir-output output-dir \
--reconstruction-type HuberL2 \
--alpha 0.003
--suffix-mask _mask
niftymic_reconstruct_volume_from_slices \
--filenames path-to-stack1.nii.gz ... path-to-stackN.nii.gz \
--dir-output output-dir \
--reconstruction-type TK1L2 \
--alpha 0.03 \
--suffix-mask _mask
The optimal choice for reconstruction parameters like the regularization parameter or data loss function can be found by running parameter studies. This includes L-curve studies and direct comparison against a reference volume for various cost functions.
Example are:
niftymic_run_reconstruction_parameter_study \
--dir-input dir-to-motion-correction \
--dir-output dir-to-param-study-output \
--reconstruction-type HuberL2 \
--reference path-to-reference-volume.nii.gz \
--reference-mask path-to-reference-volume_mask.nii.gz \
--measures RMSE PSNR NCC NMI SSIM \
--alpha-range 0.001 0.003 10
niftymic_run_reconstruction_parameter_study \
--dir-input dir-to-motion-correction \
--dir-output dir-to-param-study-output \
--reconstruction-type TVL2 \
--reference path-to-reference-volume.nii.gz \
--reference-mask path-to-reference-volume_mask.nii.gz \
--measures RMSE PSNR NCC NMI SSIM \
--alpha-range 0.001 0.003 10
niftymic_run_reconstruction_parameter_study \
--dir-input dir-to-motion-correction \
--dir-output dir-to-param-study-output \
--reconstruction-type TK1L2 \
--reference path-to-reference-volume.nii.gz \
--reference-mask path-to-reference-volume_mask.nii.gz \
--measures RMSE PSNR NCC NMI SSIM \
--alpha-range 0.001 0.05 20
The results can be assessed by accessing the NSoL-script show_parameter_study.py
via
niftymic_show_parameter_study \
--dir-input dir-to-param-study-output \
--study-name TK1L2 \
--dir-output-figures dir-to-figures
Copyright (c) 2017, University College London. This framework is made available as free open-source software under the BSD-3-Clause License. Other licenses may apply for dependencies.
This work is partially funded by the UCL Engineering and Physical Sciences Research Council (EPSRC) Centre for Doctoral Training in Medical Imaging (EP/L016478/1), the Innovative Engineering for Health award (Wellcome Trust [WT101957] and EPSRC [NS/A000027/1]), and supported by researchers at the National Institute for Health Research University College London Hospitals (UCLH) Biomedical Research Centre.
Associated publications are
- [Ebner2018] Ebner, M., Chung, K. K., Prados, F., Cardoso, M. J., Chard, D. T., Vercauteren, T., & Ourselin, S. (2018). Volumetric reconstruction from printed films: Enabling 30 year longitudinal analysis in MR neuroimaging. NeuroImage, 165, 238–250.
- [Ranzini2017] Ranzini, M. B., Ebner, M., Cardoso, M. J., Fotiadou, A., Vercauteren, T., Henckel, J., Hart, A., Ourselin, S., and Modat, M. (2017). Joint Multimodal Segmentation of Clinical CT and MR from Hip Arthroplasty Patients. MICCAI Workshop on Computational Methods and Clinical Applications in Musculoskeletal Imaging (MSKI) 2017.
- [Ebner2017] Ebner, M., Chouhan, M., Patel, P. A., Atkinson, D., Amin, Z., Read, S., Punwani, S., Taylor, S., Vercauteren, T., and Ourselin, S. (2017). Point-Spread-Function-Aware Slice-to-Volume Registration: Application to Upper Abdominal MRI Super-Resolution. In Zuluaga, M. A., Bhatia, K., Kainz, B., Moghari, M. H., and Pace, D. F., editors, Reconstruction, Segmentation, and Analysis of Medical Images. RAMBO 2016, volume 10129 of Lecture Notes in Computer Science, pages 3–13. Springer International Publishing.