| 337 | } |
| 338 | |
| 339 | void QmitkMonaiLabelToolGUI::OnPreferenceChangedEvent(const mitk::IPreferences::ChangeEvent& event) |
| 340 | { |
| 341 | if (event.GetProperty().rfind("monai", 0) == 0) |
| 342 | { |
| 343 | bool allowAllModels = m_Preferences->GetBool("monailabel allow all models", false); |
| 344 | this->PopulateUI(allowAllModels); |
| 345 | auto tool = this->GetConnectedToolAs<mitk::MonaiLabelTool>(); |
| 346 | if (nullptr != tool) |
| 347 | { |
| 348 | auto timeout_sec = std::make_unsigned_t<int>(m_Preferences->GetInt("monailabel timeout", 180)); |
| 349 | tool->SetTimeout(timeout_sec); |
| 350 | } |
| 351 | } |
| 352 | } |
nothing calls this directly
no test coverage detected