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

Method OnMovePoint

Modules/Segmentation/src/Interactions/mitkContourModelInteractor.cpp:200–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200void mitk::ContourModelInteractor::OnMovePoint(StateMachineAction *, InteractionEvent *interactionEvent)
201{
202 const auto *positionEvent = dynamic_cast<const InteractionPositionEvent *>(interactionEvent);
203 if (!positionEvent)
204 return;
205
206 auto *contour = dynamic_cast<mitk::ContourModel *>(this->GetDataNode()->GetData());
207
208 mitk::Vector3D translation;
209 mitk::Point3D currentPosition = positionEvent->GetPositionInWorld();
210 translation[0] = currentPosition[0] - this->m_lastMousePosition[0];
211 translation[1] = currentPosition[1] - this->m_lastMousePosition[1];
212 translation[2] = currentPosition[2] - this->m_lastMousePosition[2];
213 contour->ShiftSelectedVertex(translation);
214
215 this->m_lastMousePosition = positionEvent->GetPositionInWorld();
216 mitk::RenderingManager::GetInstance()->RequestUpdate(positionEvent->GetSender()->GetRenderWindow());
217}
218
219void mitk::ContourModelInteractor::OnMoveContour(StateMachineAction *, InteractionEvent *interactionEvent)
220{

Callers

nothing calls this directly

Calls 7

GetPositionInWorldMethod · 0.80
ShiftSelectedVertexMethod · 0.80
GetSenderMethod · 0.80
GetDataMethod · 0.45
GetDataNodeMethod · 0.45
RequestUpdateMethod · 0.45
GetRenderWindowMethod · 0.45

Tested by

no test coverage detected