comparison 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
comparison
equal deleted inserted replaced
3117:c8b75e207a82 3118:8849677c2cbc
81 81
82 82
83 #include "../../PrecompiledHeaders.h" 83 #include "../../PrecompiledHeaders.h"
84 #include "StoreScp.h" 84 #include "StoreScp.h"
85 85
86 #if !defined(DCMTK_VERSION_NUMBER)
87 # error The macro DCMTK_VERSION_NUMBER must be defined
88 #endif
89
86 #include "../../DicomParsing/FromDcmtkBridge.h" 90 #include "../../DicomParsing/FromDcmtkBridge.h"
87 #include "../../DicomParsing/ToDcmtkBridge.h" 91 #include "../../DicomParsing/ToDcmtkBridge.h"
88 #include "../../OrthancException.h" 92 #include "../../OrthancException.h"
89 #include "../../Logging.h" 93 #include "../../Logging.h"
90 94
186 // check the image to make sure it is consistent, i.e. that its sopClass and sopInstance correspond 190 // check the image to make sure it is consistent, i.e. that its sopClass and sopInstance correspond
187 // to those mentioned in the request. If not, set the status in the response message variable. 191 // to those mentioned in the request. If not, set the status in the response message variable.
188 if (rsp->DimseStatus == STATUS_Success) 192 if (rsp->DimseStatus == STATUS_Success)
189 { 193 {
190 // which SOP class and SOP instance ? 194 // which SOP class and SOP instance ?
195
196 #if DCMTK_VERSION_NUMBER >= 364
197 if (!DU_findSOPClassAndInstanceInDataSet(*imageDataSet, sopClass, sizeof(sopClass),
198 sopInstance, sizeof(sopInstance), /*opt_correctUIDPadding*/ OFFalse))
199 #else
191 if (!DU_findSOPClassAndInstanceInDataSet(*imageDataSet, sopClass, sopInstance, /*opt_correctUIDPadding*/ OFFalse)) 200 if (!DU_findSOPClassAndInstanceInDataSet(*imageDataSet, sopClass, sopInstance, /*opt_correctUIDPadding*/ OFFalse))
192 { 201 #endif
193 //LOG4CPP_ERROR(Internals::GetLogger(), "bad DICOM file: " << fileName); 202 {
194 rsp->DimseStatus = STATUS_STORE_Error_CannotUnderstand; 203 //LOG4CPP_ERROR(Internals::GetLogger(), "bad DICOM file: " << fileName);
204 rsp->DimseStatus = STATUS_STORE_Error_CannotUnderstand;
195 } 205 }
196 else if (strcmp(sopClass, req->AffectedSOPClassUID) != 0) 206 else if (strcmp(sopClass, req->AffectedSOPClassUID) != 0)
197 { 207 {
198 rsp->DimseStatus = STATUS_STORE_Error_DataSetDoesNotMatchSOPClass; 208 rsp->DimseStatus = STATUS_STORE_Error_DataSetDoesNotMatchSOPClass;
199 } 209 }