Computer Assited Medical Intervention Tool Kit  version 4.1
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-2018 Univ. Grenoble Alpes, 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 
61  Q_OBJECT
62 
63 public:
71  VIEWER_ARBITRARY
72  };
73 
75  static MedicalImageViewer* getInstance();
76 
78  ~MedicalImageViewer() override;
79 
82  unsigned int numberOfViewedComponent() override;
85 
87  void refresh(Viewer* whoIsAsking = nullptr) override;
88 
90  QWidget* getWidget(QWidget* parent = nullptr) override;
91 
93  QObject* getPropertyObject() override;
94 
96  QMenu* getMenu() override;
97 
99  QToolBar* getToolBar() override;
100 
108  virtual void setToolbarAutoVisibility(bool);
110 
112  void setVisibleViewer(LayoutVisibility);
113 
114 public slots:
116  void synchronizeSelection();
117 
118 protected:
119 
122 
123 private:
125  void updateLayout();
126 
128  QGridLayout* frameLayout;
129 
131  QVBoxLayout* topLeftLayout;
132 
134  QFrame* frame;
135 
137  QMenu* viewerMenu;
138 
141 
143  QMap<LayoutVisibility, Viewer*> viewers;
144 
146  QList<LayoutVisibility> viewerVisibility;
147 
150 
153 
156 };
157 
158 }
159 
160 
161 #endif
162 
All InteractiveViewer are visible.
Definition: MedicalImageViewer.h:66
QFrame * frame
the main widget
Definition: MedicalImageViewer.h:134
Only the 3D InteractiveViewer are visible.
Definition: MedicalImageViewer.h:67
unsigned int displayedTopLevelComponents
number of top-level component that are currently displayed
Definition: MedicalImageViewer.h:149
bool autoUpdateToolbarVisibility
if true, the toolbar automatically updated
Definition: MedicalImageViewer.h:155
Viewer is an abstract viewer.
Definition: Viewer.h:55
LayoutVisibility visibleLayout
which viewer(s) is/are currently visible
Definition: MedicalImageViewer.h:140
QVBoxLayout * topLeftLayout
the layout for the arbitrary/axial at the top left position of frameLayout
Definition: MedicalImageViewer.h:131
Definition: Action.cpp:36
#define CAMITK_API
Definition: CamiTKAPI.h:49
QMap< LayoutVisibility, Viewer * > viewers
contains all InteractiveViewer instance (access them by LayoutVisibility)
Definition: MedicalImageViewer.h:143
static MedicalImageViewer * singleton
the default instance (singleton)
Definition: MedicalImageViewer.h:152
Only the sagittal InteractiveViewer are visible.
Definition: MedicalImageViewer.h:70
QList< LayoutVisibility > viewerVisibility
viewer visibility enum
Definition: MedicalImageViewer.h:146
QGridLayout * frameLayout
The main layout.
Definition: MedicalImageViewer.h:128
LayoutVisibility
describes the possible currently displayed InteractiveViewer
Definition: MedicalImageViewer.h:65
Only the coronal InteractiveViewer are visible.
Definition: MedicalImageViewer.h:69
The views manager.
Definition: MedicalImageViewer.h:60
Only the axial InteractiveViewer are visible.
Definition: MedicalImageViewer.h:68
QMenu * viewerMenu
the QMenu for the MedicalImageViewer
Definition: MedicalImageViewer.h:137