00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Module: $RCSfile$ 00005 Language: C++ 00006 Date: $Date: 2009-05-28 17:19:30 +0200 (Do, 28 Mai 2009) $ 00007 Version: $Revision: 17495 $ 00008 00009 Copyright (c) German Cancer Research Center, Division of Medical and 00010 Biological Informatics. All rights reserved. 00011 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00012 00013 This software is distributed WITHOUT ANY WARRANTY; without even 00014 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00015 PURPOSE. See the above copyright notices for more information. 00016 00017 =========================================================================*/ 00018 00019 #ifndef _QMITKQBALLRECONSTRUCTIONVIEW_H_INCLUDED 00020 #define _QMITKQBALLRECONSTRUCTIONVIEW_H_INCLUDED 00021 00022 #include <QmitkFunctionality.h> 00023 00024 #include <string> 00025 00026 #include "ui_QmitkQBallReconstructionViewControls.h" 00027 00028 #include "mitkDiffusionImage.h" 00029 00030 #include <berryIPartListener.h> 00031 #include <berryISelectionListener.h> 00032 #include <berryIStructuredSelection.h> 00033 00034 typedef short DiffusionPixelType; 00035 00036 struct QbrSelListener; 00037 00047 class QmitkQBallReconstructionView : public QObject, public QmitkFunctionality 00048 { 00049 00050 friend struct QbrSelListener; 00051 00052 // this is needed for all Qt objects that should have a MOC object (everything that derives from QObject) 00053 Q_OBJECT 00054 00055 public: 00056 00057 static const std::string VIEW_ID; 00058 00059 QmitkQBallReconstructionView(); 00060 virtual ~QmitkQBallReconstructionView(); 00061 00062 virtual void CreateQtPartControl(QWidget *parent); 00063 00065 virtual void CreateConnections(); 00066 00068 virtual void Activated(); 00069 00070 virtual void Deactivated(); 00071 00072 virtual void StdMultiWidgetAvailable (QmitkStdMultiWidget &stdMultiWidget); 00073 virtual void StdMultiWidgetNotAvailable(); 00074 00075 static const int nrconvkernels; 00076 00077 protected slots: 00078 00079 void ReconstructStandard(); 00080 //void ReconstructNormalized1(); 00081 //void ReconstructNormalized2(); 00082 //void ReconstructNonNormalized(); 00083 //void AnalyticallyReconstructStandard(); 00084 //void AnalyticallyReconstructSolidAngle(); 00085 //void AnalyticallyReconstructNonNegSolidAngle(); 00086 //void AnalyticallyReconstructAdc(); 00087 //void AnalyticallyReconstructRaw(); 00088 00089 void AdvancedCheckboxClicked(); 00090 void MethodChoosen(int method); 00091 00092 void Reconstruct(int method, int normalization); 00093 00094 void NumericalQBallReconstruction(mitk::DataStorage::SetOfObjects::Pointer inImages, int normalization); 00095 void AnalyticalQBallReconstruction(mitk::DataStorage::SetOfObjects::Pointer inImages, int normalization); 00096 00097 protected: 00098 00099 Ui::QmitkQBallReconstructionViewControls* m_Controls; 00100 00101 QmitkStdMultiWidget* m_MultiWidget; 00102 00103 template<int L> 00104 void TemplatedAnalyticalQBallReconstruction(mitk::DiffusionImage<DiffusionPixelType>* vols, 00105 float lambda, std::string nodename, std::vector<mitk::DataNode::Pointer>* nodes, int normalization); 00106 00107 void SetDefaultNodeProperties(mitk::DataNode::Pointer node, std::string name); 00108 00109 berry::ISelectionListener::Pointer m_SelListener; 00110 berry::IStructuredSelection::ConstPointer m_CurrentSelection; 00111 00112 }; 00113 00114 00115 00116 00117 #endif // _QMITKQBALLRECONSTRUCTIONVIEW_H_INCLUDED 00118