diff --git a/Modules/CLI/ResampleDTIVolume/Data/Baseline/Brain_slice.nrrd b/Modules/CLI/ResampleDTIVolume/Data/Baseline/Brain_slice.nrrd new file mode 100644 index 0000000000000000000000000000000000000000..b90bf91db7e7da6c7736b59a8ff7a561653d88b9 Binary files /dev/null and b/Modules/CLI/ResampleDTIVolume/Data/Baseline/Brain_slice.nrrd differ diff --git a/Modules/CLI/ResampleDTIVolume/Data/Baseline/dt-helix-ref-BSInterpolation.nrrd b/Modules/CLI/ResampleDTIVolume/Data/Baseline/dt-helix-ref-BSInterpolation.nrrd index ac95a56a61f1d8ad4360aa3e88a297a182c00caf..f912c3cd85fea888f36db1dedffb84ff0b9b1eb2 100644 Binary files a/Modules/CLI/ResampleDTIVolume/Data/Baseline/dt-helix-ref-BSInterpolation.nrrd and b/Modules/CLI/ResampleDTIVolume/Data/Baseline/dt-helix-ref-BSInterpolation.nrrd differ diff --git a/Modules/CLI/ResampleDTIVolume/Testing/CMakeLists.txt b/Modules/CLI/ResampleDTIVolume/Testing/CMakeLists.txt index 782cde250bbdc9775f522ea7dbe06a6ad209ef57..923ad4faeebcb39fe48624ca785a70cdccd29ab6 100644 --- a/Modules/CLI/ResampleDTIVolume/Testing/CMakeLists.txt +++ b/Modules/CLI/ResampleDTIVolume/Testing/CMakeLists.txt @@ -110,27 +110,26 @@ set_property(TEST ${testname} PROPERTY LABELS ${CLP}) #----------------------------------------------------------------------------- -message(WARNING "warning: Test named 'itkTestMainExtendedScalarTest' associated with ResampleDTI should be reviewed !") -# TODO The baseline associated with each command line module has been moved within -# the Data/Baseline subdirectory of each module. For that reason, ResampleDTI shouldn't -# reference the baseline 'AddTest_DOUBLE.mha' as input data. #Test itkTestMainExtended.h #copy scalar file to binary directory so that if an error occurs the output files will be created in the binary directory -#set(SourceScalarFile ${Slicer_SOURCE_DIR}/Testing/Data/Baseline/CLI/AddTest_DOUBLE.mha ) -#file( COPY ${SourceScalarFile} DESTINATION ${TEMP}) -#set( BinaryScalarFile ${TEMP}/AddTest_DOUBLE.mha) -#set(TransformedImage ${TEMP}/dt-helix-transformed.nrrd) -#set(testname itkTestMainExtendedScalarTest) -#add_test(NAME ${testname} COMMAND ${SEM_LAUNCH_COMMAND} $<TARGET_FILE:${CLP}Test> -# --compare -# ${BinaryScalarFile} -# ${BinaryScalarFile} -# ModuleEntryPoint -# --interpolation nn -# ${OriginalImage} -# ${TransformedImage} -# ) -#set_property(TEST ${testname} PROPERTY LABELS ${CLP}) +#We run ResampleDTI and do not care about the result. What interests us in that test is to make sure that by extending +#itkTestMainExtended.h to work with DTI, we did not break it and that it still works with scalar image too. +#Therefore, we compare a scalar image with itself and verify that the test passes successfully. +set(SourceScalarFile ${BASELINE}/Brain_slice.nrrd ) +file( COPY ${SourceScalarFile} DESTINATION ${TEMP}) +set( BinaryScalarFile ${TEMP}/Brain_slice.nrrd) +set(testname itkTestMainExtendedScalarTest) +set(TransformedImage7 ${TEMP}/dt-helix-transformed7.nrrd ) +add_test(NAME ${testname} COMMAND ${SEM_LAUNCH_COMMAND} $<TARGET_FILE:${CLP}Test> + --compare + ${BinaryScalarFile} + ${BinaryScalarFile} + ModuleEntryPoint + --interpolation nn + ${OriginalImage} + ${TransformedImage7} + ) +set_property(TEST ${testname} PROPERTY LABELS ${CLP}) #----------------------------------------------------------------------------- set(TransformedImage6 ${TEMP}/dt-helix-transformed6.nrrd )