Mercurial > hg > orthanc
comparison 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 |
comparison
equal
deleted
inserted
replaced
3159:4cfed5c2eacd | 3160:fc9a4a2dad63 |
---|---|
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 } |