Computer Assited Medical Intervention Tool Kit  version 3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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  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();
95 
103  virtual void setToolbarAutoVisibility(bool);
105 
107  void setVisibleViewer(LayoutVisibility);
108 
109 public slots:
111  void synchronizeSelection();
112 
113 protected:
114 
117 
118 private:
120  void updateLayout();
121 
123  QGridLayout *frameLayout;
124 
126  QVBoxLayout *topLeftLayout;
127 
129  QFrame *frame;
130 
132  QMenu* viewerMenu;
133 
136 
138  QMap<LayoutVisibility,Viewer*> viewers;
139 
141  QList<LayoutVisibility> viewerVisibility;
142 
145 
148 
151 };
152 
153 }
154 
155 
156 #endif
157