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

Method SetLockOfAffectedLabels

Modules/SegmentationUI/src/QmitkMultiLabelInspector.cpp:1604–1619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1602
1603
1604void QmitkMultiLabelInspector::SetLockOfAffectedLabels(bool locked) const
1605{
1606 auto relevantLabelValues = this->GetCurrentlyAffactedLabelInstances();
1607
1608 if (!relevantLabelValues.empty())
1609 {
1610 for (auto value : relevantLabelValues)
1611 {
1612 auto label = this->m_Segmentation->GetLabel(value);
1613 if (label.IsNull())
1614 mitkThrow() << "Invalid state. Internal model returned a label value that does not exist in segmentation. Invalid value:" << value;
1615 label->SetLocked(locked);
1616 }
1617 mitk::RenderingManager::GetInstance()->RequestUpdateAll();
1618 }
1619}
1620
1621void QmitkMultiLabelInspector::OnUnlockAffectedLabels()
1622{

Callers 2

OnLockAffectedLabelsMethod · 0.95

Calls 6

SetLockedMethod · 0.80
emptyMethod · 0.45
GetLabelMethod · 0.45
IsNullMethod · 0.45
RequestUpdateAllMethod · 0.45

Tested by

no test coverage detected