Mercurial > hg > orthanc
diff 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 |
line wrap: on
line diff
--- a/Core/DicomNetworking/DicomUserConnection.cpp Tue Apr 07 17:35:44 2020 +0200 +++ b/Core/DicomNetworking/DicomUserConnection.cpp Wed Apr 08 17:00:33 2020 +0200 @@ -240,6 +240,10 @@ std::vector<const char*>& asFallback, const std::string& aet) { + // Presentation context IDs must be odd numbers, hence the + // increments by 2: + // http://dicom.nema.org/medical/dicom/2019e/output/chtml/part08/sect_9.3.2.2.html + Check(ASC_addPresentationContext(params, presentationContextId, sopClass.c_str(), asPreferred, 1), aet, "initializing"); @@ -1177,6 +1181,28 @@ "Unable to negotiate a presentation context with AET " + remoteAet_); } + +#if 0 + // Manual loop over the accepted transfer syntaxes + LST_HEAD **l = &pimpl_->params_->DULparams.acceptedPresentationContext; + if (*l != NULL) + { + DUL_PRESENTATIONCONTEXT* pc = (DUL_PRESENTATIONCONTEXT*) LST_Head(l); + LST_Position(l, (LST_NODE*)pc); + while (pc) + { + if (pc->result == ASC_P_ACCEPTANCE) + { + printf("Accepted: %d [%s] [%s]\n", pc->presentationContextID, pc->abstractSyntax, pc->acceptedTransferSyntax); + } + else + { + printf("Rejected: %d [%s]\n", pc->presentationContextID, pc->abstractSyntax); + } + pc = (DUL_PRESENTATIONCONTEXT*) LST_Next(l); + } + } +#endif } void DicomUserConnection::Close()