13 #ifndef QmitkIsoDoseLevelSetModel_h
14 #define QmitkIsoDoseLevelSetModel_h
16 #include <QAbstractTableModel>
66 Qt::ItemFlags
flags(
const QModelIndex &index)
const override;
74 QVariant
data(
const QModelIndex &index,
int role)
const override;
83 QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const override;
90 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
97 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
110 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole)
override;
192 mitk::IsoDoseLevelSet::Pointer m_DoseSet;
194 bool m_showAbsoluteDose;
195 bool m_visibilityEditOnly;
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).