Medical Imaging Interaction Toolkit  2026.06.00
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 
41 class MITKRTUI_EXPORT QmitkIsoDoseLevelSetModel : public QAbstractTableModel
42 {
43  Q_OBJECT
44 
45 public:
50  explicit QmitkIsoDoseLevelSetModel(QObject *parent = nullptr);
51 
54 
60 
66  Qt::ItemFlags flags(const QModelIndex &index) const override;
67 
74  QVariant data(const QModelIndex &index, int role) const override;
75 
83  QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
84 
90  int rowCount(const QModelIndex &parent = QModelIndex()) const override;
91 
97  int columnCount(const QModelIndex &parent = QModelIndex()) const override;
98 
110  bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
111 
116  bool getShowAbsoluteDose() const;
117 
123 
128  bool getVisibilityEditOnly() const;
129 
134  void switchVisibilityIsoLines(bool activate);
135 
140  void switchVisibilityColorWash(bool activate);
141 
144 
147 
150 
157  void addLevel();
158 
163  void deleteLevel(const QModelIndex &index);
164 
169  bool isModified();
170 
171  public Q_SLOTS:
177  void setReferenceDose(double newReferenceDose);
178 
183  void setShowAbsoluteDose(bool showAbsoluteDose);
184 
189  void setVisibilityEditOnly(bool onlyVisibility);
190 
191 private:
192  mitk::IsoDoseLevelSet::Pointer m_DoseSet;
193 
194  bool m_showAbsoluteDose;
195  bool m_visibilityEditOnly;
196 
197  mitk::DoseValueAbs m_referenceDose;
198 
200  bool m_modified;
201 
202 };
203 
204 #endif
#define MITKRTUI_EXPORT
Table model for viewing and editing the contents of an mitk::IsoDoseLevelSet.
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of iso dose levels in the set.
bool isModified()
Checks whether the model content has been modified since the last setIsoDoseLevelSet() call.
bool getVisibilityEditOnly() const
Returns whether the model allows editing only visibility columns.
~QmitkIsoDoseLevelSetModel() override
Destructor.
void setReferenceDose(double newReferenceDose)
Sets the reference dose used for absolute/relative conversion.
void setIsoDoseLevelSet(mitk::IsoDoseLevelSet *pSet)
Sets the iso dose level set managed by this model and resets the modified flag.
void swapVisibility()
Swaps the iso line and color wash visibility for all levels.
void addLevel()
Adds a new iso dose level at the end of the set.
bool getShowAbsoluteDose() const
Returns whether dose values are displayed as absolute values.
QVariant data(const QModelIndex &index, int role) const override
Returns data for the given index and role.
void setShowAbsoluteDose(bool showAbsoluteDose)
Sets whether dose values should be displayed as absolute (Gy) or relative (%).
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Sets data at the given index for the given role.
void invertVisibilityColorWash()
Inverts the color wash visibility of all levels.
void switchVisibilityIsoLines(bool activate)
Sets the iso line visibility for all levels.
void switchVisibilityColorWash(bool activate)
Sets the color wash visibility for all levels.
QmitkIsoDoseLevelSetModel(QObject *parent=nullptr)
Constructor.
Qt::ItemFlags flags(const QModelIndex &index) const override
Returns item flags for the given index.
void invertVisibilityIsoLines()
Inverts the iso line visibility of all levels.
mitk::DoseValueAbs getReferenceDose() const
Returns the current reference dose.
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of columns (always 4).
void setVisibilityEditOnly(bool onlyVisibility)
Sets whether the model allows editing only the visibility columns.
void deleteLevel(const QModelIndex &index)
Deletes the iso dose level at the given model index.
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Returns header data for the given section, orientation, and role.
Sorted set of dose iso levels for dose distribution visualization.
double DoseValueAbs
Represents absolute dose values in Gray (Gy).