MCPcopy Create free account
hub / github.com/MITK/MITK / index

Method index

Modules/SegmentationUI/src/QmitkMultiLabelTreeModel.cpp:577–592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

575}
576
577QModelIndex QmitkMultiLabelTreeModel::index(int row, int column, const QModelIndex &parent) const
578{
579 if (!hasIndex(row, column, parent))
580 return QModelIndex();
581
582 auto parentItem = m_RootItem.get();
583
584 if (parent.isValid())
585 parentItem = static_cast<QmitkMultiLabelSegTreeItem *>(parent.internalPointer());
586
587 QmitkMultiLabelSegTreeItem *childItem = parentItem->m_childItems[row];
588 if (childItem)
589 return createIndex(row, column, childItem);
590 else
591 return QModelIndex();
592}
593
594QModelIndex QmitkMultiLabelTreeModel::indexOfLabel(mitk::Label::PixelType labelValue) const
595{

Callers 4

GetIndexMethod · 0.45
GetIndexByItemFunction · 0.45
UpdateSelectionModelMethod · 0.45
OnSearchLabelMethod · 0.45

Calls 1

QModelIndexClass · 0.50

Tested by 3

GetIndexMethod · 0.36
UpdateSelectionModelMethod · 0.36
OnSearchLabelMethod · 0.36