From ef5a1d5bed77da5dcc824e163cfb5c698dcf24c1 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Tue, 19 Mar 2024 15:27:11 -0400 Subject: [PATCH] ENH: Add test for reading DICOM secondary capture spatial metadata This is using a Visible Male RGB slice secondary capture DICOM created by David Clunie as an input, described in Issue #4109. --- .../itkDCMTKColorImageSpatialMetadata.nrrd.cid | 1 + Modules/IO/DCMTK/test/CMakeLists.txt | 12 ++++++++++++ .../DCMTK/test/Input/visible-male-rgb-slice.dcm.cid | 1 + .../itkGDCMImageReadWriteTest_SC_RGB.nrrd.cid | 1 + Modules/IO/GDCM/test/CMakeLists.txt | 13 +++++++++++++ .../GDCM/test/Input/visible-male-rgb-slice.dcm.cid | 1 + 6 files changed, 29 insertions(+) create mode 100644 Modules/IO/DCMTK/test/Baseline/itkDCMTKColorImageSpatialMetadata.nrrd.cid create mode 100644 Modules/IO/DCMTK/test/Input/visible-male-rgb-slice.dcm.cid create mode 100644 Modules/IO/GDCM/test/Baseline/itkGDCMImageReadWriteTest_SC_RGB.nrrd.cid create mode 100644 Modules/IO/GDCM/test/Input/visible-male-rgb-slice.dcm.cid diff --git a/Modules/IO/DCMTK/test/Baseline/itkDCMTKColorImageSpatialMetadata.nrrd.cid b/Modules/IO/DCMTK/test/Baseline/itkDCMTKColorImageSpatialMetadata.nrrd.cid new file mode 100644 index 000000000000..a713ea67f80c --- /dev/null +++ b/Modules/IO/DCMTK/test/Baseline/itkDCMTKColorImageSpatialMetadata.nrrd.cid @@ -0,0 +1 @@ +bafybeiai2acs4g7k6aeneziwgi3tw2i33idmnzclpyh4mt4dqvgktca7gu diff --git a/Modules/IO/DCMTK/test/CMakeLists.txt b/Modules/IO/DCMTK/test/CMakeLists.txt index e23c1656cd42..8e0b26a517f8 100644 --- a/Modules/IO/DCMTK/test/CMakeLists.txt +++ b/Modules/IO/DCMTK/test/CMakeLists.txt @@ -182,6 +182,18 @@ itk_add_test( DATA{${ITK_DATA_ROOT}/Input/RGBDicomTest.dcm} ${ITK_TEST_OUTPUT_DIR}/itkDCMTKColorImage.png) +itk_add_test( + NAME + itkDCMTKRGBImageIOColorImageSpatialMetadataTest + COMMAND + ITKIODCMTKTestDriver + --compare + DATA{Baseline/itkDCMTKColorImageSpatialMetadata.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkDCMTKColorImageSpatialMetadata.nrrd + itkDCMTKRGBImageIOTest + DATA{Input/visible-male-rgb-slice.dcm} + ${ITK_TEST_OUTPUT_DIR}/itkDCMTKColorImageSpatialMetadata.nrrd) + itk_add_test( NAME ITKDCMTKLoggerTest diff --git a/Modules/IO/DCMTK/test/Input/visible-male-rgb-slice.dcm.cid b/Modules/IO/DCMTK/test/Input/visible-male-rgb-slice.dcm.cid new file mode 100644 index 000000000000..1fb95e645fa6 --- /dev/null +++ b/Modules/IO/DCMTK/test/Input/visible-male-rgb-slice.dcm.cid @@ -0,0 +1 @@ +bafybeiadtxwvshbmde3aywkzlzcudcoxypafxrshabby6gmdmtawapjzre diff --git a/Modules/IO/GDCM/test/Baseline/itkGDCMImageReadWriteTest_SC_RGB.nrrd.cid b/Modules/IO/GDCM/test/Baseline/itkGDCMImageReadWriteTest_SC_RGB.nrrd.cid new file mode 100644 index 000000000000..f9cbcbf691d0 --- /dev/null +++ b/Modules/IO/GDCM/test/Baseline/itkGDCMImageReadWriteTest_SC_RGB.nrrd.cid @@ -0,0 +1 @@ +bafybeib67xvtf44xwu4rxapchxqjflfutheq3wja47qvniz4gdwrqkqujy diff --git a/Modules/IO/GDCM/test/CMakeLists.txt b/Modules/IO/GDCM/test/CMakeLists.txt index 54c9b8ef057c..cde75d3322d7 100644 --- a/Modules/IO/GDCM/test/CMakeLists.txt +++ b/Modules/IO/GDCM/test/CMakeLists.txt @@ -278,6 +278,19 @@ itk_add_test( ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageReadWriteTest_RGB.mha rgb) +itk_add_test( + NAME + itkGDCMImageReadWriteTest_SC_RGB + COMMAND + ITKIOGDCMTestDriver + --compare + DATA{Baseline/itkGDCMImageReadWriteTest_SC_RGB.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageReadWriteTest_SC_RGB.nrrd + itkGDCMImageReadWriteTest + DATA{Input/visible-male-rgb-slice.dcm} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageReadWriteTest_SC_RGB.nrrd + rgb) + itk_add_test( NAME itkGDCM_ComplianceTestRGB_JPEG2000ICT diff --git a/Modules/IO/GDCM/test/Input/visible-male-rgb-slice.dcm.cid b/Modules/IO/GDCM/test/Input/visible-male-rgb-slice.dcm.cid new file mode 100644 index 000000000000..1fb95e645fa6 --- /dev/null +++ b/Modules/IO/GDCM/test/Input/visible-male-rgb-slice.dcm.cid @@ -0,0 +1 @@ +bafybeiadtxwvshbmde3aywkzlzcudcoxypafxrshabby6gmdmtawapjzre