Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkSliceNavigationListener.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 
18 #ifndef __Q_MITK_SLICE_NAVIGATION_LISTENER_H
19 #define __Q_MITK_SLICE_NAVIGATION_LISTENER_H
20 
21 #include <itkEventObject.h>
22 
23 #include <QObject>
24 
26 
27 namespace itk
28 {
29  class Object;
30 }
31 
32 namespace mitk
33 {
34  class SliceNavigationController;
35  struct IRenderWindowPart;
36 }
37 
38 
65  {
66  Q_OBJECT
67 
68  public:
71 
72  signals:
73  void SliceChanged();
74 
75  public slots:
76  void RenderWindowPartActivated(mitk::IRenderWindowPart* renderWindowPart);
77  void RenderWindowPartDeactivated(mitk::IRenderWindowPart* renderWindowPart);
78 
79  protected slots:
81  void OnSliceChangedDelayed();
82 
83  protected:
84 
86  void OnSliceChangedInternal(const itk::EventObject& e);
87 
88  void OnSliceNavigationControllerDeleted(const itk::Object* sender, const itk::EventObject& /*e*/);
89 
92  bool InitObservers();
93  void RemoveObservers(const mitk::SliceNavigationController* deletedSlicer);
95  void RemoveAllObservers(mitk::IRenderWindowPart* deletedPart = NULL);
96 
98 
99  // Needed for observing the events for when a slice or time step is changed.
101 
104  {
107  std::string renderWindowName;
109 
110  ObserverInfo(mitk::SliceNavigationController* controller, int observerTag,
111  const std::string& renderWindowName, mitk::IRenderWindowPart* part);
112  };
113 
114  typedef std::multimap<const mitk::SliceNavigationController*, ObserverInfo> ObserverMapType;
115  ObserverMapType m_ObserverMap;
116 
119  };
120 
121 #endif
122 
Interface for a MITK Workbench Part providing a render window.
DataCollection - Class to facilitate loading/accessing structured data.
Controls the selection of the slice the associated BaseRenderer will display.
Helper class to allow QmitkAbstractView and derived classes to react on changes of the slice/time nav...
mitk::IRenderWindowPart * m_renderWindowPart
std::multimap< const mitk::SliceNavigationController *, ObserverInfo > ObserverMapType
#define MITK_QT_COMMON
bool m_internalUpdateFlag
Is a visualization currently running?