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

Method CheckOverObject

Modules/DataTypesExt/src/mitkAffineImageCropperInteractor.cpp:65–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65bool mitk::AffineImageCropperInteractor::CheckOverObject(const InteractionEvent *interactionEvent)
66{
67 mitk::DataNode::Pointer dn = this->GetDataNode();
68 if (dn.IsNull())
69 return false;
70 const auto *positionEvent = dynamic_cast<const InteractionPositionEvent *>(interactionEvent);
71 Point3D currentPickedPoint = positionEvent->GetPositionInWorld();
72 auto *object = dynamic_cast<mitk::BoundingObject *>(dn->GetData());
73 object->GetGeometry()->WorldToIndex(currentPickedPoint, currentPickedPoint);
74 return object && object->GetGeometry()->GetBoundingBox()->IsInside(currentPickedPoint);
75}
76
77void mitk::AffineImageCropperInteractor::SelectObject(StateMachineAction *, InteractionEvent *)
78{

Callers

nothing calls this directly

Calls 8

GetPositionInWorldMethod · 0.80
GetGeometryMethod · 0.80
GetDataNodeMethod · 0.45
IsNullMethod · 0.45
GetDataMethod · 0.45
WorldToIndexMethod · 0.45
IsInsideMethod · 0.45
GetBoundingBoxMethod · 0.45

Tested by

no test coverage detected