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

Method EnableInteractor

Modules/PythonSegmentation/src/mitknnInteractiveTool.cpp:306–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304}
305
306void mitk::nnInteractiveTool::EnableInteractor(InteractionType nextInteractionType, PromptType promptType)
307{
308 // Disable any other interactor if enabled.
309 for (const auto& [interactionType, interactor] : m_Impl->Interactors)
310 {
311 if (interactionType != nextInteractionType && interactor->IsEnabled())
312 {
313 this->DisableInteractor(interactionType);
314 break;
315 }
316 }
317
318 // Enable the requested interactor for the given prompt type.
319 m_Impl->Interactors[nextInteractionType]->Enable(promptType);
320 m_Impl->PromptType = promptType;
321}
322
323void mitk::nnInteractiveTool::DisableInteractor(std::optional<InteractionType> interactionType)
324{

Callers 2

OnPromptTypeChangedMethod · 0.80
OnInteractorToggledMethod · 0.80

Calls 3

DisableInteractorMethod · 0.95
IsEnabledMethod · 0.45
EnableMethod · 0.45

Tested by

no test coverage detected