From 853a490de3c52d51d7a00fa54fc04fe632c36e2b Mon Sep 17 00:00:00 2001 From: Chris Bridge Date: Sat, 17 May 2025 11:39:35 -0400 Subject: [PATCH 1/2] Add RLE as supported image type for file client --- src/dicomweb_client/file.py | 2 ++ tests/test_file.py | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/src/dicomweb_client/file.py b/src/dicomweb_client/file.py index f02b982..612c1f1 100644 --- a/src/dicomweb_client/file.py +++ b/src/dicomweb_client/file.py @@ -3127,6 +3127,7 @@ def retrieve_instance( '1.2.840.10008.1.2.4.91': 'application/dicom', '1.2.840.10008.1.2.4.92': 'application/dicom', '1.2.840.10008.1.2.4.93': 'application/dicom', + '1.2.840.10008.1.2.5': 'application/dicom', } supported_media_type_lut = { @@ -3142,6 +3143,7 @@ def retrieve_instance( '1.2.840.10008.1.2.4.91', '1.2.840.10008.1.2.4.92', '1.2.840.10008.1.2.4.93', + '1.2.840.10008.1.2.5', '*', }, } diff --git a/tests/test_file.py b/tests/test_file.py index 6b4d82c..7461b2f 100644 --- a/tests/test_file.py +++ b/tests/test_file.py @@ -248,6 +248,15 @@ def test_retrieve_instance(file_client): assert isinstance(instance, Dataset) +def test_retrieve_instance_rle(file_client): + instance = file_client.retrieve_instance( + '1.3.46.670589.14.1000.210.4.199999.20110525182825.1.0', + '1.3.46.670589.14.1000.210.3.199999.20110525182826.1.0', + '1.3.46.670589.14.1000.210.2.199999.20110525185628.1.0' + ) + assert isinstance(instance, Dataset) + + def test_retrieve_instance_with_default_media_type(file_client): instance = file_client.retrieve_instance( '1.3.6.1.4.1.5962.1.1.0.0.0.1196530851.28319.0.1', From 48e35b966c1bf874a263008ec81d976a5d3ee056 Mon Sep 17 00:00:00 2001 From: Chris Bridge Date: Sat, 17 May 2025 11:52:10 -0400 Subject: [PATCH 2/2] Switch to alternative test file --- tests/test_file.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_file.py b/tests/test_file.py index 7461b2f..0094e0e 100644 --- a/tests/test_file.py +++ b/tests/test_file.py @@ -250,9 +250,9 @@ def test_retrieve_instance(file_client): def test_retrieve_instance_rle(file_client): instance = file_client.retrieve_instance( - '1.3.46.670589.14.1000.210.4.199999.20110525182825.1.0', - '1.3.46.670589.14.1000.210.3.199999.20110525182826.1.0', - '1.3.46.670589.14.1000.210.2.199999.20110525185628.1.0' + '1.2.826.0.1.3680043.8.498.12406831542731051035295345080039845114', + '1.2.826.0.1.3680043.8.498.16157229083793556332623330502397121062', + '1.2.826.0.1.3680043.8.498.49043964482360854182530167603505525116', ) assert isinstance(instance, Dataset)