Medical Imaging Interaction Toolkit  2025.12.02
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 
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;
50 
51  bool getVisibilityEditOnly() const;
52 
53  void switchVisibilityIsoLines(bool activate);
54  void switchVisibilityColorWash(bool activate);
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
#define MITKRTUI_EXPORT
int rowCount(const QModelIndex &parent=QModelIndex()) const override
bool getVisibilityEditOnly() const
void setReferenceDose(double newReferenceDose)
Slot that can be used to set the prescribed dose.
void setIsoDoseLevelSet(mitk::IsoDoseLevelSet *pSet)
bool getShowAbsoluteDose() const
QVariant data(const QModelIndex &index, int role) const override
void setShowAbsoluteDose(bool showAbsoluteDose)
Slot that can be used to adjust whether the dose should be displayed in absolute or relative units.
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
void switchVisibilityIsoLines(bool activate)
void switchVisibilityColorWash(bool activate)
QmitkIsoDoseLevelSetModel(QObject *parent=nullptr)
Qt::ItemFlags flags(const QModelIndex &index) const override
mitk::DoseValueAbs getReferenceDose() const
int columnCount(const QModelIndex &parent=QModelIndex()) const override
void setVisibilityEditOnly(bool onlyVisibility)
Slat that can be used to adjust whether the model allows to edit only visibilities (no dose value or ...
void deleteLevel(const QModelIndex &index)
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Stores values needed for the representation/visualization of dose iso levels.
double DoseValueAbs
Represents absolute dose values (in Gy).