Computer Assisted Medical Intervention Tool Kit  version 5.1
 
Loading...
Searching...
No Matches
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-2023 Univ. Grenoble Alpes, CNRS, Grenoble INP, TIMC, 38000 Grenoble, France
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
31
32// -- Core stuff
33#include <Viewer.h>
34
35// -- QT stuff
36#include <QFrame>
37#include <QGridLayout>
38#include <QAction>
39#include <QBoxLayout>
40
60 Q_OBJECT
61
62public:
73
74 Q_INVOKABLE MedicalImageViewer(QString);
75
77 virtual ~MedicalImageViewer() override;
78
83 void refresh(Viewer* whoIsAsking = nullptr) override;
84
86 QWidget* getWidget() override;
87
89 QObject* getPropertyObject() override;
90
92 QMenu* getMenu() override;
93
95 QToolBar* getToolBar() override;
96
104 virtual void setToolbarAutoVisibility(bool);
106
108 void setVisibleViewer(LayoutVisibility);
109
111 LayoutVisibility getVisibleViewer() const;
112
113public slots:
115 void synchronizeSelection();
116
117private:
119 void updateLayout();
120
122 QGridLayout* frameLayout;
123
125 QVBoxLayout* northWestLayout;
126 QVBoxLayout* southWestLayout;
127 QVBoxLayout* northEastLayout;
128 QVBoxLayout* southEastLayout;
129
131 QFrame* frame;
132
134 QMenu* viewerMenu;
135
137 LayoutVisibility visibleLayout;
138
140 QMap<LayoutVisibility, Viewer*> viewers;
141
143 QList<LayoutVisibility> viewerVisibility;
144
146 unsigned int displayedTopLevelComponents;
147
149 bool autoUpdateToolbarVisibility;
150};
151
152Q_DECLARE_METATYPE(MedicalImageViewer::LayoutVisibility)
153
154#endif
155
#define MEDICALIMAGEVIEWER_API
Definition MedicalImageViewerAPI.h:54
All-in-one medical image viewer.
Definition MedicalImageViewer.h:59
Q_ENUM(LayoutVisibility)
LayoutVisibility
describes the possible currently displayed InteractiveViewer
Definition MedicalImageViewer.h:64
@ VIEWER_3D
Only the 3D InteractiveViewer are visible.
Definition MedicalImageViewer.h:66
@ VIEWER_CORONAL
Only the coronal InteractiveViewer are visible.
Definition MedicalImageViewer.h:68
@ VIEWER_SAGITTAL
Only the sagittal InteractiveViewer are visible.
Definition MedicalImageViewer.h:69
@ VIEWER_AXIAL
Only the axial InteractiveViewer are visible.
Definition MedicalImageViewer.h:67
@ VIEWER_ALL
All InteractiveViewer are visible.
Definition MedicalImageViewer.h:65
Viewer is an abstract class that is the base class for all viewers.
Definition Viewer.h:180
virtual QToolBar * getToolBar()
get the viewer toolbar (returns nullptr by default, i.e. there are no default toolbar)
Definition Viewer.h:250
virtual QWidget * getWidget()=0
get the viewer widget.
virtual QObject * getPropertyObject()
get the viewer property object (returns nullptr by default, i.e. there are no property to edit)
Definition Viewer.h:240
virtual QMenu * getMenu()
get the viewer menu (returns nullptr by default, i.e. there are no default edit menu)
Definition Viewer.h:245
void refresh()
refresh the display