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

Method KeyDelete

Modules/Core/src/Interactions/mitkPointSetDataInteractor.cpp:420–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418}
419
420void mitk::PointSetDataInteractor::KeyDelete(StateMachineAction*, InteractionEvent* interactionEvent)
421{
422 auto renderer = interactionEvent->GetSender();
423 auto t = renderer->GetTimeStep(m_PointSet);
424 auto id = m_PointSet->SearchSelectedPoint(t);
425
426 if (id == -1)
427 return;
428
429 auto point = m_PointSet->GetPoint(id, t);
430 Point2D displayPoint;
431 renderer->WorldToDisplay(point, displayPoint);
432
433 auto event = InteractionPositionEvent::New(nullptr, displayPoint);
434 event->SetSender(renderer);
435
436 this->RemovePoint(nullptr, event.GetPointer());
437}
438
439/*
440 * Check whether the DataNode contains a pointset, if not create one and add it.

Callers

nothing calls this directly

Calls 9

RemovePointMethod · 0.95
GetSenderMethod · 0.80
SearchSelectedPointMethod · 0.80
WorldToDisplayMethod · 0.80
SetSenderMethod · 0.80
GetPointerMethod · 0.80
NewFunction · 0.50
GetTimeStepMethod · 0.45
GetPointMethod · 0.45

Tested by

no test coverage detected