#include <QmitkMultiLabelTreeModel.h>
The class is used to represent the information of an MITK MultiLabel segmentation instance (labels, spatial groups...).
Definition at line 32 of file QmitkMultiLabelTreeModel.h.
◆ GroupIndexType
◆ LabelValueType
◆ ItemModelRole
Enumerator |
---|
LabelDataRole | This role returns the label object that is associated with an index.
- On group level it always returns an invalid QVariant
- On label level (with multiple instances) it returns the first label instance).
- On instance level it returns the label instance object.
|
LabelValueRole | This role returns only the label value of the label that would be returned by LabelDataRole.
|
LabelInstanceDataRole | Simelar to LabelDataRole, but only returns a valid QVariant if index points only to a specific instance (so either instance level or label level with only one instance). You can use that role if you want to assure that only one specific label instance is referenced by the index.
|
LabelInstanceValueRole | Simelar to LabelValueRole, but like LabelInstanceDataRole only returns a valid QVariant if index points only to a specific instance (so either instance level or label level with only one instance). You can use that role if you want to assure that only one specific label instance is referenced by the index.
|
GroupIDRole | This role returns the group ID the item/index belongs to.
|
Definition at line 92 of file QmitkMultiLabelTreeModel.h.
◆ TableColumns
◆ QmitkMultiLabelTreeModel()
QmitkMultiLabelTreeModel::QmitkMultiLabelTreeModel |
( |
QObject * |
parent = nullptr | ) |
|
◆ ~QmitkMultiLabelTreeModel()
QmitkMultiLabelTreeModel::~QmitkMultiLabelTreeModel |
( |
| ) |
|
|
override |
◆ ClosestLabelInstanceIndex()
QModelIndex QmitkMultiLabelTreeModel::ClosestLabelInstanceIndex |
( |
const QModelIndex & |
currentIndex | ) |
const |
Returns the index to the next node in the tree that behaves like an instance (label node with only one instance or instance node). If current index is at the end, an invalid index is returned.
◆ columnCount()
int QmitkMultiLabelTreeModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
◆ data()
QVariant QmitkMultiLabelTreeModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
◆ dataAvailable
void QmitkMultiLabelTreeModel::dataAvailable |
( |
| ) |
|
|
signal |
◆ FirstLabelInstanceIndex()
QModelIndex QmitkMultiLabelTreeModel::FirstLabelInstanceIndex |
( |
const QModelIndex & |
currentIndex | ) |
const |
Returns the index to the first child node (or itself) in the tree that behaves like an instance (label node with only one instance or instance node). If current index is at the end, an invalid index is returned. If an invalid index is passed into the methods, the search starts at the root; thus the whole tree is search for the first label instance.
◆ flags()
Qt::ItemFlags QmitkMultiLabelTreeModel::flags |
( |
const QModelIndex & |
index | ) |
const |
|
override |
◆ GetAllowLockModification()
bool QmitkMultiLabelTreeModel::GetAllowLockModification |
( |
| ) |
const |
◆ GetAllowVisibilityModification()
bool QmitkMultiLabelTreeModel::GetAllowVisibilityModification |
( |
| ) |
const |
◆ GetLabelInstancesOfSameLabelClass()
std::vector<LabelValueType> QmitkMultiLabelTreeModel::GetLabelInstancesOfSameLabelClass |
( |
const QModelIndex & |
currentIndex | ) |
const |
Returns a vector containing all label values of all label instances that belong to the same label class like the passed index.
If index points to a group or invalid, nothing will be returned.
- Precondition
- currentIndex must be valid and point to a label (class or instance).
◆ GetLabelsInSubTree()
std::vector<LabelValueType> QmitkMultiLabelTreeModel::GetLabelsInSubTree |
( |
const QModelIndex & |
currentIndex | ) |
const |
** Returns the index to the next node in the tree that behaves like an instance (label node with only one instance
Returns a vector containing all label values of the passed currentIndex or its child items.
◆ GetSegmentation()
◆ headerData()
QVariant QmitkMultiLabelTreeModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role |
|
) |
| const |
|
override |
◆ index()
QModelIndex QmitkMultiLabelTreeModel::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| const |
|
override |
◆ indexOfGroup()
◆ indexOfLabel()
returns the index of a passed label value (always first column). If label value does not exist in segmentation or segmentation is not set an invalid index will be returned.
◆ ITKEventHandler()
void QmitkMultiLabelTreeModel::ITKEventHandler |
( |
const itk::EventObject & |
e | ) |
|
|
protected |
◆ modelChanged
void QmitkMultiLabelTreeModel::modelChanged |
( |
| ) |
|
|
signal |
Is emitted whenever the model changes are finished (usually a bit later than dataAvailable()).
◆ OnGroupAdded()
void QmitkMultiLabelTreeModel::OnGroupAdded |
( |
GroupIndexType |
groupIndex | ) |
|
|
protected |
◆ OnGroupModified()
void QmitkMultiLabelTreeModel::OnGroupModified |
( |
GroupIndexType |
groupIndex | ) |
|
|
protected |
◆ OnGroupRemoved()
void QmitkMultiLabelTreeModel::OnGroupRemoved |
( |
GroupIndexType |
groupIndex | ) |
|
|
protected |
◆ OnLabelAdded()
void QmitkMultiLabelTreeModel::OnLabelAdded |
( |
LabelValueType |
labelValue | ) |
|
|
protected |
◆ OnLabelModified()
void QmitkMultiLabelTreeModel::OnLabelModified |
( |
LabelValueType |
labelValue | ) |
|
|
protected |
◆ OnLabelRemoved()
void QmitkMultiLabelTreeModel::OnLabelRemoved |
( |
LabelValueType |
labelValue | ) |
|
|
protected |
◆ parent()
QModelIndex QmitkMultiLabelTreeModel::parent |
( |
const QModelIndex & |
child | ) |
const |
|
override |
◆ rowCount()
int QmitkMultiLabelTreeModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
◆ SetAllowLockModification
void QmitkMultiLabelTreeModel::SetAllowLockModification |
( |
bool |
lmod | ) |
|
|
slot |
◆ SetAllowVisibilityModification
void QmitkMultiLabelTreeModel::SetAllowVisibilityModification |
( |
bool |
vmod | ) |
|
|
slot |
◆ setData()
bool QmitkMultiLabelTreeModel::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
|
override |
◆ SetSegmentation()
The documentation for this class was generated from the following file: