CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
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 
29 class ctkDICOMAppWidgetPrivate;
30 class ctkThumbnailLabel;
31 class QModelIndex;
32 class ctkDICOMDatabase;
33 
35 class 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 
44 public:
45  typedef QWidget Superclass;
46  explicit ctkDICOMAppWidget(QWidget* parent=0);
47  virtual ~ctkDICOMAppWidget();
48 
50  QString databaseDirectory() const;
51 
56  void setTagsToPrecache(const QStringList tags);
57  const QStringList tagsToPrecache();
58 
63 
67  void setSearchWidgetPopUpMode(bool flag);
70 
81 
82 public Q_SLOTS:
83  void setDatabaseDirectory(const QString& directory);
84  void onFileIndexed(const QString& filePath);
85 
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 
107 Q_SIGNALS:
109  void databaseDirectoryChanged(const QString&);
114 
115 protected:
116  QScopedPointer<ctkDICOMAppWidgetPrivate> d_ptr;
117 protected Q_SLOTS:
118  void onModelSelected(const QModelIndex& index);
119 
122 
125 
127  void onNextImage();
129  void onNextSeries();
131  void onNextStudy();
135 
137  void onTreeCollapsed(const QModelIndex& index);
138 
140  void onTreeExpanded(const QModelIndex& index);
141 
144 
147 
150 
153 
155  void onImagePreviewDisplayed(int imageID, int count);
156 
157 private Q_SLOTS:
158 
159  void onSearchPopUpButtonClicked();
160 
161  void onSearchWidgetTopLevelChanged(bool topLevel);
162 
163 private:
164  Q_DECLARE_PRIVATE(ctkDICOMAppWidget);
165  Q_DISABLE_COPY(ctkDICOMAppWidget);
166 };
167 
168 #endif
void onNextImage()
To be called when previous and next buttons are clicked.
void onAutoPlayTimer()
Called by timer for auto-play functionality.
void onInstanceAdded(QString)
void onThumbnailSelected(const ctkThumbnailLabel &widget)
To be called when a thumbnail in thumbnail list widget is selected.
void onThumbnailDoubleClicked(const ctkThumbnailLabel &widget)
To be called when a thumbnail in thumbnail list widget is double-clicked.
void onSeriesAdded(QString)
void onImagePreviewDisplayed(int imageID, int count)
To be called after image preview displayed an image.
bool displayImportSummary()
void setDatabaseDirectory(const QString &directory)
QString databaseDirectory() const
Directory being used to store the dicom database.
void queryRetrieveFinished()
Emited when query/retrieve operation has happened.
void onSearchParameterChanged()
To be called when search parameters in query widget changed.
int studiesAddedDuringImport()
void onImportDirectory(QString directory)
void directoryImported()
Emited when the directory import operation has completed.
void onPatientAdded(int, QString, QString, QString)
ctkDICOMAppWidget(QWidget *parent=0)
int patientsAddedDuringImport()
Accessors to status of last directory import operation.
void onTreeCollapsed(const QModelIndex &index)
To be called when an entry of the tree list is collapsed.
void setTagsToPrecache(const QStringList tags)
void databaseDirectoryChanged(const QString &)
Emited when directory is changed.
virtual ~ctkDICOMAppWidget()
bool searchWidgetPopUpMode()
ctkDICOMDatabase * database()
int instancesAddedDuringImport()
void onModelSelected(const QModelIndex &index)
void setSearchWidgetPopUpMode(bool flag)
const QStringList tagsToPrecache()
void onStudyAdded(QString)
void onFileIndexed(const QString &filePath)
void updateDatabaseSchemaIfNeeded()
void onAutoPlayCheckboxStateChanged(int state)
To be called when auto-play checkbox state changed.
void onQueryRetrieveFinished()
To be called when dialog finishes.
void onTreeExpanded(const QModelIndex &index)
To be called when an entry of the tree list is expanded.
QScopedPointer< ctkDICOMAppWidgetPrivate > d_ptr
int seriesAddedDuringImport()
void onThumbnailWidthSliderValueChanged(int val)
To be called when the value of thumbnail size slider bar is changed.
void setDisplayImportSummary(bool)