|
@@ -48,7 +48,9 @@
|
|
|
#include <dcmtk/ofstd/ofstring.h>
|
|
|
#include <dcmtk/ofstd/ofstd.h> /* for class OFStandard */
|
|
|
#include <dcmtk/dcmdata/dcddirif.h> /* for class DicomDirInterface */
|
|
|
-#include "dcmimage.h"
|
|
|
+#include <dcmtk/dcmimgle/dcmimage.h> /* for class DicomImage */
|
|
|
+#include <dcmtk/dcmimage/diregist.h> /* include support for color images */
|
|
|
+
|
|
|
|
|
|
#define MITK_ERROR std::cout
|
|
|
#define MITK_INFO std::cout
|
|
@@ -179,6 +181,7 @@ void ctkDICOMIndexer::addDirectory(ctkDICOMDatabase& database,
|
|
|
Sint32 seriesNumber = 0, acquisitionNumber = 0, echoNumber = 0, temporalPosition = 0;
|
|
|
|
|
|
//The patient UID is a unique number within the database, generated by the sqlite autoincrement
|
|
|
+ //Thus, this is _not_ the DICOM Patient ID.
|
|
|
int patientUID = -1;
|
|
|
|
|
|
//If the following fields can not be evaluated, cancel evaluation of the DICOM file
|
|
@@ -205,7 +208,6 @@ void ctkDICOMIndexer::addDirectory(ctkDICOMDatabase& database,
|
|
|
MITK_ERROR << "Could not read DCM_SOPInstanceUID from " << filename;
|
|
|
continue;
|
|
|
}
|
|
|
-
|
|
|
if (!dataset->findAndGetOFString(DCM_InstanceNumber, instanceNumber).good())
|
|
|
{
|
|
|
MITK_ERROR << "Could not read DCM_InstanceNumber from " << filename;
|
|
@@ -273,6 +275,7 @@ void ctkDICOMIndexer::addDirectory(ctkDICOMDatabase& database,
|
|
|
{
|
|
|
/// found it
|
|
|
patientUID = check_exists_query.value(check_exists_query.record().indexOf("UID")).toInt();
|
|
|
+ patientExists = true;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -410,7 +413,7 @@ void ctkDICOMIndexer::addDirectory(ctkDICOMDatabase& database,
|
|
|
if ( ! ( thumbnailInfo.exists() && thumbnailInfo.lastModified() < QFileInfo(qfilename).lastModified() ) )
|
|
|
{
|
|
|
QDir(thumbnailBaseDir).mkpath(studySeriesDirectory);
|
|
|
- DicomImage dcmtkImage(qfilename.toAscii());
|
|
|
+ DicomImage dcmtkImage(QDir::toNativeSeparators(qfilename).toStdString().c_str());
|
|
|
d->thumbnailGenerator->generateThumbnail(&dcmtkImage, thumbnailFilename);
|
|
|
}
|
|
|
}
|