# HG changeset patch # User Sebastien Jodogne # Date 1620304747 -7200 # Node ID e31fdf2eefe3417fbb517038c7265140e6790508 # Parent a9d773afdbc671aa89a8068a490f058d3904db55 Fix issue #194 (Upgrade media types to DICOM 2021a, cf. table 8.7.3-5) diff -r a9d773afdbc6 -r e31fdf2eefe3 NEWS --- a/NEWS Wed May 05 18:58:36 2021 +0200 +++ b/NEWS Thu May 06 14:39:07 2021 +0200 @@ -4,6 +4,7 @@ * New field "Timeout" in "DicomWeb.Servers" to specify HTTP timeout on a per-server basis * Reduced memory consumption in STOW-RS server thanks to an optimization of Orthanc::MultipartStreamReader in Orthanc framework 1.9.3 +* Fix issue #194 (Upgrade media types to DICOM 2021a, cf. table 8.7.3-5) * Fix issue #196 (STOW-RS: Should return 200 only when successfully stored all instances) diff -r a9d773afdbc6 -r e31fdf2eefe3 Plugin/WadoRsRetrieveFrames.cpp --- a/Plugin/WadoRsRetrieveFrames.cpp Wed May 05 18:58:36 2021 +0200 +++ b/Plugin/WadoRsRetrieveFrames.cpp Thu May 06 14:39:07 2021 +0200 @@ -166,19 +166,25 @@ syntax = Orthanc::DicomTransferSyntax_JPEGProcess14; return true; } - else if (type == "image/x-dicom-rle" && (transferSyntax.empty() || // Default - transferSyntax == "1.2.840.10008.1.2.5")) + else if ((type == "image/x-dicom-rle" || // Table 6.1.1.8-3b of DICOM 2017c (backward compatibility) + type == "image/dicom-rle") && // Table 8.7.3-5 of DICOM 2021a + (transferSyntax.empty() || // Default + transferSyntax == "1.2.840.10008.1.2.5")) { syntax = Orthanc::DicomTransferSyntax_RLELossless; return true; } - else if (type == "image/x-jls" && (transferSyntax.empty() || // Default - transferSyntax == "1.2.840.10008.1.2.4.80")) + else if ((type == "image/x-jls" || // Table 6.1.1.8-3b of DICOM 2017c (backward compatibility) + type == "image/jls") && // Table 8.7.3-5 of DICOM 2021a + (transferSyntax.empty() || // Default + transferSyntax == "1.2.840.10008.1.2.4.80")) { syntax = Orthanc::DicomTransferSyntax_JPEGLSLossless; return true; } - else if (type == "image/x-jls" && transferSyntax == "1.2.840.10008.1.2.4.81") + else if ((type == "image/x-jls" || // Table 6.1.1.8-3b of DICOM 2017c (backward compatibility) + type == "image/jls") && // Table 8.7.3-5 of DICOM 2021a + transferSyntax == "1.2.840.10008.1.2.4.81") { syntax = Orthanc::DicomTransferSyntax_JPEGLSLossy; return true; @@ -345,13 +351,16 @@ return "image/jpeg; transfer-syntax=1.2.840.10008.1.2.4.70"; case Orthanc::DicomTransferSyntax_RLELossless: - return "image/x-dicom-rle; transfer-syntax=1.2.840.10008.1.2.5"; + // Was "image/x-dicom-rle" in DICOMweb <= 1.5 + return "image/dicom-rle; transfer-syntax=1.2.840.10008.1.2.5"; case Orthanc::DicomTransferSyntax_JPEGLSLossless: - return "image/x-jls; transfer-syntax=1.2.840.10008.1.2.4.80"; + // Was "image/x-jls" in DICOMweb <= 1.5 + return "image/jls; transfer-syntax=1.2.840.10008.1.2.4.80"; case Orthanc::DicomTransferSyntax_JPEGLSLossy: - return "image/x-jls; transfer-syntax=1.2.840.10008.1.2.4.81"; + // Was "image/x-jls" in DICOMweb <= 1.5 + return "image/jls; transfer-syntax=1.2.840.10008.1.2.4.81"; case Orthanc::DicomTransferSyntax_JPEG2000LosslessOnly: return "image/jp2; transfer-syntax=1.2.840.10008.1.2.4.90";