| 62 | } |
| 63 | |
| 64 | void mitk::Tool::InitializeStateMachine() |
| 65 | { |
| 66 | if (m_InteractorType.empty()) |
| 67 | return; |
| 68 | |
| 69 | try |
| 70 | { |
| 71 | auto isThisModule = nullptr == m_InteractorModule; |
| 72 | |
| 73 | auto module = isThisModule |
| 74 | ? us::GetModuleContext()->GetModule() |
| 75 | : m_InteractorModule; |
| 76 | |
| 77 | LoadStateMachine(m_InteractorType + ".xml", module); |
| 78 | SetEventConfig(isThisModule ? "SegmentationToolsConfig.xml" : m_InteractorType + "Config.xml", module); |
| 79 | } |
| 80 | catch (const std::exception &e) |
| 81 | { |
| 82 | MITK_ERROR << "Could not load statemachine pattern " << m_InteractorType << ".xml with exception: " << e.what(); |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | void mitk::Tool::Notify(InteractionEvent *interactionEvent, bool isHandled) |
| 87 | { |
no test coverage detected