Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkMlbstTrainingDataWidget.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 #ifndef _QmitkMlbstTrainingDataWidget_H_INCLUDED
17 #define _QmitkMlbstTrainingDataWidget_H_INCLUDED
18 
19 //QT headers
20 #include <QWidget>
21 #include <QString>
22 #include "ui_QmitkMlbstTrainingDataWidgetControls.h"
23 #include <org_mitk_gui_qt_diffusionimaging_Export.h>
24 #include <mitkDataNode.h>
25 #include <mitkDataStorage.h>
26 
28 
31 class DIFFUSIONIMAGING_EXPORT QmitkMlbstTrainingDataWidget : public QWidget
32 {
33  //this is needed for all Qt objects that should have a MOC object (everything that derives from QObject)
34  Q_OBJECT
35 
36 public:
37 
38  static const std::string VIEW_ID;
39 
40  QmitkMlbstTrainingDataWidget (QWidget* parent = nullptr, Qt::WindowFlags f = nullptr);
41 
43 
44  virtual void CreateQtPartControl(QWidget *parent);
45 
46  mitk::DataNode::Pointer GetImage(){ return m_Controls->image->GetSelectedNode(); }
47  mitk::DataNode::Pointer GetFibers(){ return m_Controls->fibers->GetSelectedNode(); }
48  mitk::DataNode::Pointer GetMask(){ return m_Controls->mask->GetSelectedNode(); }
49  mitk::DataNode::Pointer GetWhiteMatter(){ return m_Controls->whiteMatter->GetSelectedNode(); }
51  {
52  m_Controls->image->SetDataStorage(ds);
53  m_Controls->fibers->SetDataStorage(ds);
54  m_Controls->mask->SetDataStorage(ds);
55  m_Controls->whiteMatter->SetDataStorage(ds);
56  m_Controls->mask->SetZeroEntryText("--");
57  m_Controls->whiteMatter->SetZeroEntryText("--");
58  }
59 
60 public slots:
61 
62 protected:
63  // member variables
64  Ui::QmitkMlbstTrainingDataWidgetControls* m_Controls;
65 
66 private:
67 
68 };
69 
70 #endif // _QmitkMlbstTrainingDataWidget_H_INCLUDED
71 
void SetDataStorage(mitk::DataStorage::Pointer ds)
Ui::QmitkMlbstTrainingDataWidgetControls * m_Controls
mitk::DataNode::Pointer GetWhiteMatter()