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

Method ResetInteractions

Modules/PythonSegmentation/src/mitknnInteractiveTool.cpp:344–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344void mitk::nnInteractiveTool::ResetInteractions()
345{
346 for (auto& [interactionType, interactor] : m_Impl->Interactors)
347 interactor->Reset();
348
349 m_Impl->InitialSeg = nullptr;
350 m_Impl->ClearLastInteraction();
351
352 if (this->IsSessionRunning())
353 {
354 try
355 {
356 m_Impl->ResetInteractions();
357 }
358 catch (const Exception& e)
359 {
360 // The local prompts are already cleared above. If the remote reset failed
361 // because the connection is gone, there is nothing left to reset on the
362 // server; the loss is surfaced on the next interaction, or by the heartbeat
363 // timer if one is running.
364 if (!this->IsRemoteConnectionError(Description(e)))
365 throw;
366
367 MITK_WARN << "nnInteractive: could not reset interactions on the remote server (connection lost).";
368 }
369 }
370
371 this->UpdatePreview();
372}
373
374bool mitk::nnInteractiveTool::HasInteractions() const
375{

Callers 4

DeactivatedMethod · 0.95
AbortSessionMethod · 0.95
OnTimePointChangedMethod · 0.95

Calls 7

IsSessionRunningMethod · 0.95
DescriptionFunction · 0.85
ClearLastInteractionMethod · 0.80
UpdatePreviewMethod · 0.80
ExecuteSessionMethod · 0.80
ResetMethod · 0.45

Tested by

no test coverage detected