diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.ivim/src/QmitkIVIMWidget.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.ivim/src/QmitkIVIMWidget.cpp index 52f2112..2ce37bc 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.ivim/src/QmitkIVIMWidget.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.ivim/src/QmitkIVIMWidget.cpp @@ -1,148 +1,168 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "QmitkIVIMWidget.h" #include "mitkHistogramGenerator.h" #include #include QmitkIVIMWidget::QmitkIVIMWidget( QWidget * parent ) : QmitkPlotWidget(parent) { // this->SetAxisTitle( QwtPlot::xBottom, "Grayvalue" ); // this->SetAxisTitle( QwtPlot::yLeft, "Probability" ); // this->Replot(); QFrame* canvas = qobject_cast(m_Plot->canvas()); if (canvas) { canvas->setLineWidth(0); canvas->setContentsMargins(0,0,0,0); } + auto linScale = new QwtLinearScaleEngine(); + m_Plot->setAxisScaleEngine(1, linScale); + auto logScale = new QwtLogScaleEngine(); m_Plot->setAxisScaleEngine(0, logScale); m_Plot->setAxisScale( 0, 0.15, 1.0 ); } QmitkIVIMWidget::~QmitkIVIMWidget() { } void QmitkIVIMWidget::DrawGauss() { } void QmitkIVIMWidget::ClearItemModel() { } std::vector QmitkIVIMWidget::vec(const vnl_vector& vector) { std::vector retval(vector.size()); for(unsigned int i=0; iClear(); if (snap.bvalues.empty()) return; QString s("f=%1, D=%2, D*=%3"); s = s.arg(snap.currentF,4); s = s.arg(snap.currentD,4); s = s.arg(snap.currentDStar,4); - int curveId = this->InsertCurve( s.toLatin1(), QColor(Qt::black) ); + int curveId = this->InsertCurve( s.toLatin1(), QColor(Qt::lightGray) ); this->SetCurvePen( curveId, QPen( Qt::NoPen ) ); QPen pen; - pen.setColor( QColor(Qt::red) ); + pen.setColor( QColor(Qt::cyan) ); + pen.setStyle( Qt::DotLine ); pen.setWidth(2); double maxb = snap.bvalues.max_value(); vnl_vector xvals(2); vnl_vector yvals(2); xvals[0] = 0; xvals[1] = maxb; yvals[0] = 1-snap.currentFunceiled; yvals[1] = yvals[0]*exp(-maxb * snap.currentD); - curveId = this->InsertCurve( "contribution of D to the signal", pen.color() ); + curveId = this->InsertCurve( "contribution of D to the signal", QColor(Qt::lightGray) ); this->SetCurveData( curveId, vec(xvals), vec(yvals) ); this->SetCurvePen( curveId, pen ); this->SetCurveAntialiasingOn( curveId ); if(snap.currentDStar != 0) { - pen.setColor(Qt::black); + pen.setStyle( Qt::SolidLine ); + pen.setColor(Qt::red); int nsampling = 50; xvals.set_size(nsampling); yvals.set_size(nsampling); double f = 1-snap.currentFunceiled; for(int i=0; iInsertCurve( "resulting fit of the model" ); + curveId = this->InsertCurve( "resulting fit of the model", QColor(Qt::lightGray) ); this->SetCurveData( curveId, vec(xvals), vec(yvals) ); this->SetCurvePen( curveId, pen ); this->SetCurveAntialiasingOn( curveId ); } // plot points after all curves to force prettier legend formatting // lines // points - curveId = this->InsertCurve( "ignored measurement points" ); - this->SetCurveData( curveId, vec(snap.bvalues), vec(snap.allmeas) ); - this->SetCurvePen( curveId, QPen(Qt::NoPen) ); - QwtSymbol* whiteSymbol = new QwtSymbol(QwtSymbol::Diamond, QColor(Qt::white), QColor(Qt::black), QSize(8,8)); - this->SetCurveSymbol(curveId, whiteSymbol); +// curveId = this->InsertCurve( "ignored measurement points", QColor(Qt::lightGray) ); +// this->SetCurveData( curveId, vec(snap.bvalues), vec(snap.allmeas) ); +// this->SetCurvePen( curveId, QPen(Qt::NoPen) ); +// QwtSymbol* blackSymbol = new QwtSymbol(QwtSymbol::Diamond, QColor(Qt::black), QColor(Qt::black), QSize(8,8)); +// this->SetCurveSymbol(curveId, blackSymbol); + +// QwtSymbol* redSymbol = new QwtSymbol(QwtSymbol::Diamond, QColor(Qt::red), QColor(Qt::red), QSize(8,8)); + QwtSymbol* whiteDiamond = new QwtSymbol(QwtSymbol::Diamond, QColor(Qt::white), QColor(Qt::black), QSize(8,8)); + QwtSymbol* whiteStar = new QwtSymbol(QwtSymbol::XCross, QColor(Qt::white), QColor(Qt::white), QSize(8,8)); - curveId = this->InsertCurve( "points first fit" ); + curveId = this->InsertCurve( "points first fit", QColor(Qt::lightGray) ); this->SetCurveData( curveId, vec(snap.bvals1), vec(snap.meas1) ); this->SetCurvePen( curveId, QPen( Qt::NoPen ) ); - QwtSymbol* redSymbol = new QwtSymbol(QwtSymbol::Diamond, QColor(Qt::red), QColor(Qt::red), QSize(8,8)); - this->SetCurveSymbol(curveId, redSymbol); + this->SetCurveSymbol(curveId, whiteDiamond); - if(snap.currentDStar != 0) + if(snap.currentDStar != 0 && !snap.high_indices.empty()) { - curveId = this->InsertCurve( "additional points second fit" ); - this->SetCurveData( curveId, vec(snap.bvals2), vec(snap.meas2) ); - this->SetCurvePen( curveId, QPen( Qt::NoPen ) ); - QwtSymbol* blackSymbol = new QwtSymbol(QwtSymbol::Diamond, QColor(Qt::black), QColor(Qt::black), QSize(8,8)); - this->SetCurveSymbol(curveId, blackSymbol); + std::vector< double > additonal_bvals; + std::vector< double > additonal_meas; + for (int i=0; iInsertCurve( "additional points second fit", QColor(Qt::lightGray) ); + this->SetCurveData( curveId, additonal_bvals, additonal_meas ); + this->SetCurvePen( curveId, QPen( Qt::NoPen ) ); + this->SetCurveSymbol(curveId, whiteStar); + } } auto legend = new QwtLegend(); m_Plot->insertLegend(legend, QwtPlot::BottomLegend); + m_Plot->setAxisTitle(0, "S/S0"); + m_Plot->setAxisTitle(1, "b"); this->Replot(); } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.ivim/src/QmitkKurtosisWidget.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.ivim/src/QmitkKurtosisWidget.cpp index 8c96306..0df86be 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.ivim/src/QmitkKurtosisWidget.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.ivim/src/QmitkKurtosisWidget.cpp @@ -1,161 +1,127 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "QmitkKurtosisWidget.h" #include #include QmitkKurtosisWidget::QmitkKurtosisWidget(QWidget *parent) : QmitkPlotWidget(parent) { QFrame* canvas = qobject_cast< QFrame* >( m_Plot->canvas() ); if( canvas ) { canvas->setLineWidth(0); canvas->setContentsMargins(0, 0, 0, 0); } } QmitkKurtosisWidget::~QmitkKurtosisWidget() { } void QmitkKurtosisWidget::SetData(KurtosisFilterType::KurtosisSnapshot snap) { this->Clear(); if( snap.bvalues.empty() ) return; double max_y_val = 1.4 * fmax( snap.measurements[0], snap.m_BzeroFit ); auto logScale = new QwtLogScaleEngine(); m_Plot->setAxisScaleEngine(0, logScale ); m_Plot->setAxisScale(0, 0.1, max_y_val ); QString s("D=%1, K=%2"); s = s.arg( snap.m_D, 4); s = s.arg( snap.m_K, 4); // insert formatted value string to legend (curve without pen) - int curveId = this->InsertCurve( s.toLatin1(), QColor( Qt::black ) ); + int curveId = this->InsertCurve( s.toLatin1(), QColor( Qt::lightGray ) ); this->SetCurvePen( curveId, QPen( Qt::NoPen ) ); - QPen pen; - pen.setColor( QColor( Qt::red )); - pen.setWidth(2); - pen.setStyle( Qt::PenStyle::DashLine ); - // get the x-axis maximum const double max_bvalue = snap.bvalues.max_value(); // // Data-points // auto measured_values = toStdVec( snap.measurements ); double y_bzero = measured_values[0]; - if( snap.m_fittedBZero ) - { - /*auto c_measurements_curve = this->InsertCurve( "Corrected measured values with fitted b=0" ); - this->SetCurveData( c_measurements_curve, toStdVec( snap.fit_bvalues ), toStdVec( snap.fit_measurements / snap.m_BzeroFit ) ); - this->SetCurvePen( c_measurements_curve, QPen(Qt::NoPen) ); - QwtSymbol* whiteDiamond = new QwtSymbol(QwtSymbol::Diamond, QColor(Qt::white), QColor(Qt::black), QSize(8,8)); - this->SetCurveSymbol( c_measurements_curve, whiteDiamond );*/ - - std::vector single_bzero; - single_bzero.push_back(0); - - std::vector fitted_bzero; - fitted_bzero.push_back( snap.m_BzeroFit ); - - auto c_measurements_bzero = this->InsertCurve( "Fitted b=0" ); - this->SetCurveData( c_measurements_bzero, single_bzero, fitted_bzero ); - this->SetCurvePen( c_measurements_bzero, QPen(Qt::NoPen) ); - QwtSymbol* blackDiamond = new QwtSymbol(QwtSymbol::Diamond, QColor(Qt::black), QColor(Qt::black), QSize(8,8)); - this->SetCurveSymbol( c_measurements_bzero, blackDiamond ); - - y_bzero = snap.m_BzeroFit; - - MITK_DEBUG("Kurtosis.Widget.Bzero") << "[Fitted] " << snap.m_BzeroFit << ": [Measured] " << snap.measurements[0]; - } - - - auto measurements_curve = this->InsertCurve( "Measured values" ); - this->SetCurveData( measurements_curve, toStdVec( snap.bvalues ), measured_values ); - this->SetCurvePen( measurements_curve, QPen(Qt::NoPen) ); - QwtSymbol* redDiamond = new QwtSymbol(QwtSymbol::Diamond, QColor(Qt::red), QColor(Qt::red), QSize(8,8)); - this->SetCurveSymbol( measurements_curve, redDiamond ); - - // - // Kurtosis - full modelled signal - // - pen.setColor( QColor( Qt::black )); - pen.setStyle( Qt::SolidLine ); const unsigned int num_samples = 50; - vnl_vector x_K_model(num_samples); vnl_vector y_K_model(num_samples); - vnl_vector y_D_model(num_samples); - const double x_tics_offset = max_bvalue / static_cast( num_samples ); - for( unsigned int i=0; iInsertCurve( "Resulting fit of the model" ); - this->SetCurveData( kurtosis_curve, toStdVec( x_K_model ), toStdVec( y_K_model ) ); - this->SetCurvePen( kurtosis_curve, pen ); - this->SetCurveAntialiasingOn( kurtosis_curve ); + // Only D-modelled signal + QPen pen; + pen.setWidth(2); + pen.setColor( QColor(Qt::cyan) ); + pen.setStyle( Qt::DotLine ); - auto d_curve = this->InsertCurve( "D-part of the fitted model" ); + auto d_curve = this->InsertCurve( "D-part of the fitted model", QColor(Qt::lightGray) ); this->SetCurveData( d_curve, toStdVec( x_K_model ), toStdVec( y_D_model ) ); - - pen.setColor( QColor( Qt::red)); - pen.setStyle( Qt::PenStyle::DashLine ); this->SetCurvePen( d_curve, pen ); this->SetCurveAntialiasingOn( d_curve ); - // + // Kurtosis - full modelled signal + pen.setColor( QColor( Qt::red )); + pen.setStyle( Qt::SolidLine ); + + auto kurtosis_curve = this->InsertCurve( "Resulting fit of the model", QColor(Qt::lightGray) ); + this->SetCurveData( kurtosis_curve, toStdVec( x_K_model ), toStdVec( y_K_model ) ); + this->SetCurvePen( kurtosis_curve, pen ); + this->SetCurveAntialiasingOn( kurtosis_curve ); + + auto measurements_curve = this->InsertCurve( "Measured values", QColor(Qt::lightGray) ); + this->SetCurveData( measurements_curve, toStdVec( snap.fit_bvalues ), toStdVec( snap.fit_measurements) ); + this->SetCurvePen( measurements_curve, QPen(Qt::NoPen) ); + QwtSymbol* whiteDiamond = new QwtSymbol(QwtSymbol::Diamond, QColor(Qt::white), QColor(Qt::black), QSize(8,8)); + this->SetCurveSymbol( measurements_curve, whiteDiamond ); + // add Legend - // auto legend = new QwtLegend(); legend->setMaxColumns(3); m_Plot->insertLegend( legend, QwtPlot::BottomLegend ); + m_Plot->setAxisTitle(0, "S"); this->Replot(); } std::vector QmitkKurtosisWidget::toStdVec(const vnl_vector& vector) { std::vector retval(vector.size()); for(unsigned int i=0; i + QmitkIVIMViewControls 0 0 423 1563 0 0 QmitkTemplate QCommandLinkButton:disabled { border: none; } QGroupBox { background-color: transparent; } 9 9 9 9 9 Intra Voxel Incoherent Motion Estimation 6 9 6 6 Input Data 6 6 6 6 Optional ROI image ROI: DWI to analyze Raw DWI: - + - + QFrame::NoFrame QFrame::Raised 0 0 0 0 - + warning display Qt::RichText true 0 0 16 16 QFrame::NoFrame QFrame::Raised 0 0 0 0 0 0 16 16 QFrame::NoFrame QFrame::Raised 0 0 0 0 0 0 16 16 QFrame::NoFrame QFrame::Raised 0 0 0 0 QFrame::StyledPanel QFrame::Raised 0 0 0 0 0 0 0 IVIM Parameters 9 QFrame::NoFrame QFrame::Raised 0 0 0 0 0 + + + + + 51 + 16777215 + + + + 200 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 80 16777215 D* 100 60 Qt::Horizontal - - - - - 51 - 16777215 - - - - 200 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - QFrame::NoFrame QFrame::Raised 0 0 0 0 0 + + + 130 + 0 + + - 80 + 130 16777215 - neglect b< + Ignore b< (first fit) - + 250 34 Qt::Horizontal 51 16777215 46.5 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter QFrame::NoFrame QFrame::Raised 0 0 0 0 0 80 16777215 #iterations 100 10 Qt::Horizontal 30 16777215 TextLabel Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter QFrame::NoFrame QFrame::Raised 0 0 0 0 0 80 16777215 lambda 1000 10 Qt::Horizontal 0 0 QFrame::NoFrame QFrame::Raised 0 0 0 0 0 0 0 30 16777215 TextLabel Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 15 16777215 Calculate threshold from histogram * QFrame::NoFrame QFrame::Plain 0 0 0 0 0 + + + 130 + 0 + + - 80 + 130 16777215 - neglect Si< + Signal threshold: 100 0 Qt::Horizontal 0 0 QFrame::NoFrame QFrame::Raised 0 0 0 0 0 0 0 30 16777215 TextLabel Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 15 16777215 Calculate threshold from histogram * QFrame::NoFrame QFrame::Raised 0 0 0 0 80 0 Output Images f true D false D* false true 0 0 0 400 Choose Method 2 3 Param. Fit Fit D & f with fixed D* value Fit D & f (high b), then fit D* Linearly fit D & f (high b), then fit D* Regularized Kurtosis QFrame::StyledPanel QFrame::Raised 2 2 2 2 2 Smoothing sigma Select Fit Type - Omit b=0 Measurement + Omit b=0 Measurements 80 0 Output Images Force the fitting of K to remain within the given boundaries Boundaries for K Select if the data is fitted directly (straight) or the logarithmic equation is used Straight Fit Logarithmic Fit 2 QLayout::SetMaximumSize D false K true - + Signa for gaussian smoothing applied prior to map computation 0.000000000000000 5.000000000000000 0.100000000000000 On 0 0 0 400 Generate Output Images QFrame::NoFrame QFrame::Raised 0 0 0 0 QFrame::NoFrame QFrame::Raised 0 0 0 0 QFrame::NoFrame QFrame::Raised 0 0 0 0 Datapoints to Clipboard Parameters to Clipboard - + QmitkDataStorageComboBox QComboBox
QmitkDataStorageComboBox.h
QmitkDataStorageComboBoxWithSelectNone QComboBox
QmitkDataStorageComboBoxWithSelectNone.h
QmitkIVIMWidget QWidget
QmitkIVIMWidget.h
1
QmitkKurtosisWidget QWidget
QmitkKurtosisWidget.h
1
ctkRangeWidget QWidget
ctkRangeWidget.h
1
- - -
\ No newline at end of file + + + diff --git a/README.md b/README.md index 1b3d082..56e77b5 100644 --- a/README.md +++ b/README.md @@ -1,246 +1,244 @@ MITK Diffusion ============== The MITK Diffusion application [[1,2]](#References) 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](https://www.dkfz.de/en/mic/index.php) at the German Cancer Research Center (DKFZ). * [Downloads](#Downloads) * [Requirements](#Requirements) * [Features](#Features) * [Related Links](#Related) * [Image Gallery](#Image) * [Building MITK Diffusion from source](#Building) * [User Manual](http://docs.mitk.org/nightly/org_mitk_gui_qt_diffusionimaging.html) * [Report a Bug](https://phabricator.mitk.org/maniphest/task/edit/form/29/) * [References](#References) * [Contact](#Contact) ## Downloads **Nightly Ubuntu and Windows installers: [ftp://ftp.dkfz-heidelberg.de/outgoing/MitkDiffusion](https://bit.ly/2S1QfC8)** Please also have a look at the [requirements](#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](#Contact) us and report the issue. If you encounter any bugs, please report them in our [bugtracking](https://phabricator.mitk.org/maniphest/task/edit/form/29/) system or use the [MITK-users mailing list](http://mitk.org/wiki/MITK_Mailinglist). We are grateful for any feedback! ### Requirements * **For Ubuntu users**: * Install Python 3.X: `sudo apt install python3 python3-pip` - * Download Python requirements file: [PythonRequirements.txt](https://raw.githubusercontent.com/MITK/MITK/master/Modules/DiffusionImaging/DiffusionCore/PythonRequirements.txt) + * Download Python requirements file: [PythonRequirements.txt](https://github.com/MIC-DKFZ/MITK-Diffusion/tree/master/Modules/DiffusionCore/PythonRequirements.txt) * Install Python requirements: `pip3 install -r PythonRequirements.txt` * If your are behind a proxy use `pip3 --proxy install -r PythonRequirements.txt` * **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**: * 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!** ## Features **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]](#References) (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]](#References) * Streamline tractography * Interactive (similar to [[5]](#References)) 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]](#References) * 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]](#References) * Fiber fitting and weighting similar to SIFT2 and LiFE [[8,9]](#References) * Principal direction extraction (fibers --> peaks) * Tract derived images: * Tract density images * Tract endpoint images * Tract envelopes **Fiberfox dMRI simulations** [[10]](#References) * 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 * Great python package for logging your (MITK) command line experiments: * https://github.com/MIC-DKFZ/cmdint * `pip3 install cmdint` * 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 ## Image Gallery ![](http://mitk.org/images/8/8f/MitkDiffusion.png) Screenshot of the MITK Diffusion Welcome Screen


![](http://mitk.org/images/0/09/ScalarMaps.png) Scalar map visualization


![](http://mitk.org/images/3/3b/Data_Tensors.png) Tensor Visualization


![](http://mitk.org/images/5/5c/Data_ODF.png) ODF visualization


![](http://mitk.org/images/7/73/Data_Peaks.png) Peak visualization (uniform white coloring)


![](http://mitk.org/images/6/68/StreamlineTractography.png) Interactive tractography in MITK Diffusion. The tractogram updates automatically on parameter change and movement of the spherical seed region.


![](http://mitk.org/images/3/3a/Extraction_1.png) Tract dissection using manually drawn ROIs.


![](http://mitk.org/images/f/f5/FiberFit.png) Automatic streamline weighting (similar to SIFT2 or LiFE)


![](http://mitk.org/images/3/33/Fiberfox.png) Illustration of the dMRI phantom simulation process using Fiberfox.


\ Illustration of simulated dMRI images with various artifacts (a bit excessive for illustration purposes): eddy current distortions (1), motion and spike (2), intensity drift (3), motion, eddy and noise (4), ringing (5), B0 inhomogeneity distortions (6), from left to right.


![](http://mitk.org/images/0/08/RandomFibers_Example.png) Automatically generated random fiber configuration for Fiberfox simulations.


## Building MITK Diffusion from source * Install [Qt](https://www.qt.io/ Qt) on your system (>= 5.11.1). * Clone MITK from [github](https://github.com/MIC-DKFZ/MITK-Diffusion.git) using [Git version control](https://git-scm.com/). * Clone MITK Diffusion from [github](https://github.com/MITK/MITK.git). * Configure the MITK Superbuild using [CMake](https://cmake.org/) (>= 3.14.5). * Choose the MITK source code directory and an empty binary directory. * Click "Configure". * Set the option MITK_EXTENSION_DIRS to "/path/to/my/mitk-diffusion-repository". * Click "Configure". * Set the option MITK_BUILD_CONFIGURATION to "DiffusionRelease". * 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 * 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. * 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](http://docs.mitk.org/nightly/BuildInstructionsPage.html). 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 [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. [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](http://mitk.org/wiki/MITK_Mailinglist) or, for questions that are of no interest for the community, [directly](https://www.dkfz.de/en/mic/team/people/Peter_Neher.html).