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

Method SetCurrentContourListID

Modules/SegmentationUI/src/QmitkSlicesInterpolator.cpp:1476–1505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1474}
1475
1476void QmitkSlicesInterpolator::SetCurrentContourListID()
1477{
1478 // New ContourList = hide current interpolation
1479 Show3DInterpolationResult(false);
1480
1481 if (m_DataStorage.IsNotNull() && m_ToolManager && m_LastSNC)
1482 {
1483 mitk::DataNode *workingNode = m_ToolManager->GetWorkingData(0);
1484
1485 if (workingNode)
1486 {
1487 QWidget::setEnabled(true);
1488
1489 if (!workingNode->GetData()->GetTimeGeometry()->IsValidTimePoint(m_TimePoint))
1490 {
1491 MITK_WARN << "Cannot accept interpolation. Time point selected by SliceNavigationController is not within the time bounds of WorkingImage. Time point: " << m_TimePoint;
1492 return;
1493 }
1494
1495 m_SurfaceInterpolator->SetDistanceImageVolume(50000);
1496
1497 auto segmentationImage = dynamic_cast<mitk::MultiLabelSegmentation *>(workingNode->GetData());
1498 m_SurfaceInterpolator->SetCurrentInterpolationSession(segmentationImage);
1499 }
1500 else
1501 {
1502 QWidget::setEnabled(false);
1503 }
1504 }
1505}
1506
1507void QmitkSlicesInterpolator::Show3DInterpolationResult(bool status)
1508{

Callers 1

Calls 6

IsNotNullMethod · 0.80
GetWorkingDataMethod · 0.45
IsValidTimePointMethod · 0.45
GetDataMethod · 0.45

Tested by

no test coverage detected