| 701 | //////////////////////////////////////////////////////////////////////////////// |
| 702 | |
| 703 | bool mitk::nnInteractiveTool::IsInstalled() const |
| 704 | { |
| 705 | std::ostringstream pyCommands; pyCommands |
| 706 | << "import importlib.util\n" |
| 707 | << "is_installed = importlib.util.find_spec('nnInteractive') is not None\n"; |
| 708 | |
| 709 | auto pythonContext = m_Impl->GetPythonContext(); |
| 710 | pythonContext->Execute(pyCommands.str()); |
| 711 | |
| 712 | return pythonContext->GetVariableAsBool("is_installed").value_or(false); |
| 713 | } |
| 714 | |
| 715 | bool mitk::nnInteractiveTool::IsLocalInferenceAvailable() const |
| 716 | { |
no test coverage detected