| 104 | } |
| 105 | |
| 106 | void mitk::MonaiLabelTool::OnAddPositivePoint(StateMachineAction *, InteractionEvent *interactionEvent) |
| 107 | { |
| 108 | if (nullptr == m_RequestParameters || !m_RequestParameters->model.IsInteractive()) |
| 109 | { |
| 110 | return; |
| 111 | } |
| 112 | |
| 113 | if (m_RequestParameters->model.Is2D() && ((nullptr == this->GetWorkingPlaneGeometry()) || |
| 114 | !mitk::Equal(*(interactionEvent->GetSender()->GetCurrentWorldPlaneGeometry()), |
| 115 | *(this->GetWorkingPlaneGeometry())))) |
| 116 | { |
| 117 | this->ClearSeeds(); |
| 118 | this->SetWorkingPlaneGeometry(interactionEvent->GetSender()->GetCurrentWorldPlaneGeometry()->Clone()); |
| 119 | this->ResetPreviewContent(); |
| 120 | } |
| 121 | if (!this->IsUpdating() && m_PointSetPositive.IsNotNull()) |
| 122 | { |
| 123 | const auto positionEvent = dynamic_cast<mitk::InteractionPositionEvent *>(interactionEvent); |
| 124 | if (positionEvent != nullptr) |
| 125 | { |
| 126 | m_PointSetPositive->InsertPoint(m_PointSetCount, positionEvent->GetPositionInWorld()); |
| 127 | ++m_PointSetCount; |
| 128 | this->UpdatePreview(); |
| 129 | } |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | void mitk::MonaiLabelTool::OnAddNegativePoint(StateMachineAction *, InteractionEvent *interactionEvent) |
| 134 | { |
nothing calls this directly
no test coverage detected