| 220 | } |
| 221 | |
| 222 | void mitk::EditableContourTool::OnAddPoint(StateMachineAction*, InteractionEvent* interactionEvent) |
| 223 | { |
| 224 | auto positionEvent = dynamic_cast<mitk::InteractionPositionEvent*>(interactionEvent); |
| 225 | |
| 226 | if (nullptr == positionEvent) |
| 227 | return; |
| 228 | |
| 229 | if (m_PlaneGeometry.IsNotNull()) |
| 230 | { |
| 231 | // Check if the point is in the correct slice |
| 232 | if (m_PlaneGeometry->DistanceFromPlane(positionEvent->GetPositionInWorld()) > mitk::sqrteps) |
| 233 | return; |
| 234 | } |
| 235 | |
| 236 | this->FinalizePreviewContour(positionEvent->GetPositionInWorld()); |
| 237 | |
| 238 | // Merge contours |
| 239 | auto contour = this->GetContour(); |
| 240 | contour->Concatenate(m_PreviewContour); |
| 241 | |
| 242 | this->InitializePreviewContour(positionEvent->GetPositionInWorld()); |
| 243 | |
| 244 | mitk::RenderingManager::GetInstance()->RequestUpdate(positionEvent->GetSender()->GetRenderWindow()); |
| 245 | } |
| 246 | |
| 247 | void mitk::EditableContourTool::OnDrawing(StateMachineAction*, InteractionEvent* interactionEvent) |
| 248 | { |
nothing calls this directly
no test coverage detected