Difference between revisions of "MitkDiffusion"

From mitk.org
Jump to navigation Jump to search
(41 intermediate revisions by the same user not shown)
Line 3: Line 3:
  
 
* [[#Features & Highlights|'''Features & Highlights''']]
 
* [[#Features & Highlights|'''Features & Highlights''']]
 +
* [[#Related Links|'''Related Links''']]
 
* [[#Image Gallery|'''Image Gallery''']]
 
* [[#Image Gallery|'''Image Gallery''']]
 
* [[#Downloads|'''Downloads''']]
 
* [[#Downloads|'''Downloads''']]
Line 23: Line 24:
 
* Head-motion correction
 
* Head-motion correction
 
* Denoising
 
* Denoising
* Skull stripping and brain mask segmentation
+
* Skull stripping and brain mask segmentation (Linux only)
 
* Resampling, cropping, flipping and merging
 
* Resampling, cropping, flipping and merging
 
* Header modifications
 
* Header modifications
Line 37: Line 38:
 
'''ODF reconstruction and signal modelling'''
 
'''ODF reconstruction and signal modelling'''
 
* Tensor and Q-ball reconstruction
 
* Tensor and Q-ball reconstruction
* Other reconstructions via Dipy wrapping (CSD, 3D SHORE, SFM)
+
* Other reconstructions via Dipy wrapping (CSD, 3D SHORE, SFM) (Linux only)
 
* ODF peak calculation
 
* ODF peak calculation
 
* MRtrix or camino results can be imported
 
* MRtrix or camino results can be imported
Line 43: Line 44:
 
'''Quantification of diffusion-weighted/tensor/ODF images'''
 
'''Quantification of diffusion-weighted/tensor/ODF images'''
 
* Intravoxel Incoherent Motion (IVIM) and diffusion kurtosis analysis
 
* Intravoxel Incoherent Motion (IVIM) and diffusion kurtosis analysis
* Calculation many other derived indices such as ADC, MD, GFA, FA, RA, AD, RD
+
* Calculation of many other derived indices such as ADC, MD, GFA, FA, RA, AD, RD
 
* Image statistics
 
* Image statistics
  
 
'''Segmentation'''
 
'''Segmentation'''
* Automatic white matter bundle segmentation (TractSeg) [3]
+
* Automatic white matter bundle segmentation (TractSeg) [3] (Linux only)
* Automatic brain mask segmentation
+
* Automatic brain mask segmentation (Linux only)
 
* Manual image segmentation and operations on segmentations
 
* Manual image segmentation and operations on segmentations
 
* SOON: automatic brain tissue segmentation
 
* SOON: automatic brain tissue segmentation
Line 98: Line 99:
 
** Definition of important acquisition parameters such as bvalues and gradient directions, TE, TR, dwell time, partial Fourier, ...
 
** Definition of important acquisition parameters such as bvalues and gradient directions, TE, TR, dwell time, partial Fourier, ...
 
* Manual definition of fiber configurations, e.g. for evaluation purposes
 
* Manual definition of fiber configurations, e.g. for evaluation purposes
 +
* Automatic generation of random fiber configurations
  
 
'''Other features'''
 
'''Other features'''
 
* Brain network statistics and visualization (connectomics)
 
* Brain network statistics and visualization (connectomics)
* Interactive Python console
+
* Interactive Python console (Linux only)
 
* Integrated screenshot maker
 
* Integrated screenshot maker
 
* Command line tools for most functionalities
 
* Command line tools for most functionalities
  
  
Since the last release 2017.07 there have been a lot of feature additions, bug fixes and optimizations.
+
== Related Links ==
 +
* Great python package for logging your (MITK) command line experiments:
 +
** https://github.com/MIC-DKFZ/cmdint
 +
** <pre>pip3 install cmdint</pre>
 +
* TractSeg reference data of 72 semiautomatically defined bundles in 105 HCP subjects: https://zenodo.org/record/1285152
 +
* TractSeg python package: https://github.com/MIC-DKFZ/TractSeg
 +
*Simulated dMRI images and ground truth of random fiber phantoms in various configurations: https://doi.org/10.5281/zenodo.2533250
 +
* ISMRM 2015 Tractography Challenge Data: https://doi.org/10.5281/zenodo.572345 & https://doi.org/10.5281/zenodo.1007149
  
  
Line 147: Line 156:
 
[[File:Fiberfox.png|center|frameless|600px]]
 
[[File:Fiberfox.png|center|frameless|600px]]
 
Illustration of the dMRI phantom simulation process using Fiberfox.
 
Illustration of the dMRI phantom simulation process using Fiberfox.
 +
 +
 +
<p style="border:0px">[[File:Eddy.gif|200px|top]] [[File:spike_and_motion.gif|200px|top]] [[File:drift.gif|200px|top]]</p>
 +
<p style="border:0px">[[File:645551_axial_motion_ghost_eddy.gif|200px|top]] [[File:Ringing.gif|200px|top]] [[File:683256_Distortions_Sagittal.gif|200px|top]]</p>
 +
Illustration of simulated dMRI images with various artifacts (a bit excessive for illustration purposes): eddy current distortions, motion and spike, intensity drift, motion, eddy and noise, motion, B0 inhomogeneity distortions.
 +
 +
 +
[[File:RandomFibers_Example.png|center|frameless|600px]]
 +
Automatically generated random fiber configuration for Fiberfox simulations.
  
  
 
== Downloads ==
 
== Downloads ==
  
If you encounter any bugs, please report them in our [https://phabricator.mitk.org/maniphest/task/edit/form/21/ bugtracking] system or use the [http://mitk.org/wiki/MITK_Mailinglist MITK-users mailing list]. We are grateful for any feedback!
+
'''Nightly Ubuntu and Windows installers: ftp://ftp.dkfz-heidelberg.de/outgoing/MitkDiffusion'''
  
 +
Please also have a look at the [[#Requirements|'''requirements''']] for running MITK Diffusion with all its features successfully!
  
=== Latest stable installers (2017.07) ===
+
The installers come as executable setup wizards that install MITK Diffusion on your system or alternatively as simple .tar.gz or .zip archive where you can execute MITK Diffusion and the command line apps "manually". Should there be no new installer for a while, please [[#Contact|'''contact''']] us and report the issue.
Commit hash 2bda849ee86a362583ee3d2beb4baaca038bd8a5
 
{| class="wikitable" width=100% style="background-color:#ffffff;"
 
| Windows 7, Windows 10
 
| [http://mitk.org/download/releases/MITK-Diffusion-2017.07/Windows/MITK-Diffusion-2017.07-win64.exe MS Windows (64 bit) installer]
 
|-
 
| Windows 7, Windows 10
 
| [http://mitk.org/download/releases/MITK-Diffusion-2017.07/Windows/MITK-Diffusion-2017.07-win64.zip MS Windows (64 bit) zip archive]
 
|-
 
| Ubuntu 16.04
 
|  [http://mitk.org/download/releases/MITK-Diffusion-2017.07/Linux/MITK-Diffusion-2017.07-linux64.tar.gz Ubuntu (64 bit), tar.gz archive]  
 
|-
 
| Ubuntu 14.04
 
|  [http://mitk.org/download/releases/MITK-Diffusion-2017.07/Linux/MITK-Diffusion-2017.07-Ubuntu14.04.64bit.tar.gz Ubuntu (64 bit), tar.gz archive]
 
|}
 
  
'''Known issues fixed in the current master:'''
+
If you encounter any bugs, please report them in our [https://phabricator.mitk.org/maniphest/task/edit/form/21/ bugtracking] system or use the [http://mitk.org/wiki/MITK_Mailinglist MITK-users mailing list]. We are grateful for any feedback!
The Fiberfox command line application does not read the b-value but uses a default b-value of 1000 s/mm². This bug does not affect the GUI version of Fiberfox. This bug also has no effect if the first non-zero b-value is 1000 s/mm², which is for example the case in the simulated HCP dataset (10.5281/zenodo.572345).
 
This bug is fixed in the current master of the MITK source code.
 
  
  
Line 179: Line 182:
 
* '''For Ubuntu users''':  
 
* '''For Ubuntu users''':  
 
** Install Python 3.X: <pre>sudo apt install python3 python3-pip</pre>
 
** Install Python 3.X: <pre>sudo apt install python3 python3-pip</pre>
** Download Python requirements file [[https://github.com/MITK/MITK/blob/master/Modules/DiffusionImaging/DiffusionCore/PythonRequirements.txt|"PythonRequirements.txt"]]
+
** Download Python requirements file: [https://raw.githubusercontent.com/MITK/MITK/master/Modules/DiffusionImaging/DiffusionCore/PythonRequirements.txt PythonRequirements.txt]
 
** Install Python requirements: <pre>pip3 install -r PythonRequirements.txt</pre>
 
** Install Python requirements: <pre>pip3 install -r PythonRequirements.txt</pre>
 
** If your are behind a proxy use <pre>pip3 --proxy <proxy> install -r PythonRequirements.txt</pre>
 
** If your are behind a proxy use <pre>pip3 --proxy <proxy> install -r PythonRequirements.txt</pre>
 +
** '''Requirements for all deep-learning based functionalities''':
 +
*** Affected functionalities:
 +
**** Brain extraction
 +
**** TractSeg
 +
*** Pytorch: https://pytorch.org/ (version 0.4.0)
 +
*** CUDA: https://developer.nvidia.com/cuda-downloads
 +
*** (optional) cuDNN: https://developer.nvidia.com/cudnn
  
 
* '''For Windows users''':  
 
* '''For Windows users''':  
 
** MITK Diffusion requires the Microsoft Visual C++ 2017 Redistributable to be installed on the system. The MITK Diffusion installer automatically installs this redistributable for you if not already present on the system, but it needs administrative privileges to do so. So to install the redistributable, '''''run the MITK Diffusion installer as administrator'''''.
 
** MITK Diffusion requires the Microsoft Visual C++ 2017 Redistributable to be installed on the system. The MITK Diffusion installer automatically installs this redistributable for you if not already present on the system, but it needs administrative privileges to do so. So to install the redistributable, '''''run the MITK Diffusion installer as administrator'''''.
** Install Python 3.X: https://www.anaconda.com/download/
+
** '''Python modules are disabled under Windows!'''
** Download Python [[https://github.com/MITK/MITK/blob/master/Modules/DiffusionImaging/DiffusionCore/PythonRequirements.txt|"PythonRequirements.txt"]]
 
** Install Python requirementsfrom the conda command prompt: <pre>pip install -r PythonRequirements.txt</pre>
 
** If your are behind a proxy use <pre>pip --proxy <proxy> install -r PythonRequirements.txt</pre>
 
  
* '''Requirements for all deep-learning based functionalities''':
 
** Affected functionalities:
 
*** Brain extraction
 
*** TractSeg
 
** Pytorch: https://pytorch.org/ (version 0.4.0)
 
** CUDA: https://developer.nvidia.com/cuda-downloads
 
** (optional) cuDNN: https://developer.nvidia.com/cudnn
 
  
 
== Building MITK Diffusion from source ==
 
== Building MITK Diffusion from source ==
 
# Install [https://www.qt.io/ Qt] on your system (>= 5.11.1).
 
# Install [https://www.qt.io/ Qt] on your system (>= 5.11.1).
 
# Clone MITK from out [https://phabricator.mitk.org/source/mitk.git git repository] using [https://git-scm.com/ Git version control].
 
# Clone MITK from out [https://phabricator.mitk.org/source/mitk.git git repository] using [https://git-scm.com/ Git version control].
# Configure the MITK Superbuild using [https://cmake.org/ CMake] (>= 3.10).
+
# Configure the MITK Superbuild using [https://cmake.org/ CMake] (>= 3.13).
 
## Choose the source code directory and an empty binary directory.
 
## Choose the source code directory and an empty binary directory.
 
## Click "Configure".
 
## Click "Configure".
 
## Set the option MITK_BUILD_CONFIGURATION to "DiffusionRelease".
 
## Set the option MITK_BUILD_CONFIGURATION to "DiffusionRelease".
 
## Click "Generate".
 
## Click "Generate".
 +
## macOS specifics:
 +
### Use python 3.'''6''', since python 3.'''7''' leads to build errors on macOS.
 +
### The cmake variables for python 3 might need to be set manually. It is probably enough to specify PYTHON_EXECUTABLE.
 +
### Openmp needs to be installed manually since it is not included in apple clang anymore: "brew install libomp" should do the trick. It might be necessary to set the corresponding make variables later in the MITK build manually:
 +
#### OpenMP_CXX_FLAGS: -Xpreprocessor -fopenmp -I"/path/to/python3/includes/"
 +
#### OpenMP_C_FLAGS: -Xpreprocessor -fopenmp -I"/path/to/python3/includes/"
 +
#### OpenMPCXX_LIB_NAMES: libomp
 +
#### OpenMPC_LIB_NAMES: libomp
 +
#### OpenMP_libomp_LIBRARY: /path/to/libomp.dylib
 
# Build the project
 
# Build the project
## Linux: Open a console window, navigate to the build folder and type "make -j8" (optionally supply the number threads to be used for a parallel build qith -j).
+
## Linux/maxOS: Open a console window, navigate to the build folder and type "make -j8" (optionally supply the number threads to be used for a parallel build with -j).
 
## Windows (requires visual studio): Open the MITK Superbuild solution file and build all projects.
 
## Windows (requires visual studio): Open the MITK Superbuild solution file and build all projects.
 
# The build may take some time and should yield the binaries in "your_build_folder/MITK-build/bin"
 
# The build may take some time and should yield the binaries in "your_build_folder/MITK-build/bin"
  
 
More detailed build instructions can be found in the [http://docs.mitk.org/nightly/BuildInstructionsPage.html documentation.]
 
More detailed build instructions can be found in the [http://docs.mitk.org/nightly/BuildInstructionsPage.html documentation.]
 +
 +
 +
Continuous integration: http://cdash.mitk.org/index.php?project=MITK&display=project
  
  
 
== References ==
 
== References ==
 +
 +
All publications of the Division of Medical Image Computing can be found [https://www.dkfz.de/en/mic/publications/ here].
  
 
[1] Fritzsche, Klaus H., Peter F. Neher, Ignaz Reicht, Thomas van Bruggen, Caspar Goch, Marco Reisert, Marco Nolden, et al. “MITK Diffusion Imaging.” Methods of Information in Medicine 51, no. 5 (2012): 441.
 
[1] Fritzsche, Klaus H., Peter F. Neher, Ignaz Reicht, Thomas van Bruggen, Caspar Goch, Marco Reisert, Marco Nolden, et al. “MITK Diffusion Imaging.” Methods of Information in Medicine 51, no. 5 (2012): 441.

Revision as of 11:27, 18 February 2019

The MITK Diffusion application [1,2] offers a selection of image analysis algorithms for the processing of diffusion-weighted MR images. It encompasses the research of the Division Medical Image Computing at the German Cancer Research Center (DKFZ).


Features & Highlights

Support for most established image formats

  • Images: DICOM, NIFTI, NRRD (peak and SH images compatible with MRtrix)
  • Tractograms: fib/vtk, tck and trk.

Image preprocessing

  • Registration
  • Head-motion correction
  • Denoising
  • Skull stripping and brain mask segmentation (Linux only)
  • Resampling, cropping, flipping and merging
  • Header modifications
  • Single volume extraction

Diffusion gradient/b-value processing

  • b-value rounding
  • Gradient direction flipping
  • Gradient direction subsampling
  • Averaging of gradient directions/volumes
  • Gradient direction and b-value visualization

ODF reconstruction and signal modelling

  • Tensor and Q-ball reconstruction
  • Other reconstructions via Dipy wrapping (CSD, 3D SHORE, SFM) (Linux only)
  • ODF peak calculation
  • MRtrix or camino results can be imported

Quantification of diffusion-weighted/tensor/ODF images

  • Intravoxel Incoherent Motion (IVIM) and diffusion kurtosis analysis
  • Calculation of many other derived indices such as ADC, MD, GFA, FA, RA, AD, RD
  • Image statistics

Segmentation

  • Automatic white matter bundle segmentation (TractSeg) [3] (Linux only)
  • Automatic brain mask segmentation (Linux only)
  • Manual image segmentation and operations on segmentations
  • SOON: automatic brain tissue segmentation

Fiber tractography

  • Global tractography [4]
  • Streamline tractography
    • Interactive (similar to [5]) or seed image based
    • Deterministic or probabilistic
    • Peak, ODF, tensor and raw dMRI based. The latter one in conjunction with machine learning based tractography [6]
    • Various possibilities for anatomical constraints.
    • Tractography priors in form of additional peak images, e.g. obtained using TractSeg

Fiber processing

  • Tract dissection (parcellation or ROI based)
  • Tract filtering by
    • length
    • curvature
    • direction
    • weight
    • density
  • Tract resampling and compression
  • Tract transformation
    • Mirroring
    • Rotating and translating
    • Registration (apply transform of previously performed image registration)
  • Tract coloring
    • Curvature
    • Length
    • Weight
    • Scalar map (e.g. FA)
  • Other operations
    • Join
    • Subtract
    • Copy
  • Fiber clustering [7]
  • Fiber fitting and weighting similar to SIFT2 and LiFE [8,9]
  • Principal direction extraction (fibers --> peaks)
  • Tract derived images:
    • Tract density images
    • Tract endpoint images
    • Tract envelopes

Fiberfox dMRI simulations [10]

  • Multi-compartment signal modeling
  • Simulation of the k-space acquisition including
    • Compartment specific relaxation effects
    • Artifacts such as noise, spikes, ghosts, aliasing, distortions, signal drift, head motion, eddy currents and Gibbs ringing
    • Definition of important acquisition parameters such as bvalues and gradient directions, TE, TR, dwell time, partial Fourier, ...
  • Manual definition of fiber configurations, e.g. for evaluation purposes
  • Automatic generation of random fiber configurations

Other features

  • Brain network statistics and visualization (connectomics)
  • Interactive Python console (Linux only)
  • Integrated screenshot maker
  • Command line tools for most functionalities


Related Links


Image Gallery

MitkDiffusion.png

Screenshot of the MITK Diffusion Welcome Screen


ScalarMaps.png

Scalar map visualization


Data Tensors.png

Tensor Visualization


Data ODF.png

ODF visualization


Data Peaks.png

Peak visualization (uniform white coloring)


StreamlineTractography.png

Interactive tractography in MITK Diffusion. The tractogram updates automatically on parameter change and movement of the spherical seed region.


Extraction 1.png

Tract dissection using manually drawn ROIs.


FiberFit.png

Result of automatic streamline weighting (similar to SIFT2 or LiFE)


Fiberfox.png

Illustration of the dMRI phantom simulation process using Fiberfox.


Eddy.gif Spike and motion.gif Drift.gif

645551 axial motion ghost eddy.gif Ringing.gif 683256 Distortions Sagittal.gif

Illustration of simulated dMRI images with various artifacts (a bit excessive for illustration purposes): eddy current distortions, motion and spike, intensity drift, motion, eddy and noise, motion, B0 inhomogeneity distortions.


RandomFibers Example.png

Automatically generated random fiber configuration for Fiberfox simulations.


Downloads

Nightly Ubuntu and Windows installers: ftp://ftp.dkfz-heidelberg.de/outgoing/MitkDiffusion

Please also have a look at the requirements for running MITK Diffusion with all its features successfully!

The installers come as executable setup wizards that install MITK Diffusion on your system or alternatively as simple .tar.gz or .zip archive where you can execute MITK Diffusion and the command line apps "manually". Should there be no new installer for a while, please contact us and report the issue.

If you encounter any bugs, please report them in our bugtracking system or use the MITK-users mailing list. We are grateful for any feedback!


Requirements

  • For Windows users:
    • MITK Diffusion requires the Microsoft Visual C++ 2017 Redistributable to be installed on the system. The MITK Diffusion installer automatically installs this redistributable for you if not already present on the system, but it needs administrative privileges to do so. So to install the redistributable, run the MITK Diffusion installer as administrator.
    • Python modules are disabled under Windows!


Building MITK Diffusion from source

  1. Install Qt on your system (>= 5.11.1).
  2. Clone MITK from out git repository using Git version control.
  3. Configure the MITK Superbuild using CMake (>= 3.13).
    1. Choose the source code directory and an empty binary directory.
    2. Click "Configure".
    3. Set the option MITK_BUILD_CONFIGURATION to "DiffusionRelease".
    4. Click "Generate".
    5. macOS specifics:
      1. Use python 3.6, since python 3.7 leads to build errors on macOS.
      2. The cmake variables for python 3 might need to be set manually. It is probably enough to specify PYTHON_EXECUTABLE.
      3. Openmp needs to be installed manually since it is not included in apple clang anymore: "brew install libomp" should do the trick. It might be necessary to set the corresponding make variables later in the MITK build manually:
        1. OpenMP_CXX_FLAGS: -Xpreprocessor -fopenmp -I"/path/to/python3/includes/"
        2. OpenMP_C_FLAGS: -Xpreprocessor -fopenmp -I"/path/to/python3/includes/"
        3. OpenMPCXX_LIB_NAMES: libomp
        4. OpenMPC_LIB_NAMES: libomp
        5. OpenMP_libomp_LIBRARY: /path/to/libomp.dylib
  4. Build the project
    1. Linux/maxOS: Open a console window, navigate to the build folder and type "make -j8" (optionally supply the number threads to be used for a parallel build with -j).
    2. Windows (requires visual studio): Open the MITK Superbuild solution file and build all projects.
  5. The build may take some time and should yield the binaries in "your_build_folder/MITK-build/bin"

More detailed build instructions can be found in the documentation.


Continuous integration: http://cdash.mitk.org/index.php?project=MITK&display=project


References

All publications of the Division of Medical Image Computing can be found here.

[1] Fritzsche, Klaus H., Peter F. Neher, Ignaz Reicht, Thomas van Bruggen, Caspar Goch, Marco Reisert, Marco Nolden, et al. “MITK Diffusion Imaging.” Methods of Information in Medicine 51, no. 5 (2012): 441.

[2] Fritzsche, K., and H.-P. Meinzer. “MITK-DI A New Diffusion Imaging Component for MITK.” In Bildverarbeitung Für Die Medizin, n.d.

[3] Wasserthal, Jakob, Peter Neher, and Klaus H. Maier-Hein. “TractSeg - Fast and Accurate White Matter Tract Segmentation.” NeuroImage 183 (August 4, 2018): 239–53.

[4] Neher, P. F., B. Stieltjes, M. Reisert, I. Reicht, H.P. Meinzer, and K. Maier-Hein. “MITK Global Tractography.” In SPIE Medical Imaging: Image Processing, 2012.

[5] Chamberland, M., K. Whittingstall, D. Fortin, D. Mathieu, und M. Descoteaux. „Real-time multi-peak tractography for instantaneous connectivity display“. Front Neuroinform 8 (2014): 59. doi:10.3389/fninf.2014.00059.

[6] Neher, Peter F., Marc-Alexandre Côté, Jean-Christophe Houde, Maxime Descoteaux, and Klaus H. Maier-Hein. “Fiber Tractography Using Machine Learning.” NeuroImage. Accessed July 17, 2017. doi:10.1016/j.neuroimage.2017.07.028.

[7] Garyfallidis, Eleftherios, Matthew Brett, Marta Morgado Correia, Guy B. Williams, and Ian Nimmo-Smith. “QuickBundles, a Method for Tractography Simplification.” Frontiers in Neuroscience 6 (2012).

[8] Smith, Robert E., Jacques-Donald Tournier, Fernando Calamante, and Alan Connelly. “SIFT2: Enabling Dense Quantitative Assessment of Brain White Matter Connectivity Using Streamlines Tractography.” NeuroImage 119, no. Supplement C (October 1, 2015): 338–51.

[9] Pestilli, Franco, Jason D. Yeatman, Ariel Rokem, Kendrick N. Kay, and Brian A. Wandell. “Evaluation and Statistical Inference for Human Connectomes.” Nature Methods 11, no. 10 (October 2014): 1058–63.

[10] Neher, Peter F., Frederik B. Laun, Bram Stieltjes, and Klaus H. Maier-Hein. “Fiberfox: Facilitating the Creation of Realistic White Matter Software Phantoms.” Magnetic Resonance in Medicine 72, no. 5 (November 2014): 1460–70. doi:10.1002/mrm.25045.


Contact

If you have questions about the application or if you would like to give us feedback, don't hesitate to contact us using our mailing list or, for questions that are of no interest for the community, directly.