| 284 | } |
| 285 | |
| 286 | void 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 | |
| 308 | void mitk::EditableContourTool::OnFinish(StateMachineAction *, InteractionEvent *interactionEvent) |
| 309 | { |
nothing calls this directly
no test coverage detected