From: malaterre Date: Sat, 22 Jan 2005 00:39:50 +0000 (+0000) Subject: ENH: Add new test using dciodvfy from the dicom3tools package (David Clunie) X-Git-Tag: Version1.0.bp~217 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=9378be0930cea755248d3e486c8d7d2bbd7d6b5e;p=gdcm.git ENH: Add new test using dciodvfy from the dicom3tools package (David Clunie) --- diff --git a/FindDicom3Tools.cmake b/FindDicom3Tools.cmake new file mode 100644 index 00000000..768d673e --- /dev/null +++ b/FindDicom3Tools.cmake @@ -0,0 +1,23 @@ +# +# this module looks for Dicom3Tools, well right now only dciodvfy +# +# DCIODVFY_EXECUTABLE - the full path to the dciodvfy +# DCIODVFY_FOUND - If false, don't attempt to use dciodvfy + +FIND_PROGRAM(DCIODVFY_EXECUTABLE + dciodvfy + "/tmp/" + "/tmp/dicom3tools_1.00.snapshot.20041227.graymax/appsrc/dcfile/" + "${DICOM3TOOLS}/bin" + ) + +MARK_AS_ADVANCED( + DCIODVFY_EXECUTABLE + ) + +IF (NOT DCIODVFY_EXECUTABLE) + SET(DCIODVFY_FOUND "NO") +ELSE (NOT DCIODVFY_EXECUTABLE) + SET(DCIODVFY_FOUND "YES") +ENDIF (NOT DCIODVFY_EXECUTABLE) + diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index f18303c5..df64ba0e 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -151,10 +151,17 @@ SET(BLACK_LIST "PET-cardio-Multiframe-Papyrus.dcm" ) + +# Add a special test that requires dciodvfy from dicom3tools +INCLUDE(${GDCM_SOURCE_DIR}/FindDicom3Tools.cmake) + # This is a GLOB expression, change it into a list separated with a comma and \n SET(GDCM_DATA_IMAGES) FOREACH(filename ${GDCM_DATA_IMAGES_GLOB}) GET_FILENAME_COMPONENT(filename_temp ${filename} NAME) + IF(DCIODVFY_FOUND) + ADD_TEST("Clunie-${filename_temp}" "${DCIODVFY_EXECUTABLE}" "${filename}") + ENDIF(DCIODVFY_FOUND) STRING(REGEX MATCH ${filename_temp} bad_dicom ${BLACK_LIST}) IF(NOT bad_dicom) SET(GDCM_DATA_IMAGES "${GDCM_DATA_IMAGES}\n\"${filename_temp}\",")