Mercurial > hg > orthanc
comparison Core/DicomNetworking/DicomUserConnection.cpp @ 3819:1237bd0bbdb2 transcoding
update sop class/instance uid if transcoding
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 08 Apr 2020 17:00:33 +0200 |
parents | 7f083dfae62b |
children | 4fde7933e504 |
comparison
equal
deleted
inserted
replaced
3814:023b2a9f3aa1 | 3819:1237bd0bbdb2 |
---|---|
238 const std::string& sopClass, | 238 const std::string& sopClass, |
239 const char* asPreferred[], | 239 const char* asPreferred[], |
240 std::vector<const char*>& asFallback, | 240 std::vector<const char*>& asFallback, |
241 const std::string& aet) | 241 const std::string& aet) |
242 { | 242 { |
243 // Presentation context IDs must be odd numbers, hence the | |
244 // increments by 2: | |
245 // http://dicom.nema.org/medical/dicom/2019e/output/chtml/part08/sect_9.3.2.2.html | |
246 | |
243 Check(ASC_addPresentationContext(params, presentationContextId, | 247 Check(ASC_addPresentationContext(params, presentationContextId, |
244 sopClass.c_str(), asPreferred, 1), | 248 sopClass.c_str(), asPreferred, 1), |
245 aet, "initializing"); | 249 aet, "initializing"); |
246 presentationContextId += 2; | 250 presentationContextId += 2; |
247 | 251 |
1175 { | 1179 { |
1176 throw OrthancException(ErrorCode_NoPresentationContext, | 1180 throw OrthancException(ErrorCode_NoPresentationContext, |
1177 "Unable to negotiate a presentation context with AET " + | 1181 "Unable to negotiate a presentation context with AET " + |
1178 remoteAet_); | 1182 remoteAet_); |
1179 } | 1183 } |
1184 | |
1185 #if 0 | |
1186 // Manual loop over the accepted transfer syntaxes | |
1187 LST_HEAD **l = &pimpl_->params_->DULparams.acceptedPresentationContext; | |
1188 if (*l != NULL) | |
1189 { | |
1190 DUL_PRESENTATIONCONTEXT* pc = (DUL_PRESENTATIONCONTEXT*) LST_Head(l); | |
1191 LST_Position(l, (LST_NODE*)pc); | |
1192 while (pc) | |
1193 { | |
1194 if (pc->result == ASC_P_ACCEPTANCE) | |
1195 { | |
1196 printf("Accepted: %d [%s] [%s]\n", pc->presentationContextID, pc->abstractSyntax, pc->acceptedTransferSyntax); | |
1197 } | |
1198 else | |
1199 { | |
1200 printf("Rejected: %d [%s]\n", pc->presentationContextID, pc->abstractSyntax); | |
1201 } | |
1202 pc = (DUL_PRESENTATIONCONTEXT*) LST_Next(l); | |
1203 } | |
1204 } | |
1205 #endif | |
1180 } | 1206 } |
1181 | 1207 |
1182 void DicomUserConnection::Close() | 1208 void DicomUserConnection::Close() |
1183 { | 1209 { |
1184 if (pimpl_->assoc_ != NULL) | 1210 if (pimpl_->assoc_ != NULL) |