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

Method OnEnable

Modules/PythonSegmentation/src/mitknnInteractiveScribbleInteractor.cpp:532–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

530}
531
532void mitk::nnInteractive::ScribbleInteractor::OnEnable()
533{
534 auto toolManager = this->GetToolManager();
535 auto referenceNode = toolManager->GetReferenceData(0);
536 if (referenceNode == nullptr)
537 return;
538
539 const auto promptType = this->GetCurrentPromptType();
540 const auto& color = GetColor(promptType, ColorIntensity::Vibrant);
541
542 m_Impl->Interactor->SetDataStorage(this->GetDataStorage());
543 m_Impl->Interactor->SetReferenceNode(referenceNode);
544 m_Impl->Interactor->SetReferenceImage(referenceNode->GetDataAs<Image>());
545 m_Impl->Interactor->SetBrushColor(color);
546 m_Impl->Interactor->SetBrushSize(3);
547}
548
549void mitk::nnInteractive::ScribbleInteractor::OnDisable()
550{

Callers

nothing calls this directly

Calls 9

GetCurrentPromptTypeMethod · 0.80
SetBrushColorMethod · 0.80
SetBrushSizeMethod · 0.80
GetToolManagerMethod · 0.45
GetReferenceDataMethod · 0.45
SetDataStorageMethod · 0.45
GetDataStorageMethod · 0.45
SetReferenceNodeMethod · 0.45
SetReferenceImageMethod · 0.45

Tested by

no test coverage detected