Mercurial > hg > orthanc
diff Core/DicomNetworking/Internals/StoreScp.cpp @ 3160:fc9a4a2dad63
merge
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Thu, 24 Jan 2019 10:55:19 +0100 |
parents | 8849677c2cbc |
children | 94f4a18a79cc |
line wrap: on
line diff
--- a/Core/DicomNetworking/Internals/StoreScp.cpp Thu Jan 24 10:54:47 2019 +0100 +++ b/Core/DicomNetworking/Internals/StoreScp.cpp Thu Jan 24 10:55:19 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) {