diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging/files.cmake b/Plugins/org.mitk.gui.qt.diffusionimaging/files.cmake
index 4778152042..e422eff8ae 100644
--- a/Plugins/org.mitk.gui.qt.diffusionimaging/files.cmake
+++ b/Plugins/org.mitk.gui.qt.diffusionimaging/files.cmake
@@ -1,178 +1,180 @@
set(SRC_CPP_FILES
QmitkODFDetailsWidget.cpp
QmitkODFRenderWidget.cpp
QmitkPartialVolumeAnalysisWidget.cpp
QmitkIVIMWidget.cpp
QmitkTbssRoiAnalysisWidget.cpp
QmitkResidualAnalysisWidget.cpp
QmitkResidualViewWidget.cpp
QmitkTensorModelParametersWidget.cpp
QmitkZeppelinModelParametersWidget.cpp
QmitkStickModelParametersWidget.cpp
QmitkDotModelParametersWidget.cpp
QmitkBallModelParametersWidget.cpp
QmitkAstrosticksModelParametersWidget.cpp
)
set(INTERNAL_CPP_FILES
mitkPluginActivator.cpp
QmitkQBallReconstructionView.cpp
QmitkPreprocessingView.cpp
QmitkDiffusionDicomImportView.cpp
QmitkDiffusionQuantificationView.cpp
QmitkTensorReconstructionView.cpp
QmitkDiffusionImagingPublicPerspective.cpp
QmitkControlVisualizationPropertiesView.cpp
QmitkODFDetailsView.cpp
QmitkGibbsTrackingView.cpp
QmitkStochasticFiberTrackingView.cpp
QmitkStreamlineTrackingView.cpp
QmitkFiberProcessingView.cpp
# QmitkFiberBundleDeveloperView.cpp
QmitkPartialVolumeAnalysisView.cpp
QmitkIVIMView.cpp
QmitkTractbasedSpatialStatisticsView.cpp
QmitkTbssTableModel.cpp
QmitkTbssMetaTableModel.cpp
QmitkTbssSkeletonizationView.cpp
Connectomics/QmitkConnectomicsDataView.cpp
Connectomics/QmitkConnectomicsNetworkOperationsView.cpp
Connectomics/QmitkConnectomicsStatisticsView.cpp
Connectomics/QmitkNetworkHistogramCanvas.cpp
QmitkDwiSoftwarePhantomView.cpp
QmitkOdfMaximaExtractionView.cpp
QmitkFiberfoxView.cpp
QmitkFiberExtractionView.cpp
QmitkFieldmapGeneratorView.cpp
QmitkDiffusionRegistrationView.cpp
+ QmitkDenoisingView.cpp
)
set(UI_FILES
src/internal/QmitkQBallReconstructionViewControls.ui
src/internal/QmitkPreprocessingViewControls.ui
src/internal/QmitkDiffusionDicomImportViewControls.ui
src/internal/QmitkDiffusionQuantificationViewControls.ui
src/internal/QmitkTensorReconstructionViewControls.ui
src/internal/QmitkControlVisualizationPropertiesViewControls.ui
src/internal/QmitkODFDetailsViewControls.ui
src/internal/QmitkGibbsTrackingViewControls.ui
src/internal/QmitkStochasticFiberTrackingViewControls.ui
src/internal/QmitkStreamlineTrackingViewControls.ui
src/internal/QmitkFiberProcessingViewControls.ui
# src/internal/QmitkFiberBundleDeveloperViewControls.ui
src/internal/QmitkPartialVolumeAnalysisViewControls.ui
src/internal/QmitkIVIMViewControls.ui
src/internal/QmitkTractbasedSpatialStatisticsViewControls.ui
src/internal/QmitkTbssSkeletonizationViewControls.ui
src/internal/Connectomics/QmitkConnectomicsDataViewControls.ui
src/internal/Connectomics/QmitkConnectomicsNetworkOperationsViewControls.ui
src/internal/Connectomics/QmitkConnectomicsStatisticsViewControls.ui
src/internal/QmitkDwiSoftwarePhantomViewControls.ui
src/internal/QmitkOdfMaximaExtractionViewControls.ui
src/internal/QmitkFiberfoxViewControls.ui
src/internal/QmitkFiberExtractionViewControls.ui
src/QmitkTensorModelParametersWidgetControls.ui
src/QmitkZeppelinModelParametersWidgetControls.ui
src/QmitkStickModelParametersWidgetControls.ui
src/QmitkDotModelParametersWidgetControls.ui
src/QmitkBallModelParametersWidgetControls.ui
src/QmitkAstrosticksModelParametersWidgetControls.ui
src/internal/QmitkFieldmapGeneratorViewControls.ui
src/internal/QmitkDiffusionRegistrationViewControls.ui
-
+ src/internal/QmitkDenoisingViewControls.ui
)
set(MOC_H_FILES
src/internal/mitkPluginActivator.h
src/internal/QmitkQBallReconstructionView.h
src/internal/QmitkPreprocessingView.h
src/internal/QmitkDiffusionDicomImportView.h
src/internal/QmitkDiffusionImagingPublicPerspective.h
src/internal/QmitkDiffusionQuantificationView.h
src/internal/QmitkTensorReconstructionView.h
src/internal/QmitkControlVisualizationPropertiesView.h
src/internal/QmitkODFDetailsView.h
src/QmitkODFRenderWidget.h
src/QmitkODFDetailsWidget.h
src/internal/QmitkGibbsTrackingView.h
src/internal/QmitkStochasticFiberTrackingView.h
src/internal/QmitkStreamlineTrackingView.h
src/internal/QmitkFiberProcessingView.h
# src/internal/QmitkFiberBundleDeveloperView.h
src/internal/QmitkPartialVolumeAnalysisView.h
src/QmitkPartialVolumeAnalysisWidget.h
src/internal/QmitkIVIMView.h
src/internal/QmitkTractbasedSpatialStatisticsView.h
src/internal/QmitkTbssSkeletonizationView.h
src/QmitkTbssRoiAnalysisWidget.h
src/QmitkResidualAnalysisWidget.h
src/QmitkResidualViewWidget.h
src/internal/Connectomics/QmitkConnectomicsDataView.h
src/internal/Connectomics/QmitkConnectomicsNetworkOperationsView.h
src/internal/Connectomics/QmitkConnectomicsStatisticsView.h
src/internal/Connectomics/QmitkNetworkHistogramCanvas.h
src/internal/QmitkDwiSoftwarePhantomView.h
src/internal/QmitkOdfMaximaExtractionView.h
src/internal/QmitkFiberfoxView.h
src/internal/QmitkFiberExtractionView.h
src/QmitkTensorModelParametersWidget.h
src/QmitkZeppelinModelParametersWidget.h
src/QmitkStickModelParametersWidget.h
src/QmitkDotModelParametersWidget.h
src/QmitkBallModelParametersWidget.h
src/QmitkAstrosticksModelParametersWidget.h
src/internal/QmitkFieldmapGeneratorView.h
src/internal/QmitkDiffusionRegistrationView.h
+ src/internal/QmitkDenoisingView.h
)
set(CACHED_RESOURCE_FILES
# list of resource files which can be used by the plug-in
# system without loading the plug-ins shared library,
# for example the icon used in the menu and tabs for the
# plug-in views in the workbench
plugin.xml
resources/preprocessing.png
resources/dwiimport.png
resources/quantification.png
resources/reconodf.png
resources/recontensor.png
resources/vizControls.png
resources/OdfDetails.png
resources/GibbsTracking.png
resources/FiberBundleOperations.png
resources/PartialVolumeAnalysis_24.png
resources/IVIM_48.png
resources/stochFB.png
resources/tbss.png
resources/connectomics/QmitkConnectomicsDataViewIcon_48.png
resources/connectomics/QmitkConnectomicsNetworkOperationsViewIcon_48.png
resources/connectomics/QmitkConnectomicsStatisticsViewIcon_48.png
resources/arrow.png
resources/qball_peaks.png
resources/phantom.png
resources/tensor.png
resources/qball.png
resources/StreamlineTracking.png
resources/dwi2.png
resources/odf.png
resources/refresh.xpm
resources/diffusionregistration.png
)
set(QRC_FILES
# uncomment the following line if you want to use Qt resources
resources/QmitkDiffusionImaging.qrc
#resources/QmitkTractbasedSpatialStatisticsView.qrc
)
set(CPP_FILES )
foreach(file ${SRC_CPP_FILES})
set(CPP_FILES ${CPP_FILES} src/${file})
endforeach(file ${SRC_CPP_FILES})
foreach(file ${INTERNAL_CPP_FILES})
set(CPP_FILES ${CPP_FILES} src/internal/${file})
endforeach(file ${INTERNAL_CPP_FILES})
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging/plugin.xml b/Plugins/org.mitk.gui.qt.diffusionimaging/plugin.xml
index 38c63b5d05..5d045e7c0d 100644
--- a/Plugins/org.mitk.gui.qt.diffusionimaging/plugin.xml
+++ b/Plugins/org.mitk.gui.qt.diffusionimaging/plugin.xml
@@ -1,181 +1,188 @@
+
+
+
+
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/QmitkDenoisingView.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/QmitkDenoisingView.cpp
new file mode 100644
index 0000000000..c8c4c39811
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/QmitkDenoisingView.cpp
@@ -0,0 +1,366 @@
+/*===================================================================
+
+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.
+
+===================================================================*/
+
+// Blueberry
+#include
+#include
+
+// Qmitk
+#include "QmitkDenoisingView.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+const std::string QmitkDenoisingView::VIEW_ID = "org.mitk.views.denoisingview";
+
+QmitkDenoisingView::QmitkDenoisingView()
+ : QmitkFunctionality()
+ , m_Controls( 0 )
+ , m_MultiWidget( NULL )
+ , m_OdfNormalization(0)
+ , m_ImageNode(NULL)
+{
+ m_VtkActor = vtkActor::New();
+ m_VtkMapper = vtkPolyDataMapper::New();
+ m_Renderer = vtkRenderer::New();
+ m_VtkRenderWindow = vtkRenderWindow::New();
+ m_RenderWindowInteractor = vtkRenderWindowInteractor::New();
+ m_Camera = vtkCamera::New();
+ m_VtkRenderWindow->SetSize(300,300);
+}
+
+QmitkDenoisingView::~QmitkDenoisingView()
+{
+
+}
+
+void QmitkDenoisingView::CreateQtPartControl( QWidget *parent )
+{
+ // build up qt view, unless already done
+ if ( !m_Controls )
+ {
+ // create GUI widgets from the Qt Designer's .ui file
+ m_Controls = new Ui::QmitkDenoisingViewControls;
+ m_Controls->setupUi( parent );
+ m_Controls->m_OdfBox->setVisible(false);
+ m_Controls->m_ODFRenderWidget->setVisible(false);
+ }
+}
+
+void QmitkDenoisingView::StdMultiWidgetAvailable (QmitkStdMultiWidget &stdMultiWidget)
+{
+ m_MultiWidget = &stdMultiWidget;
+
+ {
+ mitk::SliceNavigationController* slicer = m_MultiWidget->mitkWidget1->GetSliceNavigationController();
+ itk::ReceptorMemberCommand::Pointer command = itk::ReceptorMemberCommand::New();
+ command->SetCallbackFunction( this, &QmitkDenoisingView::OnSliceChanged );
+ m_SliceObserverTag1 = slicer->AddObserver( mitk::SliceNavigationController::GeometrySliceEvent(NULL, 0), command );
+ }
+
+ {
+ mitk::SliceNavigationController* slicer = m_MultiWidget->mitkWidget2->GetSliceNavigationController();
+ itk::ReceptorMemberCommand::Pointer command = itk::ReceptorMemberCommand::New();
+ command->SetCallbackFunction( this, &QmitkDenoisingView::OnSliceChanged );
+ m_SliceObserverTag2 = slicer->AddObserver( mitk::SliceNavigationController::GeometrySliceEvent(NULL, 0), command );
+ }
+
+ {
+ mitk::SliceNavigationController* slicer = m_MultiWidget->mitkWidget3->GetSliceNavigationController();
+ itk::ReceptorMemberCommand::Pointer command = itk::ReceptorMemberCommand::New();
+ command->SetCallbackFunction( this, &QmitkDenoisingView::OnSliceChanged );
+ m_SliceObserverTag3 = slicer->AddObserver( mitk::SliceNavigationController::GeometrySliceEvent(NULL, 0), command );
+ }
+}
+
+void QmitkDenoisingView::StdMultiWidgetNotAvailable()
+{
+
+ {
+ mitk::SliceNavigationController* slicer = m_MultiWidget->mitkWidget1->GetSliceNavigationController();
+ slicer->RemoveObserver( m_SliceObserverTag1 );
+ }
+
+ {
+ mitk::SliceNavigationController* slicer = m_MultiWidget->mitkWidget2->GetSliceNavigationController();
+ slicer->RemoveObserver( m_SliceObserverTag2 );
+ }
+
+ {
+ mitk::SliceNavigationController* slicer = m_MultiWidget->mitkWidget3->GetSliceNavigationController();
+ slicer->RemoveObserver( m_SliceObserverTag3 );
+ }
+
+ m_MultiWidget = NULL;
+}
+
+void QmitkDenoisingView::OnSelectionChanged( std::vector nodes )
+{
+ if (m_ImageNode.IsNotNull())
+ m_ImageNode->RemoveObserver( m_PropertyObserverTag );
+
+ m_Controls->m_InputData->setTitle("Please Select Input Data");
+ m_Controls->m_InputImageLabel->setText("mandatory");
+
+ m_ImageNode = NULL;
+
+ // iterate selection
+ for( std::vector::iterator it = nodes.begin(); it != nodes.end(); ++it )
+ {
+ mitk::DataNode::Pointer node = *it;
+
+ if( node.IsNotNull() && (dynamic_cast(node->GetData()) || dynamic_cast(node->GetData())) )
+ {
+ m_Controls->m_InputImageLabel->setText(node->GetName().c_str());
+ m_ImageNode = node;
+ }
+ }
+
+ UpdateOdf();
+ if (m_ImageNode.IsNotNull())
+ {
+ itk::ReceptorMemberCommand::Pointer command = itk::ReceptorMemberCommand::New();
+ command->SetCallbackFunction( this, &QmitkDenoisingView::OnSliceChanged );
+ m_PropertyObserverTag = m_ImageNode->AddObserver( itk::ModifiedEvent(), command );
+
+ m_Controls->m_InputData->setTitle("Input Data");
+ }
+}
+
+void QmitkDenoisingView::UpdateOdf()
+{
+
+ try
+ {
+ m_Controls->m_OverviewBox->setVisible(true);
+ if (m_ImageNode.IsNull() || !m_MultiWidget)
+ {
+ m_Controls->m_ODFRenderWidget->setVisible(false);
+ m_Controls->m_OdfBox->setVisible(false);
+ m_Controls->m_OverviewBox->setVisible(false);
+ return;
+ }
+
+ // restore the input image label ( needed in case the last run resulted into an exception )
+ m_Controls->m_InputImageLabel->setText(m_ImageNode->GetName().c_str());
+
+ // ODF Normalization Property
+ mitk::OdfNormalizationMethodProperty* nmp = dynamic_cast(m_ImageNode->GetProperty( "Normalization" ));
+ if(nmp)
+ m_OdfNormalization = nmp->GetNormalization();
+
+ m_TemplateOdf = itk::OrientationDistributionFunction::GetBaseMesh();
+ m_OdfTransform = vtkSmartPointer::New();
+ m_OdfTransform->Identity();
+ m_OdfVals = vtkSmartPointer::New();
+ m_OdfSource = vtkSmartPointer::New();
+ itk::OrientationDistributionFunction odf;
+
+ mitk::Point3D world = m_MultiWidget->GetCrossPosition();
+ mitk::Point3D index;
+ mitk::Image::Pointer img = dynamic_cast(m_ImageNode->GetData());
+ unsigned int *img_dimension = img->GetDimensions();
+// img->GetTimeSlicedGeometry()->WorldToIndex(world, index);
+
+ float sum = 0;
+ float max = itk::NumericTraits::NonpositiveMin();
+ float min = itk::NumericTraits::max();
+ QString values;
+ QString overviewText;
+
+ // check if dynamic_cast successfull and if the crosshair position is inside of the geometry of the ODF data
+ // otherwise possible crash for a scenario with multiple nodes
+ if (dynamic_cast(m_ImageNode->GetData()) && ( m_ImageNode->GetData()->GetGeometry()->IsInside(world) ) )
+ {
+ m_Controls->m_ODFRenderWidget->setVisible(true);
+ m_Controls->m_OdfBox->setVisible(true);
+
+ try
+ {
+ mitk::QBallImage* qball_image = dynamic_cast< mitk::QBallImage* >( m_ImageNode->GetData() );
+
+ // get access to the qball image data with explicitely allowing exceptions if memory locked
+ mitk::ImageReadAccessor readAccess( qball_image, qball_image->GetVolumeData(0), mitk::ImageAccessorBase::ExceptionIfLocked );
+ const float* qball_cPtr = static_cast< const float*>(readAccess.GetData());
+
+ OdfVectorImgType::IndexType ind;
+ ind[0] = (int)(index[0]+0.5);
+ ind[1] = (int)(index[1]+0.5);
+ ind[2] = (int)(index[2]+0.5);
+
+ // pixel size = QBALL_ODFSIZE
+ // position offset = standard offset
+ unsigned int offset_to_data = QBALL_ODFSIZE * (ind[2] * img_dimension[1] * img_dimension[0] + ind[1] * img_dimension[0] + ind[0]);
+ const float *pixel_data = qball_cPtr + offset_to_data;
+
+ for (int i=0; imax)
+ max = val;
+ if (val pd = odf.GetDirection(odf.GetPrincipleDiffusionDirection());
+ overviewText += "Main Diffusion:\n "+QString::number(pd[0])+"\n "+QString::number(pd[1])+"\n "+QString::number(pd[2])+"\n";
+
+ m_Controls->m_OdfValuesTextEdit->setText(values);
+ m_Controls->m_OverviewTextEdit->setVisible(true);
+ }
+ catch( mitk::Exception &e )
+ {
+ MITK_WARN << "LOCKED : " << e.what();
+ m_Controls->m_ODFRenderWidget->setVisible(false);
+ m_Controls->m_OdfBox->setVisible(false);
+ m_Controls->m_OverviewTextEdit->setVisible(false);
+
+ // reset the selection
+ m_Controls->m_InputImageLabel->setText("Click image to restore rendering!");
+ }
+ }
+ else if (dynamic_cast(m_ImageNode->GetData()))
+ {
+ m_Controls->m_ODFRenderWidget->setVisible(true);
+ m_Controls->m_OdfBox->setVisible(false);
+
+
+ mitk::TensorImage* qball_image = dynamic_cast< mitk::TensorImage*>(m_ImageNode->GetData());
+
+ // pixel access block
+ try
+ {
+ // get access to the qball image data with explicitely allowing exceptions if memory locked
+ mitk::ImageReadAccessor readAccess( qball_image, qball_image->GetVolumeData(0), mitk::ImageAccessorBase::ExceptionIfLocked );
+ const float* qball_cPtr = static_cast< const float*>(readAccess.GetData());
+
+ TensorImageType::IndexType ind;
+ ind[0] = (int)(index[0]+0.5);
+ ind[1] = (int)(index[1]+0.5);
+ ind[2] = (int)(index[2]+0.5);
+
+ // 6 - tensorsize
+ // remaining computation - standard offset
+ unsigned int offset_to_data = 6 * (ind[2] * img_dimension[1] * img_dimension[0] + ind[1] * img_dimension[0] + ind[0]);
+ const float *pixel_data = qball_cPtr + offset_to_data;
+
+ float tensorelems[6] = {
+ *(pixel_data ),
+ *(pixel_data + 1),
+ *(pixel_data + 2),
+ *(pixel_data + 3),
+ *(pixel_data + 4),
+ *(pixel_data + 5),
+ };
+
+ itk::DiffusionTensor3D tensor(tensorelems);
+ odf.InitFromTensor(tensor);
+
+ /** Array of eigen-values. */
+ typedef itk::FixedArray EigenValuesArrayType;
+ /** Matrix of eigen-vectors. */
+ typedef itk::Matrix MatrixType;
+ typedef itk::Matrix EigenVectorsMatrixType;
+
+ EigenValuesArrayType eigenValues;
+ EigenVectorsMatrixType eigenVectors;
+
+ QString pos = QString::number(ind[0])+", "+QString::number(ind[1])+", "+QString::number(ind[2]);
+ overviewText += "Coordinates: "+pos+"\n";
+ overviewText += "FA: "+QString::number(tensor.GetFractionalAnisotropy())+"\n";
+ overviewText += "RA: "+QString::number(tensor.GetRelativeAnisotropy())+"\n";
+ overviewText += "Trace: "+QString::number(tensor.GetTrace())+"\n";
+ tensor.ComputeEigenAnalysis(eigenValues,eigenVectors);
+ overviewText += "Eigenvalues:\n "+QString::number(eigenValues[2])+"\n "+QString::number(eigenValues[1])+"\n "+QString::number(eigenValues[0])+"\n";
+ overviewText += "Main Diffusion:\n "+QString::number(eigenVectors[0][0])+"\n "+QString::number(eigenVectors[1][0])+"\n "+QString::number(eigenVectors[2][0])+"\n";
+ overviewText += "Values:\n "+QString::number(tensorelems[0])+"\n "+QString::number(tensorelems[1])+"\n "+QString::number(tensorelems[2])+"\n "+QString::number(tensorelems[3])+"\n "+QString::number(tensorelems[4])+"\n "+QString::number(tensorelems[5])+"\n "+"\n";
+ m_Controls->m_OverviewTextEdit->setVisible(true);
+ }
+ // end pixel access block
+ catch(mitk::Exception &e )
+ {
+ MITK_WARN << "LOCKED : " << e.what();
+ m_Controls->m_ODFRenderWidget->setVisible(false);
+ m_Controls->m_OdfBox->setVisible(false);
+ m_Controls->m_OverviewTextEdit->setVisible(false);
+
+ // reset the selection
+ m_Controls->m_InputImageLabel->setText("Click image to restore rendering!");
+ }
+ }
+ else
+ {
+ m_Controls->m_ODFRenderWidget->setVisible(false);
+ m_Controls->m_OdfBox->setVisible(false);
+ overviewText += "Please reinit image geometry.\n";
+ }
+
+ // proceed only if the render widget is visible which indicates that the
+ // predecessing computations were successfull
+ if( m_Controls->m_ODFRenderWidget->isVisible() )
+ {
+ m_Controls->m_ODFDetailsWidget->SetParameters(odf);
+
+ switch(m_OdfNormalization)
+ {
+ case 0:
+ odf = odf.MinMaxNormalize();
+ break;
+ case 1:
+ odf = odf.MaxNormalize();
+ break;
+ case 2:
+ odf = odf.MaxNormalize();
+ break;
+ default:
+ odf = odf.MinMaxNormalize();
+ }
+
+ m_Controls->m_ODFRenderWidget->GenerateODF(odf);
+ m_Controls->m_OverviewTextEdit->setText(overviewText.toStdString().c_str());
+ }
+ }
+ catch(...)
+ {
+ QMessageBox::critical(0, "Error", "Data could not be analyzed. The image might be corrupted.");
+ }
+}
+
+void QmitkDenoisingView::OnSliceChanged(const itk::EventObject& /*e*/)
+{
+ UpdateOdf();
+}
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/QmitkDenoisingView.h b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/QmitkDenoisingView.h
new file mode 100644
index 0000000000..27e67c36c5
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/QmitkDenoisingView.h
@@ -0,0 +1,114 @@
+/*===================================================================
+
+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.
+
+===================================================================*/
+
+#ifndef _QMITKQmitkDenoisingView_H_INCLUDED
+#define _QMITKQmitkDenoisingView_H_INCLUDED
+
+#include
+
+#include
+
+#include "ui_QmitkDenoisingViewControls.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+/*!
+ \brief View displaying details of the orientation distribution function in the voxel at the current crosshair position.
+
+ \sa QmitkFunctionality
+ \ingroup Functionalities
+*/
+
+class QmitkDenoisingView : public QmitkFunctionality
+{
+ // this is needed for all Qt objects that should have a Qt meta-object
+ // (everything that derives from QObject and wants to have signal/slots)
+ Q_OBJECT
+
+public:
+
+ static const std::string VIEW_ID;
+
+ QmitkDenoisingView();
+ virtual ~QmitkDenoisingView();
+
+ typedef float TOdfPixelType;
+ typedef itk::Vector OdfVectorType;
+ typedef itk::Image OdfVectorImgType;
+
+ typedef itk::DiffusionTensor3D< TOdfPixelType > TensorPixelType;
+ typedef itk::Image< TensorPixelType, 3 > TensorImageType;
+
+ virtual void CreateQtPartControl(QWidget *parent);
+
+ virtual void StdMultiWidgetAvailable (QmitkStdMultiWidget &stdMultiWidget);
+ virtual void StdMultiWidgetNotAvailable();
+
+ void OnSliceChanged(const itk::EventObject& e);
+
+protected slots:
+
+protected:
+
+ /// \brief called by QmitkFunctionality when DataManager's selection has changed
+ virtual void OnSelectionChanged( std::vector nodes );
+
+ void UpdateOdf(); ///< called if slice position or datamanager selection has changed
+
+ Ui::QmitkDenoisingViewControls* m_Controls;
+ QmitkStdMultiWidget* m_MultiWidget;
+
+ /** observer flags */
+ int m_SliceObserverTag1;
+ int m_SliceObserverTag2;
+ int m_SliceObserverTag3;
+ int m_PropertyObserverTag;
+
+ /** ODF related variables like mesh structure, values etc. */
+ vtkPolyData* m_TemplateOdf; ///< spherical base mesh
+ vtkSmartPointer m_OdfTransform;
+ vtkSmartPointer m_OdfVals;
+ vtkSmartPointer m_OdfSource;
+
+ int m_OdfNormalization; ///< normalization method defined in the visualization view
+
+ /** rendering of the ODF */
+ vtkActor* m_VtkActor;
+ vtkPolyDataMapper* m_VtkMapper;
+ vtkRenderer* m_Renderer;
+ vtkRenderWindow* m_VtkRenderWindow;
+ vtkRenderWindowInteractor* m_RenderWindowInteractor;
+ vtkCamera* m_Camera;
+
+ mitk::DataNode::Pointer m_ImageNode;
+};
+
+
+
+#endif // _QmitkDenoisingView_H_INCLUDED
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/QmitkDenoisingViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/QmitkDenoisingViewControls.ui
new file mode 100644
index 0000000000..7002f48242
--- /dev/null
+++ b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/QmitkDenoisingViewControls.ui
@@ -0,0 +1,208 @@
+
+
+ QmitkDenoisingViewControls
+
+
+
+ 0
+ 0
+ 351
+ 734
+
+
+
+
+ 0
+ 0
+
+
+
+ QmitkTemplate
+
+
+
+ 6
+
+
+ 9
+
+ -
+
+
+ Please Select Input Data
+
+
+
-
+
+
+ DTI/QBI:
+
+
+
+ -
+
+
+ <html><head/><body><p><span style=" color:#ff0000;">mandatory</span></p></body></html>
+
+
+ true
+
+
+
+
+
+
+ -
+
+
+ Overview
+
+
+
+ 0
+
+
+ 9
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+ true
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 200
+ 200
+
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Raised
+
+
+
+ 0
+
+
+ 0
+
+
+
+
+ -
+
+
+ ODF Values
+
+
+
-
+
+
+ true
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 200
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Expanding
+
+
+
+ 20
+ 220
+
+
+
+
+
+
+
+
+
+ QmitkODFDetailsWidget
+ QWidget
+
+ 1
+
+
+ QmitkODFRenderWidget
+ QWidget
+
+ 1
+
+
+
+
+
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/mitkPluginActivator.cpp
index 9c69c931d3..c2db49d785 100644
--- a/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/mitkPluginActivator.cpp
+++ b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/mitkPluginActivator.cpp
@@ -1,87 +1,89 @@
/*===================================================================
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 "mitkPluginActivator.h"
#include
#include "src/internal/QmitkDiffusionImagingPublicPerspective.h"
#include "src/internal/QmitkQBallReconstructionView.h"
#include "src/internal/QmitkPreprocessingView.h"
#include "src/internal/QmitkDiffusionDicomImportView.h"
#include "src/internal/QmitkDiffusionQuantificationView.h"
#include "src/internal/QmitkTensorReconstructionView.h"
#include "src/internal/QmitkControlVisualizationPropertiesView.h"
#include "src/internal/QmitkODFDetailsView.h"
#include "src/internal/QmitkGibbsTrackingView.h"
#include "src/internal/QmitkStochasticFiberTrackingView.h"
#include "src/internal/QmitkFiberProcessingView.h"
//#include "src/internal/QmitkFiberBundleDeveloperView.h"
#include "src/internal/QmitkPartialVolumeAnalysisView.h"
#include "src/internal/QmitkIVIMView.h"
#include "src/internal/QmitkTractbasedSpatialStatisticsView.h"
#include "src/internal/QmitkTbssSkeletonizationView.h"
#include "src/internal/QmitkStreamlineTrackingView.h"
#include "src/internal/Connectomics/QmitkConnectomicsDataView.h"
#include "src/internal/Connectomics/QmitkConnectomicsNetworkOperationsView.h"
#include "src/internal/Connectomics/QmitkConnectomicsStatisticsView.h"
#include "src/internal/QmitkOdfMaximaExtractionView.h"
#include "src/internal/QmitkFiberfoxView.h"
#include "src/internal/QmitkFiberExtractionView.h"
#include "src/internal/QmitkFieldmapGeneratorView.h"
#include "src/internal/QmitkDiffusionRegistrationView.h"
+#include "src/internal/QmitkDenoisingView.h"
namespace mitk {
void PluginActivator::start(ctkPluginContext* context)
{
BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionImagingPublicPerspective, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkQBallReconstructionView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkPreprocessingView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionDicomImport, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionQuantificationView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkTensorReconstructionView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkControlVisualizationPropertiesView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkODFDetailsView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkGibbsTrackingView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkStochasticFiberTrackingView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkFiberProcessingView, context)
// BERRY_REGISTER_EXTENSION_CLASS(QmitkFiberBundleDeveloperView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkPartialVolumeAnalysisView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkIVIMView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkTractbasedSpatialStatisticsView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkTbssSkeletonizationView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkConnectomicsDataView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkConnectomicsNetworkOperationsView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkConnectomicsStatisticsView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkStreamlineTrackingView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkOdfMaximaExtractionView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkFiberfoxView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkFiberExtractionView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkFieldmapGeneratorView, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionRegistrationView, context)
+ BERRY_REGISTER_EXTENSION_CLASS(QmitkDenoisingView, context)
}
void PluginActivator::stop(ctkPluginContext* context)
{
Q_UNUSED(context)
}
}
Q_EXPORT_PLUGIN2(org_mitk_gui_qt_diffusionimaging, mitk::PluginActivator)