Computer Assisted Medical Intervention Tool Kit version 6.0
 
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-2025 Univ. Grenoble Alpes, CNRS, Grenoble INP - UGA, 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
90
92 QMenu* getMenu() override;
93
95 QToolBar* getToolBar() override;
96
110 void setToolBarVisibility(bool) override;
112
114 void setVisibleViewer(LayoutVisibility);
115
117 LayoutVisibility getVisibleViewer() const;
118
119public slots:
121 void synchronizeSelection();
122
123private:
125 void updateLayout();
126
128 QGridLayout* frameLayout;
129
131 QVBoxLayout* northWestLayout;
132 QVBoxLayout* southWestLayout;
133 QVBoxLayout* northEastLayout;
134 QVBoxLayout* southEastLayout;
135
137 QFrame* frame;
138
140 QMenu* viewerMenu;
141
143 LayoutVisibility visibleLayout;
144
146 QMap<LayoutVisibility, Viewer*> viewers;
147
149 QList<LayoutVisibility> viewerVisibility;
150
152 unsigned int displayedTopLevelComponents;
153
155 bool autoUpdateToolbarVisibility;
156};
157
158Q_DECLARE_METATYPE(MedicalImageViewer::LayoutVisibility)
159
160#endif
161
#define MEDICALIMAGEVIEWER_API
Definition MedicalImageViewerAPI.h:53
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
Definition PersistenceManager.h:30
This class describes a property object.
Definition PropertyObject.h:72
Viewer is an abstract class that is the base class for all viewers.
Definition Viewer.h:182
virtual QToolBar * getToolBar()
get the viewer toolbar (returns nullptr by default, i.e. there are no default toolbar)
Definition Viewer.h:271
virtual PropertyObject * getPropertyObject()
get the viewer property object (returns nullptr by default, i.e. there are no property to edit)
Definition Viewer.h:261
virtual QWidget * getWidget()=0
get the viewer widget.
virtual void setToolBarVisibility(bool)
set the visibility of the toolbar in the main window (true by default).
Definition Viewer.cpp:107
virtual void refresh(Viewer *whoIsAsking=nullptr)=0
refresh the view (can be interesting to know which other viewer is calling this)
virtual QMenu * getMenu()
get the viewer menu (returns nullptr by default, i.e. there are no default edit menu)
Definition Viewer.h:266