From a88bf4e5aa5452992cf2922aa91728d111139bdb Mon Sep 17 00:00:00 2001 From: mrquorr Date: Fri, 12 Aug 2016 00:14:01 -0500 Subject: [PATCH] test added, only if HAVE_GDCM is on --- modules/imgcodecs/test/test_grfmt.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/imgcodecs/test/test_grfmt.cpp b/modules/imgcodecs/test/test_grfmt.cpp index f305ca1..d4f1d74 100644 --- a/modules/imgcodecs/test/test_grfmt.cpp +++ b/modules/imgcodecs/test/test_grfmt.cpp @@ -93,6 +93,12 @@ TEST(Imgcodecs_imread, regression) #ifdef HAVE_JASPER "Rome.jp2", #endif +#ifdef HAVE_GDCM + "int16-mono1.dcm", + "uint8-mono2.dcm", + "uint16-mono2.dcm", + "uint8-rgb.dcm", +#endif "color_palette_alpha.png", "multipage.tif", "rle.hdr", @@ -111,9 +117,10 @@ TEST(Imgcodecs_imread, regression) ASSERT_TRUE(imread_compare(path, IMREAD_COLOR)); ASSERT_TRUE(imread_compare(path, IMREAD_ANYDEPTH)); ASSERT_TRUE(imread_compare(path, IMREAD_ANYCOLOR)); - if (path.substr(path.length() - 3) != "hdr") + const string ext = path.substr( path.length() - 3 ); + if ( ext != "hdr" && ext != "dcm" ) { - // GDAL does not support hdr + // GDAL does not support hdr nor dcm ASSERT_TRUE(imread_compare(path, IMREAD_LOAD_GDAL)); } } -- 2.7.4