Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
QmitkIsoDoseLevelSetModel.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 
17 #ifndef QmitkIsoDoseLevelSetModel_h
18 #define QmitkIsoDoseLevelSetModel_h
19 
20 #include <QAbstractTableModel>
21 
23 
24 #include "MitkRTUIExports.h"
25 
26 
34 class MITKRTUI_EXPORT QmitkIsoDoseLevelSetModel : public QAbstractTableModel
35 {
36  Q_OBJECT
37 
38 public:
39  QmitkIsoDoseLevelSetModel(QObject *parent = NULL);
41 
43  void setIsoDoseLevelSet(mitk::IsoDoseLevelSet *pSet);
44 
45  virtual Qt::ItemFlags flags(const QModelIndex &index) const;
46  virtual QVariant data(const QModelIndex &index, int role) const;
47  virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const;
48  virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
49  virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
50  virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
51 
52  bool getShowAbsoluteDose() const;
53  mitk::DoseValueAbs getReferenceDose() const;
54 
55  bool getVisibilityEditOnly() const;
56 
57  void switchVisibilityIsoLines(bool activate);
58  void switchVisibilityColorWash(bool activate);
59  void invertVisibilityIsoLines();
60  void invertVisibilityColorWash();
61  void swapVisibility();
62 
63  void addLevel();
64  void deleteLevel(const QModelIndex &index);
65 
67  bool isModified();
68 
69  public Q_SLOTS:
73  void setReferenceDose(double newReferenceDose);
77  void setShowAbsoluteDose(bool showAbsoluteDose);
78 
82  void setVisibilityEditOnly(bool onlyVisibility);
83 
84 private:
86 
87  bool m_showAbsoluteDose;
88  bool m_visibilityEditOnly;
89 
90  mitk::DoseValueAbs m_referenceDose;
91 
93  bool m_modified;
94 
95 };
96 
97 #endif // QmitkIsoDoseLevelSetModel_h
98 
itk::SmartPointer< Self > Pointer
Stores values needed for the representation/visualization of dose iso levels.
#define MITKRTUI_EXPORT
double DoseValueAbs
Represents absolute dose values (in Gy).