Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxDicomImporter.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXDICOMIMPORTER_H
13 #define CXDICOMIMPORTER_H
14 
15 #include "org_custusx_dicom_Export.h"
16 
17 // Qt includes
18 #include <QString>
19 #include <QObject>
20 #include <QSharedPointer>
21 
22 class ctkDICOMDatabase;
23 class ctkDICOMIndexer;
24 class QProgressDialog;
25 
26 namespace cx
27 {
28 
36 class org_custusx_dicom_EXPORT DicomImporter : public QObject
37 {
38  Q_OBJECT
39 public:
40  DicomImporter(QObject* parent=NULL);
41  void setDatabase(QSharedPointer<ctkDICOMDatabase> database);
42  ~DicomImporter();
43 
47  void setDisplayImportSummary(bool);
48  bool displayImportSummary();
50  int patientsAddedDuringImport();
51  int studiesAddedDuringImport();
52  int seriesAddedDuringImport();
53  int instancesAddedDuringImport();
54 
55 
56 public slots:
60  void onImportDirectory(QString directory);
61 
62 signals:
63  void directoryImported();
64  void indexingCompleted();
65  void fileIndexed(QString);
66 
67 
68 private:
69  void showIndexerDialog();
70 
71  QSharedPointer<ctkDICOMDatabase> DICOMDatabase;
72  QSharedPointer<ctkDICOMIndexer> DICOMIndexer;
73  QProgressDialog *IndexerProgress;
74 
75  // local count variables to keep track of the number of items
76  // added to the database during an import operation
77  bool DisplayImportSummary;
78  int PatientsAddedDuringImport;
79  int StudiesAddedDuringImport;
80  int SeriesAddedDuringImport;
81  int InstancesAddedDuringImport;
82 
83 private slots:
84  void onFileIndexed(const QString& filePath);
85  void openImportDialog();
86 
89  void onPatientAdded(int, QString, QString, QString);
90  void onStudyAdded(QString);
91  void onSeriesAdded(QString);
92  void onInstanceAdded(QString);
93 
94 };
95 
96 
97 } // namespace cx
98 
99 
100 #endif // CXDICOMIMPORTER_H
Namespace for all CustusX production code.