| 131 | } |
| 132 | |
| 133 | void mitk::MonaiLabelTool::OnAddNegativePoint(StateMachineAction *, InteractionEvent *interactionEvent) |
| 134 | { |
| 135 | if (nullptr == m_RequestParameters || "deepgrow" != m_RequestParameters->model.type) |
| 136 | { |
| 137 | return; |
| 138 | } |
| 139 | if (m_RequestParameters->model.Is2D() && (m_PointSetPositive->GetSize() == 0 || |
| 140 | nullptr == this->GetWorkingPlaneGeometry() || |
| 141 | !mitk::Equal(*(interactionEvent->GetSender()->GetCurrentWorldPlaneGeometry()), |
| 142 | *(this->GetWorkingPlaneGeometry())))) |
| 143 | { |
| 144 | return; |
| 145 | } |
| 146 | if (!this->IsUpdating() && m_PointSetNegative.IsNotNull()) |
| 147 | { |
| 148 | const auto positionEvent = dynamic_cast<mitk::InteractionPositionEvent *>(interactionEvent); |
| 149 | if (positionEvent != nullptr) |
| 150 | { |
| 151 | m_PointSetNegative->InsertPoint(m_PointSetCount, positionEvent->GetPositionInWorld()); |
| 152 | m_PointSetCount++; |
| 153 | this->UpdatePreview(); |
| 154 | } |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | void mitk::MonaiLabelTool::OnDelete(StateMachineAction *, InteractionEvent *) |
| 159 | { |
nothing calls this directly
no test coverage detected