22 #include <ctkFileDialog.h>
26 #include <QMessageBox>
31 : QWidget(parent), m_Controls(nullptr), m_ProgressDialog(nullptr)
47 m_Controls =
new Ui::QmitkDicomExternalDataWidgetControls;
49 m_Controls->viewExternalDataButton->setVisible(
true);
50 m_Controls->ctkDICOMBrowser->setTableOrientation(Qt::Vertical);
62 SIGNAL(seriesSelectionChanged(
const QStringList &)),
71 SIGNAL(indexingFilePath(
const QString &)),
73 SLOT(setLabelText(
const QString &)));
90 catch (std::exception e)
103 if (filesToDownload.size() == 0)
106 info.setText(
"You have to select an entry in the DICOM browser for import.");
115 QStringList uids =
m_Controls->ctkDICOMBrowser->currentSeriesSelection();
120 QHash<QString, QVariant> eventProperty;
121 eventProperty.insert(
"FilesForSeries", filesForSeries);
122 if (!filesForSeries.isEmpty())
125 eventProperty.insert(
"Modality", modality);
133 QStringList filePaths;
136 QStringList seriesUIDs =
m_Controls->ctkDICOMBrowser->currentSeriesSelection();
137 foreach (uid, seriesUIDs)
141 if (!filePaths.empty())
144 QStringList studyUIDs =
m_Controls->ctkDICOMBrowser->currentStudiesSelection();
146 foreach (uid, studyUIDs)
149 foreach (uid, seriesUIDs)
154 if (!filePaths.empty())
157 QStringList patientsUIDs =
m_Controls->ctkDICOMBrowser->currentPatientsSelection();
159 foreach (uid, patientsUIDs)
163 foreach (uid, studyUIDs)
166 foreach (uid, seriesUIDs)
187 m_Controls->viewExternalDataButton->setEnabled((s.size() != 0));
200 m_ImportDialog->setWindowTitle(
"Import DICOM files from directory");
206 m_ProgressDialog =
new QProgressDialog(
"Initialization ...",
"Cancel", 0, 100,
this);
static void info(const char *fmt,...)