CTK 0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Loading...
Searching...
No Matches
ctkDICOMAppWidget.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Library: CTK
4
5 Copyright (c) Kitware Inc.
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0.txt
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18
19=========================================================================*/
20
21#ifndef __ctkDICOMAppWidget_h
22#define __ctkDICOMAppWidget_h
23
24// Qt includes
25#include <QWidget>
26
27#include "ctkDICOMWidgetsExport.h"
28
29class ctkDICOMAppWidgetPrivate;
31class QModelIndex;
33
35class CTK_DICOM_WIDGETS_EXPORT ctkDICOMAppWidget : public QWidget
36{
37 Q_OBJECT
38 Q_PROPERTY(ctkDICOMDatabase* database READ database)
39 Q_PROPERTY(QString databaseDirectory READ databaseDirectory WRITE setDatabaseDirectory)
40 Q_PROPERTY(bool searchWidgetPopUpMode READ searchWidgetPopUpMode WRITE setSearchWidgetPopUpMode)
41 Q_PROPERTY(QStringList tagsToPrecache READ tagsToPrecache WRITE setTagsToPrecache)
42 Q_PROPERTY(bool displayImportSummary READ displayImportSummary WRITE setDisplayImportSummary)
43
44public:
45 typedef QWidget Superclass;
46 explicit ctkDICOMAppWidget(QWidget* parent=0);
48
50 QString databaseDirectory() const;
51
56 void setTagsToPrecache(const QStringList tags);
57 const QStringList tagsToPrecache();
58
62 void updateDatabaseSchemaIfNeeded();
63
67 void setSearchWidgetPopUpMode(bool flag);
68 bool searchWidgetPopUpMode();
69 ctkDICOMDatabase* database();
70
74 void setDisplayImportSummary(bool);
75 bool displayImportSummary();
77 int patientsAddedDuringImport();
78 int studiesAddedDuringImport();
79 int seriesAddedDuringImport();
80 int instancesAddedDuringImport();
81
82public Q_SLOTS:
83 void setDatabaseDirectory(const QString& directory);
84 void onFileIndexed(const QString& filePath);
85
86 void openImportDialog();
87 void openExportDialog();
88 void openQueryDialog();
89 void onRemoveAction();
90
91 void suspendModel();
92 void resumeModel();
93 void resetModel();
94
98 void onImportDirectory(QString directory);
99
102 void onPatientAdded(int, QString, QString, QString);
103 void onStudyAdded(QString);
104 void onSeriesAdded(QString);
105 void onInstanceAdded(QString);
106
107Q_SIGNALS:
109 void databaseDirectoryChanged(const QString&);
111 void queryRetrieveFinished();
113 void directoryImported();
114
115protected:
116 QScopedPointer<ctkDICOMAppWidgetPrivate> d_ptr;
117protected Q_SLOTS:
118 void onModelSelected(const QModelIndex& index);
119
121 void onThumbnailSelected(const ctkThumbnailLabel& widget);
122
124 void onThumbnailDoubleClicked(const ctkThumbnailLabel& widget);
125
127 void onNextImage();
128 void onPreviousImage();
129 void onNextSeries();
130 void onPreviousSeries();
131 void onNextStudy();
132 void onPreviousStudy();
134 void onQueryRetrieveFinished();
135
137 void onTreeCollapsed(const QModelIndex& index);
138
140 void onTreeExpanded(const QModelIndex& index);
141
143 void onAutoPlayCheckboxStateChanged(int state);
144
146 void onAutoPlayTimer();
147
149 void onThumbnailWidthSliderValueChanged(int val);
150
152 void onSearchParameterChanged();
153
155 void onImagePreviewDisplayed(int imageID, int count);
156
157private Q_SLOTS:
158
159 void onSearchPopUpButtonClicked();
160
161 void onSearchWidgetTopLevelChanged(bool topLevel);
162
163private:
164 Q_DECLARE_PRIVATE(ctkDICOMAppWidget);
165 Q_DISABLE_COPY(ctkDICOMAppWidget);
166};
167
168#endif