X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FCMakeLists.txt;h=582adf522701b9371f07e7d98fdf4d86084c3be6;hb=cb74bf157e806ec76db4b26140b31e2dbb4d3501;hp=492dba614f69ea2daeba54a350616f211f4c4e89;hpb=87646d4e5c20b474db05756f796ccffab2babc4e;p=gdcm.git diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index 492dba61..582adf52 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -13,41 +13,59 @@ SET(TEST_SOURCES TestHash.cxx TestTS.cxx TestVR.cxx - TestDicomDirElement.cxx - TestDicomString.cxx + TestDictGroupName.cxx TestDict.cxx TestWriteSimple.cxx + TestImageSet.cxx + TestDicomDirElement.cxx + TestDicomString.cxx ) # add tests that require data IF (GDCM_DATA_ROOT) SET(TEST_SOURCES ${TEST_SOURCES} - TestSerieHeader # uses gdcmData as a default root directory - TestReadWriteReadCompare.cxx # includes generated gdcmDataImages.h - PrintAllDocument.cxx # includes generated gdcmDataImages.h + TestFileAccessors.cxx + TestMakeIcon.cxx + TestPrintAllDocument.cxx # includes generated gdcmDataImages.h + #TestAllEntryVerify.cxx # includes generated gdcmDataImages.h TestAllReadCompareDicom.cxx # includes generated gdcmDataImages.h - TestAllEntryVerify.cxx # includes generated gdcmDataImages.h + TestReadWriteReadCompare.cxx # includes generated gdcmDataImages.h + #TestCopyDicom.cxx # includes generated gdcmDataImages.h + # TestCopyRescaleDicom.cxx # includes generated gdcmDataImages.h #TestChangeHeader.cxx - TestCopyDicom.cxx # includes generated gdcmDataImages.h - TestCopyRescaleDicom.cxx # includes generated gdcmDataImages.h - TestDicomDir.cxx # require DICOMDIR - BuildUpDicomDir.cxx # writes a file named "NewDICOMDIR" - makeDicomDir.cxx # writes a file named "NewDICOMDIR" + # TestAnonymize.cxx TestDirList.cxx + TestDicomDir.cxx # require DICOMDIR + TestBuildUpDicomDir.cxx # writes a file named "NewDICOMDIR" + TestMakeDicomDir.cxx # writes a file named "NewDICOMDIR" + TestSerieHelper.cxx # uses gdcmData as a default root directory ) # add test that require VTK: IF(GDCM_VTK) - # Include the VTK library - INCLUDE(${VTK_USE_FILE}) - - INCLUDE_DIRECTORIES( - ${GDCM_SOURCE_DIR}/vtk/ + 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 + 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) @@ -73,14 +91,7 @@ REMOVE (TestsToRun gdcmTests.cxx) # Loop over files and create executables FOREACH(file ${TEST_SOURCES}) GET_FILENAME_COMPONENT(name ${file} NAME_WE) -# IF (GDCM_DATA_ROOT) -# ADD_TEST(${name} ${GDCM_TESTS} ${name} -# -D ${GDCM_DATA_ROOT} -# -T ${GDCM_BINARY_DIR}/Testing/Temporary -# -V Baseline/gdcm/${name}.png) -# ELSE (GDCM_DATA_ROOT) - ADD_TEST(${name} ${GDCM_TESTS} ${name}) -# ENDIF (GDCM_DATA_ROOT) + ADD_TEST(${name} ${GDCM_TESTS} ${name}) ENDFOREACH(file ${TEST_SOURCES}) #----------------------------------------------------------------------------- @@ -138,31 +149,39 @@ ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.9) # Black list of images known to break lots of readers (efilm, xmedcon ...): SET(BLACK_LIST - # serial killer (also segfaults vtkgdcmViewer, but NOT PrintFile) - #"gdcm-JPEG-LossLessThoravision.dcm" - - # Mathieu: temporarily remove as it kills my gnome session (but not kde) - # JPR: also breaks TestReadWriteReadCompare : Pixel differ (as expanded - # in memory) - #"KODAK-12-MONO1-Odd_Terminated_Sequence.dcm" # Multiframe Papyrus format image - # Just to remember this format exist, and is gdcm::Header compliant - # (NOT gdcm::File ...) + # Just to remember this format exists, and is gdcm::File compliant + # (NOT gdcm::FileHelper ...) # any contribution is welcome - "PET-cardio-Multiframe-Papyrus.dcm" + "PET-cardio-Multiframe-Papyrus.dcm" + # From David Clunie's Compresion Dataset + "D_CLUNIE_CT1_JLSN.dcm" + "D_CLUNIE_CT1_JLSL.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" + #Something stupid occured in the code for LibIDO images. + #I Black list them for a while. JP + "gdcm-ACR-LibIDO.acr" + "LIBIDO-24-ACR_NEMA-Rectangle.dcm" + #16 Bits per pixel images with LUT 16 Bits. + #I wait to be 100% sure before releasing them. JP + "rle16sti.dcm" + "rle16loo.dcm" ) - # Add a special test that requires dciodvfy from dicom3tools -INCLUDE(${GDCM_SOURCE_DIR}/FindDicom3Tools.cmake) +INCLUDE(${GDCM_SOURCE_DIR}/CMake/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}") + 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) @@ -184,9 +203,9 @@ ENDFOREACH(filename) # Populate GDCM_DATA_IMAGES: FILE(WRITE "${GDCM_BINARY_DIR}/gdcmDataImages.h" "const char * const gdcmDataImages[] = { ${GDCM_DATA_IMAGES}\n0 };\n" - ) +) # Populate GDCM_DATA_SEQ_IMAGES: FILE(WRITE "${GDCM_BINARY_DIR}/gdcmDataSeqImages.h" "const char * const gdcmDataSeqImages[] = { ${GDCM_DATA_SEQ_IMAGES}\n0 };\n" - ) +)