Home

Awesome

Fast motion compensation and super-resolution from multiple stacks of 2D slices

PVR - Patch to Volume Reconstruction

PVR is a research-focused tool for the task of superresolution image reconstruction, developed at the BioMedIA research group. It provides command-line tools to reconstruct images from motion-corrupted imaging data.

Dependencies

Installation

$ cd <path-to-cudarecon/source> 
$ mkdir build
$ cd build
$ cmake ..
$ make 

Usage

$ PVRreconstructionGPU -i <path-to-input-data> -o <reconstructed-image-filename> --resolution <1> --patchSize <x> <y> --patchStride <x> <y>
$ PVRreconstructionGPU -i <path-to-input-data> -o <reconstructed-image-filename> --resolution <1> --superpixel --spxSize <x> --spxExtend <y>
$ SVRreconstructionGPU -i <path-to-input-data> -o <reconstructed-image-filename> --resolution <1> 

Docker

thanks to <a href="https://github.com/dittothat">Jeff Stout</a> there is a docker container available. from <a href="https://github.com/dittothat">dittohat</a>'s post:

<a href="https://github.com/dittothat">Docker image</a>

<a href="https://github.com/dittothat/dockerfetalrecon/blob/master/Dockerfile">Dockerfile</a>

On a system with nvidia-docker installed (Docker 19.03 only requires that you use the --gpus option), do:

docker pull dittothat/fetalreconstruction:cuda6.5

Then you can run using:

docker run --gpus all -it --mount type=bind,source=<host path to data>,target=/data dittothat/fetalreconstruction:cuda6.5 /bin/bash

Inside the container:

cd /usr/src/fetalReconstruction/data PVRreconstructionGPU -o 3TReconstruction.nii.gz -i 14_3T_nody_001.nii.gz 10_3T_nody_001.nii.gz 21_3T_nody_001.nii.gz 23_3T_nody_001.nii.gz -m mask_10_3T_brain_smooth.nii.gz --resolution 1.0

Data you wish to process can be put in whatever path you specify, and is then located at /data/ in the container.

TODO

References

License

PVR is licensed under the MIT license MIT


The following are compilation notes by Shadab Khan skhan.shadab@gmail.com for MacOS:

  1. Copied zlib.h and zconf.h from zlib-1.2.5 (which I downloaded from sourceforge) and pasted inside irtk2/nifti/zlib/. Renamed original zlib to zlib_old -> This issue occurs because OS X uses zlib version 1.2.5 internally (located in /usr/lib and /usr/include) which cannot be modified by the user. Version 1.2.5 (used by OS X) doesn't contain all functions in 1.2.7 (shipped with fetal-reconstruction source), hence the problem occurs. This is a quick fix, I am forcing functionality available in zlib 1.2.5 which doesn't seem to affect any of file i/o. I should find proper CMake commands to explicitly link against user defined zlib.

  2. fetalReconstruction-master/source/IRTKSimple2/geometry++/include/irtkMatrix.h ERROR: friend declaration specifying a default argument must be a definition Commented line 175: friend irtkMatrix FrechetMean(irtkMatrix *, int, int = 10); Commented line 177: friend irtkMatrix FrechetMean(irtkMatrix *, double *, int, int = 10);

This in turn required commenting two other lines (see below)

  1. fetalReconstruction-master/source/IRTKSimple2/packages/transformation/src/irtkTemporalHomogeneousTransformation.cc Commented line 59: _transformMatrix = FrechetMean(M, weight, 4); Commented line 119: _transformMatrix = FrechetMean(M, weight, 2);

  2. helper_cuda.h not found: Copied headers from CUDA_DIR/Samples/common/inc/ to CUDA_DIR/include/

  3. Added following to CMakeLists.txt inside /source: set(CMAKE_CXX_FLAGS "-Wno-c++11-narrowing")


SVR - Slice to Volume Reconstruction

SVR was used to produce the results shown in

Bernhard Kainz, Markus Steinberger, Wolfgang Wein, Maria Kuklisova-Murgasova, Christina Malamateniou, Kevin Keraudren, Thomas Torsney-Weir, Mary Rutherford, Paul Aljabar, Joseph V. Hajnal, and Daniel Rueckert: Fast Volume Reconstruction from Motion Corrupted Stacks of 2D Slices. IEEE Transactions on Medical Imaging, in print, 2015. doi:10.1109/TMI.2015.2415453

Announcements

Abstract

Moving objects cause motion artefacts when their enclosing volume is acquired as a stack of image slices. In this paper we present a fast multi-GPU accelerated implementation of slice-to-volume registration based super-resolution reconstruction with automatic outlier rejection and intensity bias correction. We introduce a novel fully automatic selection procedure for the image stack with the least motion, which will serve as an initial registration template. We fully evaluate our method and its high dimensional parameter space. Testing is done using artificially motion corrupted phantom datasets and using real world scenarios for the reconstruction of foetal organs from in-utero prenatal Magnetic Resonance Imaging and for the motion compensation of freehand compound Ultrasound data. On average we achieve a speed-up of more than 40x compared to a single CPU system, and another 1.70x for each additional GPU, while maintaining the same image quality as if calculated on a CPU. Our framework is qualitatively more accurate and on average $10\times$ times faster than currently available state-of-the-art multi-core methods. The source code for this approach is open source and publicly available for download.

Installation

The source code was successfully compiled on x86_64, CUDA 6.5, VS2012 (std-c++11), VS2013 (boost), and gcc 4.8. System: Intel Xeon E5-2630 v2 @ 2.60GHz system with 16 GB RAM, an Nvidia Tesla K40 with 12 GB RAM and a Geforce 780 Graphics card with 6 GB RAM and also tested on a Nvidia Titan GPU.

Necessary Hardware requirements

Optional Hardware requirements

Necessary third party libraries

Optional third party libraries

BUILD INSTRUCTIONS

Usage

License

PVR is licensed under the MIT license MIT