Computer Assited Medical Intervention Tool Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MedicalImageViewer.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2013 UJF-Grenoble 1, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 
26 
27 #ifndef MEDICAL_IMAGE_VIEWER_H
28 #define MEDICAL_IMAGE_VIEWER_H
29 
30 // -- Core stuff
31 #include "CamiTKAPI.h"
32 #include "Viewer.h"
33 
34 // -- QT stuff
35 #include <QFrame>
36 #include <QGridLayout>
37 #include <QAction>
38 #include <QBoxLayout>
39 
40 namespace camitk {
41 // -- Core stuff classes
42 class InteractiveViewer;
43 
56  Q_OBJECT
57 
58 public:
66  VIEWER_ARBITRARY
67  };
68 
70  static MedicalImageViewer* getInstance();
71 
73  virtual ~MedicalImageViewer();
74 
77 
78 
79  virtual unsigned int numberOfViewedComponent();
80 
82  virtual void refresh(Viewer *whoIsAsking = NULL);
83 
85  virtual QWidget * getWidget(QWidget * parent = NULL);
86 
88  virtual QObject * getPropertyObject();
89 
91  virtual QMenu * getMenu();
92 
94  virtual QToolBar * getToolBar();
96 
98  void setVisibleViewer(LayoutVisibility);
99 
100 public slots:
102  void synchronizeSelection();
103 
104 protected:
105 
108 
109 private:
111  void updateLayout();
112 
114  QGridLayout *frameLayout;
115 
117  QVBoxLayout *topLeftLayout;
118 
120  QFrame *frame;
121 
123  QMenu* viewerMenu;
124 
127 
129  QMap<LayoutVisibility,Viewer*> viewers;
130 
132  QList<LayoutVisibility> viewerVisibility;
133 
136 
139 };
140 
141 }
142 
143 
144 #endif
145