Mercurial > hg > orthanc
changeset 3117:c8b75e207a82
working on dcmtk 3.6.4 compatibility
author | jodogne |
---|---|
date | Sun, 13 Jan 2019 17:49:19 +0100 |
parents | 0e75026a2c02 |
children | 8849677c2cbc |
files | Core/DicomNetworking/DicomUserConnection.cpp Core/DicomParsing/FromDcmtkBridge.cpp |
diffstat | 2 files changed, 25 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/DicomNetworking/DicomUserConnection.cpp Fri Jan 11 11:34:58 2019 +0100 +++ b/Core/DicomNetworking/DicomUserConnection.cpp Sun Jan 13 17:49:19 2019 +0100 @@ -82,6 +82,10 @@ #include "../PrecompiledHeaders.h" #include "DicomUserConnection.h" +#if !defined(DCMTK_VERSION_NUMBER) +# error The macro DCMTK_VERSION_NUMBER must be defined +#endif + #include "../DicomFormat/DicomArray.h" #include "../Logging.h" #include "../OrthancException.h" @@ -330,7 +334,12 @@ // Figure out which SOP class and SOP instance is encapsulated in the file DIC_UI sopClass; DIC_UI sopInstance; + +#if DCMTK_VERSION_NUMBER >= 364 + if (!DU_findSOPClassAndInstanceInDataSet(dcmff.getDataset(), sopClass, sizeof(sopClass), sopInstance, sizeof(sopInstance))) +#else if (!DU_findSOPClassAndInstanceInDataSet(dcmff.getDataset(), sopClass, sopInstance)) +#endif { throw OrthancException(ErrorCode_NoSopClassOrInstance); } @@ -572,7 +581,15 @@ T_DIMSE_C_FindRSP response; DcmDataset* statusDetail = NULL; + +#if DCMTK_VERSION_NUMBER >= 364 + int responseCount; +#endif + OFCondition cond = DIMSE_findUser(association, presID, &request, dataset, +#if DCMTK_VERSION_NUMBER >= 364 + responseCount, +#endif FindCallback, &payload, /*opt_blockMode*/ DIMSE_BLOCKING, /*opt_dimse_timeout*/ dimseTimeout,
--- a/Core/DicomParsing/FromDcmtkBridge.cpp Fri Jan 11 11:34:58 2019 +0100 +++ b/Core/DicomParsing/FromDcmtkBridge.cpp Sun Jan 13 17:49:19 2019 +0100 @@ -41,6 +41,10 @@ # error The macro ORTHANC_SANDBOXED must be defined #endif +#if !defined(DCMTK_VERSION_NUMBER) +# error The macro DCMTK_VERSION_NUMBER must be defined +#endif + #include "FromDcmtkBridge.h" #include "ToDcmtkBridge.h" #include "../Logging.h" @@ -165,7 +169,11 @@ ~DictionaryLocker() { +#if DCMTK_VERSION_NUMBER >= 364 + dcmDataDict.wrunlock(); +#else dcmDataDict.unlock(); +#endif } DcmDataDictionary& operator*()