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

Method OnMouseMoved

Modules/Segmentation/src/Interactions/mitkEditableContourTool.cpp:286–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286void mitk::EditableContourTool::OnMouseMoved(StateMachineAction*, InteractionEvent* interactionEvent)
287{
288 auto positionEvent = dynamic_cast<mitk::InteractionPositionEvent*>(interactionEvent);
289
290 if (nullptr == positionEvent)
291 return;
292
293 if (m_PlaneGeometry.IsNotNull())
294 {
295 // Check if the point is in the correct slice
296 if (m_PlaneGeometry->DistanceFromPlane(positionEvent->GetPositionInWorld()) > mitk::sqrteps)
297 return;
298 }
299
300 this->UpdatePreviewContour(positionEvent->GetPositionInWorld());
301
302 auto endPoint = m_PreviewContour->GetNumberOfVertices()==0 ? positionEvent->GetPositionInWorld() : m_PreviewContour->GetVertexAt(m_PreviewContour->GetNumberOfVertices() - 1)->Coordinates;
303 this->UpdateClosureContour(endPoint);
304
305 RenderingManager::GetInstance()->RequestUpdate(positionEvent->GetSender()->GetRenderWindow());
306}
307
308void mitk::EditableContourTool::OnFinish(StateMachineAction *, InteractionEvent *interactionEvent)
309{

Callers

nothing calls this directly

Calls 10

UpdatePreviewContourMethod · 0.95
UpdateClosureContourMethod · 0.95
IsNotNullMethod · 0.80
DistanceFromPlaneMethod · 0.80
GetPositionInWorldMethod · 0.80
GetNumberOfVerticesMethod · 0.80
GetSenderMethod · 0.80
GetVertexAtMethod · 0.45
RequestUpdateMethod · 0.45
GetRenderWindowMethod · 0.45

Tested by

no test coverage detected