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

Method OnDisable

Modules/PythonSegmentation/src/mitknnInteractivePointInteractor.cpp:186–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186void mitk::nnInteractive::PointInteractor::OnDisable()
187{
188 // Disable interaction and detach the actual interactor.
189 m_Impl->Interactor->EnableInteraction(false);
190 m_Impl->Interactor->SetDataNode(nullptr);
191 m_Impl->Interactor->SetBounds(nullptr);
192
193 const auto promptType = this->GetCurrentPromptType();
194 auto pointSet = m_Impl->PointSetNodes.at(promptType)->GetDataAs<PointSet>();
195
196 if (pointSet->IsEmpty())
197 {
198 // If the point set is empty, destroy it.
199 m_Impl->DestroyPointSetNode(promptType);
200 }
201 else
202 {
203 // If the point set contains points, clear its selection to remove visual highlighting.
204 pointSet->ClearSelection();
205 }
206}
207
208void mitk::nnInteractive::PointInteractor::OnReset()
209{

Callers

nothing calls this directly

Calls 7

GetCurrentPromptTypeMethod · 0.80
atMethod · 0.80
DestroyPointSetNodeMethod · 0.80
ClearSelectionMethod · 0.80
SetDataNodeMethod · 0.45
SetBoundsMethod · 0.45
IsEmptyMethod · 0.45

Tested by

no test coverage detected