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

Method OnMouseMoved

Modules/Segmentation/src/Interactions/mitkLabelSelectionTool.cpp:98–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98void mitk::LabelSelectionTool::OnMouseMoved(StateMachineAction*, InteractionEvent* interactionEvent)
99{
100 auto* positionEvent = dynamic_cast<mitk::InteractionPositionEvent*>(interactionEvent);
101 if (!positionEvent)
102 return;
103
104 const auto segmentation = this->GetWorkingData();
105 auto point = positionEvent->GetPositionInWorld();
106 Point3D index;
107 segmentation->GetGeometry()->WorldToIndex(point, index);
108
109 if (index == m_LastCheckedIndex)
110 return;
111
112 m_LastCheckedIndex = index;
113 m_LastCheckedPoint = point;
114
115 this->UpdateLabels();
116}
117
118void mitk::LabelSelectionTool::OnMouseReleased(StateMachineAction*, InteractionEvent* interactionEvent)
119{

Callers

nothing calls this directly

Calls 5

UpdateLabelsMethod · 0.95
GetPositionInWorldMethod · 0.80
GetGeometryMethod · 0.80
GetWorkingDataMethod · 0.45
WorldToIndexMethod · 0.45

Tested by

no test coverage detected