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

Method OnCheckPlane

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

Source from the content-addressed store, hash-verified

341}
342
343bool mitk::EditableContourTool::OnCheckPlane(const InteractionEvent* interactionEvent)
344{
345 auto positionEvent = dynamic_cast<const mitk::InteractionPositionEvent*>(interactionEvent);
346
347 if (nullptr == positionEvent)
348 return false;
349
350 if (m_PlaneGeometry.IsNotNull())
351 {
352 // Check if the point is in the correct slice
353 if (m_PlaneGeometry->DistanceFromPlane(positionEvent->GetPositionInWorld()) > mitk::sqrteps)
354 return false;
355 }
356
357 return true;
358}
359
360bool mitk::EditableContourTool::OnCheckDistanceToControlPoint(const InteractionEvent* interactionEvent)
361{

Callers

nothing calls this directly

Calls 3

IsNotNullMethod · 0.80
DistanceFromPlaneMethod · 0.80
GetPositionInWorldMethod · 0.80

Tested by

no test coverage detected