diff Core/DicomNetworking/Internals/StoreScp.cpp @ 3118:8849677c2cbc

compatibility with dcmtk 3.6.4
author s.jodogne@gmail.com
date Sun, 13 Jan 2019 20:16:43 +0100
parents 4e43e67f8ecf
children 94f4a18a79cc
line wrap: on
line diff
--- a/Core/DicomNetworking/Internals/StoreScp.cpp	Sun Jan 13 17:49:19 2019 +0100
+++ b/Core/DicomNetworking/Internals/StoreScp.cpp	Sun Jan 13 20:16:43 2019 +0100
@@ -83,6 +83,10 @@
 #include "../../PrecompiledHeaders.h"
 #include "StoreScp.h"
 
+#if !defined(DCMTK_VERSION_NUMBER)
+#  error The macro DCMTK_VERSION_NUMBER must be defined
+#endif
+
 #include "../../DicomParsing/FromDcmtkBridge.h"
 #include "../../DicomParsing/ToDcmtkBridge.h"
 #include "../../OrthancException.h"
@@ -188,10 +192,16 @@
           if (rsp->DimseStatus == STATUS_Success)
           {
             // which SOP class and SOP instance ?
+	    
+#if DCMTK_VERSION_NUMBER >= 364
+	    if (!DU_findSOPClassAndInstanceInDataSet(*imageDataSet, sopClass, sizeof(sopClass),
+						     sopInstance, sizeof(sopInstance), /*opt_correctUIDPadding*/ OFFalse))
+#else
             if (!DU_findSOPClassAndInstanceInDataSet(*imageDataSet, sopClass, sopInstance, /*opt_correctUIDPadding*/ OFFalse))
+#endif
             {
-              //LOG4CPP_ERROR(Internals::GetLogger(), "bad DICOM file: " << fileName);
-              rsp->DimseStatus = STATUS_STORE_Error_CannotUnderstand;
+		//LOG4CPP_ERROR(Internals::GetLogger(), "bad DICOM file: " << fileName);
+		rsp->DimseStatus = STATUS_STORE_Error_CannotUnderstand;
             }
             else if (strcmp(sopClass, req->AffectedSOPClassUID) != 0)
             {