X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FCMakeLists.txt;h=f6dbc8873811e63349b30c3ab4c8b32c9b656b2e;hb=d916971eefa44ad95cb13a6e413617303ad2c304;hp=d7c6750521436bcf5fb01ceb2a414e029de6a660;hpb=1978138e72f767a6e9cca825857b176faa8236ab;p=gdcm.git diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index d7c67505..f6dbc887 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -13,9 +13,10 @@ SET(TEST_SOURCES TestHash.cxx TestTS.cxx TestVR.cxx + TestDictGroupName.cxx TestDict.cxx TestWriteSimple.cxx - TestSequence.cxx + TestImageSet.cxx TestDicomDirElement.cxx TestDicomString.cxx ) @@ -24,8 +25,9 @@ SET(TEST_SOURCES IF (GDCM_DATA_ROOT) SET(TEST_SOURCES ${TEST_SOURCES} TestFileAccessors.cxx + TestMakeIcon.cxx TestPrintAllDocument.cxx # includes generated gdcmDataImages.h - TestAllEntryVerify.cxx # includes generated gdcmDataImages.h + #TestAllEntryVerify.cxx # includes generated gdcmDataImages.h TestAllReadCompareDicom.cxx # includes generated gdcmDataImages.h TestReadWriteReadCompare.cxx # includes generated gdcmDataImages.h #TestCopyDicom.cxx # includes generated gdcmDataImages.h @@ -40,18 +42,30 @@ IF (GDCM_DATA_ROOT) ) # add test that require VTK: IF(GDCM_VTK) - # Include the VTK library - INCLUDE(${VTK_USE_FILE}) - - INCLUDE_DIRECTORIES( - ${GDCM_SOURCE_DIR}/vtk/ - ) - SET(TEST_SOURCES ${TEST_SOURCES} - VTKTestRead.cxx - VTKTestReadSeq.cxx - VTKTestWrite.cxx - VTKTestWriteSeq.cxx - ) + IF("${VTK_MAJOR_VERSION}" LESS 4) + MESSAGE(FATAL_ERROR "This VTK version is not supported, you are on your own !") + ELSE("${VTK_MAJOR_VERSION}" LESS 4) + IF("${VTK_MAJOR_VERSION}" EQUAL 4 AND "${VTK_MINOR_VERSION}" EQUAL 2) + MESSAGE(FATAL_ERROR "This VTK version is not supported, you are on your own !" + "Although gdcm should compile fine. You just need to turn BUILD_TESTING:=OFF") + ENDIF("${VTK_MAJOR_VERSION}" EQUAL 4 AND "${VTK_MINOR_VERSION}" EQUAL 2) + IF("${VTK_MAJOR_VERSION}" EQUAL 4 AND "${VTK_MINOR_VERSION}" EQUAL 4 AND "${VTK_BUILD_VERSION}" LESS 3) + MESSAGE(FATAL_ERROR "This VTK version is not supported, you are on your own !" + "Although gdcm should compile fine. You just need to turn BUILD_TESTING:=OFF") + ENDIF("${VTK_MAJOR_VERSION}" EQUAL 4 AND "${VTK_MINOR_VERSION}" EQUAL 4 AND "${VTK_BUILD_VERSION}" LESS 3) + # Include the VTK library since we know this is going to work + INCLUDE(${VTK_USE_FILE}) + + INCLUDE_DIRECTORIES( + ${GDCM_SOURCE_DIR}/vtk/ + ) + SET(TEST_SOURCES ${TEST_SOURCES} + VTKTestRead.cxx + VTKTestReadSeq.cxx + VTKTestWrite.cxx + VTKTestWriteSeq.cxx + ) + ENDIF("${VTK_MAJOR_VERSION}" LESS 4) ENDIF(GDCM_VTK) ENDIF (GDCM_DATA_ROOT) @@ -146,6 +160,10 @@ SET(BLACK_LIST "D_CLUNIE_CT1_JLSL.dcm" "D_CLUNIE_CT1_J2KR.dcm" "D_CLUNIE_CT1_J2KI.dcm" + #Not a Dicom Image, but a RT Object + "RS2.16.124.113534.2.3.5.0.120040728.21342.353.12747_anonimized.dcm" + #Dicom MPEG image + "ETIAM_video_002.dcm" ) # Add a special test that requires dciodvfy from dicom3tools @@ -156,7 +174,8 @@ 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}") + ADD_TEST("DCIODVFY-INPUT-${filename_temp}" "${DCIODVFY_EXECUTABLE}" "${filename}") + ADD_TEST("DCIODVFY-OUTPUT-${filename_temp}" "${DCIODVFY_EXECUTABLE}" "${GDCM_DATA_ROOT}/BaselineDicom/${filename_temp}") ENDIF(DCIODVFY_FOUND) STRING(REGEX MATCH ${filename_temp} bad_dicom ${BLACK_LIST}) IF(NOT bad_dicom)