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

Method OnAddLabelInstance

Modules/SegmentationUI/src/QmitkMultiLabelInspector.cpp:1466–1483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1464}
1465
1466void QmitkMultiLabelInspector::OnAddLabelInstance()
1467{
1468 auto currentLabel = this->GetCurrentLabel();
1469 if (nullptr == currentLabel)
1470 return;
1471
1472 this->AddNewLabelInstanceInternal(currentLabel);
1473
1474 // this is needed as workaround for (T27307). It circumvents the fact that modifications
1475 // of data (here the segmentation) does not directly trigger the modification of the
1476 // owning node (see T27307). Therefore other code (like renderers or model views) that e.g.
1477 // listens to the datastorage for modification would not get notified.
1478 if (m_SegmentationNode.IsNotNull())
1479 {
1480 m_SegmentationNode->Modified();
1481 mitk::RenderingManager::GetInstance()->RequestUpdateAll();
1482 }
1483}
1484
1485void QmitkMultiLabelInspector::OnClearLabel(bool /*value*/)
1486{

Callers

nothing calls this directly

Calls 5

GetCurrentLabelMethod · 0.95
IsNotNullMethod · 0.80
ModifiedMethod · 0.45
RequestUpdateAllMethod · 0.45

Tested by

no test coverage detected