Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef QmitkIsoDoseLevelSetModel_h
14 #define QmitkIsoDoseLevelSetModel_h
15 
16 #include <QAbstractTableModel>
17 
19 
20 #include "MitkRTUIExports.h"
21 
22 
30 class MITKRTUI_EXPORT QmitkIsoDoseLevelSetModel : public QAbstractTableModel
31 {
32  Q_OBJECT
33 
34 public:
35  explicit QmitkIsoDoseLevelSetModel(QObject *parent = nullptr);
37 
39  void setIsoDoseLevelSet(mitk::IsoDoseLevelSet *pSet);
40 
41  Qt::ItemFlags flags(const QModelIndex &index) const override;
42  QVariant data(const QModelIndex &index, int role) const override;
43  QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
44  int rowCount(const QModelIndex &parent = QModelIndex()) const override;
45  int columnCount(const QModelIndex &parent = QModelIndex()) const override;
46  bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
47 
48  bool getShowAbsoluteDose() const;
49  mitk::DoseValueAbs getReferenceDose() const;
50 
51  bool getVisibilityEditOnly() const;
52 
53  void switchVisibilityIsoLines(bool activate);
54  void switchVisibilityColorWash(bool activate);
55  void invertVisibilityIsoLines();
56  void invertVisibilityColorWash();
57  void swapVisibility();
58 
59  void addLevel();
60  void deleteLevel(const QModelIndex &index);
61 
63  bool isModified();
64 
65  public Q_SLOTS:
69  void setReferenceDose(double newReferenceDose);
73  void setShowAbsoluteDose(bool showAbsoluteDose);
74 
78  void setVisibilityEditOnly(bool onlyVisibility);
79 
80 private:
81  mitk::IsoDoseLevelSet::Pointer m_DoseSet;
82 
83  bool m_showAbsoluteDose;
84  bool m_visibilityEditOnly;
85 
86  mitk::DoseValueAbs m_referenceDose;
87 
89  bool m_modified;
90 
91 };
92 
93 #endif
mitk::DoseValueAbs
double DoseValueAbs
Represents absolute dose values (in Gy).
Definition: mitkDoseValueType.h:23
MitkRTUIExports.h
MITKRTUI_EXPORT
#define MITKRTUI_EXPORT
Definition: MitkRTUIExports.h:15
mitkIsoDoseLevelCollections.h
mitk::IsoDoseLevelSet
Stores values needed for the representation/visualization of dose iso levels.
Definition: mitkIsoDoseLevelCollections.h:41
QmitkIsoDoseLevelSetModel
Definition: QmitkIsoDoseLevelSetModel.h:30
QmitkIsoDoseLevelSetModel::~QmitkIsoDoseLevelSetModel
~QmitkIsoDoseLevelSetModel() override
Definition: QmitkIsoDoseLevelSetModel.h:36