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

Method PrepareGoToLabel

Modules/SegmentationUI/src/QmitkMultiLabelInspector.cpp:1700–1716  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1698}
1699
1700void QmitkMultiLabelInspector::PrepareGoToLabel(mitk::Label::PixelType labelID) const
1701{
1702 const auto currentLabel = m_Segmentation->GetLabel(labelID);
1703 if (currentLabel.IsNull())
1704 return;
1705
1706 this->WaitCursorOn();
1707 m_Segmentation->UpdateCenterOfMass(labelID);
1708 this->WaitCursorOff();
1709
1710 const auto pos = currentLabel->GetCenterOfMassIndex();
1711
1712 if (pos.GetVnlVector().max_value() > 0.0)
1713 {
1714 emit GoToLabel(currentLabel->GetValue(), currentLabel->GetCenterOfMassCoordinates());
1715 }
1716}
1717
1718void QmitkMultiLabelInspector::OnEntered(const QModelIndex& index)
1719{

Callers 3

OnItemDoubleClickedMethod · 0.95
OnSearchLabelMethod · 0.95

Calls 8

WaitCursorOnMethod · 0.95
WaitCursorOffMethod · 0.95
GetCenterOfMassIndexMethod · 0.80
GetLabelMethod · 0.45
IsNullMethod · 0.45
UpdateCenterOfMassMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected