25 : m_ActiveInteractionScheme(MITK), m_ActiveMouseMode(MousePointer), m_CurrentObserver(NULL)
27 this->InitializeListeners();
33 m_ServiceRegistration.Unregister();
36 void mitk::MouseModeSwitcher::InitializeListeners()
38 if (m_CurrentObserver.IsNull())
41 m_CurrentObserver->LoadStateMachine(
"DisplayInteraction.xml");
42 m_CurrentObserver->SetEventConfig(
"DisplayConfigMITK.xml");
45 props[
"name"] = std::string(
"DisplayInteractor");
46 m_ServiceRegistration =
57 m_CurrentObserver->SetEventConfig(
"DisplayConfigMITK.xml");
62 m_CurrentObserver->SetEventConfig(
"DisplayConfigPACS.xml");
68 m_CurrentObserver->SetEventConfig(
"DisplayConfigMITKRotationUnCoupled.xml");
74 m_CurrentObserver->SetEventConfig(
"DisplayConfigMITKRotation.xml");
80 m_CurrentObserver->SetEventConfig(
"DisplayConfigMITKSwivel.xml");
84 m_ActiveInteractionScheme = scheme;
85 this->InvokeEvent(MouseModeChangedEvent());
90 if (m_ActiveInteractionScheme != PACS)
97 m_CurrentObserver->SetEventConfig(
"DisplayConfigPACS.xml");
102 m_CurrentObserver->AddEventConfig(
"DisplayConfigPACSScroll.xml");
108 m_CurrentObserver->AddEventConfig(
"DisplayConfigPACSLevelWindow.xml");
113 m_CurrentObserver->AddEventConfig(
"DisplayConfigPACSZoom.xml");
118 m_CurrentObserver->AddEventConfig(
"DisplayConfigPACSPan.xml");
122 m_ActiveMouseMode = mode;
123 this->InvokeEvent(MouseModeChangedEvent());
128 return m_ActiveMouseMode;
Base class to implement InteractionEventObservers.
ServiceRegistrationU RegisterService(const InterfaceMap &service, const ServiceProperties &properties=ServiceProperties())
void SetInteractionScheme(InteractionScheme)
Setter for interaction scheme.
The LevelWindow class Class to store level/window values.
virtual ~MouseModeSwitcher()
MouseMode GetCurrentMouseMode() const
Returns the current mouse mode.
US_UNORDERED_MAP_TYPE< std::string, Any > ServiceProperties
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.
void SelectMouseMode(MouseMode mode)
Setter for mouse mode.