| 184 | } |
| 185 | |
| 186 | void mitk::nnInteractive::PointInteractor::OnDisable() |
| 187 | { |
| 188 | // Disable interaction and detach the actual interactor. |
| 189 | m_Impl->Interactor->EnableInteraction(false); |
| 190 | m_Impl->Interactor->SetDataNode(nullptr); |
| 191 | m_Impl->Interactor->SetBounds(nullptr); |
| 192 | |
| 193 | const auto promptType = this->GetCurrentPromptType(); |
| 194 | auto pointSet = m_Impl->PointSetNodes.at(promptType)->GetDataAs<PointSet>(); |
| 195 | |
| 196 | if (pointSet->IsEmpty()) |
| 197 | { |
| 198 | // If the point set is empty, destroy it. |
| 199 | m_Impl->DestroyPointSetNode(promptType); |
| 200 | } |
| 201 | else |
| 202 | { |
| 203 | // If the point set contains points, clear its selection to remove visual highlighting. |
| 204 | pointSet->ClearSelection(); |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | void mitk::nnInteractive::PointInteractor::OnReset() |
| 209 | { |
nothing calls this directly
no test coverage detected