Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
QmitkDicomImportWidget.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef QmitkDicomImportWidget_h
14 #define QmitkDicomImportWidget_h
15 
16 #include <MitkDICOMUIExports.h>
17 
18 #include <QWidget>
19 
20 class ctkFileDialog;
21 class ctkDICOMDatabase;
22 class ctkDICOMIndexer;
23 
24 class QProgressDialog;
25 class QTemporaryFile;
26 
27 namespace Ui
28 {
30 }
31 
37 {
38  Q_OBJECT
39 
40 public:
41  explicit QmitkDicomImportWidget(QWidget* parent = nullptr);
42  ~QmitkDicomImportWidget() override;
43 
44 signals:
45 
51  void Import(const QStringList& files);
52 
59  void ViewSeries(const std::vector<std::pair<std::string, std::optional<std::string>>>& series);
60 
61 private slots:
62  void OnAddToLocalStorageButtonClicked();
63  void OnImport(const QString& directory);
64  void OnIndexingComplete(int, int, int, int);
65  void OnProgress(int value);
66  void OnProgressDetail(const QString& detail);
67  void OnProgressStep(const QString& step);
68  void OnAnySelectionChanged();
69  void OnViewButtonClicked();
70 
71 private:
72  void showEvent(QShowEvent* event) override;
73 
74  QStringList GetFileNamesFromSelection();
75  void SetupProgressDialog();
76 
77  bool OpenDatabase();
78  void CloseDatabase();
79 
80  QTemporaryFile* m_DatabaseFile;
81  ctkDICOMDatabase* m_Database;
82  ctkDICOMIndexer* m_Indexer;
83  ctkFileDialog* m_ImportDialog;
84  QProgressDialog* m_ProgressDialog;
85  QString m_ProgressStep;
86 
87  Ui::QmitkDicomImportWidget* m_Ui;
88 };
89 
90 #endif
QmitkDicomImportWidget
Wrapper widget for a ctkDICOMTableManager and a few extra buttons for importing DICOM data from the h...
Definition: QmitkDicomImportWidget.h:36
Ui
Definition: BlueBerryExampleLauncherDialog.h:21
MitkDICOMUIExports.h
MITKDICOMUI_EXPORT
#define MITKDICOMUI_EXPORT
Definition: MitkDICOMUIExports.h:15