diff --git a/CMake/CppcheckTargets.cmake b/CMake/CppcheckTargets.cmake index a1edaa19d01..967e6f42c62 100644 --- a/CMake/CppcheckTargets.cmake +++ b/CMake/CppcheckTargets.cmake @@ -45,58 +45,64 @@ endif() # ------------------------------------------------------------------------------ macro(get_cppcheck_arg) - if(FORCE IN_LIST _input) - list(APPEND _cppcheck_args ${CPPCHECK_FORCE_ARG}) - list(REMOVE_ITEM _input FORCE) - endif() - - if(VERBOSE IN_LIST _input) - list(APPEND _cppcheck_args ${CPPCHECK_VERBOSE_ARG}) - list(REMOVE_ITEM _input VERBOSE) - endif() - - if(QUIET IN_LIST _input) - list(APPEND _cppcheck_args ${CPPCHECK_QUIET_ARG}) - list(REMOVE_ITEM _input QUIET) - endif() - - if(ALL IN_LIST _input) - list(APPEND _cppcheck_args ${CPPCHECK_ALL_ARG}) - list(REMOVE_ITEM _input ALL) - endif() - - if(UNUSED_FUNCTIONS IN_LIST _input) - list(APPEND _cppcheck_args ${CPPCHECK_UNUSEDFUNC_ARG}) - list(REMOVE_ITEM _input UNUSED_FUNCTIONS) - endif() - - if(STYLE IN_LIST _input) - list(APPEND _cppcheck_args ${CPPCHECK_STYLE_ARG}) - list(REMOVE_ITEM _input STYLE) - endif() - - if(INFORMATION IN_LIST _input) - list(APPEND _cppcheck_args ${CPPCHECK_INFORMATION_ARG}) - list(REMOVE_ITEM _input INFORMATION) - endif() - - if(MISSING_INCLUDE IN_LIST _input) - list(APPEND _cppcheck_args ${CPPCHECK_MISSING_INCLUDE_ARG}) - list(REMOVE_ITEM _input MISSING_INCLUDE) - endif() - - if(FAIL_ON_WARNINGS IN_LIST _input) - list(APPEND _cppcheck_args - CPPCHECK_FAIL_REGULAR_EXPRESSION - ${CPPCHECK_WARN_REGULAR_EXPRESSION}) - list(REMOVE_ITEM _input FAIL_ON_WARNINGS) - endif() + if(FORCE IN_LIST _input) + list(APPEND _cppcheck_args ${CPPCHECK_FORCE_ARG}) + list(REMOVE_ITEM _input FORCE) + endif() + + if(VERBOSE IN_LIST _input) + list(APPEND _cppcheck_args ${CPPCHECK_VERBOSE_ARG}) + list(REMOVE_ITEM _input VERBOSE) + endif() + + if(QUIET IN_LIST _input) + list(APPEND _cppcheck_args ${CPPCHECK_QUIET_ARG}) + list(REMOVE_ITEM _input QUIET) + endif() + + if(ALL IN_LIST _input) + list(APPEND _cppcheck_args ${CPPCHECK_ALL_ARG}) + list(REMOVE_ITEM _input ALL) + endif() + + if(UNUSED_FUNCTIONS IN_LIST _input) + list(APPEND _cppcheck_args ${CPPCHECK_UNUSEDFUNC_ARG}) + list(REMOVE_ITEM _input UNUSED_FUNCTIONS) + endif() + + if(STYLE IN_LIST _input) + list(APPEND _cppcheck_args ${CPPCHECK_STYLE_ARG}) + list(REMOVE_ITEM _input STYLE) + endif() + + if(INFORMATION IN_LIST _input) + list(APPEND _cppcheck_args ${CPPCHECK_INFORMATION_ARG}) + list(REMOVE_ITEM _input INFORMATION) + endif() + + if(MISSING_INCLUDE IN_LIST _input) + list(APPEND _cppcheck_args ${CPPCHECK_MISSING_INCLUDE_ARG}) + list(REMOVE_ITEM _input MISSING_INCLUDE) + endif() + + if(FAIL_ON_WARNINGS IN_LIST _input) + list( + APPEND + _cppcheck_args + CPPCHECK_FAIL_REGULAR_EXPRESSION + ${CPPCHECK_WARN_REGULAR_EXPRESSION}) + list(REMOVE_ITEM _input FAIL_ON_WARNINGS) + endif() endmacro() # ------------------------------------------------------------------------------ # add_cppcheck_dir -function(add_cppcheck_dir _name _dir _include_dirs) +function( + add_cppcheck_dir + _name + _dir + _include_dirs) if(CPPCHECK_FOUND) set(_cppcheck_args) set(_input ${ARGN}) @@ -112,35 +118,24 @@ function(add_cppcheck_dir _name _dir _include_dirs) itk_add_test( NAME - ${_name}CPPCheckTest + ${_name}CPPCheckTest COMMAND - "${CPPCHECK_EXECUTABLE}" - ${CPPCHECK_TEMPLATE_ARG} - ${_cppcheck_args} - ${_cppcheck_compile_args} - ${_dir} - ) - - set_tests_properties(${_name}CPPCheckTest - PROPERTIES - FAIL_REGULAR_EXPRESSION - "${CPPCHECK_FAIL_REGULAR_EXPRESSION}") - - add_custom_command(TARGET - all_cppcheck - PRE_BUILD - COMMAND - ${CPPCHECK_EXECUTABLE} - ${CPPCHECK_QUIET_ARG} + "${CPPCHECK_EXECUTABLE}" ${CPPCHECK_TEMPLATE_ARG} ${_cppcheck_args} ${_cppcheck_compile_args} - ${_dir} - WORKING_DIRECTORY - "${_dir}" - COMMENT - "${_name}_cppcheck: Running cppcheck on ${_dir}..." - VERBATIM) + ${_dir}) + + set_tests_properties(${_name}CPPCheckTest PROPERTIES FAIL_REGULAR_EXPRESSION "${CPPCHECK_FAIL_REGULAR_EXPRESSION}") + + add_custom_command( + TARGET all_cppcheck + PRE_BUILD + COMMAND ${CPPCHECK_EXECUTABLE} ${CPPCHECK_QUIET_ARG} ${CPPCHECK_TEMPLATE_ARG} ${_cppcheck_args} + ${_cppcheck_compile_args} ${_dir} + WORKING_DIRECTORY "${_dir}" + COMMENT "${_name}_cppcheck: Running cppcheck on ${_dir}..." + VERBATIM) endif() endfunction() @@ -159,7 +154,7 @@ function(add_cppcheck_sources _targetname) foreach(_source ${_input}) get_source_file_property(_cppcheck_loc "${_source}" LOCATION) if(_cppcheck_loc) - # This file has a source file property, carry on. + # This file has a source file property, carry on. get_source_file_property(_cppcheck_lang "${_source}" LANGUAGE) if("${_cppcheck_lang}" MATCHES "CXX") list(APPEND _files "${_cppcheck_loc}") @@ -170,17 +165,20 @@ function(add_cppcheck_sources _targetname) if(EXISTS "${_cppcheck_loc}") list(APPEND _files "${_cppcheck_loc}") else() - message(FATAL_ERROR - "Adding CPPCHECK for file target ${_targetname}: " - "File ${_source} does not exist or needs a corrected path location " - "since we think its absolute path is ${_cppcheck_loc}") + message( + FATAL_ERROR + "Adding CPPCHECK for file target ${_targetname}: " + "File ${_source} does not exist or needs a corrected path location " + "since we think its absolute path is ${_cppcheck_loc}") endif() endif() endforeach() # let's take of include dirs here - get_property(mytargINCLUDES DIRECTORY - "${CMAKE_CURRENT_SOURCE_DIR}" PROPERTY INCLUDE_DIRECTORIES) + get_property( + mytargINCLUDES + DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + PROPERTY INCLUDE_DIRECTORIES) set(_cppcheck_include) foreach(_includeDirs ${mytargINCLUDES}) @@ -191,8 +189,10 @@ function(add_cppcheck_sources _targetname) # let's take of compile definitions here # NOTE: it does not work, you need to get all definitions by # another way - get_property(mytargDEFINITIONS DIRECTORY - "${CMAKE_CURRENT_SOURCE_DIR}" PROPERTY COMPILE_DEFINITIONS) + get_property( + mytargDEFINITIONS + DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + PROPERTY COMPILE_DEFINITIONS) set(_cppcheck_def) foreach(_compiledef ${mytargDEFINITIONS}) @@ -204,34 +204,25 @@ function(add_cppcheck_sources _targetname) itk_add_test( NAME - ${_targetname}CPPCheckTest + ${_targetname}CPPCheckTest COMMAND - "${CPPCHECK_EXECUTABLE}" - ${CPPCHECK_TEMPLATE_ARG} - ${_cppcheck_args} - ${_cppcheck_compile_args} - ${_files}) - - set_tests_properties(${_targetname}CPPCheckTest - PROPERTIES - FAIL_REGULAR_EXPRESSION - "${CPPCHECK_FAIL_REGULAR_EXPRESSION}") - - add_custom_command(TARGET - all_cppcheck - PRE_BUILD - COMMAND - ${CPPCHECK_EXECUTABLE} - ${CPPCHECK_QUIET_ARG} + "${CPPCHECK_EXECUTABLE}" ${CPPCHECK_TEMPLATE_ARG} ${_cppcheck_args} ${_cppcheck_compile_args} - ${_files} - WORKING_DIRECTORY - "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT - "${_targetname}_cppcheck: Running cppcheck on target ${_targetname}..." - VERBATIM) + ${_files}) + + set_tests_properties(${_targetname}CPPCheckTest PROPERTIES FAIL_REGULAR_EXPRESSION + "${CPPCHECK_FAIL_REGULAR_EXPRESSION}") + + add_custom_command( + TARGET all_cppcheck + PRE_BUILD + COMMAND ${CPPCHECK_EXECUTABLE} ${CPPCHECK_QUIET_ARG} ${CPPCHECK_TEMPLATE_ARG} ${_cppcheck_args} + ${_cppcheck_compile_args} ${_files} + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "${_targetname}_cppcheck: Running cppcheck on target ${_targetname}..." + VERBATIM) endif() endfunction() @@ -239,8 +230,7 @@ endfunction() # add_cppcheck function(add_cppcheck _name) if(NOT TARGET ${_name}) - message(FATAL_ERROR - "add_cppcheck given a target name that does not exist: '${_name}' !") + message(FATAL_ERROR "add_cppcheck given a target name that does not exist: '${_name}' !") endif() if(CPPCHECK_FOUND) set(_cppcheck_args) @@ -259,8 +249,10 @@ function(add_cppcheck _name) endforeach() # let's take of include dirs here - get_property(mytargINCLUDES DIRECTORY - "${CMAKE_CURRENT_SOURCE_DIR}" PROPERTY INCLUDE_DIRECTORIES) + get_property( + mytargINCLUDES + DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + PROPERTY INCLUDE_DIRECTORIES) set(_cppcheck_include) foreach(_includeDirs ${mytargINCLUDES}) @@ -269,8 +261,10 @@ function(add_cppcheck _name) # -------------------------------------------------------------- # let's take of compile definitions here - get_property(mytargDEFINITIONS DIRECTORY - "${CMAKE_CURRENT_SOURCE_DIR}" PROPERTY COMPILE_DEFINITIONS) + get_property( + mytargDEFINITIONS + DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + PROPERTY COMPILE_DEFINITIONS) set(_cppcheck_def) foreach(_compiledef ${mytargDEFINITIONS}) @@ -280,35 +274,25 @@ function(add_cppcheck _name) # -------------------------------------------------------------- set(_cppcheck_compile_args --check-config ${_cppcheck_include} ${_cppcheck_def}) - itk_add_test( - NAME - ${_name}CPPCheckTest - COMMAND - "${CPPCHECK_EXECUTABLE}" - ${CPPCHECK_TEMPLATE_ARG} - ${_cppcheck_args} - ${_cppcheck_compile_args} - ${_files}) - - set_tests_properties(${_name}CPPCheckTest - PROPERTIES - FAIL_REGULAR_EXPRESSION - "${CPPCHECK_FAIL_REGULAR_EXPRESSION}") - - add_custom_command(TARGET - all_cppcheck - PRE_BUILD - COMMAND - ${CPPCHECK_EXECUTABLE} - ${CPPCHECK_QUIET_ARG} - ${CPPCHECK_TEMPLATE_ARG} - ${_cppcheck_args} - ${_files} - WORKING_DIRECTORY - "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT - "${_name}_cppcheck: Running cppcheck on target ${_name}..." - VERBATIM) - endif() + itk_add_test( + NAME + ${_name}CPPCheckTest + COMMAND + "${CPPCHECK_EXECUTABLE}" + ${CPPCHECK_TEMPLATE_ARG} + ${_cppcheck_args} + ${_cppcheck_compile_args} + ${_files}) + + set_tests_properties(${_name}CPPCheckTest PROPERTIES FAIL_REGULAR_EXPRESSION "${CPPCHECK_FAIL_REGULAR_EXPRESSION}") + + add_custom_command( + TARGET all_cppcheck + PRE_BUILD + COMMAND ${CPPCHECK_EXECUTABLE} ${CPPCHECK_QUIET_ARG} ${CPPCHECK_TEMPLATE_ARG} ${_cppcheck_args} ${_files} + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "${_name}_cppcheck: Running cppcheck on target ${_name}..." + VERBATIM) + endif() endfunction() diff --git a/CMake/FindFFTW.cmake b/CMake/FindFFTW.cmake index c8d0e72bf04..709c0cd89ea 100644 --- a/CMake/FindFFTW.cmake +++ b/CMake/FindFFTW.cmake @@ -49,18 +49,19 @@ if(ITK_USE_FFTWD OR ITK_USE_FFTWF) else() message(FATAL_ERROR "System not supported for MKL.") endif() - set(MKLROOT ${MKLROOT_default} CACHE PATH "Intel path containing MKL") + set(MKLROOT + ${MKLROOT_default} + CACHE PATH "Intel path containing MKL") set(FFTW_INC_SEARCHPATH ${MKLROOT}/include/fftw) else() set(FFTW_INC_SEARCHPATH - ${FFTW3f_INCLUDE_DIRS} # Defined in fftwf local build - ${FFTW3_INCLUDE_DIRS} # Defined in fftwd local build - /sw/include - /usr/include - /usr/local/include - /usr/include/fftw - /usr/local/include/fftw - ) + ${FFTW3f_INCLUDE_DIRS} # Defined in fftwf local build + ${FFTW3_INCLUDE_DIRS} # Defined in fftwd local build + /sw/include + /usr/include + /usr/local/include + /usr/include/fftw + /usr/local/include/fftw) endif() if(ITK_USE_CUFFTW) @@ -92,15 +93,15 @@ if(ITK_USE_FFTWD OR ITK_USE_FFTWF) # '''Disabled''': `ITK_USE_TBB_WITH_MKL`. To configure MKL with TBB, the TBB library # has to be found. This is not currently taken care of as part of this file and may # result in conflicts if `Module_ITKTBB` is ON. -# if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") -# # See MKL configuration help page: -# # https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor -# message("TBB threading option not available with Clang compiler.") -# set(ITK_USE_TBB_WITH_MKL OFF CACHE BOOL "Use TBB threading in MKL" FORCE) -# else() -# option(ITK_USE_TBB_WITH_MKL "Use TBB threading in MKL" ON) -# mark_as_advanced(ITK_USE_TBB_WITH_MKL) -# endif() + # if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + # # See MKL configuration help page: + # # https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor + # message("TBB threading option not available with Clang compiler.") + # set(ITK_USE_TBB_WITH_MKL OFF CACHE BOOL "Use TBB threading in MKL" FORCE) + # else() + # option(ITK_USE_TBB_WITH_MKL "Use TBB threading in MKL" ON) + # mark_as_advanced(ITK_USE_TBB_WITH_MKL) + # endif() if(CMAKE_SIZEOF_VOID_P EQUAL "8") if(APPLE) @@ -125,11 +126,11 @@ if(ITK_USE_FFTWD OR ITK_USE_FFTWF) set(MKL_EXTRA_LIBRARIES mkl_core) # Force to sequential for now. list(APPEND MKL_EXTRA_LIBRARIES mkl_sequential) -# if(ITK_USE_TBB_WITH_MKL) -# list(APPEND MKL_EXTRA_LIBRARIES mkl_tbb_thread) -# else() -# list(APPEND MKL_EXTRA_LIBRARIES mkl_sequential) -# endif() + # if(ITK_USE_TBB_WITH_MKL) + # list(APPEND MKL_EXTRA_LIBRARIES mkl_tbb_thread) + # else() + # list(APPEND MKL_EXTRA_LIBRARIES mkl_sequential) + # endif() set(FFTW_LIBRARY_NAMES ${MKL_LIBRARY} ${MKL_EXTRA_LIBRARIES}) macro(FFTWD_LIBRARIES_START) @@ -144,17 +145,23 @@ if(ITK_USE_FFTWD OR ITK_USE_FFTWF) macro(FFTWD_LIBRARIES_END) if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - list(APPEND FFTWD_LIBRARIES -Wl,--end-group -lpthread -lm -ldl) - # Force to sequential for now. -# if(ITK_USE_TBB_WITH_MKL) -# list(APPEND FFTWD_LIBRARIES -ltbb -lstdc++) -# endif() + list( + APPEND + FFTWD_LIBRARIES + -Wl,--end-group + -lpthread + -lm + -ldl) + # Force to sequential for now. + # if(ITK_USE_TBB_WITH_MKL) + # list(APPEND FFTWD_LIBRARIES -ltbb -lstdc++) + # endif() endif() endmacro() # Because of circular dependencies between the libraries, we need to use # --start-group and --end-group on UNIX. - FFTWD_LIBRARIES_START() + fftwd_libraries_start() foreach(LIB ${FFTW_LIBRARY_NAMES}) string(TOUPPER ${LIB} LIB_UPPER) mark_as_advanced(${LIB_UPPER}_LIB) @@ -167,27 +174,28 @@ if(ITK_USE_FFTWD OR ITK_USE_FFTWF) message(FATAL_ERROR "${LIB_NAME} not found.") endif() endforeach() - FFTWD_LIBRARIES_END() + fftwd_libraries_end() add_compile_options(${MKL_OPTIONS}) else() get_filename_component(FFTW_INSTALL_BASE_PATH ${FFTW_INCLUDE_PATH} PATH) set(FFTW_LIB_SEARCHPATH - ${FFTW3f_LIBRARY_DIRS} # Defined in fftwf local build - ${FFTW3_LIBRARY_DIRS} # Defined in fftwd local build - ${FFTW_INSTALL_BASE_PATH}/lib - ${FFTW_INSTALL_BASE_PATH}/lib64 - /usr/lib/fftw - /usr/local/lib/fftw - ) + ${FFTW3f_LIBRARY_DIRS} # Defined in fftwf local build + ${FFTW3_LIBRARY_DIRS} # Defined in fftwd local build + ${FFTW_INSTALL_BASE_PATH}/lib + ${FFTW_INSTALL_BASE_PATH}/lib64 + /usr/lib/fftw + /usr/local/lib/fftw) unset(FFTWD_FOUND) if(ITK_USE_FFTWD) mark_as_advanced(FFTWD_BASE_LIB FFTWD_THREADS_LIB FFTWD_LIBRARIES) find_library(FFTWD_BASE_LIB fftw3 ${FFTW_LIB_SEARCHPATH}) #Double Precision Lib - find_library(FFTWD_THREADS_LIB fftw3_threads ${FFTW_LIB_SEARCHPATH}) #Double Precision Lib only if compiled with threads support + find_library(FFTWD_THREADS_LIB fftw3_threads ${FFTW_LIB_SEARCHPATH} + )#Double Precision Lib only if compiled with threads support if(FFTWD_BASE_LIB) set(FFTWD_FOUND 1) - get_filename_component(FFTW_LIBDIR ${FFTWD_BASE_LIB} PATH) #NOTE FFTWD_BASE_LIB and FFTWF_BASE_LIB must be installed in the same location + get_filename_component(FFTW_LIBDIR ${FFTWD_BASE_LIB} PATH + )#NOTE FFTWD_BASE_LIB and FFTWF_BASE_LIB must be installed in the same location get_filename_component(FFTWD_BASE_LIB ${FFTWD_BASE_LIB} NAME) get_filename_component(FFTWD_THREADS_LIB ${FFTWD_THREADS_LIB} NAME) set(FFTWD_LIBRARIES ${FFTWD_BASE_LIB}) @@ -203,11 +211,13 @@ if(ITK_USE_FFTWD OR ITK_USE_FFTWF) if(ITK_USE_FFTWF) mark_as_advanced(FFTWF_BASE_LIB FFTWF_THREADS_LIB FFTWF_LIBRARIES) find_library(FFTWF_BASE_LIB fftw3f ${FFTW_LIB_SEARCHPATH}) #Single Precision Lib - find_library(FFTWF_THREADS_LIB fftw3f_threads ${FFTW_LIB_SEARCHPATH}) #Single Precision Lib only if compiled with threads support + find_library(FFTWF_THREADS_LIB fftw3f_threads ${FFTW_LIB_SEARCHPATH} + )#Single Precision Lib only if compiled with threads support if(FFTWF_BASE_LIB) set(FFTWF_FOUND 1) - get_filename_component(FFTW_LIBDIR ${FFTWF_BASE_LIB} PATH) #NOTE FFTWD_BASE_LIB and FFTWF_BASE_LIB must be installed in the same location + get_filename_component(FFTW_LIBDIR ${FFTWF_BASE_LIB} PATH + )#NOTE FFTWD_BASE_LIB and FFTWF_BASE_LIB must be installed in the same location get_filename_component(FFTWF_BASE_LIB ${FFTWF_BASE_LIB} NAME) get_filename_component(FFTWF_THREADS_LIB ${FFTWF_THREADS_LIB} NAME) set(FFTWF_LIBRARIES ${FFTWF_BASE_LIB}) diff --git a/CMake/FindKWStyle.cmake b/CMake/FindKWStyle.cmake index 486a3acbc8c..0a1526bc3e5 100644 --- a/CMake/FindKWStyle.cmake +++ b/CMake/FindKWStyle.cmake @@ -20,25 +20,21 @@ find_program( KWSTYLE_EXECUTABLE NAMES KWStyle - DOC "Path to the KWStyle executable" - ) + DOC "Path to the KWStyle executable") mark_as_advanced(KWSTYLE_EXECUTABLE) if(KWSTYLE_EXECUTABLE) execute_process( COMMAND ${KWSTYLE_EXECUTABLE} -version OUTPUT_VARIABLE KWSTYLE_VERSION_STRING - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE - ) + ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) if(KWSTYLE_VERSION_STRING) # string(REPLACE ..) fails if the input is an empty string - string(REPLACE - "Version: " - "" - KWSTYLE_VERSION_STRING - ${KWSTYLE_VERSION_STRING} - ) + string( + REPLACE "Version: " + "" + KWSTYLE_VERSION_STRING + ${KWSTYLE_VERSION_STRING}) else() # CMake's find_package_handle_standard_args has a bug where the # version empty string ("") is always acceptable @@ -50,5 +46,4 @@ include(FindPackageHandleStandardArgs) find_package_handle_standard_args( KWStyle REQUIRED_VARS KWSTYLE_EXECUTABLE - VERSION_VAR KWSTYLE_VERSION_STRING - ) + VERSION_VAR KWSTYLE_VERSION_STRING) diff --git a/CMake/Findcppcheck.cmake b/CMake/Findcppcheck.cmake index 9fc0d911694..12582534074 100644 --- a/CMake/Findcppcheck.cmake +++ b/CMake/Findcppcheck.cmake @@ -29,10 +29,8 @@ file(TO_CMAKE_PATH "${CPPCHECK_ROOT_DIR}" CPPCHECK_ROOT_DIR) set(CPPCHECK_ROOT_DIR - "${CPPCHECK_ROOT_DIR}" - CACHE - PATH - "Path to search for cppcheck") + "${CPPCHECK_ROOT_DIR}" + CACHE PATH "Path to search for cppcheck") mark_as_advanced(CPPCHECK_ROOT_DIR) # cppcheck app bundles on Mac OS X are GUI, we want command line only @@ -41,14 +39,11 @@ set(CMAKE_FIND_APPBUNDLE NEVER) # If we have a custom path, look there first. if(CPPCHECK_ROOT_DIR) - find_program(CPPCHECK_EXECUTABLE - NAMES - cppcheck - cli - PATHS - "${CPPCHECK_ROOT_DIR}" - PATH_SUFFIXES - cli + find_program( + CPPCHECK_EXECUTABLE + NAMES cppcheck cli + PATHS "${CPPCHECK_ROOT_DIR}" + PATH_SUFFIXES cli NO_DEFAULT_PATH) endif() @@ -71,16 +66,10 @@ if(CPPCHECK_EXECUTABLE) set(CPPCHECK_ALL_ARG --enable=all) # Check for the two types of command line arguments by just trying them - execute_process(COMMAND - ${CPPCHECK_EXECUTABLE} - --enable=style - ${CPPCHECK_QUIET_ARG} - ${_cppcheckdummyfile} - RESULT_VARIABLE - _cppcheck_enable_style_result - OUTPUT_QUIET - ERROR_QUIET - ) + execute_process( + COMMAND ${CPPCHECK_EXECUTABLE} --enable=style ${CPPCHECK_QUIET_ARG} ${_cppcheckdummyfile} + RESULT_VARIABLE _cppcheck_enable_style_result + OUTPUT_QUIET ERROR_QUIET) if("${_cppcheck_enable_style_result}" EQUAL 0) @@ -104,30 +93,18 @@ if(CPPCHECK_EXECUTABLE) endif() - execute_process(COMMAND - ${CPPCHECK_EXECUTABLE} - --enable=unusedFunctions - ${CPPCHECK_QUIET_ARG} - ${_cppcheckdummyfile} - RESULT_VARIABLE - _cppcheck_enable_unused_functions_results - OUTPUT_QUIET - ERROR_QUIET - ) + execute_process( + COMMAND ${CPPCHECK_EXECUTABLE} --enable=unusedFunctions ${CPPCHECK_QUIET_ARG} ${_cppcheckdummyfile} + RESULT_VARIABLE _cppcheck_enable_unused_functions_results + OUTPUT_QUIET ERROR_QUIET) if("${_cppcheck_enable_unused_functions_results}" EQUAL 0) set(CPPCHECK_UNUSEDFUNC_ARG --enable=unusedFunctions) else() - execute_process(COMMAND - ${CPPCHECK_EXECUTABLE} - --enable=unusedFunction - ${CPPCHECK_QUIET_ARG} - ${_cppcheckdummyfile} - RESULT_VARIABLE - _cppcheck_enable_unused_function_results - OUTPUT_QUIET - ERROR_QUIET - ) + execute_process( + COMMAND ${CPPCHECK_EXECUTABLE} --enable=unusedFunction ${CPPCHECK_QUIET_ARG} ${_cppcheckdummyfile} + RESULT_VARIABLE _cppcheck_enable_unused_function_results + OUTPUT_QUIET ERROR_QUIET) if("${_cppcheck_enable_unused_function_results}" EQUAL 0) set(CPPCHECK_UNUSEDFUNC_ARG --enable=unusedFunction) @@ -137,16 +114,10 @@ if(CPPCHECK_EXECUTABLE) endif() - execute_process(COMMAND - ${CPPCHECK_EXECUTABLE} - --enable=information - ${CPPCHECK_QUIET_ARG} - ${_cppcheckdummyfile} - RESULT_VARIABLE - _cppcheck_enable_information_results - OUTPUT_QUIET - ERROR_QUIET - ) + execute_process( + COMMAND ${CPPCHECK_EXECUTABLE} --enable=information ${CPPCHECK_QUIET_ARG} ${_cppcheckdummyfile} + RESULT_VARIABLE _cppcheck_enable_information_results + OUTPUT_QUIET ERROR_QUIET) if("${_cppcheck_enable_information_results}" EQUAL 0) # supported since @@ -155,16 +126,10 @@ if(CPPCHECK_EXECUTABLE) set(CPPCHECK_INFORMATION_ARG) endif() - execute_process(COMMAND - ${CPPCHECK_EXECUTABLE} - --enable=missingInclude - ${CPPCHECK_QUIET_ARG} - ${_cppcheckdummyfile} - RESULT_VARIABLE - _cppcheck_missingInclude_results - OUTPUT_QUIET - ERROR_QUIET - ) + execute_process( + COMMAND ${CPPCHECK_EXECUTABLE} --enable=missingInclude ${CPPCHECK_QUIET_ARG} ${_cppcheckdummyfile} + RESULT_VARIABLE _cppcheck_missingInclude_results + OUTPUT_QUIET ERROR_QUIET) if("${_cppcheck_missingInclude_results}" EQUAL 0) # supported since @@ -176,10 +141,12 @@ if(CPPCHECK_EXECUTABLE) endif() set(CPPCHECK_ALL -"${CPPCHECK_EXECUTABLE} ${CPPCHECK_POSSIBLEERROR_ARG} ${CPPCHECK_UNUSEDFUNC_ARG} ${CPPCHECK_STYLE_ARG} ${CPPCHECK_QUIET_ARG} ${CPPCHECK_INCLUDEPATH_ARG} some/include/path") + "${CPPCHECK_EXECUTABLE} ${CPPCHECK_POSSIBLEERROR_ARG} ${CPPCHECK_UNUSEDFUNC_ARG} ${CPPCHECK_STYLE_ARG} ${CPPCHECK_QUIET_ARG} ${CPPCHECK_INCLUDEPATH_ARG} some/include/path" +) include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(cppcheck +find_package_handle_standard_args( + cppcheck DEFAULT_MSG CPPCHECK_ALL CPPCHECK_EXECUTABLE @@ -192,8 +159,7 @@ find_package_handle_standard_args(cppcheck CPPCHECK_DEFINITION_ARG CPPCHECK_QUIET_ARG CPPCHECK_FORCE_ARG - CPPCHECK_VERBOSE_ARG -) + CPPCHECK_VERBOSE_ARG) if(CPPCHECK_FOUND OR CPPCHECK_MARK_AS_ADVANCED) mark_as_advanced(CPPCHECK_ROOT_DIR) diff --git a/CMake/GetGitRevisionDescription.cmake b/CMake/GetGitRevisionDescription.cmake index d58dd09f60c..85bc7837cb7 100644 --- a/CMake/GetGitRevisionDescription.cmake +++ b/CMake/GetGitRevisionDescription.cmake @@ -31,7 +31,7 @@ # https://www.boost.org/LICENSE_1_0.txt) if(__get_git_revision_description) - return() + return() endif() set(__get_git_revision_description YES) @@ -42,57 +42,74 @@ get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH) find_package(Git QUIET) function(get_git_head_revision _refvar _hashvar) - if(NOT GIT_EXECUTABLE) - set(${_refvar} "GIT-NOTFOUND" PARENT_SCOPE) - set(${_hashvar} "GIT-NOTFOUND" PARENT_SCOPE) - return() - endif() + if(NOT GIT_EXECUTABLE) + set(${_refvar} + "GIT-NOTFOUND" + PARENT_SCOPE) + set(${_hashvar} + "GIT-NOTFOUND" + PARENT_SCOPE) + return() + endif() - set(src_dir ${PROJECT_SOURCE_DIR}) - set(bin_dir ${PROJECT_BINARY_DIR}) + set(src_dir ${PROJECT_SOURCE_DIR}) + set(bin_dir ${PROJECT_BINARY_DIR}) - execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --git-dir - WORKING_DIRECTORY ${src_dir} - OUTPUT_VARIABLE GIT_DIR - ERROR_VARIABLE error - RESULT_VARIABLE failed - OUTPUT_STRIP_TRAILING_WHITESPACE - ) + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse --git-dir + WORKING_DIRECTORY ${src_dir} + OUTPUT_VARIABLE GIT_DIR + ERROR_VARIABLE error + RESULT_VARIABLE failed + OUTPUT_STRIP_TRAILING_WHITESPACE) - if(NOT IS_ABSOLUTE "${GIT_DIR}") - set(GIT_DIR "${src_dir}/${GIT_DIR}") - endif() - if(failed OR NOT EXISTS "${GIT_DIR}/HEAD") - # not in git - set(${_refvar} "GITDIR-NOTFOUND" PARENT_SCOPE) - set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE) - return() - endif() - set(GIT_DATA "${bin_dir}/CMakeFiles/git-data") - if(NOT EXISTS "${GIT_DATA}") - file(MAKE_DIRECTORY "${GIT_DATA}") - endif() - configure_file("${GIT_DIR}/HEAD" "${GIT_DATA}/HEAD" COPYONLY) - - file(STRINGS "${GIT_DIR}/HEAD" head LIMIT_COUNT 1 LIMIT_INPUT 1024) - if("${head}" MATCHES "^ref: (.*)$") - set(HEAD_REF "${CMAKE_MATCH_1}") - if(EXISTS "${GIT_DIR}/${HEAD_REF}") - configure_file("${GIT_DIR}/${HEAD_REF}" "${GIT_DATA}/HEAD-REF" COPYONLY) - endif() - else() - set(HEAD_REF "") - endif() - execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD - WORKING_DIRECTORY ${src_dir} - OUTPUT_VARIABLE HEAD_HASH OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_VARIABLE error - RESULT_VARIABLE failed) - if(failed) - set(HEAD_HASH "HEAD-HASH-NOTFOUND") + if(NOT IS_ABSOLUTE "${GIT_DIR}") + set(GIT_DIR "${src_dir}/${GIT_DIR}") + endif() + if(failed OR NOT EXISTS "${GIT_DIR}/HEAD") + # not in git + set(${_refvar} + "GITDIR-NOTFOUND" + PARENT_SCOPE) + set(${_hashvar} + "GITDIR-NOTFOUND" + PARENT_SCOPE) + return() + endif() + set(GIT_DATA "${bin_dir}/CMakeFiles/git-data") + if(NOT EXISTS "${GIT_DATA}") + file(MAKE_DIRECTORY "${GIT_DATA}") + endif() + configure_file("${GIT_DIR}/HEAD" "${GIT_DATA}/HEAD" COPYONLY) + + file( + STRINGS "${GIT_DIR}/HEAD" head + LIMIT_COUNT 1 + LIMIT_INPUT 1024) + if("${head}" MATCHES "^ref: (.*)$") + set(HEAD_REF "${CMAKE_MATCH_1}") + if(EXISTS "${GIT_DIR}/${HEAD_REF}") + configure_file("${GIT_DIR}/${HEAD_REF}" "${GIT_DATA}/HEAD-REF" COPYONLY) endif() - set(${_refvar} "${HEAD_REF}" PARENT_SCOPE) - set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE) + else() + set(HEAD_REF "") + endif() + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse HEAD + WORKING_DIRECTORY ${src_dir} + OUTPUT_VARIABLE HEAD_HASH + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_VARIABLE error + RESULT_VARIABLE failed) + if(failed) + set(HEAD_HASH "HEAD-HASH-NOTFOUND") + endif() + set(${_refvar} + "${HEAD_REF}" + PARENT_SCOPE) + set(${_hashvar} + "${HEAD_HASH}" + PARENT_SCOPE) endfunction() # get the number of commits since the file has last been modified @@ -101,146 +118,192 @@ function(git_commits_since file _commits) set(src_dir ${PROJECT_SOURCE_DIR}) - execute_process(COMMAND ${GIT_EXECUTABLE} rev-list ${head} -n 1 -- ${file} + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-list ${head} -n 1 -- ${file} WORKING_DIRECTORY ${src_dir} - OUTPUT_VARIABLE tag OUTPUT_STRIP_TRAILING_WHITESPACE + OUTPUT_VARIABLE tag + OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_VARIABLE error - RESULT_VARIABLE failed - ) + RESULT_VARIABLE failed) if(failed) set(tag "") endif() - execute_process(COMMAND ${GIT_EXECUTABLE} rev-list ${tag}..${head} + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-list ${tag}..${head} WORKING_DIRECTORY ${src_dir} - OUTPUT_VARIABLE rev_list OUTPUT_STRIP_TRAILING_WHITESPACE + OUTPUT_VARIABLE rev_list + OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_VARIABLE error - RESULT_VARIABLE failed - ) + RESULT_VARIABLE failed) if(failed) set(rev_list "") endif() - string(REGEX MATCHALL "[a-fA-F0-9]+" rev_list "${rev_list}") + string( + REGEX MATCHALL + "[a-fA-F0-9]+" + rev_list + "${rev_list}") list(LENGTH rev_list COUNT) - set(${_commits} "${COUNT}" PARENT_SCOPE) + set(${_commits} + "${COUNT}" + PARENT_SCOPE) endfunction() function(git_describe _var) - get_git_head_revision(refspec hash) - if(NOT GIT_FOUND) - set(${_var} "GIT-NOTFOUND" PARENT_SCOPE) - return() - endif() - if(NOT hash) - set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE) - return() - endif() + get_git_head_revision(refspec hash) + if(NOT GIT_FOUND) + set(${_var} + "GIT-NOTFOUND" + PARENT_SCOPE) + return() + endif() + if(NOT hash) + set(${_var} + "HEAD-HASH-NOTFOUND" + PARENT_SCOPE) + return() + endif() - set(src_dir ${PROJECT_SOURCE_DIR}) - - # TODO sanitize - #if((${ARGN}" MATCHES "&&") OR - # (ARGN MATCHES "||") OR - # (ARGN MATCHES "\\;")) - # message("Please report the following error to the project!") - # message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}") - #endif() - - #message(STATUS "Arguments to execute_process: ${ARGN}") - - execute_process(COMMAND "${GIT_EXECUTABLE}" describe ${hash} ${ARGN} - WORKING_DIRECTORY "${src_dir}" - RESULT_VARIABLE res - OUTPUT_VARIABLE out - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - if(NOT res EQUAL 0) - set(out "${out}-${res}-NOTFOUND") - endif() + set(src_dir ${PROJECT_SOURCE_DIR}) + + # TODO sanitize + #if((${ARGN}" MATCHES "&&") OR + # (ARGN MATCHES "||") OR + # (ARGN MATCHES "\\;")) + # message("Please report the following error to the project!") + # message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}") + #endif() - set(${_var} "${out}" PARENT_SCOPE) + #message(STATUS "Arguments to execute_process: ${ARGN}") + + execute_process( + COMMAND "${GIT_EXECUTABLE}" describe ${hash} ${ARGN} + WORKING_DIRECTORY "${src_dir}" + RESULT_VARIABLE res + OUTPUT_VARIABLE out + ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) + if(NOT + res + EQUAL + 0) + set(out "${out}-${res}-NOTFOUND") + endif() + + set(${_var} + "${out}" + PARENT_SCOPE) endfunction() function(git_get_exact_tag _var) - git_describe(out --exact-match ${ARGN}) - set(${_var} "${out}" PARENT_SCOPE) + git_describe(out --exact-match ${ARGN}) + set(${_var} + "${out}" + PARENT_SCOPE) endfunction() function(git_head_date _var) - get_git_head_revision(refspec hash) - if(NOT GIT_FOUND) - set(${_var} "GIT-NOTFOUND" PARENT_SCOPE) - return() - endif() - if(NOT hash) - set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE) - return() - endif() + get_git_head_revision(refspec hash) + if(NOT GIT_FOUND) + set(${_var} + "GIT-NOTFOUND" + PARENT_SCOPE) + return() + endif() + if(NOT hash) + set(${_var} + "HEAD-HASH-NOTFOUND" + PARENT_SCOPE) + return() + endif() - set(src_dir ${PROJECT_SOURCE_DIR}) - execute_process(COMMAND "${GIT_EXECUTABLE}" show -s --format=%ci ${hash} ${ARGN} - WORKING_DIRECTORY "${src_dir}" - RESULT_VARIABLE res - OUTPUT_VARIABLE out - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - if(NOT res EQUAL 0) - set(out "${out}-${res}-NOTFOUND") - endif() + set(src_dir ${PROJECT_SOURCE_DIR}) + execute_process( + COMMAND "${GIT_EXECUTABLE}" show -s --format=%ci ${hash} ${ARGN} + WORKING_DIRECTORY "${src_dir}" + RESULT_VARIABLE res + OUTPUT_VARIABLE out + ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) + if(NOT + res + EQUAL + 0) + set(out "${out}-${res}-NOTFOUND") + endif() - set(${_var} "${out}" PARENT_SCOPE) + set(${_var} + "${out}" + PARENT_SCOPE) endfunction() function(git_head_date _var) - get_git_head_revision(refspec hash) - if(NOT GIT_FOUND) - set(${_var} "GIT-NOTFOUND" PARENT_SCOPE) - return() - endif() - if(NOT hash) - set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE) - return() - endif() + get_git_head_revision(refspec hash) + if(NOT GIT_FOUND) + set(${_var} + "GIT-NOTFOUND" + PARENT_SCOPE) + return() + endif() + if(NOT hash) + set(${_var} + "HEAD-HASH-NOTFOUND" + PARENT_SCOPE) + return() + endif() - set(src_dir ${PROJECT_SOURCE_DIR}) - execute_process(COMMAND "${GIT_EXECUTABLE}" show -s --format=%ci ${hash} ${ARGN} - WORKING_DIRECTORY "${src_dir}" - RESULT_VARIABLE res - OUTPUT_VARIABLE out - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - if(NOT res EQUAL 0) - set(out "${out}-${res}-NOTFOUND") - endif() - set(${_var} "${out}" PARENT_SCOPE) + set(src_dir ${PROJECT_SOURCE_DIR}) + execute_process( + COMMAND "${GIT_EXECUTABLE}" show -s --format=%ci ${hash} ${ARGN} + WORKING_DIRECTORY "${src_dir}" + RESULT_VARIABLE res + OUTPUT_VARIABLE out + ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) + if(NOT + res + EQUAL + 0) + set(out "${out}-${res}-NOTFOUND") + endif() + set(${_var} + "${out}" + PARENT_SCOPE) endfunction() function(git_head_localmods _var) - get_git_head_revision(refspec hash) - if(NOT GIT_FOUND) - set(${_var} "GIT-NOTFOUND" PARENT_SCOPE) - return() - endif() - if(NOT hash) - set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE) - return() - endif() + get_git_head_revision(refspec hash) + if(NOT GIT_FOUND) + set(${_var} + "GIT-NOTFOUND" + PARENT_SCOPE) + return() + endif() + if(NOT hash) + set(${_var} + "HEAD-HASH-NOTFOUND" + PARENT_SCOPE) + return() + endif() - set(src_dir ${PROJECT_SOURCE_DIR}) - ## Determine if there are local modifications to the HEAD - execute_process(COMMAND ${GIT_EXECUTABLE} diff --shortstat HEAD - WORKING_DIRECTORY ${src_dir} - RESULT_VARIABLE res - OUTPUT_VARIABLE out - ERROR_VARIABLE error - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - if(NOT res EQUAL 0) - set(out "${out}-${res}-NOTFOUND") - endif() - set(${_var} "${out}" PARENT_SCOPE) + set(src_dir ${PROJECT_SOURCE_DIR}) + ## Determine if there are local modifications to the HEAD + execute_process( + COMMAND ${GIT_EXECUTABLE} diff --shortstat HEAD + WORKING_DIRECTORY ${src_dir} + RESULT_VARIABLE res + OUTPUT_VARIABLE out + ERROR_VARIABLE error + OUTPUT_STRIP_TRAILING_WHITESPACE) + if(NOT + res + EQUAL + 0) + set(out "${out}-${res}-NOTFOUND") + endif() + set(${_var} + "${out}" + PARENT_SCOPE) endfunction() diff --git a/CMake/ITKClangFormatSetup.cmake b/CMake/ITKClangFormatSetup.cmake index c2231ae4cf9..74d4c7b9b71 100644 --- a/CMake/ITKClangFormatSetup.cmake +++ b/CMake/ITKClangFormatSetup.cmake @@ -11,7 +11,7 @@ option(ITK_USE_CLANG_FORMAT "Enable the use of clang-format enforce ITK coding style." ${BUILD_TESTING}) mark_as_advanced(ITK_USE_CLANG_FORMAT) -if ( ITK_USE_CLANG_FORMAT AND NOT EXISTS "${CLANG_FORMAT_EXECUTABLE}") +if(ITK_USE_CLANG_FORMAT AND NOT EXISTS "${CLANG_FORMAT_EXECUTABLE}") # Download pre-built binaries (about 2M) of clang-format extracted from # https://releases.llvm.org/download.html and cached on data.kitware.com # @@ -31,13 +31,13 @@ if ( ITK_USE_CLANG_FORMAT AND NOT EXISTS "${CLANG_FORMAT_EXECUTABLE}") # Android - Android NDK (GCC, Clang) # CrayLinuxEnvironment - Cray supercomputers (Cray compiler) # MSYS - Windows (MSYS2 shell native GCC) - if ( "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") + if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") set(CLANG_FORMAT_DOWNLOAD_URL "https://data.kitware.com/api/v1/file/5d274e88877dfcc902effc47/download") - elseif ( "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") - set(CLANG_FORMAT_DOWNLOAD_URL "https://data.kitware.com/api/v1/file/5d2b8775877dfcc902fd8236/download") - elseif ( "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") + set(CLANG_FORMAT_DOWNLOAD_URL "https://data.kitware.com/api/v1/file/5d2b8775877dfcc902fd8236/download") + elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") set(CLANG_FORMAT_DOWNLOAD_URL "https://data.kitware.com/api/v1/file/5d2b8c87877dfcc902fda594/download") - else () + else() message(FATAL_ERROR "UNKNOWN SYSTEM: Set CLANG_FORMAT_EXECUTABLE manually to the clang-format version 8.0 binary") endif() file(MAKE_DIRECTORY "${ITK_BINARY_DIR}/temp") @@ -46,16 +46,19 @@ if ( ITK_USE_CLANG_FORMAT AND NOT EXISTS "${CLANG_FORMAT_EXECUTABLE}") endif() set(CLANG_FORMAT_EXECUTABLE_NAME "clang-format-${CMAKE_SYSTEM_NAME}${exe}") file(DOWNLOAD "${CLANG_FORMAT_DOWNLOAD_URL}" "${ITK_BINARY_DIR}/temp/${CLANG_FORMAT_EXECUTABLE_NAME}") - file(COPY "${ITK_BINARY_DIR}/temp/${CLANG_FORMAT_EXECUTABLE_NAME}" - DESTINATION "${ITK_BINARY_DIR}" - FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) + file( + COPY "${ITK_BINARY_DIR}/temp/${CLANG_FORMAT_EXECUTABLE_NAME}" + DESTINATION "${ITK_BINARY_DIR}" + FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) unset(CLANG_FORMAT_DOWNLOAD_URL) - set(CLANG_FORMAT_EXECUTABLE "${ITK_BINARY_DIR}/${CLANG_FORMAT_EXECUTABLE_NAME}" CACHE FILEPATH "The binary for clang-format" FORCE) + set(CLANG_FORMAT_EXECUTABLE + "${ITK_BINARY_DIR}/${CLANG_FORMAT_EXECUTABLE_NAME}" + CACHE FILEPATH "The binary for clang-format" FORCE) endif() if(CLANG_FORMAT_EXECUTABLE) mark_as_advanced(CLANG_FORMAT_EXECUTABLE) endif() -if ( ITK_USE_CLANG_FORMAT AND NOT EXISTS "${CLANG_FORMAT_EXECUTABLE}") +if(ITK_USE_CLANG_FORMAT AND NOT EXISTS "${CLANG_FORMAT_EXECUTABLE}") message(FATAL_ERROR "Missing suitable clang-format executable, set CLANG_FORMAT_EXECUTABLE variable to version 8.0") unset(CLANG_FORMAT_EXECUTABLE) endif() diff --git a/CMake/ITKClangTidySetup.cmake b/CMake/ITKClangTidySetup.cmake index 0dc437385ce..327aa9a03d1 100644 --- a/CMake/ITKClangTidySetup.cmake +++ b/CMake/ITKClangTidySetup.cmake @@ -10,17 +10,29 @@ option(ITK_USE_CLANGTIDY "Enable the use of clang-tidy to enforce coding best pr mark_as_advanced(ITK_USE_CLANGTIDY) if(ITK_USE_CLANGTIDY) - if ( ITK_USE_CLANGTIDY AND NOT EXISTS "${CLANGTIDY_EXECUTABLE}") - find_program(CLANGTIDY_EXECUTABLE NAMES clang-tidy-13 clang-tidy-12 clang-tidy-11 clang-tidy-10 clang-tidy-9 clang-tidy-9 clang-tidy-8 clang-tidy) + if(ITK_USE_CLANGTIDY AND NOT EXISTS "${CLANGTIDY_EXECUTABLE}") + find_program( + CLANGTIDY_EXECUTABLE + NAMES clang-tidy-13 + clang-tidy-12 + clang-tidy-11 + clang-tidy-10 + clang-tidy-9 + clang-tidy-9 + clang-tidy-8 + clang-tidy) endif() if(CLANGTIDY_EXECUTABLE AND EXISTS "${CLANGTIDY_EXECUTABLE}") mark_as_advanced(CLANGTIDY_EXECUTABLE) set(CLANG_TIDY_CHECKS "-*,modernize-use-*") - set(CMAKE_CXX_CLANG_TIDY "${CLANGTIDY_EXECUTABLE};-checks=${CLANG_TIDY_CHECKS};-header-filter='${CMAKE_SOURCE_DIR}/Modules/*/*/include'") + set(CMAKE_CXX_CLANG_TIDY + "${CLANGTIDY_EXECUTABLE};-checks=${CLANG_TIDY_CHECKS};-header-filter='${CMAKE_SOURCE_DIR}/Modules/*/*/include'") # Compile commands are required by clang-tidy - set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "compile_commands.json file is needed by clang-tidy") + set(CMAKE_EXPORT_COMPILE_COMMANDS + ON + CACHE BOOL "compile_commands.json file is needed by clang-tidy") else() unset(CLANGTIDY_EXECUTABLE) unset(CMAKE_CXX_CLANG_TIDY) diff --git a/CMake/ITKDownloadSetup.cmake b/CMake/ITKDownloadSetup.cmake index a3f00a99f75..f9dc9439c45 100644 --- a/CMake/ITKDownloadSetup.cmake +++ b/CMake/ITKDownloadSetup.cmake @@ -21,11 +21,12 @@ endmacro() if(NOT ITK_FORBID_DOWNLOADS) find_package(Git) set(ITK_USE_GIT_PROTOCOL_default "OFF") - if (GIT_VERSION_STRING VERSION_LESS "1.7.10") + if(GIT_VERSION_STRING VERSION_LESS "1.7.10") # minimum version for https support set(ITK_USE_GIT_PROTOCOL_default "ON") endif() - option(ITK_USE_GIT_PROTOCOL "If behind a firewall turn this off to use https instead." ${ITK_USE_GIT_PROTOCOL_default}) + option(ITK_USE_GIT_PROTOCOL "If behind a firewall turn this off to use https instead." + ${ITK_USE_GIT_PROTOCOL_default}) mark_as_advanced(ITK_USE_GIT_PROTOCOL) set(git_protocol "https") if(ITK_USE_GIT_PROTOCOL) diff --git a/CMake/ITKFactoryRegistration.cmake b/CMake/ITKFactoryRegistration.cmake index fd54075f7d7..5c72e7d9bee 100644 --- a/CMake/ITKFactoryRegistration.cmake +++ b/CMake/ITKFactoryRegistration.cmake @@ -142,8 +142,6 @@ # after including ITK can have unintended side effects. # - - # _itk_configure_FactoryRegisterManager( ) # # Configure the registration manager header in the directory @@ -155,15 +153,18 @@ function(_itk_configure_FactoryRegisterManager factory_type formats) set(LIST_OF_FACTORIES_REGISTRATION "") set(LIST_OF_FACTORY_NAMES "") string(TOLOWER ${factory_type} _qualifier) - foreach (format ${formats}) + foreach(format ${formats}) set(_module_name ${${format}_${_qualifier}_module_name}) set(_factory_name ${${format}_${_qualifier}_factory_name}) - _itk_ADD_FACTORY_REGISTRATION("LIST_OF_FACTORIES_REGISTRATION" "LIST_OF_FACTORY_NAMES" - ${_module_name} ${_factory_name}) + _itk_add_factory_registration( + "LIST_OF_FACTORIES_REGISTRATION" + "LIST_OF_FACTORY_NAMES" + ${_module_name} + ${_factory_name}) endforeach() configure_file(${ITK_CMAKE_DIR}/itk${factory_type}FactoryRegisterManager.h.in - "${CMAKE_CURRENT_BINARY_DIR}/ITKFactoryRegistration/itk${factory_type}FactoryRegisterManager.h" @ONLY) + "${CMAKE_CURRENT_BINARY_DIR}/ITKFactoryRegistration/itk${factory_type}FactoryRegisterManager.h" @ONLY) endfunction() @@ -172,15 +173,19 @@ endfunction() # Update variables`LIST_OF_FACTORY_NAMES` and `LIST_OF_FACTORIES_REGISTRATION` # used to configure `itkIOFactoryRegisterManager.h`. # -macro(_itk_ADD_FACTORY_REGISTRATION _registration_list_var _names_list_var _module_name _factory_name) +macro( + _itk_ADD_FACTORY_REGISTRATION + _registration_list_var + _names_list_var + _module_name + _factory_name) # note: this is an internal CMake variable and should not be used outside ITK set(_abi) if(${_module_name}_ENABLE_SHARED AND ITK_BUILD_SHARED) set(_abi "ITK_ABI_IMPORT") endif() - set(${_registration_list_var} - "${${_registration_list_var}}void ${_abi} ${_factory_name}FactoryRegister__Private();") + set(${_registration_list_var} "${${_registration_list_var}}void ${_abi} ${_factory_name}FactoryRegister__Private();") set(${_names_list_var} "${${_names_list_var}}${_factory_name}FactoryRegister__Private,") endmacro() @@ -198,7 +203,7 @@ macro(itk_generate_factory_registration) set(variadic_args ${ARGN}) list(LENGTH variadic_args _argc) - if (${_argc} GREATER 0) + if(${_argc} GREATER 0) set(_factory_list ${variadic_args}) endif() @@ -209,9 +214,18 @@ macro(itk_generate_factory_registration) foreach(_format ${ITK_${_factory_name}}) set(Module) foreach(_module ${ITK_FACTORY_NAMES}) - string(REGEX MATCH "^.*::${_factory_name}::${_format}$" Module_Matched "${_module}") + string( + REGEX MATCH + "^.*::${_factory_name}::${_format}$" + Module_Matched + "${_module}") if(Module_Matched) - string(REGEX REPLACE "(.*)::${_factory_name}::${_format}" "\\1" Module "${Module_Matched}") + string( + REGEX + REPLACE "(.*)::${_factory_name}::${_format}" + "\\1" + Module + "${Module_Matched}") break() endif() endforeach() @@ -227,11 +241,10 @@ macro(itk_generate_factory_registration) if(ITK_NO_${factory_uc}_FACTORY_REGISTER_MANAGER) # pass generation this factory registration elseif(_factory_name MATCHES "IO" AND ITK_NO_IO_FACTORY_REGISTER_MANAGER) - message(WARNING - "ITK_NO_IO_FACTORY_REGISTER_MANAGER CMake variable is " - "deprecated. Use ITK_NO_${factory_uc}_FACTORY_REGISTER_MANAGER") + message(WARNING "ITK_NO_IO_FACTORY_REGISTER_MANAGER CMake variable is " + "deprecated. Use ITK_NO_${factory_uc}_FACTORY_REGISTER_MANAGER") else() - _itk_configure_FactoryRegisterManager("${_factory_name}" "${LIST_OF_${factory_uc}_FORMATS}") + _itk_configure_factoryregistermanager("${_factory_name}" "${LIST_OF_${factory_uc}_FORMATS}") endif() endforeach() unset(_factory_name) diff --git a/CMake/ITKGroups.cmake b/CMake/ITKGroups.cmake index 0ae88de1114..0a96f0a13cd 100644 --- a/CMake/ITKGroups.cmake +++ b/CMake/ITKGroups.cmake @@ -1,20 +1,20 @@ # Set a list of group names set(group_list - Core - IO - Filtering - Registration - Segmentation - Numerics - Video - ThirdParty - Bridge - Nonunit - Compatibility - Remote - ) - -set(Core_documentation "This group of modules contain the toolkit framework used + Core + IO + Filtering + Registration + Segmentation + Numerics + Video + ThirdParty + Bridge + Nonunit + Compatibility + Remote) + +set(Core_documentation + "This group of modules contain the toolkit framework used by other modules. There are common base classes for data objects and process objects, basic data structures such as itk::Image, itk::Mesh, itk::QuadEdgeMesh, and itk::SpatialObject, and common functionality for operations such as finite @@ -25,18 +25,21 @@ set(Compatibility_documentation "This group contains modules that ease the trans set(IO_documentation "This group of modules contains classes for reading and writing images and other data objects.") -set(Filtering_documentation "This group of modules are filters that modify data +set(Filtering_documentation + "This group of modules are filters that modify data in the ITK pipeline framework. These filters take an input object, such as an Image, and modify it to create an output. Filters can be chained together to create a processing pipeline.") -set(Registration_documentation "This group of modules address the registration +set(Registration_documentation + "This group of modules address the registration problem: find the spatial transformation between two images. This is a high level group that makes use of many lower level modules such as \\ref ITKTransform, \\ref ITKOptimizers, \\ref ITKFiniteDifference, and \\ref ITKFEM.") -set(Segmentation_documentation "This group of modules address the segmentation +set(Segmentation_documentation + "This group of modules address the segmentation problem: partition the image into classified regions (labels). This is a high level group that makes use of many lower level modules such as \\ref ITKQuadEdgeMesh and \\ref ITKNarrowBand.") @@ -44,7 +47,8 @@ level group that makes use of many lower level modules such as set(Numerics_documentation "This group of modules are basic numerical tools and algorithms that have general applications outside of imaging.") -set(Video_documentation "This group of modules handles input, output and processing +set(Video_documentation + "This group of modules handles input, output and processing of static and real-time data with temporal components. It also handles communications to OpenCV and VXL external libraries.") @@ -57,7 +61,8 @@ used by other ITK modules.") set(Nonunit_documentation "This group of modules are intended to make use of an extensive set of the toolkit modules.") -set(Remote_documentation "This group of modules is for ITK based code that have +set(Remote_documentation + "This group of modules is for ITK based code that have additional third-party dependencies not bundled with the toolkit, new algorithms or implementations seeking greater exposure and adoption, algorithms that hope to eventually be integrated into the toolkit, @@ -74,7 +79,11 @@ foreach(group ${group_list}) file(GLOB_RECURSE _${group}_module_files ${ITK_SOURCE_DIR}/Modules/${group}/itk-module.cmake) foreach(_module_file ${_${group}_module_files}) file(STRINGS ${_module_file} _module_line REGEX "itk_module[ \n]*\\([ \n]*[A-Za-z0-9]*") - string(REGEX MATCH "(\\([ \n]*)([A-Za-z0-9]*)" _module_name ${_module_line}) + string( + REGEX MATCH + "(\\([ \n]*)([A-Za-z0-9]*)" + _module_name + ${_module_line}) set(_module_name ${CMAKE_MATCH_2}) set(_${_module_name}_module_line ${_module_line}) list(APPEND _${group}_module_list ${_module_name}) @@ -87,27 +96,23 @@ endforeach() set(group_list_dox) foreach(group ${group_list}) set(group_list_dox -"${group_list_dox} + "${group_list_dox} // ----------------------------------------------- // Group ${group} /** \\defgroup Group-${group} Group ${group} -${${group}_documentation} */\n" - ) +${${group}_documentation} */\n") foreach(mod ${_${group}_module_list}) set(group_list_dox -"${group_list_dox} + "${group_list_dox} /** \\defgroup ${mod} Module ${mod} -\\ingroup Group-${group} */\n" - ) +\\ingroup Group-${group} */\n") endforeach() endforeach() set(_content ${group_list_dox}) -configure_file( - "${ITK_SOURCE_DIR}/Utilities/Doxygen/Module.dox.in" - "${ITK_BINARY_DIR}/Utilities/Doxygen/Modules/ITK-AllGroups.dox" - ) +configure_file("${ITK_SOURCE_DIR}/Utilities/Doxygen/Module.dox.in" + "${ITK_BINARY_DIR}/Utilities/Doxygen/Modules/ITK-AllGroups.dox") #------------------------------------------------ # Turn on the ITK_BUILD option for each group @@ -119,11 +124,15 @@ foreach(group ${group_list}) list(LENGTH _${group}_module_list _num_modules) set(_current_module 0) while(${_current_module} LESS ${_num_modules}) - list(GET _${group}_module_list ${_current_module} _module_name) + list( + GET + _${group}_module_list + ${_current_module} + _module_name) if(NOT ITK_MODULE_${_module_name}_EXCLUDE_FROM_DEFAULT) list(APPEND _${group}_on_module_list ${_module_name}) endif() - math(EXPR _current_module "${_current_module} + 1") + math(EXPR _current_module "${_current_module} + 1") endwhile() endforeach() @@ -132,16 +141,16 @@ if("$ENV{DASHBOARD_TEST_FROM_CTEST}" STREQUAL "") option(ITKGroup_Core "Request building core modules" ON) endif() foreach(group ${group_list}) - option(ITKGroup_${group} "Request building ${group} modules" OFF) - if (ITKGroup_${group}) - foreach (itk-module ${_${group}_on_module_list}) - list(APPEND ITK_MODULE_${itk-module}_REQUEST_BY ITKGroup_${group}) - endforeach() - endif() - # Hide group options if building all modules anyway. - if(ITK_BUILD_DEFAULT_MODULES) - set_property(CACHE ITKGroup_${group} PROPERTY TYPE INTERNAL) - else() - set_property(CACHE ITKGroup_${group} PROPERTY TYPE BOOL) - endif() + option(ITKGroup_${group} "Request building ${group} modules" OFF) + if(ITKGroup_${group}) + foreach(itk-module ${_${group}_on_module_list}) + list(APPEND ITK_MODULE_${itk-module}_REQUEST_BY ITKGroup_${group}) + endforeach() + endif() + # Hide group options if building all modules anyway. + if(ITK_BUILD_DEFAULT_MODULES) + set_property(CACHE ITKGroup_${group} PROPERTY TYPE INTERNAL) + else() + set_property(CACHE ITKGroup_${group} PROPERTY TYPE BOOL) + endif() endforeach() diff --git a/CMake/ITKInitializeBuildType.cmake b/CMake/ITKInitializeBuildType.cmake index ca4c550587c..0ca33896309 100644 --- a/CMake/ITKInitializeBuildType.cmake +++ b/CMake/ITKInitializeBuildType.cmake @@ -1,7 +1,15 @@ # Set a default build type if none was specified if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) message(STATUS "Setting build type to 'Release' as none was specified.") - set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE) + set(CMAKE_BUILD_TYPE + Release + CACHE STRING "Choose the type of build." FORCE) # Set the possible values of build type for cmake-gui - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") + set_property( + CACHE CMAKE_BUILD_TYPE + PROPERTY STRINGS + "Debug" + "Release" + "MinSizeRel" + "RelWithDebInfo") endif() diff --git a/CMake/ITKModuleAPI.cmake b/CMake/ITKModuleAPI.cmake index b761182cc1c..1d75f896a78 100644 --- a/CMake/ITKModuleAPI.cmake +++ b/CMake/ITKModuleAPI.cmake @@ -36,8 +36,18 @@ macro(_itk_module_config_recurse ns mod) if(${mod}_FACTORY_NAMES) foreach(_factory_format ${${mod}_FACTORY_NAMES}) # Split :: - string(REGEX REPLACE "^(.*)::(.*)$" "\\1" _factory_name "${_factory_format}") - string(REGEX REPLACE "^(.*)::(.*)$" "\\2" _format "${_factory_format}") + string( + REGEX + REPLACE "^(.*)::(.*)$" + "\\1" + _factory_name + "${_factory_format}") + string( + REGEX + REPLACE "^(.*)::(.*)$" + "\\2" + _format + "${_factory_format}") list(APPEND ${ns}_${_factory_name} ${_format}) list(APPEND ${ns}_FACTORY_NAMES ${mod}::${_factory_format}) list(APPEND ${ns}_FACTORY_LIST ${_factory_name}) @@ -81,7 +91,11 @@ macro(itk_module_load mod) # than ITKTargets.cmake are created when modules are built externally. Do not # include the targets file inside the module itself -- which occurs in a module's # test configuration. - if(EXISTS "${${mod}_TARGETS_FILE}" AND NOT itk-module STREQUAL mod) + if(EXISTS "${${mod}_TARGETS_FILE}" + AND NOT + itk-module + STREQUAL + mod) include("${${mod}_TARGETS_FILE}") endif() endif() @@ -133,8 +147,14 @@ macro(itk_module_config ns) endforeach() unset(_${ns}_USED_MODULES) - foreach(v ${ns}_LIBRARIES ${ns}_INCLUDE_DIRS ${ns}_LIBRARY_DIRS - ${ns}_RUNTIME_LIBRARY_DIRS ${ns}_FACTORY_NAMES ${ns}_FACTORY_LIST) + foreach( + v + ${ns}_LIBRARIES + ${ns}_INCLUDE_DIRS + ${ns}_LIBRARY_DIRS + ${ns}_RUNTIME_LIBRARY_DIRS + ${ns}_FACTORY_NAMES + ${ns}_FACTORY_LIST) if(${v}) list(REMOVE_DUPLICATES ${v}) endif() diff --git a/CMake/ITKModuleCPPCheckTest.cmake b/CMake/ITKModuleCPPCheckTest.cmake index daebe9952ea..63aec764c87 100644 --- a/CMake/ITKModuleCPPCheckTest.cmake +++ b/CMake/ITKModuleCPPCheckTest.cmake @@ -15,8 +15,7 @@ macro(itk_module_cppcheck_test _name) ${${_name}_SOURCE_DIR}/include #_include_dirs VERBOSE FORCE - ALL - ) + ALL) endif() endif() @@ -31,8 +30,7 @@ macro(itk_module_cppcheck_test _name) ${${_name}_SOURCE_DIR}/include #_include_dirs VERBOSE FORCE - ALL - ) + ALL) endif() endif() endmacro() diff --git a/CMake/ITKModuleClangFormat.cmake b/CMake/ITKModuleClangFormat.cmake index 26831151970..a4cc0c4b342 100644 --- a/CMake/ITKModuleClangFormat.cmake +++ b/CMake/ITKModuleClangFormat.cmake @@ -10,6 +10,9 @@ option(ITK_USE_CLANG_FORMAT "Enable the use of clang-format for coding style formatting." ${BUILD_TESTING}) mark_as_advanced(ITK_USE_CLANG_FORMAT) -if(BUILD_TESTING AND ITK_USE_CLANG_FORMAT AND NOT CMAKE_CROSSCOMPILING AND NOT ITK_FORBID_DOWNLOADS) +if(BUILD_TESTING + AND ITK_USE_CLANG_FORMAT + AND NOT CMAKE_CROSSCOMPILING + AND NOT ITK_FORBID_DOWNLOADS) include(${ITK_CMAKE_DIR}/../Utilities/ClangFormat/DownloadClangFormat.cmake) endif() diff --git a/CMake/ITKModuleDoxygen.cmake b/CMake/ITKModuleDoxygen.cmake index e21d347ebe9..87697d8821f 100644 --- a/CMake/ITKModuleDoxygen.cmake +++ b/CMake/ITKModuleDoxygen.cmake @@ -30,16 +30,23 @@ macro(itk_module_doxygen _name) set(_content "${_content} */\n") if(ITK_SOURCE_DIR) - configure_file( - "${ITK_SOURCE_DIR}/Utilities/Doxygen/Module.dox.in" - "${ITK_BINARY_DIR}/Utilities/Doxygen/Modules/${_name}.dox" - @ONLY - ) + configure_file("${ITK_SOURCE_DIR}/Utilities/Doxygen/Module.dox.in" + "${ITK_BINARY_DIR}/Utilities/Doxygen/Modules/${_name}.dox" @ONLY) endif() if(NOT ${_name}_THIRD_PARTY AND EXISTS ${${_name}_SOURCE_DIR}/include) - if(Python3_EXECUTABLE AND BUILD_TESTING AND NOT DISABLE_MODULE_TESTS) - itk_add_test(NAME ${_name}InDoxygenGroup COMMAND ${Python3_EXECUTABLE} "${ITK_CMAKE_DIR}/../Utilities/Doxygen/mcdoc.py" check ${_name} ${${_name}_SOURCE_DIR}/include) + if(Python3_EXECUTABLE + AND BUILD_TESTING + AND NOT DISABLE_MODULE_TESTS) + itk_add_test( + NAME + ${_name}InDoxygenGroup + COMMAND + ${Python3_EXECUTABLE} + "${ITK_CMAKE_DIR}/../Utilities/Doxygen/mcdoc.py" + check + ${_name} + ${${_name}_SOURCE_DIR}/include) itk_memcheck_ignore(${_name}InDoxygenGroup) endif() endif() diff --git a/CMake/ITKModuleEnablement.cmake b/CMake/ITKModuleEnablement.cmake index ba7351a59b0..c5c3e93e9ad 100644 --- a/CMake/ITKModuleEnablement.cmake +++ b/CMake/ITKModuleEnablement.cmake @@ -3,16 +3,20 @@ macro(itk_module_load_DAG) set(ITK_MODULES_ALL) - file(GLOB_RECURSE meta RELATIVE "${ITK_SOURCE_DIR}" - "${ITK_SOURCE_DIR}/*/*/*/itk-module.cmake" # grouped modules - ) + file( + GLOB_RECURSE meta + RELATIVE "${ITK_SOURCE_DIR}" + "${ITK_SOURCE_DIR}/*/*/*/itk-module.cmake" # grouped modules + ) foreach(f ${meta}) include(${ITK_SOURCE_DIR}/${f}) list(APPEND ITK_MODULES_ALL ${itk-module}) get_filename_component(${itk-module}_BASE ${f} PATH) set(${itk-module}_SOURCE_DIR ${ITK_SOURCE_DIR}/${${itk-module}_BASE}) set(${itk-module}_BINARY_DIR ${ITK_BINARY_DIR}/${${itk-module}_BASE}) - if(BUILD_TESTING AND NOT DISABLE_MODULE_TESTS AND EXISTS ${${itk-module}_SOURCE_DIR}/test) + if(BUILD_TESTING + AND NOT DISABLE_MODULE_TESTS + AND EXISTS ${${itk-module}_SOURCE_DIR}/test) list(APPEND ITK_MODULES_ALL ${itk-module-test}) set(${itk-module-test}_SOURCE_DIR ${${itk-module}_SOURCE_DIR}/test) set(${itk-module-test}_BINARY_DIR ${${itk-module}_BINARY_DIR}/test) @@ -22,14 +26,18 @@ macro(itk_module_load_DAG) endif() # Reject bad dependencies. - string(REGEX MATCHALL ";(ITKDeprecated|ITKReview|ITKIntegratedTest);" - _bad_deps ";${ITK_MODULE_${itk-module}_DEPENDS};${ITK_MODULE_${itk-module-test}_DEPENDS};") + string( + REGEX MATCHALL + ";(ITKDeprecated|ITKReview|ITKIntegratedTest);" + _bad_deps + ";${ITK_MODULE_${itk-module}_DEPENDS};${ITK_MODULE_${itk-module-test}_DEPENDS};") foreach(dep ${_bad_deps}) - if(NOT "${itk-module}" MATCHES "^(${dep}|ITKIntegratedTest)$") - message(FATAL_ERROR - "Module \"${itk-module}\" loaded from\n" - " ${${itk-module}_BASE}/itk-module.cmake\n" - "may not depend on module \"${dep}\".") + if(NOT + "${itk-module}" + MATCHES + "^(${dep}|ITKIntegratedTest)$") + message(FATAL_ERROR "Module \"${itk-module}\" loaded from\n" " ${${itk-module}_BASE}/itk-module.cmake\n" + "may not depend on module \"${dep}\".") endif() endforeach() endforeach() @@ -39,16 +47,28 @@ macro(itk_module_load_DAG) endmacro() # Validate the module DAG. -macro(itk_module_check itk-module _needed_by stack) +macro( + itk_module_check + itk-module + _needed_by + stack) if(NOT ITK_MODULE_${itk-module}_DECLARED) - string(SUBSTRING ${itk-module} 0 3 module-name-prefix) - if (${module-name-prefix} EQUAL "ITK") + string( + SUBSTRING ${itk-module} + 0 + 3 + module-name-prefix) + if(${module-name-prefix} EQUAL "ITK") message(AUTHOR_WARNING "No such module \"${itk-module}\" needed by \"${_needed_by}\"") else() # This is a remote module which has not been downloaded yet message(STATUS "Including remote module \"${itk-module}\" needed by \"${_needed_by}\"") - set(Module_${itk-module} ON CACHE BOOL "Needed by ${_needed_by}" FORCE) # turn it on + set(Module_${itk-module} + ON + CACHE BOOL "Needed by ${_needed_by}" FORCE) # turn it on include("${CMAKE_CURRENT_LIST_DIR}/../Modules/Remote/${itk-module}.remote.cmake") - set(Module_${itk-module} OFF CACHE BOOL "Needed by ${_needed_by}" FORCE) # turn it back off + set(Module_${itk-module} + OFF + CACHE BOOL "Needed by ${_needed_by}" FORCE) # turn it back off set(ModuleEnablementNeedsToRerun ON) endif() unset(module-name-prefix) @@ -74,7 +94,7 @@ endmacro() set(ModuleEnablementNeedsToRerun ON) # this needs to run at least once while(ModuleEnablementNeedsToRerun) - itk_module_load_DAG() + itk_module_load_dag() set(ModuleEnablementNeedsToRerun OFF) message(STATUS "Running module dependency checks") foreach(itk-module ${ITK_MODULES_ALL}) @@ -103,7 +123,9 @@ if(DEFINED ITK_BUILD_ALL_MODULES) message(WARNING "ITK_BUILD_ALL_MODULES is deprecated, please remove this entry from the CMake " "cache (edit the CMakeCache.txt file located in the top level of the ITK build " "tree directly or via the CMake GUI), and use ITK_BUILD_DEFAULT_MODULES instead.") - set(ITK_BUILD_DEFAULT_MODULES ${ITK_BUILD_ALL_MODULES} CACHE BOOL "Build the default ITK modules." FORCE) + set(ITK_BUILD_DEFAULT_MODULES + ${ITK_BUILD_ALL_MODULES} + CACHE BOOL "Build the default ITK modules." FORCE) endif() # Provide module selections by groups include(${ITK_SOURCE_DIR}/CMake/ITKGroups.cmake) @@ -130,8 +152,11 @@ macro(itk_module_enable itk-module _needed_by) message(FATAL_ERROR "No such module \"${itk-module}\" needed by \"${_needed_by}\"") endif() if(NOT Module_${itk-module}) - if(NOT ${itk-module}_TESTED_BY OR - NOT "x${_needed_by}" STREQUAL "x${${itk-module}_TESTED_BY}") + if(NOT ${itk-module}_TESTED_BY + OR NOT + "x${_needed_by}" + STREQUAL + "x${${itk-module}_TESTED_BY}") list(APPEND ITK_MODULE_${itk-module}_NEEDED_BY ${_needed_by}) endif() endif() @@ -140,7 +165,10 @@ macro(itk_module_enable itk-module _needed_by) foreach(dep IN LISTS ITK_MODULE_${itk-module}_DEPENDS) itk_module_enable(${dep} ${itk-module}) endforeach() - if(${itk-module}_TESTED_BY AND (ITK_BUILD_DEFAULT_MODULES OR ITK_BUILD_ALL_MODULES_FOR_TESTS OR Module_${itk-module})) + if(${itk-module}_TESTED_BY + AND (ITK_BUILD_DEFAULT_MODULES + OR ITK_BUILD_ALL_MODULES_FOR_TESTS + OR Module_${itk-module})) itk_module_enable(${${itk-module}_TESTED_BY} "") endif() endif() @@ -178,8 +206,7 @@ set(ITK_MODULES_DISABLED_CPACK) foreach(m ${ITK_MODULES_DISABLED}) list(APPEND ITK_MODULES_DISABLED_CPACK "/${m}/") endforeach() -set(CPACK_SOURCE_IGNORE_FILES - "${ITK_MODULES_DISABLED_CPACK};/\\\\.git") +set(CPACK_SOURCE_IGNORE_FILES "${ITK_MODULES_DISABLED_CPACK};/\\\\.git") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Insight Toolkit version ${ITK_VERSION_MAJOR}") set(CPACK_PACKAGE_VENDOR "ISC") @@ -261,7 +288,10 @@ if(ITK_GENERATE_PROJECT_XML) set(xml "${xml}\n") foreach(module ${ITK_CDASH_SUBPROJECT_MODULES}) if(${module}_IS_TEST) - message(FATAL_ERROR "unexpected: subproject names should not be test modules module='${module}' tests_for='${${module}_TESTS_FOR}'") + message( + FATAL_ERROR + "unexpected: subproject names should not be test modules module='${module}' tests_for='${${module}_TESTS_FOR}'" + ) endif() set(xml "${xml} \n") set(deps "") @@ -273,7 +303,11 @@ if(ITK_GENERATE_PROJECT_XML) endif() endif() foreach(dep ${dep_list}) - if(NOT ${dep}_IS_TEST AND NOT "${module}" STREQUAL "${dep}") + if(NOT ${dep}_IS_TEST + AND NOT + "${module}" + STREQUAL + "${dep}") set(xml "${xml} \n") endif() endforeach() @@ -299,7 +333,10 @@ if(ITK_GENERATE_SUBPROJECTS_CMAKE) set(s "${s}set(itk_subprojects\n") foreach(itk-module ${ITK_CDASH_SUBPROJECT_MODULES}) if(${itk-module}_IS_TEST) - message(FATAL_ERROR "unexpected: subproject names should not be test modules itk-module='${itk-module}' tests_for='${${itk-module}_TESTS_FOR}'") + message( + FATAL_ERROR + "unexpected: subproject names should not be test modules itk-module='${itk-module}' tests_for='${${itk-module}_TESTS_FOR}'" + ) endif() set(s "${s} \"${itk-module}\"\n") endforeach() @@ -309,7 +346,7 @@ if(ITK_GENERATE_SUBPROJECTS_CMAKE) file(WRITE ${filename}.in "${s}") # Use configure_file so "${filename}" only changes when its content changes: - configure_file(${filename}.in ${filename} COPYONLY) + configure_file(${filename}.in ${filename} COPYONLY) endif() #----------------------------------------------------------------------------- @@ -320,8 +357,7 @@ if(NOT ITK_MODULES_ENABLED) return() endif() -file(WRITE "${ITK_BINARY_DIR}/ITKTargets.cmake" - "# Generated by CMake, do not edit!") +file(WRITE "${ITK_BINARY_DIR}/ITKTargets.cmake" "# Generated by CMake, do not edit!") macro(init_module_vars) verify_itk_module_is_set() diff --git a/CMake/ITKModuleExternal.cmake b/CMake/ITKModuleExternal.cmake index 36b74ec3780..ca48c7565a0 100644 --- a/CMake/ITKModuleExternal.cmake +++ b/CMake/ITKModuleExternal.cmake @@ -4,7 +4,10 @@ if(NOT ITK_FOUND) message(FATAL_ERROR "ITK must be found before module macros can be used.") endif() -if(NOT ITK_VERSION VERSION_GREATER "5.1") +if(NOT + ITK_VERSION + VERSION_GREATER + "5.1") message(FATAL_ERROR "Requires ITK 5.1 or later to work.") endif() if(MSVC AND ${CMAKE_MINIMUM_REQUIRED_VERSION} LESS 3.16.3) @@ -15,7 +18,9 @@ if(MSVC AND ${CMAKE_MINIMUM_REQUIRED_VERSION} LESS 3.16.3) LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_Static' doesn't match value 'MDd_Dynamic' in module.obj") endif() if(NOT EXISTS ${ITK_CMAKE_DIR}/ITKModuleMacros.cmake) - message(FATAL_ERROR "Modules can only be built against an ITK build tree; they cannot be built against an ITK install tree.") + message( + FATAL_ERROR "Modules can only be built against an ITK build tree; they cannot be built against an ITK install tree." + ) endif() set(PYTHON_DEVELOPMENT_REQUIRED ${ITK_WRAP_PYTHON}) @@ -26,8 +31,11 @@ include(CMakeDependentOption) # Install rules when creating a Python package with scikit-build if(SKBUILD) - set(PY_SITE_PACKAGES_PATH ${CMAKE_INSTALL_PREFIX} CACHE PATH "The install prefix for python package contents") - install(CODE " + set(PY_SITE_PACKAGES_PATH + ${CMAKE_INSTALL_PREFIX} + CACHE PATH "The install prefix for python package contents") + install( + CODE " unset(CMAKE_INSTALL_COMPONENT) set(COMPONENT \"PythonWheelRuntimeLibraries\") set(CMAKE_INSTALL_DO_STRIP 1) @@ -42,7 +50,6 @@ if(NOT DEFINED CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY) set(CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY 1) endif() - # Setup build locations for shared libraries ----START # ITK/CMakeLists.txt -- use ITK_BINARY_DIR as root # ITK/CMake/ITKModuleExternal.cmake -- use ITK_DIR as root @@ -59,22 +66,34 @@ endif() # The default path when not wrapping. Restore standard build location # if python wrapping is turned on, and then turned off. if(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY) - set(NO_WRAP_CMAKE_LIBRARY_OUTPUT_DIRECTORY ${ITK_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} CACHE PATH "Shared library directory") + set(NO_WRAP_CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${ITK_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} + CACHE PATH "Shared library directory") else() - set(NO_WRAP_CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} CACHE PATH "Shared library directory") + set(NO_WRAP_CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} + CACHE PATH "Shared library directory") endif() if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set(NO_WRAP_CMAKE_RUNTIME_OUTPUT_DIRECTORY ${ITK_BINARY_DIR}/bin CACHE PATH "Shared library directory") + set(NO_WRAP_CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${ITK_BINARY_DIR}/bin + CACHE PATH "Shared library directory") else() - set(NO_WRAP_CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} CACHE PATH "Shared library directory") + set(NO_WRAP_CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} + CACHE PATH "Shared library directory") endif() include(WrappingConfigCommon) # Setup build locations for shared libraries ----STOP if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY) - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${ITK_DIR}/${CMAKE_INSTALL_LIBDIR} CACHE PATH "Static library install directory") - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${NO_WRAP_CMAKE_RUNTIME_OUTPUT_DIRECTORY} CACHE PATH "Runtime library directory") + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${ITK_DIR}/${CMAKE_INSTALL_LIBDIR} + CACHE PATH "Static library install directory") + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${NO_WRAP_CMAKE_RUNTIME_OUTPUT_DIRECTORY} + CACHE PATH "Runtime library directory") endif() # ITK installation structure @@ -140,7 +159,8 @@ include(ITKDownloadSetup) include(ITKModuleMacros) include(itk-module.cmake) set(${itk-module}-targets ${itk-module}Targets) -set(${itk-module}-targets-install "\${ITK_INSTALL_PREFIX}/${ITK_INSTALL_PACKAGE_DIR}/Modules/Targets/${itk-module}Targets.cmake") +set(${itk-module}-targets-install + "\${ITK_INSTALL_PREFIX}/${ITK_INSTALL_PACKAGE_DIR}/Modules/Targets/${itk-module}Targets.cmake") set(${itk-module}_TARGETS_FILE_INSTALL "${${itk-module}-targets-install}") set(${itk-module}-targets-build-directory "${ITK_DIR}/${ITK_INSTALL_PACKAGE_DIR}/Modules/Targets") file(MAKE_DIRECTORY ${${itk-module}-targets-build-directory}) @@ -150,9 +170,13 @@ file(WRITE "${${itk-module}_TARGETS_FILE_BUILD}" "") # Clear targets set(${itk-module}_ENABLE_SHARED "${ITK_MODULE_${itk-module}_ENABLE_SHARED}") itk_module_impl() -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/CMakeLists.txt AND NOT ${itk-module}_NO_SRC AND "${${itk-module}-targets}") - install(EXPORT ${${itk-module}-targets} DESTINATION "${ITK_INSTALL_PACKAGE_DIR}/Modules" - COMPONENT Development) +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/CMakeLists.txt + AND NOT ${itk-module}_NO_SRC + AND "${${itk-module}-targets}") + install( + EXPORT ${${itk-module}-targets} + DESTINATION "${ITK_INSTALL_PACKAGE_DIR}/Modules" + COMPONENT Development) endif() set(ITK_TEST_OUTPUT_DIR "${CMAKE_BINARY_DIR}/Testing/Temporary") @@ -161,28 +185,31 @@ if(${BUILD_TESTING} AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt" endif() if(ITK_WRAPPING) - CMAKE_DEPENDENT_OPTION(${itk-module}_WRAP_PYTHON "Build Python support." ${ITK_WRAP_PYTHON} - "ITK_WRAP_PYTHON" OFF) - CMAKE_DEPENDENT_OPTION(${itk-module}_WRAP_DOC "Build Doxygen support." OFF - "ITK_WRAP_DOC" OFF) + cmake_dependent_option( + ${itk-module}_WRAP_PYTHON + "Build Python support." + ${ITK_WRAP_PYTHON} + "ITK_WRAP_PYTHON" + OFF) + cmake_dependent_option( + ${itk-module}_WRAP_DOC + "Build Doxygen support." + OFF + "ITK_WRAP_DOC" + OFF) set(${itk-module}_WRAP_CASTXML ${ITK_WRAPPING}) set(${itk-module}_WRAP_SWIGINTERFACE ${ITK_WRAPPING}) - if((${itk-module}_WRAP_PYTHON OR - ${itk-module}_WRAP_DOC - ) - AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/wrapping/CMakeLists.txt" - ) + if((${itk-module}_WRAP_PYTHON OR ${itk-module}_WRAP_DOC) AND EXISTS + "${CMAKE_CURRENT_SOURCE_DIR}/wrapping/CMakeLists.txt") set(EXTERNAL_WRAP_ITK_PROJECT ON) set(WRAP_ITK_CMAKE_DIR "${ITK_CMAKE_DIR}/../Wrapping") include("${WRAP_ITK_CMAKE_DIR}/TypedefMacros.cmake") # Build tree if(EXISTS "${ITK_CMAKE_DIR}/../Wrapping/CMakeLists.txt") - add_subdirectory("${ITK_CMAKE_DIR}/../Wrapping" - ${CMAKE_CURRENT_BINARY_DIR}/Wrapping) - # Install tree + add_subdirectory("${ITK_CMAKE_DIR}/../Wrapping" ${CMAKE_CURRENT_BINARY_DIR}/Wrapping) + # Install tree elseif(EXISTS"${ITK_CMAKE_DIR}/Wrapping/CMakeLists.txt") - add_subdirectory("${ITK_CMAKE_DIR}/Wrapping" - ${CMAKE_CURRENT_BINARY_DIR}/Wrapping) + add_subdirectory("${ITK_CMAKE_DIR}/Wrapping" ${CMAKE_CURRENT_BINARY_DIR}/Wrapping) else() message(FATAL_ERROR "Could not find wrapping infrastructure.") endif() @@ -192,5 +219,5 @@ endif() # all tests have been added that reference the group, so we put it last. if(NOT TARGET ITKData) include(ExternalData) - ExternalData_Add_Target(ITKData) + ExternalData_add_target(ITKData) endif() diff --git a/CMake/ITKModuleHeaderTest.cmake b/CMake/ITKModuleHeaderTest.cmake index f9d2f9ff715..67917cc07dd 100644 --- a/CMake/ITKModuleHeaderTest.cmake +++ b/CMake/ITKModuleHeaderTest.cmake @@ -13,21 +13,24 @@ endif() # The maximum number of headers in a test. This helps limit memory issues, # and the cppcheck tests. However, if this is not unity, there is a slight # chance that problems may be hidden. For a complete header check, set to "1". -set(MAXIMUM_NUMBER_OF_HEADERS ${MAXIMUM_NUMBER_OF_HEADERS_default} CACHE STRING "The number of headers in a HeaderTest code.") +set(MAXIMUM_NUMBER_OF_HEADERS + ${MAXIMUM_NUMBER_OF_HEADERS_default} + CACHE STRING "The number of headers in a HeaderTest code.") mark_as_advanced(MAXIMUM_NUMBER_OF_HEADERS) if(NOT TARGET ITKHeaderTests) - add_custom_target(ITKHeaderTests + add_custom_target( + ITKHeaderTests ${CMAKE_COMMAND} --build ${ITK_BINARY_DIR} COMMENT "Regenerating and building the header tests.") endif() macro(itk_module_headertest _name) if(NOT ${_name}_THIRD_PARTY - AND EXISTS ${${_name}_SOURCE_DIR}/include - AND Python3_EXECUTABLE - AND NOT (${_name} STREQUAL ITKTestKernel) - AND NOT (CMAKE_GENERATOR MATCHES "^Visual Studio 10.*")) + AND EXISTS ${${_name}_SOURCE_DIR}/include + AND Python3_EXECUTABLE + AND NOT (${_name} STREQUAL ITKTestKernel) + AND NOT (CMAKE_GENERATOR MATCHES "^Visual Studio 10.*")) # Count how many tests we are going to get, and put the source files in # the list _outputs. @@ -44,12 +47,15 @@ macro(itk_module_headertest _name) while(${_num_headers} GREATER ${_available_headers}) math(EXPR _test_num "${_test_num} + 1") math(EXPR _available_headers "${_available_headers} + ${MAXIMUM_NUMBER_OF_HEADERS}") - list(APPEND _outputs - ${${_name}_BINARY_DIR}/test/${_name}HeaderTest${_test_num}.cxx) + list(APPEND _outputs ${${_name}_BINARY_DIR}/test/${_name}HeaderTest${_test_num}.cxx) endwhile() - add_custom_target(${_name}HeaderTestClean - ${CMAKE_COMMAND} -E remove ${_outputs}) + add_custom_target( + ${_name}HeaderTestClean + ${CMAKE_COMMAND} + -E + remove + ${_outputs}) add_dependencies(ITKHeaderTests ${_name}HeaderTestClean) # We check to see if the headers are changed. If so, remove the header test @@ -76,13 +82,8 @@ macro(itk_module_headertest _name) get_filename_component(_test_name ${_header_test_src} NAME_WE) add_custom_command( OUTPUT ${_header_test_src} - COMMAND ${Python3_EXECUTABLE} ${ITK_CMAKE_DIR}/../Utilities/Maintenance/BuildHeaderTest.py - ${_name} - ${${_name}_SOURCE_DIR} - ${${_name}_BINARY_DIR} - ${MAXIMUM_NUMBER_OF_HEADERS} - ${_test_num} - ) + COMMAND ${Python3_EXECUTABLE} ${ITK_CMAKE_DIR}/../Utilities/Maintenance/BuildHeaderTest.py ${_name} + ${${_name}_SOURCE_DIR} ${${_name}_BINARY_DIR} ${MAXIMUM_NUMBER_OF_HEADERS} ${_test_num}) add_executable(${_test_name} ${_header_test_src}) target_link_libraries(${_test_name} PUBLIC ${${_name}_LIBRARIES} itksys) diff --git a/CMake/ITKModuleKWStyleTest.cmake b/CMake/ITKModuleKWStyleTest.cmake index 2667ced0442..fa5ef7f1333 100644 --- a/CMake/ITKModuleKWStyleTest.cmake +++ b/CMake/ITKModuleKWStyleTest.cmake @@ -18,7 +18,10 @@ option(ITK_USE_KWSTYLE "Enable the use of KWStyle for checking coding style." ${ mark_as_advanced(ITK_USE_KWSTYLE) find_package(KWStyle 1.0.1 QUIET) -if(NOT KWSTYLE_FOUND AND BUILD_TESTING AND ITK_USE_KWSTYLE AND NOT CMAKE_CROSSCOMPILING) +if(NOT KWSTYLE_FOUND + AND BUILD_TESTING + AND ITK_USE_KWSTYLE + AND NOT CMAKE_CROSSCOMPILING) include(${ITK_CMAKE_DIR}/../Utilities/KWStyle/BuildKWStyle.cmake) elseif(NOT KWSTYLE_FOUND) set(ITK_USE_KWSTYLE OFF) @@ -26,7 +29,7 @@ endif() macro(itk_module_kwstyle_test _name) - set(_kwstyle_itk_configuration_file "${ITK_CMAKE_DIR}/../Utilities/KWStyle/ITK.kws.xml" ) + set(_kwstyle_itk_configuration_file "${ITK_CMAKE_DIR}/../Utilities/KWStyle/ITK.kws.xml") if(EXISTS "${${itk-module}_SOURCE_DIR}/ITKKWStyleOverwrite.txt") set(_kwstyle_itk_overwrite_file "${${itk-module}_SOURCE_DIR}/ITKKWStyleOverwrite.txt") @@ -37,37 +40,41 @@ macro(itk_module_kwstyle_test _name) if(EXISTS "${${itk-module}_SOURCE_DIR}/ITKKWStyleFiles.txt.in") set(_kwstyle_itk_module_files_list_file "${${itk-module}_BINARY_DIR}/ITKKWStyleFiles.txt") # KWStyle requires that the files list be absolute paths - configure_file( - ${${itk-module}_SOURCE_DIR}/ITKKWStyleFiles.txt.in - ${_kwstyle_itk_module_files_list_file} - ) + configure_file(${${itk-module}_SOURCE_DIR}/ITKKWStyleFiles.txt.in ${_kwstyle_itk_module_files_list_file}) else() - set(_kwstyle_itk_module_files_list_file "${${itk-module}_BINARY_DIR}/ITKKWStyleFiles.txt") - set(_kwstyle_file_list "${${itk-module}_SOURCE_DIR}/include/itk*.h" - "${${itk-module}_SOURCE_DIR}/include/itk*.hxx" - "${${itk-module}_SOURCE_DIR}/src/*.cxx" - "${${itk-module}_SOURCE_DIR}/src/*.h" - "${${itk-module}_SOURCE_DIR}/src/*.hxx" - "${${itk-module}_SOURCE_DIR}/test/*.cxx") + set(_kwstyle_itk_module_files_list_file "${${itk-module}_BINARY_DIR}/ITKKWStyleFiles.txt") + set(_kwstyle_file_list + "${${itk-module}_SOURCE_DIR}/include/itk*.h" + "${${itk-module}_SOURCE_DIR}/include/itk*.hxx" + "${${itk-module}_SOURCE_DIR}/src/*.cxx" + "${${itk-module}_SOURCE_DIR}/src/*.h" + "${${itk-module}_SOURCE_DIR}/src/*.hxx" + "${${itk-module}_SOURCE_DIR}/test/*.cxx") file(WRITE ${_kwstyle_itk_module_files_list_file} "") foreach(item ${_kwstyle_file_list}) file(APPEND ${_kwstyle_itk_module_files_list_file} "${item}\n") endforeach() endif() - if (NOT KWSTYLE_EXECUTABLE) + if(NOT KWSTYLE_EXECUTABLE) message(WARNING "KWSTYLE_EXECUTABLE is not set!") else() if(NOT DISABLE_MODULE_TESTS) - itk_add_test(NAME ${itk-module}KWStyleTest - COMMAND ${KWSTYLE_EXECUTABLE} - -xml ${_kwstyle_itk_configuration_file} - -v - -o ${_kwstyle_itk_overwrite_file} - -D ${_kwstyle_itk_module_files_list_file} - -gcc - WORKING_DIRECTORY ${ITK_CMAKE_DIR}/.. - ) + itk_add_test( + NAME + ${itk-module}KWStyleTest + COMMAND + ${KWSTYLE_EXECUTABLE} + -xml + ${_kwstyle_itk_configuration_file} + -v + -o + ${_kwstyle_itk_overwrite_file} + -D + ${_kwstyle_itk_module_files_list_file} + -gcc + WORKING_DIRECTORY + ${ITK_CMAKE_DIR}/..) endif() endif() endmacro() diff --git a/CMake/ITKModuleMacros.cmake b/CMake/ITKModuleMacros.cmake index 3bd7c9ad02b..d0375b494a0 100644 --- a/CMake/ITKModuleMacros.cmake +++ b/CMake/ITKModuleMacros.cmake @@ -77,7 +77,7 @@ macro(itk_module _name) elseif("${arg}" MATCHES "^ENABLE_SHARED$") set(_doing "") set(ITK_MODULE_${itk-module}_ENABLE_SHARED 1) - ### Parse named option parameters + ### Parse named option parameters elseif("${_doing}" MATCHES "^DEPENDS$") list(APPEND ITK_MODULE_${itk-module}_DEPENDS "${arg}") elseif("${_doing}" MATCHES "^TEST_DEPENDS$") @@ -100,14 +100,13 @@ macro(itk_module _name) endforeach() list(SORT ITK_MODULE_${itk-module}_DEPENDS) # Deterministic order. set(ITK_MODULE_${itk-module}_PUBLIC_DEPENDS ${ITK_MODULE_${itk-module}_DEPENDS}) - list(APPEND ITK_MODULE_${itk-module}_DEPENDS + list( + APPEND + ITK_MODULE_${itk-module}_DEPENDS ${ITK_MODULE_${itk-module}_COMPILE_DEPENDS} - ${ITK_MODULE_${itk-module}_PRIVATE_DEPENDS} - ) - set(ITK_MODULE_${itk-module}_TRANSITIVE_DEPENDS - ${ITK_MODULE_${itk-module}_PUBLIC_DEPENDS} - ${ITK_MODULE_${itk-module}_COMPILE_DEPENDS} - ) + ${ITK_MODULE_${itk-module}_PRIVATE_DEPENDS}) + set(ITK_MODULE_${itk-module}_TRANSITIVE_DEPENDS ${ITK_MODULE_${itk-module}_PUBLIC_DEPENDS} + ${ITK_MODULE_${itk-module}_COMPILE_DEPENDS}) unset(ITK_MODULE_${itk-module}_COMPILE_DEPENDS) list(SORT ITK_MODULE_${itk-module}_DEPENDS) # Deterministic order. if(ITK_MODULE_${itk-module}_TRANSITIVE_DEPENDS) # Don't sort an empty list @@ -121,7 +120,10 @@ macro(itk_module _name) endmacro() macro(itk_module_check_name _name) - if(NOT "${_name}" MATCHES "^[a-zA-Z][a-zA-Z0-9]*$") + if(NOT + "${_name}" + MATCHES + "^[a-zA-Z][a-zA-Z0-9]*$") message(FATAL_ERROR "Invalid module name: ${_name}") endif() endmacro() @@ -135,14 +137,17 @@ macro(itk_module_impl) # Collect all sources and headers for IDE projects. set(_srcs "") - if("${CMAKE_GENERATOR}" MATCHES "Xcode|Visual Studio|KDevelop" - OR CMAKE_EXTRA_GENERATOR) + if("${CMAKE_GENERATOR}" MATCHES "Xcode|Visual Studio|KDevelop" OR CMAKE_EXTRA_GENERATOR) # Add sources to the module target for easy editing in the IDE. set(_include ${${itk-module}_SOURCE_DIR}/include) if(EXISTS ${_include}) set(_src ${${itk-module}_SOURCE_DIR}/src) file(GLOB_RECURSE _srcs ${_src}/*.cxx) - file(GLOB_RECURSE _hdrs ${_include}/*.h ${_include}/*.hxx) + file( + GLOB_RECURSE + _hdrs + ${_include}/*.h + ${_include}/*.hxx) list(APPEND _srcs ${_hdrs}) endif() endif() @@ -164,7 +169,10 @@ macro(itk_module_impl) if(EXISTS ${${itk-module}_SOURCE_DIR}/include) list(APPEND ${itk-module}_INCLUDE_DIRS ${${itk-module}_SOURCE_DIR}/include) - install(DIRECTORY include/ DESTINATION ${${itk-module}_INSTALL_INCLUDE_DIR} COMPONENT Development) + install( + DIRECTORY include/ + DESTINATION ${${itk-module}_INSTALL_INCLUDE_DIR} + COMPONENT Development) endif() if(NOT ITK_SOURCE_DIR AND ${itk-module}_ENABLE_SHARED) # When building a module outside the ITK source tree, if ENABLE_SHARED is enabled, @@ -209,7 +217,7 @@ macro(itk_module_impl) add_subdirectory(src) endif() - # Target ${itk-module} may not exist if the module only contains header files + # Target ${itk-module} may not exist if the module only contains header files if(TARGET ${itk-module}) if(ITK_MODULE_${itk-module}_ENABLE_SHARED) if(ITK_SOURCE_DIR) @@ -219,19 +227,23 @@ macro(itk_module_impl) endif() # Generate the export macro header for symbol visibility/Windows DLL declspec - generate_export_header(${itk-module} - EXPORT_FILE_NAME ${_export_header_file} - EXPORT_MACRO_NAME ${itk-module}_EXPORT - NO_EXPORT_MACRO_NAME ${itk-module}_HIDDEN - STATIC_DEFINE ITK_STATIC) - install(FILES + generate_export_header( + ${itk-module} + EXPORT_FILE_NAME ${_export_header_file} + EXPORT_MACRO_NAME + ${itk-module}_EXPORT + NO_EXPORT_MACRO_NAME + ${itk-module}_HIDDEN + STATIC_DEFINE + ITK_STATIC) + install( + FILES ${_export_header_file} DESTINATION ${${itk-module}_INSTALL_INCLUDE_DIR} - COMPONENT Development - ) + COMPONENT Development) endif() if((ITK_MODULE_${itk-module}_ENABLE_SHARED AND BUILD_SHARED_LIBS) OR (APPLE AND NOT BUILD_SHARED_LIBS)) - if (USE_COMPILER_HIDDEN_VISIBILITY) + if(USE_COMPILER_HIDDEN_VISIBILITY) # Prefer to use target properties supported by newer cmake set_target_properties(${itk-module} PROPERTIES CXX_VISIBILITY_PRESET hidden) set_target_properties(${itk-module} PROPERTIES C_VISIBILITY_PRESET hidden) @@ -282,12 +294,11 @@ macro(itk_module_impl) set(itk-module-TARGETS_FILE "${itk-module-TARGETS_FILE-install}") set(itk-module-RUNTIME_LIBRARY_DIRS "${itk-module-RUNTIME_LIBRARY_DIRS-install}") configure_file(${_ITKModuleMacros_DIR}/ITKModuleInfo.cmake.in CMakeFiles/${itk-module}.cmake @ONLY) - install(FILES - ${${itk-module}_BINARY_DIR}/CMakeFiles/${itk-module}.cmake + install( + FILES ${${itk-module}_BINARY_DIR}/CMakeFiles/${itk-module}.cmake DESTINATION ${ITK_INSTALL_PACKAGE_DIR}/Modules - COMPONENT Development - ) - itk_module_doxygen(${itk-module}) # module name + COMPONENT Development) + itk_module_doxygen(${itk-module}) # module name endmacro() # itk_module_link_dependencies() @@ -331,12 +342,12 @@ endmacro() macro(itk_module_examples) #Some modules have examples, and those should be hidden if the module is disabled, or examples are not requested - cmake_dependent_option(Module_${itk-module}_BUILD_EXAMPLES + cmake_dependent_option( + Module_${itk-module}_BUILD_EXAMPLES "Build the examples for Module_${itk-module}" ON "BUILD_EXAMPLES OR ITK_BUILD_EXAMPLES;Module_${itk-module};NOT ITK_BUILD_DOCUMENTATION" - OFF - ) + OFF) if(Module_${itk-module}_BUILD_EXAMPLES) if(ITK_SOURCE_DIR) # If configuration is done from within ITK, @@ -364,8 +375,12 @@ endmacro() macro(itk_module_warnings_disable) foreach(lang ${ARGN}) if(MSVC) - string(REGEX REPLACE "(^|)[/-]W[0-4]( |$)" " " - CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS}") + string( + REGEX + REPLACE "(^|)[/-]W[0-4]( |$)" + " " + CMAKE_${lang}_FLAGS + "${CMAKE_${lang}_FLAGS}") set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} /W0") elseif(BORLAND) set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -w-") @@ -388,7 +403,10 @@ macro(itk_module_target_label _target_name) endmacro() macro(itk_module_target_name _name) - if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") + if(NOT + ${CMAKE_SYSTEM_NAME} + MATCHES + "OpenBSD") set_property(TARGET ${_name} PROPERTY VERSION 1) set_property(TARGET ${_name} PROPERTY SOVERSION 1) endif() @@ -408,24 +426,30 @@ macro(itk_module_target_name _name) endmacro() macro(itk_module_target_export _name) - export(TARGETS ${_name} APPEND FILE ${${itk-module}-targets-build}) + export( + TARGETS ${_name} + APPEND + FILE ${${itk-module}-targets-build}) endmacro() macro(itk_module_target_install _name) #Use specific runtime components for executables and libraries separately when installing a module, #considering that the target of a module could be either an executable or a library. - get_property(_ttype TARGET ${_name} PROPERTY TYPE) + get_property( + _ttype + TARGET ${_name} + PROPERTY TYPE) if("${_ttype}" STREQUAL EXECUTABLE) set(runtime_component Runtime) else() set(runtime_component RuntimeLibraries) endif() - install(TARGETS ${_name} - EXPORT ${${itk-module}-targets} + install( + TARGETS ${_name} + EXPORT ${${itk-module}-targets} RUNTIME DESTINATION ${${itk-module}_INSTALL_RUNTIME_DIR} COMPONENT ${runtime_component} LIBRARY DESTINATION ${${itk-module}_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries - ARCHIVE DESTINATION ${${itk-module}_INSTALL_ARCHIVE_DIR} COMPONENT Development - ) + ARCHIVE DESTINATION ${${itk-module}_INSTALL_ARCHIVE_DIR} COMPONENT Development) endmacro() macro(itk_module_target _name) diff --git a/CMake/ITKModuleRemote.cmake b/CMake/ITKModuleRemote.cmake index 8ad0f8cf2bb..4ff6daa4afe 100644 --- a/CMake/ITKModuleRemote.cmake +++ b/CMake/ITKModuleRemote.cmake @@ -1,13 +1,16 @@ # Function to fetch remote modules. # Helper to perform the initial git clone and checkout. -function(_git_clone git_executable git_repository git_tag module_dir) +function( + _git_clone + git_executable + git_repository + git_tag + module_dir) execute_process( COMMAND "${git_executable}" clone "${git_repository}" "${module_dir}" RESULT_VARIABLE error_code - OUTPUT_QUIET - ERROR_QUIET - ) + OUTPUT_QUIET ERROR_QUIET) if(error_code) message(FATAL_ERROR "Failed to clone repository: '${git_repository}'") endif() @@ -16,9 +19,7 @@ function(_git_clone git_executable git_repository git_tag module_dir) COMMAND "${git_executable}" checkout ${git_tag} WORKING_DIRECTORY "${module_dir}" RESULT_VARIABLE error_code - OUTPUT_QUIET - ERROR_QUIET - ) + OUTPUT_QUIET ERROR_QUIET) if(error_code) message(FATAL_ERROR "Failed to checkout tag: '${git_tag}'") endif() @@ -26,8 +27,7 @@ function(_git_clone git_executable git_repository git_tag module_dir) execute_process( COMMAND "${git_executable}" submodule init WORKING_DIRECTORY "${module_dir}" - RESULT_VARIABLE error_code - ) + RESULT_VARIABLE error_code) if(error_code) message(FATAL_ERROR "Failed to init submodules in: '${module_dir}'") endif() @@ -35,8 +35,7 @@ function(_git_clone git_executable git_repository git_tag module_dir) execute_process( COMMAND "${git_executable}" submodule update --recursive WORKING_DIRECTORY "${module_dir}" - RESULT_VARIABLE error_code - ) + RESULT_VARIABLE error_code) if(error_code) message(FATAL_ERROR "Failed to update submodules in: '${module_dir}'") endif() @@ -44,39 +43,43 @@ endfunction() # Helper to perform a git update. Checks the current Git revision against the # desired revision and only performs a fetch and checkout if needed. -function(_git_update git_executable git_repository git_tag module_dir) +function( + _git_update + git_executable + git_repository + git_tag + module_dir) # Verify that remote url are the same execute_process( COMMAND "${git_executable}" config --get remote.origin.url WORKING_DIRECTORY "${module_dir}" RESULT_VARIABLE error_code OUTPUT_VARIABLE remote_origin_url - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - if ( NOT "${remote_origin_url}" STREQUAL "${git_repository}") + OUTPUT_STRIP_TRAILING_WHITESPACE) + if(NOT + "${remote_origin_url}" + STREQUAL + "${git_repository}") message(WARNING "Remote URL changed from ${git_repository} to ${remote_origin_url}") execute_process( COMMAND "${git_executable}" remote rename origin old_origin WORKING_DIRECTORY "${module_dir}" RESULT_VARIABLE error_code OUTPUT_VARIABLE ignored - OUTPUT_STRIP_TRAILING_WHITESPACE - ) + OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process( COMMAND "${git_executable}" remote add origin "${git_repository}" WORKING_DIRECTORY "${module_dir}" RESULT_VARIABLE error_code OUTPUT_VARIABLE ignored - OUTPUT_STRIP_TRAILING_WHITESPACE - ) + OUTPUT_STRIP_TRAILING_WHITESPACE) endif() execute_process( COMMAND "${git_executable}" rev-parse --verify "${git_tag}" WORKING_DIRECTORY "${module_dir}" RESULT_VARIABLE error_code OUTPUT_VARIABLE tag_hash - OUTPUT_STRIP_TRAILING_WHITESPACE - ) + OUTPUT_STRIP_TRAILING_WHITESPACE) if(error_code) message(FATAL_ERROR "Failed to get the hash for tag '${module_dir}'") endif() @@ -85,8 +88,7 @@ function(_git_update git_executable git_repository git_tag module_dir) WORKING_DIRECTORY "${module_dir}" RESULT_VARIABLE error_code OUTPUT_VARIABLE head_hash - OUTPUT_STRIP_TRAILING_WHITESPACE - ) + OUTPUT_STRIP_TRAILING_WHITESPACE) if(error_code) message(FATAL_ERROR "Failed to get the hash for ${git_repository} HEAD") endif() @@ -96,8 +98,7 @@ function(_git_update git_executable git_repository git_tag module_dir) execute_process( COMMAND "${git_executable}" fetch "${git_repository}" WORKING_DIRECTORY "${module_dir}" - RESULT_VARIABLE error_code - ) + RESULT_VARIABLE error_code) if(error_code) message(FATAL_ERROR "Failed to fetch repository '${git_repository}'") endif() @@ -105,8 +106,7 @@ function(_git_update git_executable git_repository git_tag module_dir) execute_process( COMMAND "${git_executable}" checkout ${git_tag} WORKING_DIRECTORY "${module_dir}" - RESULT_VARIABLE error_code - ) + RESULT_VARIABLE error_code) if(error_code) message(FATAL_ERROR "Failed to checkout tag: '${git_tag}'") endif() @@ -114,8 +114,7 @@ function(_git_update git_executable git_repository git_tag module_dir) execute_process( COMMAND "${git_executable}" submodule update --recursive WORKING_DIRECTORY "${module_dir}" - RESULT_VARIABLE error_code - ) + RESULT_VARIABLE error_code) if(error_code) message(FATAL_ERROR "Failed to update submodules in: '${module_dir}'") endif() @@ -124,17 +123,30 @@ endfunction() # Helper function to fetch a module stored in a Git repository. # Git fetches are only performed when required. -function(_fetch_with_git git_executable git_repository git_tag module_dir) +function( + _fetch_with_git + git_executable + git_repository + git_tag + module_dir) if("${git_tag}" STREQUAL "" OR "${git_repository}" STREQUAL "") message(FATAL_ERROR "Tag or repository for git checkout should not be empty.") endif() # If we don't have a clone yet. if(NOT EXISTS "${module_dir}") - _git_clone("${git_executable}" "${git_repository}" "${git_tag}" "${module_dir}") + _git_clone( + "${git_executable}" + "${git_repository}" + "${git_tag}" + "${module_dir}") message(STATUS " The remote module: ${git_repository} is cloned into the directory ${module_dir}") else() # We already have a clone, but we need to check that it has the right revision. - _git_update("${git_executable}" "${git_repository}" "${git_tag}" "${module_dir}") + _git_update( + "${git_executable}" + "${git_repository}" + "${git_tag}" + "${module_dir}") endif() endfunction() @@ -165,15 +177,25 @@ endfunction() # "" then no git fetch or update will be performed. function(itk_fetch_module _name _description) include(CMakeParseArguments) - cmake_parse_arguments(_fetch_options "" "MODULE_COMPLIANCE_LEVEL;GIT_REPOSITORY;GIT_TAG" "" ${ARGN}) + cmake_parse_arguments( + _fetch_options + "" + "MODULE_COMPLIANCE_LEVEL;GIT_REPOSITORY;GIT_TAG" + "" + ${ARGN}) set(MODULE_COMPLIANCE_LEVEL "${_fetch_options_MODULE_COMPLIANCE_LEVEL}") if(NOT MODULE_COMPLIANCE_LEVEL) set(DEFAULT_MODULE_COMPLIANCE_LEVEL 1) - message(STATUS "Implicitly setting unspecified compliance level for module Module_${_name} to ${DEFAULT_MODULE_COMPLIANCE_LEVEL}") + message( + STATUS + "Implicitly setting unspecified compliance level for module Module_${_name} to ${DEFAULT_MODULE_COMPLIANCE_LEVEL}" + ) set(MODULE_COMPLIANCE_LEVEL ${DEFAULT_MODULE_COMPLIANCE_LEVEL}) endif() - set(Module_${_name}_REMOTE_COMPLIANCE_LEVEL ${MODULE_COMPLIANCE_LEVEL} CACHE INTERNAL "Variable to indicate the Module_${_name} compliance level") + set(Module_${_name}_REMOTE_COMPLIANCE_LEVEL + ${MODULE_COMPLIANCE_LEVEL} + CACHE INTERNAL "Variable to indicate the Module_${_name} compliance level") if(NOT DEFINED Module_${_name}) option(Module_${_name} "(Remote-${MODULE_COMPLIANCE_LEVEL}) ${_description}" OFF) @@ -193,8 +215,11 @@ function(itk_fetch_module _name _description) # Fetch_$_remote_module} is deprecated. To maintain backward compatibility: if(Fetch_${_name}) - message(WARNING "Fetch_${_name} is deprecated, please use Module_${_name} to download and enable the remote module.") - set(Module_${_name} ON CACHE FORCE "(Remote-${MODULE_COMPLIANCE_LEVEL}) ${_description}") + message( + WARNING "Fetch_${_name} is deprecated, please use Module_${_name} to download and enable the remote module.") + set(Module_${_name} + ON + CACHE FORCE "(Remote-${MODULE_COMPLIANCE_LEVEL}) ${_description}") endif() if(Module_${_name}) @@ -209,22 +234,32 @@ function(itk_fetch_module _name _description) execute_process( COMMAND "${GIT_EXECUTABLE}" --version OUTPUT_VARIABLE ov - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - string(REGEX REPLACE "^git version (.+)$" "\\1" _version "${ov}") + OUTPUT_STRIP_TRAILING_WHITESPACE) + string( + REGEX + REPLACE "^git version (.+)$" + "\\1" + _version + "${ov}") if("${_version}" VERSION_LESS 1.6.6) message(FATAL_ERROR "Git version 1.6.6 or later is required.") endif() set(REMOTE_GIT_TAG "${_fetch_options_GIT_TAG}") - if(DEFINED Module_${_name}_GIT_TAG AND NOT "${Module_${_name}_GIT_TAG}" STREQUAL "${_fetch_options_GIT_TAG}") + if(DEFINED Module_${_name}_GIT_TAG + AND NOT + "${Module_${_name}_GIT_TAG}" + STREQUAL + "${_fetch_options_GIT_TAG}") set(REMOTE_GIT_TAG "${Module_${_name}_GIT_TAG}") message(STATUS "NOTE: Using override 'Module_${_name}_GIT_TAG=${REMOTE_GIT_TAG}'\n" " instead of value 'GIT_TAG=${_fetch_options_GIT_TAG}'\n" " specified in file ${ITK_SOURCE_DIR}/Modules/Remote/${_name}.remote.cmake'") endif() - set(Module_${_name}_GIT_TAG "${REMOTE_GIT_TAG}" CACHE STRING "Override default GIT_TAG value for remote module ${_name}") + set(Module_${_name}_GIT_TAG + "${REMOTE_GIT_TAG}" + CACHE STRING "Override default GIT_TAG value for remote module ${_name}") mark_as_advanced(Module_${_name}_GIT_TAG) # Show remote module options if building. set_property(CACHE Module_${_name}_GIT_TAG PROPERTY TYPE STRING) @@ -232,12 +267,15 @@ function(itk_fetch_module _name _description) set_property(CACHE Module_${_name}_BUILD_EXAMPLES PROPERTY TYPE BOOL) endif() - if (NOT REMOTE_GIT_TAG STREQUAL "") - _fetch_with_git("${GIT_EXECUTABLE}" + if(NOT + REMOTE_GIT_TAG + STREQUAL + "") + _fetch_with_git( + "${GIT_EXECUTABLE}" "${_fetch_options_GIT_REPOSITORY}" "${REMOTE_GIT_TAG}" - "${ITK_SOURCE_DIR}/Modules/Remote/${_name}" - ) + "${ITK_SOURCE_DIR}/Modules/Remote/${_name}") endif() else() # Hide remote module options if not building. diff --git a/CMake/ITKModuleTest.cmake b/CMake/ITKModuleTest.cmake index a6c43d21107..acd87fc5177 100644 --- a/CMake/ITKModuleTest.cmake +++ b/CMake/ITKModuleTest.cmake @@ -11,10 +11,15 @@ # KitTests - a list of tests to be included in the test driver # ADDITIONAL_SRC (optional) - additional source files, which don't contain tests -macro(CreateTestDriver KIT KIT_LIBS KitTests) +macro( + CreateTestDriver + KIT + KIT_LIBS + KitTests) set(ADDITIONAL_SRC ${ARGN}) if(EMSCRIPTEN) - set(emscripten_before " + set(emscripten_before + " EM_ASM( var cmake_source_dir = '${CMAKE_SOURCE_DIR}'.split('/'); // This is intentionally global so it can be unmounted at the end. @@ -43,7 +48,8 @@ EM_ASM( } ); ") - set(emscripten_after " + set(emscripten_after + " EM_ASM( FS.unmount(source_mount_dir); if(source_mount_dir != binary_mount_dir) { @@ -54,13 +60,16 @@ EM_ASM( endif() set(CMAKE_TESTDRIVER_BEFORE_TESTMAIN "${emscripten_before}#include \"itkTestDriverBeforeTest.inc\"") set(CMAKE_TESTDRIVER_AFTER_TESTMAIN "#include \"itkTestDriverAfterTest.inc\"${emscripten_after}") - create_test_sourcelist(Tests ${KIT}TestDriver.cxx - ${KitTests} + create_test_sourcelist( + Tests ${KIT}TestDriver.cxx ${KitTests} EXTRA_INCLUDE itkTestDriverIncludeRequiredFactories.h - FUNCTION ProcessArgumentsAndRegisterRequiredFactories - ) + FUNCTION ProcessArgumentsAndRegisterRequiredFactories) add_executable(${KIT}TestDriver ${KIT}TestDriver.cxx ${Tests} ${ADDITIONAL_SRC}) - target_link_libraries(${KIT}TestDriver LINK_PUBLIC ${KIT_LIBS} ${ITKTestKernel_LIBRARIES}) + target_link_libraries( + ${KIT}TestDriver + LINK_PUBLIC + ${KIT_LIBS} + ${ITKTestKernel_LIBRARIES}) itk_module_target_label(${KIT}TestDriver) endmacro() @@ -120,12 +129,21 @@ function(itk_python_add_test) set(options) set(oneValueArgs NAME) set(multiValueArgs TEST_DRIVER_ARGS COMMAND) - cmake_parse_arguments(PYTHON_ADD_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + cmake_parse_arguments( + PYTHON_ADD_TEST + "${options}" + "${oneValueArgs}" + "${multiValueArgs}" + ${ARGN}) set(command "${Python3_EXECUTABLE}") # add extra command which may be needed on some systems if(CMAKE_OSX_ARCHITECTURES) - list(GET CMAKE_OSX_ARCHITECTURES 0 test_arch) + list( + GET + CMAKE_OSX_ARCHITECTURES + 0 + test_arch) set(command arch -${test_arch} ${command}) endif() @@ -143,17 +161,28 @@ function(itk_python_add_test) endif() unset(WrapITK_PTH_FILE) - itk_add_test(NAME ${PYTHON_ADD_TEST_NAME} - COMMAND itkTestDriver - --add-before-env PYTHONPATH "${itk_wrap_python_binary_dir}" # parent directory of the itk package - --add-before-env PYTHONPATH "${ITK_PYTHON_PACKAGE_DIR}" # package directory and shared libraries + swig artifacts - --add-before-libpath "${ITK_PYTHON_PACKAGE_DIR}" # itk non-wrapping shared libs - ${PYTHON_ADD_TEST_TEST_DRIVER_ARGS} - ${command} - ${PYTHON_ADD_TEST_COMMAND} - WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}" - ) - set_property(TEST ${PYTHON_ADD_TEST_NAME} APPEND PROPERTY LABELS Python) + itk_add_test( + NAME + ${PYTHON_ADD_TEST_NAME} + COMMAND + itkTestDriver + --add-before-env + PYTHONPATH + "${itk_wrap_python_binary_dir}" # parent directory of the itk package + --add-before-env + PYTHONPATH + "${ITK_PYTHON_PACKAGE_DIR}" # package directory and shared libraries + swig artifacts + --add-before-libpath + "${ITK_PYTHON_PACKAGE_DIR}" # itk non-wrapping shared libs + ${PYTHON_ADD_TEST_TEST_DRIVER_ARGS} + ${command} + ${PYTHON_ADD_TEST_COMMAND} + WORKING_DIRECTORY + "${CMAKE_CURRENT_LIST_DIR}") + set_property( + TEST ${PYTHON_ADD_TEST_NAME} + APPEND + PROPERTY LABELS Python) endfunction() #----------------------------------------------------------------------------- @@ -184,17 +213,33 @@ function(itk_python_expression_add_test) set(options) set(oneValueArgs NAME EXPRESSION) set(multiValueArgs) - cmake_parse_arguments(PYTHON_EXPRESSION_ADD_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + cmake_parse_arguments( + PYTHON_EXPRESSION_ADD_TEST + "${options}" + "${oneValueArgs}" + "${multiValueArgs}" + ${ARGN}) - itk_python_add_test(NAME ${PYTHON_EXPRESSION_ADD_TEST_NAME} - COMMAND -c "import itk$ itk.auto_progress(2)$ ${PYTHON_EXPRESSION_ADD_TEST_EXPRESSION}" - ) + itk_python_add_test( + NAME + ${PYTHON_EXPRESSION_ADD_TEST_NAME} + COMMAND + -c + "import itk$ itk.auto_progress(2)$ ${PYTHON_EXPRESSION_ADD_TEST_EXPRESSION}") endfunction() -function(CreateGoogleTestDriver KIT KIT_LIBS KitTests) +function( + CreateGoogleTestDriver + KIT + KIT_LIBS + KitTests) set(exe "${KIT}GTestDriver") add_executable(${exe} ${KitTests}) - target_link_libraries(${exe} ${KIT_LIBS} GTest::GTest GTest::Main) + target_link_libraries( + ${exe} + ${KIT_LIBS} + GTest::GTest + GTest::Main) itk_module_target_label(${exe}) include(GoogleTest) @@ -216,9 +261,7 @@ function(CreateGoogleTestDriver KIT KIT_LIBS KitTests) # enable the slow introspection (during all other development) set(_skip_dependency "SKIP_DEPENDENCY") endif() - gtest_add_tests(TARGET ${exe} - ${_skip_dependency} - ) + gtest_add_tests(TARGET ${exe} ${_skip_dependency}) endif() # TODO need to label the produced ctests endfunction() diff --git a/CMake/ITKSetPython3Vars.cmake b/CMake/ITKSetPython3Vars.cmake index 38a9ee76e1d..ff4e8cc7167 100644 --- a/CMake/ITKSetPython3Vars.cmake +++ b/CMake/ITKSetPython3Vars.cmake @@ -9,7 +9,13 @@ cmake_policy(SET CMP0094 NEW) # makes FindPython3 prefer activated virtualenv Python to latest version set(PYTHON_REQUIRED_VERSION 3.7) -set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7) +set(Python_ADDITIONAL_VERSIONS + 3.12 + 3.11 + 3.10 + 3.9 + 3.8 + 3.7) if(PYTHON_DEVELOPMENT_REQUIRED) if(DEFINED Python3_EXECUTABLE) # if already specified set(_specified_Python3_EXECUTABLE ${Python3_EXECUTABLE}) @@ -17,8 +23,9 @@ if(PYTHON_DEVELOPMENT_REQUIRED) # set(Python3_FIND_REGISTRY LAST) # default is FIRST. Do we need/want this? find_package(Python3 ${PYTHON_REQUIRED_VERSION} COMPONENTS Interpreter Development) if(DEFINED _specified_Python3_EXECUTABLE) - set(Python3_EXECUTABLE ${_specified_Python3_EXECUTABLE} CACHE INTERNAL - "Path to the Python interpreter" FORCE) + set(Python3_EXECUTABLE + ${_specified_Python3_EXECUTABLE} + CACHE INTERNAL "Path to the Python interpreter" FORCE) endif() else() # if not PYTHON_DEVELOPMENT_REQUIRED, just find some version of Python (don't need to be as specific) find_package(Python3 ${PYTHON_REQUIRED_VERSION} COMPONENTS Interpreter) @@ -28,11 +35,14 @@ if(ITK_WRAP_PYTHON) else() set(ITK_WRAP_PYTHON_VERSION "ITK_WRAP_PYTHON=OFF") endif() -if(NOT Python3_EXECUTABLE AND _specified_Python3_EXECUTABLE) # workaround for cases where FindPython3 fails to set correctly - set(Python3_EXECUTABLE ${_specified_Python3_EXECUTABLE} CACHE INTERNAL - "Path to the Python interpreter" FORCE) +if(NOT Python3_EXECUTABLE AND _specified_Python3_EXECUTABLE +)# workaround for cases where FindPython3 fails to set correctly + set(Python3_EXECUTABLE + ${_specified_Python3_EXECUTABLE} + CACHE INTERNAL "Path to the Python interpreter" FORCE) endif() # Add user-visible cache entry -set(Python3_ROOT_DIR ${Python3_ROOT_DIR} CACHE PATH - "Which installation or virtual environment of Python to use" FORCE) +set(Python3_ROOT_DIR + ${Python3_ROOT_DIR} + CACHE PATH "Which installation or virtual environment of Python to use" FORCE) diff --git a/CMake/ITKSetStandardCompilerFlags.cmake b/CMake/ITKSetStandardCompilerFlags.cmake index f9cb68fe29c..1ec759839e9 100644 --- a/CMake/ITKSetStandardCompilerFlags.cmake +++ b/CMake/ITKSetStandardCompilerFlags.cmake @@ -4,7 +4,6 @@ # - variable to store valid CXX warning flags # This internally calls the check_c_compiler_flag and check_cxx_compiler_flag macros. - # To create a portable build system, it is best to not # test for platforms, but to test for features. # @@ -18,7 +17,6 @@ # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_WARNING_FLAGS}") # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARNING_FLAGS}") - include(CheckCXXCompilerFlag) include(CheckCCompilerFlag) include(CheckPIESupported) @@ -28,39 +26,50 @@ function(check_c_compiler_flags c_flag_var) set(local_c_flags "") set(flag_list "${ARGN}") foreach(flag IN LISTS flag_list) - string(REPLACE "=" "_" flag_var ${flag}) + string( + REPLACE "=" + "_" + flag_var + ${flag}) check_c_compiler_flag(${flag} C_HAS_WARNING${flag_var}) if(${C_HAS_WARNING${flag_var}}) set(local_c_flags "${local_c_flags} ${flag}") endif() endforeach() - set(${c_flag_var} "${local_c_flags}" PARENT_SCOPE) + set(${c_flag_var} + "${local_c_flags}" + PARENT_SCOPE) endfunction() - function(check_cxx_compiler_flags cxx_flag_var) set(local_cxx_flags "") set(flag_list "${ARGN}") foreach(flag IN LISTS flag_list) - string(REPLACE "=" "_" flag_var ${flag}) + string( + REPLACE "=" + "_" + flag_var + ${flag}) check_cxx_compiler_flag(${flag} CXX_HAS_WARNING${flag_var}) if(${CXX_HAS_WARNING${flag_var}}) set(local_cxx_flags "${local_cxx_flags} ${flag}") endif() endforeach() - set(${cxx_flag_var} "${local_cxx_flags}" PARENT_SCOPE) + set(${cxx_flag_var} + "${local_cxx_flags}" + PARENT_SCOPE) endfunction() - function(check_compiler_warning_flags c_warning_flags_var cxx_warning_flags_var) - set(${c_warning_flags_var} "" PARENT_SCOPE) - set(${cxx_warning_flags_var} "" PARENT_SCOPE) + set(${c_warning_flags_var} + "" + PARENT_SCOPE) + set(${cxx_warning_flags_var} + "" + PARENT_SCOPE) # Check this list on C compiler only - set(c_flags - -Wno-uninitialized - -Wno-unused-parameter - ) + set(c_flags -Wno-uninitialized -Wno-unused-parameter) ## On windows, the most verbose compiler options ## is reporting 1000's of wanings in windows @@ -76,15 +85,24 @@ function(check_compiler_warning_flags c_warning_flags_var cxx_warning_flags_var) ## is reporting 1000's of remarks of trivial items ## that will only slow day-to-day operations ## specify -w2 to restrict to only warnings and errors - if (${CMAKE_C_COMPILER} MATCHES "icc.*$") + if(${CMAKE_C_COMPILER} MATCHES "icc.*$") set(USING_INTEL_ICC_COMPILER TRUE) endif() - if (${CMAKE_CXX_COMPILER} MATCHES "icpc.*$") + if(${CMAKE_CXX_COMPILER} MATCHES "icpc.*$") set(USING_INTEL_ICC_COMPILER TRUE) endif() if(USING_INTEL_ICC_COMPILER) # NOTE -w2 is close to gcc's -Wall warning level, -w5 is intels -Wall warning level, and it is too verbose. - set(VerboseWarningsFlag -w2 -wd1268 -wd981 -wd383 -wd1418 -wd1419 -wd2259 -wd1572 -wd424) + set(VerboseWarningsFlag + -w2 + -wd1268 + -wd981 + -wd383 + -wd1418 + -wd1419 + -wd2259 + -wd1572 + -wd424) #-wd424 #Needed for Intel compilers with remarki #424: extra ";" ignored #-wd383 #Needed for Intel compilers with remark #383: value copied to temporary, reference to temporary used #-wd981 #Needed for Intel compilers with remark #981: operands are evaluated in unspecified order @@ -95,44 +113,46 @@ function(check_compiler_warning_flags c_warning_flags_var cxx_warning_flags_var) #-wd1268 #Needed for Intel compilers with warning #1268: support for exported templates is disabled else() set(VerboseWarningsFlag -Wall) - endif () + endif() endif() # Check this list on both C and C++ compilers set(c_and_cxx_flags - ${VerboseWarningsFlag} - -Wno-long-double #Needed on APPLE - -Wcast-align - -Wdisabled-optimization - -Wextra - -Wformat=2 - -Winvalid-pch - -Wno-format-nonliteral - -Wpointer-arith - -Wshadow - -Wunused - -Wwrite-strings - -Wno-strict-overflow - ) + ${VerboseWarningsFlag} + -Wno-long-double #Needed on APPLE + -Wcast-align + -Wdisabled-optimization + -Wextra + -Wformat=2 + -Winvalid-pch + -Wno-format-nonliteral + -Wpointer-arith + -Wshadow + -Wunused + -Wwrite-strings + -Wno-strict-overflow) # Check this list on C++ compiler only set(cxx_flags - -Wno-deprecated - -Wno-invalid-offsetof - -Wno-undefined-var-template # suppress invalid warning when explicitly instantiated in another translation unit - -Woverloaded-virtual - -Wctad-maybe-unsupported - -Wstrict-null-sentinel - ) -##-Wno-c++0x-static-nonintegral-init - ## Clang compiler likes to warn about this feature that is technically only in - ## c++0x, but works on many compilers, and if it fails, then alternate methods are used + -Wno-deprecated + -Wno-invalid-offsetof + -Wno-undefined-var-template # suppress invalid warning when explicitly instantiated in another translation unit + -Woverloaded-virtual + -Wctad-maybe-unsupported + -Wstrict-null-sentinel) + ##-Wno-c++0x-static-nonintegral-init + ## Clang compiler likes to warn about this feature that is technically only in + ## c++0x, but works on many compilers, and if it fails, then alternate methods are used check_c_compiler_flags(CMAKE_C_WARNING_FLAGS ${c_flags} ${c_and_cxx_flags}) check_cxx_compiler_flags(CMAKE_CXX_WARNING_FLAGS ${c_and_cxx_flags} ${cxx_flags}) - set(${c_warning_flags_var} "${CMAKE_C_WARNING_FLAGS}" PARENT_SCOPE) - set(${cxx_warning_flags_var} "${CMAKE_CXX_WARNING_FLAGS}" PARENT_SCOPE) + set(${c_warning_flags_var} + "${CMAKE_C_WARNING_FLAGS}" + PARENT_SCOPE) + set(${cxx_warning_flags_var} + "${CMAKE_CXX_WARNING_FLAGS}" + PARENT_SCOPE) endfunction() # Check for the presence of AVX and figure out the flags to use for it. @@ -148,7 +168,8 @@ function(check_avx_flags avx_flags_var) if(MSVC) set(CMAKE_REQUIRED_FLAGS "/arch:AVX") # set flags to be used in check_cxx_source_runs below endif() - check_cxx_source_runs(" + check_cxx_source_runs( + " #include int main() { @@ -174,7 +195,8 @@ function(check_avx_flags avx_flags_var) if(MSVC) set(CMAKE_REQUIRED_FLAGS "/arch:AVX2") # set flags to be used in check_cxx_source_runs below endif() - check_cxx_source_runs(" + check_cxx_source_runs( + " #include int main() { @@ -221,7 +243,8 @@ function(check_sse2_flags sse2_flags_var) # perform test include(CheckCXXSourceRuns) - check_cxx_source_runs(" + check_cxx_source_runs( + " #include int main() { @@ -247,32 +270,41 @@ function(check_sse2_flags sse2_flags_var) elseif(have_sse2_extensions_var AND CMAKE_COMPILER_IS_GNUCXX) set(${sse2_flags_var} "-msse2") endif() - set(${sse2_flags_var} "${${sse2_flags_var}}" PARENT_SCOPE) + set(${sse2_flags_var} + "${${sse2_flags_var}}" + PARENT_SCOPE) endfunction() function(check_compiler_optimization_flags c_optimization_flags_var cxx_optimization_flags_var) - set(${c_optimization_flags_var} "" PARENT_SCOPE) - set(${cxx_optimization_flags_var} "" PARENT_SCOPE) + set(${c_optimization_flags_var} + "" + PARENT_SCOPE) + set(${cxx_optimization_flags_var} + "" + PARENT_SCOPE) if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(x86_64|AMD64)") if(MSVC) check_avx_flags(InstructionSetOptimizationFlags) if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4") - list(APPEND InstructionSetOptimizationFlags - /arch:SSE /arch:SSE2) + list( + APPEND + InstructionSetOptimizationFlags + /arch:SSE + /arch:SSE2) endif() elseif(NOT EMSCRIPTEN OR WASI) - if (${CMAKE_C_COMPILER} MATCHES "icc.*$") + if(${CMAKE_C_COMPILER} MATCHES "icc.*$") set(USING_INTEL_ICC_COMPILER TRUE) endif() - if (${CMAKE_CXX_COMPILER} MATCHES "icpc.*$") + if(${CMAKE_CXX_COMPILER} MATCHES "icpc.*$") set(USING_INTEL_ICC_COMPILER TRUE) endif() if(USING_INTEL_ICC_COMPILER) set(InstructionSetOptimizationFlags "") else() set(InstructionSetOptimizationFlags "") - endif () + endif() # Check this list on C compiler only set(c_flags "") @@ -282,51 +314,53 @@ function(check_compiler_optimization_flags c_optimization_flags_var cxx_optimiza # Check this list on both C and C++ compilers set(InstructionSetOptimizationFlags - # https://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/i386-and-x86_002d64-Options.html - # NOTE the corei7 release date was 2008 - #-mtune=native # Tune the code for the computer used compile ITK, but allow running on generic cpu archetectures - -mtune=generic # for reproducible results https://github.com/InsightSoftwareConsortium/ITK/issues/1939 - -march=corei7 # Use ABI settings to support corei7 (circa 2008 ABI feature sets, core-avx circa 2013) - ) + # https://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/i386-and-x86_002d64-Options.html + # NOTE the corei7 release date was 2008 + #-mtune=native # Tune the code for the computer used compile ITK, but allow running on generic cpu archetectures + -mtune=generic # for reproducible results https://github.com/InsightSoftwareConsortium/ITK/issues/1939 + -march=corei7 # Use ABI settings to support corei7 (circa 2008 ABI feature sets, core-avx circa 2013) + ) endif() set(c_and_cxx_flags ${InstructionSetOptimizationFlags}) endif() - check_c_compiler_flags( CMAKE_C_WARNING_FLAGS ${c_and_cxx_flags} ${c_flags}) + check_c_compiler_flags(CMAKE_C_WARNING_FLAGS ${c_and_cxx_flags} ${c_flags}) check_cxx_compiler_flags(CMAKE_CXX_WARNING_FLAGS ${c_and_cxx_flags} ${cxx_flags}) - set(${c_optimization_flags_var} "${CMAKE_C_WARNING_FLAGS}" PARENT_SCOPE) - set(${cxx_optimization_flags_var} "${CMAKE_CXX_WARNING_FLAGS}" PARENT_SCOPE) + set(${c_optimization_flags_var} + "${CMAKE_C_WARNING_FLAGS}" + PARENT_SCOPE) + set(${cxx_optimization_flags_var} + "${CMAKE_CXX_WARNING_FLAGS}" + PARENT_SCOPE) endfunction() - macro(check_compiler_platform_flags) # On Visual Studio 8 MS deprecated C. This removes all 1.276E1265 security # warnings if(WIN32) - if(NOT MINGW) - if(NOT ITK_ENABLE_VISUAL_STUDIO_DEPRECATED_C_WARNINGS) - add_definitions( - -D_CRT_FAR_MAPPINGS_NO_DEPRECATE - -D_CRT_IS_WCTYPE_NO_DEPRECATE - -D_CRT_MANAGED_FP_NO_DEPRECATE - -D_CRT_NONSTDC_NO_DEPRECATE - -D_CRT_SECURE_NO_DEPRECATE - -D_CRT_SECURE_NO_DEPRECATE_GLOBALS - -D_CRT_SETERRORMODE_BEEP_SLEEP_NO_DEPRECATE - -D_CRT_TIME_FUNCTIONS_NO_DEPRECATE - -D_CRT_VCCLRIT_NO_DEPRECATE - -D_SCL_SECURE_NO_DEPRECATE - ) - endif() - # With MS compilers on Win64, we need the /bigobj switch, else generated - # code results in objects with number of sections exceeding object file - # format. - # see https://msdn.microsoft.com/en-us/library/ms173499.aspx - if(MSVC) - set(ITK_REQUIRED_CXX_FLAGS "${ITK_REQUIRED_CXX_FLAGS} /bigobj") - endif() - endif() + if(NOT MINGW) + if(NOT ITK_ENABLE_VISUAL_STUDIO_DEPRECATED_C_WARNINGS) + add_definitions( + -D_CRT_FAR_MAPPINGS_NO_DEPRECATE + -D_CRT_IS_WCTYPE_NO_DEPRECATE + -D_CRT_MANAGED_FP_NO_DEPRECATE + -D_CRT_NONSTDC_NO_DEPRECATE + -D_CRT_SECURE_NO_DEPRECATE + -D_CRT_SECURE_NO_DEPRECATE_GLOBALS + -D_CRT_SETERRORMODE_BEEP_SLEEP_NO_DEPRECATE + -D_CRT_TIME_FUNCTIONS_NO_DEPRECATE + -D_CRT_VCCLRIT_NO_DEPRECATE + -D_SCL_SECURE_NO_DEPRECATE) + endif() + # With MS compilers on Win64, we need the /bigobj switch, else generated + # code results in objects with number of sections exceeding object file + # format. + # see https://msdn.microsoft.com/en-us/library/ms173499.aspx + if(MSVC) + set(ITK_REQUIRED_CXX_FLAGS "${ITK_REQUIRED_CXX_FLAGS} /bigobj") + endif() + endif() endif() if(WIN32) @@ -341,10 +375,8 @@ macro(check_compiler_platform_flags) # supposed to be UNIX-like), but we need to add it explicitly for # a native windows build with the MinGW tools. if(MINGW) - set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS - "-shared -Wl,--export-all-symbols -Wl,--enable-auto-import") - set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS - "-shared -Wl,--export-all-symbols -Wl,--enable-auto-import") + set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,--export-all-symbols -Wl,--enable-auto-import") + set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,--export-all-symbols -Wl,--enable-auto-import") set(CMAKE_EXE_LINKER_FLAGS "-Wl,--enable-auto-import") endif() else() @@ -369,19 +401,31 @@ macro(check_compiler_platform_flags) option(ITK_USE_64BITS_APPLE_TRUNCATION_WARNING "Turn on warnings on 64bits to 32bits truncations." OFF) mark_as_advanced(ITK_USE_64BITS_APPLE_TRUNCATION_WARNING) - execute_process(COMMAND "${CMAKE_C_COMPILER}" --version - OUTPUT_VARIABLE _version ERROR_VARIABLE _version) + execute_process( + COMMAND "${CMAKE_C_COMPILER}" --version + OUTPUT_VARIABLE _version + ERROR_VARIABLE _version) # -fopenmp breaks compiling the HDF5 library in shared library mode # on the OS X platform -- at least with gcc 4.2 from Xcode. - set(compile_flag_lists CMAKE_C_FLAGS CMAKE_CXX_FLAGS - CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_MINSIZEREL - CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO - CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL - CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO) + set(compile_flag_lists + CMAKE_C_FLAGS + CMAKE_CXX_FLAGS + CMAKE_C_FLAGS_DEBUG + CMAKE_C_FLAGS_MINSIZEREL + CMAKE_C_FLAGS_RELEASE + CMAKE_C_FLAGS_RELWITHDEBINFO + CMAKE_CXX_FLAGS_DEBUG + CMAKE_CXX_FLAGS_MINSIZEREL + CMAKE_CXX_FLAGS_RELEASE + CMAKE_CXX_FLAGS_RELWITHDEBINFO) foreach(listname ${compile_flag_lists}) if("${${listname}}" MATCHES ".*-fopenmp.*") - string(REPLACE "-fopenmp" "" tmpFlags "${${listname}}") + string( + REPLACE "-fopenmp" + "" + tmpFlags + "${${listname}}") set(${listname} "${tmpFlags}") message("-fopenmp causes incorrect compilation of HDF, removing from ${listname}") endif() @@ -411,13 +455,13 @@ macro(check_compiler_platform_flags) endif() # Add flags for the SUN compiler to provide all the methods for std::allocator. # - CHECK_CXX_SOURCE_COMPILES("-features=no%anachronisms" SUN_COMPILER) + check_cxx_source_compiles("-features=no%anachronisms" SUN_COMPILER) if(SUN_COMPILER) - CHECK_CXX_SOURCE_COMPILES("-library=stlport4" SUN_COMPILER_HAS_STL_PORT_4) + check_cxx_source_compiles("-library=stlport4" SUN_COMPILER_HAS_STL_PORT_4) if(SUN_COMPILER_HAS_STL_PORT_4) set(ITK_REQUIRED_CXX_FLAGS "${ITK_REQUIRED_CXX_FLAGS} -library=stlport4") endif() - endif() + endif() endif() # mingw thread support @@ -435,9 +479,9 @@ macro(check_compiler_platform_flags) set(ITK_CXX_DISABLE_OPTIMIZATION_FLAG "-O0") endif() if(DEFINED ITK_CXX_DISABLE_OPTIMIZATION_FLAG) - CHECK_CXX_SOURCE_COMPILES(${ITK_CXX_DISABLE_OPTIMIZATION_FLAG} CXX_HAS_DISABLE_OPTIMIZATION_FLAG) + check_cxx_source_compiles(${ITK_CXX_DISABLE_OPTIMIZATION_FLAG} CXX_HAS_DISABLE_OPTIMIZATION_FLAG) endif() -endmacro()#End the platform check function +endmacro() #End the platform check function if(NOT ITK_C_WARNING_FLAGS OR NOT ITK_CXX_WARNING_FLAGS) # Only check once if not explicitly set on command line #----------------------------------------------------------------------------- @@ -448,33 +492,53 @@ endif() if(NOT ITK_C_WARNING_FLAGS) #Not set on cmake command line option -DITK_C_WARNING_FLAGS:STRING="" set(ITK_C_WARNING_FLAGS ${C_WARNING_FLAGS}) endif() -set(ITK_C_WARNING_FLAGS ${ITK_C_WARNING_FLAGS} CACHE STRING "ITK C compiler warning flags. Modify to suit your needs.") +set(ITK_C_WARNING_FLAGS + ${ITK_C_WARNING_FLAGS} + CACHE STRING "ITK C compiler warning flags. Modify to suit your needs.") if(NOT ITK_CXX_WARNING_FLAGS) #Not set on cmake command line option -DITK_CXX_WARNING_FLAGS:STRING="" set(ITK_CXX_WARNING_FLAGS ${CXX_WARNING_FLAGS}) endif() -set(ITK_CXX_WARNING_FLAGS ${ITK_CXX_WARNING_FLAGS} CACHE STRING "ITK CXX compiler warning flags. Modify to suit your needs.") +set(ITK_CXX_WARNING_FLAGS + ${ITK_CXX_WARNING_FLAGS} + CACHE STRING "ITK CXX compiler warning flags. Modify to suit your needs.") mark_as_advanced(ITK_CXX_WARNING_FLAGS) mark_as_advanced(ITK_C_WARNING_FLAGS) unset(C_WARNING_FLAGS) unset(CXX_WARNING_FLAGS) - -if(NOT ITK_C_OPTIMIZATION_FLAGS OR NOT ITK_CXX_OPTIMIZATION_FLAGS) # Only check once if not explicitly set on command line +if(NOT ITK_C_OPTIMIZATION_FLAGS OR NOT ITK_CXX_OPTIMIZATION_FLAGS +)# Only check once if not explicitly set on command line #----------------------------------------------------------------------------- #Check the set of warning flags the compiler supports check_compiler_optimization_flags(C_OPTIMIZATION_FLAGS CXX_OPTIMIZATION_FLAGS) endif() if(NOT ITK_C_OPTIMIZATION_FLAGS) #Not set on cmake command line option -DITK_C_OPTIMIZATION_FLAGS:STRING="" - set(ITK_C_OPTIMIZATION_FLAGS ${C_OPTIMIZATION_FLAGS} CACHE STRING "ITK C Compiler ABI/Optimization flags, Use '-march=native' to maximize performance, but break portabilitly.") + set(ITK_C_OPTIMIZATION_FLAGS + ${C_OPTIMIZATION_FLAGS} + CACHE + STRING + "ITK C Compiler ABI/Optimization flags, Use '-march=native' to maximize performance, but break portabilitly.") else() - set(ITK_C_OPTIMIZATION_FLAGS ${ITK_C_OPTIMIZATION_FLAGS} CACHE STRING "ITK C Compiler ABI/Optimization flags, Use '-march=native' to maximize performance, but break portabilitly.") + set(ITK_C_OPTIMIZATION_FLAGS + ${ITK_C_OPTIMIZATION_FLAGS} + CACHE + STRING + "ITK C Compiler ABI/Optimization flags, Use '-march=native' to maximize performance, but break portabilitly.") endif() if(NOT ITK_CXX_OPTIMIZATION_FLAGS) #Not set on cmake command line option -DITK_CXX_OPTIMIZATION_FLAGS:STRING="" - set(ITK_CXX_OPTIMIZATION_FLAGS ${CXX_OPTIMIZATION_FLAGS} CACHE STRING "ITK CXX Compiler ABI/Optimization flags, Use '-march=native' to maximize performance, but break portabilitly.") + set(ITK_CXX_OPTIMIZATION_FLAGS + ${CXX_OPTIMIZATION_FLAGS} + CACHE + STRING + "ITK CXX Compiler ABI/Optimization flags, Use '-march=native' to maximize performance, but break portabilitly.") else() - set(ITK_CXX_OPTIMIZATION_FLAGS ${ITK_CXX_OPTIMIZATION_FLAGS} CACHE STRING "ITK CXX Compiler ABI/Optimization flags, Use '-march=native' to maximize performance, but break portabilitly.") + set(ITK_CXX_OPTIMIZATION_FLAGS + ${ITK_CXX_OPTIMIZATION_FLAGS} + CACHE + STRING + "ITK CXX Compiler ABI/Optimization flags, Use '-march=native' to maximize performance, but break portabilitly.") endif() mark_as_advanced(ITK_CXX_OPTIMIZATION_FLAGS) mark_as_advanced(ITK_C_OPTIMIZATION_FLAGS) @@ -489,10 +553,26 @@ check_compiler_platform_flags() # We do not set them in ITK_REQUIRED FLAGS because all project which # use ITK don't require these flags . -string(REPLACE " " ";" CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ITK_C_OPTIMIZATION_FLAGS} ${ITK_C_WARNING_FLAGS}") +string( + REPLACE " " + ";" + CMAKE_C_FLAGS + "${CMAKE_C_FLAGS} ${ITK_C_OPTIMIZATION_FLAGS} ${ITK_C_WARNING_FLAGS}") list(REMOVE_DUPLICATES CMAKE_C_FLAGS) -string(REPLACE ";" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - -string(REPLACE " " ";" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ITK_CXX_OPTIMIZATION_FLAGS} ${ITK_CXX_WARNING_FLAGS}") +string( + REPLACE ";" + " " + CMAKE_C_FLAGS + "${CMAKE_C_FLAGS}") + +string( + REPLACE " " + ";" + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} ${ITK_CXX_OPTIMIZATION_FLAGS} ${ITK_CXX_WARNING_FLAGS}") list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS) -string(REPLACE ";" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +string( + REPLACE ";" + " " + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS}") diff --git a/CMake/PreventInBuildInstalls.cmake b/CMake/PreventInBuildInstalls.cmake index accfea64c12..ab1fe742d72 100644 --- a/CMake/PreventInBuildInstalls.cmake +++ b/CMake/PreventInBuildInstalls.cmake @@ -1,9 +1,6 @@ string(TOLOWER "${CMAKE_INSTALL_PREFIX}" _PREFIX) string(TOLOWER "${ITK_BINARY_DIR}" _BUILD) if("${_PREFIX}" STREQUAL "${_BUILD}") - message(FATAL_ERROR - "The current CMAKE_INSTALL_PREFIX points at the build tree:\n" - " ${CMAKE_INSTALL_PREFIX}\n" - "This is not supported." - ) + message(FATAL_ERROR "The current CMAKE_INSTALL_PREFIX points at the build tree:\n" " ${CMAKE_INSTALL_PREFIX}\n" + "This is not supported.") endif() diff --git a/CMake/PreventInSourceBuilds.cmake b/CMake/PreventInSourceBuilds.cmake index c6037d2eb86..6581dc248d3 100644 --- a/CMake/PreventInSourceBuilds.cmake +++ b/CMake/PreventInSourceBuilds.cmake @@ -42,4 +42,4 @@ function(AssureOutOfSourceBuilds) endif() endfunction() -AssureOutOfSourceBuilds() +assureoutofsourcebuilds() diff --git a/CMake/TopologicalSort.cmake b/CMake/TopologicalSort.cmake index c9f997e404a..3151018ee18 100644 --- a/CMake/TopologicalSort.cmake +++ b/CMake/TopologicalSort.cmake @@ -62,7 +62,11 @@ # DEALINGS IN THE SOFTWARE. ############################################################################## -function(topological_sort LIST PREFIX SUFFIX) +function( + topological_sort + LIST + PREFIX + SUFFIX) # Clear the stack and output variable set(VERTICES "${${LIST}}") set(STACK) @@ -74,10 +78,13 @@ function(topological_sort LIST PREFIX SUFFIX) # If we haven't already processed this vertex, start a depth-first # search from where. - if (NOT FOUND_${VERTEX}) + if(NOT FOUND_${VERTEX}) # Push this vertex onto the stack with all of its outgoing edges - string(REPLACE ";" " " NEW_ELEMENT - "${VERTEX};${${PREFIX}${VERTEX}${SUFFIX}}") + string( + REPLACE ";" + " " + NEW_ELEMENT + "${VERTEX};${${PREFIX}${VERTEX}${SUFFIX}}") list(APPEND STACK ${NEW_ELEMENT}) # We've now seen this vertex @@ -88,22 +95,34 @@ function(topological_sort LIST PREFIX SUFFIX) while(STACK_LENGTH GREATER 0) # Remove the vertex and its remaining out-edges from the top # of the stack - list(GET STACK -1 OUT_EDGES) + list( + GET + STACK + -1 + OUT_EDGES) list(REMOVE_AT STACK -1) # Get the source vertex and the list of out-edges separate_arguments(OUT_EDGES) - list(GET OUT_EDGES 0 SOURCE) + list( + GET + OUT_EDGES + 0 + SOURCE) list(REMOVE_AT OUT_EDGES 0) # While there are still out-edges remaining list(LENGTH OUT_EDGES OUT_DEGREE) - while (OUT_DEGREE GREATER 0) + while(OUT_DEGREE GREATER 0) # Pull off the first outgoing edge - list(GET OUT_EDGES 0 TARGET) + list( + GET + OUT_EDGES + 0 + TARGET) list(REMOVE_AT OUT_EDGES 0) - if (NOT FOUND_${TARGET}) + if(NOT FOUND_${TARGET}) # We have not seen the target before, so we will traverse # its outgoing edges before coming back to our # source. This is the key to the depth-first traversal. @@ -113,18 +132,20 @@ function(topological_sort LIST PREFIX SUFFIX) # Push the remaining edges for the current vertex onto the # stack - string(REPLACE ";" " " NEW_ELEMENT - "${SOURCE};${OUT_EDGES}") + string( + REPLACE ";" + " " + NEW_ELEMENT + "${SOURCE};${OUT_EDGES}") list(APPEND STACK ${NEW_ELEMENT}) # Setup the new source and outgoing edges set(SOURCE ${TARGET}) - set(OUT_EDGES - ${${PREFIX}${SOURCE}${SUFFIX}}) + set(OUT_EDGES ${${PREFIX}${SOURCE}${SUFFIX}}) endif() list(LENGTH OUT_EDGES OUT_DEGREE) - endwhile () + endwhile() # We have finished all of the outgoing edges for # SOURCE; add it to the resulting list. @@ -133,8 +154,10 @@ function(topological_sort LIST PREFIX SUFFIX) # Check the length of the stack list(LENGTH STACK STACK_LENGTH) endwhile() - endif () + endif() endforeach() - set(${LIST} ${${LIST}} PARENT_SCOPE) + set(${LIST} + ${${LIST}} + PARENT_SCOPE) endfunction() diff --git a/CMake/UseITK.cmake b/CMake/UseITK.cmake index 23a58d502cb..f291947fa7f 100644 --- a/CMake/UseITK.cmake +++ b/CMake/UseITK.cmake @@ -1,4 +1,3 @@ - # # W A R N I N G # ------------- @@ -15,7 +14,6 @@ # included directly, but rather through the ITK_USE_FILE setting # obtained from ITKConfig.cmake. - # Add compiler flags needed to use ITK. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ITK_REQUIRED_C_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ITK_REQUIRED_CXX_FLAGS}") @@ -48,25 +46,25 @@ set(_need_include 0) foreach(_factory_name ${ITK_FACTORY_LIST}) string(TOUPPER ${_factory_name} _factory_uc) - if (_factory_name MATCHES "IO" AND - ITK_NO_IO_FACTORY_REGISTER_MANAGER) + if(_factory_name MATCHES "IO" AND ITK_NO_IO_FACTORY_REGISTER_MANAGER) if("${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.4") - message(WARNING - "ITK_NO_IO_FACTORY_REGISTER_MANAGER CMake variable is " - "deprecated. Use ITK_NO_${_factory_uc}_FACTORY_REGISTER_MANAGER") + message(WARNING "ITK_NO_IO_FACTORY_REGISTER_MANAGER CMake variable is " + "deprecated. Use ITK_NO_${_factory_uc}_FACTORY_REGISTER_MANAGER") endif() continue() endif() if(NOT ITK_NO_${_factory_uc}_FACTORY_REGISTER_MANAGER) - set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS - ITK_${_factory_uc}_FACTORY_REGISTER_MANAGER) + set_property( + DIRECTORY + APPEND + PROPERTY COMPILE_DEFINITIONS ITK_${_factory_uc}_FACTORY_REGISTER_MANAGER) set(_need_include 1) endif() endforeach() -if (_need_include) +if(_need_include) include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/ITKFactoryRegistration) endif() unset(_need_include) diff --git a/CMake/WrappingConfigCommon.cmake b/CMake/WrappingConfigCommon.cmake index af2165b750b..631201fb04a 100644 --- a/CMake/WrappingConfigCommon.cmake +++ b/CMake/WrappingConfigCommon.cmake @@ -1,8 +1,12 @@ if(ITK_WRAPPING) # WRAPPER_LIBRARY_OUTPUT_DIR. Directory in which generated cxx, xml, and idx files will be placed. - set(WRAPPER_LIBRARY_OUTPUT_DIR "${ITK_BINARY_DIR}/Wrapping" CACHE INTERNAL "Need to specify the output library directory globally") + set(WRAPPER_LIBRARY_OUTPUT_DIR + "${ITK_BINARY_DIR}/Wrapping" + CACHE INTERNAL "Need to specify the output library directory globally") if(ITK_WRAP_PYTHON) - set(ITK_WRAP_PYTHON_ROOT_BINARY_DIR "${WRAPPER_LIBRARY_OUTPUT_DIR}/Generators/Python" CACHE INTERNAL "python binary dir") + set(ITK_WRAP_PYTHON_ROOT_BINARY_DIR + "${WRAPPER_LIBRARY_OUTPUT_DIR}/Generators/Python" + CACHE INTERNAL "python binary dir") # create the directory to avoid losing case on windows file(MAKE_DIRECTORY ${ITK_WRAP_PYTHON_ROOT_BINARY_DIR}) @@ -10,7 +14,9 @@ if(ITK_WRAPPING) # create the directory to avoid losing case on windows file(MAKE_DIRECTORY ${ITK_PYTHON_PACKAGE_DIR}) - set(ITK_WRAP_PYTHON_SWIG_CONFIGURATION_DIR "${ITK_PYTHON_PACKAGE_DIR}/Configuration" CACHE INTERNAL "python binary dir") + set(ITK_WRAP_PYTHON_SWIG_CONFIGURATION_DIR + "${ITK_PYTHON_PACKAGE_DIR}/Configuration" + CACHE INTERNAL "python binary dir") # create the directory to avoid losing case on windows file(MAKE_DIRECTORY ${ITK_WRAP_PYTHON_SWIG_CONFIGURATION_DIR}) @@ -26,14 +32,23 @@ if(ITK_WRAPPING) # When wrapping, the multi-config generators can only be used in degraded state # of allowing only a single element int the CMAKE_CONFIGURATION_TYPES and enforcing # that CMAKE_BUILD_TYPE match that type (see Wrapping/CMakeLists.txt enforcement) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "$<1:${ITK_PYTHON_PACKAGE_DIR}>" CACHE PATH "Shared library directory with generator override" FORCE) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "$<1:${ITK_PYTHON_PACKAGE_DIR}>" CACHE PATH "Shared library directory with generator override" FORCE) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY + "$<1:${ITK_PYTHON_PACKAGE_DIR}>" + CACHE PATH "Shared library directory with generator override" FORCE) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY + "$<1:${ITK_PYTHON_PACKAGE_DIR}>" + CACHE PATH "Shared library directory with generator override" FORCE) endif() else() - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${NO_WRAP_CMAKE_LIBRARY_OUTPUT_DIRECTORY} CACHE PATH "Shared library directory") - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${NO_WRAP_CMAKE_RUNTIME_OUTPUT_DIRECTORY} CACHE PATH "Runtime library directory") + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${NO_WRAP_CMAKE_LIBRARY_OUTPUT_DIRECTORY} + CACHE PATH "Shared library directory") + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${NO_WRAP_CMAKE_RUNTIME_OUTPUT_DIRECTORY} + CACHE PATH "Runtime library directory") endif() -mark_as_advanced(FORCE +mark_as_advanced( + FORCE CMAKE_RUNTIME_OUTPUT_DIRECTORY CMAKE_LIBRARY_OUTPUT_DIRECTORY NO_WRAP_CMAKE_LIBRARY_OUTPUT_DIRECTORY diff --git a/CMake/itkApple.cmake b/CMake/itkApple.cmake index af9a433d6cb..a7421aa0b1a 100644 --- a/CMake/itkApple.cmake +++ b/CMake/itkApple.cmake @@ -1,9 +1,5 @@ -mark_as_advanced( - CMAKE_OSX_ARCHITECTURES - CMAKE_OSX_DEPLOYMENT_TARGET - CMAKE_OSX_SYSROOT) +mark_as_advanced(CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_SYSROOT) -if (CMAKE_OSX_DEPLOYMENT_TARGET AND - CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "10.7") +if(CMAKE_OSX_DEPLOYMENT_TARGET AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "10.7") message(FATAL_ERROR "Minimum OS X deployment target is 10.7, please update CMAKE_OSX_DEPLOYMENT_TARGET.") -endif () +endif() diff --git a/CMake/itkCheckSourceTree.cmake b/CMake/itkCheckSourceTree.cmake index 47480081073..b7aab45943f 100644 --- a/CMake/itkCheckSourceTree.cmake +++ b/CMake/itkCheckSourceTree.cmake @@ -1,15 +1,16 @@ # Install a pre-commit hook to bootstrap commit hooks. -if(EXISTS "${ITK_SOURCE_DIR}/.git/config" AND - NOT EXISTS "${ITK_SOURCE_DIR}/.git/hooks/pre-commit") +if(EXISTS "${ITK_SOURCE_DIR}/.git/config" AND NOT EXISTS "${ITK_SOURCE_DIR}/.git/hooks/pre-commit") # Silently ignore the error if the hooks directory is read-only. execute_process( - COMMAND ${CMAKE_COMMAND} -E copy ${ITK_SOURCE_DIR}/CMake/pre-commit - ${ITK_SOURCE_DIR}/.git/hooks/pre-commit + COMMAND ${CMAKE_COMMAND} -E copy ${ITK_SOURCE_DIR}/CMake/pre-commit ${ITK_SOURCE_DIR}/.git/hooks/pre-commit OUTPUT_VARIABLE _output - ERROR_VARIABLE _output - RESULT_VARIABLE _result - ) - if(_result AND NOT "${_output}" MATCHES "Error copying file") + ERROR_VARIABLE _output + RESULT_VARIABLE _result) + if(_result + AND NOT + "${_output}" + MATCHES + "Error copying file") message("${_output}") endif() endif() diff --git a/CMake/itkCompilerChecks.cmake b/CMake/itkCompilerChecks.cmake index 1ed2b5b6b21..6a41860130c 100644 --- a/CMake/itkCompilerChecks.cmake +++ b/CMake/itkCompilerChecks.cmake @@ -1,32 +1,27 @@ # Minimum compiler version check: GCC -if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND - CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7) +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7) message(FATAL_ERROR "GCC 7 or later is required.") -endif () +endif() # Minimum compiler version check: LLVM Clang -if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND - CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5) +if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5) message(FATAL_ERROR "LLVM Clang 5 or later is required.") -endif () +endif() # Minimum compiler version check: Apple Clang >= 10.0.0 (Xcode 10.0) -if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND - CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0.0) +if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0.0) message(FATAL_ERROR "Apple Clang 10.0.0 or later is required.") -endif () +endif() # Minimum compiler version check: Microsoft C/C++ -if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND - CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.20) +if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.20) message(FATAL_ERROR "Microsoft Visual Studio 2019 16.0 (MSVC 19.20) or later is required.") -endif () +endif() # Minimum compiler version check: Intel C++ (ICC) -if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND - CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.1) +if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.1) message(FATAL_ERROR "Intel C++ (ICC) 19.1 or later is required.") -endif () +endif() # Make sure we have C++17 enabled. if(NOT ITK_IGNORE_CMAKE_CXX17_CHECKS) diff --git a/CMake/itkExternal_Eigen3.cmake b/CMake/itkExternal_Eigen3.cmake index a2ae53d9618..2ab425e5d5c 100644 --- a/CMake/itkExternal_Eigen3.cmake +++ b/CMake/itkExternal_Eigen3.cmake @@ -19,8 +19,12 @@ if(ITK_USE_SYSTEM_EIGEN) else() # Set variables used to configure and install Eigen # _eigen3_cmake_install_prefix work also with relative CMAKE_INSTALL_PREFIX - get_filename_component(_eigen3_cmake_install_prefix - ${CMAKE_INSTALL_PREFIX} ABSOLUTE BASE_DIR ${PROJECT_BINARY_DIR}) + get_filename_component( + _eigen3_cmake_install_prefix + ${CMAKE_INSTALL_PREFIX} + ABSOLUTE + BASE_DIR + ${PROJECT_BINARY_DIR}) set(_eigen3_cmake_install_includedir ${ITK_INSTALL_INCLUDE_DIR}) set(_eigen3_cmake_install_datadir ${ITK_INSTALL_PACKAGE_DIR}/Modules) set(_eigen3_source_dir "${ITK_SOURCE_DIR}/Modules/ThirdParty/Eigen3/src/itkeigen") @@ -35,35 +39,28 @@ else() file(MAKE_DIRECTORY ${_eigen3_build_dir}) execute_process( COMMAND - ${CMAKE_COMMAND} ${_eigen3_source_dir} - "-DCMAKE_APPLE_SILICON_PROCESSOR=${CMAKE_APPLE_SILICON_PROCESSOR}" - "-DCMAKE_INSTALL_PREFIX=${_eigen3_cmake_install_prefix}" - "-DCMAKE_INSTALL_INCLUDEDIR=${_eigen3_cmake_install_includedir}" - "-DCMAKE_INSTALL_DATADIR=${_eigen3_cmake_install_datadir}" - "-DCMAKE_GENERATOR=${CMAKE_GENERATOR}" - "-DCMAKE_SH=${CMAKE_SH}" - "-DCMAKE_GENERATOR_TOOLSET=${CMAKE_GENERATOR_TOOLSET}" - "-DCMAKE_SH=${CMAKE_SH}" - "-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}" - "-DCMAKE_GENERATOR_INSTANCE=${CMAKE_GENERATOR_INSTANCE}" - "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}" - "-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}" - "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}" - "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}" - "-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}" - "-DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION}" - ${_additional_external_project_args} + ${CMAKE_COMMAND} ${_eigen3_source_dir} "-DCMAKE_APPLE_SILICON_PROCESSOR=${CMAKE_APPLE_SILICON_PROCESSOR}" + "-DCMAKE_INSTALL_PREFIX=${_eigen3_cmake_install_prefix}" + "-DCMAKE_INSTALL_INCLUDEDIR=${_eigen3_cmake_install_includedir}" + "-DCMAKE_INSTALL_DATADIR=${_eigen3_cmake_install_datadir}" "-DCMAKE_GENERATOR=${CMAKE_GENERATOR}" + "-DCMAKE_SH=${CMAKE_SH}" "-DCMAKE_GENERATOR_TOOLSET=${CMAKE_GENERATOR_TOOLSET}" "-DCMAKE_SH=${CMAKE_SH}" + "-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}" "-DCMAKE_GENERATOR_INSTANCE=${CMAKE_GENERATOR_INSTANCE}" + "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}" "-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}" + "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}" "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}" + "-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}" "-DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION}" + ${_additional_external_project_args} WORKING_DIRECTORY ${_eigen3_build_dir} OUTPUT_VARIABLE ITKEigen3Config_STDOUT - ERROR_VARIABLE ITKEigen3Config_STDERR - ) + ERROR_VARIABLE ITKEigen3Config_STDERR) set(ITKInternalEigen3_DIR ${_eigen3_build_dir}) find_package(ITKInternalEigen3) if(NOT ITKInternalEigen3_FOUND) - message(FATAL_ERROR "ITKInternalEigen3 configuration faileed\nREPORT:\n${ITKEigen3Config_STDOUT}\n${ITKEigen3Config_STDERR}") + message( + FATAL_ERROR + "ITKInternalEigen3 configuration faileed\nREPORT:\n${ITKEigen3Config_STDOUT}\n${ITKEigen3Config_STDERR}") endif() - install(CODE - "execute_process( + install( + CODE "execute_process( COMMAND ${CMAKE_COMMAND} --build . --target install WORKING_DIRECTORY ${_eigen3_build_dir} diff --git a/CMake/itkExternal_FFTW.cmake b/CMake/itkExternal_FFTW.cmake index c8f3b55b2e1..edd80306cb7 100644 --- a/CMake/itkExternal_FFTW.cmake +++ b/CMake/itkExternal_FFTW.cmake @@ -20,7 +20,6 @@ # include(ITK_CheckCCompilerFlag) - if(NOT ITK_USE_MKL AND NOT ITK_USE_CUFFTW) set(msg "ATTENTION: You have enabled the use of FFTW.") set(msg "${msg} This library is distributed under a GPL license.") @@ -30,151 +29,150 @@ if(NOT ITK_USE_MKL AND NOT ITK_USE_CUFFTW) message("${msg}") endif() - if(NOT ITK_USE_SYSTEM_FFTW) - # - # fftw limitation -- can't be built in - # a directory with whitespace in its name. - if(${CMAKE_CURRENT_BINARY_DIR} MATCHES ".*[ \t].*") - message(FATAL_ERROR - "Can't build fftw in a directory with whitespace in its name") - endif() + # + # fftw limitation -- can't be built in + # a directory with whitespace in its name. + if(${CMAKE_CURRENT_BINARY_DIR} MATCHES ".*[ \t].*") + message(FATAL_ERROR "Can't build fftw in a directory with whitespace in its name") + endif() - if(WIN32) - # on windows the build of FFTW must match that of ITK - set(FFTW_BUILD_TYPE ${CMAKE_BUILD_TYPE}) - else() - set(FFTW_BUILD_TYPE Release) - endif() + if(WIN32) + # on windows the build of FFTW must match that of ITK + set(FFTW_BUILD_TYPE ${CMAKE_BUILD_TYPE}) + else() + set(FFTW_BUILD_TYPE Release) + endif() - include(GNUInstallDirs) + include(GNUInstallDirs) - set(_fftw_target_version 3.3.10) - set(_fftw_url_hash "2d34b5ccac7b08740dbdacc6ebe451d8a34cf9d9bfec85a5e776e87adf94abfd803c222412d8e10fbaa4ed46f504aa87180396af1b108666cde4314a55610b40") - set(_fftw_url "https://data.kitware.com/api/v1/file/hashsum/sha512/${_fftw_url_hash}/download") + set(_fftw_target_version 3.3.10) + set(_fftw_url_hash + "2d34b5ccac7b08740dbdacc6ebe451d8a34cf9d9bfec85a5e776e87adf94abfd803c222412d8e10fbaa4ed46f504aa87180396af1b108666cde4314a55610b40" + ) + set(_fftw_url "https://data.kitware.com/api/v1/file/hashsum/sha512/${_fftw_url_hash}/download") - set(FFTW_STAGED_INSTALL_PREFIX "${ITK_BINARY_DIR}/fftw") - set(PROJ_FFTWD_DEPENDS "") - if(ITK_USE_FFTWF) - itk_download_attempt_check(FFTW) - ExternalProject_add(fftwf - PREFIX fftwf-${_fftw_target_version} - INSTALL_DIR ${FFTW_STAGED_INSTALL_PREFIX} - URL ${_fftw_url} - URL_HASH SHA512=${_fftw_url_hash} - DOWNLOAD_NAME "fftw-${_fftw_target_version}.tar.gz" - DOWNLOAD_NO_PROGRESS 1 - UPDATE_COMMAND "" - LOG_CONFIGURE 1 - LOG_BUILD 1 - LOG_INSTALL 1 - CMAKE_CACHE_ARGS - -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} - -DBUILD_TESTS:BOOL=OFF - -DCMAKE_BUILD_TYPE:STRING=${FFTW_BUILD_TYPE} - -DCMAKE_INSTALL_PREFIX:PATH=${FFTW_STAGED_INSTALL_PREFIX} - -DCMAKE_INSTALL_LIBDIR:STRING=${CMAKE_INSTALL_LIBDIR} - -DCMAKE_INSTALL_BINDIR:STRING=${CMAKE_INSTALL_BINDIR} - -DDISABLE_FORTRAN:BOOL=ON - -DENABLE_AVX:BOOL=OFF - -DENABLE_AVX2:BOOL=OFF - -DENABLE_FLOAT:BOOL=ON - -DENABLE_LONG_DOUBLE:BOOL=OFF - -DENABLE_OPENMP:BOOL=OFF - -DENABLE_QUAD_PRECISION:BOOL=OFF - -DENABLE_SSE:BOOL=OFF - -DENABLE_SSE2:BOOL=OFF - -DENABLE_THREADS:BOOL=ON - -DCMAKE_APPLE_SILICON_PROCESSOR:STRING=${CMAKE_APPLE_SILICON_PROCESSOR} - -DCMAKE_C_COMPILER_LAUNCHER:PATH=${CMAKE_C_COMPILER_LAUNCHER} - -DCMAKE_C_COMPILER:PATH=${CMAKE_C_COMPILER} - -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} - -DCMAKE_OSX_SYSROOT:PATH=${CMAKE_OSX_SYSROOT} - -DCMAKE_OSX_DEPLOYMENT_TARGET:PATH=${CMAKE_OSX_DEPLOYMENT_TARGET} - -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=${CMAKE_POSITION_INDEPENDENT_CODE} - ) - # set( - # FFTW3f_DIR ${FFTW_STAGED_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake/fftw3f - # CACHE PATH "Path to internally built single precision FFTW3Config.cmake" - # FORCE - # ) - # Can not find package, it does not yet exist find_package(FFTW3f CONFIG REQUIRED) - # but we know where it will eventually be! - set(FFTW3f_INCLUDE_DIRS ${FFTW_STAGED_INSTALL_PREFIX}/include) - set(FFTW3f_LIBRARY_DIRS ${FFTW_STAGED_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) - set(FFTW_INCLUDE ${FFTW3_INCLUDE_DIRS}) - set(FFTW_LIBDIR ${FFTW3_LIBRARY_DIRS}) - set(ITK_FFTWF_LIBRARIES_NAMES fftw3f_threads fftw3f) - set(PROJ_FFTWD_DEPENDS "fftwf") - endif() + set(FFTW_STAGED_INSTALL_PREFIX "${ITK_BINARY_DIR}/fftw") + set(PROJ_FFTWD_DEPENDS "") + if(ITK_USE_FFTWF) + itk_download_attempt_check(FFTW) + ExternalProject_Add( + fftwf + PREFIX fftwf-${_fftw_target_version} + INSTALL_DIR ${FFTW_STAGED_INSTALL_PREFIX} + URL ${_fftw_url} + URL_HASH SHA512=${_fftw_url_hash} + DOWNLOAD_NAME "fftw-${_fftw_target_version}.tar.gz" + DOWNLOAD_NO_PROGRESS 1 + UPDATE_COMMAND "" + LOG_CONFIGURE 1 + LOG_BUILD 1 + LOG_INSTALL 1 + CMAKE_CACHE_ARGS + -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} + -DBUILD_TESTS:BOOL=OFF + -DCMAKE_BUILD_TYPE:STRING=${FFTW_BUILD_TYPE} + -DCMAKE_INSTALL_PREFIX:PATH=${FFTW_STAGED_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR:STRING=${CMAKE_INSTALL_LIBDIR} + -DCMAKE_INSTALL_BINDIR:STRING=${CMAKE_INSTALL_BINDIR} + -DDISABLE_FORTRAN:BOOL=ON + -DENABLE_AVX:BOOL=OFF + -DENABLE_AVX2:BOOL=OFF + -DENABLE_FLOAT:BOOL=ON + -DENABLE_LONG_DOUBLE:BOOL=OFF + -DENABLE_OPENMP:BOOL=OFF + -DENABLE_QUAD_PRECISION:BOOL=OFF + -DENABLE_SSE:BOOL=OFF + -DENABLE_SSE2:BOOL=OFF + -DENABLE_THREADS:BOOL=ON + -DCMAKE_APPLE_SILICON_PROCESSOR:STRING=${CMAKE_APPLE_SILICON_PROCESSOR} + -DCMAKE_C_COMPILER_LAUNCHER:PATH=${CMAKE_C_COMPILER_LAUNCHER} + -DCMAKE_C_COMPILER:PATH=${CMAKE_C_COMPILER} + -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} + -DCMAKE_OSX_SYSROOT:PATH=${CMAKE_OSX_SYSROOT} + -DCMAKE_OSX_DEPLOYMENT_TARGET:PATH=${CMAKE_OSX_DEPLOYMENT_TARGET} + -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=${CMAKE_POSITION_INDEPENDENT_CODE}) + # set( + # FFTW3f_DIR ${FFTW_STAGED_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake/fftw3f + # CACHE PATH "Path to internally built single precision FFTW3Config.cmake" + # FORCE + # ) + # Can not find package, it does not yet exist find_package(FFTW3f CONFIG REQUIRED) + # but we know where it will eventually be! + set(FFTW3f_INCLUDE_DIRS ${FFTW_STAGED_INSTALL_PREFIX}/include) + set(FFTW3f_LIBRARY_DIRS ${FFTW_STAGED_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + set(FFTW_INCLUDE ${FFTW3_INCLUDE_DIRS}) + set(FFTW_LIBDIR ${FFTW3_LIBRARY_DIRS}) + set(ITK_FFTWF_LIBRARIES_NAMES fftw3f_threads fftw3f) + set(PROJ_FFTWD_DEPENDS "fftwf") + endif() - if(ITK_USE_FFTWD) - itk_download_attempt_check(FFTW) - ExternalProject_add(fftwd - PREFIX fftwd-${_fftw_target_version} - INSTALL_DIR ${FFTW_STAGED_INSTALL_PREFIX} - URL ${_fftw_url} - URL_HASH SHA512=${_fftw_url_hash} - DOWNLOAD_NAME "fftw-${_fftw_target_version}.tar.gz" - DOWNLOAD_NO_PROGRESS 1 - UPDATE_COMMAND "" - LOG_CONFIGURE 1 - LOG_BUILD 1 - LOG_INSTALL 1 - CMAKE_CACHE_ARGS - -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} - -DBUILD_TESTS:BOOL=OFF - -DCMAKE_BUILD_TYPE:STRING=${FFTW_BUILD_TYPE} - -DCMAKE_INSTALL_PREFIX:PATH=${FFTW_STAGED_INSTALL_PREFIX} - -DCMAKE_INSTALL_LIBDIR:STRING=${CMAKE_INSTALL_LIBDIR} - -DCMAKE_INSTALL_BINDIR:STRING=${CMAKE_INSTALL_BINDIR} - -DDISABLE_FORTRAN:BOOL=ON - -DENABLE_AVX:BOOL=OFF - -DENABLE_AVX2:BOOL=OFF - -DENABLE_FLOAT:BOOL=OFF - -DENABLE_LONG_DOUBLE:BOOL=OFF - -DENABLE_OPENMP:BOOL=OFF - -DENABLE_QUAD_PRECISION:BOOL=OFF - -DENABLE_SSE:BOOL=OFF - -DENABLE_SSE2:BOOL=OFF - -DENABLE_THREADS:BOOL=ON - -DCMAKE_APPLE_SILICON_PROCESSOR:STRING=${CMAKE_APPLE_SILICON_PROCESSOR} - -DCMAKE_C_COMPILER_LAUNCHER:PATH=${CMAKE_C_COMPILER_LAUNCHER} - -DCMAKE_C_COMPILER:PATH=${CMAKE_C_COMPILER} - -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} - -DCMAKE_OSX_SYSROOT:PATH=${CMAKE_OSX_SYSROOT} - -DCMAKE_OSX_DEPLOYMENT_TARGET:PATH=${CMAKE_OSX_DEPLOYMENT_TARGET} - -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=${CMAKE_POSITION_INDEPENDENT_CODE} - DEPENDS ${PROJ_FFTWD_DEPENDS} # Avoid potential collisions on install - ) - # set( - # FFTW3_DIR ${FFTW_STAGED_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake/fftw3 - # CACHE PATH "Path to internally built double precision FFTW3Config.cmake" - # FORCE - # ) - # Can not find package, it does not yet exist find_package(FFTW3 CONFIG REQUIRED) - set(FFTW3_INCLUDE_DIRS ${FFTW_STAGED_INSTALL_PREFIX}/include) - set(FFTW3_LIBRARY_DIRS ${FFTW_STAGED_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + if(ITK_USE_FFTWD) + itk_download_attempt_check(FFTW) + ExternalProject_Add( + fftwd + PREFIX fftwd-${_fftw_target_version} + INSTALL_DIR ${FFTW_STAGED_INSTALL_PREFIX} + URL ${_fftw_url} + URL_HASH SHA512=${_fftw_url_hash} + DOWNLOAD_NAME "fftw-${_fftw_target_version}.tar.gz" + DOWNLOAD_NO_PROGRESS 1 + UPDATE_COMMAND "" + LOG_CONFIGURE 1 + LOG_BUILD 1 + LOG_INSTALL 1 + CMAKE_CACHE_ARGS + -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} + -DBUILD_TESTS:BOOL=OFF + -DCMAKE_BUILD_TYPE:STRING=${FFTW_BUILD_TYPE} + -DCMAKE_INSTALL_PREFIX:PATH=${FFTW_STAGED_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR:STRING=${CMAKE_INSTALL_LIBDIR} + -DCMAKE_INSTALL_BINDIR:STRING=${CMAKE_INSTALL_BINDIR} + -DDISABLE_FORTRAN:BOOL=ON + -DENABLE_AVX:BOOL=OFF + -DENABLE_AVX2:BOOL=OFF + -DENABLE_FLOAT:BOOL=OFF + -DENABLE_LONG_DOUBLE:BOOL=OFF + -DENABLE_OPENMP:BOOL=OFF + -DENABLE_QUAD_PRECISION:BOOL=OFF + -DENABLE_SSE:BOOL=OFF + -DENABLE_SSE2:BOOL=OFF + -DENABLE_THREADS:BOOL=ON + -DCMAKE_APPLE_SILICON_PROCESSOR:STRING=${CMAKE_APPLE_SILICON_PROCESSOR} + -DCMAKE_C_COMPILER_LAUNCHER:PATH=${CMAKE_C_COMPILER_LAUNCHER} + -DCMAKE_C_COMPILER:PATH=${CMAKE_C_COMPILER} + -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} + -DCMAKE_OSX_SYSROOT:PATH=${CMAKE_OSX_SYSROOT} + -DCMAKE_OSX_DEPLOYMENT_TARGET:PATH=${CMAKE_OSX_DEPLOYMENT_TARGET} + -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=${CMAKE_POSITION_INDEPENDENT_CODE} + DEPENDS ${PROJ_FFTWD_DEPENDS} # Avoid potential collisions on install + ) + # set( + # FFTW3_DIR ${FFTW_STAGED_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake/fftw3 + # CACHE PATH "Path to internally built double precision FFTW3Config.cmake" + # FORCE + # ) + # Can not find package, it does not yet exist find_package(FFTW3 CONFIG REQUIRED) + set(FFTW3_INCLUDE_DIRS ${FFTW_STAGED_INSTALL_PREFIX}/include) + set(FFTW3_LIBRARY_DIRS ${FFTW_STAGED_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) - set(FFTW_INCLUDE ${FFTW3_INCLUDE_DIRS}) - set(FFTW_LIBDIR ${FFTW3_LIBRARY_DIRS}) - set(ITK_FFTWD_LIBRARIES_NAMES fftw3_threads fftw3) - endif() + set(FFTW_INCLUDE ${FFTW3_INCLUDE_DIRS}) + set(FFTW_LIBDIR ${FFTW3_LIBRARY_DIRS}) + set(ITK_FFTWD_LIBRARIES_NAMES fftw3_threads fftw3) + endif() - # - # copy libraries into install tree, NOTE: DESTINATION MUST EXACTLY MATCH values from main CMakeLists.txt for FFTW_LIBDIR - install(CODE - "file(GLOB FFTW_LIBS ${FFTW_STAGED_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/*fftw3*) + # + # copy libraries into install tree, NOTE: DESTINATION MUST EXACTLY MATCH values from main CMakeLists.txt for FFTW_LIBDIR + install( + CODE "file(GLOB FFTW_LIBS ${FFTW_STAGED_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/*fftw3*) file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/ITK-${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}\" TYPE FILE FILES \${FFTW_LIBS})" - COMPONENT Development) - # - # copy headers into install tree - install(CODE - "file(GLOB FFTW_INC ${FFTW_STAGED_INSTALL_PREFIX}/include/*fftw3*) + COMPONENT Development) + # + # copy headers into install tree + install(CODE "file(GLOB FFTW_INC ${FFTW_STAGED_INSTALL_PREFIX}/include/*fftw3*) file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/include/ITK-${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}\" -TYPE FILE FILES \${FFTW_INC})" - COMPONENT Development) +TYPE FILE FILES \${FFTW_INC})" COMPONENT Development) else() #Search the filesystem for compatible versions find_package(FFTW) # Use local itk FindFFTW.config to set variables consistently both with/without USE_SYSTEM_FFTW diff --git a/CMake/itkOpenCL.cmake b/CMake/itkOpenCL.cmake index 591c25f9626..21aab8c74fd 100644 --- a/CMake/itkOpenCL.cmake +++ b/CMake/itkOpenCL.cmake @@ -1,60 +1,69 @@ if(ITK_USE_GPU) - find_package ( OpenCL REQUIRED) - if ( NOT ${OPENCL_FOUND}) - message ( FATAL "Could not find OpenCL") - endif () + find_package(OpenCL REQUIRED) + if(NOT ${OPENCL_FOUND}) + message(FATAL "Could not find OpenCL") + endif() - macro(sourcefile_to_string SOURCE_FILE RESULT_CMAKE_VAR) - file(STRINGS ${SOURCE_FILE} FileStrings) - foreach(SourceLine ${FileStrings}) - # replace all \ with \\ to make the c string constant work - string(REGEX REPLACE "\\\\" "\\\\\\\\" TempSourceLine "${SourceLine}") - # replace all " with \" to make the c string constant work - string(REGEX REPLACE "\"" "\\\\\"" EscapedSourceLine "${TempSourceLine}") - set(${RESULT_CMAKE_VAR} "${${RESULT_CMAKE_VAR}}\n\"${EscapedSourceLine}\\n\"") - endforeach() + macro(sourcefile_to_string SOURCE_FILE RESULT_CMAKE_VAR) + file(STRINGS ${SOURCE_FILE} FileStrings) + foreach(SourceLine ${FileStrings}) + # replace all \ with \\ to make the c string constant work + string( + REGEX + REPLACE "\\\\" + "\\\\\\\\" + TempSourceLine + "${SourceLine}") + # replace all " with \" to make the c string constant work + string( + REGEX + REPLACE "\"" + "\\\\\"" + EscapedSourceLine + "${TempSourceLine}") + set(${RESULT_CMAKE_VAR} "${${RESULT_CMAKE_VAR}}\n\"${EscapedSourceLine}\\n\"") + endforeach() endmacro() - macro(write_gpu_kernel_to_file OPENCL_FILE GPUFILTER_NAME GPUFILTER_KERNELNAME - OUTPUT_FILE SRC_VAR) + macro( + write_gpu_kernel_to_file + OPENCL_FILE + GPUFILTER_NAME + GPUFILTER_KERNELNAME + OUTPUT_FILE + SRC_VAR) sourcefile_to_string(${OPENCL_FILE} ${GPUFILTER_KERNELNAME}_SourceString) - set(${GPUFILTER_KERNELNAME}_KernelString - "#include \"itk${GPUFILTER_NAME}.h\"\n\n") - set(${GPUFILTER_KERNELNAME}_KernelString - "${${GPUFILTER_KERNELNAME}_KernelString}namespace itk\n") - set(${GPUFILTER_KERNELNAME}_KernelString - "${${GPUFILTER_KERNELNAME}_KernelString}{\n\n") + set(${GPUFILTER_KERNELNAME}_KernelString "#include \"itk${GPUFILTER_NAME}.h\"\n\n") + set(${GPUFILTER_KERNELNAME}_KernelString "${${GPUFILTER_KERNELNAME}_KernelString}namespace itk\n") + set(${GPUFILTER_KERNELNAME}_KernelString "${${GPUFILTER_KERNELNAME}_KernelString}{\n\n") set(${GPUFILTER_KERNELNAME}_KernelString "${${GPUFILTER_KERNELNAME}_KernelString}const char* ${GPUFILTER_KERNELNAME}::GetOpenCLSource()\n") - set(${GPUFILTER_KERNELNAME}_KernelString - "${${GPUFILTER_KERNELNAME}_KernelString}{\n") + set(${GPUFILTER_KERNELNAME}_KernelString "${${GPUFILTER_KERNELNAME}_KernelString}{\n") set(${GPUFILTER_KERNELNAME}_KernelString "${${GPUFILTER_KERNELNAME}_KernelString} return ${${GPUFILTER_KERNELNAME}_SourceString};\n") - set(${GPUFILTER_KERNELNAME}_KernelString - "${${GPUFILTER_KERNELNAME}_KernelString}}\n\n") - set(${GPUFILTER_KERNELNAME}_KernelString - "${${GPUFILTER_KERNELNAME}_KernelString}}\n") + set(${GPUFILTER_KERNELNAME}_KernelString "${${GPUFILTER_KERNELNAME}_KernelString}}\n\n") + set(${GPUFILTER_KERNELNAME}_KernelString "${${GPUFILTER_KERNELNAME}_KernelString}}\n") - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE} - "${${GPUFILTER_KERNELNAME}_KernelString}") + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE} "${${GPUFILTER_KERNELNAME}_KernelString}") - configure_file(${OPENCL_FILE} - ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}.cl COPYONLY) - add_custom_target(${GPUFILTER_KERNELNAME}_Target - DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE} - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}.cl - ) - set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE} - PROPERTIES GENERATED ON) + configure_file(${OPENCL_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}.cl COPYONLY) + add_custom_target( + ${GPUFILTER_KERNELNAME}_Target + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}.cl) + set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE} PROPERTIES GENERATED ON) set(${SRC_VAR} ${${SRC_VAR}} ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}) endmacro() macro(write_gpu_kernels GPUKernels GPU_SRC) foreach(GPUKernel ${GPUKernels}) get_filename_component(FilterName ${GPUKernel} NAME_WE) - write_gpu_kernel_to_file(${GPUKernel} ${FilterName} ${FilterName}Kernel "${FilterName}Kernel.cxx" ${GPU_SRC}) + write_gpu_kernel_to_file( + ${GPUKernel} + ${FilterName} + ${FilterName}Kernel + "${FilterName}Kernel.cxx" + ${GPU_SRC}) endforeach() endmacro() endif() diff --git a/CMake/itkSupportMacros.cmake b/CMake/itkSupportMacros.cmake index 34c3913afbb..4c5769d3022 100644 --- a/CMake/itkSupportMacros.cmake +++ b/CMake/itkSupportMacros.cmake @@ -1,8 +1,8 @@ -macro (itk_set_with_default var value) - if (NOT ${var}) +macro(itk_set_with_default var value) + if(NOT ${var}) set(${var} "${value}") - endif () -endmacro () + endif() +endmacro() # Bridge an old, deprecated, setting to a new replacement setting. # @@ -19,12 +19,19 @@ endmacro () # itk_deprecated_setting(default_setting NEW_SETTING OLD_SETTING "default value") # set(NEW_SETTING "${default_setting}" # CACHE STRING "Documentation for the setting.") -function (itk_deprecated_setting output_default new old intended_default) +function( + itk_deprecated_setting + output_default + new + old + intended_default) set(default "${intended_default}") - if (DEFINED "${old}") + if(DEFINED "${old}") message(WARNING "The '${old}' variable is deprecated for '${new}'.") set(default "${${old}}") - endif () + endif() - set("${output_default}" "${default}" PARENT_SCOPE) -endfunction () + set("${output_default}" + "${default}" + PARENT_SCOPE) +endfunction() diff --git a/CMake/itkTargetLinkLibrariesWithDynamicLookup.cmake b/CMake/itkTargetLinkLibrariesWithDynamicLookup.cmake index d74f1a14426..a064a66559a 100644 --- a/CMake/itkTargetLinkLibrariesWithDynamicLookup.cmake +++ b/CMake/itkTargetLinkLibrariesWithDynamicLookup.cmake @@ -33,68 +33,71 @@ function(_itkCheckUndefinedSymbolsAllowed) set(VARIABLE "ITK_UNDEFINED_SYMBOLS_ALLOWED") set(cache_var "${VARIABLE}_hash") - # hash the CMAKE_FLAGS passed and check cache to know if we need to rerun string(MD5 cmake_flags_hash "${CMAKE_SHARED_LINKER_FLAGS}") if(NOT DEFINED "${cache_var}") unset("${VARIABLE}" CACHE) - elseif(NOT "${${cache_var}}" STREQUAL "${cmake_flags_hash}") + elseif( + NOT + "${${cache_var}}" + STREQUAL + "${cmake_flags_hash}") unset("${VARIABLE}" CACHE) endif() if(NOT DEFINED "${VARIABLE}") set(test_project_dir "${PROJECT_BINARY_DIR}/CMakeTmp/${VARIABLE}") - file(WRITE "${test_project_dir}/CMakeLists.txt" -" + file( + WRITE "${test_project_dir}/CMakeLists.txt" + " cmake_minimum_required(VERSION ${CMAKE_MINIMUM_REQUIRED_VERSION}) project(undefined C) add_library(foo SHARED \"foo.c\") ") - file(WRITE "${test_project_dir}/foo.c" -" + file( + WRITE "${test_project_dir}/foo.c" + " extern int bar(void); int foo(void) {return bar()+1;} ") # APPLE: the CMAKE_MACOSX_RPATH flag should be passed. if(APPLE) - set(_rpath_arg "-DCMAKE_MACOSX_RPATH='${CMAKE_MACOSX_RPATH}'") + set(_rpath_arg "-DCMAKE_MACOSX_RPATH='${CMAKE_MACOSX_RPATH}'") else() set(_rpath_arg) endif() - try_compile(${VARIABLE} - "${test_project_dir}" - "${test_project_dir}" - undefined - CMAKE_FLAGS - "-DCMAKE_SHARED_LINKER_FLAGS='${CMAKE_SHARED_LINKER_FLAGS}'" - ${_rpath_arg} + try_compile( + ${VARIABLE} "${test_project_dir}" + "${test_project_dir}" undefined + CMAKE_FLAGS "-DCMAKE_SHARED_LINKER_FLAGS='${CMAKE_SHARED_LINKER_FLAGS}'" ${_rpath_arg} OUTPUT_VARIABLE output) - set(${cache_var} "${cmake_flags_hash}" CACHE INTERNAL "hashed try_compile flags") + set(${cache_var} + "${cmake_flags_hash}" + CACHE INTERNAL "hashed try_compile flags") if(${VARIABLE}) message(STATUS "Performing Test ${VARIABLE} - Success") else() message(STATUS "Performing Test ${VARIABLE} - Failed") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Performing Test ${VARIABLE} failed with the following output:\n" - "${OUTPUT}\n") + "Performing Test ${VARIABLE} failed with the following output:\n" "${OUTPUT}\n") endif() endif() endfunction() -_itkCheckUndefinedSymbolsAllowed() +_itkcheckundefinedsymbolsallowed() macro(itk_target_link_libraries_with_dynamic_lookup target) - if ( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set_target_properties(${target} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") elseif(ITK_UNDEFINED_SYMBOLS_ALLOWED) # linker allows undefined symbols, let's just not link else() - target_link_libraries ( ${target} ${ARGN} ) + target_link_libraries(${target} ${ARGN}) endif() endmacro() diff --git a/CMakeLists.txt b/CMakeLists.txt index a80b564b86b..e5be518d87c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,8 @@ # set(ITK_OLDEST_VALIDATED_POLICIES_VERSION "3.16.3") set(ITK_NEWEST_VALIDATED_POLICIES_VERSION "3.19.7") -cmake_minimum_required(VERSION ${ITK_OLDEST_VALIDATED_POLICIES_VERSION}...${ITK_NEWEST_VALIDATED_POLICIES_VERSION} FATAL_ERROR) +cmake_minimum_required(VERSION ${ITK_OLDEST_VALIDATED_POLICIES_VERSION}...${ITK_NEWEST_VALIDATED_POLICIES_VERSION} + FATAL_ERROR) # # Now enumerate specific policies newer than ITK_NEWEST_VALIDATED_POLICIES_VERSION @@ -35,25 +36,26 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/ITKInitializeBuildType.cmake) # ==== Define language standard configurations requiring at least c++17 standard if(CMAKE_CXX_STANDARD EQUAL "98" OR CMAKE_CXX_STANDARD LESS "17") - message(FATAL_ERROR "C++98 to C++14 are no longer supported in ITK version 5.4 and greater.") + message(FATAL_ERROR "C++98 to C++14 are no longer supported in ITK version 5.4 and greater.") endif() set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMake ${CMAKE_MODULE_PATH}) include(itkVersion) -set(ITK_VERSION - "${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_PATCH}") -project(ITK +set(ITK_VERSION "${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_PATCH}") +project( + ITK VERSION ${ITK_VERSION} - DESCRIPTION "The Insight Toolkit (ITK) is an open-source, cross-platform toolkit for N-dimensional scientific image processing, segmentation, and registration." + DESCRIPTION + "The Insight Toolkit (ITK) is an open-source, cross-platform toolkit for N-dimensional scientific image processing, segmentation, and registration." HOMEPAGE_URL "https://itk.org" LANGUAGES CXX C) set(ITK_CMAKE_DIR "${ITK_SOURCE_DIR}/CMake") -if (APPLE) +if(APPLE) include(itkApple) -endif () +endif() include(itkCompilerChecks) include(itkSupportMacros) @@ -68,7 +70,6 @@ set(ITK_USE_FILE "${ITK_CONFIG_CMAKE_DIR}/UseITK.cmake") # outside of their original project and used without any modification. configure_file(CMake/ITKInternalConfig.cmake ${ITK_BINARY_DIR}/CMakeTmp/ITKConfig.cmake COPYONLY) - include(CMakeDependentOption) # # use ExternalProject @@ -78,10 +79,20 @@ if(CMAKE_HOST_WIN32) if(NOT DEFINED ITK_SKIP_PATH_LENGTH_CHECKS) if(${CMAKE_SYSTEM_VERSION} VERSION_GREATER "10.0.14392") # Win10 version 1607 set(_LongPathKey LongPathsEnabled) - execute_process(COMMAND reg query HKLM\\SYSTEM\\CurrentControlSet\\Control\\FileSystem /v ${_LongPathKey} OUTPUT_VARIABLE _output) - string(REGEX MATCH "${_LongPathKey}.*REG_DWORD.*[0-9]x([0-9])" _regex ${_output}) - if (${CMAKE_MATCH_1}) - set(ITK_SKIP_PATH_LENGTH_CHECKS 0 CACHE BOOL "Skips max path length checks. These checks can be disabled for Windows version 10.0.14393 and later if registry key HKLM\\SYSTEM\\CurrentControlSet\\Control\\FileSystem\\LongPathsEnabled is set to 1 and all tools support long paths. As of January 2018, MSBuild and Visual Studio do not support it yet.") + execute_process(COMMAND reg query HKLM\\SYSTEM\\CurrentControlSet\\Control\\FileSystem /v ${_LongPathKey} + OUTPUT_VARIABLE _output) + string( + REGEX MATCH + "${_LongPathKey}.*REG_DWORD.*[0-9]x([0-9])" + _regex + ${_output}) + if(${CMAKE_MATCH_1}) + set(ITK_SKIP_PATH_LENGTH_CHECKS + 0 + CACHE + BOOL + "Skips max path length checks. These checks can be disabled for Windows version 10.0.14393 and later if registry key HKLM\\SYSTEM\\CurrentControlSet\\Control\\FileSystem\\LongPathsEnabled is set to 1 and all tools support long paths. As of January 2018, MSBuild and Visual Studio do not support it yet." + ) endif() endif() endif() @@ -91,20 +102,14 @@ if(CMAKE_HOST_WIN32 AND NOT ITK_SKIP_PATH_LENGTH_CHECKS) string(LENGTH "${CMAKE_CURRENT_SOURCE_DIR}" n) if(n GREATER 50) - message( - FATAL_ERROR - "ITK source code directory path length is too long (${n} > 50)." - "Please move the ITK source code directory to a directory with a shorter path." - ) + message(FATAL_ERROR "ITK source code directory path length is too long (${n} > 50)." + "Please move the ITK source code directory to a directory with a shorter path.") endif() string(LENGTH "${CMAKE_CURRENT_BINARY_DIR}" n) if(n GREATER 50) - message( - FATAL_ERROR - "ITK build directory path length is too long (${n} > 50)." - "Please set the ITK build directory to a directory with a shorter path." - ) + message(FATAL_ERROR "ITK build directory path length is too long (${n} > 50)." + "Please set the ITK build directory to a directory with a shorter path.") endif() endif() @@ -143,7 +148,6 @@ include(ITKExternalData) include(ITKModuleTest) include(itkCheckSourceTree) - set(main_project_name ${_ITKModuleMacros_DEFAULT_LABEL}) #----------------------------------------------------------------------------- @@ -196,10 +200,7 @@ mark_as_advanced(ITK_USE_SYSTEM_LIBRARIES) option(ITK_USE_BRAINWEB_DATA "Download and use BrainWeb data for advanced testing" OFF) mark_as_advanced(ITK_USE_BRAINWEB_DATA) if(ITK_BRAINWEB_DATA_ROOT) - message(WARNING - "ITK_BRAINWEB_DATA_ROOT is not longer supported!" - "Please update to ITK_USE_BRAINWEB_DATA." - ) + message(WARNING "ITK_BRAINWEB_DATA_ROOT is not longer supported!" "Please update to ITK_USE_BRAINWEB_DATA.") endif() #----------------------------------------------------------------------------- @@ -233,7 +234,6 @@ include(Wrapping/WrappingOptions.cmake) include(ITKSetStandardCompilerFlags) #--------------------------------------------------------------- - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ITK_REQUIRED_C_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ITK_REQUIRED_CXX_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ITK_REQUIRED_LINK_FLAGS}") @@ -245,12 +245,14 @@ endif() # Because GoogleTest sets CMAKE_DEBUG_POSTFIX CMake CACHE variable to "d" when it is # built in debug, we preemptively set it to an empty string to avoid having a postfix # added to the ITK library names. -set(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Generate debug library name with a postfix.") +set(CMAKE_DEBUG_POSTFIX + "" + CACHE STRING "Generate debug library name with a postfix.") mark_as_advanced(CMAKE_DEBUG_POSTFIX) # Configure find_package behavior if(NOT DEFINED CMAKE_FIND_USE_PACKAGE_REGISTRY) - set(CMAKE_FIND_USE_PACKAGE_REGISTRY 0) + set(CMAKE_FIND_USE_PACKAGE_REGISTRY 0) endif() # Setup build locations for shared libraries ----START @@ -260,30 +262,36 @@ endif() # The default path when not wrapping. Restore standard build location # if python wrapping is turned on, and then turned off. if(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY) - set(NO_WRAP_CMAKE_LIBRARY_OUTPUT_DIRECTORY ${ITK_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} CACHE PATH "Shared library directory") + set(NO_WRAP_CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${ITK_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} + CACHE PATH "Shared library directory") else() - set(NO_WRAP_CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} CACHE PATH "Shared library directory") + set(NO_WRAP_CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} + CACHE PATH "Shared library directory") endif() if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set(NO_WRAP_CMAKE_RUNTIME_OUTPUT_DIRECTORY ${ITK_BINARY_DIR}/bin CACHE PATH "Shared library directory") + set(NO_WRAP_CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${ITK_BINARY_DIR}/bin + CACHE PATH "Shared library directory") else() - set(NO_WRAP_CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} CACHE PATH "Shared library directory") + set(NO_WRAP_CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} + CACHE PATH "Shared library directory") endif() include(WrappingConfigCommon) # Setup build locations for shared libraries ----STOP if(CMAKE_CONFIGURATION_TYPES AND ITK_WRAPPING) - add_custom_target(remove_all_wrapped_libs - COMMAND ${CMAKE_COMMAND} -E rm -rf - ${ITK_PYTHON_PACKAGE_DIR}/*.so - ${ITK_PYTHON_PACKAGE_DIR}/*.dylib - ${ITK_PYTHON_PACKAGE_DIR}/*.dll + add_custom_target( + remove_all_wrapped_libs + COMMAND ${CMAKE_COMMAND} -E rm -rf ${ITK_PYTHON_PACKAGE_DIR}/*.so ${ITK_PYTHON_PACKAGE_DIR}/*.dylib + ${ITK_PYTHON_PACKAGE_DIR}/*.dll WORKING_DIRECTORY ${ITK_BINARY_DIR} COMMENT "A convenience target to cleanup library directories when switching between ITK_WRAP/nowrap, or between configs - in a multi-config build." - ) + in a multi-config build.") endif() if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY) @@ -291,50 +299,76 @@ if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY) endif() set(ITK_MODULES_DIR "${ITK_BINARY_DIR}/${ITK_INSTALL_PACKAGE_DIR}/Modules") - #----------------------------------------------------------------------------- # Provide compatibility options. # During major release updates deprecated interface may be needed for backwards compatibility -cmake_dependent_option(ITK_LEGACY_REMOVE - "Remove current legacy code completely." OFF - "NOT ITK_WRAPPING" ON) +cmake_dependent_option( + ITK_LEGACY_REMOVE + "Remove current legacy code completely." + OFF + "NOT ITK_WRAPPING" + ON) # During minor releases bugs may be identified that identify broken interface, or # useless interfaces that need to be retained to not break backwards compatibilty. # These ITK_FUTURE_LEGACY_REMOVE are another level of granularity for # which backwards compatible features we want to maintain. -cmake_dependent_option(ITK_FUTURE_LEGACY_REMOVE - "Completely remove compilation of code which will become deprecated by default in ITKv6." OFF - "ITK_LEGACY_REMOVE" OFF) -cmake_dependent_option(ITK_LEGACY_SILENT - "Silence all legacy code messages when ITK_LEGACY_REMOVE:BOOL=OFF." OFF - "NOT ITK_LEGACY_REMOVE" OFF) +cmake_dependent_option( + ITK_FUTURE_LEGACY_REMOVE + "Completely remove compilation of code which will become deprecated by default in ITKv6." + OFF + "ITK_LEGACY_REMOVE" + OFF) +cmake_dependent_option( + ITK_LEGACY_SILENT + "Silence all legacy code messages when ITK_LEGACY_REMOVE:BOOL=OFF." + OFF + "NOT ITK_LEGACY_REMOVE" + OFF) # The disabling of legacy code, and the ITKv4 compatibility option can not both be # requested. If removal of legacy code is requested, then ITKV4_COMPATIBILITY must # be off. -cmake_dependent_option(ITKV4_COMPATIBILITY - "Enable LEGACY compatibility with ITK4.x when possible." OFF - "NOT ITK_LEGACY_REMOVE" OFF) -mark_as_advanced(ITK_LEGACY_SILENT ITK_LEGACY_REMOVE ITK_FUTURE_LEGACY_REMOVE ITKV4_COMPATIBILITY) - -if (ITKV3_COMPATIBILITY) +cmake_dependent_option( + ITKV4_COMPATIBILITY + "Enable LEGACY compatibility with ITK4.x when possible." + OFF + "NOT ITK_LEGACY_REMOVE" + OFF) +mark_as_advanced( + ITK_LEGACY_SILENT + ITK_LEGACY_REMOVE + ITK_FUTURE_LEGACY_REMOVE + ITKV4_COMPATIBILITY) + +if(ITKV3_COMPATIBILITY) message(FATAL_ERROR "ITKV3_COMPATIBILITY is removed starting in ITK version 5.0, this option is no longer valid.") endif() # Chose flavour of Analyze reader set(ITK_NIFTI_IO_ANALYZE_FLAVOR_DOC_STRING "Which flavour of Analyze reader to use by default") -set(ITK_NIFTI_IO_ANALYZE_FLAVOR "ITK4Warning" CACHE STRING ${ITK_NIFTI_IO_ANALYZE_FLAVOR_DOC_STRING}) - -set_property(CACHE ITK_NIFTI_IO_ANALYZE_FLAVOR PROPERTY STRINGS ITK4Warning ITK4 SPM FSL Reject) - -if(NOT ("${ITK_NIFTI_IO_ANALYZE_FLAVOR}" STREQUAL "ITK4Warning" OR - "${ITK_NIFTI_IO_ANALYZE_FLAVOR}" STREQUAL "ITK4" OR - "${ITK_NIFTI_IO_ANALYZE_FLAVOR}" STREQUAL "SPM" OR - "${ITK_NIFTI_IO_ANALYZE_FLAVOR}" STREQUAL "FSL" OR - "${ITK_NIFTI_IO_ANALYZE_FLAVOR}" STREQUAL "Reject" - )) - set(ITK_NIFTI_IO_ANALYZE_FLAVOR "ITK4Warning" CACHE STRING ${ITK_NIFTI_IO_ANALYZE_FLAVOR_DOC_STRING} FORCE) +set(ITK_NIFTI_IO_ANALYZE_FLAVOR + "ITK4Warning" + CACHE STRING ${ITK_NIFTI_IO_ANALYZE_FLAVOR_DOC_STRING}) + +set_property( + CACHE ITK_NIFTI_IO_ANALYZE_FLAVOR + PROPERTY STRINGS + ITK4Warning + ITK4 + SPM + FSL + Reject) + +if(NOT + ("${ITK_NIFTI_IO_ANALYZE_FLAVOR}" STREQUAL "ITK4Warning" + OR "${ITK_NIFTI_IO_ANALYZE_FLAVOR}" STREQUAL "ITK4" + OR "${ITK_NIFTI_IO_ANALYZE_FLAVOR}" STREQUAL "SPM" + OR "${ITK_NIFTI_IO_ANALYZE_FLAVOR}" STREQUAL "FSL" + OR "${ITK_NIFTI_IO_ANALYZE_FLAVOR}" STREQUAL "Reject")) + set(ITK_NIFTI_IO_ANALYZE_FLAVOR + "ITK4Warning" + CACHE STRING ${ITK_NIFTI_IO_ANALYZE_FLAVOR_DOC_STRING} FORCE) endif() mark_as_advanced(ITK_NIFTI_IO_ANALYZE_FLAVOR) @@ -342,14 +376,14 @@ mark_as_advanced(ITK_NIFTI_IO_ANALYZE_FLAVOR) option(ITK_NIFTI_IO_SFORM_PERMISSIVE_DEFAULT "Allow non-orthogonal rotation matrix in NIFTI sform by default" OFF) mark_as_advanced(ITK_NIFTI_IO_SFORM_PERMISSIVE_DEFAULT) - - #----------------------------------------------------------------------------- # ITK build classes that are in the review process # ITK_USE_REVIEW is deprecated, only kept for backward compatibility -if (ITK_USE_REVIEW AND NOT Module_ITKReview) +if(ITK_USE_REVIEW AND NOT Module_ITKReview) message(WARNING "ITK_USE_REVIEW is deprecated, please use Module_ITKReview to turn Review module ON/OFF") - set(Module_ITKReview ON CACHE BOOL "Module containing code from the Review directory of ITKv4." FORCE) + set(Module_ITKReview + ON + CACHE BOOL "Module containing code from the Review directory of ITKv4." FORCE) endif() #----------------------------------------------------------------------------- @@ -379,10 +413,18 @@ if(ITK_USE_MKL) # the command line. Otherwise, the first CMake run will always initialize # these variables to false. The error message will help the user to set # the appropriate values. - set(ITK_USE_FFTWD ON CACHE BOOL "Use double precision FFTW if found") - set(ITK_USE_FFTWF ON CACHE BOOL "Use single precision FFTW if found") - set(ITK_USE_SYSTEM_FFTW ON CACHE BOOL "Use an installed version of FFTW") - if(NOT ITK_USE_FFTWD OR NOT ITK_USE_FFTWF OR NOT ITK_USE_SYSTEM_FFTW) + set(ITK_USE_FFTWD + ON + CACHE BOOL "Use double precision FFTW if found") + set(ITK_USE_FFTWF + ON + CACHE BOOL "Use single precision FFTW if found") + set(ITK_USE_SYSTEM_FFTW + ON + CACHE BOOL "Use an installed version of FFTW") + if(NOT ITK_USE_FFTWD + OR NOT ITK_USE_FFTWF + OR NOT ITK_USE_SYSTEM_FFTW) message(FATAL_ERROR "ITK_USE_MKL is set to ON. ITK_USE_FFTWD, ITK_USE_FFTWF\ and ITK_USE_SYSTEM_FFTW must be set to ON, too.") endif() @@ -394,10 +436,18 @@ if(ITK_USE_CUFFTW) # the command line. Otherwise, the first CMake run will always initialize # these variables to false. The error message will help the user to set # the appropriate values. - set(ITK_USE_FFTWD ON CACHE BOOL "Use double precision FFTW if found") - set(ITK_USE_FFTWF ON CACHE BOOL "Use single precision FFTW if found") - set(ITK_USE_SYSTEM_FFTW ON CACHE BOOL "Use an installed version of FFTW") - if(NOT ITK_USE_FFTWD OR NOT ITK_USE_FFTWF OR NOT ITK_USE_SYSTEM_FFTW) + set(ITK_USE_FFTWD + ON + CACHE BOOL "Use double precision FFTW if found") + set(ITK_USE_FFTWF + ON + CACHE BOOL "Use single precision FFTW if found") + set(ITK_USE_SYSTEM_FFTW + ON + CACHE BOOL "Use an installed version of FFTW") + if(NOT ITK_USE_FFTWD + OR NOT ITK_USE_FFTWF + OR NOT ITK_USE_SYSTEM_FFTW) message(FATAL_ERROR "ITK_USE_CUFFTW is set to ON. ITK_USE_FFTWD, ITK_USE_FFTWF\ and ITK_USE_SYSTEM_FFTW must be set to ON, too.") endif() @@ -429,7 +479,6 @@ endif() option(ITK_USE_SYSTEM_FFTW "Use an installed version of FFTW" ${ITK_USE_SYSTEM_FFTW_DEFAULT}) mark_as_advanced(ITK_USE_SYSTEM_FFTW) - if(ITK_USE_FFTWD OR ITK_USE_FFTWF) include(itkExternal_FFTW) # This pollutes the global namespace, but is needed for backward compatibility @@ -442,14 +491,22 @@ set(ITK_USE_64BITS_IDS_DEFAULT "OFF") if(CMAKE_SIZEOF_VOID_P EQUAL "8" AND WIN32) set(ITK_USE_64BITS_IDS_DEFAULT "ON") endif() -option(ITK_USE_64BITS_IDS "When ON, ITK will use 64-bit integer types instead of long types for sizes and indexes. This is needed for managing images larger than 4Gb in some platforms." "${ITK_USE_64BITS_IDS_DEFAULT}") +option( + ITK_USE_64BITS_IDS + "When ON, ITK will use 64-bit integer types instead of long types for sizes and indexes. This is needed for managing images larger than 4Gb in some platforms." + "${ITK_USE_64BITS_IDS_DEFAULT}") mark_as_advanced(ITK_USE_64BITS_IDS) # ITK turn on concept checking -option(ITK_USE_CONCEPT_CHECKING "Turn on concept checking to give helpful errors at compile time if a type cannot be used as a template parameter." ON) +option( + ITK_USE_CONCEPT_CHECKING + "Turn on concept checking to give helpful errors at compile time if a type cannot be used as a template parameter." + ON) mark_as_advanced(ITK_USE_CONCEPT_CHECKING) if(ITK_USE_STRICT_CONCEPT_CHECKING) - message(WARNING "Compilers requiring ITK_USE_STRICT_CONCEPT_CHECKING are no longer supported. This variable is no longer used.") + message( + WARNING + "Compilers requiring ITK_USE_STRICT_CONCEPT_CHECKING are no longer supported. This variable is no longer used.") endif() #----------------------------------------------------------------------------- @@ -477,7 +534,9 @@ set(ITK_EXAMPLE_DATA_ROOT "${ITK_SOURCE_DIR}/Examples/Data") # Allow for tests that may use upto 80% of the computer memory to be used for testing. cmake_host_system_information(RESULT ITK_COMPUTER_MEMORY_AVAILABLE_MB QUERY TOTAL_PHYSICAL_MEMORY) math(EXPR EIGHTY_PERCENT_AVAILABLE_MEMORY_IN_GB "(${ITK_COMPUTER_MEMORY_AVAILABLE_MB} * 80) / ( 1024 * 100)") -set(ITK_COMPUTER_MEMORY_SIZE ${EIGHTY_PERCENT_AVAILABLE_MEMORY_IN_GB} CACHE STRING "Provide here the size of your RAM in gibibytes") +set(ITK_COMPUTER_MEMORY_SIZE + ${EIGHTY_PERCENT_AVAILABLE_MEMORY_IN_GB} + CACHE STRING "Provide here the size of your RAM in gibibytes") unset(EIGHTY_PERCENT_AVAILABLE_MEMORY_IN_GB) unset(ITK_COMPUTER_MEMORY_AVAILABLE_MB) mark_as_advanced(ITK_COMPUTER_MEMORY_SIZE) @@ -496,7 +555,9 @@ mark_as_advanced(DISABLE_MODULE_TESTS) #----------------------------------------------------------------------------- # Need to set python variables before remote modules are included. -if(BUILD_TESTING OR ITK_BUILD_DOCUMENTATION OR ITK_WRAP_PYTHON) +if(BUILD_TESTING + OR ITK_BUILD_DOCUMENTATION + OR ITK_WRAP_PYTHON) set(PYTHON_DEVELOPMENT_REQUIRED ${ITK_WRAP_PYTHON}) include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/ITKSetPython3Vars.cmake) @@ -536,12 +597,18 @@ set(ITK_CONFIG_MODULE_API_FILE "${ITK_SOURCE_DIR}/CMake/ITKModuleAPI.cmake") configure_file(CMake/ITKConfig.cmake.in ITKConfig.cmake @ONLY) # Generate ITKConfig.cmake for the install tree. -set(ITK_CONFIG_CODE " +set(ITK_CONFIG_CODE + " # Compute the installation prefix from this ITKConfig.cmake file location. get_filename_component(ITK_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)") # Construct the proper number of get_filename_component(... PATH) # calls to compute the installation prefix. -string(REGEX REPLACE "/" ";" _count "${ITK_INSTALL_PACKAGE_DIR}") +string( + REGEX + REPLACE "/" + ";" + _count + "${ITK_INSTALL_PACKAGE_DIR}") foreach(p ${_count}) set(ITK_CONFIG_CODE "${ITK_CONFIG_CODE} get_filename_component(ITK_INSTALL_PREFIX \"\${ITK_INSTALL_PREFIX}\" PATH)") @@ -561,42 +628,49 @@ endif() configure_file(CMake/ITKConfig.cmake.in CMakeFiles/ITKConfig.cmake @ONLY) #----------------------------------------------------------------------------- -install(FILES ${ITK_BINARY_DIR}/CMakeFiles/ITKConfig.cmake - ${ITK_BINARY_DIR}/ITKConfigVersion.cmake - CMake/ITKModuleAPI.cmake - CMake/UseITK.cmake - CMake/ITKFactoryRegistration.cmake - CMake/itkFFTImageFilterInitFactoryRegisterManager.h.in - CMake/itkImageIOFactoryRegisterManager.h.in - CMake/itkTransformIOFactoryRegisterManager.h.in - CMake/itkMeshIOFactoryRegisterManager.h.in - CMake/ITKInitializeCXXStandard.cmake +install( + FILES ${ITK_BINARY_DIR}/CMakeFiles/ITKConfig.cmake + ${ITK_BINARY_DIR}/ITKConfigVersion.cmake + CMake/ITKModuleAPI.cmake + CMake/UseITK.cmake + CMake/ITKFactoryRegistration.cmake + CMake/itkFFTImageFilterInitFactoryRegisterManager.h.in + CMake/itkImageIOFactoryRegisterManager.h.in + CMake/itkTransformIOFactoryRegisterManager.h.in + CMake/itkMeshIOFactoryRegisterManager.h.in + CMake/ITKInitializeCXXStandard.cmake DESTINATION ${ITK_INSTALL_PACKAGE_DIR} COMPONENT Development) get_property(ITKTargets_MODULES GLOBAL PROPERTY ITKTargets_MODULES) if(ITKTargets_MODULES) - install(EXPORT ITKTargets DESTINATION ${ITK_INSTALL_PACKAGE_DIR} - COMPONENT Development) + install( + EXPORT ITKTargets + DESTINATION ${ITK_INSTALL_PACKAGE_DIR} + COMPONENT Development) else() set(CMAKE_CONFIGURABLE_FILE_CONTENT "# No targets!") - configure_file(${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in - ${ITK_BINARY_DIR}/CMakeFiles/ITKTargets.cmake @ONLY) - install(FILES ${ITK_BINARY_DIR}/CMakeFiles/ITKTargets.cmake - DESTINATION ${ITK_INSTALL_PACKAGE_DIR} COMPONENT Development) + configure_file(${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in ${ITK_BINARY_DIR}/CMakeFiles/ITKTargets.cmake @ONLY) + install( + FILES ${ITK_BINARY_DIR}/CMakeFiles/ITKTargets.cmake + DESTINATION ${ITK_INSTALL_PACKAGE_DIR} + COMPONENT Development) endif() -install(FILES "LICENSE" "NOTICE" "README.md" DESTINATION ${ITK_INSTALL_DOC_DIR} COMPONENT Runtime) +install( + FILES "LICENSE" "NOTICE" "README.md" + DESTINATION ${ITK_INSTALL_DOC_DIR} + COMPONENT Runtime) if(BUILD_TESTING) # If building the testing, write the test costs (i.e. time to run) # analysis to disk to more easily review long-running test times - set(CTEST_COST_DATA_FILE "${CMAKE_BINARY_DIR}/test_cost.list" CACHE FILEPATH "Configurable path to CTest cost data file.") + set(CTEST_COST_DATA_FILE + "${CMAKE_BINARY_DIR}/test_cost.list" + CACHE FILEPATH "Configurable path to CTest cost data file.") mark_as_advanced(CTEST_COST_DATA_FILE) add_subdirectory(Utilities/InstallTest) endif() - - #----------------------------------------------------------------------------- # The subdirectories added below this line should use only the public # interface with find_package(ITK). Set ITK_DIR to use this ITK build. @@ -617,9 +691,10 @@ add_subdirectory(Utilities/Doxygen) # Create target to download data from the ITKData group. This must come after # all tests have been added that reference the group, so we put it last. include(ExternalData) -ExternalData_Add_Target(ITKData) +ExternalData_add_target(ITKData) -mark_as_advanced(FORCE +mark_as_advanced( + FORCE Module_AdaptiveDenoising Module_AnalyzeObjectLabelMap Module_AnisotropicDiffusionLBR @@ -674,14 +749,9 @@ mark_as_advanced(FORCE Module_Ultrasound Module_VariationalRegistration Module_VkFFTBackend - Module_WebAssemblyInterface - ) - -mark_as_advanced(FORCE - NSIS_EXECUTABLE - WIX_EXECUTABLE - ) + Module_WebAssemblyInterface) +mark_as_advanced(FORCE NSIS_EXECUTABLE WIX_EXECUTABLE) # Create an IDE folder structure similar to our source structure if("${CMAKE_GENERATOR}" MATCHES "Xcode|Visual Studio|KDevelop") @@ -691,20 +761,33 @@ if("${CMAKE_GENERATOR}" MATCHES "Xcode|Visual Studio|KDevelop") foreach(t ${targets}) # INTERFACE_LIBRARY warns about non-whitelisted properties for CMake < 3.19 get_target_property(type ${t} TYPE) - if (NOT "${type}" STREQUAL "INTERFACE_LIBRARY") + if(NOT + "${type}" + STREQUAL + "INTERFACE_LIBRARY") get_target_property(f ${t} SOURCE_DIR) - string(REPLACE ${dir} "" f ${f}) - set_target_properties (${t} PROPERTIES FOLDER "${folder}/${f}") + string( + REPLACE ${dir} + "" + f + ${f}) + set_target_properties(${t} PROPERTIES FOLDER "${folder}/${f}") endif() endforeach() endfunction() macro(itk_get_all_targets_recursive targets dir) - get_property(subdirectories DIRECTORY ${dir} PROPERTY SUBDIRECTORIES) - foreach(subdir ${subdirectories}) - itk_get_all_targets_recursive(${targets} ${subdir}) - endforeach() - get_property(current_targets DIRECTORY ${dir} PROPERTY BUILDSYSTEM_TARGETS) - list(APPEND ${targets} ${current_targets}) + get_property( + subdirectories + DIRECTORY ${dir} + PROPERTY SUBDIRECTORIES) + foreach(subdir ${subdirectories}) + itk_get_all_targets_recursive(${targets} ${subdir}) + endforeach() + get_property( + current_targets + DIRECTORY ${dir} + PROPERTY BUILDSYSTEM_TARGETS) + list(APPEND ${targets} ${current_targets}) endmacro() itk_organize_targets(${CMAKE_SOURCE_DIR} ITK) endif() diff --git a/Examples/DataRepresentation/Image/CMakeLists.txt b/Examples/DataRepresentation/Image/CMakeLists.txt index 5614542585c..9c170d9a323 100644 --- a/Examples/DataRepresentation/Image/CMakeLists.txt +++ b/Examples/DataRepresentation/Image/CMakeLists.txt @@ -24,7 +24,6 @@ target_link_libraries(ImageAdaptor3 ${ITK_LIBRARIES}) add_executable(ImageAdaptor4 ImageAdaptor4.cxx) target_link_libraries(ImageAdaptor4 ${ITK_LIBRARIES}) - add_executable(Image5 Image5.cxx) target_link_libraries(Image5 ${ITK_LIBRARIES}) @@ -34,9 +33,6 @@ target_link_libraries(ImageAdaptor1 ${ITK_LIBRARIES}) add_executable(RGBImage RGBImage.cxx) target_link_libraries(RGBImage ${ITK_LIBRARIES}) - - if(BUILD_TESTING) add_subdirectory(test) endif() - diff --git a/Examples/DataRepresentation/Image/test/CMakeLists.txt b/Examples/DataRepresentation/Image/test/CMakeLists.txt index 80f81f49fb4..5a1a024bcc0 100644 --- a/Examples/DataRepresentation/Image/test/CMakeLists.txt +++ b/Examples/DataRepresentation/Image/test/CMakeLists.txt @@ -1,51 +1,90 @@ set(TEMP ${ITK_BINARY_DIR}/Testing/Temporary) -itk_add_test(NAME ImageAdaptor2Test COMMAND ${ITK_TEST_DRIVER} - $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/ImageAdaptor2Test.png -) +itk_add_test( + NAME + ImageAdaptor2Test + COMMAND + ${ITK_TEST_DRIVER} + $ + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/ImageAdaptor2Test.png) -itk_add_test(NAME ImageAdaptor3Test COMMAND ${ITK_TEST_DRIVER} +itk_add_test( + NAME + ImageAdaptor3Test + COMMAND + ${ITK_TEST_DRIVER} $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/ImageAdaptor3Test.mhd 1 -) + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/ImageAdaptor3Test.mhd + 1) -itk_add_test(NAME ImageAdaptor4Test COMMAND ${ITK_TEST_DRIVER} +itk_add_test( + NAME + ImageAdaptor4Test + COMMAND + ${ITK_TEST_DRIVER} $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/ImageAdaptor4Test.png 127 -) + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/ImageAdaptor4Test.png + 127) -itk_add_test(NAME ImageAdaptor1Test COMMAND ${ITK_TEST_DRIVER} - $ ${ITK_SOURCE_DIR}/Examples/Data/BrainMidSagittalSlice.png -) +itk_add_test( + NAME + ImageAdaptor1Test + COMMAND + ${ITK_TEST_DRIVER} + $ + ${ITK_SOURCE_DIR}/Examples/Data/BrainMidSagittalSlice.png) -itk_add_test(NAME Image1Test COMMAND ${ITK_TEST_DRIVER} - $ -) +itk_add_test( + NAME + Image1Test + COMMAND + ${ITK_TEST_DRIVER} + $) -itk_add_test(NAME Image2Test COMMAND ${ITK_TEST_DRIVER} - $ ${ITK_SOURCE_DIR}/Examples/Data/BrainMidSagittalSlice.png -) +itk_add_test( + NAME + Image2Test + COMMAND + ${ITK_TEST_DRIVER} + $ + ${ITK_SOURCE_DIR}/Examples/Data/BrainMidSagittalSlice.png) -itk_add_test(NAME Image3Test COMMAND ${ITK_TEST_DRIVER} - $ -) +itk_add_test( + NAME + Image3Test + COMMAND + ${ITK_TEST_DRIVER} + $) -itk_add_test(NAME Image4Test COMMAND ${ITK_TEST_DRIVER} - $ -) +itk_add_test( + NAME + Image4Test + COMMAND + ${ITK_TEST_DRIVER} + $) -itk_add_test(NAME Image5Test COMMAND ${ITK_TEST_DRIVER} - $ ${TEMP}/Image5Test.mhd -) +itk_add_test( + NAME + Image5Test + COMMAND + ${ITK_TEST_DRIVER} + $ + ${TEMP}/Image5Test.mhd) -itk_add_test(NAME RGBImageTest COMMAND ${ITK_TEST_DRIVER} - $ ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png -) +itk_add_test( + NAME + RGBImageTest + COMMAND + ${ITK_TEST_DRIVER} + $ + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png) -itk_add_test(NAME VectorImageTest COMMAND ${ITK_TEST_DRIVER} - $ -) +itk_add_test( + NAME + VectorImageTest + COMMAND + ${ITK_TEST_DRIVER} + $) diff --git a/Examples/DataRepresentation/Mesh/CMakeLists.txt b/Examples/DataRepresentation/Mesh/CMakeLists.txt index 4dc1e80625f..fab2bda1cd5 100644 --- a/Examples/DataRepresentation/Mesh/CMakeLists.txt +++ b/Examples/DataRepresentation/Mesh/CMakeLists.txt @@ -51,7 +51,6 @@ target_link_libraries(AutomaticMesh ${ITK_LIBRARIES}) add_executable(ImageToPointSet ImageToPointSet.cxx) target_link_libraries(ImageToPointSet ${ITK_LIBRARIES}) - if(BUILD_TESTING) add_subdirectory(test) endif() diff --git a/Examples/DataRepresentation/Mesh/test/CMakeLists.txt b/Examples/DataRepresentation/Mesh/test/CMakeLists.txt index f15f673362e..ce5a9f811ab 100644 --- a/Examples/DataRepresentation/Mesh/test/CMakeLists.txt +++ b/Examples/DataRepresentation/Mesh/test/CMakeLists.txt @@ -1,33 +1,119 @@ -itk_add_test(NAME AutomaticMeshTest COMMAND ${ITK_TEST_DRIVER} $) - -itk_add_test(NAME ImageToPointSetTest COMMAND ${ITK_TEST_DRIVER} $ ${ITK_SOURCE_DIR}/Examples/Data/BrainMidSagittalSlice.png) - -itk_add_test(NAME Mesh1Test COMMAND ${ITK_TEST_DRIVER} $) - -itk_add_test(NAME Mesh2Test COMMAND ${ITK_TEST_DRIVER} $) - -itk_add_test(NAME Mesh3Test COMMAND ${ITK_TEST_DRIVER} $) - -itk_add_test(NAME MeshCellsIterationTest COMMAND ${ITK_TEST_DRIVER} $) - -itk_add_test(NAME MeshCellVisitorTest COMMAND ${ITK_TEST_DRIVER} $) - -itk_add_test(NAME MeshCellVisitor2Test COMMAND ${ITK_TEST_DRIVER} $) - -itk_add_test(NAME MeshKComplexTest COMMAND ${ITK_TEST_DRIVER} $) - -itk_add_test(NAME MeshPolyLineTest COMMAND ${ITK_TEST_DRIVER} $) - -itk_add_test(NAME MeshTraitsTest COMMAND ${ITK_TEST_DRIVER} $) - -itk_add_test(NAME PointSet1Test COMMAND ${ITK_TEST_DRIVER} $) - -itk_add_test(NAME PointSet2Test COMMAND ${ITK_TEST_DRIVER} $) - -itk_add_test(NAME PointSet3Test COMMAND ${ITK_TEST_DRIVER} $) - -itk_add_test(NAME PointSetWithCovariantVectorsTest COMMAND ${ITK_TEST_DRIVER} $) - -itk_add_test(NAME PointSetWithVectorsTest COMMAND ${ITK_TEST_DRIVER} $) - -itk_add_test(NAME RGBPointSetTest COMMAND ${ITK_TEST_DRIVER} $) +itk_add_test( + NAME + AutomaticMeshTest + COMMAND + ${ITK_TEST_DRIVER} + $) + +itk_add_test( + NAME + ImageToPointSetTest + COMMAND + ${ITK_TEST_DRIVER} + $ + ${ITK_SOURCE_DIR}/Examples/Data/BrainMidSagittalSlice.png) + +itk_add_test( + NAME + Mesh1Test + COMMAND + ${ITK_TEST_DRIVER} + $) + +itk_add_test( + NAME + Mesh2Test + COMMAND + ${ITK_TEST_DRIVER} + $) + +itk_add_test( + NAME + Mesh3Test + COMMAND + ${ITK_TEST_DRIVER} + $) + +itk_add_test( + NAME + MeshCellsIterationTest + COMMAND + ${ITK_TEST_DRIVER} + $) + +itk_add_test( + NAME + MeshCellVisitorTest + COMMAND + ${ITK_TEST_DRIVER} + $) + +itk_add_test( + NAME + MeshCellVisitor2Test + COMMAND + ${ITK_TEST_DRIVER} + $) + +itk_add_test( + NAME + MeshKComplexTest + COMMAND + ${ITK_TEST_DRIVER} + $) + +itk_add_test( + NAME + MeshPolyLineTest + COMMAND + ${ITK_TEST_DRIVER} + $) + +itk_add_test( + NAME + MeshTraitsTest + COMMAND + ${ITK_TEST_DRIVER} + $) + +itk_add_test( + NAME + PointSet1Test + COMMAND + ${ITK_TEST_DRIVER} + $) + +itk_add_test( + NAME + PointSet2Test + COMMAND + ${ITK_TEST_DRIVER} + $) + +itk_add_test( + NAME + PointSet3Test + COMMAND + ${ITK_TEST_DRIVER} + $) + +itk_add_test( + NAME + PointSetWithCovariantVectorsTest + COMMAND + ${ITK_TEST_DRIVER} + $) + +itk_add_test( + NAME + PointSetWithVectorsTest + COMMAND + ${ITK_TEST_DRIVER} + $) + +itk_add_test( + NAME + RGBPointSetTest + COMMAND + ${ITK_TEST_DRIVER} + $) diff --git a/Examples/DataRepresentation/Path/test/CMakeLists.txt b/Examples/DataRepresentation/Path/test/CMakeLists.txt index ebb7bfb8ac8..d7a6b0645a3 100644 --- a/Examples/DataRepresentation/Path/test/CMakeLists.txt +++ b/Examples/DataRepresentation/Path/test/CMakeLists.txt @@ -1,3 +1,6 @@ -itk_add_test(NAME PolyLineParametricPath1 COMMAND PolyLineParametricPath1 - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png -) +itk_add_test( + NAME + PolyLineParametricPath1 + COMMAND + PolyLineParametricPath1 + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png) diff --git a/Examples/Filtering/CMakeLists.txt b/Examples/Filtering/CMakeLists.txt index 9a731edfc4e..0fabad39d80 100644 --- a/Examples/Filtering/CMakeLists.txt +++ b/Examples/Filtering/CMakeLists.txt @@ -1,155 +1,155 @@ project(FilteringExamples) add_executable(CompositeFilterExample CompositeFilterExample.cxx) -target_link_libraries(CompositeFilterExample ${ITK_LIBRARIES}) +target_link_libraries(CompositeFilterExample ${ITK_LIBRARIES}) add_executable(FlipImageFilter FlipImageFilter.cxx) -target_link_libraries(FlipImageFilter ${ITK_LIBRARIES}) +target_link_libraries(FlipImageFilter ${ITK_LIBRARIES}) add_executable(FFTImageFilter FFTImageFilter.cxx) -target_link_libraries(FFTImageFilter ${ITK_LIBRARIES}) +target_link_libraries(FFTImageFilter ${ITK_LIBRARIES}) if(ITK_USE_FFTWF) add_executable(FFTDirectInverse2 FFTDirectInverse2.cxx) - target_link_libraries(FFTDirectInverse2 ${ITK_LIBRARIES}) + target_link_libraries(FFTDirectInverse2 ${ITK_LIBRARIES}) endif() add_executable(GradientMagnitudeImageFilter GradientMagnitudeImageFilter.cxx) -target_link_libraries(GradientMagnitudeImageFilter ${ITK_LIBRARIES}) +target_link_libraries(GradientMagnitudeImageFilter ${ITK_LIBRARIES}) add_executable(GradientMagnitudeRecursiveGaussianImageFilter GradientMagnitudeRecursiveGaussianImageFilter.cxx) -target_link_libraries(GradientMagnitudeRecursiveGaussianImageFilter ${ITK_LIBRARIES}) +target_link_libraries(GradientMagnitudeRecursiveGaussianImageFilter ${ITK_LIBRARIES}) add_executable(GradientRecursiveGaussianImageFilter GradientRecursiveGaussianImageFilter.cxx) -target_link_libraries(GradientRecursiveGaussianImageFilter ${ITK_LIBRARIES}) +target_link_libraries(GradientRecursiveGaussianImageFilter ${ITK_LIBRARIES}) add_executable(GrayscaleFunctionDilateImageFilter GrayscaleFunctionDilateImageFilter.cxx) -target_link_libraries(GrayscaleFunctionDilateImageFilter ${ITK_LIBRARIES}) +target_link_libraries(GrayscaleFunctionDilateImageFilter ${ITK_LIBRARIES}) add_executable(BinaryThresholdImageFilter BinaryThresholdImageFilter.cxx) -target_link_libraries(BinaryThresholdImageFilter ${ITK_LIBRARIES}) +target_link_libraries(BinaryThresholdImageFilter ${ITK_LIBRARIES}) add_executable(BinaryMedianImageFilter BinaryMedianImageFilter.cxx) -target_link_libraries(BinaryMedianImageFilter ${ITK_LIBRARIES}) +target_link_libraries(BinaryMedianImageFilter ${ITK_LIBRARIES}) add_executable(OtsuThresholdImageFilter OtsuThresholdImageFilter.cxx) -target_link_libraries(OtsuThresholdImageFilter ${ITK_LIBRARIES}) +target_link_libraries(OtsuThresholdImageFilter ${ITK_LIBRARIES}) add_executable(OtsuMultipleThresholdImageFilter OtsuMultipleThresholdImageFilter.cxx) target_link_libraries(OtsuMultipleThresholdImageFilter ${ITK_LIBRARIES}) add_executable(ThresholdImageFilter ThresholdImageFilter.cxx) -target_link_libraries(ThresholdImageFilter ${ITK_LIBRARIES}) +target_link_libraries(ThresholdImageFilter ${ITK_LIBRARIES}) add_executable(CastingImageFilters CastingImageFilters.cxx) -target_link_libraries(CastingImageFilters ${ITK_LIBRARIES}) +target_link_libraries(CastingImageFilters ${ITK_LIBRARIES}) add_executable(CannyEdgeDetectionImageFilter CannyEdgeDetectionImageFilter.cxx) -target_link_libraries(CannyEdgeDetectionImageFilter ${ITK_LIBRARIES}) +target_link_libraries(CannyEdgeDetectionImageFilter ${ITK_LIBRARIES}) add_executable(MedianImageFilter MedianImageFilter.cxx) -target_link_libraries(MedianImageFilter ${ITK_LIBRARIES}) +target_link_libraries(MedianImageFilter ${ITK_LIBRARIES}) add_executable(MeanImageFilter MeanImageFilter.cxx) -target_link_libraries(MeanImageFilter ${ITK_LIBRARIES}) +target_link_libraries(MeanImageFilter ${ITK_LIBRARIES}) add_executable(MathematicalMorphologyBinaryFilters MathematicalMorphologyBinaryFilters.cxx) -target_link_libraries(MathematicalMorphologyBinaryFilters ${ITK_LIBRARIES}) +target_link_libraries(MathematicalMorphologyBinaryFilters ${ITK_LIBRARIES}) add_executable(MathematicalMorphologyGrayscaleFilters MathematicalMorphologyGrayscaleFilters.cxx) -target_link_libraries(MathematicalMorphologyGrayscaleFilters ${ITK_LIBRARIES}) +target_link_libraries(MathematicalMorphologyGrayscaleFilters ${ITK_LIBRARIES}) add_executable(BinaryMinMaxCurvatureFlowImageFilter BinaryMinMaxCurvatureFlowImageFilter.cxx) -target_link_libraries(BinaryMinMaxCurvatureFlowImageFilter ${ITK_LIBRARIES}) +target_link_libraries(BinaryMinMaxCurvatureFlowImageFilter ${ITK_LIBRARIES}) add_executable(DiscreteGaussianImageFilter DiscreteGaussianImageFilter.cxx) -target_link_libraries(DiscreteGaussianImageFilter ${ITK_LIBRARIES}) +target_link_libraries(DiscreteGaussianImageFilter ${ITK_LIBRARIES}) add_executable(GaussianBlurImageFunction GaussianBlurImageFunction.cxx) -target_link_libraries(GaussianBlurImageFunction ${ITK_LIBRARIES}) +target_link_libraries(GaussianBlurImageFunction ${ITK_LIBRARIES}) add_executable(LaplacianRecursiveGaussianImageFilter1 LaplacianRecursiveGaussianImageFilter1.cxx) -target_link_libraries(LaplacianRecursiveGaussianImageFilter1 ${ITK_LIBRARIES}) +target_link_libraries(LaplacianRecursiveGaussianImageFilter1 ${ITK_LIBRARIES}) add_executable(ScaleSpaceGenerator2D ScaleSpaceGenerator2D.cxx) -target_link_libraries(ScaleSpaceGenerator2D ${ITK_LIBRARIES}) +target_link_libraries(ScaleSpaceGenerator2D ${ITK_LIBRARIES}) add_executable(BinomialBlurImageFilter BinomialBlurImageFilter.cxx) -target_link_libraries(BinomialBlurImageFilter ${ITK_LIBRARIES}) +target_link_libraries(BinomialBlurImageFilter ${ITK_LIBRARIES}) add_executable(CurvatureAnisotropicDiffusionImageFilter CurvatureAnisotropicDiffusionImageFilter.cxx) -target_link_libraries(CurvatureAnisotropicDiffusionImageFilter ${ITK_LIBRARIES}) +target_link_libraries(CurvatureAnisotropicDiffusionImageFilter ${ITK_LIBRARIES}) add_executable(VectorGradientAnisotropicDiffusionImageFilter VectorGradientAnisotropicDiffusionImageFilter.cxx) -target_link_libraries(VectorGradientAnisotropicDiffusionImageFilter ${ITK_LIBRARIES}) +target_link_libraries(VectorGradientAnisotropicDiffusionImageFilter ${ITK_LIBRARIES}) add_executable(VectorCurvatureAnisotropicDiffusionImageFilter VectorCurvatureAnisotropicDiffusionImageFilter.cxx) -target_link_libraries(VectorCurvatureAnisotropicDiffusionImageFilter ${ITK_LIBRARIES}) +target_link_libraries(VectorCurvatureAnisotropicDiffusionImageFilter ${ITK_LIBRARIES}) add_executable(RGBToGrayscale RGBToGrayscale.cxx) -target_link_libraries(RGBToGrayscale ${ITK_LIBRARIES}) +target_link_libraries(RGBToGrayscale ${ITK_LIBRARIES}) add_executable(BilateralImageFilter BilateralImageFilter.cxx) -target_link_libraries(BilateralImageFilter ${ITK_LIBRARIES}) +target_link_libraries(BilateralImageFilter ${ITK_LIBRARIES}) add_executable(ResampleOrientedImageFilter ResampleOrientedImageFilter.cxx) -target_link_libraries(ResampleOrientedImageFilter ${ITK_LIBRARIES}) +target_link_libraries(ResampleOrientedImageFilter ${ITK_LIBRARIES}) add_executable(ResampleImageFilter2 ResampleImageFilter2.cxx) -target_link_libraries(ResampleImageFilter2 ${ITK_LIBRARIES}) +target_link_libraries(ResampleImageFilter2 ${ITK_LIBRARIES}) add_executable(GradientAnisotropicDiffusionImageFilter GradientAnisotropicDiffusionImageFilter.cxx) -target_link_libraries(GradientAnisotropicDiffusionImageFilter ${ITK_LIBRARIES}) +target_link_libraries(GradientAnisotropicDiffusionImageFilter ${ITK_LIBRARIES}) add_executable(CurvatureFlowImageFilter CurvatureFlowImageFilter.cxx) -target_link_libraries(CurvatureFlowImageFilter ${ITK_LIBRARIES}) +target_link_libraries(CurvatureFlowImageFilter ${ITK_LIBRARIES}) add_executable(GradientVectorFlowImageFilter GradientVectorFlowImageFilter.cxx) -target_link_libraries(GradientVectorFlowImageFilter ${ITK_LIBRARIES}) +target_link_libraries(GradientVectorFlowImageFilter ${ITK_LIBRARIES}) add_executable(SigmoidImageFilter SigmoidImageFilter.cxx) -target_link_libraries(SigmoidImageFilter ${ITK_LIBRARIES}) +target_link_libraries(SigmoidImageFilter ${ITK_LIBRARIES}) add_executable(RGBCurvatureAnisotropicDiffusionImageFilter RGBCurvatureAnisotropicDiffusionImageFilter.cxx) -target_link_libraries(RGBCurvatureAnisotropicDiffusionImageFilter ${ITK_LIBRARIES}) +target_link_libraries(RGBCurvatureAnisotropicDiffusionImageFilter ${ITK_LIBRARIES}) add_executable(RGBGradientAnisotropicDiffusionImageFilter RGBGradientAnisotropicDiffusionImageFilter.cxx) -target_link_libraries(RGBGradientAnisotropicDiffusionImageFilter ${ITK_LIBRARIES}) +target_link_libraries(RGBGradientAnisotropicDiffusionImageFilter ${ITK_LIBRARIES}) add_executable(SignedDanielssonDistanceMapImageFilter SignedDanielssonDistanceMapImageFilter.cxx) -target_link_libraries(SignedDanielssonDistanceMapImageFilter ${ITK_LIBRARIES}) +target_link_libraries(SignedDanielssonDistanceMapImageFilter ${ITK_LIBRARIES}) add_executable(SecondDerivativeRecursiveGaussianImageFilter SecondDerivativeRecursiveGaussianImageFilter.cxx) -target_link_libraries(SecondDerivativeRecursiveGaussianImageFilter ${ITK_LIBRARIES}) +target_link_libraries(SecondDerivativeRecursiveGaussianImageFilter ${ITK_LIBRARIES}) add_executable(DerivativeImageFilter DerivativeImageFilter.cxx) -target_link_libraries(DerivativeImageFilter ${ITK_LIBRARIES}) +target_link_libraries(DerivativeImageFilter ${ITK_LIBRARIES}) add_executable(DanielssonDistanceMapImageFilter DanielssonDistanceMapImageFilter.cxx) -target_link_libraries(DanielssonDistanceMapImageFilter ${ITK_LIBRARIES}) +target_link_libraries(DanielssonDistanceMapImageFilter ${ITK_LIBRARIES}) add_executable(AntiAliasBinaryImageFilter AntiAliasBinaryImageFilter.cxx) -target_link_libraries(AntiAliasBinaryImageFilter ${ITK_LIBRARIES}) +target_link_libraries(AntiAliasBinaryImageFilter ${ITK_LIBRARIES}) add_executable(ResampleImageFilter ResampleImageFilter.cxx) -target_link_libraries(ResampleImageFilter ${ITK_LIBRARIES}) +target_link_libraries(ResampleImageFilter ${ITK_LIBRARIES}) add_executable(SmoothingRecursiveGaussianImageFilter SmoothingRecursiveGaussianImageFilter.cxx) -target_link_libraries(SmoothingRecursiveGaussianImageFilter ${ITK_LIBRARIES}) +target_link_libraries(SmoothingRecursiveGaussianImageFilter ${ITK_LIBRARIES}) add_executable(SmoothingRecursiveGaussianImageFilter2 SmoothingRecursiveGaussianImageFilter2.cxx) -target_link_libraries(SmoothingRecursiveGaussianImageFilter2 ${ITK_LIBRARIES}) +target_link_libraries(SmoothingRecursiveGaussianImageFilter2 ${ITK_LIBRARIES}) add_executable(LaplacianRecursiveGaussianImageFilter2 LaplacianRecursiveGaussianImageFilter2.cxx) -target_link_libraries(LaplacianRecursiveGaussianImageFilter2 ${ITK_LIBRARIES}) +target_link_libraries(LaplacianRecursiveGaussianImageFilter2 ${ITK_LIBRARIES}) add_executable(MorphologicalImageEnhancement MorphologicalImageEnhancement.cxx) -target_link_libraries(MorphologicalImageEnhancement ${ITK_LIBRARIES}) +target_link_libraries(MorphologicalImageEnhancement ${ITK_LIBRARIES}) add_executable(MinMaxCurvatureFlowImageFilter MinMaxCurvatureFlowImageFilter.cxx) -target_link_libraries(MinMaxCurvatureFlowImageFilter ${ITK_LIBRARIES}) +target_link_libraries(MinMaxCurvatureFlowImageFilter ${ITK_LIBRARIES}) add_executable(FFTImageFilterFourierDomainFiltering FFTImageFilterFourierDomainFiltering.cxx) -target_link_libraries(FFTImageFilterFourierDomainFiltering ${ITK_LIBRARIES}) +target_link_libraries(FFTImageFilterFourierDomainFiltering ${ITK_LIBRARIES}) add_executable(LaplacianImageFilter LaplacianImageFilter.cxx) -target_link_libraries(LaplacianImageFilter ${ITK_LIBRARIES}) +target_link_libraries(LaplacianImageFilter ${ITK_LIBRARIES}) add_executable(ResampleImageFilter3 ResampleImageFilter3.cxx) -target_link_libraries(ResampleImageFilter3 ${ITK_LIBRARIES}) +target_link_libraries(ResampleImageFilter3 ${ITK_LIBRARIES}) add_executable(ResampleImageFilter4 ResampleImageFilter4.cxx) -target_link_libraries(ResampleImageFilter4 ${ITK_LIBRARIES}) +target_link_libraries(ResampleImageFilter4 ${ITK_LIBRARIES}) add_executable(VotingBinaryHoleFillingImageFilter VotingBinaryHoleFillingImageFilter.cxx) -target_link_libraries(VotingBinaryHoleFillingImageFilter ${ITK_LIBRARIES}) +target_link_libraries(VotingBinaryHoleFillingImageFilter ${ITK_LIBRARIES}) add_executable(VotingBinaryIterativeHoleFillingImageFilter VotingBinaryIterativeHoleFillingImageFilter.cxx) -target_link_libraries(VotingBinaryIterativeHoleFillingImageFilter ${ITK_LIBRARIES}) +target_link_libraries(VotingBinaryIterativeHoleFillingImageFilter ${ITK_LIBRARIES}) add_executable(ResampleImageFilter5 ResampleImageFilter5.cxx) -target_link_libraries(ResampleImageFilter5 ${ITK_LIBRARIES}) +target_link_libraries(ResampleImageFilter5 ${ITK_LIBRARIES}) add_executable(ResampleImageFilter6 ResampleImageFilter6.cxx) -target_link_libraries(ResampleImageFilter6 ${ITK_LIBRARIES}) +target_link_libraries(ResampleImageFilter6 ${ITK_LIBRARIES}) add_executable(ResampleImageFilter8 ResampleImageFilter8.cxx) -target_link_libraries(ResampleImageFilter8 ${ITK_LIBRARIES}) +target_link_libraries(ResampleImageFilter8 ${ITK_LIBRARIES}) add_executable(ResampleImageFilter9 ResampleImageFilter9.cxx) -target_link_libraries(ResampleImageFilter9 ${ITK_LIBRARIES}) +target_link_libraries(ResampleImageFilter9 ${ITK_LIBRARIES}) add_executable(ResampleVolumesToBeIsotropic ResampleVolumesToBeIsotropic.cxx) -target_link_libraries(ResampleVolumesToBeIsotropic ${ITK_LIBRARIES}) +target_link_libraries(ResampleVolumesToBeIsotropic ${ITK_LIBRARIES}) add_executable(SubsampleVolume SubsampleVolume.cxx) -target_link_libraries(SubsampleVolume ${ITK_LIBRARIES}) +target_link_libraries(SubsampleVolume ${ITK_LIBRARIES}) add_executable(SpatialObjectToImage1 SpatialObjectToImage1.cxx) -target_link_libraries(SpatialObjectToImage1 ${ITK_LIBRARIES}) +target_link_libraries(SpatialObjectToImage1 ${ITK_LIBRARIES}) add_executable(SpatialObjectToImage2 SpatialObjectToImage2.cxx) -target_link_libraries(SpatialObjectToImage2 ${ITK_LIBRARIES}) +target_link_libraries(SpatialObjectToImage2 ${ITK_LIBRARIES}) add_executable(SpatialObjectToImage3 SpatialObjectToImage3.cxx) -target_link_libraries(SpatialObjectToImage3 ${ITK_LIBRARIES}) +target_link_libraries(SpatialObjectToImage3 ${ITK_LIBRARIES}) add_executable(LaplacianSharpeningImageFilter LaplacianSharpeningImageFilter.cxx) -target_link_libraries(LaplacianSharpeningImageFilter ${ITK_LIBRARIES}) +target_link_libraries(LaplacianSharpeningImageFilter ${ITK_LIBRARIES}) add_executable(VectorIndexSelection VectorIndexSelection.cxx) -target_link_libraries(VectorIndexSelection ${ITK_LIBRARIES}) +target_link_libraries(VectorIndexSelection ${ITK_LIBRARIES}) add_executable(VesselnessMeasureImageFilter VesselnessMeasureImageFilter.cxx) -target_link_libraries(VesselnessMeasureImageFilter ${ITK_LIBRARIES}) +target_link_libraries(VesselnessMeasureImageFilter ${ITK_LIBRARIES}) add_executable(DiffusionTensor3DReconstructionImageFilter DiffusionTensor3DReconstructionImageFilter.cxx) target_link_libraries(DiffusionTensor3DReconstructionImageFilter ${ITK_LIBRARIES}) add_executable(FFTDirectInverse FFTDirectInverse.cxx) -target_link_libraries(FFTDirectInverse ${ITK_LIBRARIES}) +target_link_libraries(FFTDirectInverse ${ITK_LIBRARIES}) add_executable(ZeroCrossingBasedEdgeDetectionImageFilter ZeroCrossingBasedEdgeDetectionImageFilter.cxx) -target_link_libraries(ZeroCrossingBasedEdgeDetectionImageFilter ${ITK_LIBRARIES}) +target_link_libraries(ZeroCrossingBasedEdgeDetectionImageFilter ${ITK_LIBRARIES}) add_executable(WarpImageFilter1 WarpImageFilter1.cxx) -target_link_libraries(WarpImageFilter1 ${ITK_LIBRARIES}) +target_link_libraries(WarpImageFilter1 ${ITK_LIBRARIES}) add_executable(SurfaceExtraction SurfaceExtraction.cxx) -target_link_libraries(SurfaceExtraction ${ITK_LIBRARIES}) +target_link_libraries(SurfaceExtraction ${ITK_LIBRARIES}) add_executable(DigitallyReconstructedRadiograph1 DigitallyReconstructedRadiograph1.cxx) -target_link_libraries(DigitallyReconstructedRadiograph1 ${ITK_LIBRARIES}) +target_link_libraries(DigitallyReconstructedRadiograph1 ${ITK_LIBRARIES}) add_executable(ResampleImageFilter7 ResampleImageFilter7.cxx) -target_link_libraries(ResampleImageFilter7 ${ITK_LIBRARIES}) +target_link_libraries(ResampleImageFilter7 ${ITK_LIBRARIES}) if(BUILD_TESTING) add_subdirectory(test) diff --git a/Examples/Filtering/test/CMakeLists.txt b/Examples/Filtering/test/CMakeLists.txt index 572c1b477af..771c18fb180 100644 --- a/Examples/Filtering/test/CMakeLists.txt +++ b/Examples/Filtering/test/CMakeLists.txt @@ -1,624 +1,978 @@ set(BASELINE ${ITK_DATA_ROOT}/Baseline/Filtering) set(TEMP ${ITK_BINARY_DIR}/Testing/Temporary) -itk_add_test(NAME BilateralImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/BilateralImageFilter.png,:} - ${TEMP}/BilateralImageFilter.png +itk_add_test( + NAME + BilateralImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/BilateralImageFilter.png,:} + ${TEMP}/BilateralImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/BilateralImageFilter.png - 6.0 5.0 -) -itk_add_test(NAME BinaryMinMaxCurvatureFlowImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/BinaryMinMaxCurvatureFlowImageFilter.png} - ${TEMP}/BinaryMinMaxCurvatureFlowImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/BilateralImageFilter.png + 6.0 + 5.0) +itk_add_test( + NAME + BinaryMinMaxCurvatureFlowImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/BinaryMinMaxCurvatureFlowImageFilter.png} + ${TEMP}/BinaryMinMaxCurvatureFlowImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/BinaryMinMaxCurvatureFlowImageFilter.png - 10 .125 1 128 -) -itk_add_test(NAME BinaryThresholdImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/BinaryThresholdImageFilter.png} - ${TEMP}/BinaryThresholdImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/BinaryMinMaxCurvatureFlowImageFilter.png + 10 + .125 + 1 + 128) +itk_add_test( + NAME + BinaryThresholdImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/BinaryThresholdImageFilter.png} + ${TEMP}/BinaryThresholdImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/BinaryThresholdImageFilter.png - 150 180 0 255 -) -itk_add_test(NAME BinaryMedianImageFilterTest1 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/BinaryMedianImageFilter1.png} - ${TEMP}/BinaryMedianImageFilter1.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/BinaryThresholdImageFilter.png + 150 + 180 + 0 + 255) +itk_add_test( + NAME + BinaryMedianImageFilterTest1 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/BinaryMedianImageFilter1.png} + ${TEMP}/BinaryMedianImageFilter1.png $ - DATA{${BASELINE}/BinaryThresholdImageFilter.png} - ${TEMP}/BinaryMedianImageFilter1.png - 1 1 -) -itk_add_test(NAME BinaryMedianImageFilterTest2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/BinaryMedianImageFilter2.png} - ${TEMP}/BinaryMedianImageFilter2.png + DATA{${BASELINE}/BinaryThresholdImageFilter.png} + ${TEMP}/BinaryMedianImageFilter1.png + 1 + 1) +itk_add_test( + NAME + BinaryMedianImageFilterTest2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/BinaryMedianImageFilter2.png} + ${TEMP}/BinaryMedianImageFilter2.png $ - DATA{${BASELINE}/BinaryThresholdImageFilter.png} - ${TEMP}/BinaryMedianImageFilter2.png - 2 2 -) -itk_add_test(NAME BinaryMedianImageFilterTest3 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/BinaryMedianImageFilter3.png} - ${TEMP}/BinaryMedianImageFilter3.png + DATA{${BASELINE}/BinaryThresholdImageFilter.png} + ${TEMP}/BinaryMedianImageFilter2.png + 2 + 2) +itk_add_test( + NAME + BinaryMedianImageFilterTest3 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/BinaryMedianImageFilter3.png} + ${TEMP}/BinaryMedianImageFilter3.png $ - DATA{${BASELINE}/BinaryThresholdImageFilter.png} - ${TEMP}/BinaryMedianImageFilter3.png - 3 3 -) -itk_add_test(NAME VotingBinaryHoleFillingImageFilterTest1 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/VotingBinaryHoleFillingImageFilter1.png} - ${TEMP}/VotingBinaryHoleFillingImageFilter1.png + DATA{${BASELINE}/BinaryThresholdImageFilter.png} + ${TEMP}/BinaryMedianImageFilter3.png + 3 + 3) +itk_add_test( + NAME + VotingBinaryHoleFillingImageFilterTest1 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/VotingBinaryHoleFillingImageFilter1.png} + ${TEMP}/VotingBinaryHoleFillingImageFilter1.png $ - DATA{${BASELINE}/BinaryThresholdImageFilter.png} - ${TEMP}/VotingBinaryHoleFillingImageFilter1.png - 1 1 -) -itk_add_test(NAME VotingBinaryHoleFillingImageFilterTest2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/VotingBinaryHoleFillingImageFilter2.png} - ${TEMP}/VotingBinaryHoleFillingImageFilter2.png + DATA{${BASELINE}/BinaryThresholdImageFilter.png} + ${TEMP}/VotingBinaryHoleFillingImageFilter1.png + 1 + 1) +itk_add_test( + NAME + VotingBinaryHoleFillingImageFilterTest2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/VotingBinaryHoleFillingImageFilter2.png} + ${TEMP}/VotingBinaryHoleFillingImageFilter2.png $ - DATA{${BASELINE}/BinaryThresholdImageFilter.png} - ${TEMP}/VotingBinaryHoleFillingImageFilter2.png - 2 2 -) -itk_add_test(NAME VotingBinaryHoleFillingImageFilterTest3 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/VotingBinaryHoleFillingImageFilter3.png} - ${TEMP}/VotingBinaryHoleFillingImageFilter3.png + DATA{${BASELINE}/BinaryThresholdImageFilter.png} + ${TEMP}/VotingBinaryHoleFillingImageFilter2.png + 2 + 2) +itk_add_test( + NAME + VotingBinaryHoleFillingImageFilterTest3 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/VotingBinaryHoleFillingImageFilter3.png} + ${TEMP}/VotingBinaryHoleFillingImageFilter3.png $ - DATA{${BASELINE}/BinaryThresholdImageFilter.png} - ${TEMP}/VotingBinaryHoleFillingImageFilter3.png - 3 3 -) -itk_add_test(NAME VotingBinaryIterativeHoleFillingImageFilterTest1 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/VotingBinaryIterativeHoleFillingImageFilter1.png} - ${TEMP}/VotingBinaryIterativeHoleFillingImageFilter1.png + DATA{${BASELINE}/BinaryThresholdImageFilter.png} + ${TEMP}/VotingBinaryHoleFillingImageFilter3.png + 3 + 3) +itk_add_test( + NAME + VotingBinaryIterativeHoleFillingImageFilterTest1 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/VotingBinaryIterativeHoleFillingImageFilter1.png} + ${TEMP}/VotingBinaryIterativeHoleFillingImageFilter1.png $ - DATA{${BASELINE}/BinaryThresholdImageFilter.png} - ${TEMP}/VotingBinaryIterativeHoleFillingImageFilter1.png - 1 1 10 -) -itk_add_test(NAME VotingBinaryIterativeHoleFillingImageFilterTest2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/VotingBinaryIterativeHoleFillingImageFilter2.png} - ${TEMP}/VotingBinaryIterativeHoleFillingImageFilter2.png + DATA{${BASELINE}/BinaryThresholdImageFilter.png} + ${TEMP}/VotingBinaryIterativeHoleFillingImageFilter1.png + 1 + 1 + 10) +itk_add_test( + NAME + VotingBinaryIterativeHoleFillingImageFilterTest2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/VotingBinaryIterativeHoleFillingImageFilter2.png} + ${TEMP}/VotingBinaryIterativeHoleFillingImageFilter2.png $ - DATA{${BASELINE}/BinaryThresholdImageFilter.png} - ${TEMP}/VotingBinaryIterativeHoleFillingImageFilter2.png - 2 2 10 -) -itk_add_test(NAME VotingBinaryIterativeHoleFillingImageFilterTest3 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/VotingBinaryIterativeHoleFillingImageFilter3.png} - ${TEMP}/VotingBinaryIterativeHoleFillingImageFilter3.png + DATA{${BASELINE}/BinaryThresholdImageFilter.png} + ${TEMP}/VotingBinaryIterativeHoleFillingImageFilter2.png + 2 + 2 + 10) +itk_add_test( + NAME + VotingBinaryIterativeHoleFillingImageFilterTest3 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/VotingBinaryIterativeHoleFillingImageFilter3.png} + ${TEMP}/VotingBinaryIterativeHoleFillingImageFilter3.png $ - DATA{${BASELINE}/BinaryThresholdImageFilter.png} - ${TEMP}/VotingBinaryIterativeHoleFillingImageFilter3.png - 3 3 10 -) -itk_add_test(NAME BinomialBlurImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/BinomialBlurImageFilter.png} - ${TEMP}/BinomialBlurImageFilter.png + DATA{${BASELINE}/BinaryThresholdImageFilter.png} + ${TEMP}/VotingBinaryIterativeHoleFillingImageFilter3.png + 3 + 3 + 10) +itk_add_test( + NAME + BinomialBlurImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/BinomialBlurImageFilter.png} + ${TEMP}/BinomialBlurImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/BinomialBlurImageFilter.png - 5 -) -itk_add_test(NAME CompositeFilterExampleTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{Baseline/CompositeFilterExample.mha} - ${TEMP}/CompositeFilterExample.mha + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/BinomialBlurImageFilter.png + 5) +itk_add_test( + NAME + CompositeFilterExampleTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{Baseline/CompositeFilterExample.mha} + ${TEMP}/CompositeFilterExample.mha $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/CompositeFilterExample.mha -) -itk_add_test(NAME CurvatureAnisotropicDiffusionImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/CurvatureAnisotropicDiffusionImageFilter.png,:} - ${TEMP}/CurvatureAnisotropicDiffusionImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/CompositeFilterExample.mha) +itk_add_test( + NAME + CurvatureAnisotropicDiffusionImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/CurvatureAnisotropicDiffusionImageFilter.png,:} + ${TEMP}/CurvatureAnisotropicDiffusionImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/CurvatureAnisotropicDiffusionImageFilter.png - 5 0.125 3 -) -itk_add_test(NAME CurvatureFlowImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/CurvatureFlowImageFilter.png} - ${TEMP}/CurvatureFlowImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/CurvatureAnisotropicDiffusionImageFilter.png + 5 + 0.125 + 3) +itk_add_test( + NAME + CurvatureFlowImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/CurvatureFlowImageFilter.png} + ${TEMP}/CurvatureFlowImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/CurvatureFlowImageFilter.png - 5 0.125 1.0 -) -itk_add_test(NAME DanielssonDistanceMapImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/DanielssonDistanceMapImageFilter.png} - ${TEMP}/DanielssonDistanceMapImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/CurvatureFlowImageFilter.png + 5 + 0.125 + 1.0) +itk_add_test( + NAME + DanielssonDistanceMapImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/DanielssonDistanceMapImageFilter.png} + ${TEMP}/DanielssonDistanceMapImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/FivePoints.png - ${TEMP}/DanielssonDistanceMapImageFilter.png - ${TEMP}/DanielssonDistanceMapImageFilter2.png - ${TEMP}/DanielssonDistanceMapImageFilter.mha -) -itk_add_test(NAME DiscreteGaussianImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/DiscreteGaussianImageFilter.png} - ${TEMP}/DiscreteGaussianImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/FivePoints.png + ${TEMP}/DanielssonDistanceMapImageFilter.png + ${TEMP}/DanielssonDistanceMapImageFilter2.png + ${TEMP}/DanielssonDistanceMapImageFilter.mha) +itk_add_test( + NAME + DiscreteGaussianImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/DiscreteGaussianImageFilter.png} + ${TEMP}/DiscreteGaussianImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/DiscreteGaussianImageFilter.png - 1.73 10 -) -itk_add_test(NAME GradientAnisotropicDiffusionImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/GradientAnisotropicDiffusionImageFilter.png} - ${TEMP}/GradientAnisotropicDiffusionImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/DiscreteGaussianImageFilter.png + 1.73 + 10) +itk_add_test( + NAME + GradientAnisotropicDiffusionImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/GradientAnisotropicDiffusionImageFilter.png} + ${TEMP}/GradientAnisotropicDiffusionImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/GradientAnisotropicDiffusionImageFilter.png - 5 0.125 1.0 -) -itk_add_test(NAME GradientMagnitudeImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/GradientMagnitudeImageFilter.png} - ${TEMP}/GradientMagnitudeImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/GradientAnisotropicDiffusionImageFilter.png + 5 + 0.125 + 1.0) +itk_add_test( + NAME + GradientMagnitudeImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/GradientMagnitudeImageFilter.png} + ${TEMP}/GradientMagnitudeImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/GradientMagnitudeImageFilter.png -) -itk_add_test(NAME GradientMagnitudeRecursiveGaussianImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/GradientMagnitudeRecursiveGaussianImageFilter.png} - ${TEMP}/GradientMagnitudeRecursiveGaussianImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/GradientMagnitudeImageFilter.png) +itk_add_test( + NAME + GradientMagnitudeRecursiveGaussianImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/GradientMagnitudeRecursiveGaussianImageFilter.png} + ${TEMP}/GradientMagnitudeRecursiveGaussianImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/GradientMagnitudeRecursiveGaussianImageFilter.png - 5 -) -itk_add_test(NAME GradientRecursiveGaussianImageFilterTest COMMAND ${ITK_TEST_DRIVER} + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/GradientMagnitudeRecursiveGaussianImageFilter.png + 5) +itk_add_test( + NAME + GradientRecursiveGaussianImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} $ - DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/HeadMRVolume.mhd,HeadMRVolume.raw} - ${TEMP}/GradientRecursiveGaussianImageFilterTest.mha - 1.5 # Sigma -) -itk_add_test(NAME GradientVectorFlowImageFilterTest COMMAND ${ITK_TEST_DRIVER} + DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${TEMP}/GradientRecursiveGaussianImageFilterTest.mha + 1.5 # Sigma +) +itk_add_test( + NAME + GradientVectorFlowImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} $ - DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/GradientRecursiveGaussianImageFilterTest.mha} - ${TEMP}/GradientVectorFlowImageFilterTest.mha - 5 # number of iterations - 2000.0 # noise level -) -set_tests_properties(GradientVectorFlowImageFilterTest - PROPERTIES DEPENDS GradientRecursiveGaussianImageFilterTest) -itk_add_test(NAME DerivativeImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/DerivativeImageFilter.mha} - ${TEMP}/DerivativeImageFilter.mha + DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/GradientRecursiveGaussianImageFilterTest.mha} + ${TEMP}/GradientVectorFlowImageFilterTest.mha + 5 # number of iterations + 2000.0 # noise level +) +set_tests_properties(GradientVectorFlowImageFilterTest PROPERTIES DEPENDS GradientRecursiveGaussianImageFilterTest) +itk_add_test( + NAME + DerivativeImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/DerivativeImageFilter.mha} + ${TEMP}/DerivativeImageFilter.mha $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/DerivativeImageFilter.mha - ${TEMP}/DerivativeImageFilter.png - 1 1 -) -itk_add_test(NAME LaplacianImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/LaplacianImageFilter.png,:} - ${TEMP}/LaplacianImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/DerivativeImageFilter.mha + ${TEMP}/DerivativeImageFilter.png + 1 + 1) +itk_add_test( + NAME + LaplacianImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/LaplacianImageFilter.png,:} + ${TEMP}/LaplacianImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/LaplacianImageFilter.png -) -itk_add_test(NAME LaplacianSharpeningImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/LaplacianSharpeningImageFilter.png,:} - ${TEMP}/LaplacianSharpeningImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/LaplacianImageFilter.png) +itk_add_test( + NAME + LaplacianSharpeningImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/LaplacianSharpeningImageFilter.png,:} + ${TEMP}/LaplacianSharpeningImageFilter.png $ - DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/cthead1.png} - ${TEMP}/LaplacianSharpeningImageFilter.png -) -itk_add_test(NAME MathematicalMorphologyBinaryFiltersTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/MathematicalMorphologyBinaryFiltersErode.png} - ${TEMP}/MathematicalMorphologyBinaryFiltersErode.png + DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/cthead1.png} + ${TEMP}/LaplacianSharpeningImageFilter.png) +itk_add_test( + NAME + MathematicalMorphologyBinaryFiltersTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/MathematicalMorphologyBinaryFiltersErode.png} + ${TEMP}/MathematicalMorphologyBinaryFiltersErode.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/MathematicalMorphologyBinaryFiltersErode.png - ${TEMP}/MathematicalMorphologyBinaryFiltersDilate.png - 150 180 -) -itk_add_test(NAME MathematicalMorphologyGrayscaleFiltersTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/MathematicalMorphologyGrayscaleFiltersErode.png} - ${TEMP}/MathematicalMorphologyGrayscaleFiltersErode.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/MathematicalMorphologyBinaryFiltersErode.png + ${TEMP}/MathematicalMorphologyBinaryFiltersDilate.png + 150 + 180) +itk_add_test( + NAME + MathematicalMorphologyGrayscaleFiltersTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/MathematicalMorphologyGrayscaleFiltersErode.png} + ${TEMP}/MathematicalMorphologyGrayscaleFiltersErode.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/MathematicalMorphologyGrayscaleFiltersErode.png - ${TEMP}/MathematicalMorphologyGrayscaleFiltersDilate.png -) -itk_add_test(NAME MeanImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/MeanImageFilter.png} - ${TEMP}/MeanImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/MathematicalMorphologyGrayscaleFiltersErode.png + ${TEMP}/MathematicalMorphologyGrayscaleFiltersDilate.png) +itk_add_test( + NAME + MeanImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/MeanImageFilter.png} + ${TEMP}/MeanImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/MeanImageFilter.png -) -itk_add_test(NAME MedianImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/MedianImageFilter.png} - ${TEMP}/MedianImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/MeanImageFilter.png) +itk_add_test( + NAME + MedianImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/MedianImageFilter.png} + ${TEMP}/MedianImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/MedianImageFilter.png - 1 -) -itk_add_test(NAME ResampleImageFilterTest1 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ResampleImageFilterTest1.png} - ${TEMP}/ResampleImageFilterTest1.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/MedianImageFilter.png + 1) +itk_add_test( + NAME + ResampleImageFilterTest1 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ResampleImageFilterTest1.png} + ${TEMP}/ResampleImageFilterTest1.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ResampleImageFilterTest1.png - 0 -) -itk_add_test(NAME ResampleOrientedImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ResampleOrientedImageFilterTest.png} - ${TEMP}/ResampleOrientedImageFilterTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ResampleImageFilterTest1.png + 0) +itk_add_test( + NAME + ResampleOrientedImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ResampleOrientedImageFilterTest.png} + ${TEMP}/ResampleOrientedImageFilterTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanHeadSlice.png - ${TEMP}/ResampleOrientedImageFilterTest.png - 0 1 1 0 -) -itk_add_test(NAME ResampleImageFilterTest2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ResampleImageFilterTest2.png} - ${TEMP}/ResampleImageFilterTest2.png + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanHeadSlice.png + ${TEMP}/ResampleOrientedImageFilterTest.png + 0 + 1 + 1 + 0) +itk_add_test( + NAME + ResampleImageFilterTest2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ResampleImageFilterTest2.png} + ${TEMP}/ResampleImageFilterTest2.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ResampleImageFilterTest2.png - 1 -) -itk_add_test(NAME ResampleImageFilterTest3 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ResampleImageFilterTest3.png} - ${TEMP}/ResampleImageFilterTest3.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ResampleImageFilterTest2.png + 1) +itk_add_test( + NAME + ResampleImageFilterTest3 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ResampleImageFilterTest3.png} + ${TEMP}/ResampleImageFilterTest3.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ResampleImageFilterTest3.png - 2 -) -itk_add_test(NAME ResampleImageFilterTest4 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ResampleImageFilterTest4.png} - ${TEMP}/ResampleImageFilterTest4.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ResampleImageFilterTest3.png + 2) +itk_add_test( + NAME + ResampleImageFilterTest4 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ResampleImageFilterTest4.png} + ${TEMP}/ResampleImageFilterTest4.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ResampleImageFilterTest4.png - 3 -) -itk_add_test(NAME ResampleImageFilter2Test1 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ResampleImageFilter2Test1.png} - ${TEMP}/ResampleImageFilter2Test1.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ResampleImageFilterTest4.png + 3) +itk_add_test( + NAME + ResampleImageFilter2Test1 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ResampleImageFilter2Test1.png} + ${TEMP}/ResampleImageFilter2Test1.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ResampleImageFilter2Test1.png - 0 -) -itk_add_test(NAME ResampleImageFilter2Test2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ResampleImageFilter2Test2.png} - ${TEMP}/ResampleImageFilter2Test2.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ResampleImageFilter2Test1.png + 0) +itk_add_test( + NAME + ResampleImageFilter2Test2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ResampleImageFilter2Test2.png} + ${TEMP}/ResampleImageFilter2Test2.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ResampleImageFilter2Test2.png - 1 -) -itk_add_test(NAME ResampleImageFilter2Test3 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ResampleImageFilter2Test3.png} - ${TEMP}/ResampleImageFilter2Test3.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ResampleImageFilter2Test2.png + 1) +itk_add_test( + NAME + ResampleImageFilter2Test3 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ResampleImageFilter2Test3.png} + ${TEMP}/ResampleImageFilter2Test3.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ResampleImageFilter2Test3.png - 2 -) -itk_add_test(NAME ResampleImageFilter2Test4 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ResampleImageFilter2Test4.png} - ${TEMP}/ResampleImageFilter2Test4.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ResampleImageFilter2Test3.png + 2) +itk_add_test( + NAME + ResampleImageFilter2Test4 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ResampleImageFilter2Test4.png} + ${TEMP}/ResampleImageFilter2Test4.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ResampleImageFilter2Test4.png - 3 -) -itk_add_test(NAME ResampleImageFilter2Test5 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ResampleImageFilter2Test5.png} - ${TEMP}/ResampleImageFilter2Test5.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ResampleImageFilter2Test4.png + 3) +itk_add_test( + NAME + ResampleImageFilter2Test5 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ResampleImageFilter2Test5.png} + ${TEMP}/ResampleImageFilter2Test5.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ResampleImageFilter2Test5.png - 3 -) -itk_add_test(NAME ResampleImageFilter3Test1 COMMAND ${ITK_TEST_DRIVER} - --compareNumberOfPixelsTolerance 4 - --compare DATA{${BASELINE}/ResampleImageFilter3Test1PixelCentered.png} - ${TEMP}/ResampleImageFilter3Test1PixelCentered.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ResampleImageFilter2Test5.png + 3) +itk_add_test( + NAME + ResampleImageFilter3Test1 + COMMAND + ${ITK_TEST_DRIVER} + --compareNumberOfPixelsTolerance + 4 + --compare + DATA{${BASELINE}/ResampleImageFilter3Test1PixelCentered.png} + ${TEMP}/ResampleImageFilter3Test1PixelCentered.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ResampleImageFilter3Test1PixelCentered.png - 0 -) + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ResampleImageFilter3Test1PixelCentered.png + 0) -itk_add_test(NAME ResampleImageFilter4Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ResampleImageFilter4TestPixelCentered.png} - ${TEMP}/ResampleImageFilter4TestPixelCentered.png +itk_add_test( + NAME + ResampleImageFilter4Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ResampleImageFilter4TestPixelCentered.png} + ${TEMP}/ResampleImageFilter4TestPixelCentered.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ResampleImageFilter4TestPixelCentered.png - 20 -) -itk_add_test(NAME ResampleImageFilter5Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ResampleImageFilter5TestPixelCentered.png} - ${TEMP}/ResampleImageFilter5TestPixelCentered.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ResampleImageFilter4TestPixelCentered.png + 20) +itk_add_test( + NAME + ResampleImageFilter5Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ResampleImageFilter5TestPixelCentered.png} + ${TEMP}/ResampleImageFilter5TestPixelCentered.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ResampleImageFilter5TestPixelCentered.png - 10 1.2 -) -itk_add_test(NAME ResampleImageFilter8Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ResampleImageFilter8TestPixelCentered.png} - ${TEMP}/ResampleImageFilter8TestPixelCentered.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ResampleImageFilter5TestPixelCentered.png + 10 + 1.2) +itk_add_test( + NAME + ResampleImageFilter8Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ResampleImageFilter8TestPixelCentered.png} + ${TEMP}/ResampleImageFilter8TestPixelCentered.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ResampleImageFilter8TestPixelCentered.png - 45 -) -itk_add_test(NAME ResampleImageFilter9Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ResampleImageFilter9TestPixelCentered.png,:} - ${TEMP}/ResampleImageFilter9TestNearestPixelCentered.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ResampleImageFilter8TestPixelCentered.png + 45) +itk_add_test( + NAME + ResampleImageFilter9Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ResampleImageFilter9TestPixelCentered.png,:} + ${TEMP}/ResampleImageFilter9TestNearestPixelCentered.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/ResampleImageFilter9TestNearestPixelCentered.png - ${TEMP}/ResampleImageFilter9TestLinearPixelCentered.png -) -itk_add_test(NAME SigmoidImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/SigmoidImageFilter.png,:} - ${TEMP}/SigmoidImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/ResampleImageFilter9TestNearestPixelCentered.png + ${TEMP}/ResampleImageFilter9TestLinearPixelCentered.png) +itk_add_test( + NAME + SigmoidImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/SigmoidImageFilter.png,:} + ${TEMP}/SigmoidImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/SigmoidImageFilter.png - 10 240 10 170 -) -itk_add_test(NAME SmoothingRecursiveGaussianImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/SmoothingRecursiveGaussianImageFilter.png} - ${TEMP}/SmoothingRecursiveGaussianImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/SigmoidImageFilter.png + 10 + 240 + 10 + 170) +itk_add_test( + NAME + SmoothingRecursiveGaussianImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/SmoothingRecursiveGaussianImageFilter.png} + ${TEMP}/SmoothingRecursiveGaussianImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/SmoothingRecursiveGaussianImageFilter.png - 3 -) -itk_add_test(NAME SmoothingRecursiveGaussianImageFilter2Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/SmoothingRecursiveGaussianImageFilter2.png} - ${TEMP}/SmoothingRecursiveGaussianImageFilter2.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/SmoothingRecursiveGaussianImageFilter.png + 3) +itk_add_test( + NAME + SmoothingRecursiveGaussianImageFilter2Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/SmoothingRecursiveGaussianImageFilter2.png} + ${TEMP}/SmoothingRecursiveGaussianImageFilter2.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/SmoothingRecursiveGaussianImageFilter2.png - 3 -) -itk_add_test(NAME ThresholdAboveBelowOutsideImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ThresholdAboveImageFilter.png} - ${TEMP}/ThresholdAboveImageFilter.png - --compare DATA{${BASELINE}/ThresholdBelowImageFilter.png} - ${TEMP}/ThresholdBelowImageFilter.png - --compare DATA{${BASELINE}/ThresholdOutsideImageFilter.png} - ${TEMP}/ThresholdOutsideImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/SmoothingRecursiveGaussianImageFilter2.png + 3) +itk_add_test( + NAME + ThresholdAboveBelowOutsideImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ThresholdAboveImageFilter.png} + ${TEMP}/ThresholdAboveImageFilter.png + --compare + DATA{${BASELINE}/ThresholdBelowImageFilter.png} + ${TEMP}/ThresholdBelowImageFilter.png + --compare + DATA{${BASELINE}/ThresholdOutsideImageFilter.png} + ${TEMP}/ThresholdOutsideImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ThresholdBelowImageFilter.png - ${TEMP}/ThresholdAboveImageFilter.png - ${TEMP}/ThresholdOutsideImageFilter.png -) -itk_add_test(NAME VectorGradientAnisotropicDiffusionImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/VectorGradientAnisotropicDiffusionImageFilter.png} - ${TEMP}/VectorGradientAnisotropicDiffusionImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ThresholdBelowImageFilter.png + ${TEMP}/ThresholdAboveImageFilter.png + ${TEMP}/ThresholdOutsideImageFilter.png) +itk_add_test( + NAME + VectorGradientAnisotropicDiffusionImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/VectorGradientAnisotropicDiffusionImageFilter.png} + ${TEMP}/VectorGradientAnisotropicDiffusionImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/VectorGradientAnisotropicDiffusionImageFilterOriginal.png - ${TEMP}/VectorGradientAnisotropicDiffusionImageFilter.png - 5 .124 -) -itk_add_test(NAME VectorCurvatureAnisotropicDiffusionImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/VectorCurvatureAnisotropicDiffusionImageFilter.png,:} - ${TEMP}/VectorCurvatureAnisotropicDiffusionImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/VectorGradientAnisotropicDiffusionImageFilterOriginal.png + ${TEMP}/VectorGradientAnisotropicDiffusionImageFilter.png + 5 + .124) +itk_add_test( + NAME + VectorCurvatureAnisotropicDiffusionImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/VectorCurvatureAnisotropicDiffusionImageFilter.png,:} + ${TEMP}/VectorCurvatureAnisotropicDiffusionImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/VectorCurvatureAnisotropicDiffusionImageFilterOriginal.png - ${TEMP}/VectorCurvatureAnisotropicDiffusionImageFilter.png - 5 0.124 -) -itk_add_test(NAME VectorIndexSelectionTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/VectorIndexSelection.png} - ${TEMP}/VectorIndexSelection.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/VectorCurvatureAnisotropicDiffusionImageFilterOriginal.png + ${TEMP}/VectorCurvatureAnisotropicDiffusionImageFilter.png + 5 + 0.124) +itk_add_test( + NAME + VectorIndexSelectionTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/VectorIndexSelection.png} + ${TEMP}/VectorIndexSelection.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/VectorIndexSelection.png - 1 -) -itk_add_test(NAME ZeroCrossingBasedEdgeDetectionImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ZeroCrossingBasedEdgeDetectionImageFilter1.png} - ${TEMP}/ZeroCrossingBasedEdgeDetectionImageFilter1.png + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/VectorIndexSelection.png + 1) +itk_add_test( + NAME + ZeroCrossingBasedEdgeDetectionImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ZeroCrossingBasedEdgeDetectionImageFilter1.png} + ${TEMP}/ZeroCrossingBasedEdgeDetectionImageFilter1.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ZeroCrossingBasedEdgeDetectionImageFilter1.png - 5.0 - 0.03 -) -itk_add_test(NAME RGBGradientAnisotropicDiffusionImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/RGBGradientAnisotropicDiffusionImageFilter.png} - ${TEMP}/RGBGradientAnisotropicDiffusionImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ZeroCrossingBasedEdgeDetectionImageFilter1.png + 5.0 + 0.03) +itk_add_test( + NAME + RGBGradientAnisotropicDiffusionImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/RGBGradientAnisotropicDiffusionImageFilter.png} + ${TEMP}/RGBGradientAnisotropicDiffusionImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/RGBGradientAnisotropicDiffusionImageFilter.png - 0.125 20 -) -itk_add_test(NAME RGBCurvatureAnisotropicDiffusionImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/RGBCurvatureAnisotropicDiffusionImageFilter.png,:} - ${TEMP}/RGBCurvatureAnisotropicDiffusionImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/RGBGradientAnisotropicDiffusionImageFilter.png + 0.125 + 20) +itk_add_test( + NAME + RGBCurvatureAnisotropicDiffusionImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/RGBCurvatureAnisotropicDiffusionImageFilter.png,:} + ${TEMP}/RGBCurvatureAnisotropicDiffusionImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/RGBCurvatureAnisotropicDiffusionImageFilter.png - 0.125 20 -) -itk_add_test(NAME MorphologicalImageEnhancementTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/MorphologicalImageEnhancement.png} - ${TEMP}/MorphologicalImageEnhancement.png + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/RGBCurvatureAnisotropicDiffusionImageFilter.png + 0.125 + 20) +itk_add_test( + NAME + MorphologicalImageEnhancementTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/MorphologicalImageEnhancement.png} + ${TEMP}/MorphologicalImageEnhancement.png $ - DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/peppers.png} - ${TEMP}/MorphologicalImageEnhancement.png - 3 -) -itk_add_test(NAME OtsuThresholdImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/OtsuThresholdImageFilter.png} - ${TEMP}/OtsuThresholdImageFilter.png + DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/peppers.png} + ${TEMP}/MorphologicalImageEnhancement.png + 3) +itk_add_test( + NAME + OtsuThresholdImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/OtsuThresholdImageFilter.png} + ${TEMP}/OtsuThresholdImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/OtsuThresholdImageFilter.png - 255 0 -) -itk_add_test(NAME OtsuMultipleThresholdImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/OtsuMultipleThresholdOutput002.png} - ${TEMP}/OtsuMultipleThresholdOutput002.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/OtsuThresholdImageFilter.png + 255 + 0) +itk_add_test( + NAME + OtsuMultipleThresholdImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/OtsuMultipleThresholdOutput002.png} + ${TEMP}/OtsuMultipleThresholdOutput002.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/OtsuMultipleThresholdOutput - png 3 -) -itk_add_test(NAME DigitallyReconstructedRadiograph1Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/DigitallyReconstructedRadiograph1.png} - ${TEMP}/DigitallyReconstructedRadiograph1.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/OtsuMultipleThresholdOutput + png + 3) +itk_add_test( + NAME + DigitallyReconstructedRadiograph1Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/DigitallyReconstructedRadiograph1.png} + ${TEMP}/DigitallyReconstructedRadiograph1.png $ - -o ${TEMP}/DigitallyReconstructedRadiograph1.png -) -itk_add_test(NAME AntiAliasBinaryImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/AntiAliasBinaryImageFilter.png} - ${TEMP}/AntiAliasBinaryImageFilter.png + -o + ${TEMP}/DigitallyReconstructedRadiograph1.png) +itk_add_test( + NAME + AntiAliasBinaryImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/AntiAliasBinaryImageFilter.png} + ${TEMP}/AntiAliasBinaryImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VentricleModel.png - ${TEMP}/AntiAliasBinaryImageFilterDoublePixelType.mha - ${TEMP}/AntiAliasBinaryImageFilter.png - .001 50 -) -itk_add_test(NAME CannyEdgeDetectionImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/CannyEdgeDetectionImageFilter.png} - ${TEMP}/CannyEdgeDetectionImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/VentricleModel.png + ${TEMP}/AntiAliasBinaryImageFilterDoublePixelType.mha + ${TEMP}/AntiAliasBinaryImageFilter.png + .001 + 50) +itk_add_test( + NAME + CannyEdgeDetectionImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/CannyEdgeDetectionImageFilter.png} + ${TEMP}/CannyEdgeDetectionImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/CannyEdgeDetectionImageFilter.png - 9 # Sigma - 0 # Upper Threshold - 0 # Lower Threshold -) -itk_add_test(NAME CannyEdgeDetectionImageFilterTest2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/CannyEdgeDetectionImageFilter2.png} - ${TEMP}/CannyEdgeDetectionImageFilter2.png + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/CannyEdgeDetectionImageFilter.png + 9 # Sigma + 0 # Upper Threshold + 0 # Lower Threshold +) +itk_add_test( + NAME + CannyEdgeDetectionImageFilterTest2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/CannyEdgeDetectionImageFilter2.png} + ${TEMP}/CannyEdgeDetectionImageFilter2.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/CannyEdgeDetectionImageFilter2.png - 9 # Sigma - 5 # Upper Threshold - 1 # Lower Threshold -) -itk_add_test(NAME FlipImageFilterTest1 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/FlipImageFilterX.png} - ${TEMP}/FlipImageFilterX.png + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/CannyEdgeDetectionImageFilter2.png + 9 # Sigma + 5 # Upper Threshold + 1 # Lower Threshold +) +itk_add_test( + NAME + FlipImageFilterTest1 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/FlipImageFilterX.png} + ${TEMP}/FlipImageFilterX.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/FlipImageFilterX.png - 1 0 -) -itk_add_test(NAME FlipImageFilterTest2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/FlipImageFilterY.png} - ${TEMP}/FlipImageFilterY.png + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/FlipImageFilterX.png + 1 + 0) +itk_add_test( + NAME + FlipImageFilterTest2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/FlipImageFilterY.png} + ${TEMP}/FlipImageFilterY.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/FlipImageFilterY.png - 0 1 -) -itk_add_test(NAME FlipImageFilterTest3 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/FlipImageFilterXY.png} - ${TEMP}/FlipImageFilterXY.png + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/FlipImageFilterY.png + 0 + 1) +itk_add_test( + NAME + FlipImageFilterTest3 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/FlipImageFilterXY.png} + ${TEMP}/FlipImageFilterXY.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/FlipImageFilterXY.png - 1 1 -) -itk_add_test(NAME GaussianBlurImageFunctionTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/GaussianBlurImageFunction.mha} - ${TEMP}/GaussianBlurImageFunction.mha + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/FlipImageFilterXY.png + 1 + 1) +itk_add_test( + NAME + GaussianBlurImageFunctionTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/GaussianBlurImageFunction.mha} + ${TEMP}/GaussianBlurImageFunction.mha $ - ${ITK_SOURCE_DIR}/Examples/Data/VentricleModel.png - ${TEMP}/GaussianBlurImageFunction.mha - 2 3 -) -itk_add_test(NAME FFTImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/FFTImageFilterReal.png} - ${TEMP}/FFTImageFilterReal.png + ${ITK_SOURCE_DIR}/Examples/Data/VentricleModel.png + ${TEMP}/GaussianBlurImageFunction.mha + 2 + 3) +itk_add_test( + NAME + FFTImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/FFTImageFilterReal.png} + ${TEMP}/FFTImageFilterReal.png $ - ${ITK_SOURCE_DIR}/Examples/Data/FatMRISlice.png - ${TEMP}/FFTImageFilterReal.png - ${TEMP}/FFTImageFilterImaginary.png - ${TEMP}/FFTImageFilterComplex.mhd -) -itk_add_test(NAME FFTDirectInverseTest COMMAND ${ITK_TEST_DRIVER} - --compare ${ITK_SOURCE_DIR}/Examples/Data/Point.png - ${TEMP}/FFTDirectInversePoint.png + ${ITK_SOURCE_DIR}/Examples/Data/FatMRISlice.png + ${TEMP}/FFTImageFilterReal.png + ${TEMP}/FFTImageFilterImaginary.png + ${TEMP}/FFTImageFilterComplex.mhd) +itk_add_test( + NAME + FFTDirectInverseTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + ${ITK_SOURCE_DIR}/Examples/Data/Point.png + ${TEMP}/FFTDirectInversePoint.png $ - ${ITK_SOURCE_DIR}/Examples/Data/Point.png - ${TEMP}/FFTDirectInversePoint.png -) + ${ITK_SOURCE_DIR}/Examples/Data/Point.png + ${TEMP}/FFTDirectInversePoint.png) if(ITK_USE_FFTWF) -#DATA{${BASELINE}/FFTDirectInverse2Point.png} - itk_add_test(NAME FFTDirectInverse2Test COMMAND ${ITK_TEST_DRIVER} - --compare ${ITK_SOURCE_DIR}/Examples/Data/Point.png - ${TEMP}/FFTDirectInverse2Point.png + #DATA{${BASELINE}/FFTDirectInverse2Point.png} + itk_add_test( + NAME + FFTDirectInverse2Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + ${ITK_SOURCE_DIR}/Examples/Data/Point.png + ${TEMP}/FFTDirectInverse2Point.png $ - ${ITK_SOURCE_DIR}/Examples/Data/Point.png - ${TEMP}/FFTDirectInverse2Point.png - ) + ${ITK_SOURCE_DIR}/Examples/Data/Point.png + ${TEMP}/FFTDirectInverse2Point.png) endif() -itk_add_test(NAME FFTImageFilterTest2 COMMAND ${ITK_TEST_DRIVER} +itk_add_test( + NAME + FFTImageFilterTest2 + COMMAND + ${ITK_TEST_DRIVER} $ - ${ITK_SOURCE_DIR}/Examples/Data/FFTcenteredDC.png - ${TEMP}/FFTImageFilterCenteredDCReal.png - ${TEMP}/FFTImageFilterCenteredDCImaginary.png - ${TEMP}/FFTImageFilterComplex2.mhd -) -itk_add_test(NAME FFTImageFilterTest3 COMMAND ${ITK_TEST_DRIVER} + ${ITK_SOURCE_DIR}/Examples/Data/FFTcenteredDC.png + ${TEMP}/FFTImageFilterCenteredDCReal.png + ${TEMP}/FFTImageFilterCenteredDCImaginary.png + ${TEMP}/FFTImageFilterComplex2.mhd) +itk_add_test( + NAME + FFTImageFilterTest3 + COMMAND + ${ITK_TEST_DRIVER} $ - ${ITK_SOURCE_DIR}/Examples/Data/FFTcorneredDC.png - ${TEMP}/FFTImageFilterCorneredDCReal.png - ${TEMP}/FFTImageFilterCorneredDCImaginary.png - ${TEMP}/FFTImageFilterComplex3.mhd -) -itk_add_test(NAME RGBToGrayscaleTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/RGBToGrayscale.png} - ${TEMP}/RGBToGrayscale.png + ${ITK_SOURCE_DIR}/Examples/Data/FFTcorneredDC.png + ${TEMP}/FFTImageFilterCorneredDCReal.png + ${TEMP}/FFTImageFilterCorneredDCImaginary.png + ${TEMP}/FFTImageFilterComplex3.mhd) +itk_add_test( + NAME + RGBToGrayscaleTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/RGBToGrayscale.png} + ${TEMP}/RGBToGrayscale.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanHeadSlice.png - ${TEMP}/RGBToGrayscale.png -) -itk_add_test(NAME LaplacianRecursiveGaussianImageFilter1Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/LaplacianRecursiveGaussianImageFilter1.mha} - ${TEMP}/LaplacianRecursiveGaussianImageFilter1.mha + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanHeadSlice.png + ${TEMP}/RGBToGrayscale.png) +itk_add_test( + NAME + LaplacianRecursiveGaussianImageFilter1Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/LaplacianRecursiveGaussianImageFilter1.mha} + ${TEMP}/LaplacianRecursiveGaussianImageFilter1.mha $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/LaplacianRecursiveGaussianImageFilter1.mha - 3 -) -itk_add_test(NAME LaplacianRecursiveGaussianImageFilter2Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/LaplacianRecursiveGaussianImageFilter2.mha} - ${TEMP}/LaplacianRecursiveGaussianImageFilter2.mha + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/LaplacianRecursiveGaussianImageFilter1.mha + 3) +itk_add_test( + NAME + LaplacianRecursiveGaussianImageFilter2Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/LaplacianRecursiveGaussianImageFilter2.mha} + ${TEMP}/LaplacianRecursiveGaussianImageFilter2.mha $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/LaplacianRecursiveGaussianImageFilter2.mha - 3 -) -itk_add_test(NAME ResampleImageFilter6Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ResampleImageFilter6PixelCentered.png} - ${TEMP}/ResampleImageFilter6PixelCentered.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/LaplacianRecursiveGaussianImageFilter2.mha + 3) +itk_add_test( + NAME + ResampleImageFilter6Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ResampleImageFilter6PixelCentered.png} + ${TEMP}/ResampleImageFilter6PixelCentered.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanHeadSlice.png - ${TEMP}/ResampleImageFilter6PixelCentered.png - 3 -) -itk_add_test(NAME ResampleImageFilter7Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ResampleImageFilter7PixelCentered.png} - ${TEMP}/ResampleImageFilter7PixelCentered.png - --compareNumberOfPixelsTolerance 1 + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanHeadSlice.png + ${TEMP}/ResampleImageFilter6PixelCentered.png + 3) +itk_add_test( + NAME + ResampleImageFilter7Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ResampleImageFilter7PixelCentered.png} + ${TEMP}/ResampleImageFilter7PixelCentered.png + --compareNumberOfPixelsTolerance + 1 $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanHeadSlice.png - ${TEMP}/ResampleImageFilter7PixelCentered.png - 33 -) + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanHeadSlice.png + ${TEMP}/ResampleImageFilter7PixelCentered.png + 33) # The data contained in ${ITK_DATA_ROOT}/Input/DicomSeries/ # is required by mri3D.mhd: @@ -629,62 +983,95 @@ itk_add_test(NAME ResampleImageFilter7Test COMMAND ${ITK_TEST_DRIVER} # Since DATA{} does not allow to specify an associated # file that is in a different directory, we call ExternalData_Expand_Arguments # manually to download the required files. -ExternalData_Expand_Arguments(ITKData - ExpandedData - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} - ) -itk_add_test(NAME ResampleVolumesToBeIsotropicTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ResampleVolumesToBeIsotropic.mha} - ${TEMP}/ResampleVolumesToBeIsotropic.mha +ExternalData_expand_arguments(ITKData ExpandedData DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm}) +itk_add_test( + NAME + ResampleVolumesToBeIsotropicTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ResampleVolumesToBeIsotropic.mha} + ${TEMP}/ResampleVolumesToBeIsotropic.mha $ - DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/mri3D.mhd} - ${TEMP}/ResampleVolumesToBeIsotropic.mha - 0 255 -) -itk_add_test(NAME ScaleSpaceGenerator2DTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ScaleSpaceGenerator2D005.mhd,ScaleSpaceGenerator2D005.raw} - ${TEMP}/ScaleSpaceGenerator2D005.mhd + DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/mri3D.mhd} + ${TEMP}/ResampleVolumesToBeIsotropic.mha + 0 + 255) +itk_add_test( + NAME + ScaleSpaceGenerator2DTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ScaleSpaceGenerator2D005.mhd,ScaleSpaceGenerator2D005.raw} + ${TEMP}/ScaleSpaceGenerator2D005.mhd $ - DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/cthead1.png} - ${TEMP}/ScaleSpaceGenerator2D - 10 -) -itk_add_test(NAME SubsampleVolumeTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/SubsampleVolume.mha} - ${TEMP}/SubsampleVolume.mha + DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/cthead1.png} + ${TEMP}/ScaleSpaceGenerator2D + 10) +itk_add_test( + NAME + SubsampleVolumeTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/SubsampleVolume.mha} + ${TEMP}/SubsampleVolume.mha $ - DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/HeadMRVolume.mhd,HeadMRVolume.raw} - ${TEMP}/SubsampleVolume.mha - 2 2 2 -) -itk_add_test(NAME SpatialObjectToImage1 COMMAND ${ITK_TEST_DRIVER} + DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${TEMP}/SubsampleVolume.mha + 2 + 2 + 2) +itk_add_test( + NAME + SpatialObjectToImage1 + COMMAND + ${ITK_TEST_DRIVER} $ - ${TEMP}/SpatialObjectToImage1.mha -) -itk_add_test(NAME SpatialObjectToImage2 COMMAND ${ITK_TEST_DRIVER} + ${TEMP}/SpatialObjectToImage1.mha) +itk_add_test( + NAME + SpatialObjectToImage2 + COMMAND + ${ITK_TEST_DRIVER} $ - ${TEMP}/SpatialObjectToImage2.mha -) -set_property(TEST SpatialObjectToImage2 APPEND PROPERTY LABELS RUNS_LONG) -itk_add_test(NAME SpatialObjectToImage3 COMMAND ${ITK_TEST_DRIVER} + ${TEMP}/SpatialObjectToImage2.mha) +set_property( + TEST SpatialObjectToImage2 + APPEND + PROPERTY LABELS RUNS_LONG) +itk_add_test( + NAME + SpatialObjectToImage3 + COMMAND + ${ITK_TEST_DRIVER} $ - ${TEMP}/SpatialObjectToImage3.mha -) + ${TEMP}/SpatialObjectToImage3.mha) # This test tests 3 filters. # DiffusionTensor3DReconstructionImageFilter # TensorFractionalAnisotropyImageFilter # TensorRelativeAnisotropyImageFilter # -itk_add_test(NAME DiffusionTensor3DReconstructionImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/Tensors.mhd,Tensors.raw} - ${TEMP}/Tensors.mhd - --compare DATA{${BASELINE}/FACorpusCallosum.mhd,FACorpusCallosum.raw} - ${TEMP}/FACorpusCallosum.mhd - --compare DATA{${BASELINE}/RACorpusCallosum.mhd,RACorpusCallosum.raw} - ${TEMP}/RACorpusCallosum.mhd +itk_add_test( + NAME + DiffusionTensor3DReconstructionImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/Tensors.mhd,Tensors.raw} + ${TEMP}/Tensors.mhd + --compare + DATA{${BASELINE}/FACorpusCallosum.mhd,FACorpusCallosum.raw} + ${TEMP}/FACorpusCallosum.mhd + --compare + DATA{${BASELINE}/RACorpusCallosum.mhd,RACorpusCallosum.raw} + ${TEMP}/RACorpusCallosum.mhd $ - DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/DwiCorpusCallosum.nhdr,DwiCorpusCallosum.raw} - 80 ${TEMP}/Tensors.mhd ${TEMP}/FACorpusCallosum.mhd - ${TEMP}/RACorpusCallosum.mhd 0 -) + DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/DwiCorpusCallosum.nhdr,DwiCorpusCallosum.raw} + 80 + ${TEMP}/Tensors.mhd + ${TEMP}/FACorpusCallosum.mhd + ${TEMP}/RACorpusCallosum.mhd + 0) diff --git a/Examples/IO/CMakeLists.txt b/Examples/IO/CMakeLists.txt index 4a09ecd997c..9cf308ef266 100644 --- a/Examples/IO/CMakeLists.txt +++ b/Examples/IO/CMakeLists.txt @@ -1,91 +1,91 @@ project(IOExamples) add_executable(ImageReadWrite ImageReadWrite.cxx) -target_link_libraries(ImageReadWrite ${ITK_LIBRARIES}) +target_link_libraries(ImageReadWrite ${ITK_LIBRARIES}) add_executable(ImageReadCastWrite ImageReadCastWrite.cxx) -target_link_libraries(ImageReadCastWrite ${ITK_LIBRARIES}) +target_link_libraries(ImageReadCastWrite ${ITK_LIBRARIES}) add_executable(ImageReadExtractFilterInsertWrite ImageReadExtractFilterInsertWrite.cxx) -target_link_libraries(ImageReadExtractFilterInsertWrite ${ITK_LIBRARIES}) +target_link_libraries(ImageReadExtractFilterInsertWrite ${ITK_LIBRARIES}) add_executable(ImageReadRegionOfInterestWrite ImageReadRegionOfInterestWrite.cxx) -target_link_libraries(ImageReadRegionOfInterestWrite ${ITK_LIBRARIES}) +target_link_libraries(ImageReadRegionOfInterestWrite ${ITK_LIBRARIES}) add_executable(RGBImageReadWrite RGBImageReadWrite.cxx) -target_link_libraries(RGBImageReadWrite ${ITK_LIBRARIES}) +target_link_libraries(RGBImageReadWrite ${ITK_LIBRARIES}) add_executable(CovariantVectorImageRead CovariantVectorImageRead.cxx) -target_link_libraries(CovariantVectorImageRead ${ITK_LIBRARIES}) +target_link_libraries(CovariantVectorImageRead ${ITK_LIBRARIES}) add_executable(CovariantVectorImageExtractComponent CovariantVectorImageExtractComponent.cxx) -target_link_libraries(CovariantVectorImageExtractComponent ${ITK_LIBRARIES}) +target_link_libraries(CovariantVectorImageExtractComponent ${ITK_LIBRARIES}) add_executable(VectorImageReadWrite VectorImageReadWrite.cxx) -target_link_libraries(VectorImageReadWrite ${ITK_LIBRARIES}) +target_link_libraries(VectorImageReadWrite ${ITK_LIBRARIES}) add_executable(ComplexImageReadWrite ComplexImageReadWrite.cxx) -target_link_libraries(ComplexImageReadWrite ${ITK_LIBRARIES}) +target_link_libraries(ComplexImageReadWrite ${ITK_LIBRARIES}) add_executable(ImageReadExportVTK ImageReadExportVTK.cxx) -target_link_libraries(ImageReadExportVTK ${ITK_LIBRARIES}) +target_link_libraries(ImageReadExportVTK ${ITK_LIBRARIES}) add_executable(RGBImageSeriesReadWrite RGBImageSeriesReadWrite.cxx) -target_link_libraries(RGBImageSeriesReadWrite ${ITK_LIBRARIES}) +target_link_libraries(RGBImageSeriesReadWrite ${ITK_LIBRARIES}) add_executable(ImageSeriesReadWrite ImageSeriesReadWrite.cxx) -target_link_libraries(ImageSeriesReadWrite ${ITK_LIBRARIES}) +target_link_libraries(ImageSeriesReadWrite ${ITK_LIBRARIES}) add_executable(ImageSeriesReadWrite2 ImageSeriesReadWrite2.cxx) -target_link_libraries(ImageSeriesReadWrite2 ${ITK_LIBRARIES}) +target_link_libraries(ImageSeriesReadWrite2 ${ITK_LIBRARIES}) add_executable(ImageReadImageSeriesWrite ImageReadImageSeriesWrite.cxx) -target_link_libraries(ImageReadImageSeriesWrite ${ITK_LIBRARIES}) +target_link_libraries(ImageReadImageSeriesWrite ${ITK_LIBRARIES}) add_executable(DicomSeriesReadImageWrite2 DicomSeriesReadImageWrite2.cxx) -target_link_libraries(DicomSeriesReadImageWrite2 ${ITK_LIBRARIES}) +target_link_libraries(DicomSeriesReadImageWrite2 ${ITK_LIBRARIES}) add_executable(DicomSeriesReadGaussianImageWrite DicomSeriesReadGaussianImageWrite.cxx) -target_link_libraries(DicomSeriesReadGaussianImageWrite ${ITK_LIBRARIES}) +target_link_libraries(DicomSeriesReadGaussianImageWrite ${ITK_LIBRARIES}) add_executable(DicomSeriesReadPrintTags DicomSeriesReadPrintTags.cxx) -target_link_libraries(DicomSeriesReadPrintTags ${ITK_LIBRARIES}) +target_link_libraries(DicomSeriesReadPrintTags ${ITK_LIBRARIES}) add_executable(DicomImageReadPrintTags DicomImageReadPrintTags.cxx) -target_link_libraries(DicomImageReadPrintTags ${ITK_LIBRARIES}) +target_link_libraries(DicomImageReadPrintTags ${ITK_LIBRARIES}) add_executable(DicomImageReadWrite DicomImageReadWrite.cxx) -target_link_libraries(DicomImageReadWrite ${ITK_LIBRARIES}) +target_link_libraries(DicomImageReadWrite ${ITK_LIBRARIES}) add_executable(ImageReadDicomSeriesWrite ImageReadDicomSeriesWrite.cxx) -target_link_libraries(ImageReadDicomSeriesWrite ${ITK_LIBRARIES}) +target_link_libraries(ImageReadDicomSeriesWrite ${ITK_LIBRARIES}) add_executable(DicomImageReadChangeHeaderWrite DicomImageReadChangeHeaderWrite.cxx) -target_link_libraries(DicomImageReadChangeHeaderWrite ${ITK_LIBRARIES}) +target_link_libraries(DicomImageReadChangeHeaderWrite ${ITK_LIBRARIES}) add_executable(DicomSeriesReadSeriesWrite DicomSeriesReadSeriesWrite.cxx) -target_link_libraries(DicomSeriesReadSeriesWrite ${ITK_LIBRARIES}) +target_link_libraries(DicomSeriesReadSeriesWrite ${ITK_LIBRARIES}) add_executable(DicomPrintPatientInformation DicomPrintPatientInformation.cxx) -target_link_libraries(DicomPrintPatientInformation ${ITK_LIBRARIES}) +target_link_libraries(DicomPrintPatientInformation ${ITK_LIBRARIES}) add_executable(TransformReadWrite TransformReadWrite.cxx) -target_link_libraries(TransformReadWrite ${ITK_LIBRARIES}) +target_link_libraries(TransformReadWrite ${ITK_LIBRARIES}) -add_executable(VisibleHumanStreamReadWrite VisibleHumanStreamReadWrite.cxx) -target_link_libraries(VisibleHumanStreamReadWrite ${ITK_LIBRARIES}) +add_executable(VisibleHumanStreamReadWrite VisibleHumanStreamReadWrite.cxx) +target_link_libraries(VisibleHumanStreamReadWrite ${ITK_LIBRARIES}) -add_executable(VisibleHumanPasteWrite VisibleHumanPasteWrite.cxx) -target_link_libraries(VisibleHumanPasteWrite ${ITK_LIBRARIES}) +add_executable(VisibleHumanPasteWrite VisibleHumanPasteWrite.cxx) +target_link_libraries(VisibleHumanPasteWrite ${ITK_LIBRARIES}) add_executable(CovariantVectorImageWrite CovariantVectorImageWrite.cxx) -target_link_libraries(CovariantVectorImageWrite ${ITK_LIBRARIES}) +target_link_libraries(CovariantVectorImageWrite ${ITK_LIBRARIES}) add_executable(ImageReadExtractWrite ImageReadExtractWrite.cxx) -target_link_libraries(ImageReadExtractWrite ${ITK_LIBRARIES}) +target_link_libraries(ImageReadExtractWrite ${ITK_LIBRARIES}) add_executable(IOPlugin IOPlugin.cxx) -target_link_libraries(IOPlugin ${ITK_LIBRARIES}) +target_link_libraries(IOPlugin ${ITK_LIBRARIES}) add_executable(IOFactoryRegistration IOFactoryRegistration.cxx) target_link_libraries(IOFactoryRegistration ${ITK_LIBRARIES}) diff --git a/Examples/IO/XML/CMakeLists.txt b/Examples/IO/XML/CMakeLists.txt index d23f5976e9a..9faec1481ea 100644 --- a/Examples/IO/XML/CMakeLists.txt +++ b/Examples/IO/XML/CMakeLists.txt @@ -1,12 +1,11 @@ - add_executable(DOMFindDemo DOMFindDemo.cxx) target_link_libraries(DOMFindDemo ${ITK_LIBRARIES}) -add_executable(ParticleSwarmOptimizerReadWrite +add_executable( + ParticleSwarmOptimizerReadWrite ParticleSwarmOptimizerReadWrite.cxx itkParticleSwarmOptimizerDOMReader.cxx itkParticleSwarmOptimizerDOMWriter.cxx itkParticleSwarmOptimizerSAXReader.cxx - itkParticleSwarmOptimizerSAXWriter.cxx - ) + itkParticleSwarmOptimizerSAXWriter.cxx) target_link_libraries(ParticleSwarmOptimizerReadWrite ${ITK_LIBRARIES}) diff --git a/Examples/IO/test/CMakeLists.txt b/Examples/IO/test/CMakeLists.txt index 4fed5d2be5f..9b5e0540ca4 100644 --- a/Examples/IO/test/CMakeLists.txt +++ b/Examples/IO/test/CMakeLists.txt @@ -1,34 +1,46 @@ set(TEMP ${ITK_BINARY_DIR}/Testing/Temporary) if(ITK_WRAP_PYTHON) - INTERSECTION(WRAP_2 2 "${ITK_WRAP_IMAGE_DIMS}") + intersection(WRAP_2 2 "${ITK_WRAP_IMAGE_DIMS}") - if(ITK_WRAP_signed_short AND ITK_WRAP_unsigned_char AND WRAP_2) - itk_python_add_test(NAME DicomSliceReadPythonTest + if(ITK_WRAP_signed_short + AND ITK_WRAP_unsigned_char + AND WRAP_2) + itk_python_add_test( + NAME + DicomSliceReadPythonTest TEST_DRIVER_ARGS - --compare ${TEMP}/DicomSliceReadPythonOutput.png - DATA{${ITK_SOURCE_DIR}/Examples/IO/test/Baseline/DicomSliceReadPythonOutputBaseline.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../DicomSliceRead.py - DATA{${ITK_DATA_ROOT}/Input/dicom-sc_cs-1.dcm} - ${TEMP}/DicomSliceReadPythonOutput.png - ) + --compare + ${TEMP}/DicomSliceReadPythonOutput.png + DATA{${ITK_SOURCE_DIR}/Examples/IO/test/Baseline/DicomSliceReadPythonOutputBaseline.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/../DicomSliceRead.py + DATA{${ITK_DATA_ROOT}/Input/dicom-sc_cs-1.dcm} + ${TEMP}/DicomSliceReadPythonOutput.png) endif() endif() if(ITK_BUILD_SHARED_LIBS) - itk_add_test(NAME ExampleIOPluginTest - COMMAND itkTestDriver --add-before-env ITK_AUTOLOAD_PATH "$" - "$" - "FileFreeIO::Size=128,256:Spacing=.5,.8:Origin=5,6:Direction=-1,0,0,-1" - "${ITK_TEST_OUTPUT_DIR}ExampleIOPluginTest.png" - ) - itk_add_test(NAME ExampleIOPluginTest2 - COMMAND itkTestDriver - "$" - "FileFreeIO::Size=128,256:Spacing=.5,.8:Origin=5,6:Direction=-1,0,0,-1" - "${ITK_TEST_OUTPUT_DIR}ExampleIOPluginTest2.png" - "$" - ) + itk_add_test( + NAME + ExampleIOPluginTest + COMMAND + itkTestDriver + --add-before-env + ITK_AUTOLOAD_PATH + "$" + "$" + "FileFreeIO::Size=128,256:Spacing=.5,.8:Origin=5,6:Direction=-1,0,0,-1" + "${ITK_TEST_OUTPUT_DIR}ExampleIOPluginTest.png") + itk_add_test( + NAME + ExampleIOPluginTest2 + COMMAND + itkTestDriver + "$" + "FileFreeIO::Size=128,256:Spacing=.5,.8:Origin=5,6:Direction=-1,0,0,-1" + "${ITK_TEST_OUTPUT_DIR}ExampleIOPluginTest2.png" + "$") endif() @@ -36,48 +48,51 @@ endif() # Please refer to CMake/UseITK.cmake for all the image IO registration handling. # Collecting image format's description into a string for verification -set(REGEX_IO_Factory_Description_First_Word "") +set(REGEX_IO_Factory_Description_First_Word "") foreach(ImageFormat ${LIST_OF_IMAGEIO_FORMATS}) - if (${${ImageFormat}_imageio_module_name}_ENABLED) - if (NOT REGEX_IO_Factory_Description_First_Word) - set (REGEX_IO_Factory_Description_First_Word ${ImageFormat}) + if(${${ImageFormat}_imageio_module_name}_ENABLED) + if(NOT REGEX_IO_Factory_Description_First_Word) + set(REGEX_IO_Factory_Description_First_Word ${ImageFormat}) else() - set (REGEX_IO_Factory_Description_First_Word"${REGEX_IO_Factory_Description_First_Word} ${ImageFormat}") + set(REGEX_IO_Factory_Description_First_Word"${REGEX_IO_Factory_Description_First_Word} ${ImageFormat}") endif() endif() endforeach() -itk_add_test(NAME ImageIOFactoryRegisterTest - COMMAND ${ITK_TEST_DRIVER} - $ - ) -set_tests_properties (ImageIOFactoryRegisterTest - PROPERTIES PASS_REGULAR_EXPRESSION ${REGEX_IO_Factory_Description_First_Word}) - +itk_add_test( + NAME + ImageIOFactoryRegisterTest + COMMAND + ${ITK_TEST_DRIVER} + $) +set_tests_properties(ImageIOFactoryRegisterTest PROPERTIES PASS_REGULAR_EXPRESSION + ${REGEX_IO_Factory_Description_First_Word}) if(ITK_VISIBLEHUMAN_DATA_ROOT) - itk_add_test(NAME VisibleHumanStreamReadWriteTest - COMMAND ${ITK_TEST_DRIVER} - $ + itk_add_test( + NAME + VisibleHumanStreamReadWriteTest + COMMAND + ${ITK_TEST_DRIVER} + $ ${ITK_VISIBLEHUMAN_DATA_ROOT}/Male/Fullcolor/fullbody/ ${TEMP}/VisibleHumanStreamReadWrite.mha) - itk_add_test(NAME VisibleHumanPasteWriteTest - COMMAND ${ITK_TEST_DRIVER} - $ + itk_add_test( + NAME + VisibleHumanPasteWriteTest + COMMAND + ${ITK_TEST_DRIVER} + $ ${TEMP}/VisibleHumanStreamReadWrite.mha ${TEMP}/VisibleHumanPasteWrite.mha) # this test must be run sequentially, be cause the output of the first is used by the second - set_tests_properties( - VisibleHumanStreamReadWriteTest - PROPERTIES - LABELS BigIO - ) - set_tests_properties( - VisibleHumanPasteWriteTest - PROPERTIES - DEPENDS VisibleHumanStreamReadWriteTest - ) + set_tests_properties(VisibleHumanStreamReadWriteTest PROPERTIES LABELS BigIO) + set_tests_properties(VisibleHumanPasteWriteTest PROPERTIES DEPENDS VisibleHumanStreamReadWriteTest) endif() -itk_add_test(NAME TransformReadWriteTest - COMMAND TransformReadWrite ${TEMP}/TransformReadWrite.h5) +itk_add_test( + NAME + TransformReadWriteTest + COMMAND + TransformReadWrite + ${TEMP}/TransformReadWrite.h5) diff --git a/Examples/Installation/CMakeLists.txt b/Examples/Installation/CMakeLists.txt index 11b718824ab..3f675b23d29 100644 --- a/Examples/Installation/CMakeLists.txt +++ b/Examples/Installation/CMakeLists.txt @@ -1,17 +1,17 @@ # This is the root ITK CMakeLists file. cmake_minimum_required(VERSION 3.16.3 FATAL_ERROR) -foreach(p - ## Only policies introduced after the cmake_minimum_required - ## version need to explicitly be set to NEW. - CMP0070 #3.10.0 Define ``file(GENERATE)`` behavior for relative paths. - CMP0071 #3.10.0 Let ``AUTOMOC`` and ``AUTOUIC`` process ``GENERATED`` files. - ) +foreach( + p + ## Only policies introduced after the cmake_minimum_required + ## version need to explicitly be set to NEW. + CMP0070 #3.10.0 Define ``file(GENERATE)`` behavior for relative paths. + CMP0071 #3.10.0 Let ``AUTOMOC`` and ``AUTOUIC`` process ``GENERATED`` files. +) if(POLICY ${p}) cmake_policy(SET ${p} NEW) endif() endforeach() - # This project is designed to be built outside the Insight source tree. project(HelloWorld) diff --git a/Examples/Iterators/test/CMakeLists.txt b/Examples/Iterators/test/CMakeLists.txt index f78358492e3..93ed0e523a4 100644 --- a/Examples/Iterators/test/CMakeLists.txt +++ b/Examples/Iterators/test/CMakeLists.txt @@ -1,36 +1,55 @@ set(BASELINE ${ITK_DATA_ROOT}/Baseline/Iterators) set(TEMP ${ITK_BINARY_DIR}/Testing/Temporary) -itk_add_test(NAME ImageLinearIteratorWithIndexTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageLinearIteratorWithIndexTest.png} - ${TEMP}/ImageLinearIteratorWithIndexTest.png +itk_add_test( + NAME + ImageLinearIteratorWithIndexTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageLinearIteratorWithIndexTest.png} + ${TEMP}/ImageLinearIteratorWithIndexTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/ImageLinearIteratorWithIndexTest.png -) + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/ImageLinearIteratorWithIndexTest.png) -itk_add_test(NAME ImageRegionIteratorWithIndexTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegionIteratorWithIndexTest.png} - ${TEMP}/ImageRegionIteratorWithIndexTest.png +itk_add_test( + NAME + ImageRegionIteratorWithIndexTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegionIteratorWithIndexTest.png} + ${TEMP}/ImageRegionIteratorWithIndexTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/ImageRegionIteratorWithIndexTest.png -) + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/ImageRegionIteratorWithIndexTest.png) -itk_add_test(NAME ImageRegionIteratorTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegionIteratorTest.png} - ${TEMP}/ImageRegionIteratorTest.png +itk_add_test( + NAME + ImageRegionIteratorTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegionIteratorTest.png} + ${TEMP}/ImageRegionIteratorTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/FatMRISlice.png - ${TEMP}/ImageRegionIteratorTest.png - 20 70 210 140 -) + ${ITK_SOURCE_DIR}/Examples/Data/FatMRISlice.png + ${TEMP}/ImageRegionIteratorTest.png + 20 + 70 + 210 + 140) -itk_add_test(NAME ImageSliceIteratorWithIndexTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageSliceIteratorWithIndexTest.mha} - ${TEMP}/ImageSliceIteratorWithIndexTest.mha - $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensity3Slices.mha - ${TEMP}/ImageSliceIteratorWithIndexTest.mha - 2 -) +itk_add_test( + NAME + ImageSliceIteratorWithIndexTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageSliceIteratorWithIndexTest.mha} + ${TEMP}/ImageSliceIteratorWithIndexTest.mha + $ + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensity3Slices.mha + ${TEMP}/ImageSliceIteratorWithIndexTest.mha + 2) diff --git a/Examples/RegistrationITKv4/CMakeLists.txt b/Examples/RegistrationITKv4/CMakeLists.txt index 385329ef8d9..499161ba54d 100644 --- a/Examples/RegistrationITKv4/CMakeLists.txt +++ b/Examples/RegistrationITKv4/CMakeLists.txt @@ -86,7 +86,7 @@ target_link_libraries(MultiStageImageRegistration1 ${ITK_LIBRARIES}) add_executable(MultiStageImageRegistration2 MultiStageImageRegistration2.cxx) target_link_libraries(MultiStageImageRegistration2 ${ITK_LIBRARIES}) -if (ITKFEMRegistration_ENABLED) +if(ITKFEMRegistration_ENABLED) add_executable(DeformableRegistration1 DeformableRegistration1.cxx) target_link_libraries(DeformableRegistration1 ${ITK_LIBRARIES}) @@ -157,16 +157,16 @@ target_link_libraries(ImageRegistration17 ${ITK_LIBRARIES}) add_executable(ImageRegistrationHistogramPlotter ImageRegistrationHistogramPlotter.cxx) target_link_libraries(ImageRegistrationHistogramPlotter ${ITK_LIBRARIES}) -add_executable(MeanSquaresImageMetric1 MeanSquaresImageMetric1.cxx) +add_executable(MeanSquaresImageMetric1 MeanSquaresImageMetric1.cxx) target_link_libraries(MeanSquaresImageMetric1 ${ITK_LIBRARIES}) -add_executable(IterativeClosestPoint1 IterativeClosestPoint1.cxx) +add_executable(IterativeClosestPoint1 IterativeClosestPoint1.cxx) target_link_libraries(IterativeClosestPoint1 ${ITK_LIBRARIES}) -add_executable(IterativeClosestPoint2 IterativeClosestPoint2.cxx) +add_executable(IterativeClosestPoint2 IterativeClosestPoint2.cxx) target_link_libraries(IterativeClosestPoint2 ${ITK_LIBRARIES}) -add_executable(IterativeClosestPoint3 IterativeClosestPoint3.cxx) +add_executable(IterativeClosestPoint3 IterativeClosestPoint3.cxx) target_link_libraries(IterativeClosestPoint3 ${ITK_LIBRARIES}) if(BUILD_TESTING) diff --git a/Examples/RegistrationITKv4/test/CMakeLists.txt b/Examples/RegistrationITKv4/test/CMakeLists.txt index 8665477ff93..db656132f15 100644 --- a/Examples/RegistrationITKv4/test/CMakeLists.txt +++ b/Examples/RegistrationITKv4/test/CMakeLists.txt @@ -1,743 +1,1116 @@ set(BASELINE ${ITK_DATA_ROOT}/Baseline/Registration) set(TEMP ${ITK_BINARY_DIR}/Testing/Temporary) -itk_add_test(NAME ImageRegistrationHistogramPlotterTest COMMAND ${ITK_TEST_DRIVER} - --compareNumberOfPixelsTolerance 30 - --compareIntensityTolerance 10 - --compareRadiusTolerance 10 - --compare DATA{${BASELINE}/JointEntropyHistogramAfterRegistration.png,:} - ${TEMP}/JointEntropyHistogramAfterRegistration.png +itk_add_test( + NAME + ImageRegistrationHistogramPlotterTest + COMMAND + ${ITK_TEST_DRIVER} + --compareNumberOfPixelsTolerance + 30 + --compareIntensityTolerance + 10 + --compareRadiusTolerance + 10 + --compare + DATA{${BASELINE}/JointEntropyHistogramAfterRegistration.png,:} + ${TEMP}/JointEntropyHistogramAfterRegistration.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/RegisteredImage.png - 0 - ${TEMP}/JointEntropyHistogramPriorToRegistration.png - ${TEMP}/JointEntropyHistogramAfterRegistration.png - 512 -) -set_property(TEST ImageRegistrationHistogramPlotterTest APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME ImageRegistration1Test1 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration1TestPixelCentered.png} - ${TEMP}/ImageRegistration1Test1PixelCentered.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/RegisteredImage.png + 0 + ${TEMP}/JointEntropyHistogramPriorToRegistration.png + ${TEMP}/JointEntropyHistogramAfterRegistration.png + 512) +set_property( + TEST ImageRegistrationHistogramPlotterTest + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + ImageRegistration1Test1 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration1TestPixelCentered.png} + ${TEMP}/ImageRegistration1Test1PixelCentered.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/ImageRegistration1Test1PixelCentered.png - ${TEMP}/ImageRegistration1DifferenceAfterTest1PixelCentered.png - ${TEMP}/ImageRegistration1DifferenceBeforeTest1PixelCentered.png -) - -itk_add_test(NAME ImageRegistration1Test2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration1TestPixelCentered.png} - ${TEMP}/ImageRegistration1Test2PixelCentered.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/ImageRegistration1Test1PixelCentered.png + ${TEMP}/ImageRegistration1DifferenceAfterTest1PixelCentered.png + ${TEMP}/ImageRegistration1DifferenceBeforeTest1PixelCentered.png) + +itk_add_test( + NAME + ImageRegistration1Test2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration1TestPixelCentered.png} + ${TEMP}/ImageRegistration1Test2PixelCentered.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/ImageRegistration1Test2PixelCentered.png - ${TEMP}/ImageRegistration1DifferenceAfterTest2PixelCentered.png - ${TEMP}/ImageRegistration1DifferenceBeforeTest2PixelCentered.png - 1 -) - -itk_add_test(NAME ImageRegistration2Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration2Test.png} - ${TEMP}/ImageRegistration2Test.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/ImageRegistration1Test2PixelCentered.png + ${TEMP}/ImageRegistration1DifferenceAfterTest2PixelCentered.png + ${TEMP}/ImageRegistration1DifferenceBeforeTest2PixelCentered.png + 1) + +itk_add_test( + NAME + ImageRegistration2Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration2Test.png} + ${TEMP}/ImageRegistration2Test.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/ImageRegistration2Test.png - ${TEMP}/ImageRegistration2BeforeTest.png - ${TEMP}/ImageRegistration2AfterTest.png -) -set_property(TEST ImageRegistration2Test APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME ImageRegistration3Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration3TestPixelCentered.png} - ${TEMP}/ImageRegistration3TestPixelCentered.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/ImageRegistration2Test.png + ${TEMP}/ImageRegistration2BeforeTest.png + ${TEMP}/ImageRegistration2AfterTest.png) +set_property( + TEST ImageRegistration2Test + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + ImageRegistration3Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration3TestPixelCentered.png} + ${TEMP}/ImageRegistration3TestPixelCentered.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/ImageRegistration3TestPixelCentered.png -) - -itk_add_test(NAME ImageRegistration4Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration4Test.png} - ${TEMP}/ImageRegistration4Test.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/ImageRegistration3TestPixelCentered.png) + +itk_add_test( + NAME + ImageRegistration4Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration4Test.png} + ${TEMP}/ImageRegistration4Test.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/ImageRegistration4Test.png 0 - ${TEMP}/ImageRegistration4BeforeTest.png - ${TEMP}/ImageRegistration4AfterTest.png - 24 -) - -itk_add_test(NAME ImageRegistration4Test2 COMMAND ${ITK_TEST_DRIVER} + ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/ImageRegistration4Test.png + 0 + ${TEMP}/ImageRegistration4BeforeTest.png + ${TEMP}/ImageRegistration4AfterTest.png + 24) + +itk_add_test( + NAME + ImageRegistration4Test2 + COMMAND + ${ITK_TEST_DRIVER} $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20Mask.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20Mask.png - ${TEMP}/ImageRegistration4Test2.png 0 - ${TEMP}/ImageRegistration4BeforeTest2.png - ${TEMP}/ImageRegistration4AfterTest2.png - 5 -) - -itk_add_test(NAME ImageRegistration5Test1 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration5Test1PixelCentered.png} - ${TEMP}/ImageRegistration5Test1PixelCentered.png - --compareNumberOfPixelsTolerance 115 + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20Mask.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20Mask.png + ${TEMP}/ImageRegistration4Test2.png + 0 + ${TEMP}/ImageRegistration4BeforeTest2.png + ${TEMP}/ImageRegistration4AfterTest2.png + 5) + +itk_add_test( + NAME + ImageRegistration5Test1 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration5Test1PixelCentered.png} + ${TEMP}/ImageRegistration5Test1PixelCentered.png + --compareNumberOfPixelsTolerance + 115 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceRotated10.png - ${TEMP}/ImageRegistration5Test1PixelCentered.png -) - -itk_add_test(NAME ImageRegistration5Test2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration5Test2PixelCentered.png} - ${TEMP}/ImageRegistration5Test2PixelCentered.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceRotated10.png + ${TEMP}/ImageRegistration5Test1PixelCentered.png) + +itk_add_test( + NAME + ImageRegistration5Test2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration5Test2PixelCentered.png} + ${TEMP}/ImageRegistration5Test2PixelCentered.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png - ${TEMP}/ImageRegistration5Test2PixelCentered.png - ${TEMP}/ImageRegistration5Test2DifferenceAfter.png - ${TEMP}/ImageRegistration5Test2DifferenceBefore.png - 1.3 -) - -itk_add_test(NAME ImageRegistration6Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration6TestPixelCentered.png} - ${TEMP}/ImageRegistration6TestPixelCentered.png - --compareNumberOfPixelsTolerance 100 + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png + ${TEMP}/ImageRegistration5Test2PixelCentered.png + ${TEMP}/ImageRegistration5Test2DifferenceAfter.png + ${TEMP}/ImageRegistration5Test2DifferenceBefore.png + 1.3) + +itk_add_test( + NAME + ImageRegistration6Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration6TestPixelCentered.png} + ${TEMP}/ImageRegistration6TestPixelCentered.png + --compareNumberOfPixelsTolerance + 100 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png - ${TEMP}/ImageRegistration6TestPixelCentered.png -) - -itk_add_test(NAME ImageRegistration7Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration7TestPixelCentered.png} - ${TEMP}/ImageRegistration7TestPixelCentered.png - --compareNumberOfPixelsTolerance 100 + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png + ${TEMP}/ImageRegistration6TestPixelCentered.png) + +itk_add_test( + NAME + ImageRegistration7Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration7TestPixelCentered.png} + ${TEMP}/ImageRegistration7TestPixelCentered.png + --compareNumberOfPixelsTolerance + 100 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17S12.png - ${TEMP}/ImageRegistration7TestPixelCentered.png - ${TEMP}/ImageRegistration7BeforeTestPixelCentered.png - ${TEMP}/ImageRegistration7AfterTestPixelCentered.png - 1.0 1.0 0.0 -) + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17S12.png + ${TEMP}/ImageRegistration7TestPixelCentered.png + ${TEMP}/ImageRegistration7BeforeTestPixelCentered.png + ${TEMP}/ImageRegistration7AfterTestPixelCentered.png + 1.0 + 1.0 + 0.0) if(ITK_USE_BRAINWEB_DATA) -## A test needed to prepare for making the latex documentation. -itk_add_test(NAME ConfidenceConnected3DTest COMMAND ${ITK_TEST_DRIVER} - $ - DATA{../../Data/BrainWeb/brainweb165a10f17.mha} - ${TEMP}/WhiteMatterSegmentation.mhd -) - -itk_add_test(NAME ImageRegistration8Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration8RegisteredSlice.png} - ${TEMP}/ImageRegistration8v4RegisteredSlice.png - $ - DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - DATA{../../Data/BrainWeb/brainweb1e1a10f20Rot10Tx15.mha} - ${TEMP}/ImageRegistration8v4Output.mhd - ${TEMP}/ImageRegistration8v4DifferenceBefore.mhd - ${TEMP}/ImageRegistration8v4DifferenceAfter.mhd - ${TEMP}/ImageRegistration8v4Output.png - ${TEMP}/ImageRegistration8v4DifferenceBefore.png - ${TEMP}/ImageRegistration8v4DifferenceAfter.png - ${TEMP}/ImageRegistration8v4RegisteredSlice.png -) -set_property(TEST ImageRegistration8Test APPEND PROPERTY LABELS RUNS_LONG) - -if(${CMAKE_BUILD_TYPE} MATCHES "Release") - # This test is computationally demanding. - # Therefore we only run it in a Release build - itk_add_test(NAME ImageRegistration20Test COMMAND ${ITK_TEST_DRIVER} - $ + ## A test needed to prepare for making the latex documentation. + itk_add_test( + NAME + ConfidenceConnected3DTest + COMMAND + ${ITK_TEST_DRIVER} + $ + DATA{../../Data/BrainWeb/brainweb165a10f17.mha} + ${TEMP}/WhiteMatterSegmentation.mhd) + + itk_add_test( + NAME + ImageRegistration8Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration8RegisteredSlice.png} + ${TEMP}/ImageRegistration8v4RegisteredSlice.png + $ + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + DATA{../../Data/BrainWeb/brainweb1e1a10f20Rot10Tx15.mha} + ${TEMP}/ImageRegistration8v4Output.mhd + ${TEMP}/ImageRegistration8v4DifferenceBefore.mhd + ${TEMP}/ImageRegistration8v4DifferenceAfter.mhd + ${TEMP}/ImageRegistration8v4Output.png + ${TEMP}/ImageRegistration8v4DifferenceBefore.png + ${TEMP}/ImageRegistration8v4DifferenceAfter.png + ${TEMP}/ImageRegistration8v4RegisteredSlice.png) + set_property( + TEST ImageRegistration8Test + APPEND + PROPERTY LABELS RUNS_LONG) + + if(${CMAKE_BUILD_TYPE} MATCHES "Release") + # This test is computationally demanding. + # Therefore we only run it in a Release build + itk_add_test( + NAME + ImageRegistration20Test + COMMAND + ${ITK_TEST_DRIVER} + $ DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} DATA{../../Data/BrainWeb/brainweb1e1a10f20Rot10Tx15.mha} ${TEMP}/ImageRegistration20Output.mhd ${TEMP}/ImageRegistration20DifferenceBefore.mhd ${TEMP}/ImageRegistration20DifferenceAfter.mhd - 0.1 # Step length - 300 # maximum number of iterations + 0.1 # Step length + 300 # maximum number of iterations ) - set_tests_properties(ImageRegistration20Test PROPERTIES RUN_SERIAL 1) -endif() + set_tests_properties(ImageRegistration20Test PROPERTIES RUN_SERIAL 1) + endif() endif() -itk_add_test(NAME ImageRegistration9Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration9TestPixelCentered.png} - ${TEMP}/ImageRegistration9TestPixelCentered.png - --compareNumberOfPixelsTolerance 50 +itk_add_test( + NAME + ImageRegistration9Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration9TestPixelCentered.png} + ${TEMP}/ImageRegistration9TestPixelCentered.png + --compareNumberOfPixelsTolerance + 50 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png - ${TEMP}/ImageRegistration9TestPixelCentered.png -) - -itk_add_test(NAME ImageRegistration10Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration10TestPixelCentered.png,:} - ${TEMP}/ImageRegistration10TestPixelCentered.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png + ${TEMP}/ImageRegistration9TestPixelCentered.png) + +itk_add_test( + NAME + ImageRegistration10Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration10TestPixelCentered.png,:} + ${TEMP}/ImageRegistration10TestPixelCentered.png $ - DATA{${ITK_SOURCE_DIR}/Testing/Data/Baseline/Segmentation/WatershedSegmentation1Test1.png} - DATA{${ITK_SOURCE_DIR}/Testing/Data/Baseline/Segmentation/WatershedSegmentation1Test2.png} - ${TEMP}/ImageRegistration10TestPixelCentered.png - ${TEMP}/ImageRegistration10DifferenceTestPixelCentered.png - -11 -13 -) - -itk_add_test(NAME ImageRegistration13Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration13TestPixelCentered.png} - ${TEMP}/ImageRegistration13TestPixelCentered.png - --compareNumberOfPixelsTolerance 35 + DATA{${ITK_SOURCE_DIR}/Testing/Data/Baseline/Segmentation/WatershedSegmentation1Test1.png} + DATA{${ITK_SOURCE_DIR}/Testing/Data/Baseline/Segmentation/WatershedSegmentation1Test2.png} + ${TEMP}/ImageRegistration10TestPixelCentered.png + ${TEMP}/ImageRegistration10DifferenceTestPixelCentered.png + -11 + -13) + +itk_add_test( + NAME + ImageRegistration13Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration13TestPixelCentered.png} + ${TEMP}/ImageRegistration13TestPixelCentered.png + --compareNumberOfPixelsTolerance + 35 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png - ${TEMP}/ImageRegistration13TestPixelCentered.png -) - -itk_add_test(NAME ImageRegistration14Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration14Test.png,:} - ${TEMP}/ImageRegistration14Test.png - --compareNumberOfPixelsTolerance 2000 + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png + ${TEMP}/ImageRegistration13TestPixelCentered.png) + +itk_add_test( + NAME + ImageRegistration14Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration14Test.png,:} + ${TEMP}/ImageRegistration14Test.png + --compareNumberOfPixelsTolerance + 2000 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png - ${TEMP}/ImageRegistration14Test.png 32 0.01 0.1 0.15 10.0 14.0 -) -set_property(TEST ImageRegistration14Test APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME ImageRegistration15Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration15TestPixelCentered.png} - ${TEMP}/ImageRegistration15TestPixelCentered.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png + ${TEMP}/ImageRegistration14Test.png + 32 + 0.01 + 0.1 + 0.15 + 10.0 + 14.0) +set_property( + TEST ImageRegistration14Test + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + ImageRegistration15Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration15TestPixelCentered.png} + ${TEMP}/ImageRegistration15TestPixelCentered.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/ImageRegistration15TestPixelCentered.png 32 0.1 0.05 0.0 0.0 -) -set_property(TEST ImageRegistration15Test APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME ImageRegistration16Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration16TestPixelCentered.png} - ${TEMP}/ImageRegistration16TestPixelCentered.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/ImageRegistration15TestPixelCentered.png + 32 + 0.1 + 0.05 + 0.0 + 0.0) +set_property( + TEST ImageRegistration15Test + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + ImageRegistration16Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration16TestPixelCentered.png} + ${TEMP}/ImageRegistration16TestPixelCentered.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/ImageRegistration16TestPixelCentered.png 0.0 0.0 -) - -itk_add_test(NAME ImageRegistration16Test2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration16TestPixelCentered.png} - ${TEMP}/ImageRegistration16Test2PixelCentered.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/ImageRegistration16TestPixelCentered.png + 0.0 + 0.0) + +itk_add_test( + NAME + ImageRegistration16Test2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration16TestPixelCentered.png} + ${TEMP}/ImageRegistration16Test2PixelCentered.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/ImageRegistration16Test2PixelCentered.png 0.0 0.0 - 0 -) - -itk_add_test(NAME ImageRegistration17Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration17TestPixelCentered.png,:} - ${TEMP}/ImageRegistration17TestPixelCentered.png - --compareNumberOfPixelsTolerance 5 + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/ImageRegistration16Test2PixelCentered.png + 0.0 + 0.0 + 0) + +itk_add_test( + NAME + ImageRegistration17Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration17TestPixelCentered.png,:} + ${TEMP}/ImageRegistration17TestPixelCentered.png + --compareNumberOfPixelsTolerance + 5 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/ImageRegistration17TestPixelCentered.png 0.0 0.0 -) - -itk_add_test(NAME ImageRegistration18Test COMMAND ImageRegistration18 - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/ImageRegistration18Test.png 0.0 0.0 + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/ImageRegistration17TestPixelCentered.png + 0.0 + 0.0) + +itk_add_test( + NAME + ImageRegistration18Test + COMMAND + ImageRegistration18 + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/ImageRegistration18Test.png + 0.0 + 0.0) + +itk_add_test( + NAME + ImageRegistration19Test + COMMAND + ImageRegistration19 + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20Mask.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20Mask.png + ${TEMP}/ImageRegistration19Test.png + ${TEMP}/ImageRegistration19DifferenceTest.png + 2.0 + 2.0 # Initial translation parameters ) -itk_add_test(NAME ImageRegistration19Test COMMAND ImageRegistration19 - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20Mask.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20Mask.png - ${TEMP}/ImageRegistration19Test.png - ${TEMP}/ImageRegistration19DifferenceTest.png - 2.0 2.0 # Initial translation parameters -) - -itk_add_test(NAME MultiResImageRegistration1Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/MultiResImageRegistration1Test.png,:} - ${TEMP}/MultiResImageRegistration1Test.png - --compareNumberOfPixelsTolerance 100 - --compareIntensityTolerance 7 +itk_add_test( + NAME + MultiResImageRegistration1Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/MultiResImageRegistration1Test.png,:} + ${TEMP}/MultiResImageRegistration1Test.png + --compareNumberOfPixelsTolerance + 100 + --compareIntensityTolerance + 7 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/MultiResImageRegistration1Test.png 100 - ${TEMP}/MultiResImageRegistration1CheckerBoardBeforeTest.png - ${TEMP}/MultiResImageRegistration1CheckerBoardAfterTest.png -) -set_property(TEST MultiResImageRegistration1Test APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME MultiResImageRegistration1Test2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/MultiResImageRegistration1Test.png,:} - ${TEMP}/MultiResImageRegistration1Test2.png - --compareNumberOfPixelsTolerance 100 - --compareIntensityTolerance 7 + ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/MultiResImageRegistration1Test.png + 100 + ${TEMP}/MultiResImageRegistration1CheckerBoardBeforeTest.png + ${TEMP}/MultiResImageRegistration1CheckerBoardAfterTest.png) +set_property( + TEST MultiResImageRegistration1Test + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + MultiResImageRegistration1Test2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/MultiResImageRegistration1Test.png,:} + ${TEMP}/MultiResImageRegistration1Test2.png + --compareNumberOfPixelsTolerance + 100 + --compareIntensityTolerance + 7 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/MultiResImageRegistration1Test2.png 100 - ${TEMP}/MultiResImageRegistration1CheckerBoardBeforeTest2.png - ${TEMP}/MultiResImageRegistration1CheckerBoardAfterTest2.png - 32 -) -set_property(TEST MultiResImageRegistration1Test2 APPEND PROPERTY LABELS RUNS_LONG) - - -itk_add_test(NAME MultiResImageRegistration2Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/MultiResImageRegistration2Test.png,:} - ${TEMP}/MultiResImageRegistration2Test.png - --compareNumberOfPixelsTolerance 10000 + ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/MultiResImageRegistration1Test2.png + 100 + ${TEMP}/MultiResImageRegistration1CheckerBoardBeforeTest2.png + ${TEMP}/MultiResImageRegistration1CheckerBoardAfterTest2.png + 32) +set_property( + TEST MultiResImageRegistration1Test2 + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + MultiResImageRegistration2Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/MultiResImageRegistration2Test.png,:} + ${TEMP}/MultiResImageRegistration2Test.png + --compareNumberOfPixelsTolerance + 10000 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/MultiResImageRegistration2Test.png 0 - ${TEMP}/MultiResImageRegistration2CheckerBoardBeforeTest.png - ${TEMP}/MultiResImageRegistration2CheckerBoardAfterTest.png -) -set_property(TEST MultiResImageRegistration2Test APPEND PROPERTY LABELS RUNS_LONG) - - -itk_add_test(NAME MultiResImageRegistration2Test2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/MultiResImageRegistration2Test.png,:} - ${TEMP}/MultiResImageRegistration2Test2.png - --compareNumberOfPixelsTolerance 10000 + ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/MultiResImageRegistration2Test.png + 0 + ${TEMP}/MultiResImageRegistration2CheckerBoardBeforeTest.png + ${TEMP}/MultiResImageRegistration2CheckerBoardAfterTest.png) +set_property( + TEST MultiResImageRegistration2Test + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + MultiResImageRegistration2Test2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/MultiResImageRegistration2Test.png,:} + ${TEMP}/MultiResImageRegistration2Test2.png + --compareNumberOfPixelsTolerance + 10000 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/MultiResImageRegistration2Test2.png 0 - ${TEMP}/MultiResImageRegistration2CheckerBoardBeforeTest2.png - ${TEMP}/MultiResImageRegistration2CheckerBoardAfterTest2.png - 0 -) -set_property(TEST MultiResImageRegistration2Test2 APPEND PROPERTY LABELS RUNS_LONG) - - -itk_add_test(NAME MultiStageImageRegistration1Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration9TestPixelCentered.png,:} - ${TEMP}/MultiStageImageRegistration1Test.png - --compareNumberOfPixelsTolerance 10000 + ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/MultiResImageRegistration2Test2.png + 0 + ${TEMP}/MultiResImageRegistration2CheckerBoardBeforeTest2.png + ${TEMP}/MultiResImageRegistration2CheckerBoardAfterTest2.png + 0) +set_property( + TEST MultiResImageRegistration2Test2 + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + MultiStageImageRegistration1Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration9TestPixelCentered.png,:} + ${TEMP}/MultiStageImageRegistration1Test.png + --compareNumberOfPixelsTolerance + 10000 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png - ${TEMP}/MultiStageImageRegistration1Test.png 100 - ${TEMP}/MultiStageImageRegistration1CheckerBoardBeforeTest.png - ${TEMP}/MultiStageImageRegistration1CheckerBoardAfterTest.png -) -set_property(TEST MultiStageImageRegistration1Test APPEND PROPERTY LABELS RUNS_LONG) - - -itk_add_test(NAME MultiStageImageRegistration2Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration9TestPixelCentered.png,:} - ${TEMP}/MultiStageImageRegistration2Test.png - --compareNumberOfPixelsTolerance 10000 + ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png + ${TEMP}/MultiStageImageRegistration1Test.png + 100 + ${TEMP}/MultiStageImageRegistration1CheckerBoardBeforeTest.png + ${TEMP}/MultiStageImageRegistration1CheckerBoardAfterTest.png) +set_property( + TEST MultiStageImageRegistration1Test + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + MultiStageImageRegistration2Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration9TestPixelCentered.png,:} + ${TEMP}/MultiStageImageRegistration2Test.png + --compareNumberOfPixelsTolerance + 10000 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png - ${TEMP}/MultiStageImageRegistration2Test.png 100 - ${TEMP}/MultiStageImageRegistration2CheckerBoardBeforeTest.png - ${TEMP}/MultiStageImageRegistration2CheckerBoardAfterTest.png -) -set_property(TEST MultiStageImageRegistration2Test APPEND PROPERTY LABELS RUNS_LONG) - - -itk_add_test(NAME DeformableRegistration2Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/DeformableRegistration2Test.png} - ${TEMP}/DeformableRegistration2Test.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png + ${TEMP}/MultiStageImageRegistration2Test.png + 100 + ${TEMP}/MultiStageImageRegistration2CheckerBoardBeforeTest.png + ${TEMP}/MultiStageImageRegistration2CheckerBoardAfterTest.png) +set_property( + TEST MultiStageImageRegistration2Test + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + DeformableRegistration2Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/DeformableRegistration2Test.png} + ${TEMP}/DeformableRegistration2Test.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBSplined10.png - ${TEMP}/DeformableRegistration2Test.png -) - -itk_add_test(NAME DeformableRegistration3Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/DeformableRegistration3Test.png,:} - ${TEMP}/DeformableRegistration3Test.png - --compareNumberOfPixelsTolerance 100 + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBSplined10.png + ${TEMP}/DeformableRegistration2Test.png) + +itk_add_test( + NAME + DeformableRegistration3Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/DeformableRegistration3Test.png,:} + ${TEMP}/DeformableRegistration3Test.png + --compareNumberOfPixelsTolerance + 100 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBSplined10.png - ${TEMP}/DeformableRegistration3Test.png -) - -itk_add_test(NAME DeformableRegistration4Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{Baseline/DeformableRegistration1v4Test.png} - ${TEMP}/DeformableRegistration4TestPixelCentered.png - --compareNumberOfPixelsTolerance 30 - --compareIntensityTolerance 10 + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBSplined10.png + ${TEMP}/DeformableRegistration3Test.png) + +itk_add_test( + NAME + DeformableRegistration4Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{Baseline/DeformableRegistration1v4Test.png} + ${TEMP}/DeformableRegistration4TestPixelCentered.png + --compareNumberOfPixelsTolerance + 30 + --compareIntensityTolerance + 10 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBSplined10.png - ${TEMP}/DeformableRegistration4TestPixelCentered.png -) - -itk_add_test(NAME DeformableRegistration5Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/DeformableRegistration5Test.png,:} - ${TEMP}/DeformableRegistration5Test.png - --compareNumberOfPixelsTolerance 100 - --compareIntensityTolerance 70 + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBSplined10.png + ${TEMP}/DeformableRegistration4TestPixelCentered.png) + +itk_add_test( + NAME + DeformableRegistration5Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/DeformableRegistration5Test.png,:} + ${TEMP}/DeformableRegistration5Test.png + --compareNumberOfPixelsTolerance + 100 + --compareIntensityTolerance + 70 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBSplined10.png - ${TEMP}/DeformableRegistration5Test.png -) - -itk_add_test(NAME DeformableRegistration6Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{Baseline/DeformableRegistration6v4Test.png} - ${TEMP}/DeformableRegistration6Test.png - --compareNumberOfPixelsTolerance 20 - --compareIntensityTolerance 70 + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBSplined10.png + ${TEMP}/DeformableRegistration5Test.png) + +itk_add_test( + NAME + DeformableRegistration6Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{Baseline/DeformableRegistration6v4Test.png} + ${TEMP}/DeformableRegistration6Test.png + --compareNumberOfPixelsTolerance + 20 + --compareIntensityTolerance + 70 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBSplined10.png - ${TEMP}/DeformableRegistration6Test.png -) -set_property(TEST DeformableRegistration6Test APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME BSplineWarping1Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{Baseline/BSplineWarping1Test.png} - ${TEMP}/BSplineWarping1Test.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBSplined10.png + ${TEMP}/DeformableRegistration6Test.png) +set_property( + TEST DeformableRegistration6Test + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + BSplineWarping1Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{Baseline/BSplineWarping1Test.png} + ${TEMP}/BSplineWarping1Test.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BSplineDisplacements1.txt - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${TEMP}/BSplineWarping1Test.png - ${TEMP}/BSplineWarping1TestDisplacementField.mhd - ${TEMP}/BSplineWarping1TestTransform.txt -) - -itk_add_test(NAME DeformableRegistration12Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{Baseline/DeformableRegistration12Test.png} - ${TEMP}/DeformableRegistration12Test.png - --compareNumberOfPixelsTolerance 600 + ${ITK_SOURCE_DIR}/Examples/Data/BSplineDisplacements1.txt + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${TEMP}/BSplineWarping1Test.png + ${TEMP}/BSplineWarping1TestDisplacementField.mhd + ${TEMP}/BSplineWarping1TestTransform.txt) + +itk_add_test( + NAME + DeformableRegistration12Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{Baseline/DeformableRegistration12Test.png} + ${TEMP}/DeformableRegistration12Test.png + --compareNumberOfPixelsTolerance + 600 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - DATA{Baseline/BSplineWarping1Test.png} - ${TEMP}/DeformableRegistration12Test.png - ${TEMP}/DeformableRegistration12TestDifferenceAfter.png - ${TEMP}/DeformableRegistration12TestDifferenceBefore.png - ${TEMP}/DeformableRegistration12TestDisplacementField.mhd - ${TEMP}/DeformableRegistration12TestFinalTransformParameters.txt -) -set_property(TEST DeformableRegistration12Test APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME DeformableRegistration13Test1 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{Baseline/DeformableRegistration13Test.png} - ${TEMP}/DeformableRegistration13Test1.png - --compareNumberOfPixelsTolerance 400 + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + DATA{Baseline/BSplineWarping1Test.png} + ${TEMP}/DeformableRegistration12Test.png + ${TEMP}/DeformableRegistration12TestDifferenceAfter.png + ${TEMP}/DeformableRegistration12TestDifferenceBefore.png + ${TEMP}/DeformableRegistration12TestDisplacementField.mhd + ${TEMP}/DeformableRegistration12TestFinalTransformParameters.txt) +set_property( + TEST DeformableRegistration12Test + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + DeformableRegistration13Test1 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{Baseline/DeformableRegistration13Test.png} + ${TEMP}/DeformableRegistration13Test1.png + --compareNumberOfPixelsTolerance + 400 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - DATA{Baseline/BSplineWarping1Test.png} - ${TEMP}/DeformableRegistration13Test1.png - ${TEMP}/DeformableRegistration13Test1DifferenceAfter.png - ${TEMP}/DeformableRegistration13Test1DifferenceBefore.png - ${TEMP}/DeformableRegistration13Test1DisplacementField.mhd - 0 0 - ${TEMP}/DeformableRegistration13Test1FinalTransformParameters.txt -) -set_property(TEST DeformableRegistration13Test1 APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME DeformableRegistration13Test2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{Baseline/DeformableRegistration13Test.png} - ${TEMP}/DeformableRegistration13Test2.png - --compareNumberOfPixelsTolerance 400 + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + DATA{Baseline/BSplineWarping1Test.png} + ${TEMP}/DeformableRegistration13Test1.png + ${TEMP}/DeformableRegistration13Test1DifferenceAfter.png + ${TEMP}/DeformableRegistration13Test1DifferenceBefore.png + ${TEMP}/DeformableRegistration13Test1DisplacementField.mhd + 0 + 0 + ${TEMP}/DeformableRegistration13Test1FinalTransformParameters.txt) +set_property( + TEST DeformableRegistration13Test1 + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + DeformableRegistration13Test2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{Baseline/DeformableRegistration13Test.png} + ${TEMP}/DeformableRegistration13Test2.png + --compareNumberOfPixelsTolerance + 400 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - DATA{Baseline/BSplineWarping1Test.png} - ${TEMP}/DeformableRegistration13Test2.png - ${TEMP}/DeformableRegistration13Test2DifferenceAfter.png - ${TEMP}/DeformableRegistration13Test2DifferenceBefore.png - ${TEMP}/DeformableRegistration13Test2DisplacementField.mhd - 0 1 - ${TEMP}/DeformableRegistration13Test2FinalTransformParameters.txt -) - -itk_add_test(NAME DeformableRegistration13Test3 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{Baseline/DeformableRegistration13Test.png} - ${TEMP}/DeformableRegistration13Test3.png - --compareNumberOfPixelsTolerance 400 + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + DATA{Baseline/BSplineWarping1Test.png} + ${TEMP}/DeformableRegistration13Test2.png + ${TEMP}/DeformableRegistration13Test2DifferenceAfter.png + ${TEMP}/DeformableRegistration13Test2DifferenceBefore.png + ${TEMP}/DeformableRegistration13Test2DisplacementField.mhd + 0 + 1 + ${TEMP}/DeformableRegistration13Test2FinalTransformParameters.txt) + +itk_add_test( + NAME + DeformableRegistration13Test3 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{Baseline/DeformableRegistration13Test.png} + ${TEMP}/DeformableRegistration13Test3.png + --compareNumberOfPixelsTolerance + 400 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - DATA{Baseline/BSplineWarping1Test.png} - ${TEMP}/DeformableRegistration13Test3.png - ${TEMP}/DeformableRegistration13Test3DifferenceAfter.png - ${TEMP}/DeformableRegistration13Test3DifferenceBefore.png - ${TEMP}/DeformableRegistration13Test3DisplacementField.mhd - 1 0 - ${TEMP}/DeformableRegistration13Test3FinalTransformParameters.txt -) -set_property(TEST DeformableRegistration13Test3 APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME DeformableRegistration13Test4 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{Baseline/DeformableRegistration13Test.png} - ${TEMP}/DeformableRegistration13Test4.png - --compareNumberOfPixelsTolerance 400 + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + DATA{Baseline/BSplineWarping1Test.png} + ${TEMP}/DeformableRegistration13Test3.png + ${TEMP}/DeformableRegistration13Test3DifferenceAfter.png + ${TEMP}/DeformableRegistration13Test3DifferenceBefore.png + ${TEMP}/DeformableRegistration13Test3DisplacementField.mhd + 1 + 0 + ${TEMP}/DeformableRegistration13Test3FinalTransformParameters.txt) +set_property( + TEST DeformableRegistration13Test3 + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + DeformableRegistration13Test4 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{Baseline/DeformableRegistration13Test.png} + ${TEMP}/DeformableRegistration13Test4.png + --compareNumberOfPixelsTolerance + 400 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - DATA{Baseline/BSplineWarping1Test.png} - ${TEMP}/DeformableRegistration13Test4.png - ${TEMP}/DeformableRegistration13Test4DifferenceAfter.png - ${TEMP}/DeformableRegistration13Test4DifferenceBefore.png - ${TEMP}/DeformableRegistration13Test4DisplacementField.mhd - 1 1 - ${TEMP}/DeformableRegistration13Test4FinalTransformParameters.txt -) + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + DATA{Baseline/BSplineWarping1Test.png} + ${TEMP}/DeformableRegistration13Test4.png + ${TEMP}/DeformableRegistration13Test4DifferenceAfter.png + ${TEMP}/DeformableRegistration13Test4DifferenceBefore.png + ${TEMP}/DeformableRegistration13Test4DisplacementField.mhd + 1 + 1 + ${TEMP}/DeformableRegistration13Test4FinalTransformParameters.txt) if(ITK_USE_BRAINWEB_DATA) - itk_add_test(NAME BSplineWarping2Test COMMAND ${ITK_TEST_DRIVER} + itk_add_test( + NAME + BSplineWarping2Test + COMMAND + ${ITK_TEST_DRIVER} $ - ${ITK_SOURCE_DIR}/Examples/Data/BSplineDisplacements2.txt - DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/BSplineWarping2TestDisplacementField.mhd - ${TEMP}/BSplineWarping2TestTransform.txt - ) - set_property(TEST BSplineWarping2Test APPEND PROPERTY LABELS RUNS_LONG) - set_property(TEST BSplineWarping2Test APPEND PROPERTY RUN_SERIAL True) + ${ITK_SOURCE_DIR}/Examples/Data/BSplineDisplacements2.txt + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/BSplineWarping2TestDisplacementField.mhd + ${TEMP}/BSplineWarping2TestTransform.txt) + set_property( + TEST BSplineWarping2Test + APPEND + PROPERTY LABELS RUNS_LONG) + set_property( + TEST BSplineWarping2Test + APPEND + PROPERTY RUN_SERIAL True) set(NUMBER_OF_BSPLINE_GRID_NODES 5) if(CTEST_TEST_TIMEOUT GREATER 3000) - itk_add_test(NAME DeformableRegistration8Test1 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/DeformableRegistration8Test1.mhd - --compareNumberOfPixelsTolerance 700000 - --compareIntensityTolerance 15 + itk_add_test( + NAME + DeformableRegistration8Test1 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/DeformableRegistration8Test1.mhd + --compareNumberOfPixelsTolerance + 700000 + --compareIntensityTolerance + 15 $ - DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration8Test1.mhd - ${TEMP}/DeformableRegistration8Test1DifferenceAfter.mhd - ${TEMP}/DeformableRegistration8Test1DifferenceBefore.mhd - ${TEMP}/DeformableRegistration8Test1DisplacementField.mhd - ${TEMP}/DeformableRegistration8Test1FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ${ITK_SOURCE_DIR}/Examples/Data/IdentityTransform.tfm - ) + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration8Test1.mhd + ${TEMP}/DeformableRegistration8Test1DifferenceAfter.mhd + ${TEMP}/DeformableRegistration8Test1DifferenceBefore.mhd + ${TEMP}/DeformableRegistration8Test1DisplacementField.mhd + ${TEMP}/DeformableRegistration8Test1FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES} + ${ITK_SOURCE_DIR}/Examples/Data/IdentityTransform.tfm) set_property(TEST DeformableRegistration8Test1 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST DeformableRegistration8Test1 APPEND PROPERTY LABELS RUNS_LONG) - - itk_add_test(NAME DeformableRegistration14Test1 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/DeformableRegistration14Test1.mhd - --compareNumberOfPixelsTolerance 700000 - --compareIntensityTolerance 15 + set_property( + TEST DeformableRegistration8Test1 + APPEND + PROPERTY LABELS RUNS_LONG) + + itk_add_test( + NAME + DeformableRegistration14Test1 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/DeformableRegistration14Test1.mhd + --compareNumberOfPixelsTolerance + 700000 + --compareIntensityTolerance + 15 $ - DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration14Test1.mhd - ${TEMP}/DeformableRegistration14Test1DifferenceAfter.mhd - ${TEMP}/DeformableRegistration14Test1DifferenceBefore.mhd - ${TEMP}/DeformableRegistration14Test1DisplacementField.mhd - 0 0 - ${TEMP}/DeformableRegistration14Test1FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ${ITK_SOURCE_DIR}/Examples/Data/IdentityTransform.tfm - 10.0 50 - ) + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration14Test1.mhd + ${TEMP}/DeformableRegistration14Test1DifferenceAfter.mhd + ${TEMP}/DeformableRegistration14Test1DifferenceBefore.mhd + ${TEMP}/DeformableRegistration14Test1DisplacementField.mhd + 0 + 0 + ${TEMP}/DeformableRegistration14Test1FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES} + ${ITK_SOURCE_DIR}/Examples/Data/IdentityTransform.tfm + 10.0 + 50) set_property(TEST DeformableRegistration14Test1 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST DeformableRegistration14Test1 APPEND PROPERTY LABELS RUNS_LONG) - - itk_add_test(NAME DeformableRegistration14Test2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/DeformableRegistration14Test2.mhd - --compareNumberOfPixelsTolerance 700000 - --compareIntensityTolerance 15 + set_property( + TEST DeformableRegistration14Test1 + APPEND + PROPERTY LABELS RUNS_LONG) + + itk_add_test( + NAME + DeformableRegistration14Test2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/DeformableRegistration14Test2.mhd + --compareNumberOfPixelsTolerance + 700000 + --compareIntensityTolerance + 15 $ - DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration14Test2.mhd - ${TEMP}/DeformableRegistration14Test2DifferenceAfter.mhd - ${TEMP}/DeformableRegistration14Test2DifferenceBefore.mhd - ${TEMP}/DeformableRegistration14Test2DisplacementField.mhd - 0 1 - ${TEMP}/DeformableRegistration14Test2FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ${ITK_SOURCE_DIR}/Examples/Data/IdentityTransform.tfm - 10.0 50 - ) + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration14Test2.mhd + ${TEMP}/DeformableRegistration14Test2DifferenceAfter.mhd + ${TEMP}/DeformableRegistration14Test2DifferenceBefore.mhd + ${TEMP}/DeformableRegistration14Test2DisplacementField.mhd + 0 + 1 + ${TEMP}/DeformableRegistration14Test2FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES} + ${ITK_SOURCE_DIR}/Examples/Data/IdentityTransform.tfm + 10.0 + 50) set_property(TEST DeformableRegistration14Test2 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST DeformableRegistration14Test2 APPEND PROPERTY LABELS RUNS_LONG) - - itk_add_test(NAME DeformableRegistration14Test3 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/DeformableRegistration14Test3.mhd - --compareNumberOfPixelsTolerance 700000 - --compareIntensityTolerance 15 + set_property( + TEST DeformableRegistration14Test2 + APPEND + PROPERTY LABELS RUNS_LONG) + + itk_add_test( + NAME + DeformableRegistration14Test3 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/DeformableRegistration14Test3.mhd + --compareNumberOfPixelsTolerance + 700000 + --compareIntensityTolerance + 15 $ - DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration14Test3.mhd - ${TEMP}/DeformableRegistration14Test3DifferenceAfter.mhd - ${TEMP}/DeformableRegistration14Test3DifferenceBefore.mhd - ${TEMP}/DeformableRegistration14Test3DisplacementField.mhd - 1 0 - ${TEMP}/DeformableRegistration14Test3FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ${ITK_SOURCE_DIR}/Examples/Data/IdentityTransform.tfm - 10.0 50 - ) + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration14Test3.mhd + ${TEMP}/DeformableRegistration14Test3DifferenceAfter.mhd + ${TEMP}/DeformableRegistration14Test3DifferenceBefore.mhd + ${TEMP}/DeformableRegistration14Test3DisplacementField.mhd + 1 + 0 + ${TEMP}/DeformableRegistration14Test3FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES} + ${ITK_SOURCE_DIR}/Examples/Data/IdentityTransform.tfm + 10.0 + 50) set_property(TEST DeformableRegistration14Test3 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST DeformableRegistration14Test3 APPEND PROPERTY LABELS RUNS_LONG) - - itk_add_test(NAME DeformableRegistration14Test4 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/DeformableRegistration14Test4.mhd - --compareNumberOfPixelsTolerance 700000 - --compareIntensityTolerance 15 + set_property( + TEST DeformableRegistration14Test3 + APPEND + PROPERTY LABELS RUNS_LONG) + + itk_add_test( + NAME + DeformableRegistration14Test4 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/DeformableRegistration14Test4.mhd + --compareNumberOfPixelsTolerance + 700000 + --compareIntensityTolerance + 15 $ - DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration14Test4.mhd - ${TEMP}/DeformableRegistration14Test4DifferenceAfter.mhd - ${TEMP}/DeformableRegistration14Test4DifferenceBefore.mhd - ${TEMP}/DeformableRegistration14Test4DisplacementField.mhd - 1 1 - ${TEMP}/DeformableRegistration14Test4FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ${ITK_SOURCE_DIR}/Examples/Data/IdentityTransform.tfm - 10.0 50 - ) + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration14Test4.mhd + ${TEMP}/DeformableRegistration14Test4DifferenceAfter.mhd + ${TEMP}/DeformableRegistration14Test4DifferenceBefore.mhd + ${TEMP}/DeformableRegistration14Test4DisplacementField.mhd + 1 + 1 + ${TEMP}/DeformableRegistration14Test4FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES} + ${ITK_SOURCE_DIR}/Examples/Data/IdentityTransform.tfm + 10.0 + 50) set_property(TEST DeformableRegistration14Test4 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST DeformableRegistration14Test4 APPEND PROPERTY LABELS RUNS_LONG) + set_property( + TEST DeformableRegistration14Test4 + APPEND + PROPERTY LABELS RUNS_LONG) endif() # CTEST_TEST_TIMEOUT GREATER 3000 - itk_add_test(NAME ChangeInformationTest1 COMMAND ${ITK_TEST_DRIVER} - $ - DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplinedTranlatedScaledRotated.mhd - 1.05 - 1.0 2.0 0.0 - 10.0 - ) + itk_add_test( + NAME + ChangeInformationTest1 + COMMAND + ${ITK_TEST_DRIVER} + $ + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplinedTranlatedScaledRotated.mhd + 1.05 + 1.0 + 2.0 + 0.0 + 10.0) if(CTEST_TEST_TIMEOUT GREATER 10000) - itk_add_test(NAME DeformableRegistration15Test1 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/DeformableRegistration15Test1.mhd - --compareNumberOfPixelsTolerance 700000 - --compareIntensityTolerance 15 + itk_add_test( + NAME + DeformableRegistration15Test1 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/DeformableRegistration15Test1.mhd + --compareNumberOfPixelsTolerance + 700000 + --compareIntensityTolerance + 15 $ - DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplinedTranlatedScaledRotated.mhd - ${TEMP}/DeformableRegistration15Test1.mhd - ${TEMP}/DeformableRegistration15Test1DifferenceAfter.mhd - ${TEMP}/DeformableRegistration15Test1DifferenceBefore.mhd - ${TEMP}/DeformableRegistration15Test1DisplacementField.mhd - 0 0 - ${TEMP}/DeformableRegistration15Test1FinalTransformParameters.txt - 5 100 - 10.0 50 - ) + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplinedTranlatedScaledRotated.mhd + ${TEMP}/DeformableRegistration15Test1.mhd + ${TEMP}/DeformableRegistration15Test1DifferenceAfter.mhd + ${TEMP}/DeformableRegistration15Test1DifferenceBefore.mhd + ${TEMP}/DeformableRegistration15Test1DisplacementField.mhd + 0 + 0 + ${TEMP}/DeformableRegistration15Test1FinalTransformParameters.txt + 5 + 100 + 10.0 + 50) set_property(TEST DeformableRegistration15Test1 PROPERTY DEPENDS ChangeInformationTest1) - set_property(TEST DeformableRegistration15Test1 APPEND PROPERTY LABELS RUNS_LONG) + set_property( + TEST DeformableRegistration15Test1 + APPEND + PROPERTY LABELS RUNS_LONG) endif() if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 6) set(NUMBER_OF_BSPLINE_GRID_NODES 32) - itk_add_test(NAME DeformableRegistration8Test2 COMMAND ${ITK_TEST_DRIVER} + itk_add_test( + NAME + DeformableRegistration8Test2 + COMMAND + ${ITK_TEST_DRIVER} $ - DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration8Test2.mhd - ${TEMP}/DeformableRegistration8Test2DifferenceAfter.mhd - ${TEMP}/DeformableRegistration8Test2DifferenceBefore.mhd - ${TEMP}/DeformableRegistration8Test2DisplacementField.mhd - ${TEMP}/DeformableRegistration8Test2FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ) + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration8Test2.mhd + ${TEMP}/DeformableRegistration8Test2DifferenceAfter.mhd + ${TEMP}/DeformableRegistration8Test2DifferenceBefore.mhd + ${TEMP}/DeformableRegistration8Test2DisplacementField.mhd + ${TEMP}/DeformableRegistration8Test2FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES}) set_property(TEST DeformableRegistration8Test2 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST DeformableRegistration8Test2 APPEND PROPERTY LABELS RUNS_LONG) + set_property( + TEST DeformableRegistration8Test2 + APPEND + PROPERTY LABELS RUNS_LONG) set(NUMBER_OF_BSPLINE_GRID_NODES 100) - itk_add_test(NAME DeformableRegistration8Test3 COMMAND ${ITK_TEST_DRIVER} + itk_add_test( + NAME + DeformableRegistration8Test3 + COMMAND + ${ITK_TEST_DRIVER} $ - DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration8Test3.mhd - ${TEMP}/DeformableRegistration8Test3DifferenceAfter.mhd - ${TEMP}/DeformableRegistration8Test3DifferenceBefore.mhd - ${TEMP}/DeformableRegistration8Test3DisplacementField.mhd - ${TEMP}/DeformableRegistration8Test3FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ) + DATA{../../Data/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration8Test3.mhd + ${TEMP}/DeformableRegistration8Test3DifferenceAfter.mhd + ${TEMP}/DeformableRegistration8Test3DifferenceBefore.mhd + ${TEMP}/DeformableRegistration8Test3DisplacementField.mhd + ${TEMP}/DeformableRegistration8Test3FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES}) set_property(TEST DeformableRegistration8Test3 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST DeformableRegistration8Test3 APPEND PROPERTY LABELS RUNS_LONG) + set_property( + TEST DeformableRegistration8Test3 + APPEND + PROPERTY LABELS RUNS_LONG) # Due to the large memory requirements this tests must be run one by one - set_tests_properties( - DeformableRegistration8Test2 - DeformableRegistration8Test3 - PROPERTIES - RESOURCE_LOCK MEMORY_SIZE - ) + set_tests_properties(DeformableRegistration8Test2 DeformableRegistration8Test3 PROPERTIES RESOURCE_LOCK MEMORY_SIZE) endif() # ITK_COMPUTER_MEMORY_SIZE GREATER 6 endif() # ITK_USE_BRAINWEB_DATA - if(ITK_MRI_UNC_DATABASE_DATA_ROOT) -if(CTEST_TEST_TIMEOUT GREATER 10000) - itk_add_test(NAME DeformableRegistration15Test2 COMMAND ${ITK_TEST_DRIVER} - $ - ${ITK_MRI_UNC_DATABASE_DATA_ROOT}/b/I.hdr - ${ITK_MRI_UNC_DATABASE_DATA_ROOT}/d/I.hdr - ${TEMP}/DeformableRegistration15Test2.mhd - ${TEMP}/DeformableRegistration15Test2DifferenceAfter.mhd - ${TEMP}/DeformableRegistration15Test2DifferenceBefore.mhd - ${TEMP}/DeformableRegistration15Test2DisplacementField.mhd - 0 0 - ${TEMP}/DeformableRegistration15Test2FinalTransformParameters.txt - 5 100 - 10.0 50 - ) - set_property(TEST DeformableRegistration15Test2 APPEND PROPERTY LABELS RUNS_LONG) -endif() + if(CTEST_TEST_TIMEOUT GREATER 10000) + itk_add_test( + NAME + DeformableRegistration15Test2 + COMMAND + ${ITK_TEST_DRIVER} + $ + ${ITK_MRI_UNC_DATABASE_DATA_ROOT}/b/I.hdr + ${ITK_MRI_UNC_DATABASE_DATA_ROOT}/d/I.hdr + ${TEMP}/DeformableRegistration15Test2.mhd + ${TEMP}/DeformableRegistration15Test2DifferenceAfter.mhd + ${TEMP}/DeformableRegistration15Test2DifferenceBefore.mhd + ${TEMP}/DeformableRegistration15Test2DisplacementField.mhd + 0 + 0 + ${TEMP}/DeformableRegistration15Test2FinalTransformParameters.txt + 5 + 100 + 10.0 + 50) + set_property( + TEST DeformableRegistration15Test2 + APPEND + PROPERTY LABELS RUNS_LONG) + endif() endif() - -itk_add_test(NAME LandmarkWarping2Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/LandmarkWarping2Test.png} - ${TEMP}/LandmarkWarping2Test.png +itk_add_test( + NAME + LandmarkWarping2Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/LandmarkWarping2Test.png} + ${TEMP}/LandmarkWarping2Test.png $ - ${ITK_SOURCE_DIR}/Examples/Data/LandmarkWarping2Landmarks1.txt - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${TEMP}/LandmarkWarping2Test.png -) -itk_add_test(NAME ImageRegistration12Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration12TestPixelCentered.png} - ${TEMP}/ImageRegistration12TestPixelCentered.png - --compareNumberOfPixelsTolerance 2 + ${ITK_SOURCE_DIR}/Examples/Data/LandmarkWarping2Landmarks1.txt + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${TEMP}/LandmarkWarping2Test.png) +itk_add_test( + NAME + ImageRegistration12Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration12TestPixelCentered.png} + ${TEMP}/ImageRegistration12TestPixelCentered.png + --compareNumberOfPixelsTolerance + 2 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20Mask.png - ${TEMP}/ImageRegistration12TestPixelCentered.png -) - -itk_add_test(NAME ModelToImageRegistration2Test COMMAND ${ITK_TEST_DRIVER} + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20Mask.png + ${TEMP}/ImageRegistration12TestPixelCentered.png) + +itk_add_test( + NAME + ModelToImageRegistration2Test + COMMAND + ${ITK_TEST_DRIVER} $ - DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/cake_easy.png} 12 12 -) + DATA{${ITK_SOURCE_DIR}/Testing/Data/Input/cake_easy.png} + 12 + 12) diff --git a/Examples/Segmentation/CMakeLists.txt b/Examples/Segmentation/CMakeLists.txt index b064c950c73..39e01300ed8 100644 --- a/Examples/Segmentation/CMakeLists.txt +++ b/Examples/Segmentation/CMakeLists.txt @@ -19,7 +19,7 @@ add_executable(FastMarchingImageFilter FastMarchingImageFilter.cxx) target_link_libraries(FastMarchingImageFilter ${ITK_LIBRARIES}) add_executable(GeodesicActiveContourShapePriorLevelSetImageFilter -GeodesicActiveContourShapePriorLevelSetImageFilter.cxx) + GeodesicActiveContourShapePriorLevelSetImageFilter.cxx) target_link_libraries(GeodesicActiveContourShapePriorLevelSetImageFilter ${ITK_LIBRARIES}) add_executable(GibbsPriorImageFilter1 GibbsPriorImageFilter1.cxx) diff --git a/Examples/Segmentation/test/CMakeLists.txt b/Examples/Segmentation/test/CMakeLists.txt index 2195294f00a..c4491be82c5 100644 --- a/Examples/Segmentation/test/CMakeLists.txt +++ b/Examples/Segmentation/test/CMakeLists.txt @@ -1,340 +1,664 @@ set(BASELINE ${ITK_DATA_ROOT}/Baseline/Segmentation) set(TEMP ${ITK_BINARY_DIR}/Testing/Temporary) -itk_add_test(NAME ConfidenceConnectedWhiteTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ConfidenceConnectedWhiteTest.png} - ${TEMP}/ConfidenceConnectedWhiteTest.png +itk_add_test( + NAME + ConfidenceConnectedWhiteTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ConfidenceConnectedWhiteTest.png} + ${TEMP}/ConfidenceConnectedWhiteTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ConfidenceConnectedWhiteTest.png - 60 116 -) - -itk_add_test(NAME ConfidenceConnectedVentricleTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ConfidenceConnectedVentricleTest.png} - ${TEMP}/ConfidenceConnectedVentricleTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ConfidenceConnectedWhiteTest.png + 60 + 116) + +itk_add_test( + NAME + ConfidenceConnectedVentricleTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ConfidenceConnectedVentricleTest.png} + ${TEMP}/ConfidenceConnectedVentricleTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ConfidenceConnectedVentricleTest.png - 81 112 -) - -itk_add_test(NAME ConfidenceConnectedGrayTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ConfidenceConnectedGrayTest.png} - ${TEMP}/ConfidenceConnectedGrayTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ConfidenceConnectedVentricleTest.png + 81 + 112) + +itk_add_test( + NAME + ConfidenceConnectedGrayTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ConfidenceConnectedGrayTest.png} + ${TEMP}/ConfidenceConnectedGrayTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ConfidenceConnectedGrayTest.png - 107 69 -) - -itk_add_test(NAME ConnectedThresholdWhiteTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ConnectedThresholdWhiteTest.png} - ${TEMP}/ConnectedThresholdWhiteTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ConfidenceConnectedGrayTest.png + 107 + 69) + +itk_add_test( + NAME + ConnectedThresholdWhiteTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ConnectedThresholdWhiteTest.png} + ${TEMP}/ConnectedThresholdWhiteTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ConnectedThresholdWhiteTest.png - 60 116 150 180 -) - -itk_add_test(NAME ConnectedThresholdVentricleTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ConnectedThresholdVentricleTest.png} - ${TEMP}/ConnectedThresholdVentricleTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ConnectedThresholdWhiteTest.png + 60 + 116 + 150 + 180) + +itk_add_test( + NAME + ConnectedThresholdVentricleTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ConnectedThresholdVentricleTest.png} + ${TEMP}/ConnectedThresholdVentricleTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ConnectedThresholdVentricleTest.png - 81 112 210 250 -) - -itk_add_test(NAME ConnectedThresholdGrayTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ConnectedThresholdGrayTest.png} - ${TEMP}/ConnectedThresholdGrayTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ConnectedThresholdVentricleTest.png + 81 + 112 + 210 + 250) + +itk_add_test( + NAME + ConnectedThresholdGrayTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ConnectedThresholdGrayTest.png} + ${TEMP}/ConnectedThresholdGrayTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ConnectedThresholdGrayTest.png - 107 69 180 210 -) - -itk_add_test(NAME FastMarchingLeftVentricleTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/FastMarchingLeftVentricleTest.png,:} - ${TEMP}/FastMarchingLeftVentricleTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ConnectedThresholdGrayTest.png + 107 + 69 + 180 + 210) + +itk_add_test( + NAME + FastMarchingLeftVentricleTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/FastMarchingLeftVentricleTest.png,:} + ${TEMP}/FastMarchingLeftVentricleTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/FastMarchingLeftVentricleTest.png - 81 114 1.0 -0.5 3.0 100 100 debug1.png debug2.png debug3.png -) - -itk_add_test(NAME FastMarchingRightVentricleTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/FastMarchingRightVentricleTest.png,:} - ${TEMP}/FastMarchingRightVentricleTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/FastMarchingLeftVentricleTest.png + 81 + 114 + 1.0 + -0.5 + 3.0 + 100 + 100 + debug1.png + debug2.png + debug3.png) + +itk_add_test( + NAME + FastMarchingRightVentricleTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/FastMarchingRightVentricleTest.png,:} + ${TEMP}/FastMarchingRightVentricleTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/FastMarchingRightVentricleTest.png - 99 114 1.0 -0.5 3.0 100 100 debug1.png debug2.png debug3.png -) - -itk_add_test(NAME FastMarchingWhiteMatterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/FastMarchingWhiteMatterTest.png,:} - ${TEMP}/FastMarchingWhiteMatterTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/FastMarchingRightVentricleTest.png + 99 + 114 + 1.0 + -0.5 + 3.0 + 100 + 100 + debug1.png + debug2.png + debug3.png) + +itk_add_test( + NAME + FastMarchingWhiteMatterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/FastMarchingWhiteMatterTest.png,:} + ${TEMP}/FastMarchingWhiteMatterTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/FastMarchingWhiteMatterTest.png - 56 92 1.0 -0.3 2.0 200 100 debug1.png debug2.png debug3.png -) - -itk_add_test(NAME FastMarchingGrayMatterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/FastMarchingGrayMatterTest.png,:} - ${TEMP}/FastMarchingGrayMatterTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/FastMarchingWhiteMatterTest.png + 56 + 92 + 1.0 + -0.3 + 2.0 + 200 + 100 + debug1.png + debug2.png + debug3.png) + +itk_add_test( + NAME + FastMarchingGrayMatterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/FastMarchingGrayMatterTest.png,:} + ${TEMP}/FastMarchingGrayMatterTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/FastMarchingGrayMatterTest.png - 40 90 .5 -0.3 2.0 200 100 debug1.png debug2.png debug3.png -) - -itk_add_test(NAME GeodesicActiveContourLeftVentricleTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/GeodesicActiveContourLeftVentricleTest.png,:} - ${TEMP}/GeodesicActiveContourLeftVentricleTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/FastMarchingGrayMatterTest.png + 40 + 90 + .5 + -0.3 + 2.0 + 200 + 100 + debug1.png + debug2.png + debug3.png) + +itk_add_test( + NAME + GeodesicActiveContourLeftVentricleTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/GeodesicActiveContourLeftVentricleTest.png,:} + ${TEMP}/GeodesicActiveContourLeftVentricleTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/GeodesicActiveContourLeftVentricleTest.png - 81 114 5.0 1.0 -0.5 3.0 2.0 -) - -itk_add_test(NAME GeodesicActiveContourRightVentricleTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/GeodesicActiveContourRightVentricleTest.png,:} - ${TEMP}/GeodesicActiveContourRightVentricleTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/GeodesicActiveContourLeftVentricleTest.png + 81 + 114 + 5.0 + 1.0 + -0.5 + 3.0 + 2.0) + +itk_add_test( + NAME + GeodesicActiveContourRightVentricleTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/GeodesicActiveContourRightVentricleTest.png,:} + ${TEMP}/GeodesicActiveContourRightVentricleTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/GeodesicActiveContourRightVentricleTest.png - 99 114 5.0 1.0 -0.5 3.0 2.0 -) - -itk_add_test(NAME GeodesicActiveContourWhiteMatterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/GeodesicActiveContourWhiteMatterTest.png,:} - ${TEMP}/GeodesicActiveContourWhiteMatterTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/GeodesicActiveContourRightVentricleTest.png + 99 + 114 + 5.0 + 1.0 + -0.5 + 3.0 + 2.0) + +itk_add_test( + NAME + GeodesicActiveContourWhiteMatterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/GeodesicActiveContourWhiteMatterTest.png,:} + ${TEMP}/GeodesicActiveContourWhiteMatterTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/GeodesicActiveContourWhiteMatterTest.png - 56 92 5.0 1.0 -0.3 2.0 10.0 -) - -itk_add_test(NAME GeodesicActiveContourGrayMatterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/GeodesicActiveContourGrayMatterTest.png,:} - ${TEMP}/GeodesicActiveContourGrayMatterTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/GeodesicActiveContourWhiteMatterTest.png + 56 + 92 + 5.0 + 1.0 + -0.3 + 2.0 + 10.0) + +itk_add_test( + NAME + GeodesicActiveContourGrayMatterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/GeodesicActiveContourGrayMatterTest.png,:} + ${TEMP}/GeodesicActiveContourGrayMatterTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/GeodesicActiveContourGrayMatterTest.png - 40 90 5.0 .5 -0.3 2.0 10.0 -) - -itk_add_test(NAME ShapeDetectionLevelSetLeftVentricleTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ShapeDetectionLevelSetLeftVentricleTest.png,:} - ${TEMP}/ShapeDetectionLevelSetLeftVentricleTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/GeodesicActiveContourGrayMatterTest.png + 40 + 90 + 5.0 + .5 + -0.3 + 2.0 + 10.0) + +itk_add_test( + NAME + ShapeDetectionLevelSetLeftVentricleTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ShapeDetectionLevelSetLeftVentricleTest.png,:} + ${TEMP}/ShapeDetectionLevelSetLeftVentricleTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ShapeDetectionLevelSetLeftVentricleTest.png - 81 114 5.0 1.0 -0.5 3.0 0.05 1.0 -) - -itk_add_test(NAME ShapeDetectionLevelSetRightVentricleTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ShapeDetectionLevelSetRightVentricleTest.png,:} - ${TEMP}/ShapeDetectionLevelSetRightVentricleTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ShapeDetectionLevelSetLeftVentricleTest.png + 81 + 114 + 5.0 + 1.0 + -0.5 + 3.0 + 0.05 + 1.0) + +itk_add_test( + NAME + ShapeDetectionLevelSetRightVentricleTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ShapeDetectionLevelSetRightVentricleTest.png,:} + ${TEMP}/ShapeDetectionLevelSetRightVentricleTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ShapeDetectionLevelSetRightVentricleTest.png - 99 114 5.0 1.0 -0.5 3.0 0.05 1.0 -) - -itk_add_test(NAME ShapeDetectionLevelSetWhiteMatterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ShapeDetectionLevelSetWhiteMatterTest.png,:} - ${TEMP}/ShapeDetectionLevelSetWhiteMatterTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ShapeDetectionLevelSetRightVentricleTest.png + 99 + 114 + 5.0 + 1.0 + -0.5 + 3.0 + 0.05 + 1.0) + +itk_add_test( + NAME + ShapeDetectionLevelSetWhiteMatterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ShapeDetectionLevelSetWhiteMatterTest.png,:} + ${TEMP}/ShapeDetectionLevelSetWhiteMatterTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ShapeDetectionLevelSetWhiteMatterTest.png - 56 92 5.0 1.0 -0.3 2.0 0.05 1.0 -) - -itk_add_test(NAME ShapeDetectionLevelSetGrayMatterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ShapeDetectionLevelSetGrayMatterTest.png,:} - ${TEMP}/ShapeDetectionLevelSetGrayMatterTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ShapeDetectionLevelSetWhiteMatterTest.png + 56 + 92 + 5.0 + 1.0 + -0.3 + 2.0 + 0.05 + 1.0) + +itk_add_test( + NAME + ShapeDetectionLevelSetGrayMatterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ShapeDetectionLevelSetGrayMatterTest.png,:} + ${TEMP}/ShapeDetectionLevelSetGrayMatterTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ShapeDetectionLevelSetGrayMatterTest.png - 40 90 5.0 1.0 -0.3 2.0 0.05 1.0 -) - -itk_add_test(NAME ThresholdSegmentationLevelSetVentricleTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ThresholdSegmentationLevelSetVentricleTest.png,:} - ${TEMP}/ThresholdSegmentationLevelSetVentricleTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ShapeDetectionLevelSetGrayMatterTest.png + 40 + 90 + 5.0 + 1.0 + -0.3 + 2.0 + 0.05 + 1.0) + +itk_add_test( + NAME + ThresholdSegmentationLevelSetVentricleTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ThresholdSegmentationLevelSetVentricleTest.png,:} + ${TEMP}/ThresholdSegmentationLevelSetVentricleTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ThresholdSegmentationLevelSetVentricleTest.png - 81 112 5 210 250 -) - -itk_add_test(NAME ThresholdSegmentationLevelSetWhiteMatterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ThresholdSegmentationLevelSetWhiteMatterTest.png,:} - ${TEMP}/ThresholdSegmentationLevelSetWhiteMatterTest.png - --compareNumberOfPixelsTolerance 40 + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ThresholdSegmentationLevelSetVentricleTest.png + 81 + 112 + 5 + 210 + 250) + +itk_add_test( + NAME + ThresholdSegmentationLevelSetWhiteMatterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ThresholdSegmentationLevelSetWhiteMatterTest.png,:} + ${TEMP}/ThresholdSegmentationLevelSetWhiteMatterTest.png + --compareNumberOfPixelsTolerance + 40 $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ThresholdSegmentationLevelSetWhiteMatterTest.png - 60 116 5 150 180 -) - -itk_add_test(NAME ThresholdSegmentationLevelSetGrayMatterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ThresholdSegmentationLevelSetGrayMatterTest.png,:} - ${TEMP}/ThresholdSegmentationLevelSetGrayMatterTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ThresholdSegmentationLevelSetWhiteMatterTest.png + 60 + 116 + 5 + 150 + 180) + +itk_add_test( + NAME + ThresholdSegmentationLevelSetGrayMatterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ThresholdSegmentationLevelSetGrayMatterTest.png,:} + ${TEMP}/ThresholdSegmentationLevelSetGrayMatterTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/ThresholdSegmentationLevelSetGrayMatterTest.png - 107 69 5 180 210 -) - -itk_add_test(NAME VectorConfidenceConnectedTest1 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/VectorConfidenceConnected1.png} - ${TEMP}/VectorConfidenceConnected1.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/ThresholdSegmentationLevelSetGrayMatterTest.png + 107 + 69 + 5 + 180 + 210) + +itk_add_test( + NAME + VectorConfidenceConnectedTest1 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/VectorConfidenceConnected1.png} + ${TEMP}/VectorConfidenceConnected1.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/VectorConfidenceConnected1.png - 70 120 7 1 -) - -itk_add_test(NAME VectorConfidenceConnectedTest2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/VectorConfidenceConnected2.png} - ${TEMP}/VectorConfidenceConnected2.png + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/VectorConfidenceConnected1.png + 70 + 120 + 7 + 1) + +itk_add_test( + NAME + VectorConfidenceConnectedTest2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/VectorConfidenceConnected2.png} + ${TEMP}/VectorConfidenceConnected2.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/VectorConfidenceConnected2.png - 23 93 7 1 -) - -itk_add_test(NAME VectorConfidenceConnectedTest3 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/VectorConfidenceConnected3.png} - ${TEMP}/VectorConfidenceConnected3.png + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/VectorConfidenceConnected2.png + 23 + 93 + 7 + 1) + +itk_add_test( + NAME + VectorConfidenceConnectedTest3 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/VectorConfidenceConnected3.png} + ${TEMP}/VectorConfidenceConnected3.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/VectorConfidenceConnected3.png - 66 66 3 1 -) - - -itk_add_test(NAME CannySegmentationLevelSetImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/CannySegmentationLevelSetImageFilterTest.png} - ${TEMP}/CannySegmentationLevelSetImageFilterTest.png + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/VectorConfidenceConnected3.png + 66 + 66 + 3 + 1) + +itk_add_test( + NAME + CannySegmentationLevelSetImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/CannySegmentationLevelSetImageFilterTest.png} + ${TEMP}/CannySegmentationLevelSetImageFilterTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - DATA{${BASELINE}/ThresholdSegmentationLevelSetVentricle.png} - ${TEMP}/CannySegmentationLevelSetImageFilterTest.png - 7 0.1 -10.0 127.5 10000 -) - -itk_add_test(NAME GeodesicActiveContourShapePriorCallosumTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/GeodesicActiveContourShapePriorCallosumTest.png} - ${TEMP}/GeodesicActiveContourShapePriorCallosumTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + DATA{${BASELINE}/ThresholdSegmentationLevelSetVentricle.png} + ${TEMP}/CannySegmentationLevelSetImageFilterTest.png + 7 + 0.1 + -10.0 + 127.5 + 10000) + +itk_add_test( + NAME + GeodesicActiveContourShapePriorCallosumTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/GeodesicActiveContourShapePriorCallosumTest.png} + ${TEMP}/GeodesicActiveContourShapePriorCallosumTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainMidSagittalSlice.png - ${TEMP}/GeodesicActiveContourShapePriorCallosumTest.png - 120 85 60 102 88 83 6 1.0 0.5 0.02 - ${ITK_SOURCE_DIR}/Examples/Data/CorpusCallosumMeanShape.mha 3 - ${ITK_SOURCE_DIR}/Examples/Data/CorpusCallosumMode%d.mha 10 0 -) - -itk_add_test(NAME NeighborhoodConnectedWhiteTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/NeighborhoodConnectedWhiteTest.png} - ${TEMP}/NeighborhoodConnectedWhiteTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainMidSagittalSlice.png + ${TEMP}/GeodesicActiveContourShapePriorCallosumTest.png + 120 + 85 + 60 + 102 + 88 + 83 + 6 + 1.0 + 0.5 + 0.02 + ${ITK_SOURCE_DIR}/Examples/Data/CorpusCallosumMeanShape.mha + 3 + ${ITK_SOURCE_DIR}/Examples/Data/CorpusCallosumMode%d.mha + 10 + 0) + +itk_add_test( + NAME + NeighborhoodConnectedWhiteTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/NeighborhoodConnectedWhiteTest.png} + ${TEMP}/NeighborhoodConnectedWhiteTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/NeighborhoodConnectedWhiteTest.png - 60 116 150 180 -) - -itk_add_test(NAME NeighborhoodConnectedVentricleTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/NeighborhoodConnectedVentricleTest.png} - ${TEMP}/NeighborhoodConnectedVentricleTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/NeighborhoodConnectedWhiteTest.png + 60 + 116 + 150 + 180) + +itk_add_test( + NAME + NeighborhoodConnectedVentricleTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/NeighborhoodConnectedVentricleTest.png} + ${TEMP}/NeighborhoodConnectedVentricleTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/NeighborhoodConnectedVentricleTest.png - 81 112 210 250 -) - -itk_add_test(NAME NeighborhoodConnectedGrayTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/NeighborhoodConnectedGrayTest.png} - ${TEMP}/NeighborhoodConnectedGrayTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/NeighborhoodConnectedVentricleTest.png + 81 + 112 + 210 + 250) + +itk_add_test( + NAME + NeighborhoodConnectedGrayTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/NeighborhoodConnectedGrayTest.png} + ${TEMP}/NeighborhoodConnectedGrayTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/NeighborhoodConnectedGrayTest.png - 107 69 180 210 -) - -itk_add_test(NAME IsolatedConnectedTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/IsolatedConnectedTest.png} - ${TEMP}/IsolatedConnectedTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/NeighborhoodConnectedGrayTest.png + 107 + 69 + 180 + 210) + +itk_add_test( + NAME + IsolatedConnectedTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/IsolatedConnectedTest.png} + ${TEMP}/IsolatedConnectedTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/IsolatedConnectedTest.png - 61 140 150 63 43 -) - -itk_add_test(NAME RelabelComponentImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/RelabelComponentImageFilter.png} - ${TEMP}/RelabelComponentImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/IsolatedConnectedTest.png + 61 + 140 + 150 + 63 + 43) + +itk_add_test( + NAME + RelabelComponentImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/RelabelComponentImageFilter.png} + ${TEMP}/RelabelComponentImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/WatershedSegmentation.png - ${TEMP}/RelabelComponentImageFilter.png -) - -itk_add_test(NAME WatershedSegmentation1Test1 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/WatershedSegmentation1Test1.png} - ${TEMP}/WatershedSegmentation1Test1.png + ${ITK_SOURCE_DIR}/Examples/Data/WatershedSegmentation.png + ${TEMP}/RelabelComponentImageFilter.png) + +itk_add_test( + NAME + WatershedSegmentation1Test1 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/WatershedSegmentation1Test1.png} + ${TEMP}/WatershedSegmentation1Test1.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/WatershedSegmentation1Test1.png - 2.0 10 0.0 0.05 1 -) - -itk_add_test(NAME WatershedSegmentation1Test2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/WatershedSegmentation1Test2.png} - ${TEMP}/WatershedSegmentation1Test2.png + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/WatershedSegmentation1Test1.png + 2.0 + 10 + 0.0 + 0.05 + 1) + +itk_add_test( + NAME + WatershedSegmentation1Test2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/WatershedSegmentation1Test2.png} + ${TEMP}/WatershedSegmentation1Test2.png $ - ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png - ${TEMP}/WatershedSegmentation1Test2.png - 2.0 10 0.001 0.15 0 -) - -itk_add_test(NAME CurvesLevelSetImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/CurvesLevelSetImageFilterTest.png} - ${TEMP}/CurvesLevelSetImageFilterTest.png + ${ITK_SOURCE_DIR}/Examples/Data/VisibleWomanEyeSlice.png + ${TEMP}/WatershedSegmentation1Test2.png + 2.0 + 10 + 0.001 + 0.15 + 0) + +itk_add_test( + NAME + CurvesLevelSetImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/CurvesLevelSetImageFilterTest.png} + ${TEMP}/CurvesLevelSetImageFilterTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/CurvesLevelSetImageFilterTest.png - 81 114 5.0 1.0 -0.5 3.0 2.0 -) - -itk_add_test(NAME HoughTransformTwo2DLinesTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/HoughTransformTwoLinesTest.png} - ${TEMP}/HoughTransformTwoLinesTest.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/CurvesLevelSetImageFilterTest.png + 81 + 114 + 5.0 + 1.0 + -0.5 + 3.0 + 2.0) + +itk_add_test( + NAME + HoughTransformTwo2DLinesTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/HoughTransformTwoLinesTest.png} + ${TEMP}/HoughTransformTwoLinesTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/HoughTransformTwoLines.png - ${TEMP}/HoughTransformTwoLinesTest.png - 2 5 10 -) - -itk_add_test(NAME HoughTransformTwo2DCirclesTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/HoughTransformTwoCirclesTest.png} - ${TEMP}/HoughTransformTwoCirclesTest.png + ${ITK_SOURCE_DIR}/Examples/Data/HoughTransformTwoLines.png + ${TEMP}/HoughTransformTwoLinesTest.png + 2 + 5 + 10) + +itk_add_test( + NAME + HoughTransformTwo2DCirclesTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/HoughTransformTwoCirclesTest.png} + ${TEMP}/HoughTransformTwoCirclesTest.png $ - ${ITK_SOURCE_DIR}/Examples/Data/HoughTransformTwoCircles.png - ${TEMP}/HoughTransformTwoCirclesTest.png - 2 6 20 3.14 10 5 1.5 -) - -itk_add_test(NAME LaplacianSegmentationLevelSetImageFilterTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/LaplacianSegmentationLevelSetImageFilter.png} - ${TEMP}/LaplacianSegmentationLevelSetImageFilter.png + ${ITK_SOURCE_DIR}/Examples/Data/HoughTransformTwoCircles.png + ${TEMP}/HoughTransformTwoCirclesTest.png + 2 + 6 + 20 + 3.14 + 10 + 5 + 1.5) + +itk_add_test( + NAME + LaplacianSegmentationLevelSetImageFilterTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/LaplacianSegmentationLevelSetImageFilter.png} + ${TEMP}/LaplacianSegmentationLevelSetImageFilter.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - DATA{${BASELINE}/ThresholdSegmentationLevelSetVentricle.png} - ${TEMP}/LaplacianSegmentationLevelSetImageFilter.png - 10 2.0 1 127.5 15 -) + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + DATA{${BASELINE}/ThresholdSegmentationLevelSetVentricle.png} + ${TEMP}/LaplacianSegmentationLevelSetImageFilter.png + 10 + 2.0 + 1 + 127.5 + 15) diff --git a/Examples/SpatialObjects/CMakeLists.txt b/Examples/SpatialObjects/CMakeLists.txt index 54e90a88d2a..8c349fe63b5 100644 --- a/Examples/SpatialObjects/CMakeLists.txt +++ b/Examples/SpatialObjects/CMakeLists.txt @@ -1,61 +1,61 @@ project(SpatialObjectsExamples) add_executable(ArrowSpatialObject ArrowSpatialObject.cxx) -target_link_libraries(ArrowSpatialObject ${ITK_LIBRARIES}) +target_link_libraries(ArrowSpatialObject ${ITK_LIBRARIES}) add_executable(BlobSpatialObject BlobSpatialObject.cxx) -target_link_libraries(BlobSpatialObject ${ITK_LIBRARIES}) +target_link_libraries(BlobSpatialObject ${ITK_LIBRARIES}) add_executable(EllipseSpatialObject EllipseSpatialObject.cxx) -target_link_libraries(EllipseSpatialObject ${ITK_LIBRARIES}) +target_link_libraries(EllipseSpatialObject ${ITK_LIBRARIES}) add_executable(GaussianSpatialObject GaussianSpatialObject.cxx) -target_link_libraries(GaussianSpatialObject ${ITK_LIBRARIES}) +target_link_libraries(GaussianSpatialObject ${ITK_LIBRARIES}) add_executable(GroupSpatialObject GroupSpatialObject.cxx) -target_link_libraries(GroupSpatialObject ${ITK_LIBRARIES}) +target_link_libraries(GroupSpatialObject ${ITK_LIBRARIES}) add_executable(ImageSpatialObject ImageSpatialObject.cxx) -target_link_libraries(ImageSpatialObject ${ITK_LIBRARIES}) +target_link_libraries(ImageSpatialObject ${ITK_LIBRARIES}) add_executable(ImageMaskSpatialObject ImageMaskSpatialObject.cxx) -target_link_libraries(ImageMaskSpatialObject ${ITK_LIBRARIES}) +target_link_libraries(ImageMaskSpatialObject ${ITK_LIBRARIES}) add_executable(LandmarkSpatialObject LandmarkSpatialObject.cxx) -target_link_libraries(LandmarkSpatialObject ${ITK_LIBRARIES}) +target_link_libraries(LandmarkSpatialObject ${ITK_LIBRARIES}) add_executable(LineSpatialObject LineSpatialObject.cxx) -target_link_libraries(LineSpatialObject ${ITK_LIBRARIES}) +target_link_libraries(LineSpatialObject ${ITK_LIBRARIES}) add_executable(MeshSpatialObject MeshSpatialObject.cxx) -target_link_libraries(MeshSpatialObject ${ITK_LIBRARIES}) +target_link_libraries(MeshSpatialObject ${ITK_LIBRARIES}) add_executable(ReadWriteSpatialObject ReadWriteSpatialObject.cxx) -target_link_libraries(ReadWriteSpatialObject ${ITK_LIBRARIES}) +target_link_libraries(ReadWriteSpatialObject ${ITK_LIBRARIES}) add_executable(SceneSpatialObject SceneSpatialObject.cxx) -target_link_libraries(SceneSpatialObject ${ITK_LIBRARIES}) +target_link_libraries(SceneSpatialObject ${ITK_LIBRARIES}) add_executable(SpatialObjectHierarchy SpatialObjectHierarchy.cxx) -target_link_libraries(SpatialObjectHierarchy ${ITK_LIBRARIES}) +target_link_libraries(SpatialObjectHierarchy ${ITK_LIBRARIES}) add_executable(SpatialObjectTransforms SpatialObjectTransforms.cxx) -target_link_libraries(SpatialObjectTransforms ${ITK_LIBRARIES}) +target_link_libraries(SpatialObjectTransforms ${ITK_LIBRARIES}) add_executable(SpatialObjectToImageStatisticsCalculator SpatialObjectToImageStatisticsCalculator.cxx) -target_link_libraries(SpatialObjectToImageStatisticsCalculator ${ITK_LIBRARIES}) +target_link_libraries(SpatialObjectToImageStatisticsCalculator ${ITK_LIBRARIES}) add_executable(SurfaceSpatialObject SurfaceSpatialObject.cxx) -target_link_libraries(SurfaceSpatialObject ${ITK_LIBRARIES}) +target_link_libraries(SurfaceSpatialObject ${ITK_LIBRARIES}) add_executable(TubeSpatialObject TubeSpatialObject.cxx) -target_link_libraries(TubeSpatialObject ${ITK_LIBRARIES}) +target_link_libraries(TubeSpatialObject ${ITK_LIBRARIES}) add_executable(VesselTubeSpatialObject VesselTubeSpatialObject.cxx) -target_link_libraries(VesselTubeSpatialObject ${ITK_LIBRARIES}) +target_link_libraries(VesselTubeSpatialObject ${ITK_LIBRARIES}) add_executable(DTITubeSpatialObject DTITubeSpatialObject.cxx) -target_link_libraries(DTITubeSpatialObject ${ITK_LIBRARIES}) +target_link_libraries(DTITubeSpatialObject ${ITK_LIBRARIES}) add_executable(BoundingBoxFromImageMaskSpatialObject BoundingBoxFromImageMaskSpatialObject.cxx) -target_link_libraries(BoundingBoxFromImageMaskSpatialObject ${ITK_LIBRARIES}) +target_link_libraries(BoundingBoxFromImageMaskSpatialObject ${ITK_LIBRARIES}) diff --git a/Examples/Statistics/test/CMakeLists.txt b/Examples/Statistics/test/CMakeLists.txt index 67417ebed39..f22ecf5634e 100644 --- a/Examples/Statistics/test/CMakeLists.txt +++ b/Examples/Statistics/test/CMakeLists.txt @@ -1,61 +1,117 @@ set(BASELINE ${ITK_DATA_ROOT}/Baseline/Statistics) set(TEMP ${ITK_BINARY_DIR}/Testing/Temporary) -itk_add_test(NAME ScalarImageKmeansClassifierTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ScalarImageKmeansClassifierOutput.png} - ${TEMP}/ScalarImageKmeansClassifierOutput.png +itk_add_test( + NAME + ScalarImageKmeansClassifierTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ScalarImageKmeansClassifierOutput.png} + ${TEMP}/ScalarImageKmeansClassifierOutput.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainT1Slice.png - ${TEMP}/ScalarImageKmeansClassifierOutput.png - 1 3 14.8 91.6 134.9 -) - -itk_add_test(NAME ScalarImageMarkovRandomField1Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ScalarImageMarkovRandomField1Output.png} - ${TEMP}/ScalarImageMarkovRandomField1Output.png + ${ITK_SOURCE_DIR}/Examples/Data/BrainT1Slice.png + ${TEMP}/ScalarImageKmeansClassifierOutput.png + 1 + 3 + 14.8 + 91.6 + 134.9) + +itk_add_test( + NAME + ScalarImageMarkovRandomField1Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ScalarImageMarkovRandomField1Output.png} + ${TEMP}/ScalarImageMarkovRandomField1Output.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainT1Slice.png - DATA{${ITK_DATA_ROOT}/Input/Statistics/BrainT1Slice_AfterKMeansClassification.png} - ${TEMP}/ScalarImageMarkovRandomField1Output.png - 50 3 3 14.8 91.6 134.9 -) + ${ITK_SOURCE_DIR}/Examples/Data/BrainT1Slice.png + DATA{${ITK_DATA_ROOT}/Input/Statistics/BrainT1Slice_AfterKMeansClassification.png} + ${TEMP}/ScalarImageMarkovRandomField1Output.png + 50 + 3 + 3 + 14.8 + 91.6 + 134.9) -itk_add_test(NAME BayesianPluginClassifierTest COMMAND ${ITK_TEST_DRIVER} +itk_add_test( + NAME + BayesianPluginClassifierTest + COMMAND + ${ITK_TEST_DRIVER} $) -itk_add_test(NAME BayesianClassifierInitializerTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/BayesianClassifierInitializerClass2Output.png} - ${TEMP}/BayesianClassifierInitializerClass2Output.png +itk_add_test( + NAME + BayesianClassifierInitializerTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/BayesianClassifierInitializerClass2Output.png} + ${TEMP}/BayesianClassifierInitializerClass2Output.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${TEMP}/BayesianClassifierInitializerMemberships.mhd - 4 2 ${TEMP}/BayesianClassifierInitializerClass2Output.png -) + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${TEMP}/BayesianClassifierInitializerMemberships.mhd + 4 + 2 + ${TEMP}/BayesianClassifierInitializerClass2Output.png) # This test uses inputs from BayesianClassifierInitializer. # If that output changes, a new file should be placed in Examples/Data. -itk_add_test(NAME BayesianClassifierTest COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/BayesianClassifierLabelMap.png} - ${TEMP}/BayesianClassifierLabelMap.png +itk_add_test( + NAME + BayesianClassifierTest + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/BayesianClassifierLabelMap.png} + ${TEMP}/BayesianClassifierLabelMap.png $ - ${ITK_SOURCE_DIR}/Examples/Data/BayesianClassifierInitializerMemberships.mhd - ${TEMP}/BayesianClassifierLabelMap.png 2 -) + ${ITK_SOURCE_DIR}/Examples/Data/BayesianClassifierInitializerMemberships.mhd + ${TEMP}/BayesianClassifierLabelMap.png + 2) -itk_add_test(NAME EuclideanDistanceTest COMMAND ${ITK_TEST_DRIVER} - $) +itk_add_test( + NAME + EuclideanDistanceTest + COMMAND + ${ITK_TEST_DRIVER} + $) -itk_add_test(NAME GaussianDensityFunctionTest COMMAND ${ITK_TEST_DRIVER} - $) +itk_add_test( + NAME + GaussianDensityFunctionTest + COMMAND + ${ITK_TEST_DRIVER} + $) -itk_add_test(NAME MinimumDecisionRuleTest COMMAND ${ITK_TEST_DRIVER} - $) +itk_add_test( + NAME + MinimumDecisionRuleTest + COMMAND + ${ITK_TEST_DRIVER} + $) -itk_add_test(NAME MaximumDecisionRuleTest COMMAND ${ITK_TEST_DRIVER} - $) +itk_add_test( + NAME + MaximumDecisionRuleTest + COMMAND + ${ITK_TEST_DRIVER} + $) -itk_add_test(NAME MaximumRatioDecisionRuleTest COMMAND ${ITK_TEST_DRIVER} - $) +itk_add_test( + NAME + MaximumRatioDecisionRuleTest + COMMAND + ${ITK_TEST_DRIVER} + $) -itk_add_test(NAME KdTreeTest COMMAND ${ITK_TEST_DRIVER} - $) +itk_add_test( + NAME + KdTreeTest + COMMAND + ${ITK_TEST_DRIVER} + $) diff --git a/Modules/Bridge/NumPy/itk-module.cmake b/Modules/Bridge/NumPy/itk-module.cmake index 73561eca9e6..6d56e5ef1f4 100644 --- a/Modules/Bridge/NumPy/itk-module.cmake +++ b/Modules/Bridge/NumPy/itk-module.cmake @@ -7,12 +7,12 @@ else() set(_exclude_from_default EXCLUDE_FROM_DEFAULT) endif() -itk_module(ITKBridgeNumPy +itk_module( + ITKBridgeNumPy DEPENDS - ITKCommon + ITKCommon TEST_DEPENDS - ITKTestKernel + ITKTestKernel ${_exclude_from_default} DESCRIPTION - "${DOCUMENTATION}" - ) + "${DOCUMENTATION}") diff --git a/Modules/Bridge/NumPy/wrapping/itkPyBuffer.wrap b/Modules/Bridge/NumPy/wrapping/itkPyBuffer.wrap index a3d38a0ba8c..103245d2e38 100644 --- a/Modules/Bridge/NumPy/wrapping/itkPyBuffer.wrap +++ b/Modules/Bridge/NumPy/wrapping/itkPyBuffer.wrap @@ -1,105 +1,92 @@ -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/PyBuffer.i.init" - "${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i" - @ONLY) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/PyBuffer.i.init" "${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i" @ONLY) itk_wrap_class("itk::PyBuffer") - UNIQUE(types "${WRAP_ITK_SCALAR};UC;D;US;UI;UL;ULL;SC;SS;SI;SL;SLL;F") - UNIQUE(vector_universe "${WRAP_ITK_VECTOR};VD;CVD") - foreach(t ${types}) - string(REGEX MATCHALL "(V${t}|CV${t})" VectorTypes ${vector_universe}) - set(PixelType ${t}) - foreach(d ${ITK_WRAP_DIMS}) - if( DEFINED ITKT_I${t}${d} ) - itk_wrap_template("${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}") - set(PyBufferTypes ${ITKM_I${t}${d}}) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/PyBuffer.i.in - ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp - @ONLY) - file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp - PyBufferInterfaceTemp) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i - ${PyBufferInterfaceTemp}) - endif() +unique(types "${WRAP_ITK_SCALAR};UC;D;US;UI;UL;ULL;SC;SS;SI;SL;SLL;F") +unique(vector_universe "${WRAP_ITK_VECTOR};VD;CVD") +foreach(t ${types}) + string( + REGEX MATCHALL + "(V${t}|CV${t})" + VectorTypes + ${vector_universe}) + set(PixelType ${t}) + foreach(d ${ITK_WRAP_DIMS}) + if(DEFINED ITKT_I${t}${d}) + itk_wrap_template("${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}") + set(PyBufferTypes ${ITKM_I${t}${d}}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PyBuffer.i.in ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp @ONLY) + file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp PyBufferInterfaceTemp) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i ${PyBufferInterfaceTemp}) + endif() - # Wraps Symmetric Second Rank tensor images - if( DEFINED ITKM_ISSRT${t}${d}${d}) - itk_wrap_template("${ITKM_ISSRT${t}${d}${d}}" "${ITKT_ISSRT${t}${d}${d}}") - set(PyBufferTypes ${ITKM_ISSRT${t}${d}${d}}) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/PyBuffer.i.in - ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp - @ONLY) - file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp - PyBufferInterfaceTemp) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i - ${PyBufferInterfaceTemp}) - endif() + # Wraps Symmetric Second Rank tensor images + if(DEFINED ITKM_ISSRT${t}${d}${d}) + itk_wrap_template("${ITKM_ISSRT${t}${d}${d}}" "${ITKT_ISSRT${t}${d}${d}}") + set(PyBufferTypes ${ITKM_ISSRT${t}${d}${d}}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PyBuffer.i.in ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp @ONLY) + file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp PyBufferInterfaceTemp) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i ${PyBufferInterfaceTemp}) + endif() - # Wraps RGB and RGBA types that have been selected to be wrapped. - # We have to recompute them all to extract the pixel component type. - foreach(p RGB;RGBA) - set(WRAP_RGBA_RGB "${WRAP_ITK_RGB};${WRAP_ITK_RGBA}") - list(FIND WRAP_RGBA_RGB "${p}${t}" pos) - if( NOT ${pos} EQUAL -1 AND DEFINED ITKT_I${p}${t}${d}) - itk_wrap_template("${ITKM_I${p}${t}${d}}" "${ITKT_I${p}${t}${d}}") - set(PyBufferTypes ${ITKM_I${p}${t}${d}}) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/PyBuffer.i.in - ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp - @ONLY) - file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp - PyBufferInterfaceTemp) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i - ${PyBufferInterfaceTemp}) + # Wraps RGB and RGBA types that have been selected to be wrapped. + # We have to recompute them all to extract the pixel component type. + foreach(p RGB;RGBA) + set(WRAP_RGBA_RGB "${WRAP_ITK_RGB};${WRAP_ITK_RGBA}") + list( + FIND + WRAP_RGBA_RGB + "${p}${t}" + pos) + if(NOT + ${pos} + EQUAL + -1 + AND DEFINED ITKT_I${p}${t}${d}) + itk_wrap_template("${ITKM_I${p}${t}${d}}" "${ITKT_I${p}${t}${d}}") + set(PyBufferTypes ${ITKM_I${p}${t}${d}}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PyBuffer.i.in ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp @ONLY) + file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp PyBufferInterfaceTemp) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i ${PyBufferInterfaceTemp}) + endif() + endforeach(p) + # Image Vector types + foreach(vec_dim ${ITK_WRAP_VECTOR_COMPONENTS}) + foreach(vec_type ${VectorTypes}) + if(DEFINED ITKM_I${vec_type}${vec_dim}${d}) + itk_wrap_template("${ITKM_I${vec_type}${vec_dim}${d}}" "${ITKT_I${vec_type}${vec_dim}${d}}") + set(PyBufferTypes ${ITKM_I${vec_type}${vec_dim}${d}}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PyBuffer.i.in ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp @ONLY) + file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp PyBufferInterfaceTemp) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i ${PyBufferInterfaceTemp}) endif() - endforeach(p) - # Image Vector types - foreach(vec_dim ${ITK_WRAP_VECTOR_COMPONENTS}) - foreach(vec_type ${VectorTypes}) - if( DEFINED ITKM_I${vec_type}${vec_dim}${d} ) - itk_wrap_template("${ITKM_I${vec_type}${vec_dim}${d}}" "${ITKT_I${vec_type}${vec_dim}${d}}") - set(PyBufferTypes ${ITKM_I${vec_type}${vec_dim}${d}}) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/PyBuffer.i.in - ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp - @ONLY) - file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp - PyBufferInterfaceTemp) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i - ${PyBufferInterfaceTemp}) - endif() - endforeach() - endforeach() - endforeach(d) - endforeach(t) - - # VectorImage types - foreach(d ${ITK_WRAP_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}}") - set(PyBufferTypes ${ITKM_VI${t}${d}}) - set(PixelType ${t}) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/PyBuffer.i.in - ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp - @ONLY) - file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp - PyBufferInterfaceTemp) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i - ${PyBufferInterfaceTemp}) - endforeach(t) + endforeach() + endforeach() endforeach(d) +endforeach(t) + +# VectorImage types +foreach(d ${ITK_WRAP_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}}") + set(PyBufferTypes ${ITKM_VI${t}${d}}) + set(PixelType ${t}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PyBuffer.i.in ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp @ONLY) + file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i.temp PyBufferInterfaceTemp) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i ${PyBufferInterfaceTemp}) + endforeach(t) +endforeach(d) itk_end_wrap_class() # VNL vectors itk_wrap_class("itk::PyVnl") - UNIQUE(types "${WRAP_ITK_SCALAR};UC;D;US;UI;UL;ULL;SC;SS;SI;SL;SLL;F") - foreach(t ${types}) - set(PixelType ${t}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - set(PyVnlTypes ${ITKM_${t}}) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/PyVnlVectorBuffer.i.in - ${CMAKE_CURRENT_BINARY_DIR}/PyVnlVectorBuffer.i.temp - @ONLY) - file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVnlVectorBuffer.i.temp - PyBufferInterfaceTemp) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i - ${PyBufferInterfaceTemp}) - endforeach(t ${types}) +unique(types "${WRAP_ITK_SCALAR};UC;D;US;UI;UL;ULL;SC;SS;SI;SL;SLL;F") +foreach(t ${types}) + set(PixelType ${t}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") + set(PyVnlTypes ${ITKM_${t}}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PyVnlVectorBuffer.i.in + ${CMAKE_CURRENT_BINARY_DIR}/PyVnlVectorBuffer.i.temp @ONLY) + file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVnlVectorBuffer.i.temp PyBufferInterfaceTemp) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i ${PyBufferInterfaceTemp}) +endforeach(t ${types}) itk_end_wrap_class() diff --git a/Modules/Bridge/NumPy/wrapping/itkPyVectorContainer.wrap b/Modules/Bridge/NumPy/wrapping/itkPyVectorContainer.wrap index accb7ce205e..ce1fba8246b 100644 --- a/Modules/Bridge/NumPy/wrapping/itkPyVectorContainer.wrap +++ b/Modules/Bridge/NumPy/wrapping/itkPyVectorContainer.wrap @@ -1,122 +1,98 @@ itk_wrap_include("set") itk_wrap_class("itk::PyVectorContainer") - # double is always needed by KernelTransform - UNIQUE(scalar_types "${WRAP_ITK_SCALAR};D") - UNIQUE(index_types "IT;UC") - foreach(tt ${index_types}) - foreach(t ${scalar_types}) - set(ElementType ${t}) - # These are wrapped below with "vectypes" - if(NOT t IN_LIST WRAP_ITK_USIGN_INT) - itk_wrap_template("${ITKM_${tt}}${ITKM_${t}}" "${ITKT_${tt}},${ITKT_${t}}") - set(PyVectorContainerTypes ${ITKM_${tt}}${ITKM_${t}}) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in - ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - @ONLY) - file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - PyBufferInterfaceTemp) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i - ${PyBufferInterfaceTemp}) - endif() - endforeach() +# double is always needed by KernelTransform +unique(scalar_types "${WRAP_ITK_SCALAR};D") +unique(index_types "IT;UC") +foreach(tt ${index_types}) + foreach(t ${scalar_types}) + set(ElementType ${t}) + # These are wrapped below with "vectypes" + if(NOT + t + IN_LIST + WRAP_ITK_USIGN_INT) + itk_wrap_template("${ITKM_${tt}}${ITKM_${t}}" "${ITKT_${tt}},${ITKT_${t}}") + set(PyVectorContainerTypes ${ITKM_${tt}}${ITKM_${t}}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in + ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp @ONLY) + file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp PyBufferInterfaceTemp) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i ${PyBufferInterfaceTemp}) + endif() endforeach() - UNIQUE(real_types "${WRAP_ITK_REAL};D") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${real_types}) - set(ElementType ${t}) - itk_wrap_template("${ITKM_IT}${ITKM_V${t}${d}}" "${ITKT_IT},${ITKT_V${t}${d}}") - set(PyVectorContainerTypes ${ITKM_IT}${ITKM_V${t}${d}}) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in - ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - @ONLY) - file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - PyBufferInterfaceTemp) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i - ${PyBufferInterfaceTemp}) +endforeach() +unique(real_types "${WRAP_ITK_REAL};D") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${real_types}) + set(ElementType ${t}) + itk_wrap_template("${ITKM_IT}${ITKM_V${t}${d}}" "${ITKT_IT},${ITKT_V${t}${d}}") + set(PyVectorContainerTypes ${ITKM_IT}${ITKM_V${t}${d}}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in + ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp @ONLY) + file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp PyBufferInterfaceTemp) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i ${PyBufferInterfaceTemp}) - itk_wrap_template("${ITKM_IT}${ITKM_P${t}${d}}" "${ITKT_IT},${ITKT_P${t}${d}}") - set(PyVectorContainerTypes ${ITKM_IT}${ITKM_P${t}${d}}) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in - ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - @ONLY) - file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - PyBufferInterfaceTemp) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i - ${PyBufferInterfaceTemp}) + itk_wrap_template("${ITKM_IT}${ITKM_P${t}${d}}" "${ITKT_IT},${ITKT_P${t}${d}}") + set(PyVectorContainerTypes ${ITKM_IT}${ITKM_P${t}${d}}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in + ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp @ONLY) + file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp PyBufferInterfaceTemp) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i ${PyBufferInterfaceTemp}) - itk_wrap_template("${ITKM_IT}M${ITKM_${t}}${d}${d}" "${ITKT_IT}, itk::Matrix< ${ITKT_${t}}, ${d}, ${d} >") - set(PyVectorContainerTypes ${ITKM_IT}M${ITKM_${t}}${d}${d}) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in - ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - @ONLY) - file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - PyBufferInterfaceTemp) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i - ${PyBufferInterfaceTemp}) + itk_wrap_template("${ITKM_IT}M${ITKM_${t}}${d}${d}" "${ITKT_IT}, itk::Matrix< ${ITKT_${t}}, ${d}, ${d} >") + set(PyVectorContainerTypes ${ITKM_IT}M${ITKM_${t}}${d}${d}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in + ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp @ONLY) + file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp PyBufferInterfaceTemp) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i ${PyBufferInterfaceTemp}) - endforeach() endforeach() - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_UC}${ITKM_O${d}}" "${ITKT_UC},${ITKT_O${d}}") - set(ElementType ${ITKM_OT}) - set(PyVectorContainerTypes ${ITKM_UC}${ITKM_O${d}}) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in - ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - @ONLY) - file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - PyBufferInterfaceTemp) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i - ${PyBufferInterfaceTemp}) +endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_UC}${ITKM_O${d}}" "${ITKT_UC},${ITKT_O${d}}") + set(ElementType ${ITKM_OT}) + set(PyVectorContainerTypes ${ITKM_UC}${ITKM_O${d}}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in + ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp @ONLY) + file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp PyBufferInterfaceTemp) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i ${PyBufferInterfaceTemp}) - itk_wrap_template("${ITKM_UI}${ITKM_CID${d}}" "${ITKT_UI},${ITKT_CID${d}}") - set(PyVectorContainerTypes ${ITKM_UI}${ITKM_CID${d}}) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in - ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - @ONLY) - file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - PyBufferInterfaceTemp) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i - ${PyBufferInterfaceTemp}) + itk_wrap_template("${ITKM_UI}${ITKM_CID${d}}" "${ITKT_UI},${ITKT_CID${d}}") + set(PyVectorContainerTypes ${ITKM_UI}${ITKM_CID${d}}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in + ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp @ONLY) + file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp PyBufferInterfaceTemp) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i ${PyBufferInterfaceTemp}) - endforeach() - # used in FastMarchingExtensionImageFilter - itk_wrap_template("${ITKM_UI}${ITKM_VUC1}" "${ITKT_UI},${ITKT_VUC1}") - set(ElementType UC) - set(PyVectorContainerTypes ${ITKM_UI}${ITKM_VUC1}) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in - ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - @ONLY) - file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - PyBufferInterfaceTemp) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i - ${PyBufferInterfaceTemp}) +endforeach() +# used in FastMarchingExtensionImageFilter +itk_wrap_template("${ITKM_UI}${ITKM_VUC1}" "${ITKT_UI},${ITKT_VUC1}") +set(ElementType UC) +set(PyVectorContainerTypes ${ITKM_UI}${ITKM_VUC1}) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in + ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp @ONLY) +file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp PyBufferInterfaceTemp) +file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i ${PyBufferInterfaceTemp}) -itk_wrap_template("${ITKM_IT}S${ITKM_IT}" "${ITKT_IT}, std::set< ${ITKT_IT} >") - set(ElementType IT) - set(PyVectorContainerTypes ${ITKM_IT}S${ITKM_IT}) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in - ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - @ONLY) - file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - PyBufferInterfaceTemp) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i - ${PyBufferInterfaceTemp}) +itk_wrap_template("${ITKM_IT}S${ITKM_IT}" "${ITKT_IT}, std::set< ${ITKT_IT} >") +set(ElementType IT) +set(PyVectorContainerTypes ${ITKM_IT}S${ITKM_IT}) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in + ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp @ONLY) +file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp PyBufferInterfaceTemp) +file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i ${PyBufferInterfaceTemp}) #used in ImageRegistrationMethodv4 - UNIQUE(vectypes "${ITKM_IT};UI;${WRAP_ITK_USIGN_INT}") - foreach(t1 ${vectypes}) - foreach(t2 ${vectypes}) - set(ElementType ${t2}) - itk_wrap_template("${ITKM_${t1}}${ITKM_${t2}}" "${ITKT_${t1}}, ${ITKT_${t2}}") +unique(vectypes "${ITKM_IT};UI;${WRAP_ITK_USIGN_INT}") +foreach(t1 ${vectypes}) + foreach(t2 ${vectypes}) + set(ElementType ${t2}) + itk_wrap_template("${ITKM_${t1}}${ITKM_${t2}}" "${ITKT_${t1}}, ${ITKT_${t2}}") - set(PyVectorContainerTypes ${ITKM_${t1}}${ITKM_${t2}}) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in - ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - @ONLY) - file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp - PyBufferInterfaceTemp) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i - ${PyBufferInterfaceTemp}) - endforeach() + set(PyVectorContainerTypes ${ITKM_${t1}}${ITKM_${t2}}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PyVectorContainerBuffer.i.in + ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp @ONLY) + file(READ ${CMAKE_CURRENT_BINARY_DIR}/PyVectorContainerBuffer.i.temp PyBufferInterfaceTemp) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/PyBuffer.i ${PyBufferInterfaceTemp}) endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Bridge/NumPy/wrapping/test/CMakeLists.txt b/Modules/Bridge/NumPy/wrapping/test/CMakeLists.txt index 1a32a3d7aa9..5a0c87bb9e7 100644 --- a/Modules/Bridge/NumPy/wrapping/test/CMakeLists.txt +++ b/Modules/Bridge/NumPy/wrapping/test/CMakeLists.txt @@ -1,25 +1,37 @@ if(ITK_WRAP_PYTHON) - itk_python_add_test(NAME itkPyBufferTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkPyBufferTest.py - ) - itk_python_add_test(NAME itkPyVnlTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkPyVnlTest.py - ) - itk_python_add_test(NAME itkPyBufferPipelineTest.py - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkPyBufferPipelineTest.py - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ) - itk_python_add_test(NAME itkImageMetaDataSetGetItem.py - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkImageMetaDataSetGetItem.py - DATA{${ITK_DATA_ROOT}/Input/dicom-sc_cs-1.dcm} - ) - itk_python_add_test(NAME itkPyVectorContainerTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkPyVectorContainerTest.py - ) + itk_python_add_test( + NAME + itkPyBufferTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkPyBufferTest.py) + itk_python_add_test( + NAME + itkPyVnlTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkPyVnlTest.py) + itk_python_add_test( + NAME + itkPyBufferPipelineTest.py + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkPyBufferPipelineTest.py + DATA{${ITK_DATA_ROOT}/Input/cthead1.png}) + itk_python_add_test( + NAME + itkImageMetaDataSetGetItem.py + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkImageMetaDataSetGetItem.py + DATA{${ITK_DATA_ROOT}/Input/dicom-sc_cs-1.dcm}) + itk_python_add_test( + NAME + itkPyVectorContainerTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkPyVectorContainerTest.py) if(NOT WIN32) - itk_python_add_test(NAME itkPyBufferMemoryLeakTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkPyBufferMemoryLeakTest.py - ) + itk_python_add_test( + NAME + itkPyBufferMemoryLeakTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkPyBufferMemoryLeakTest.py) endif() endif() diff --git a/Modules/Bridge/VTK/itk-module.cmake b/Modules/Bridge/VTK/itk-module.cmake index 7bf5d7c2c56..e3b28583e59 100644 --- a/Modules/Bridge/VTK/itk-module.cmake +++ b/Modules/Bridge/VTK/itk-module.cmake @@ -1,4 +1,5 @@ -set(DOCUMENTATION "This module contains classes intended to +set(DOCUMENTATION + "This module contains classes intended to interconnect ITK and VTK (The Visualization Toolkit). It is common to combine these two toolkits for the purpose of integrating in a single application the image analysis @@ -10,10 +11,10 @@ and to convert a vtkImageData into an itk::Image, all without having to duplicate their buffers.") -itk_module(ITKVTK +itk_module( + ITKVTK ENABLE_SHARED PRIVATE_DEPENDS - ITKCommon + ITKCommon DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Bridge/VTK/src/CMakeLists.txt b/Modules/Bridge/VTK/src/CMakeLists.txt index 7d05d3b44b2..7a6724554d8 100644 --- a/Modules/Bridge/VTK/src/CMakeLists.txt +++ b/Modules/Bridge/VTK/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKVTK_SRCS - itkVTKImageExportBase.cxx - ) +set(ITKVTK_SRCS itkVTKImageExportBase.cxx) itk_module_add_library(ITKVTK ${ITKVTK_SRCS}) diff --git a/Modules/Bridge/VTK/wrapping/itkVTKImageExport.wrap b/Modules/Bridge/VTK/wrapping/itkVTKImageExport.wrap index 444b4d2a577..759947ff177 100644 --- a/Modules/Bridge/VTK/wrapping/itkVTKImageExport.wrap +++ b/Modules/Bridge/VTK/wrapping/itkVTKImageExport.wrap @@ -1,20 +1,20 @@ itk_wrap_simple_class("itk::VTKImageExportBase" POINTER) itk_wrap_class("itk::VTKImageExport" POINTER) - UNIQUE(types "UC;UL;${WRAP_ITK_SCALAR};${WRAP_ITK_COLOR}") - itk_wrap_filter_dims(dims "1;2;3") +unique(types "UC;UL;${WRAP_ITK_SCALAR};${WRAP_ITK_COLOR}") +itk_wrap_filter_dims(dims "1;2;3") - foreach(t ${types}) - foreach(d ${dims}) - itk_wrap_template("${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}") - endforeach() +foreach(t ${types}) + foreach(d ${dims}) + itk_wrap_template("${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}") endforeach() +endforeach() - foreach(t ${WRAP_ITK_VECTOR}) - foreach(vec_dim ${ITK_WRAP_VECTOR_COMPONENTS}) - foreach(d ${dims}) - itk_wrap_template("${ITKM_I${t}${vec_dim}${d}}" "${ITKT_I${t}${vec_dim}${d}}") - endforeach() +foreach(t ${WRAP_ITK_VECTOR}) + foreach(vec_dim ${ITK_WRAP_VECTOR_COMPONENTS}) + foreach(d ${dims}) + itk_wrap_template("${ITKM_I${t}${vec_dim}${d}}" "${ITKT_I${t}${vec_dim}${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Bridge/VTK/wrapping/itkVTKImageImport.wrap b/Modules/Bridge/VTK/wrapping/itkVTKImageImport.wrap index 624d1c70933..df21dd14dd9 100644 --- a/Modules/Bridge/VTK/wrapping/itkVTKImageImport.wrap +++ b/Modules/Bridge/VTK/wrapping/itkVTKImageImport.wrap @@ -1,18 +1,18 @@ itk_wrap_class("itk::VTKImageImport" POINTER) - UNIQUE(types "UC;UL;${WRAP_ITK_SCALAR};${WRAP_ITK_COLOR}") - itk_wrap_filter_dims(dims "1;2;3") +unique(types "UC;UL;${WRAP_ITK_SCALAR};${WRAP_ITK_COLOR}") +itk_wrap_filter_dims(dims "1;2;3") - foreach(t ${types}) - foreach(d ${dims}) - itk_wrap_template("${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}") - endforeach() +foreach(t ${types}) + foreach(d ${dims}) + itk_wrap_template("${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}") endforeach() +endforeach() - foreach(t ${WRAP_ITK_VECTOR}) - foreach(vec_dim ${ITK_WRAP_VECTOR_COMPONENTS}) - foreach(d ${dims}) - itk_wrap_template("${ITKM_I${t}${vec_dim}${d}}" "${ITKT_I${t}${vec_dim}${d}}") - endforeach() +foreach(t ${WRAP_ITK_VECTOR}) + foreach(vec_dim ${ITK_WRAP_VECTOR_COMPONENTS}) + foreach(d ${dims}) + itk_wrap_template("${ITKM_I${t}${vec_dim}${d}}" "${ITKT_I${t}${vec_dim}${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Bridge/VtkGlue/CMakeLists.txt b/Modules/Bridge/VtkGlue/CMakeLists.txt index c695a968ec1..369e2596f0b 100644 --- a/Modules/Bridge/VtkGlue/CMakeLists.txt +++ b/Modules/Bridge/VtkGlue/CMakeLists.txt @@ -1,5 +1,8 @@ project(ITKVtkGlue) -if(NOT VTK_RENDERING_BACKEND STREQUAL "None") +if(NOT + VTK_RENDERING_BACKEND + STREQUAL + "None") set(ITKVtkGlue_LIBRARIES ITKVtkGlue) endif() @@ -17,21 +20,37 @@ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${VTK_REQUIRED_MODUL # The VTK DICOMParser and vtkmetaio includes conflict with the ITK # versions. Here we remove them from the include directories. # -string(REGEX REPLACE "[^;]*MetaIO;" - "" ITKVtkGlue_VTK_INCLUDE_DIRS "${ITKVtkGlue_VTK_INCLUDE_DIRS}") -string(REGEX REPLACE "[^;]*vtkmetaio;" - "" ITKVtkGlue_VTK_INCLUDE_DIRS "${ITKVtkGlue_VTK_INCLUDE_DIRS}") -string(REGEX REPLACE "[^;]*DICOMParser;" - "" ITKVtkGlue_VTK_INCLUDE_DIRS "${ITKVtkGlue_VTK_INCLUDE_DIRS}") +string( + REGEX + REPLACE "[^;]*MetaIO;" + "" + ITKVtkGlue_VTK_INCLUDE_DIRS + "${ITKVtkGlue_VTK_INCLUDE_DIRS}") +string( + REGEX + REPLACE "[^;]*vtkmetaio;" + "" + ITKVtkGlue_VTK_INCLUDE_DIRS + "${ITKVtkGlue_VTK_INCLUDE_DIRS}") +string( + REGEX + REPLACE "[^;]*DICOMParser;" + "" + ITKVtkGlue_VTK_INCLUDE_DIRS + "${ITKVtkGlue_VTK_INCLUDE_DIRS}") # Set up the include and library dirs needed for the module set(ITKVtkGlue_SYSTEM_INCLUDE_DIRS ${ITKVtkGlue_VTK_INCLUDE_DIRS}) set(ITKVtkGlue_SYSTEM_LIBRARY_DIRS ${ITKVtkGlue_VTK_LIBRARY_DIRS}) # Add preprocessor definitions needed to use VTK. -set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS ${ITKVtkGlue_VTK_DEFINITIONS}) +set_property( + DIRECTORY + APPEND + PROPERTY COMPILE_DEFINITIONS ${ITKVtkGlue_VTK_DEFINITIONS}) -set(ITKVtkGlue_EXPORT_CODE_INSTALL " +set(ITKVtkGlue_EXPORT_CODE_INSTALL + " set(VTK_DIR \"${VTK_DIR}\") find_package(VTK NO_MODULE REQUIRED) @@ -86,7 +105,8 @@ vtk_module_config(ITKVtkGlue_VTK set(ITKVtkGlue_VTK_LIBRARIES \${_required_vtk_libraries}) set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS \${ITKVtkGlue_VTK_DEFINITIONS}) ") -set(ITKVtkGlue_EXPORT_CODE_BUILD " +set(ITKVtkGlue_EXPORT_CODE_BUILD + " if(NOT ITK_BINARY_DIR) set(VTK_DIR \"${VTK_DIR}\") diff --git a/Modules/Bridge/VtkGlue/itk-module-init.cmake b/Modules/Bridge/VtkGlue/itk-module-init.cmake index 07951ae6d4e..9627d3f8fa7 100644 --- a/Modules/Bridge/VtkGlue/itk-module-init.cmake +++ b/Modules/Bridge/VtkGlue/itk-module-init.cmake @@ -10,14 +10,19 @@ find_package(VTK NO_MODULE REQUIRED) if(NOT COMMAND vtk_module_config) macro(vtk_module_config ns) - foreach(arg ${ARGN}) + foreach(arg ${ARGN}) if(${arg} MATCHES "^[Vv][Tt][Kk]") - string(REGEX REPLACE "^[Vv][Tt][Kk]" "" _arg ${arg}) + string( + REGEX + REPLACE "^[Vv][Tt][Kk]" + "" + _arg + ${arg}) else() set(_arg ${arg}) endif() set(${ns}_LIBRARIES ${${ns}_LIBRARIES} VTK::${_arg}) - endforeach() + endforeach() endmacro() if(NOT VTK_RENDERING_BACKEND) @@ -46,28 +51,32 @@ if(TARGET ${_target_prefix}RenderingFreeType${VTK_RENDERING_BACKEND}) set(_target_freetypeopengl ${_target_prefix}RenderingFreeType${VTK_RENDERING_BACKEND}) endif() -set(_required_vtk_libraries - ${_target_prefix}IOImage - ${_target_prefix}ImagingSources - ) +set(_required_vtk_libraries ${_target_prefix}IOImage ${_target_prefix}ImagingSources) if(ITK_WRAP_PYTHON) - list(APPEND _required_vtk_libraries ${_target_prefix}WrappingPythonCore - ${_target_prefix}CommonCore ${_target_prefix}CommonDataModel ${_target_prefix}CommonExecutionModel) + list( + APPEND + _required_vtk_libraries + ${_target_prefix}WrappingPythonCore + ${_target_prefix}CommonCore + ${_target_prefix}CommonDataModel + ${_target_prefix}CommonExecutionModel) endif() -if(NOT VTK_RENDERING_BACKEND STREQUAL "None") - list(APPEND _required_vtk_libraries +if(NOT + VTK_RENDERING_BACKEND + STREQUAL + "None") + list( + APPEND + _required_vtk_libraries ${_target_prefix}Rendering${VTK_RENDERING_BACKEND} ${_target_prefix}RenderingFreeType ${_target_freetypeopengl} ${_target_prefix}InteractionStyle - ${_target_prefix}InteractionWidgets - ) + ${_target_prefix}InteractionWidgets) endif() -if (${VTK_VERSION} VERSION_LESS ${VERSION_MIN}) +if(${VTK_VERSION} VERSION_LESS ${VERSION_MIN}) message(ERROR " VtkGlue requires VTK version ${VERSION_MIN} or newer but the current version is ${VTK_VERSION}") else() - vtk_module_config(ITKVtkGlue_VTK - ${_required_vtk_libraries} - ) + vtk_module_config(ITKVtkGlue_VTK ${_required_vtk_libraries}) set(ITKVtkGlue_VTK_LIBRARIES ${_required_vtk_libraries}) endif() diff --git a/Modules/Bridge/VtkGlue/itk-module.cmake b/Modules/Bridge/VtkGlue/itk-module.cmake index e6750eb281a..1b6719513b6 100644 --- a/Modules/Bridge/VtkGlue/itk-module.cmake +++ b/Modules/Bridge/VtkGlue/itk-module.cmake @@ -1,22 +1,23 @@ set(DOCUMENTATION "This module contains classes that provide an interface between ITK and VTK.") -itk_module(ITKVtkGlue +itk_module( + ITKVtkGlue ENABLE_SHARED DEPENDS - ITKCommon - ITKVTK + ITKCommon + ITKVTK COMPILE_DEPENDS - ITKImageIntensity + ITKImageIntensity TEST_DEPENDS - ITKTestKernel - ITKVTK - ITKSmoothing - ITKLabelMap - ITKImageFusion + ITKTestKernel + ITKVTK + ITKSmoothing + ITKLabelMap + ITKImageFusion EXCLUDE_FROM_DEFAULT DESCRIPTION - "${DOCUMENTATION}") + "${DOCUMENTATION}") # extra test dependency on Smoothing is introduced by itkVtkMedianImagefilterTest. # extra test dependency on ImageCompose is introduced by QuickViewTest. diff --git a/Modules/Bridge/VtkGlue/src/CMakeLists.txt b/Modules/Bridge/VtkGlue/src/CMakeLists.txt index 967af39a742..c66896d0b4d 100644 --- a/Modules/Bridge/VtkGlue/src/CMakeLists.txt +++ b/Modules/Bridge/VtkGlue/src/CMakeLists.txt @@ -1,7 +1,8 @@ -if(NOT VTK_RENDERING_BACKEND STREQUAL "None") - set(ITKVtkGlue_SRCS - QuickView.cxx - ) +if(NOT + VTK_RENDERING_BACKEND + STREQUAL + "None") + set(ITKVtkGlue_SRCS QuickView.cxx) add_library(ITKVtkGlue ${ITKVtkGlue_SRCS}) itk_module_link_dependencies() diff --git a/Modules/Bridge/VtkGlue/test/CMakeLists.txt b/Modules/Bridge/VtkGlue/test/CMakeLists.txt index 06b3e1489d2..be8842a74ff 100644 --- a/Modules/Bridge/VtkGlue/test/CMakeLists.txt +++ b/Modules/Bridge/VtkGlue/test/CMakeLists.txt @@ -1,11 +1,13 @@ itk_module_test() -set(ITKVtkGlueTests - itkImageToVTKImageFilterTest.cxx - itkImageToVTKImageFilterRGBTest.cxx - itkVTKImageToImageFilterTest.cxx -) -if(NOT VTK_RENDERING_BACKEND STREQUAL "None") - list(APPEND ITKVtkGlueTests +set(ITKVtkGlueTests itkImageToVTKImageFilterTest.cxx itkImageToVTKImageFilterRGBTest.cxx + itkVTKImageToImageFilterTest.cxx) +if(NOT + VTK_RENDERING_BACKEND + STREQUAL + "None") + list( + APPEND + ITKVtkGlueTests itkVtkMedianFilterTest.cxx itkVtkConnectedComponentImageFilterTest.cxx QuickViewTest.cxx @@ -14,52 +16,84 @@ if(NOT VTK_RENDERING_BACKEND STREQUAL "None") # ITKVtkGlueTestDriver runViewImage image_file # or with a string to change title window, and change size of window # ITKVtkGlueTestDriver runViewImage image_file "MyImage" - runViewImage.cxx - ) + runViewImage.cxx) endif() -CreateTestDriver(ITKVtkGlue "${ITKVtkGlue-Test_LIBRARIES}" "${ITKVtkGlueTests}") +createtestdriver(ITKVtkGlue "${ITKVtkGlue-Test_LIBRARIES}" "${ITKVtkGlueTests}") if(VTK_VERSION VERSION_GREATER_EQUAL "8.90.0") vtk_module_autoinit( - TARGETS ITKVtkGlueTestDriver - MODULES ${_required_vtk_libraries}) + TARGETS + ITKVtkGlueTestDriver + MODULES + ${_required_vtk_libraries}) endif() itk_add_test( - NAME itkImageToVTKImageFilterTest - COMMAND ITKVtkGlueTestDriver - itkImageToVTKImageFilterTest) + NAME + itkImageToVTKImageFilterTest + COMMAND + ITKVtkGlueTestDriver + itkImageToVTKImageFilterTest) itk_add_test( - NAME itkImageToVTKImageFilterRGBTest - COMMAND ITKVtkGlueTestDriver - itkImageToVTKImageFilterRGBTest - DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png}) + NAME + itkImageToVTKImageFilterRGBTest + COMMAND + ITKVtkGlueTestDriver + itkImageToVTKImageFilterRGBTest + DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png}) itk_add_test( - NAME itkVTKImageToImageFilterTest - COMMAND ITKVtkGlueTestDriver - itkVTKImageToImageFilterTest) + NAME + itkVTKImageToImageFilterTest + COMMAND + ITKVtkGlueTestDriver + itkVTKImageToImageFilterTest) -if(NOT VTK_RENDERING_BACKEND STREQUAL "None") +if(NOT + VTK_RENDERING_BACKEND + STREQUAL + "None") itk_add_test( - NAME itkVtkMedianImageFilterTest - COMMAND ITKVtkGlueTestDriver - itkVtkMedianFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} 2) - set_property(TEST itkVtkMedianImageFilterTest APPEND PROPERTY LABELS REQUIRES_DISPLAY) + NAME + itkVtkMedianImageFilterTest + COMMAND + ITKVtkGlueTestDriver + itkVtkMedianFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + 2) + set_property( + TEST itkVtkMedianImageFilterTest + APPEND + PROPERTY LABELS REQUIRES_DISPLAY) itk_add_test( - NAME QuickViewTest - COMMAND ITKVtkGlueTestDriver - --compare DATA{Baseline/QuickViewTest.png,:} - ${ITK_TEST_OUTPUT_DIR}/QuickViewTest0.png - --compareNumberOfPixelsTolerance 1500 - QuickViewTest DATA{${ITK_DATA_ROOT}/Input/peppers.png} ${ITK_TEST_OUTPUT_DIR}) - set_property(TEST QuickViewTest APPEND PROPERTY LABELS REQUIRES_DISPLAY) + NAME + QuickViewTest + COMMAND + ITKVtkGlueTestDriver + --compare + DATA{Baseline/QuickViewTest.png,:} + ${ITK_TEST_OUTPUT_DIR}/QuickViewTest0.png + --compareNumberOfPixelsTolerance + 1500 + QuickViewTest + DATA{${ITK_DATA_ROOT}/Input/peppers.png} + ${ITK_TEST_OUTPUT_DIR}) + set_property( + TEST QuickViewTest + APPEND + PROPERTY LABELS REQUIRES_DISPLAY) itk_add_test( - NAME itkVtkConnectedComponentImageFilterTest - COMMAND ITKVtkGlueTestDriver - itkVtkConnectedComponentImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png}) - set_property(TEST itkVtkConnectedComponentImageFilterTest APPEND PROPERTY LABELS REQUIRES_DISPLAY) + NAME + itkVtkConnectedComponentImageFilterTest + COMMAND + ITKVtkGlueTestDriver + itkVtkConnectedComponentImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png}) + set_property( + TEST itkVtkConnectedComponentImageFilterTest + APPEND + PROPERTY LABELS REQUIRES_DISPLAY) endif() diff --git a/Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt b/Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt index 5c0e6643bba..3a9add5548d 100644 --- a/Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt +++ b/Modules/Bridge/VtkGlue/wrapping/CMakeLists.txt @@ -1,5 +1,8 @@ # Forward include directories to CastXML -if(NOT VTK_RENDERING_BACKEND STREQUAL "None") +if(NOT + VTK_RENDERING_BACKEND + STREQUAL + "None") foreach(_vtk_lib IN LISTS ITKVtkGlue_VTK_LIBRARIES) get_target_property(_vtk_lib_include_dirs ${_vtk_lib} INTERFACE_INCLUDE_DIRECTORIES) if(_vtk_lib_include_dirs) @@ -9,15 +12,14 @@ if(NOT VTK_RENDERING_BACKEND STREQUAL "None") endif() itk_wrap_module(ITKVtkGlue) - if("${VTK_VERSION}" VERSION_LESS 7.0.0) - message(WARNING - "The ITKVtkGlue module can only built with Python 3 and VTK >= 7.\n" - "Only the c++ version of the module will be built.") - else() - list(APPEND WRAPPER_SWIG_LIBRARY_FILES "${CMAKE_CURRENT_SOURCE_DIR}/VtkGlue.i") - set(WRAPPER_LIBRARY_DEPENDS ITKCommon ITKVTK) +if("${VTK_VERSION}" VERSION_LESS 7.0.0) + message(WARNING "The ITKVtkGlue module can only built with Python 3 and VTK >= 7.\n" + "Only the c++ version of the module will be built.") +else() + list(APPEND WRAPPER_SWIG_LIBRARY_FILES "${CMAKE_CURRENT_SOURCE_DIR}/VtkGlue.i") + set(WRAPPER_LIBRARY_DEPENDS ITKCommon ITKVTK) - set(WRAPPER_LIBRARY_LINK_LIBRARIES ${ITK_LIBRARIES}) + set(WRAPPER_LIBRARY_LINK_LIBRARIES ${ITK_LIBRARIES}) - itk_auto_load_and_end_wrap_submodules() - endif() + itk_auto_load_and_end_wrap_submodules() +endif() diff --git a/Modules/Bridge/VtkGlue/wrapping/itkImageToVTKImageFilter.wrap b/Modules/Bridge/VtkGlue/wrapping/itkImageToVTKImageFilter.wrap index e329acc4d3a..344bdab448d 100644 --- a/Modules/Bridge/VtkGlue/wrapping/itkImageToVTKImageFilter.wrap +++ b/Modules/Bridge/VtkGlue/wrapping/itkImageToVTKImageFilter.wrap @@ -1,14 +1,14 @@ itk_wrap_class("itk::ImageToVTKImageFilter" POINTER) - UNIQUE(image_types "UC;UL;${WRAP_ITK_SCALAR};${WRAP_ITK_COLOR}") - itk_wrap_filter_dims(dims "1;2;3") +unique(image_types "UC;UL;${WRAP_ITK_SCALAR};${WRAP_ITK_COLOR}") +itk_wrap_filter_dims(dims "1;2;3") - itk_wrap_image_filter("${image_types}" 1 "${dims}") +itk_wrap_image_filter("${image_types}" 1 "${dims}") - foreach(t ${WRAP_ITK_VECTOR}) - foreach(vec_dim ${ITK_WRAP_VECTOR_COMPONENTS}) - foreach(d ${dims}) - itk_wrap_template("${ITKM_I${t}${vec_dim}${d}}" "${ITKT_I${t}${vec_dim}${d}}") - endforeach() +foreach(t ${WRAP_ITK_VECTOR}) + foreach(vec_dim ${ITK_WRAP_VECTOR_COMPONENTS}) + foreach(d ${dims}) + itk_wrap_template("${ITKM_I${t}${vec_dim}${d}}" "${ITKT_I${t}${vec_dim}${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Bridge/VtkGlue/wrapping/itkVTKImageToImageFilter.wrap b/Modules/Bridge/VtkGlue/wrapping/itkVTKImageToImageFilter.wrap index 54ad657c340..0c91a42c236 100644 --- a/Modules/Bridge/VtkGlue/wrapping/itkVTKImageToImageFilter.wrap +++ b/Modules/Bridge/VtkGlue/wrapping/itkVTKImageToImageFilter.wrap @@ -1,14 +1,14 @@ itk_wrap_class("itk::VTKImageToImageFilter" POINTER) - UNIQUE(image_types "UC;UL;${WRAP_ITK_SCALAR};${WRAP_ITK_COLOR}") - itk_wrap_filter_dims(dims "1;2;3") +unique(image_types "UC;UL;${WRAP_ITK_SCALAR};${WRAP_ITK_COLOR}") +itk_wrap_filter_dims(dims "1;2;3") - itk_wrap_image_filter("${image_types}" 1 "${dims}") +itk_wrap_image_filter("${image_types}" 1 "${dims}") - foreach(t ${WRAP_ITK_VECTOR}) - foreach(vec_dim ${ITK_WRAP_VECTOR_COMPONENTS}) - foreach(d ${dims}) - itk_wrap_template("${ITKM_I${t}${vec_dim}${d}}" "${ITKT_I${t}${vec_dim}${d}}") - endforeach() +foreach(t ${WRAP_ITK_VECTOR}) + foreach(vec_dim ${ITK_WRAP_VECTOR_COMPONENTS}) + foreach(d ${dims}) + itk_wrap_template("${ITKM_I${t}${vec_dim}${d}}" "${ITKT_I${t}${vec_dim}${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Bridge/VtkGlue/wrapping/itkViewImage.wrap b/Modules/Bridge/VtkGlue/wrapping/itkViewImage.wrap index 97751ffc013..0b4aa6cae29 100644 --- a/Modules/Bridge/VtkGlue/wrapping/itkViewImage.wrap +++ b/Modules/Bridge/VtkGlue/wrapping/itkViewImage.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::ViewImage") - UNIQUE(types "${WRAP_ITK_SCALAR}") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}") - endforeach() +unique(types "${WRAP_ITK_SCALAR}") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Compatibility/Deprecated/itk-module.cmake b/Modules/Compatibility/Deprecated/itk-module.cmake index 77094231d69..a04eee547b3 100644 --- a/Modules/Compatibility/Deprecated/itk-module.cmake +++ b/Modules/Compatibility/Deprecated/itk-module.cmake @@ -2,19 +2,19 @@ set(DOCUMENTATION "This is a collection of classes that are intended to be removed from the toolkit.") set(ITKDeprecatedOnByDefault EXCLUDE_FROM_DEFAULT) -if (ITKV4_COMPATIBILITY) +if(ITKV4_COMPATIBILITY) set(ITKDeprecatedOnByDefault "") endif() -itk_module(ITKDeprecated +itk_module( + ITKDeprecated DEPENDS - ITKCommon - ITKTransform - ITKImageFunction + ITKCommon + ITKTransform + ITKImageFunction TEST_DEPENDS - ITKTestKernel + ITKTestKernel ${ITKDeprecatedOnByDefault} ENABLE_SHARED DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Compatibility/Deprecated/src/CMakeLists.txt b/Modules/Compatibility/Deprecated/src/CMakeLists.txt index a4fb67c2f20..6c58174f062 100644 --- a/Modules/Compatibility/Deprecated/src/CMakeLists.txt +++ b/Modules/Compatibility/Deprecated/src/CMakeLists.txt @@ -1,9 +1,8 @@ set(ITKDeprecated_SRCS - itkBarrier.cxx - itkConditionVariable.cxx - itkFastMutexLock.cxx - itkMutexLock.cxx - itkSimpleFastMutexLock.cxx - ) + itkBarrier.cxx + itkConditionVariable.cxx + itkFastMutexLock.cxx + itkMutexLock.cxx + itkSimpleFastMutexLock.cxx) itk_module_add_library(ITKDeprecated ${ITKDeprecated_SRCS}) diff --git a/Modules/Compatibility/Deprecated/test/CMakeLists.txt b/Modules/Compatibility/Deprecated/test/CMakeLists.txt index 4c4065d9276..955cc632658 100644 --- a/Modules/Compatibility/Deprecated/test/CMakeLists.txt +++ b/Modules/Compatibility/Deprecated/test/CMakeLists.txt @@ -1,48 +1,98 @@ itk_module_test() set(ITKDeprecatedTests -itkAtomicIntTest.cxx -itkBarrierTest.cxx -itkConditionVariableTest.cxx -itkSimpleFastMutexLockTest.cxx -itkVectorCentralDifferenceImageFunctionTest.cxx -itkVectorResampleImageFilterTest.cxx -itkTreeContainerTest.cxx -itkTreeContainerTest2.cxx -) - -if (NOT ITK_LEGACY_REMOVE) + itkAtomicIntTest.cxx + itkBarrierTest.cxx + itkConditionVariableTest.cxx + itkSimpleFastMutexLockTest.cxx + itkVectorCentralDifferenceImageFunctionTest.cxx + itkVectorResampleImageFilterTest.cxx + itkTreeContainerTest.cxx + itkTreeContainerTest2.cxx) + +if(NOT ITK_LEGACY_REMOVE) list(APPEND ITKDeprecatedTests itkSpawnThreadTest.cxx) endif() -CreateTestDriver(ITKDeprecated "${ITKDeprecated-Test_LIBRARIES}" "${ITKDeprecatedTests}") +createtestdriver(ITKDeprecated "${ITKDeprecated-Test_LIBRARIES}" "${ITKDeprecatedTests}") set(BASELINE "${ITK_DATA_ROOT}/Baseline/Common") set(TEMP ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkAtomicIntTest COMMAND ITKDeprecatedTestDriver itkAtomicIntTest) +itk_add_test( + NAME + itkAtomicIntTest + COMMAND + ITKDeprecatedTestDriver + itkAtomicIntTest) if(NOT MINGW) -itk_add_test(NAME itkBarrierTest COMMAND ITKDeprecatedTestDriver itkBarrierTest) -itk_add_test(NAME itkBarrierTest107 COMMAND ITKDeprecatedTestDriver itkBarrierTest 107) -itk_add_test(NAME itkConditionVariableTest COMMAND ITKDeprecatedTestDriver itkConditionVariableTest) + itk_add_test( + NAME + itkBarrierTest + COMMAND + ITKDeprecatedTestDriver + itkBarrierTest) + itk_add_test( + NAME + itkBarrierTest107 + COMMAND + ITKDeprecatedTestDriver + itkBarrierTest + 107) + itk_add_test( + NAME + itkConditionVariableTest + COMMAND + ITKDeprecatedTestDriver + itkConditionVariableTest) endif() -itk_add_test(NAME itkSimpleFastMutexLockTest COMMAND ITKDeprecatedTestDriver itkSimpleFastMutexLockTest) +itk_add_test( + NAME + itkSimpleFastMutexLockTest + COMMAND + ITKDeprecatedTestDriver + itkSimpleFastMutexLockTest) # short timeout because failing test will hang and test is quite small set_tests_properties(itkSimpleFastMutexLockTest PROPERTIES TIMEOUT 60) -if (NOT ITK_LEGACY_REMOVE) - itk_add_test(NAME itkSpawnThreadTest COMMAND ITKDeprecatedTestDriver itkSpawnThreadTest 100) +if(NOT ITK_LEGACY_REMOVE) + itk_add_test( + NAME + itkSpawnThreadTest + COMMAND + ITKDeprecatedTestDriver + itkSpawnThreadTest + 100) endif() -itk_add_test(NAME itkVectorCentralDifferenceImageFunctionTest - COMMAND ITKDeprecatedTestDriver itkVectorCentralDifferenceImageFunctionTest) +itk_add_test( + NAME + itkVectorCentralDifferenceImageFunctionTest + COMMAND + ITKDeprecatedTestDriver + itkVectorCentralDifferenceImageFunctionTest) -itk_add_test(NAME itkVectorResampleImageFilterTest - COMMAND ITKDeprecatedTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/VectorResampleImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/VectorResampleImageFilterTest.png - itkVectorResampleImageFilterTest ${ITK_TEST_OUTPUT_DIR}/VectorResampleImageFilterTest.png) +itk_add_test( + NAME + itkVectorResampleImageFilterTest + COMMAND + ITKDeprecatedTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/VectorResampleImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/VectorResampleImageFilterTest.png + itkVectorResampleImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/VectorResampleImageFilterTest.png) -itk_add_test(NAME itkTreeContainerTest COMMAND ITKDeprecatedTestDriver itkTreeContainerTest) -itk_add_test(NAME itkTreeContainerTest2 COMMAND ITKDeprecatedTestDriver itkTreeContainerTest2) +itk_add_test( + NAME + itkTreeContainerTest + COMMAND + ITKDeprecatedTestDriver + itkTreeContainerTest) +itk_add_test( + NAME + itkTreeContainerTest2 + COMMAND + ITKDeprecatedTestDriver + itkTreeContainerTest2) diff --git a/Modules/Compatibility/Deprecated/wrapping/itkImageTransformer.wrap b/Modules/Compatibility/Deprecated/wrapping/itkImageTransformer.wrap index 30d470b8567..e8f43819894 100644 --- a/Modules/Compatibility/Deprecated/wrapping/itkImageTransformer.wrap +++ b/Modules/Compatibility/Deprecated/wrapping/itkImageTransformer.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::ImageTransformer" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(type ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_VI${type}${d}}" "${ITKT_VI${type}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(type ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_VI${type}${d}}" "${ITKT_VI${type}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Compatibility/Deprecated/wrapping/itkVectorCastImageFilter.wrap b/Modules/Compatibility/Deprecated/wrapping/itkVectorCastImageFilter.wrap index 6766af4b2f2..fff6d81d143 100644 --- a/Modules/Compatibility/Deprecated/wrapping/itkVectorCastImageFilter.wrap +++ b/Modules/Compatibility/Deprecated/wrapping/itkVectorCastImageFilter.wrap @@ -1,12 +1,12 @@ itk_wrap_class("itk::VectorCastImageFilter" POINTER_WITH_SUPERCLASS) - # vector <-> vector - itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_VECTOR}") +# vector <-> vector +itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_VECTOR}") - # RGB <-> RGB - UNIQUE(rgb "RGBUC;${WRAP_ITK_RGB}") - itk_wrap_image_filter_combinations("${rgb}" "${rgb}") +# RGB <-> RGB +unique(rgb "RGBUC;${WRAP_ITK_RGB}") +itk_wrap_image_filter_combinations("${rgb}" "${rgb}") - # vector <-> RGB - # itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_RGB}" 3) - # itk_wrap_image_filter_combinations("${WRAP_ITK_RGB}" "${WRAP_ITK_VECTOR}" 3) +# vector <-> RGB +# itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_RGB}" 3) +# itk_wrap_image_filter_combinations("${WRAP_ITK_RGB}" "${WRAP_ITK_VECTOR}" 3) itk_end_wrap_class() diff --git a/Modules/Compatibility/Deprecated/wrapping/itkVectorResampleImageFilter.wrap b/Modules/Compatibility/Deprecated/wrapping/itkVectorResampleImageFilter.wrap index 65aff344f12..7a136022d7e 100644 --- a/Modules/Compatibility/Deprecated/wrapping/itkVectorResampleImageFilter.wrap +++ b/Modules/Compatibility/Deprecated/wrapping/itkVectorResampleImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::VectorResampleImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_VECTOR_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_VECTOR_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Core/Common/CMake/CheckCPPDirective.cmake b/Modules/Core/Common/CMake/CheckCPPDirective.cmake index 078c8cf33b8..91fcb40e940 100644 --- a/Modules/Core/Common/CMake/CheckCPPDirective.cmake +++ b/Modules/Core/Common/CMake/CheckCPPDirective.cmake @@ -7,26 +7,28 @@ get_filename_component(_CheckCPPDirective_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) macro(CHECK_CPP_DIRECTIVE_EXISTS DIRECTIVE VARIABLE) - if(NOT DEFINED "HAVE_${VARIABLE}") - message(STATUS "Checking to see if this platform has the ${DIRECTIVE} C-Preprocessor directive") - set(DIRECTIVE ${DIRECTIVE}) - configure_file(${_CheckCPPDirective_DIR}/CheckCPPDirectiveExists.cxx.in - ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckCPPDirectiveExists.cxx) - try_compile(${VARIABLE} - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckCPPDirectiveExists.cxx - OUTPUT_VARIABLE OUTPUT) - if(${VARIABLE}) - set(HAVE_${VARIABLE} TRUE CACHE INTERNAL " ") - message(STATUS "Checking to see if this platform supports has the ${DIRECTIVE} C-Preprocessor directive - yes") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Checking to see if this platform supports has the ${DIRECTIVE} C-Preprocessor directive with " - "the following output:\n${OUTPUT}\n\n") - else() - message(STATUS "Checking to see if this platform supports has the ${DIRECTIVE} C-Preprocessor directive - no") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Checking to see if this platform supports has the ${DIRECTIVE} C-Preprocessor directive with " - "the following output:\n${OUTPUT}\n\n") - endif() + if(NOT DEFINED "HAVE_${VARIABLE}") + message(STATUS "Checking to see if this platform has the ${DIRECTIVE} C-Preprocessor directive") + set(DIRECTIVE ${DIRECTIVE}) + configure_file(${_CheckCPPDirective_DIR}/CheckCPPDirectiveExists.cxx.in + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckCPPDirectiveExists.cxx) + try_compile( + ${VARIABLE} ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckCPPDirectiveExists.cxx + OUTPUT_VARIABLE OUTPUT) + if(${VARIABLE}) + set(HAVE_${VARIABLE} + TRUE + CACHE INTERNAL " ") + message(STATUS "Checking to see if this platform supports has the ${DIRECTIVE} C-Preprocessor directive - yes") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Checking to see if this platform supports has the ${DIRECTIVE} C-Preprocessor directive with " + "the following output:\n${OUTPUT}\n\n") + else() + message(STATUS "Checking to see if this platform supports has the ${DIRECTIVE} C-Preprocessor directive - no") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Checking to see if this platform supports has the ${DIRECTIVE} C-Preprocessor directive with " + "the following output:\n${OUTPUT}\n\n") + endif() endif() endmacro() diff --git a/Modules/Core/Common/CMake/itkCheckPrivateDynamicCast.cmake b/Modules/Core/Common/CMake/itkCheckPrivateDynamicCast.cmake index e248db4a24c..a265f1b2e32 100644 --- a/Modules/Core/Common/CMake/itkCheckPrivateDynamicCast.cmake +++ b/Modules/Core/Common/CMake/itkCheckPrivateDynamicCast.cmake @@ -12,15 +12,17 @@ function(_itkCheckPrivateDynamicCast) set(VARIABLE "ITK_PRIVATE_DYNAMIC_CAST") if(MSVC) - set("${VARIABLE}" 1 CACHE INTERNAL - "MSVC is know to support dynamic_cast of private symbols." FORCE) + set("${VARIABLE}" + 1 + CACHE INTERNAL "MSVC is know to support dynamic_cast of private symbols." FORCE) return() endif() set(test_project_dir "${PROJECT_BINARY_DIR}/CMakeTmp/${VARIABLE}") - - file(WRITE "${test_project_dir}/base.h" " + file( + WRITE "${test_project_dir}/base.h" + " struct __attribute__ ((visibility (\"default\"))) base { virtual ~base() = 0; @@ -31,15 +33,18 @@ template struct derived : public base{ ~derived() {};}; base* create(void) __attribute__ ((visibility (\"default\"))); ") - file(WRITE "${test_project_dir}/base.cxx" " + file( + WRITE "${test_project_dir}/base.cxx" + " #include \"base.h\" base::~base() {} base* create(void) { return new derived(); } ") - - file(WRITE "${test_project_dir}/main.cxx" " + file( + WRITE "${test_project_dir}/main.cxx" + " #include \"base.h\" int main(void) @@ -47,11 +52,13 @@ int main(void) return bool(dynamic_cast*>(create()))?0:1; }") -# we cannot use a "try_run" here because of the complexity of the -# test project with shared libraries, and visibility flags. The run is -# accomplished with a custom command as a post build step for the -# compilation of the executable. - file(WRITE "${test_project_dir}/CMakeLists.txt" " + # we cannot use a "try_run" here because of the complexity of the + # test project with shared libraries, and visibility flags. The run is + # accomplished with a custom command as a post build step for the + # compilation of the executable. + file( + WRITE "${test_project_dir}/CMakeLists.txt" + " cmake_minimum_required(VERSION 3.16.3 FATAL_ERROR) foreach(p ## Only policies introduced after the cmake_minimum_required @@ -71,26 +78,20 @@ target_link_libraries(test_cast PRIVATE base) add_custom_command(TARGET test_cast POST_BUILD COMMAND $) ") - - - try_compile(${VARIABLE} - "${test_project_dir}" - "${test_project_dir}" - support_private_dynamic_cast - CMAKE_FLAGS - "-DCMAKE_MACOSX_RPATH=OFF" + try_compile( + ${VARIABLE} "${test_project_dir}" + "${test_project_dir}" support_private_dynamic_cast + CMAKE_FLAGS "-DCMAKE_MACOSX_RPATH=OFF" OUTPUT_VARIABLE output) if(${VARIABLE}) message(STATUS "Performing Test ${VARIABLE} - Success") else() - message(STATUS "Performing Test ${VARIABLE} - Failed") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Performing Test ${VARIABLE} failed with the following output:\n" - "${OUTPUT}\n") - endif() + message(STATUS "Performing Test ${VARIABLE} - Failed") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Performing Test ${VARIABLE} failed with the following output:\n" "${OUTPUT}\n") + endif() endfunction() - -_itkCheckPrivateDynamicCast() +_itkcheckprivatedynamiccast() diff --git a/Modules/Core/Common/CMakeLists.txt b/Modules/Core/Common/CMakeLists.txt index 06ef4d1583f..d249464b0d4 100644 --- a/Modules/Core/Common/CMakeLists.txt +++ b/Modules/Core/Common/CMakeLists.txt @@ -19,14 +19,26 @@ elseif(CMAKE_USE_PTHREADS_INIT AND NOT EMSCRIPTEN) elseif(CMAKE_HP_PTHREADS_INIT) set(ITK_HP_PTHREADS 1) endif() -set(CMAKE_THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}" CACHE STRING "Thread library used.") +set(CMAKE_THREAD_LIBS + "${CMAKE_THREAD_LIBS_INIT}" + CACHE STRING "Thread library used.") mark_as_advanced(CMAKE_THREAD_LIBS) -set(ITK_DEFAULT_MAX_THREADS 128 CACHE STRING "The maximum number of threads allowed. Default: 128") +set(ITK_DEFAULT_MAX_THREADS + 128 + CACHE STRING "The maximum number of threads allowed. Default: 128") mark_as_advanced(ITK_DEFAULT_MAX_THREADS) -set(ITK_DEFAULT_THREADER "Auto" CACHE STRING "Default multithreader.") +set(ITK_DEFAULT_THREADER + "Auto" + CACHE STRING "Default multithreader.") mark_as_advanced(ITK_DEFAULT_THREADER) -set_property(CACHE ITK_DEFAULT_THREADER PROPERTY STRINGS Auto TBB Pool Platform) +set_property( + CACHE ITK_DEFAULT_THREADER + PROPERTY STRINGS + Auto + TBB + Pool + Platform) # See if compiler preprocessor has the __FUNCTION__ directive used by itkExceptionMacro include(CheckCPPDirective) @@ -40,75 +52,54 @@ check_include_files(fenv.h HAVE_FENV_H) check_include_files("unistd.h" HAVE_UNISTD_H) if(CMAKE_CXX_STANDARD) - set(TRY_COMP_CXX_STANDARD - -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD}) + set(TRY_COMP_CXX_STANDARD -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD}) endif() # Identify the version of CXX compiler used when ITK was built. This needs to be # identified so that external applications can identify how ITK was built. set(ITK_COMPILED_CXX_STANDARD_VERSION 1) foreach(CXX_TEST_VERSION 201103L 201402L 201703L) - try_compile(ITK_MIN_CXX_LEVEL_TEST - ${CMAKE_CURRENT_BINARY_DIR}/CMakeTmp + try_compile( + ITK_MIN_CXX_LEVEL_TEST ${CMAKE_CURRENT_BINARY_DIR}/CMakeTmp ${CMAKE_CURRENT_LIST_DIR}/CMake/itkGetCXXCompilerVersion.cxx - CMAKE_FLAGS - ${TRY_COMP_CXX_STANDARD} + CMAKE_FLAGS ${TRY_COMP_CXX_STANDARD} COMPILE_DEFINITIONS -DITK_CXX_TEST_VERSION=${CXX_TEST_VERSION} - OUTPUT_VARIABLE ITK_COMPILED_CXX_STANDARD_VERSION_LOG - ) + OUTPUT_VARIABLE ITK_COMPILED_CXX_STANDARD_VERSION_LOG) if(ITK_MIN_CXX_LEVEL_TEST) - set(ITK_COMPILED_CXX_STANDARD_VERSION ${CXX_TEST_VERSION}) + set(ITK_COMPILED_CXX_STANDARD_VERSION ${CXX_TEST_VERSION}) endif() endforeach() -try_compile(ITK_HAS_GNU_ATTRIBUTE_ALIGNED - ${ITK_BINARY_DIR} +try_compile( + ITK_HAS_GNU_ATTRIBUTE_ALIGNED ${ITK_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasGNUAttributeAligned.cxx CMAKE_FLAGS "-DCMAKE_BUILD_TYPE:STRING=Debug") set(ITK_WINDOWS_EXPORT_ALL_SYMBOLS ${CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS}) -try_compile(ITK_HAS_MALLINFO - ${ITK_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasMallinfo.cxx - ) - -try_compile(ITK_HAS_MALLINFO2 - ${ITK_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasMallinfo2.cxx - ) - -try_compile(ITK_HAS_FEENABLEEXCEPT - ${ITK_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasFeenableexcept.cxx - ) - -try_compile(ITK_HAS_FEGETENV - ${ITK_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasFegetenv.cxx - ) - -try_compile(ITK_HAS_FESETENV - ${ITK_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasFesetenv.cxx - ) - -try_compile(ITK_HAS_STRUCT_FENV_T_CONTROL - ${ITK_BINARY_DIR} +try_compile(ITK_HAS_MALLINFO ${ITK_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasMallinfo.cxx) + +try_compile(ITK_HAS_MALLINFO2 ${ITK_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasMallinfo2.cxx) + +try_compile(ITK_HAS_FEENABLEEXCEPT ${ITK_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasFeenableexcept.cxx) + +try_compile(ITK_HAS_FEGETENV ${ITK_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasFegetenv.cxx) + +try_compile(ITK_HAS_FESETENV ${ITK_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasFesetenv.cxx) + +try_compile( + ITK_HAS_STRUCT_FENV_T_CONTROL ${ITK_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasFenvtStructMember.cxx - COMPILE_DEFINITIONS -DITK_CHECK_FENV_T_CONTROL - ) + COMPILE_DEFINITIONS -DITK_CHECK_FENV_T_CONTROL) -try_compile(ITK_HAS_STRUCT_FENV_T_CONTROL_WORD - ${ITK_BINARY_DIR} +try_compile( + ITK_HAS_STRUCT_FENV_T_CONTROL_WORD ${ITK_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasFenvtStructMember.cxx - COMPILE_DEFINITIONS -DITK_CHECK_FENV_T_CONTROL_WORD - ) + COMPILE_DEFINITIONS -DITK_CHECK_FENV_T_CONTROL_WORD) -try_compile(ITK_HAS_STRUCT_FENV_T_CW - ${ITK_BINARY_DIR} +try_compile( + ITK_HAS_STRUCT_FENV_T_CW ${ITK_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasFenvtStructMember.cxx - COMPILE_DEFINITIONS -DITK_CHECK_FENV_T_CW - ) + COMPILE_DEFINITIONS -DITK_CHECK_FENV_T_CW) #----------------------------------------------------------------------------- # Make default visibility as an option for generated export header @@ -117,12 +108,8 @@ try_compile(ITK_HAS_STRUCT_FENV_T_CW # different instances. include(itkCheckPrivateDynamicCast) - set(_template_visibility_init OFF) -if(NOT ITK_PRIVATE_DYNAMIC_CAST - AND NOT (CMAKE_CXX_VISIBILITY_PRESET STREQUAL "hidden" - AND NOT BUILD_SHARED_LIBS) - ) +if(NOT ITK_PRIVATE_DYNAMIC_CAST AND NOT (CMAKE_CXX_VISIBILITY_PRESET STREQUAL "hidden" AND NOT BUILD_SHARED_LIBS)) set(_template_visibility_init ON) endif() # This adds default symbol visibility to template class types, which @@ -131,27 +118,24 @@ endif() # hidden or non-hidden visibility. # This is required on Mac OSX to avoid dynamic_cast failures across binaries. # See Change-Id: Ib4a6b8cafe8720c3a2a5b3e6ba833d11002978df for more information." -option(ITK_TEMPLATE_VISIBILITY_DEFAULT "Set symbol visibility to default for template class declarations. https://itk.org/Wiki/ITK/FAQ" "${_template_visibility_init}") +option(ITK_TEMPLATE_VISIBILITY_DEFAULT + "Set symbol visibility to default for template class declarations. https://itk.org/Wiki/ITK/FAQ" + "${_template_visibility_init}") mark_as_advanced(ITK_TEMPLATE_VISIBILITY_DEFAULT) # Configuration variable is named ITK_USE_TBB instead of simply using the # TBB module name (Module_ITKTBB) for code readability. set(ITK_USE_TBB ${Module_ITKTBB}) - configure_file(src/itkConfigure.h.in itkConfigure.h) configure_file(src/itkConfigurePrivate.h.in itkConfigurePrivate.h) - -set(ITKCommon_INCLUDE_DIRS - ${ITKCommon_BINARY_DIR} - ) +set(ITKCommon_INCLUDE_DIRS ${ITKCommon_BINARY_DIR}) set(ITKCommon_LIBRARIES ITKCommon) itk_module_impl() -install(FILES - ${ITKCommon_BINARY_DIR}/itkConfigure.h +install( + FILES ${ITKCommon_BINARY_DIR}/itkConfigure.h DESTINATION ${ITKCommon_INSTALL_INCLUDE_DIR} - COMPONENT Development -) + COMPONENT Development) diff --git a/Modules/Core/Common/itk-module.cmake b/Modules/Core/Common/itk-module.cmake index 331a30f1e89..5389dcba223 100644 --- a/Modules/Core/Common/itk-module.cmake +++ b/Modules/Core/Common/itk-module.cmake @@ -1,4 +1,5 @@ -set(DOCUMENTATION "This module contains the central classes of the ITK +set(DOCUMENTATION + "This module contains the central classes of the ITK toolkit. They include, basic data structures \(such as points, vectors, images, regions: itk::Point, itk::Vector, itk::Image, itk::Region) the core of the process objects \(such as base classes for image @@ -11,24 +12,24 @@ if(Module_ITKTBB) set(ITKCOMMON_TBB_DEPENDS ITKTBB) endif() -itk_module(ITKCommon +itk_module( + ITKCommon ENABLE_SHARED DEPENDS - ITKEigen3 - ${ITKCOMMON_TBB_DEPENDS} + ITKEigen3 + ${ITKCOMMON_TBB_DEPENDS} PRIVATE_DEPENDS - ITKDoubleConversion + ITKDoubleConversion COMPILE_DEPENDS - ITKKWSys - ITKVNLInstantiation + ITKKWSys + ITKVNLInstantiation TEST_DEPENDS - ITKTestKernel - ITKMesh - ITKImageIntensity - ITKIOImageBase + ITKTestKernel + ITKMesh + ITKImageIntensity + ITKIOImageBase DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") # Extra test dependency on ITKMesh is introduced by itkCellInterfaceTest. # Extra test dependency on ITKImageIntensity is introduced by itkImageDuplicatorTest. diff --git a/Modules/Core/Common/src/CMakeLists.txt b/Modules/Core/Common/src/CMakeLists.txt index 5b90ee9a4de..74f031b08d1 100644 --- a/Modules/Core/Common/src/CMakeLists.txt +++ b/Modules/Core/Common/src/CMakeLists.txt @@ -1,11 +1,10 @@ - include(GetGitRevisionDescription) get_git_head_revision(GIT_CONFIG_REFSPEC GIT_CONFIG_SHA1) git_describe(GIT_VERSION_DESC) git_head_date(GIT_CONFIG_DATE) git_head_localmods(GIT_LOCAL_MODIFICATIONS) if(GIT_LOCAL_MODIFICATIONS MATCHES ".*files changed.*") - set(GIT_LOCAL_MODIFICATIONS " (with uncommitted code modifications ${GIT_LOCAL_MODIFICATIONS})") + set(GIT_LOCAL_MODIFICATIONS " (with uncommitted code modifications ${GIT_LOCAL_MODIFICATIONS})") endif() string(TIMESTAMP CONFIGURE_DATE "%Y-%m-%d %H:%M" UTC) @@ -14,7 +13,8 @@ string(TIMESTAMP CONFIGURE_DATE "%Y-%m-%d %H:%M" UTC) ## /--------------------------_---------------------------_-------------------------------------------------/ ## | KEY | VALUE | Description of value | ## \--------------------------\---------------------------\-------------------------------------------------\ -set(MAPPING_VALUES " +set(MAPPING_VALUES + " MAKE_MAP_ENTRY( \"PROJECT_URL\", \"https://www.itk.org\", \"The URL of project.\" ); MAKE_MAP_ENTRY( \"VERSION\", \"${ITK_VERSION}\" , \"The version at configuration time.\" ); MAKE_MAP_ENTRY( \"CONFIGURE_DATE\", \"${CONFIGURE_DATE}\", \"The date of configuration.\" ); @@ -46,113 +46,116 @@ set(MAPPING_VALUES " ") configure_file(itkBuildInformation.cxx.in ${ITKCommon_BINARY_DIR}/itkBuildInformation.cxx) - #[COPYONLY] [ESCAPE_QUOTES] [@ONLY] - #[NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ]) +#[COPYONLY] [ESCAPE_QUOTES] [@ONLY] +#[NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ]) set(ITKCommon_SRCS - ${ITKCommon_BINARY_DIR}/itkBuildInformation.cxx - itkCommonEnums.cxx - itkMemoryProbesCollectorBase.cxx - itkCreateObjectFunction.cxx - itkLogger.cxx - itkLogOutput.cxx - itkLoggerOutput.cxx - itkProgressAccumulator.cxx - itkTotalProgressReporter.cxx - itkNumericTraits.cxx - itkHexahedronCellTopology.cxx - itkIndent.cxx - itkEventObject.cxx - itkFileOutputWindow.cxx - itkSimpleFilterWatcher.cxx - itkNumericTraitsVectorPixel.cxx - itkObject.cxx - itkQuadrilateralCellTopology.cxx - itkIterationReporter.cxx - itkMemoryProbe.cxx - itkTextOutput.cxx - itkNumericTraitsTensorPixel2.cxx - itkNumericTraitsFixedArrayPixel2.cxx - itkProcessObject.cxx - itkStreamingProcessObject.cxx - itkSpatialOrientationAdapter.cxx - itkRealTimeInterval.cxx - itkOctreeNode.cxx - itkNumericTraitsFixedArrayPixel.cxx - itkMultiThreaderBase.cxx - itkPlatformMultiThreader.cxx - itkMetaDataObject.cxx - itkMetaDataDictionary.cxx - itkDataObject.cxx - itkThreadLogger.cxx - itkNumericTraitsTensorPixel.cxx - itkCommand.cxx - itkNumericTraitsPointPixel.cxx - itkLightObject.cxx - itkStdStreamLogOutput.cxx - itkLightProcessObject.cxx - itkRegion.cxx - itkImageIORegion.cxx - itkImageSourceCommon.cxx - itkImageToImageFilterCommon.cxx - itkImageRegionSplitterBase.cxx - itkImageRegionSplitterSlowDimension.cxx - itkImageRegionSplitterDirection.cxx - itkImageRegionSplitterMultidimensional.cxx - itkVersion.cxx - itkNumericTraitsRGBAPixel.cxx - itkRealTimeClock.cxx - itkMetaDataObjectBase.cxx - itkCovariantVector.cxx - itkMemoryUsageObserver.cxx - itkMersenneTwisterRandomVariateGenerator.cxx - itkLoggerBase.cxx - itkNumericTraitsCovariantVectorPixel.cxx - itkProgressReporter.cxx - itkExceptionObject.cxx - itkMultipleLogOutput.cxx - itkQuadraticTriangleCellTopology.cxx - itkTimeProbesCollectorBase.cxx - itkSmapsFileParser.cxx - itkTriangleCellTopology.cxx - itkVector.cxx - itkRealTimeStamp.cxx - itkDirectory.cxx - itkLoggerManager.cxx - itkTimeProbe.cxx - itkNumericTraitsRGBPixel.cxx - itkTimeStamp.cxx - itkSingleton.cxx - itkTetrahedronCellTopology.cxx - itkThreadedIndexedContainerPartitioner.cxx - itkObjectFactoryBase.cxx - itkFloatingPointExceptions.cxx - itkOutputWindow.cxx - itkNumericTraitsDiffusionTensor3DPixel.cxx - itkEquivalencyTable.cxx - itkXMLFileOutputWindow.cxx - itkXMLFilterWatcher.cxx - itkStoppingCriterionBase.cxx - itkCompensatedSummation.cxx - itkArrayOutputSpecialization.cxx - itkNumberToString.cxx - itkRandomVariateGeneratorBase.cxx - itkMath.cxx - itkProgressTransformer.cxx - itkSymmetricEigenAnalysis.cxx - itkExtractImageFilter.cxx - itkLoggerThreadWrapper.cxx - itkFrustumSpatialFunction.cxx - itkObjectStore.cxx - itkGaussianDerivativeOperator.cxx - itkSpatialOrientation.cxx - ) + ${ITKCommon_BINARY_DIR}/itkBuildInformation.cxx + itkCommonEnums.cxx + itkMemoryProbesCollectorBase.cxx + itkCreateObjectFunction.cxx + itkLogger.cxx + itkLogOutput.cxx + itkLoggerOutput.cxx + itkProgressAccumulator.cxx + itkTotalProgressReporter.cxx + itkNumericTraits.cxx + itkHexahedronCellTopology.cxx + itkIndent.cxx + itkEventObject.cxx + itkFileOutputWindow.cxx + itkSimpleFilterWatcher.cxx + itkNumericTraitsVectorPixel.cxx + itkObject.cxx + itkQuadrilateralCellTopology.cxx + itkIterationReporter.cxx + itkMemoryProbe.cxx + itkTextOutput.cxx + itkNumericTraitsTensorPixel2.cxx + itkNumericTraitsFixedArrayPixel2.cxx + itkProcessObject.cxx + itkStreamingProcessObject.cxx + itkSpatialOrientationAdapter.cxx + itkRealTimeInterval.cxx + itkOctreeNode.cxx + itkNumericTraitsFixedArrayPixel.cxx + itkMultiThreaderBase.cxx + itkPlatformMultiThreader.cxx + itkMetaDataObject.cxx + itkMetaDataDictionary.cxx + itkDataObject.cxx + itkThreadLogger.cxx + itkNumericTraitsTensorPixel.cxx + itkCommand.cxx + itkNumericTraitsPointPixel.cxx + itkLightObject.cxx + itkStdStreamLogOutput.cxx + itkLightProcessObject.cxx + itkRegion.cxx + itkImageIORegion.cxx + itkImageSourceCommon.cxx + itkImageToImageFilterCommon.cxx + itkImageRegionSplitterBase.cxx + itkImageRegionSplitterSlowDimension.cxx + itkImageRegionSplitterDirection.cxx + itkImageRegionSplitterMultidimensional.cxx + itkVersion.cxx + itkNumericTraitsRGBAPixel.cxx + itkRealTimeClock.cxx + itkMetaDataObjectBase.cxx + itkCovariantVector.cxx + itkMemoryUsageObserver.cxx + itkMersenneTwisterRandomVariateGenerator.cxx + itkLoggerBase.cxx + itkNumericTraitsCovariantVectorPixel.cxx + itkProgressReporter.cxx + itkExceptionObject.cxx + itkMultipleLogOutput.cxx + itkQuadraticTriangleCellTopology.cxx + itkTimeProbesCollectorBase.cxx + itkSmapsFileParser.cxx + itkTriangleCellTopology.cxx + itkVector.cxx + itkRealTimeStamp.cxx + itkDirectory.cxx + itkLoggerManager.cxx + itkTimeProbe.cxx + itkNumericTraitsRGBPixel.cxx + itkTimeStamp.cxx + itkSingleton.cxx + itkTetrahedronCellTopology.cxx + itkThreadedIndexedContainerPartitioner.cxx + itkObjectFactoryBase.cxx + itkFloatingPointExceptions.cxx + itkOutputWindow.cxx + itkNumericTraitsDiffusionTensor3DPixel.cxx + itkEquivalencyTable.cxx + itkXMLFileOutputWindow.cxx + itkXMLFilterWatcher.cxx + itkStoppingCriterionBase.cxx + itkCompensatedSummation.cxx + itkArrayOutputSpecialization.cxx + itkNumberToString.cxx + itkRandomVariateGeneratorBase.cxx + itkMath.cxx + itkProgressTransformer.cxx + itkSymmetricEigenAnalysis.cxx + itkExtractImageFilter.cxx + itkLoggerThreadWrapper.cxx + itkFrustumSpatialFunction.cxx + itkObjectStore.cxx + itkGaussianDerivativeOperator.cxx + itkSpatialOrientation.cxx) if(WIN32) list(APPEND ITKCommon_SRCS itkWin32OutputWindow.cxx) endif() if(ITK_USE_WIN32_THREADS OR ITK_USE_PTHREADS) - list(APPEND ITKCommon_SRCS itkPoolMultiThreader.cxx itkThreadPool.cxx) + list( + APPEND + ITKCommon_SRCS + itkPoolMultiThreader.cxx + itkThreadPool.cxx) endif() if(ITK_DYNAMIC_LOADING) @@ -173,7 +176,7 @@ if(CMAKE_CXX_COMPILER MATCHES "^icc") elseif(CMAKE_COMPILER_IS_GNUCXX) # -fno-associative-math appears to only be present in GCC 4.3 onwards. include(CheckCXXCompilerFlag) - CHECK_CXX_COMPILER_FLAG( -fno-associative-math gcc_has_no_associative_math) + check_cxx_compiler_flag(-fno-associative-math gcc_has_no_associative_math) if(gcc_has_no_associative_math) set_source_files_properties(itkCompensatedSummation.cxx PROPERTIES COMPILE_FLAGS -fno-associative-math) else() @@ -183,14 +186,21 @@ elseif(MSVC) set_source_files_properties(itkCompensatedSummation.cxx PROPERTIES COMPILE_FLAGS -fp:precise) endif() - ### generating libraries itk_module_add_library(ITKCommon ${ITKCommon_SRCS}) -target_link_libraries(ITKCommon LINK_PUBLIC itksys ITKVNLInstantiation) +target_link_libraries( + ITKCommon + LINK_PUBLIC + itksys + ITKVNLInstantiation) if(UNIX) - target_link_libraries(ITKCommon LINK_PUBLIC ${CMAKE_THREAD_LIBS} -lm) + target_link_libraries( + ITKCommon + LINK_PUBLIC + ${CMAKE_THREAD_LIBS} + -lm) if(ITK_DYNAMIC_LOADING) target_link_libraries(ITKCommon LINK_PUBLIC ${CMAKE_DL_LIBS}) endif() diff --git a/Modules/Core/Common/test/CMakeLists.txt b/Modules/Core/Common/test/CMakeLists.txt index 4a85cfde96d..ac28228a8d1 100644 --- a/Modules/Core/Common/test/CMakeLists.txt +++ b/Modules/Core/Common/test/CMakeLists.txt @@ -1,218 +1,235 @@ itk_module_test() set(ITKCommon1Tests -itkImageRegionExplicitTest.cxx -itkAbortProcessObjectTest.cxx -itkCommandObserverObjectTest.cxx -itkAdaptorComparisonTest.cxx -itkCovariantVectorGeometryTest.cxx -itkDataTypeTest.cxx -itkDecoratorTest.cxx -itkExtractImage3Dto2DTest.cxx -itkExtractImageTest.cxx -itkFilterDispatchTest.cxx -itkFloodFilledSpatialFunctionTest.cxx -itkFloodFillIteratorTest.cxx -itkGaussianDerivativeOperatorTest.cxx -itkMapContainerTest.cxx -itkVectorContainerTest.cxx -itkIteratorTests.cxx -itkImageReverseIteratorTest.cxx -itkImageComputeOffsetAndIndexTest.cxx -itkImageDuplicatorTest.cxx -itkImageDuplicatorTest2.cxx -itkImageIteratorsForwardBackwardTest.cxx -itkImageLinearIteratorTest.cxx -itkImageAdaptorPipeLineTest.cxx -itkImportContainerTest.cxx -itkImportImageTest.cxx -itkImageRandomIteratorTest.cxx -itkImageRandomIteratorTest2.cxx -itkImageRandomNonRepeatingIteratorWithIndexTest.cxx -itkImageRandomNonRepeatingIteratorWithIndexTest2.cxx -itkImageSliceIteratorTest.cxx -itkRGBPixelTest.cxx -itkLightObjectTest.cxx -itkBoundingBoxTest.cxx -itkBoundaryConditionTest.cxx -itkByteSwapTest.cxx -itkSparseImageTest.cxx -itkSimpleFilterWatcherTest.cxx -itkSymmetricEllipsoidInteriorExteriorSpatialFunctionTest.cxx -itkSymmetricSecondRankTensorImageReadTest.cxx -itkSymmetricSecondRankTensorImageWriteReadTest.cxx -itkArray2DTest.cxx -itkFloatingPointExceptionsTest.cxx -itkFixedArrayTest2.cxx -itkNeighborhoodAlgorithmTest.cxx -itkPhasedArray3DSpecialCoordinatesImageTest.cxx -itkPriorityQueueTest.cxx -itkFileOutputWindowTest.cxx -itkSymmetricEigenAnalysisTest.cxx -itkStreamingImageFilterTest.cxx -itkStreamingImageFilterTest2.cxx -itkStreamingImageFilterTest3.cxx -itkLoggerTest.cxx -itkDerivativeOperatorTest.cxx -itkColorTableTest.cxx -itkNumericTraitsTest.cxx -itkImageRegionTest.cxx -itkExceptionObjectTest.cxx -itkNeighborhoodOperatorTest.cxx -itkNumericsTest.cxx -itkAnnulusOperatorTest.cxx -itkLineIteratorTest.cxx -itkGaussianSpatialFunctionTest.cxx -itkRealTimeClockTest.cxx -itkRealTimeIntervalTest.cxx -itkRealTimeStampTest.cxx -itkTimeStampTest.cxx -itkIntTypesTest.cxx -itkBSplineKernelFunctionTest.cxx -itkArrayTest.cxx -itkImageIteratorTest.cxx -itkImageRegionIteratorTest.cxx -itkImageScanlineIteratorTest1.cxx -itkCrossHelperTest.cxx -itkImageIteratorWithIndexTest.cxx -itkDirectoryTest.cxx -itkObjectStoreTest.cxx -itkObjectFactoryTest.cxx -itkEventObjectTest.cxx -itkMathCastWithRangeCheckTest.cxx -itkMathRoundProfileTest1.cxx -itkMathRoundTest.cxx -itkMathRoundTest2.cxx -itkModifiedTimeTest.cxx -itkMultipleLogOutputTest.cxx -itkVectorTest.cxx -itkImageTest.cxx -itkPointSetTest.cxx -itkPointSetToImageFilterTest1.cxx -itkPointSetToImageFilterTest2.cxx -itkBresenhamLineTest.cxx -itkSparseFieldLayerTest.cxx -itkDataObjectTest.cxx -itkAtanRegularizedHeavisideStepFunctionTest1.cxx -itkHashTableTest.cxx -itkHeavisideStepFunctionTest1.cxx -itkSinRegularizedHeavisideStepFunctionTest1.cxx -itkPixelAccessTest.cxx -itkPointGeometryTest.cxx -itkMersenneTwisterRandomVariateGeneratorTest.cxx -itkNumberToStringTest.cxx -itkTimeProbeTest.cxx -itkTimeProbeTest2.cxx -itkSpatialOrientationTest.cxx -itkStdStreamStateSaveTest.cxx -itkVersionTest.cxx -VNLSparseLUSolverTraitsTest.cxx -itkSobelOperatorImageConvolutionTest.cxx -itkSobelOperatorImageFilterTest.cxx -itkSobelOperatorTest.cxx -) + itkImageRegionExplicitTest.cxx + itkAbortProcessObjectTest.cxx + itkCommandObserverObjectTest.cxx + itkAdaptorComparisonTest.cxx + itkCovariantVectorGeometryTest.cxx + itkDataTypeTest.cxx + itkDecoratorTest.cxx + itkExtractImage3Dto2DTest.cxx + itkExtractImageTest.cxx + itkFilterDispatchTest.cxx + itkFloodFilledSpatialFunctionTest.cxx + itkFloodFillIteratorTest.cxx + itkGaussianDerivativeOperatorTest.cxx + itkMapContainerTest.cxx + itkVectorContainerTest.cxx + itkIteratorTests.cxx + itkImageReverseIteratorTest.cxx + itkImageComputeOffsetAndIndexTest.cxx + itkImageDuplicatorTest.cxx + itkImageDuplicatorTest2.cxx + itkImageIteratorsForwardBackwardTest.cxx + itkImageLinearIteratorTest.cxx + itkImageAdaptorPipeLineTest.cxx + itkImportContainerTest.cxx + itkImportImageTest.cxx + itkImageRandomIteratorTest.cxx + itkImageRandomIteratorTest2.cxx + itkImageRandomNonRepeatingIteratorWithIndexTest.cxx + itkImageRandomNonRepeatingIteratorWithIndexTest2.cxx + itkImageSliceIteratorTest.cxx + itkRGBPixelTest.cxx + itkLightObjectTest.cxx + itkBoundingBoxTest.cxx + itkBoundaryConditionTest.cxx + itkByteSwapTest.cxx + itkSparseImageTest.cxx + itkSimpleFilterWatcherTest.cxx + itkSymmetricEllipsoidInteriorExteriorSpatialFunctionTest.cxx + itkSymmetricSecondRankTensorImageReadTest.cxx + itkSymmetricSecondRankTensorImageWriteReadTest.cxx + itkArray2DTest.cxx + itkFloatingPointExceptionsTest.cxx + itkFixedArrayTest2.cxx + itkNeighborhoodAlgorithmTest.cxx + itkPhasedArray3DSpecialCoordinatesImageTest.cxx + itkPriorityQueueTest.cxx + itkFileOutputWindowTest.cxx + itkSymmetricEigenAnalysisTest.cxx + itkStreamingImageFilterTest.cxx + itkStreamingImageFilterTest2.cxx + itkStreamingImageFilterTest3.cxx + itkLoggerTest.cxx + itkDerivativeOperatorTest.cxx + itkColorTableTest.cxx + itkNumericTraitsTest.cxx + itkImageRegionTest.cxx + itkExceptionObjectTest.cxx + itkNeighborhoodOperatorTest.cxx + itkNumericsTest.cxx + itkAnnulusOperatorTest.cxx + itkLineIteratorTest.cxx + itkGaussianSpatialFunctionTest.cxx + itkRealTimeClockTest.cxx + itkRealTimeIntervalTest.cxx + itkRealTimeStampTest.cxx + itkTimeStampTest.cxx + itkIntTypesTest.cxx + itkBSplineKernelFunctionTest.cxx + itkArrayTest.cxx + itkImageIteratorTest.cxx + itkImageRegionIteratorTest.cxx + itkImageScanlineIteratorTest1.cxx + itkCrossHelperTest.cxx + itkImageIteratorWithIndexTest.cxx + itkDirectoryTest.cxx + itkObjectStoreTest.cxx + itkObjectFactoryTest.cxx + itkEventObjectTest.cxx + itkMathCastWithRangeCheckTest.cxx + itkMathRoundProfileTest1.cxx + itkMathRoundTest.cxx + itkMathRoundTest2.cxx + itkModifiedTimeTest.cxx + itkMultipleLogOutputTest.cxx + itkVectorTest.cxx + itkImageTest.cxx + itkPointSetTest.cxx + itkPointSetToImageFilterTest1.cxx + itkPointSetToImageFilterTest2.cxx + itkBresenhamLineTest.cxx + itkSparseFieldLayerTest.cxx + itkDataObjectTest.cxx + itkAtanRegularizedHeavisideStepFunctionTest1.cxx + itkHashTableTest.cxx + itkHeavisideStepFunctionTest1.cxx + itkSinRegularizedHeavisideStepFunctionTest1.cxx + itkPixelAccessTest.cxx + itkPointGeometryTest.cxx + itkMersenneTwisterRandomVariateGeneratorTest.cxx + itkNumberToStringTest.cxx + itkTimeProbeTest.cxx + itkTimeProbeTest2.cxx + itkSpatialOrientationTest.cxx + itkStdStreamStateSaveTest.cxx + itkVersionTest.cxx + VNLSparseLUSolverTraitsTest.cxx + itkSobelOperatorImageConvolutionTest.cxx + itkSobelOperatorImageFilterTest.cxx + itkSobelOperatorTest.cxx) set(ITKCommon2Tests -itkSTLThreadTest.cxx -itkThreadedIndexedContainerPartitionerTest.cxx -itkThreadedIteratorRangePartitionerTest.cxx -itkThreadedIteratorRangePartitionerTest2.cxx -itkThreadedIteratorRangePartitionerTest3.cxx -itkThreadedImageRegionPartitionerTest.cxx -itkThreadLoggerTest.cxx -itkLoggerThreadWrapperTest.cxx -itkThreadDefsTest.cxx -itkMultiThreaderBaseTest.cxx -itkMultiThreaderTypeFromEnvironmentTest.cxx -itkMultiThreadingEnvironmentTest.cxx -itkMultiThreaderParallelizeArrayTest.cxx -itkMultithreadingTest.cxx -itkMultiThreaderExceptionsTest.cxx - -itkMetaProgrammingLibraryTest.cxx -itkPromoteType.cxx -itkMetaDataDictionaryTest.cxx -itkStdStreamLogOutputTest.cxx -itkOctreeTest.cxx -itkTimeProbesTest.cxx -itkVariableLengthVectorTest.cxx -itkSpatialFunctionTest.cxx -itkPeriodicBoundaryConditionTest.cxx -itkSmartPointerTest.cxx -itkVariableSizeMatrixTest.cxx -itkConicShellInteriorExteriorSpatialFunctionTest.cxx -itkEllipsoidInteriorExteriorSpatialFunctionTest.cxx -itkFrustumSpatialFunctionTest.cxx -itkTorusInteriorExteriorSpatialFunctionTest.cxx -itkConstNeighborhoodIteratorTest.cxx -itkShapedNeighborhoodIteratorTest.cxx -itkMatrixTest.cxx -itkAutoPointerTest.cxx -itkNeighborhoodIteratorTest.cxx -itkLoggerManagerTest.cxx -itkBSplineInterpolationWeightFunctionTest.cxx -itkSymmetricSecondRankTensorTest.cxx -itkConstShapedNeighborhoodIteratorTest.cxx -itkConstShapedNeighborhoodIteratorTest2.cxx -itkSTLContainerAdaptorTest.cxx -itkFiniteCylinderSpatialFunctionTest.cxx -itkLoggerOutputTest.cxx -itkNeighborhoodTest.cxx -itkVersorTest.cxx -itkObjectFactoryTest2.cxx -itkObjectFactoryTest3.cxx -itkObjectFactoryOnlyNewTest.cxx -itkMinimumMaximumImageCalculatorTest.cxx -itkSliceIteratorTest.cxx -itkImageRegionExclusionIteratorWithIndexTest.cxx -itkFixedArrayTest.cxx -itkImageTransformTest.cxx -itkImageFillBufferTest.cxx -itkMemoryLeakTest.cxx -itkVectorGeometryTest.cxx -itkVNLRoundProfileTest1.cxx -itkZeroFluxBoundaryConditionTest.cxx -itkMemoryProbesCollecterBaseTest.cxx -itkImageAlgorithmCopyTest.cxx -itkImageAlgorithmCopyTest2.cxx -itkConstantBoundaryConditionTest.cxx -itkDataObjectAndProcessObjectTest.cxx -itkOptimizerParametersTest.cxx -itkImageVectorOptimizerParametersHelperTest.cxx -itkCompensatedSummationTest.cxx -itkCompensatedSummationTest2.cxx -itkImageRegionConstIteratorWithOnlyIndexTest.cxx -itkImageRandomConstIteratorWithOnlyIndexTest.cxx -itkConstNeighborhoodIteratorWithOnlyIndexTest.cxx -itkImageToImageToleranceTest.cxx -itkImageRegionSplitterSlowDimensionTest.cxx -itkImageRegionSplitterDirectionTest.cxx -itkImageRegionSplitterMultidimensionalTest.cxx -itkMetaDataObjectTest.cxx -# itkVectorMultiplyTest.cxx -itkXMLFileOutputWindowTest.cxx -) + itkSTLThreadTest.cxx + itkThreadedIndexedContainerPartitionerTest.cxx + itkThreadedIteratorRangePartitionerTest.cxx + itkThreadedIteratorRangePartitionerTest2.cxx + itkThreadedIteratorRangePartitionerTest3.cxx + itkThreadedImageRegionPartitionerTest.cxx + itkThreadLoggerTest.cxx + itkLoggerThreadWrapperTest.cxx + itkThreadDefsTest.cxx + itkMultiThreaderBaseTest.cxx + itkMultiThreaderTypeFromEnvironmentTest.cxx + itkMultiThreadingEnvironmentTest.cxx + itkMultiThreaderParallelizeArrayTest.cxx + itkMultithreadingTest.cxx + itkMultiThreaderExceptionsTest.cxx + itkMetaProgrammingLibraryTest.cxx + itkPromoteType.cxx + itkMetaDataDictionaryTest.cxx + itkStdStreamLogOutputTest.cxx + itkOctreeTest.cxx + itkTimeProbesTest.cxx + itkVariableLengthVectorTest.cxx + itkSpatialFunctionTest.cxx + itkPeriodicBoundaryConditionTest.cxx + itkSmartPointerTest.cxx + itkVariableSizeMatrixTest.cxx + itkConicShellInteriorExteriorSpatialFunctionTest.cxx + itkEllipsoidInteriorExteriorSpatialFunctionTest.cxx + itkFrustumSpatialFunctionTest.cxx + itkTorusInteriorExteriorSpatialFunctionTest.cxx + itkConstNeighborhoodIteratorTest.cxx + itkShapedNeighborhoodIteratorTest.cxx + itkMatrixTest.cxx + itkAutoPointerTest.cxx + itkNeighborhoodIteratorTest.cxx + itkLoggerManagerTest.cxx + itkBSplineInterpolationWeightFunctionTest.cxx + itkSymmetricSecondRankTensorTest.cxx + itkConstShapedNeighborhoodIteratorTest.cxx + itkConstShapedNeighborhoodIteratorTest2.cxx + itkSTLContainerAdaptorTest.cxx + itkFiniteCylinderSpatialFunctionTest.cxx + itkLoggerOutputTest.cxx + itkNeighborhoodTest.cxx + itkVersorTest.cxx + itkObjectFactoryTest2.cxx + itkObjectFactoryTest3.cxx + itkObjectFactoryOnlyNewTest.cxx + itkMinimumMaximumImageCalculatorTest.cxx + itkSliceIteratorTest.cxx + itkImageRegionExclusionIteratorWithIndexTest.cxx + itkFixedArrayTest.cxx + itkImageTransformTest.cxx + itkImageFillBufferTest.cxx + itkMemoryLeakTest.cxx + itkVectorGeometryTest.cxx + itkVNLRoundProfileTest1.cxx + itkZeroFluxBoundaryConditionTest.cxx + itkMemoryProbesCollecterBaseTest.cxx + itkImageAlgorithmCopyTest.cxx + itkImageAlgorithmCopyTest2.cxx + itkConstantBoundaryConditionTest.cxx + itkDataObjectAndProcessObjectTest.cxx + itkOptimizerParametersTest.cxx + itkImageVectorOptimizerParametersHelperTest.cxx + itkCompensatedSummationTest.cxx + itkCompensatedSummationTest2.cxx + itkImageRegionConstIteratorWithOnlyIndexTest.cxx + itkImageRandomConstIteratorWithOnlyIndexTest.cxx + itkConstNeighborhoodIteratorWithOnlyIndexTest.cxx + itkImageToImageToleranceTest.cxx + itkImageRegionSplitterSlowDimensionTest.cxx + itkImageRegionSplitterDirectionTest.cxx + itkImageRegionSplitterMultidimensionalTest.cxx + itkMetaDataObjectTest.cxx + # itkVectorMultiplyTest.cxx + itkXMLFileOutputWindowTest.cxx) if(ITK_BUILD_SHARED_LIBS AND ITK_DYNAMIC_LOADING) list(APPEND ITKCommon2Tests itkDownCastTest.cxx) endif() # Note: Tests are arbitrarily split into two drivers to avoid memory issues. -CreateTestDriver(ITKCommon1 "${ITKCommon-Test_LIBRARIES}" "${ITKCommon1Tests}" itkFloatingPointExceptionsExtern.cxx) -CreateTestDriver(ITKCommon2 "${ITKCommon-Test_LIBRARIES}" "${ITKCommon2Tests}" itkFloatingPointExceptionsExtern.cxx) +createtestdriver( + ITKCommon1 + "${ITKCommon-Test_LIBRARIES}" + "${ITKCommon1Tests}" + itkFloatingPointExceptionsExtern.cxx) +createtestdriver( + ITKCommon2 + "${ITKCommon-Test_LIBRARIES}" + "${ITKCommon2Tests}" + itkFloatingPointExceptionsExtern.cxx) set(BASELINE "${ITK_DATA_ROOT}/Baseline/Common") set(TEMP ${ITK_TEST_OUTPUT_DIR}) - add_executable(itkMathTest itkMathTest.cxx) itk_module_target_label(itkMathTest) target_link_libraries(itkMathTest LINK_PUBLIC ${ITKCommon_LIBRARIES}) -itk_add_test(NAME itkMathTest COMMAND itkMathTest) +itk_add_test( + NAME + itkMathTest + COMMAND + itkMathTest) add_executable(itkSystemInformation itkSystemInformation.cxx) itk_module_target_label(itkSystemInformation) target_link_libraries(itkSystemInformation LINK_PUBLIC ${ITKCommon_LIBRARIES}) -itk_add_test(NAME SystemInformation COMMAND itkSystemInformation) +itk_add_test( + NAME + SystemInformation + COMMAND + itkSystemInformation) -itk_add_test(NAME itkVersionTest COMMAND ITKCommon1TestDriver itkVersionTest) +itk_add_test( + NAME + itkVersionTest + COMMAND + ITKCommon1TestDriver + itkVersionTest) if(ITK_BUILD_SHARED_LIBS) ## Create a library to test ITK loadable factories @@ -224,406 +241,1431 @@ if(ITK_BUILD_SHARED_LIBS) add_dependencies(ITKCommon2TestDriver FactoryTestLib) endif() -itk_add_test(NAME itkAbortProcessObjectTest COMMAND ITKCommon1TestDriver itkAbortProcessObjectTest) -itk_add_test(NAME itkCommandObserverObjectTest COMMAND ITKCommon1TestDriver itkCommandObserverObjectTest) -itk_add_test(NAME itkAdaptorComparisonTest COMMAND ITKCommon1TestDriver itkAdaptorComparisonTest) -itk_add_test(NAME itkThreadedIndexedContainerPartitionerTest COMMAND ITKCommon2TestDriver itkThreadedIndexedContainerPartitionerTest) -itk_add_test(NAME itkThreadedIteratorRangePartitionerTest COMMAND ITKCommon2TestDriver itkThreadedIteratorRangePartitionerTest) -itk_add_test(NAME itkThreadedIteratorRangePartitionerTest2 COMMAND ITKCommon2TestDriver itkThreadedIteratorRangePartitionerTest2) -itk_add_test(NAME itkThreadedIteratorRangePartitionerTest3 COMMAND ITKCommon2TestDriver itkThreadedIteratorRangePartitionerTest3) - -itk_add_test(NAME itkImageAdaptorPipeLineTest COMMAND ITKCommon1TestDriver itkImageAdaptorPipeLineTest) -itk_add_test(NAME itkThreadedImageRegionPartitionerTest COMMAND ITKCommon2TestDriver itkThreadedImageRegionPartitionerTest) -itk_add_test(NAME itkImportContainerTest COMMAND ITKCommon1TestDriver itkImportContainerTest) -itk_add_test(NAME itkImportImageTest COMMAND ITKCommon1TestDriver itkImportImageTest) -itk_add_test(NAME itkCovariantVectorGeometryTest COMMAND ITKCommon1TestDriver itkCovariantVectorGeometryTest) -itk_add_test(NAME itkDataTypeTest COMMAND ITKCommon1TestDriver itkDataTypeTest) -itk_add_test(NAME itkDecoratorTest COMMAND ITKCommon1TestDriver itkDecoratorTest) -itk_add_test(NAME itkExtractImage3Dto2DTest COMMAND ITKCommon1TestDriver itkExtractImage3Dto2DTest) -itk_add_test(NAME itkExtractImageTest COMMAND ITKCommon1TestDriver itkExtractImageTest) -itk_add_test(NAME itkFilterDispatchTest COMMAND ITKCommon1TestDriver itkFilterDispatchTest) -itk_add_test(NAME itkFloodFilledSpatialFunctionTest COMMAND ITKCommon1TestDriver itkFloodFilledSpatialFunctionTest) -itk_add_test(NAME itkFloodFillIteratorTest COMMAND ITKCommon1TestDriver itkFloodFillIteratorTest) -itk_add_test(NAME itkAnnulusOperatorTest COMMAND ITKCommon1TestDriver itkAnnulusOperatorTest) - -itk_add_test(NAME itkColorTableTest1 COMMAND - ITKCommon1TestDriver --redirectOutput ${TEMP}/itkColorTableTest1.txt - itkColorTableTest 8) +itk_add_test( + NAME + itkAbortProcessObjectTest + COMMAND + ITKCommon1TestDriver + itkAbortProcessObjectTest) +itk_add_test( + NAME + itkCommandObserverObjectTest + COMMAND + ITKCommon1TestDriver + itkCommandObserverObjectTest) +itk_add_test( + NAME + itkAdaptorComparisonTest + COMMAND + ITKCommon1TestDriver + itkAdaptorComparisonTest) +itk_add_test( + NAME + itkThreadedIndexedContainerPartitionerTest + COMMAND + ITKCommon2TestDriver + itkThreadedIndexedContainerPartitionerTest) +itk_add_test( + NAME + itkThreadedIteratorRangePartitionerTest + COMMAND + ITKCommon2TestDriver + itkThreadedIteratorRangePartitionerTest) +itk_add_test( + NAME + itkThreadedIteratorRangePartitionerTest2 + COMMAND + ITKCommon2TestDriver + itkThreadedIteratorRangePartitionerTest2) +itk_add_test( + NAME + itkThreadedIteratorRangePartitionerTest3 + COMMAND + ITKCommon2TestDriver + itkThreadedIteratorRangePartitionerTest3) + +itk_add_test( + NAME + itkImageAdaptorPipeLineTest + COMMAND + ITKCommon1TestDriver + itkImageAdaptorPipeLineTest) +itk_add_test( + NAME + itkThreadedImageRegionPartitionerTest + COMMAND + ITKCommon2TestDriver + itkThreadedImageRegionPartitionerTest) +itk_add_test( + NAME + itkImportContainerTest + COMMAND + ITKCommon1TestDriver + itkImportContainerTest) +itk_add_test( + NAME + itkImportImageTest + COMMAND + ITKCommon1TestDriver + itkImportImageTest) +itk_add_test( + NAME + itkCovariantVectorGeometryTest + COMMAND + ITKCommon1TestDriver + itkCovariantVectorGeometryTest) +itk_add_test( + NAME + itkDataTypeTest + COMMAND + ITKCommon1TestDriver + itkDataTypeTest) +itk_add_test( + NAME + itkDecoratorTest + COMMAND + ITKCommon1TestDriver + itkDecoratorTest) +itk_add_test( + NAME + itkExtractImage3Dto2DTest + COMMAND + ITKCommon1TestDriver + itkExtractImage3Dto2DTest) +itk_add_test( + NAME + itkExtractImageTest + COMMAND + ITKCommon1TestDriver + itkExtractImageTest) +itk_add_test( + NAME + itkFilterDispatchTest + COMMAND + ITKCommon1TestDriver + itkFilterDispatchTest) +itk_add_test( + NAME + itkFloodFilledSpatialFunctionTest + COMMAND + ITKCommon1TestDriver + itkFloodFilledSpatialFunctionTest) +itk_add_test( + NAME + itkFloodFillIteratorTest + COMMAND + ITKCommon1TestDriver + itkFloodFillIteratorTest) +itk_add_test( + NAME + itkAnnulusOperatorTest + COMMAND + ITKCommon1TestDriver + itkAnnulusOperatorTest) + +itk_add_test( + NAME + itkColorTableTest1 + COMMAND + ITKCommon1TestDriver + --redirectOutput + ${TEMP}/itkColorTableTest1.txt + itkColorTableTest + 8) set_tests_properties(itkColorTableTest1 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkColorTableTest1.txt) -itk_add_test(NAME itkColorTableTest2 COMMAND - ITKCommon1TestDriver --redirectOutput ${TEMP}/itkColorTableTest2.txt - itkColorTableTest 16) +itk_add_test( + NAME + itkColorTableTest2 + COMMAND + ITKCommon1TestDriver + --redirectOutput + ${TEMP}/itkColorTableTest2.txt + itkColorTableTest + 16) set_tests_properties(itkColorTableTest2 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkColorTableTest2.txt) -itk_add_test(NAME itkDirectoryTest COMMAND ITKCommon1TestDriver itkDirectoryTest ${TEMP}) -itk_add_test(NAME itkDerivativeOperatorTest COMMAND ITKCommon1TestDriver itkDerivativeOperatorTest) -itk_add_test(NAME itkMultipleLogOutputTest COMMAND ITKCommon1TestDriver itkMultipleLogOutputTest ${TEMP}/test_multi.txt) -itk_add_test(NAME itkFixedArrayTest COMMAND ITKCommon2TestDriver itkFixedArrayTest) -itk_add_test(NAME itkImageTransformTest COMMAND ITKCommon2TestDriver itkImageTransformTest) -itk_add_test(NAME itkMinimumMaximumImageCalculatorTest COMMAND ITKCommon2TestDriver itkMinimumMaximumImageCalculatorTest) -itk_add_test(NAME itkFixedArrayTest2 COMMAND ITKCommon1TestDriver itkFixedArrayTest2) -itk_add_test(NAME itkArrayTest COMMAND ITKCommon1TestDriver itkArrayTest) -itk_add_test(NAME itkMersenneTwisterRandomVariateGeneratorTest COMMAND ITKCommon1TestDriver itkMersenneTwisterRandomVariateGeneratorTest) -itk_add_test(NAME itkArray2DTest COMMAND ITKCommon1TestDriver itkArray2DTest) -itk_add_test(NAME itkAutoPointerTest COMMAND ITKCommon2TestDriver itkAutoPointerTest) -itk_add_test(NAME itkTimeStampTest COMMAND ITKCommon1TestDriver itkTimeStampTest) -itk_add_test(NAME itkBoundingBoxTest COMMAND ITKCommon1TestDriver itkBoundingBoxTest) -itk_add_test(NAME itkBoundaryConditionTest COMMAND ITKCommon1TestDriver itkBoundaryConditionTest) -itk_add_test(NAME itkByteSwapTest COMMAND ITKCommon1TestDriver itkByteSwapTest) -itk_add_test(NAME itkBSplineInterpolationWeightFunctionTest COMMAND ITKCommon2TestDriver itkBSplineInterpolationWeightFunctionTest) -itk_add_test(NAME itkBSplineKernelFunctionTest COMMAND ITKCommon1TestDriver itkBSplineKernelFunctionTest) -itk_add_test(NAME itkSpatialOrientationTest COMMAND ITKCommon1TestDriver itkSpatialOrientationTest) -itk_add_test(NAME VNLSparseLUSolverTraitsTest COMMAND ITKCommon1TestDriver VNLSparseLUSolverTraitsTest) -itk_add_test(NAME itkGaussianDerivativeOperatorTest - COMMAND ITKCommon1TestDriver itkGaussianDerivativeOperatorTest) -itk_add_test(NAME itkSobelOperatorImageConvolutionHorizTest - COMMAND ITKCommon1TestDriver - --compare DATA{Baseline/itkSobelOperatorImageConvolutionHorizTest.tiff} ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageConvolutionHorizTest.tiff - itkSobelOperatorImageConvolutionTest DATA{${ITK_DATA_ROOT}/Input/sf4.png} 0 ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageConvolutionHorizTest.tiff) -itk_add_test(NAME itkSobelOperatorImageFilterHorizTest - COMMAND ITKCommon1TestDriver - --compare DATA{Baseline/itkSobelOperatorImageFilterHorizTest.tiff} ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageFilterHorizTest.tiff - itkSobelOperatorImageFilterTest DATA{${ITK_DATA_ROOT}/Input/sf4.png} 0 ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageFilterHorizTest.tiff) -itk_add_test(NAME itkSobelOperatorImageConvolutionVertTest - COMMAND ITKCommon1TestDriver - --compare DATA{Baseline/itkSobelOperatorImageConvolutionVertTest.tiff} ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageConvolutionVertTest.tiff - itkSobelOperatorImageConvolutionTest DATA{${ITK_DATA_ROOT}/Input/sf4.png} 1 ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageConvolutionVertTest.tiff) +itk_add_test( + NAME + itkDirectoryTest + COMMAND + ITKCommon1TestDriver + itkDirectoryTest + ${TEMP}) +itk_add_test( + NAME + itkDerivativeOperatorTest + COMMAND + ITKCommon1TestDriver + itkDerivativeOperatorTest) +itk_add_test( + NAME + itkMultipleLogOutputTest + COMMAND + ITKCommon1TestDriver + itkMultipleLogOutputTest + ${TEMP}/test_multi.txt) +itk_add_test( + NAME + itkFixedArrayTest + COMMAND + ITKCommon2TestDriver + itkFixedArrayTest) +itk_add_test( + NAME + itkImageTransformTest + COMMAND + ITKCommon2TestDriver + itkImageTransformTest) +itk_add_test( + NAME + itkMinimumMaximumImageCalculatorTest + COMMAND + ITKCommon2TestDriver + itkMinimumMaximumImageCalculatorTest) +itk_add_test( + NAME + itkFixedArrayTest2 + COMMAND + ITKCommon1TestDriver + itkFixedArrayTest2) +itk_add_test( + NAME + itkArrayTest + COMMAND + ITKCommon1TestDriver + itkArrayTest) +itk_add_test( + NAME + itkMersenneTwisterRandomVariateGeneratorTest + COMMAND + ITKCommon1TestDriver + itkMersenneTwisterRandomVariateGeneratorTest) +itk_add_test( + NAME + itkArray2DTest + COMMAND + ITKCommon1TestDriver + itkArray2DTest) +itk_add_test( + NAME + itkAutoPointerTest + COMMAND + ITKCommon2TestDriver + itkAutoPointerTest) +itk_add_test( + NAME + itkTimeStampTest + COMMAND + ITKCommon1TestDriver + itkTimeStampTest) +itk_add_test( + NAME + itkBoundingBoxTest + COMMAND + ITKCommon1TestDriver + itkBoundingBoxTest) +itk_add_test( + NAME + itkBoundaryConditionTest + COMMAND + ITKCommon1TestDriver + itkBoundaryConditionTest) +itk_add_test( + NAME + itkByteSwapTest + COMMAND + ITKCommon1TestDriver + itkByteSwapTest) +itk_add_test( + NAME + itkBSplineInterpolationWeightFunctionTest + COMMAND + ITKCommon2TestDriver + itkBSplineInterpolationWeightFunctionTest) +itk_add_test( + NAME + itkBSplineKernelFunctionTest + COMMAND + ITKCommon1TestDriver + itkBSplineKernelFunctionTest) +itk_add_test( + NAME + itkSpatialOrientationTest + COMMAND + ITKCommon1TestDriver + itkSpatialOrientationTest) +itk_add_test( + NAME + VNLSparseLUSolverTraitsTest + COMMAND + ITKCommon1TestDriver + VNLSparseLUSolverTraitsTest) +itk_add_test( + NAME + itkGaussianDerivativeOperatorTest + COMMAND + ITKCommon1TestDriver + itkGaussianDerivativeOperatorTest) +itk_add_test( + NAME + itkSobelOperatorImageConvolutionHorizTest + COMMAND + ITKCommon1TestDriver + --compare + DATA{Baseline/itkSobelOperatorImageConvolutionHorizTest.tiff} + ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageConvolutionHorizTest.tiff + itkSobelOperatorImageConvolutionTest + DATA{${ITK_DATA_ROOT}/Input/sf4.png} + 0 + ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageConvolutionHorizTest.tiff) +itk_add_test( + NAME + itkSobelOperatorImageFilterHorizTest + COMMAND + ITKCommon1TestDriver + --compare + DATA{Baseline/itkSobelOperatorImageFilterHorizTest.tiff} + ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageFilterHorizTest.tiff + itkSobelOperatorImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/sf4.png} + 0 + ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageFilterHorizTest.tiff) +itk_add_test( + NAME + itkSobelOperatorImageConvolutionVertTest + COMMAND + ITKCommon1TestDriver + --compare + DATA{Baseline/itkSobelOperatorImageConvolutionVertTest.tiff} + ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageConvolutionVertTest.tiff + itkSobelOperatorImageConvolutionTest + DATA{${ITK_DATA_ROOT}/Input/sf4.png} + 1 + ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageConvolutionVertTest.tiff) # A simplified data test for debugging sobel operator failures -itk_add_test(NAME itkSobelOperatorImageConvolutionVertCircleTest - COMMAND ITKCommon1TestDriver - --compare DATA{Baseline/itkSobelOperatorImageConvolutionVertCircleTest.tiff} ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageConvolutionVertCircleTest.tiff - itkSobelOperatorImageConvolutionTest DATA{${ITK_DATA_ROOT}/Input/circle.png} 1 ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageConvolutionVertCircleTest.tiff) - -itk_add_test(NAME itkSobelOperatorImageFilterVertTest - COMMAND ITKCommon1TestDriver - --compare DATA{Baseline/itkSobelOperatorImageVertTest.tiff} ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageFilterVertTest.tiff - itkSobelOperatorImageFilterTest DATA{${ITK_DATA_ROOT}/Input/sf4.png} 1 ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageFilterVertTest.tiff) - -itk_add_test(NAME itkSobelOperatorTest - COMMAND ITKCommon1TestDriver itkSobelOperatorTest) - -itk_add_test(NAME itkConstNeighborhoodIteratorTest - COMMAND ITKCommon2TestDriver --redirectOutput ${TEMP}/itkConstNeighborhoodIteratorTest.txt - itkConstNeighborhoodIteratorTest) -set_tests_properties(itkConstNeighborhoodIteratorTest PROPERTIES ATTACHED_FILES_ON_FAIL ${ITK_TEST_OUTPUT_DIR}/itkConstNeighborhoodIteratorTest.txt) - -itk_add_test(NAME itkShapedNeighborhoodIteratorTest - COMMAND ITKCommon2TestDriver --redirectOutput ${TEMP}/itkShapedNeighborhoodIteratorTest.txt - itkShapedNeighborhoodIteratorTest) -set_tests_properties(itkShapedNeighborhoodIteratorTest PROPERTIES ATTACHED_FILES_ON_FAIL ${ITK_TEST_OUTPUT_DIR}/itkShapedNeighborhoodIteratorTest.txt) - - -itk_add_test(NAME itkConstShapedNeighborhoodIteratorTest COMMAND ITKCommon2TestDriver itkConstShapedNeighborhoodIteratorTest) -itk_add_test(NAME itkConstShapedNeighborhoodIteratorTest2 COMMAND ITKCommon2TestDriver itkConstShapedNeighborhoodIteratorTest2) -itk_add_test(NAME itkEventObjectTest COMMAND ITKCommon1TestDriver itkEventObjectTest) -itk_add_test(NAME itkMathCastWithRangeCheckTest COMMAND ITKCommon1TestDriver itkMathCastWithRangeCheckTest) -itk_add_test(NAME itkMathRoundProfileTest1 - COMMAND ITKCommon1TestDriver itkMathRoundProfileTest1) -itk_add_test(NAME itkMathRoundTest - COMMAND ITKCommon1TestDriver itkMathRoundTest) -itk_add_test(NAME itkMathRoundTest2 - COMMAND ITKCommon1TestDriver itkMathRoundTest2) -itk_add_test(NAME itkModifiedTimeTest - COMMAND ITKCommon1TestDriver itkModifiedTimeTest) -itk_add_test(NAME itkExceptionObjectTest COMMAND ITKCommon1TestDriver itkExceptionObjectTest) -itk_add_test(NAME itkFileOutputWindowTest COMMAND ITKCommon1TestDriver itkFileOutputWindowTest) -itk_add_test(NAME itkFiniteCylinderSpatialFunctionTest COMMAND ITKCommon2TestDriver itkFiniteCylinderSpatialFunctionTest) -itk_add_test(NAME itkGaussianSpatialFunctionTest1 - COMMAND ITKCommon1TestDriver - itkGaussianSpatialFunctionTest 1.0 0) -itk_add_test(NAME itkGaussianSpatialFunctionTest2 - COMMAND ITKCommon1TestDriver - itkGaussianSpatialFunctionTest 19.0 1) -itk_add_test(NAME itkCrossHelperTest COMMAND ITKCommon1TestDriver itkCrossHelperTest) -itk_add_test(NAME itkImageIteratorTest COMMAND ITKCommon1TestDriver itkImageIteratorTest) -itk_add_test(NAME itkImageIteratorWithIndexTest COMMAND ITKCommon1TestDriver itkImageIteratorWithIndexTest) -itk_add_test(NAME itkImageRegionIteratorTest COMMAND ITKCommon1TestDriver itkImageRegionIteratorTest) -itk_add_test(NAME itkImageScanlineIteratorTest1 COMMAND ITKCommon1TestDriver itkImageScanlineIteratorTest1) -itk_add_test(NAME itkImageRegionTest COMMAND ITKCommon1TestDriver itkImageRegionTest) -itk_add_test(NAME itkImageRegionExclusionIteratorWithIndexTest COMMAND ITKCommon2TestDriver itkImageRegionExclusionIteratorWithIndexTest) -itk_add_test(NAME itkImageReverseIteratorTest COMMAND ITKCommon1TestDriver itkImageReverseIteratorTest) -itk_add_test(NAME itkImageDuplicatorTest - COMMAND ITKCommon1TestDriver itkImageDuplicatorTest) -itk_add_test(NAME itkImageDuplicatorTest2 - COMMAND ITKCommon1TestDriver --compare DATA{Baseline/vol-raw-big-dup2.nrrd} ${ITK_TEST_OUTPUT_DIR}/vol-raw-big-dup2.nrrd - itkImageDuplicatorTest2 DATA{${ITK_DATA_ROOT}/Input/vol-raw-big.nrrd} ${ITK_TEST_OUTPUT_DIR}/vol-raw-big-dup2.nrrd) -itk_add_test(NAME itkImageIteratorsForwardBackwardTest - COMMAND ITKCommon1TestDriver itkImageIteratorsForwardBackwardTest) -itk_add_test(NAME itkImageLinearIteratorTest - COMMAND ITKCommon1TestDriver itkImageLinearIteratorTest) -itk_add_test(NAME itkImageRandomIteratorTest - COMMAND ITKCommon1TestDriver itkImageRandomIteratorTest) -itk_add_test(NAME itkImageRandomIteratorTest2 - COMMAND ITKCommon1TestDriver itkImageRandomIteratorTest2 - ${ITK_TEST_OUTPUT_DIR}/itkImageRandomIteratorTest2Output.mha) -itk_add_test(NAME itkImageRandomNonRepeatingIteratorWithIndexTest - COMMAND ITKCommon1TestDriver itkImageRandomNonRepeatingIteratorWithIndexTest) -itk_add_test(NAME itkImageRandomNonRepeatingIteratorWithIndexTest2 - COMMAND ITKCommon1TestDriver itkImageRandomNonRepeatingIteratorWithIndexTest2) -itk_add_test(NAME itkImageSliceIteratorTest - COMMAND ITKCommon1TestDriver itkImageSliceIteratorTest) -itk_add_test(NAME itkImageTest COMMAND ITKCommon1TestDriver itkImageTest) -itk_add_test(NAME itkLightObjectTest COMMAND ITKCommon1TestDriver itkLightObjectTest) -itk_add_test(NAME itkLineIteratorTest COMMAND ITKCommon1TestDriver itkLineIteratorTest DATA{${BASELINE}/itkLineIteratorTest.txt}) -itk_add_test(NAME itkLoggerTest COMMAND ITKCommon1TestDriver itkLoggerTest ${TEMP}/test_logger.txt) -itk_add_test(NAME itkLoggerOutputTest COMMAND ITKCommon2TestDriver itkLoggerOutputTest ${TEMP}/test_loggerOutput.txt) -itk_add_test(NAME itkLoggerManagerTest COMMAND ITKCommon2TestDriver itkLoggerManagerTest ${TEMP}/test_LoggerManager.txt) -itk_add_test(NAME itkLoggerThreadWrapperTest COMMAND ITKCommon2TestDriver itkLoggerThreadWrapperTest ${TEMP}/test_LoggerThreadWrapper.txt) -itk_add_test(NAME itkMatrixTest COMMAND ITKCommon2TestDriver itkMatrixTest) -itk_add_test(NAME itkMapContainerTest COMMAND ITKCommon1TestDriver itkMapContainerTest) -itk_add_test(NAME itkVectorContainerTest COMMAND ITKCommon1TestDriver itkVectorContainerTest) -itk_add_test(NAME itkIteratorTests COMMAND ITKCommon1TestDriver itkIteratorTests) -itk_add_test(NAME itkObjectFactoryTest COMMAND ITKCommon1TestDriver itkObjectFactoryTest) -itk_add_test(NAME itkVectorTest COMMAND ITKCommon1TestDriver itkVectorTest) -itk_add_test(NAME itkPointSetTest COMMAND ITKCommon1TestDriver itkPointSetTest) -itk_add_test(NAME itkPointSetToImageFilterTest1 - COMMAND ITKCommon1TestDriver - --compare DATA{Baseline/itkPointSetToImageFilterTest1.png} ${ITK_TEST_OUTPUT_DIR}/itkPointSetToImageFilterTest1.png - itkPointSetToImageFilterTest1 ${ITK_TEST_OUTPUT_DIR}/itkPointSetToImageFilterTest1.png) -itk_add_test(NAME itkPointSetToImageFilterTest2 - COMMAND ITKCommon1TestDriver - --compare DATA{Baseline/itkPointSetToImageFilterTest2.mha} ${ITK_TEST_OUTPUT_DIR}/itkPointSetToImageFilterTest2.mha - itkPointSetToImageFilterTest2 DATA{${ITK_DATA_ROOT}/Input/VascularTreePointSet.txt} ${ITK_TEST_OUTPUT_DIR}/itkPointSetToImageFilterTest2.mha) -itk_add_test(NAME itkBresenhamLineTest COMMAND ITKCommon1TestDriver itkBresenhamLineTest) -itk_add_test(NAME itkSparseFieldLayerTest COMMAND ITKCommon1TestDriver itkSparseFieldLayerTest) -itk_add_test(NAME itkDataObjectTest COMMAND ITKCommon1TestDriver itkDataObjectTest) -itk_add_test(NAME itkAtanRegularizedHeavisideStepFunctionTest1 - COMMAND ITKCommon1TestDriver itkAtanRegularizedHeavisideStepFunctionTest1) -itk_add_test(NAME itkHashTableTest COMMAND ITKCommon1TestDriver itkHashTableTest) -itk_add_test(NAME itkHeavisideStepFunctionTest1 - COMMAND ITKCommon1TestDriver itkHeavisideStepFunctionTest1) -itk_add_test(NAME itkSinRegularizedHeavisideStepFunctionTest1 - COMMAND ITKCommon1TestDriver itkSinRegularizedHeavisideStepFunctionTest1) -itk_add_test(NAME itkPixelAccessTest COMMAND ITKCommon1TestDriver itkPixelAccessTest) -itk_add_test(NAME itkPointGeometryTest COMMAND ITKCommon1TestDriver itkPointGeometryTest) -itk_add_test(NAME itkStdStreamStateSaveTest COMMAND ITKCommon1TestDriver itkStdStreamStateSaveTest) +itk_add_test( + NAME + itkSobelOperatorImageConvolutionVertCircleTest + COMMAND + ITKCommon1TestDriver + --compare + DATA{Baseline/itkSobelOperatorImageConvolutionVertCircleTest.tiff} + ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageConvolutionVertCircleTest.tiff + itkSobelOperatorImageConvolutionTest + DATA{${ITK_DATA_ROOT}/Input/circle.png} + 1 + ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageConvolutionVertCircleTest.tiff) + +itk_add_test( + NAME + itkSobelOperatorImageFilterVertTest + COMMAND + ITKCommon1TestDriver + --compare + DATA{Baseline/itkSobelOperatorImageVertTest.tiff} + ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageFilterVertTest.tiff + itkSobelOperatorImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/sf4.png} + 1 + ${ITK_TEST_OUTPUT_DIR}/itkSobelOperatorImageFilterVertTest.tiff) + +itk_add_test( + NAME + itkSobelOperatorTest + COMMAND + ITKCommon1TestDriver + itkSobelOperatorTest) + +itk_add_test( + NAME + itkConstNeighborhoodIteratorTest + COMMAND + ITKCommon2TestDriver + --redirectOutput + ${TEMP}/itkConstNeighborhoodIteratorTest.txt + itkConstNeighborhoodIteratorTest) +set_tests_properties(itkConstNeighborhoodIteratorTest + PROPERTIES ATTACHED_FILES_ON_FAIL ${ITK_TEST_OUTPUT_DIR}/itkConstNeighborhoodIteratorTest.txt) + +itk_add_test( + NAME + itkShapedNeighborhoodIteratorTest + COMMAND + ITKCommon2TestDriver + --redirectOutput + ${TEMP}/itkShapedNeighborhoodIteratorTest.txt + itkShapedNeighborhoodIteratorTest) +set_tests_properties(itkShapedNeighborhoodIteratorTest + PROPERTIES ATTACHED_FILES_ON_FAIL ${ITK_TEST_OUTPUT_DIR}/itkShapedNeighborhoodIteratorTest.txt) + +itk_add_test( + NAME + itkConstShapedNeighborhoodIteratorTest + COMMAND + ITKCommon2TestDriver + itkConstShapedNeighborhoodIteratorTest) +itk_add_test( + NAME + itkConstShapedNeighborhoodIteratorTest2 + COMMAND + ITKCommon2TestDriver + itkConstShapedNeighborhoodIteratorTest2) +itk_add_test( + NAME + itkEventObjectTest + COMMAND + ITKCommon1TestDriver + itkEventObjectTest) +itk_add_test( + NAME + itkMathCastWithRangeCheckTest + COMMAND + ITKCommon1TestDriver + itkMathCastWithRangeCheckTest) +itk_add_test( + NAME + itkMathRoundProfileTest1 + COMMAND + ITKCommon1TestDriver + itkMathRoundProfileTest1) +itk_add_test( + NAME + itkMathRoundTest + COMMAND + ITKCommon1TestDriver + itkMathRoundTest) +itk_add_test( + NAME + itkMathRoundTest2 + COMMAND + ITKCommon1TestDriver + itkMathRoundTest2) +itk_add_test( + NAME + itkModifiedTimeTest + COMMAND + ITKCommon1TestDriver + itkModifiedTimeTest) +itk_add_test( + NAME + itkExceptionObjectTest + COMMAND + ITKCommon1TestDriver + itkExceptionObjectTest) +itk_add_test( + NAME + itkFileOutputWindowTest + COMMAND + ITKCommon1TestDriver + itkFileOutputWindowTest) +itk_add_test( + NAME + itkFiniteCylinderSpatialFunctionTest + COMMAND + ITKCommon2TestDriver + itkFiniteCylinderSpatialFunctionTest) +itk_add_test( + NAME + itkGaussianSpatialFunctionTest1 + COMMAND + ITKCommon1TestDriver + itkGaussianSpatialFunctionTest + 1.0 + 0) +itk_add_test( + NAME + itkGaussianSpatialFunctionTest2 + COMMAND + ITKCommon1TestDriver + itkGaussianSpatialFunctionTest + 19.0 + 1) +itk_add_test( + NAME + itkCrossHelperTest + COMMAND + ITKCommon1TestDriver + itkCrossHelperTest) +itk_add_test( + NAME + itkImageIteratorTest + COMMAND + ITKCommon1TestDriver + itkImageIteratorTest) +itk_add_test( + NAME + itkImageIteratorWithIndexTest + COMMAND + ITKCommon1TestDriver + itkImageIteratorWithIndexTest) +itk_add_test( + NAME + itkImageRegionIteratorTest + COMMAND + ITKCommon1TestDriver + itkImageRegionIteratorTest) +itk_add_test( + NAME + itkImageScanlineIteratorTest1 + COMMAND + ITKCommon1TestDriver + itkImageScanlineIteratorTest1) +itk_add_test( + NAME + itkImageRegionTest + COMMAND + ITKCommon1TestDriver + itkImageRegionTest) +itk_add_test( + NAME + itkImageRegionExclusionIteratorWithIndexTest + COMMAND + ITKCommon2TestDriver + itkImageRegionExclusionIteratorWithIndexTest) +itk_add_test( + NAME + itkImageReverseIteratorTest + COMMAND + ITKCommon1TestDriver + itkImageReverseIteratorTest) +itk_add_test( + NAME + itkImageDuplicatorTest + COMMAND + ITKCommon1TestDriver + itkImageDuplicatorTest) +itk_add_test( + NAME + itkImageDuplicatorTest2 + COMMAND + ITKCommon1TestDriver + --compare + DATA{Baseline/vol-raw-big-dup2.nrrd} + ${ITK_TEST_OUTPUT_DIR}/vol-raw-big-dup2.nrrd + itkImageDuplicatorTest2 + DATA{${ITK_DATA_ROOT}/Input/vol-raw-big.nrrd} + ${ITK_TEST_OUTPUT_DIR}/vol-raw-big-dup2.nrrd) +itk_add_test( + NAME + itkImageIteratorsForwardBackwardTest + COMMAND + ITKCommon1TestDriver + itkImageIteratorsForwardBackwardTest) +itk_add_test( + NAME + itkImageLinearIteratorTest + COMMAND + ITKCommon1TestDriver + itkImageLinearIteratorTest) +itk_add_test( + NAME + itkImageRandomIteratorTest + COMMAND + ITKCommon1TestDriver + itkImageRandomIteratorTest) +itk_add_test( + NAME + itkImageRandomIteratorTest2 + COMMAND + ITKCommon1TestDriver + itkImageRandomIteratorTest2 + ${ITK_TEST_OUTPUT_DIR}/itkImageRandomIteratorTest2Output.mha) +itk_add_test( + NAME + itkImageRandomNonRepeatingIteratorWithIndexTest + COMMAND + ITKCommon1TestDriver + itkImageRandomNonRepeatingIteratorWithIndexTest) +itk_add_test( + NAME + itkImageRandomNonRepeatingIteratorWithIndexTest2 + COMMAND + ITKCommon1TestDriver + itkImageRandomNonRepeatingIteratorWithIndexTest2) +itk_add_test( + NAME + itkImageSliceIteratorTest + COMMAND + ITKCommon1TestDriver + itkImageSliceIteratorTest) +itk_add_test( + NAME + itkImageTest + COMMAND + ITKCommon1TestDriver + itkImageTest) +itk_add_test( + NAME + itkLightObjectTest + COMMAND + ITKCommon1TestDriver + itkLightObjectTest) +itk_add_test( + NAME + itkLineIteratorTest + COMMAND + ITKCommon1TestDriver + itkLineIteratorTest + DATA{${BASELINE}/itkLineIteratorTest.txt}) +itk_add_test( + NAME + itkLoggerTest + COMMAND + ITKCommon1TestDriver + itkLoggerTest + ${TEMP}/test_logger.txt) +itk_add_test( + NAME + itkLoggerOutputTest + COMMAND + ITKCommon2TestDriver + itkLoggerOutputTest + ${TEMP}/test_loggerOutput.txt) +itk_add_test( + NAME + itkLoggerManagerTest + COMMAND + ITKCommon2TestDriver + itkLoggerManagerTest + ${TEMP}/test_LoggerManager.txt) +itk_add_test( + NAME + itkLoggerThreadWrapperTest + COMMAND + ITKCommon2TestDriver + itkLoggerThreadWrapperTest + ${TEMP}/test_LoggerThreadWrapper.txt) +itk_add_test( + NAME + itkMatrixTest + COMMAND + ITKCommon2TestDriver + itkMatrixTest) +itk_add_test( + NAME + itkMapContainerTest + COMMAND + ITKCommon1TestDriver + itkMapContainerTest) +itk_add_test( + NAME + itkVectorContainerTest + COMMAND + ITKCommon1TestDriver + itkVectorContainerTest) +itk_add_test( + NAME + itkIteratorTests + COMMAND + ITKCommon1TestDriver + itkIteratorTests) +itk_add_test( + NAME + itkObjectFactoryTest + COMMAND + ITKCommon1TestDriver + itkObjectFactoryTest) +itk_add_test( + NAME + itkVectorTest + COMMAND + ITKCommon1TestDriver + itkVectorTest) +itk_add_test( + NAME + itkPointSetTest + COMMAND + ITKCommon1TestDriver + itkPointSetTest) +itk_add_test( + NAME + itkPointSetToImageFilterTest1 + COMMAND + ITKCommon1TestDriver + --compare + DATA{Baseline/itkPointSetToImageFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkPointSetToImageFilterTest1.png + itkPointSetToImageFilterTest1 + ${ITK_TEST_OUTPUT_DIR}/itkPointSetToImageFilterTest1.png) +itk_add_test( + NAME + itkPointSetToImageFilterTest2 + COMMAND + ITKCommon1TestDriver + --compare + DATA{Baseline/itkPointSetToImageFilterTest2.mha} + ${ITK_TEST_OUTPUT_DIR}/itkPointSetToImageFilterTest2.mha + itkPointSetToImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/VascularTreePointSet.txt} + ${ITK_TEST_OUTPUT_DIR}/itkPointSetToImageFilterTest2.mha) +itk_add_test( + NAME + itkBresenhamLineTest + COMMAND + ITKCommon1TestDriver + itkBresenhamLineTest) +itk_add_test( + NAME + itkSparseFieldLayerTest + COMMAND + ITKCommon1TestDriver + itkSparseFieldLayerTest) +itk_add_test( + NAME + itkDataObjectTest + COMMAND + ITKCommon1TestDriver + itkDataObjectTest) +itk_add_test( + NAME + itkAtanRegularizedHeavisideStepFunctionTest1 + COMMAND + ITKCommon1TestDriver + itkAtanRegularizedHeavisideStepFunctionTest1) +itk_add_test( + NAME + itkHashTableTest + COMMAND + ITKCommon1TestDriver + itkHashTableTest) +itk_add_test( + NAME + itkHeavisideStepFunctionTest1 + COMMAND + ITKCommon1TestDriver + itkHeavisideStepFunctionTest1) +itk_add_test( + NAME + itkSinRegularizedHeavisideStepFunctionTest1 + COMMAND + ITKCommon1TestDriver + itkSinRegularizedHeavisideStepFunctionTest1) +itk_add_test( + NAME + itkPixelAccessTest + COMMAND + ITKCommon1TestDriver + itkPixelAccessTest) +itk_add_test( + NAME + itkPointGeometryTest + COMMAND + ITKCommon1TestDriver + itkPointGeometryTest) +itk_add_test( + NAME + itkStdStreamStateSaveTest + COMMAND + ITKCommon1TestDriver + itkStdStreamStateSaveTest) # # This test should be enabled if you suspect that the memory leak detector # is not working if(0) - itk_add_test(NAME itkMemoryLeakTest COMMAND ITKCommon2TestDriver itkMemoryLeakTest) + itk_add_test( + NAME + itkMemoryLeakTest + COMMAND + ITKCommon2TestDriver + itkMemoryLeakTest) endif() -itk_add_test(NAME itkMetaDataDictionaryTest COMMAND ITKCommon2TestDriver itkMetaDataDictionaryTest) - -itk_add_test(NAME itkMultiThreaderBaseTestPlatform - COMMAND ITKCommon2TestDriver itkMultiThreaderBaseTest) -set_tests_properties(itkMultiThreaderBaseTestPlatform - PROPERTIES ENVIRONMENT "ITK_GLOBAL_DEFAULT_THREADER=Platform") -itk_add_test(NAME itkMultiThreaderBaseTestPool - COMMAND ITKCommon2TestDriver itkMultiThreaderBaseTest) -set_tests_properties(itkMultiThreaderBaseTestPool - PROPERTIES ENVIRONMENT "ITK_GLOBAL_DEFAULT_THREADER=Pool") -itk_add_test(NAME itkMultiThreaderBaseTest3 - COMMAND ITKCommon2TestDriver itkMultiThreaderBaseTest 3) # test with 3 threads - -itk_add_test(NAME itkMultiThreaderTypeFromEnvironmentTestPlatform - COMMAND ITKCommon2TestDriver itkMultiThreaderTypeFromEnvironmentTest PlatFORM) -set_tests_properties(itkMultiThreaderTypeFromEnvironmentTestPlatform - PROPERTIES ENVIRONMENT "ITK_GLOBAL_DEFAULT_THREADER=plaTform") - -itk_add_test(NAME itkMultiThreaderTypeFromEnvironmentTestPool - COMMAND ITKCommon2TestDriver itkMultiThreaderTypeFromEnvironmentTest PooL) -set_tests_properties(itkMultiThreaderTypeFromEnvironmentTestPool - PROPERTIES ENVIRONMENT "ITK_GLOBAL_DEFAULT_THREADER=pOoL") # tests letter case too +itk_add_test( + NAME + itkMetaDataDictionaryTest + COMMAND + ITKCommon2TestDriver + itkMetaDataDictionaryTest) + +itk_add_test( + NAME + itkMultiThreaderBaseTestPlatform + COMMAND + ITKCommon2TestDriver + itkMultiThreaderBaseTest) +set_tests_properties(itkMultiThreaderBaseTestPlatform PROPERTIES ENVIRONMENT "ITK_GLOBAL_DEFAULT_THREADER=Platform") +itk_add_test( + NAME + itkMultiThreaderBaseTestPool + COMMAND + ITKCommon2TestDriver + itkMultiThreaderBaseTest) +set_tests_properties(itkMultiThreaderBaseTestPool PROPERTIES ENVIRONMENT "ITK_GLOBAL_DEFAULT_THREADER=Pool") +itk_add_test( + NAME + itkMultiThreaderBaseTest3 + COMMAND + ITKCommon2TestDriver + itkMultiThreaderBaseTest + 3) # test with 3 threads + +itk_add_test( + NAME + itkMultiThreaderTypeFromEnvironmentTestPlatform + COMMAND + ITKCommon2TestDriver + itkMultiThreaderTypeFromEnvironmentTest + PlatFORM) +set_tests_properties(itkMultiThreaderTypeFromEnvironmentTestPlatform PROPERTIES ENVIRONMENT + "ITK_GLOBAL_DEFAULT_THREADER=plaTform") + +itk_add_test( + NAME + itkMultiThreaderTypeFromEnvironmentTestPool + COMMAND + ITKCommon2TestDriver + itkMultiThreaderTypeFromEnvironmentTest + PooL) +set_tests_properties( + itkMultiThreaderTypeFromEnvironmentTestPool PROPERTIES ENVIRONMENT "ITK_GLOBAL_DEFAULT_THREADER=pOoL" +)# tests letter case too if(Module_ITKTBB) # ITK_USE_TBB is not yet defined here - itk_add_test(NAME itkMultiThreaderBaseTestTBB - COMMAND ITKCommon2TestDriver itkMultiThreaderBaseTest) - set_tests_properties(itkMultiThreaderBaseTestTBB - PROPERTIES ENVIRONMENT "ITK_GLOBAL_DEFAULT_THREADER=TBB") - - itk_add_test(NAME itkMultiThreaderTypeFromEnvironmentTestTBB - COMMAND ITKCommon2TestDriver itkMultiThreaderTypeFromEnvironmentTest TBB) - set_tests_properties(itkMultiThreaderTypeFromEnvironmentTestTBB - PROPERTIES ENVIRONMENT "ITK_GLOBAL_DEFAULT_THREADER=tbb") # tests letter case too - - itk_add_test(NAME itkMultiThreaderParallelizeArrayTestTBB - COMMAND ITKCommon2TestDriver itkMultiThreaderParallelizeArrayTest) - set_tests_properties(itkMultiThreaderParallelizeArrayTestTBB - PROPERTIES ENVIRONMENT "ITK_GLOBAL_DEFAULT_THREADER=TBB") + itk_add_test( + NAME + itkMultiThreaderBaseTestTBB + COMMAND + ITKCommon2TestDriver + itkMultiThreaderBaseTest) + set_tests_properties(itkMultiThreaderBaseTestTBB PROPERTIES ENVIRONMENT "ITK_GLOBAL_DEFAULT_THREADER=TBB") + + itk_add_test( + NAME + itkMultiThreaderTypeFromEnvironmentTestTBB + COMMAND + ITKCommon2TestDriver + itkMultiThreaderTypeFromEnvironmentTest + TBB) + set_tests_properties( + itkMultiThreaderTypeFromEnvironmentTestTBB PROPERTIES ENVIRONMENT "ITK_GLOBAL_DEFAULT_THREADER=tbb" + )# tests letter case too + + itk_add_test( + NAME + itkMultiThreaderParallelizeArrayTestTBB + COMMAND + ITKCommon2TestDriver + itkMultiThreaderParallelizeArrayTest) + set_tests_properties(itkMultiThreaderParallelizeArrayTestTBB PROPERTIES ENVIRONMENT "ITK_GLOBAL_DEFAULT_THREADER=TBB") endif() -itk_add_test(NAME itkMultiThreaderParallelizeArrayTestPlatform - COMMAND ITKCommon2TestDriver itkMultiThreaderParallelizeArrayTest) -set_tests_properties(itkMultiThreaderParallelizeArrayTestPlatform - PROPERTIES ENVIRONMENT "ITK_GLOBAL_DEFAULT_THREADER=Platform") -itk_add_test(NAME itkMultiThreaderParallelizeArrayTestPool - COMMAND ITKCommon2TestDriver itkMultiThreaderParallelizeArrayTest) -set_tests_properties(itkMultiThreaderParallelizeArrayTestPool - PROPERTIES ENVIRONMENT "ITK_GLOBAL_DEFAULT_THREADER=Pool") -itk_add_test(NAME itkMultiThreaderParallelizeArrayTest3 - COMMAND ITKCommon2TestDriver itkMultiThreaderParallelizeArrayTest 3) # test with 3 threads +itk_add_test( + NAME + itkMultiThreaderParallelizeArrayTestPlatform + COMMAND + ITKCommon2TestDriver + itkMultiThreaderParallelizeArrayTest) +set_tests_properties(itkMultiThreaderParallelizeArrayTestPlatform PROPERTIES ENVIRONMENT + "ITK_GLOBAL_DEFAULT_THREADER=Platform") +itk_add_test( + NAME + itkMultiThreaderParallelizeArrayTestPool + COMMAND + ITKCommon2TestDriver + itkMultiThreaderParallelizeArrayTest) +set_tests_properties(itkMultiThreaderParallelizeArrayTestPool PROPERTIES ENVIRONMENT "ITK_GLOBAL_DEFAULT_THREADER=Pool") +itk_add_test( + NAME + itkMultiThreaderParallelizeArrayTest3 + COMMAND + ITKCommon2TestDriver + itkMultiThreaderParallelizeArrayTest + 3) # test with 3 threads #test deprecated ITK_USE_THREADPOOL environment variable -itk_add_test(NAME itkMultiThreaderTypeFromEnvironmentTestOldPool - COMMAND ITKCommon2TestDriver itkMultiThreaderTypeFromEnvironmentTest Pool) -set_tests_properties(itkMultiThreaderTypeFromEnvironmentTestOldPool - PROPERTIES ENVIRONMENT "ITK_USE_THREADPOOL=pOoL") +itk_add_test( + NAME + itkMultiThreaderTypeFromEnvironmentTestOldPool + COMMAND + ITKCommon2TestDriver + itkMultiThreaderTypeFromEnvironmentTest + Pool) +set_tests_properties(itkMultiThreaderTypeFromEnvironmentTestOldPool PROPERTIES ENVIRONMENT "ITK_USE_THREADPOOL=pOoL") -itk_add_test(NAME itkMultiThreaderTypeFromEnvironmentTestOldPool2 - COMMAND ITKCommon2TestDriver itkMultiThreaderTypeFromEnvironmentTest Pool) -set_tests_properties(itkMultiThreaderTypeFromEnvironmentTestOldPool2 - PROPERTIES ENVIRONMENT "ITK_USE_THREADPOOL=ON") +itk_add_test( + NAME + itkMultiThreaderTypeFromEnvironmentTestOldPool2 + COMMAND + ITKCommon2TestDriver + itkMultiThreaderTypeFromEnvironmentTest + Pool) +set_tests_properties(itkMultiThreaderTypeFromEnvironmentTestOldPool2 PROPERTIES ENVIRONMENT "ITK_USE_THREADPOOL=ON") -itk_add_test(NAME itkMultiThreaderTypeFromEnvironmentTestOldPlatform - COMMAND ITKCommon2TestDriver itkMultiThreaderTypeFromEnvironmentTest Platform) -set_tests_properties(itkMultiThreaderTypeFromEnvironmentTestOldPlatform - PROPERTIES ENVIRONMENT "ITK_USE_THREADPOOL=OFF") +itk_add_test( + NAME + itkMultiThreaderTypeFromEnvironmentTestOldPlatform + COMMAND + ITKCommon2TestDriver + itkMultiThreaderTypeFromEnvironmentTest + Platform) +set_tests_properties(itkMultiThreaderTypeFromEnvironmentTestOldPlatform PROPERTIES ENVIRONMENT "ITK_USE_THREADPOOL=OFF") -itk_add_test(NAME itkMultiThreadingEnvTest88 COMMAND +itk_add_test( + NAME + itkMultiThreadingEnvTest88 + COMMAND ITKCommon2TestDriver - --remove-env "ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS" - itkMultiThreadingEnvironmentTest 88) + --remove-env + "ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS" + itkMultiThreadingEnvironmentTest + 88) set_tests_properties(itkMultiThreadingEnvTest88 PROPERTIES ENVIRONMENT "NSLOTS=88") -itk_add_test(NAME itkMultiThreadingEnvTest43 COMMAND ITKCommon2TestDriver itkMultiThreadingEnvironmentTest 43) +itk_add_test( + NAME + itkMultiThreadingEnvTest43 + COMMAND + ITKCommon2TestDriver + itkMultiThreadingEnvironmentTest + 43) set_tests_properties(itkMultiThreadingEnvTest43 PROPERTIES ENVIRONMENT "ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=43") -itk_add_test(NAME itkMultiThreadingEnvTest123 COMMAND +itk_add_test( + NAME + itkMultiThreadingEnvTest123 + COMMAND ITKCommon2TestDriver - --remove-env "ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS" - itkMultiThreadingEnvironmentTest 123) -set_tests_properties(itkMultiThreadingEnvTest123 PROPERTIES ENVIRONMENT "NSLOTS=9;FIRST_IGNORED=13;LAST_RESPECTED=123;ITK_NUMBER_OF_THREADS_ENV_LIST=FIRST_IGNORED:LAST_RESPECTED") + --remove-env + "ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS" + itkMultiThreadingEnvironmentTest + 123) +set_tests_properties( + itkMultiThreadingEnvTest123 + PROPERTIES ENVIRONMENT + "NSLOTS=9;FIRST_IGNORED=13;LAST_RESPECTED=123;ITK_NUMBER_OF_THREADS_ENV_LIST=FIRST_IGNORED:LAST_RESPECTED") -itk_add_test(NAME itkNeighborhoodAlgorithmTest COMMAND ITKCommon1TestDriver itkNeighborhoodAlgorithmTest) -itk_add_test(NAME itkNeighborhoodTest COMMAND ITKCommon2TestDriver itkNeighborhoodTest) -itk_add_test(NAME itkNeighborhoodIteratorTest COMMAND ITKCommon2TestDriver itkNeighborhoodIteratorTest) -itk_add_test(NAME itkNeighborhoodOperatorTest COMMAND ITKCommon1TestDriver itkNeighborhoodOperatorTest) -itk_add_test(NAME itkNumericsTest COMMAND ITKCommon1TestDriver itkNumericsTest) -itk_add_test(NAME itkNumericTraitsTest COMMAND ITKCommon1TestDriver --full-output itkNumericTraitsTest) -itk_add_test(NAME itkIntTypesTest COMMAND ITKCommon1TestDriver itkIntTypesTest) -itk_add_test(NAME itkOctreeTest COMMAND ITKCommon2TestDriver itkOctreeTest) -itk_add_test(NAME itkNumberToStringTest COMMAND ITKCommon1TestDriver itkNumberToStringTest) +itk_add_test( + NAME + itkNeighborhoodAlgorithmTest + COMMAND + ITKCommon1TestDriver + itkNeighborhoodAlgorithmTest) +itk_add_test( + NAME + itkNeighborhoodTest + COMMAND + ITKCommon2TestDriver + itkNeighborhoodTest) +itk_add_test( + NAME + itkNeighborhoodIteratorTest + COMMAND + ITKCommon2TestDriver + itkNeighborhoodIteratorTest) +itk_add_test( + NAME + itkNeighborhoodOperatorTest + COMMAND + ITKCommon1TestDriver + itkNeighborhoodOperatorTest) +itk_add_test( + NAME + itkNumericsTest + COMMAND + ITKCommon1TestDriver + itkNumericsTest) +itk_add_test( + NAME + itkNumericTraitsTest + COMMAND + ITKCommon1TestDriver + --full-output + itkNumericTraitsTest) +itk_add_test( + NAME + itkIntTypesTest + COMMAND + ITKCommon1TestDriver + itkIntTypesTest) +itk_add_test( + NAME + itkOctreeTest + COMMAND + ITKCommon2TestDriver + itkOctreeTest) +itk_add_test( + NAME + itkNumberToStringTest + COMMAND + ITKCommon1TestDriver + itkNumberToStringTest) if(ITK_BUILD_SHARED_LIBS) - itk_add_test(NAME itkObjectFactoryTest2 COMMAND ITKCommon2TestDriver itkObjectFactoryTest2 ${ITK_TEST_OUTPUT_DIR} ${ITK_TEST_OUTPUT_DIR}) + itk_add_test( + NAME + itkObjectFactoryTest2 + COMMAND + ITKCommon2TestDriver + itkObjectFactoryTest2 + ${ITK_TEST_OUTPUT_DIR} + ${ITK_TEST_OUTPUT_DIR}) -set_tests_properties(itkObjectFactoryTest2 PROPERTIES RUN_SERIAL 1) + set_tests_properties(itkObjectFactoryTest2 PROPERTIES RUN_SERIAL 1) endif() -itk_add_test(NAME itkObjectFactoryTest3 COMMAND ITKCommon2TestDriver itkObjectFactoryTest3) -itk_add_test(NAME itkObjectFactoryOnlyNewTest COMMAND ITKCommon2TestDriver itkObjectFactoryOnlyNewTest) -itk_add_test(NAME itkPeriodicBoundaryConditionTest COMMAND ITKCommon2TestDriver itkPeriodicBoundaryConditionTest) -itk_add_test(NAME itkPhasedArray3DSpecialCoordinatesImageTest COMMAND ITKCommon1TestDriver itkPhasedArray3DSpecialCoordinatesImageTest) -itk_add_test(NAME itkPriorityQueueTest COMMAND ITKCommon1TestDriver itkPriorityQueueTest) -itk_add_test(NAME itkRealTimeClockTest COMMAND ITKCommon1TestDriver itkRealTimeClockTest) -itk_add_test(NAME itkRealTimeStampTest COMMAND ITKCommon1TestDriver itkRealTimeStampTest) -itk_add_test(NAME itkRealTimeIntervalTest COMMAND ITKCommon1TestDriver itkRealTimeIntervalTest) -itk_add_test(NAME itkTimeProbeTest COMMAND ITKCommon1TestDriver itkTimeProbeTest) -itk_add_test(NAME itkTimeProbeTest2 COMMAND ITKCommon1TestDriver itkTimeProbeTest2) -itk_add_test(NAME itkRGBPixelTest COMMAND ITKCommon1TestDriver itkRGBPixelTest) -itk_add_test(NAME itkSparseImageTest COMMAND ITKCommon1TestDriver itkSparseImageTest) -itk_add_test(NAME itkSimpleFilterWatcherTest COMMAND ITKCommon1TestDriver itkSimpleFilterWatcherTest) -itk_add_test(NAME itkSliceIteratorTest COMMAND ITKCommon2TestDriver --redirectOutput ${TEMP}/itkSliceIteratorTest.txt itkSliceIteratorTest) +itk_add_test( + NAME + itkObjectFactoryTest3 + COMMAND + ITKCommon2TestDriver + itkObjectFactoryTest3) +itk_add_test( + NAME + itkObjectFactoryOnlyNewTest + COMMAND + ITKCommon2TestDriver + itkObjectFactoryOnlyNewTest) +itk_add_test( + NAME + itkPeriodicBoundaryConditionTest + COMMAND + ITKCommon2TestDriver + itkPeriodicBoundaryConditionTest) +itk_add_test( + NAME + itkPhasedArray3DSpecialCoordinatesImageTest + COMMAND + ITKCommon1TestDriver + itkPhasedArray3DSpecialCoordinatesImageTest) +itk_add_test( + NAME + itkPriorityQueueTest + COMMAND + ITKCommon1TestDriver + itkPriorityQueueTest) +itk_add_test( + NAME + itkRealTimeClockTest + COMMAND + ITKCommon1TestDriver + itkRealTimeClockTest) +itk_add_test( + NAME + itkRealTimeStampTest + COMMAND + ITKCommon1TestDriver + itkRealTimeStampTest) +itk_add_test( + NAME + itkRealTimeIntervalTest + COMMAND + ITKCommon1TestDriver + itkRealTimeIntervalTest) +itk_add_test( + NAME + itkTimeProbeTest + COMMAND + ITKCommon1TestDriver + itkTimeProbeTest) +itk_add_test( + NAME + itkTimeProbeTest2 + COMMAND + ITKCommon1TestDriver + itkTimeProbeTest2) +itk_add_test( + NAME + itkRGBPixelTest + COMMAND + ITKCommon1TestDriver + itkRGBPixelTest) +itk_add_test( + NAME + itkSparseImageTest + COMMAND + ITKCommon1TestDriver + itkSparseImageTest) +itk_add_test( + NAME + itkSimpleFilterWatcherTest + COMMAND + ITKCommon1TestDriver + itkSimpleFilterWatcherTest) +itk_add_test( + NAME + itkSliceIteratorTest + COMMAND + ITKCommon2TestDriver + --redirectOutput + ${TEMP}/itkSliceIteratorTest.txt + itkSliceIteratorTest) set_tests_properties(itkSliceIteratorTest PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkSliceIteratorTest.txt) -itk_add_test(NAME itkSmartPointerTest COMMAND ITKCommon2TestDriver itkSmartPointerTest) -itk_add_test(NAME itkSpatialFunctionTest COMMAND ITKCommon2TestDriver itkSpatialFunctionTest) -itk_add_test(NAME itkSTLContainerAdaptorTest COMMAND ITKCommon2TestDriver itkSTLContainerAdaptorTest) -itk_add_test(NAME itkStdStreamLogOutputTest COMMAND ITKCommon2TestDriver itkStdStreamLogOutputTest ${TEMP}/testStreamLogOutput.txt) -itk_add_test(NAME itkThreadLoggerTest COMMAND ITKCommon2TestDriver itkThreadLoggerTest ${TEMP}/test_threadLogger.txt) -itk_add_test(NAME itkThreadDefsTest COMMAND ITKCommon2TestDriver itkThreadDefsTest) -itk_add_test(NAME itkTimeProbesTest COMMAND ITKCommon2TestDriver itkTimeProbesTest) -itk_add_test(NAME itkVersorTest COMMAND ITKCommon2TestDriver itkVersorTest) -itk_add_test(NAME itkConicShellInteriorExteriorSpatialFunctionTest COMMAND ITKCommon2TestDriver itkConicShellInteriorExteriorSpatialFunctionTest) -itk_add_test(NAME itkEllipsoidInteriorExteriorSpatialFunctionTest COMMAND ITKCommon2TestDriver itkEllipsoidInteriorExteriorSpatialFunctionTest) -itk_add_test(NAME itkFrustumSpatialFunctionTest COMMAND ITKCommon2TestDriver itkFrustumSpatialFunctionTest) -itk_add_test(NAME itkSymmetricEllipsoidInteriorExteriorSpatialFunctionTest COMMAND ITKCommon1TestDriver itkSymmetricEllipsoidInteriorExteriorSpatialFunctionTest) -itk_add_test(NAME itkTorusInteriorExteriorSpatialFunctionTest COMMAND ITKCommon2TestDriver itkTorusInteriorExteriorSpatialFunctionTest) -itk_add_test(NAME itkSymmetricSecondRankTensorImageReadTest COMMAND ITKCommon1TestDriver itkSymmetricSecondRankTensorImageReadTest - ${ITK_TEST_OUTPUT_DIR}/testSymmetricTensor.nrrd) -itk_add_test(NAME itkSymmetricSecondRankTensorImageWriteReadTest COMMAND ITKCommon1TestDriver itkSymmetricSecondRankTensorImageWriteReadTest - ${ITK_TEST_OUTPUT_DIR}/testSymmetricTensorWriteRead.mha) -itk_add_test(NAME itkSymmetricSecondRankTensorTest COMMAND ITKCommon2TestDriver itkSymmetricSecondRankTensorTest) -itk_add_test(NAME itkSymmetricEigenAnalysisTest COMMAND ITKCommon1TestDriver itkSymmetricEigenAnalysisTest) -itk_add_test(NAME itkSTLThreadTest COMMAND ITKCommon2TestDriver itkSTLThreadTest) -itk_add_test(NAME itkStreamingImageFilterTest COMMAND ITKCommon1TestDriver itkStreamingImageFilterTest) -itk_add_test(NAME itkStreamingImageFilterTest2 COMMAND ITKCommon1TestDriver itkStreamingImageFilterTest2) -itk_add_test(NAME itkStreamingImageFilterTest3_1 COMMAND ITKCommon1TestDriver - --compare DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence1.png} - ${ITK_TEST_OUTPUT_DIR}/itkStreamingImageFilterTest3_1.png - itkStreamingImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence1.png} ${ITK_TEST_OUTPUT_DIR}/itkStreamingImageFilterTest3_1.png 10) -itk_add_test(NAME itkStreamingImageFilterTest3_2 - COMMAND ITKCommon1TestDriver - --compare DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence1.png} - ${ITK_TEST_OUTPUT_DIR}/itkStreamingImageFilterTest3_2.png - itkStreamingImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence1.png} ${ITK_TEST_OUTPUT_DIR}/itkStreamingImageFilterTest3_2.png 1000) -itk_add_test(NAME itkVariableLengthVectorTest COMMAND ITKCommon2TestDriver itkVariableLengthVectorTest) -itk_add_test(NAME itkVariableSizeMatrixTest COMMAND ITKCommon2TestDriver itkVariableSizeMatrixTest) +itk_add_test( + NAME + itkSmartPointerTest + COMMAND + ITKCommon2TestDriver + itkSmartPointerTest) +itk_add_test( + NAME + itkSpatialFunctionTest + COMMAND + ITKCommon2TestDriver + itkSpatialFunctionTest) +itk_add_test( + NAME + itkSTLContainerAdaptorTest + COMMAND + ITKCommon2TestDriver + itkSTLContainerAdaptorTest) +itk_add_test( + NAME + itkStdStreamLogOutputTest + COMMAND + ITKCommon2TestDriver + itkStdStreamLogOutputTest + ${TEMP}/testStreamLogOutput.txt) +itk_add_test( + NAME + itkThreadLoggerTest + COMMAND + ITKCommon2TestDriver + itkThreadLoggerTest + ${TEMP}/test_threadLogger.txt) +itk_add_test( + NAME + itkThreadDefsTest + COMMAND + ITKCommon2TestDriver + itkThreadDefsTest) +itk_add_test( + NAME + itkTimeProbesTest + COMMAND + ITKCommon2TestDriver + itkTimeProbesTest) +itk_add_test( + NAME + itkVersorTest + COMMAND + ITKCommon2TestDriver + itkVersorTest) +itk_add_test( + NAME + itkConicShellInteriorExteriorSpatialFunctionTest + COMMAND + ITKCommon2TestDriver + itkConicShellInteriorExteriorSpatialFunctionTest) +itk_add_test( + NAME + itkEllipsoidInteriorExteriorSpatialFunctionTest + COMMAND + ITKCommon2TestDriver + itkEllipsoidInteriorExteriorSpatialFunctionTest) +itk_add_test( + NAME + itkFrustumSpatialFunctionTest + COMMAND + ITKCommon2TestDriver + itkFrustumSpatialFunctionTest) +itk_add_test( + NAME + itkSymmetricEllipsoidInteriorExteriorSpatialFunctionTest + COMMAND + ITKCommon1TestDriver + itkSymmetricEllipsoidInteriorExteriorSpatialFunctionTest) +itk_add_test( + NAME + itkTorusInteriorExteriorSpatialFunctionTest + COMMAND + ITKCommon2TestDriver + itkTorusInteriorExteriorSpatialFunctionTest) +itk_add_test( + NAME + itkSymmetricSecondRankTensorImageReadTest + COMMAND + ITKCommon1TestDriver + itkSymmetricSecondRankTensorImageReadTest + ${ITK_TEST_OUTPUT_DIR}/testSymmetricTensor.nrrd) +itk_add_test( + NAME + itkSymmetricSecondRankTensorImageWriteReadTest + COMMAND + ITKCommon1TestDriver + itkSymmetricSecondRankTensorImageWriteReadTest + ${ITK_TEST_OUTPUT_DIR}/testSymmetricTensorWriteRead.mha) +itk_add_test( + NAME + itkSymmetricSecondRankTensorTest + COMMAND + ITKCommon2TestDriver + itkSymmetricSecondRankTensorTest) +itk_add_test( + NAME + itkSymmetricEigenAnalysisTest + COMMAND + ITKCommon1TestDriver + itkSymmetricEigenAnalysisTest) +itk_add_test( + NAME + itkSTLThreadTest + COMMAND + ITKCommon2TestDriver + itkSTLThreadTest) +itk_add_test( + NAME + itkStreamingImageFilterTest + COMMAND + ITKCommon1TestDriver + itkStreamingImageFilterTest) +itk_add_test( + NAME + itkStreamingImageFilterTest2 + COMMAND + ITKCommon1TestDriver + itkStreamingImageFilterTest2) +itk_add_test( + NAME + itkStreamingImageFilterTest3_1 + COMMAND + ITKCommon1TestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence1.png} + ${ITK_TEST_OUTPUT_DIR}/itkStreamingImageFilterTest3_1.png + itkStreamingImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence1.png} + ${ITK_TEST_OUTPUT_DIR}/itkStreamingImageFilterTest3_1.png + 10) +itk_add_test( + NAME + itkStreamingImageFilterTest3_2 + COMMAND + ITKCommon1TestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence1.png} + ${ITK_TEST_OUTPUT_DIR}/itkStreamingImageFilterTest3_2.png + itkStreamingImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence1.png} + ${ITK_TEST_OUTPUT_DIR}/itkStreamingImageFilterTest3_2.png + 1000) +itk_add_test( + NAME + itkVariableLengthVectorTest + COMMAND + ITKCommon2TestDriver + itkVariableLengthVectorTest) +itk_add_test( + NAME + itkVariableSizeMatrixTest + COMMAND + ITKCommon2TestDriver + itkVariableSizeMatrixTest) #itk_add_test(NAME itkQuaternionOrientationAdapterTest COMMAND ITKCommon2TestDriver itkQuaternionOrientationAdapterTest) -itk_add_test(NAME itkVectorGeometryTest COMMAND ITKCommon2TestDriver itkVectorGeometryTest) -itk_add_test(NAME itkZeroFluxBoundaryConditionTest COMMAND ITKCommon2TestDriver itkZeroFluxBoundaryConditionTest) -itk_add_test(NAME itkConstantBoundaryConditionTest COMMAND ITKCommon2TestDriver itkConstantBoundaryConditionTest) - itk_add_test(NAME itkVNLRoundProfileTest1 COMMAND ITKCommon2TestDriver itkVNLRoundProfileTest1) - itk_add_test(NAME itkMemoryProbesCollecterBaseTest COMMAND ITKCommon2TestDriver - itkMemoryProbesCollecterBaseTest) +itk_add_test( + NAME + itkVectorGeometryTest + COMMAND + ITKCommon2TestDriver + itkVectorGeometryTest) +itk_add_test( + NAME + itkZeroFluxBoundaryConditionTest + COMMAND + ITKCommon2TestDriver + itkZeroFluxBoundaryConditionTest) +itk_add_test( + NAME + itkConstantBoundaryConditionTest + COMMAND + ITKCommon2TestDriver + itkConstantBoundaryConditionTest) +itk_add_test( + NAME + itkVNLRoundProfileTest1 + COMMAND + ITKCommon2TestDriver + itkVNLRoundProfileTest1) +itk_add_test( + NAME + itkMemoryProbesCollecterBaseTest + COMMAND + ITKCommon2TestDriver + itkMemoryProbesCollecterBaseTest) if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 4) - itk_add_test(NAME itkImageFillBufferTest4.1 COMMAND ITKCommon2TestDriver itkImageFillBufferTest 4.1) - set_property(TEST itkImageFillBufferTest4.1 APPEND PROPERTY LABELS RUNS_LONG) + itk_add_test( + NAME + itkImageFillBufferTest4.1 + COMMAND + ITKCommon2TestDriver + itkImageFillBufferTest + 4.1) + set_property( + TEST itkImageFillBufferTest4.1 + APPEND + PROPERTY LABELS RUNS_LONG) set_tests_properties(itkImageFillBufferTest4.1 PROPERTIES RESOURCE_LOCK MEMORY_SIZE) endif() -itk_add_test(NAME itkImageAlgorithmCopyTest COMMAND ITKCommon2TestDriver itkImageAlgorithmCopyTest) -itk_add_test(NAME itkImageAlgorithmCopyTest2 COMMAND ITKCommon2TestDriver itkImageAlgorithmCopyTest2) -itk_add_test(NAME itkOptimizerParametersTest COMMAND ITKCommon2TestDriver itkOptimizerParametersTest) -itk_add_test(NAME itkImageVectorOptimizerParametersHelperTest COMMAND ITKCommon2TestDriver itkImageVectorOptimizerParametersHelperTest) -itk_add_test(NAME itkCompensatedSummationTest COMMAND ITKCommon2TestDriver itkCompensatedSummationTest) -itk_add_test(NAME itkCompensatedSummationTest2 COMMAND ITKCommon2TestDriver itkCompensatedSummationTest2) - - +itk_add_test( + NAME + itkImageAlgorithmCopyTest + COMMAND + ITKCommon2TestDriver + itkImageAlgorithmCopyTest) +itk_add_test( + NAME + itkImageAlgorithmCopyTest2 + COMMAND + ITKCommon2TestDriver + itkImageAlgorithmCopyTest2) +itk_add_test( + NAME + itkOptimizerParametersTest + COMMAND + ITKCommon2TestDriver + itkOptimizerParametersTest) +itk_add_test( + NAME + itkImageVectorOptimizerParametersHelperTest + COMMAND + ITKCommon2TestDriver + itkImageVectorOptimizerParametersHelperTest) +itk_add_test( + NAME + itkCompensatedSummationTest + COMMAND + ITKCommon2TestDriver + itkCompensatedSummationTest) +itk_add_test( + NAME + itkCompensatedSummationTest2 + COMMAND + ITKCommon2TestDriver + itkCompensatedSummationTest2) # # this test depends on being able to raise C++ exceptions from # the signal handler. This is apparently not something that # works properly if("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin|Linux") - itk_add_test(NAME itkFloatingPointExceptionsTest1 COMMAND ITKCommon1TestDriver - itkFloatingPointExceptionsTest DivByZero) - itk_add_test(NAME itkFloatingPointExceptionsTest2 COMMAND ITKCommon1TestDriver - itkFloatingPointExceptionsTest ZeroDivByZero) - itk_add_test(NAME itkFloatingPointExceptionsTest3 COMMAND ITKCommon1TestDriver - itkFloatingPointExceptionsTest FPOverflow) - itk_add_test(NAME itkFloatingPointExceptionsTest4 COMMAND ITKCommon1TestDriver - itkFloatingPointExceptionsTest FPUnderflow) + itk_add_test( + NAME + itkFloatingPointExceptionsTest1 + COMMAND + ITKCommon1TestDriver + itkFloatingPointExceptionsTest + DivByZero) + itk_add_test( + NAME + itkFloatingPointExceptionsTest2 + COMMAND + ITKCommon1TestDriver + itkFloatingPointExceptionsTest + ZeroDivByZero) + itk_add_test( + NAME + itkFloatingPointExceptionsTest3 + COMMAND + ITKCommon1TestDriver + itkFloatingPointExceptionsTest + FPOverflow) + itk_add_test( + NAME + itkFloatingPointExceptionsTest4 + COMMAND + ITKCommon1TestDriver + itkFloatingPointExceptionsTest + FPUnderflow) set_tests_properties( itkFloatingPointExceptionsTest1 itkFloatingPointExceptionsTest2 itkFloatingPointExceptionsTest3 itkFloatingPointExceptionsTest4 - PROPERTIES WILL_FAIL TRUE - ) + PROPERTIES WILL_FAIL TRUE) endif() add_executable(itkCMakeConfigurationTest itkCMakeConfigurationTest.cxx) itk_module_target_label(itkCMakeConfigurationTest) -itk_add_test(NAME itkCMakeConfigurationTest - COMMAND itkCMakeConfigurationTest ${CMAKE_BINARY_DIR}) -itk_add_test(NAME itkDataObjectAndProcessObjectTest COMMAND ITKCommon2TestDriver itkDataObjectAndProcessObjectTest) -itk_add_test(NAME itkImageRegionConstIteratorWithOnlyIndexTest COMMAND ITKCommon2TestDriver itkImageRegionConstIteratorWithOnlyIndexTest) -itk_add_test(NAME itkImageRandomConstIteratorWithOnlyIndexTest COMMAND ITKCommon2TestDriver itkImageRandomConstIteratorWithOnlyIndexTest) -itk_add_test(NAME itkConstNeighborhoodIteratorWithOnlyIndexTest COMMAND ITKCommon2TestDriver itkConstNeighborhoodIteratorWithOnlyIndexTest) - -itk_add_test(NAME itkImageToImageToleranceTest COMMAND - ITKCommon2TestDriver itkImageTOImageToleranceTest) +itk_add_test( + NAME + itkCMakeConfigurationTest + COMMAND + itkCMakeConfigurationTest + ${CMAKE_BINARY_DIR}) +itk_add_test( + NAME + itkDataObjectAndProcessObjectTest + COMMAND + ITKCommon2TestDriver + itkDataObjectAndProcessObjectTest) +itk_add_test( + NAME + itkImageRegionConstIteratorWithOnlyIndexTest + COMMAND + ITKCommon2TestDriver + itkImageRegionConstIteratorWithOnlyIndexTest) +itk_add_test( + NAME + itkImageRandomConstIteratorWithOnlyIndexTest + COMMAND + ITKCommon2TestDriver + itkImageRandomConstIteratorWithOnlyIndexTest) +itk_add_test( + NAME + itkConstNeighborhoodIteratorWithOnlyIndexTest + COMMAND + ITKCommon2TestDriver + itkConstNeighborhoodIteratorWithOnlyIndexTest) +itk_add_test( + NAME + itkImageToImageToleranceTest + COMMAND + ITKCommon2TestDriver + itkImageTOImageToleranceTest) -itk_add_test(NAME itkRegionSplitterSlowDimensionTest COMMAND ITKCommon2TestDriver itkImageRegionSplitterSlowDimensionTest) -itk_add_test(NAME itkRegionSplitterDirectionTest COMMAND ITKCommon2TestDriver itkImageRegionSplitterDirectionTest) -itk_add_test(NAME itkRegionSplitterMultidimensionalTest COMMAND ITKCommon2TestDriver itkImageRegionSplitterMultidimensionalTest) +itk_add_test( + NAME + itkRegionSplitterSlowDimensionTest + COMMAND + ITKCommon2TestDriver + itkImageRegionSplitterSlowDimensionTest) +itk_add_test( + NAME + itkRegionSplitterDirectionTest + COMMAND + ITKCommon2TestDriver + itkImageRegionSplitterDirectionTest) +itk_add_test( + NAME + itkRegionSplitterMultidimensionalTest + COMMAND + ITKCommon2TestDriver + itkImageRegionSplitterMultidimensionalTest) -itk_add_test(NAME itkMetaDataObjectTest COMMAND ITKCommon2TestDriver itkMetaDataObjectTest) +itk_add_test( + NAME + itkMetaDataObjectTest + COMMAND + ITKCommon2TestDriver + itkMetaDataObjectTest) -itk_add_test(NAME itkMultithreadingTest COMMAND ITKCommon2TestDriver itkMultithreadingTest 100) +itk_add_test( + NAME + itkMultithreadingTest + COMMAND + ITKCommon2TestDriver + itkMultithreadingTest + 100) -itk_add_test(NAME itkMultiThreaderExceptionsTest COMMAND ITKCommon2TestDriver itkMultiThreaderExceptionsTest) +itk_add_test( + NAME + itkMultiThreaderExceptionsTest + COMMAND + ITKCommon2TestDriver + itkMultiThreaderExceptionsTest) -itk_add_test(NAME itkXMLFileOutputWindowTestFilename - COMMAND ITKCommon2TestDriver - itkXMLFileOutputWindowTest ${ITK_TEST_OUTPUT_DIR}/itkXMLFileOutputWindowTest.xml) +itk_add_test( + NAME + itkXMLFileOutputWindowTestFilename + COMMAND + ITKCommon2TestDriver + itkXMLFileOutputWindowTest + ${ITK_TEST_OUTPUT_DIR}/itkXMLFileOutputWindowTest.xml) if(ITK_BUILD_SHARED_LIBS AND ITK_DYNAMIC_LOADING) macro(BuildClientTestLibrary _name _type) @@ -631,85 +1673,104 @@ if(ITK_BUILD_SHARED_LIBS AND ITK_DYNAMIC_LOADING) itk_module_target_label(ClientTestLibrary${_name}) target_link_libraries(ClientTestLibrary${_name} LINK_PUBLIC ${ITKCommon_LIBRARIES}) set_property(TARGET ClientTestLibrary${_name} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${ITK_TEST_OUTPUT_DIR}) - generate_export_header(ClientTestLibrary${_name} - EXPORT_FILE_NAME ${ITKCommon_BINARY_DIR}/ClientTestLibrary${_name}Export.h - EXPORT_MACRO_NAME ClientTestLibrary${_name}_EXPORT - NO_EXPORT_MACRO_NAME ClientTestLibrary${_name}_HIDDEN - ) + generate_export_header( + ClientTestLibrary${_name} + EXPORT_FILE_NAME + ${ITKCommon_BINARY_DIR}/ClientTestLibrary${_name}Export.h + EXPORT_MACRO_NAME + ClientTestLibrary${_name}_EXPORT + NO_EXPORT_MACRO_NAME + ClientTestLibrary${_name}_HIDDEN) set_target_properties(ClientTestLibrary${_name} PROPERTIES CXX_VISIBILITY_PRESET hidden) set_target_properties(ClientTestLibrary${_name} PROPERTIES C_VISIBILITY_PRESET hidden) set_target_properties(ClientTestLibrary${_name} PROPERTIES VISIBILITY_INLINES_HIDDEN 1) endmacro() - BuildClientTestLibrary(A SHARED) - BuildClientTestLibrary(B MODULE) - BuildClientTestLibrary(C SHARED) + buildclienttestlibrary(A SHARED) + buildclienttestlibrary(B MODULE) + buildclienttestlibrary(C SHARED) target_link_libraries(ITKCommon2TestDriver LINK_PUBLIC ClientTestLibraryA) target_link_libraries(ITKCommon2TestDriver LINK_PUBLIC ClientTestLibraryC) - itk_add_test(NAME itkDownCastTest COMMAND ITKCommon2TestDriver itkDownCastTest + itk_add_test( + NAME + itkDownCastTest + COMMAND + ITKCommon2TestDriver + itkDownCastTest $) endif() set(ITKCommonGTests - itkAggregateTypesGTest.cxx - itkBitCastGTest.cxx - itkBooleanStdVectorGTest.cxx - itkBuildInformationGTest.cxx - itkConnectedImageNeighborhoodShapeGTest.cxx - itkConstantBoundaryImageNeighborhoodPixelAccessPolicyGTest.cxx - itkExceptionObjectGTest.cxx - itkFixedArrayGTest.cxx - itkImageNeighborhoodOffsetsGTest.cxx - itkImageGTest.cxx - itkImageBaseGTest.cxx - itkImageBufferRangeGTest.cxx - itkImageRegionRangeGTest.cxx - itkImageIORegionGTest.cxx - itkImageRegionGTest.cxx - itkIndexGTest.cxx - itkIndexRangeGTest.cxx - itkMakeUniqueForOverwriteGTest.cxx - itkMatrixGTest.cxx - itkMersenneTwisterRandomVariateGeneratorGTest.cxx - itkNeighborhoodAllocatorGTest.cxx - itkNumberToStringGTest.cxx - itkObjectFactoryBaseGTest.cxx - itkOffsetGTest.cxx - itkOptimizerParametersGTest.cxx - itkPointGTest.cxx - itkShapedImageNeighborhoodRangeGTest.cxx - itkSizeGTest.cxx - itkSmartPointerGTest.cxx - itkVectorContainerGTest.cxx - itkVectorGTest.cxx - itkWeakPointerGTest.cxx - itkCommonTypeTraitsGTest.cxx - itkMetaDataDictionaryGTest.cxx - itkSpatialOrientationAdaptorGTest.cxx -) -CreateGoogleTestDriver(ITKCommon "${ITKCommon-Test_LIBRARIES}" "${ITKCommonGTests}") + itkAggregateTypesGTest.cxx + itkBitCastGTest.cxx + itkBooleanStdVectorGTest.cxx + itkBuildInformationGTest.cxx + itkConnectedImageNeighborhoodShapeGTest.cxx + itkConstantBoundaryImageNeighborhoodPixelAccessPolicyGTest.cxx + itkExceptionObjectGTest.cxx + itkFixedArrayGTest.cxx + itkImageNeighborhoodOffsetsGTest.cxx + itkImageGTest.cxx + itkImageBaseGTest.cxx + itkImageBufferRangeGTest.cxx + itkImageRegionRangeGTest.cxx + itkImageIORegionGTest.cxx + itkImageRegionGTest.cxx + itkIndexGTest.cxx + itkIndexRangeGTest.cxx + itkMakeUniqueForOverwriteGTest.cxx + itkMatrixGTest.cxx + itkMersenneTwisterRandomVariateGeneratorGTest.cxx + itkNeighborhoodAllocatorGTest.cxx + itkNumberToStringGTest.cxx + itkObjectFactoryBaseGTest.cxx + itkOffsetGTest.cxx + itkOptimizerParametersGTest.cxx + itkPointGTest.cxx + itkShapedImageNeighborhoodRangeGTest.cxx + itkSizeGTest.cxx + itkSmartPointerGTest.cxx + itkVectorContainerGTest.cxx + itkVectorGTest.cxx + itkWeakPointerGTest.cxx + itkCommonTypeTraitsGTest.cxx + itkMetaDataDictionaryGTest.cxx + itkSpatialOrientationAdaptorGTest.cxx) +creategoogletestdriver(ITKCommon "${ITKCommon-Test_LIBRARIES}" "${ITKCommonGTests}") # If `-static` was passed to CMAKE_EXE_LINKER_FLAGS, compilation fails. No need to # test this case. -if(NOT ITK_BUILD_SHARED_LIBS AND NOT CMAKE_EXE_LINKER_FLAGS MATCHES ".*-static.*") +if(NOT ITK_BUILD_SHARED_LIBS + AND NOT + CMAKE_EXE_LINKER_FLAGS + MATCHES + ".*-static.*") macro(BuildSharedTestLibrary _name _type) add_library(SharedTestLibrary${_name} ${_type} SharedTestLibrary${_name}.cxx) itk_module_target_label(SharedTestLibrary${_name}) target_link_libraries(SharedTestLibrary${_name} LINK_PUBLIC ${ITKCommon_LIBRARIES}) set_property(TARGET SharedTestLibrary${_name} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${ITK_TEST_OUTPUT_DIR}) - generate_export_header(SharedTestLibrary${_name} - EXPORT_FILE_NAME ${ITKCommon_BINARY_DIR}/SharedTestLibrary${_name}Export.h - EXPORT_MACRO_NAME SharedTestLibrary${_name}_EXPORT - NO_EXPORT_MACRO_NAME SharedTestLibrary${_name}_HIDDEN - ) + generate_export_header( + SharedTestLibrary${_name} + EXPORT_FILE_NAME + ${ITKCommon_BINARY_DIR}/SharedTestLibrary${_name}Export.h + EXPORT_MACRO_NAME + SharedTestLibrary${_name}_EXPORT + NO_EXPORT_MACRO_NAME + SharedTestLibrary${_name}_HIDDEN) endmacro() # Linking static ITK libraries twice, into two different binaries for the same process, is not recommended or supported. - BuildSharedTestLibrary(A SHARED) - BuildSharedTestLibrary(B SHARED) + buildsharedtestlibrary(A SHARED) + buildsharedtestlibrary(B SHARED) add_executable(itkObjectFactoryBasePrivateDestructor itkObjectFactoryBasePrivateDestructor.cxx) itk_module_target_label(itkObjectFactoryBasePrivateDestructor) - target_link_libraries(itkObjectFactoryBasePrivateDestructor - LINK_PUBLIC - SharedTestLibraryA - SharedTestLibraryB) - itk_add_test(NAME itkObjectFactoryBasePrivateDestructor COMMAND itkObjectFactoryBasePrivateDestructor) + target_link_libraries( + itkObjectFactoryBasePrivateDestructor + LINK_PUBLIC + SharedTestLibraryA + SharedTestLibraryB) + itk_add_test( + NAME + itkObjectFactoryBasePrivateDestructor + COMMAND + itkObjectFactoryBasePrivateDestructor) endif() diff --git a/Modules/Core/Common/wrapping/CMakeLists.txt b/Modules/Core/Common/wrapping/CMakeLists.txt index dedc4880f7d..fc356ee88ab 100644 --- a/Modules/Core/Common/wrapping/CMakeLists.txt +++ b/Modules/Core/Common/wrapping/CMakeLists.txt @@ -1,64 +1,63 @@ itk_wrap_module(ITKCommon) set(WRAPPER_SUBMODULE_ORDER - itkFixedArray - itkVector - itkCovariantVector - itkPoint - itkTriangleHelper - itkVariableSizeMatrix - itkVersor - stdcomplex - vnl_c_vector - vnl_cost_function - vnl_diag_matrix - vnl_file_matrix - vnl_file_vector - vnl_fortran_copy - vnl_least_squares_function - vnl_matrix_fixed - vnl_matrix_fixed_ref - vnl_matrix_ref - vnl_vector_ref - vnl_matrix - vnl_vector - vnl_unary_function - ITKCommonBase - itkSize - itkOffset - itkArray - itkIndex - itkContinuousIndex - itkMatrix - itkVectorContainer - itkMapContainer - itkBoundingBox - itkRGBPixel - itkRGBAPixel - itkVariableLengthVector - itkImageRegion - itkSymmetricSecondRankTensor - itkImage - itkVectorImage - itkSpecialCoordinatesImage - itkPhasedArray3DSpecialCoordinatesImage - itkNeighborhood -# SwigExtras - itkImageSourceCommon - itkImageSource - itkImageToImageFilterCommon - itkImageToImageFilterA - itkImageToImageFilterB - itkInPlaceImageFilterA - itkInPlaceImageFilterB - itkDefaultDynamicMeshTraits - itkDefaultStaticMeshTraits - itkFunctionBase -# itkCellInterface -# itkPointSet -# itkVertexCell -# itkLineCell + itkFixedArray + itkVector + itkCovariantVector + itkPoint + itkTriangleHelper + itkVariableSizeMatrix + itkVersor + stdcomplex + vnl_c_vector + vnl_cost_function + vnl_diag_matrix + vnl_file_matrix + vnl_file_vector + vnl_fortran_copy + vnl_least_squares_function + vnl_matrix_fixed + vnl_matrix_fixed_ref + vnl_matrix_ref + vnl_vector_ref + vnl_matrix + vnl_vector + vnl_unary_function + ITKCommonBase + itkSize + itkOffset + itkArray + itkIndex + itkContinuousIndex + itkMatrix + itkVectorContainer + itkMapContainer + itkBoundingBox + itkRGBPixel + itkRGBAPixel + itkVariableLengthVector + itkImageRegion + itkSymmetricSecondRankTensor + itkImage + itkVectorImage + itkSpecialCoordinatesImage + itkPhasedArray3DSpecialCoordinatesImage + itkNeighborhood + # SwigExtras + itkImageSourceCommon + itkImageSource + itkImageToImageFilterCommon + itkImageToImageFilterA + itkImageToImageFilterB + itkInPlaceImageFilterA + itkInPlaceImageFilterB + itkDefaultDynamicMeshTraits + itkDefaultStaticMeshTraits + itkFunctionBase + # itkCellInterface + # itkPointSet + # itkVertexCell + # itkLineCell ) - itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Core/Common/wrapping/ITKCommonBase.wrap b/Modules/Core/Common/wrapping/ITKCommonBase.wrap index b6771730bf4..abb7f6598a0 100644 --- a/Modules/Core/Common/wrapping/ITKCommonBase.wrap +++ b/Modules/Core/Common/wrapping/ITKCommonBase.wrap @@ -26,20 +26,20 @@ itk_wrap_simple_class("itk::UserEvent") set(WRAPPER_AUTO_INCLUDE_HEADERS ON) -itk_wrap_simple_class("itk::LightObject" POINTER) -itk_wrap_simple_class("itk::Object" POINTER) -itk_wrap_simple_class("itk::DataObject" POINTER) +itk_wrap_simple_class("itk::LightObject" POINTER) +itk_wrap_simple_class("itk::Object" POINTER) +itk_wrap_simple_class("itk::DataObject" POINTER) itk_wrap_simple_class("itk::LightProcessObject" POINTER) -itk_wrap_simple_class("itk::StreamingProcessObject" POINTER) -itk_wrap_simple_class("itk::ProcessObject" POINTER) -itk_wrap_simple_class("itk::Command" POINTER) -itk_wrap_simple_class("itk::Directory" POINTER) -itk_wrap_simple_class("itk::DynamicLoader" POINTER) -itk_wrap_simple_class("itk::ObjectFactoryBase" POINTER) -itk_wrap_simple_class("itk::OutputWindow" POINTER) -itk_wrap_simple_class("itk::Version" POINTER) -itk_wrap_simple_class("itk::ThreadPool" POINTER) -itk_wrap_simple_class("itk::RealTimeClock" POINTER) +itk_wrap_simple_class("itk::StreamingProcessObject" POINTER) +itk_wrap_simple_class("itk::ProcessObject" POINTER) +itk_wrap_simple_class("itk::Command" POINTER) +itk_wrap_simple_class("itk::Directory" POINTER) +itk_wrap_simple_class("itk::DynamicLoader" POINTER) +itk_wrap_simple_class("itk::ObjectFactoryBase" POINTER) +itk_wrap_simple_class("itk::OutputWindow" POINTER) +itk_wrap_simple_class("itk::Version" POINTER) +itk_wrap_simple_class("itk::ThreadPool" POINTER) +itk_wrap_simple_class("itk::RealTimeClock" POINTER) itk_wrap_simple_class("itk::RealTimeInterval") itk_wrap_simple_class("itk::RealTimeStamp") itk_wrap_simple_class("itk::TimeStamp") @@ -48,7 +48,7 @@ itk_wrap_simple_class("itk::SimpleFilterWatcher") itk_wrap_simple_class("itk::XMLFilterWatcher") itk_wrap_simple_class("itk::MetaDataDictionary") itk_wrap_class("itk::ResourceProbe" EXPLICIT_SPECIALIZATION) - itk_wrap_template("${ITKM_D}${ITKM_D}" "${ITKT_D},${ITKT_D}") +itk_wrap_template("${ITKM_D}${ITKM_D}" "${ITKT_D},${ITKT_D}") itk_end_wrap_class() itk_wrap_simple_class("itk::TimeProbe") # TODO: enable pointer support, once fixed the protected New() method. diff --git a/Modules/Core/Common/wrapping/itkAnnulusOperator.wrap b/Modules/Core/Common/wrapping/itkAnnulusOperator.wrap index 06e5e89fec6..574a7b94b60 100644 --- a/Modules/Core/Common/wrapping/itkAnnulusOperator.wrap +++ b/Modules/Core/Common/wrapping/itkAnnulusOperator.wrap @@ -1,9 +1,9 @@ set(types "${WRAP_ITK_REAL}") itk_wrap_class("itk::AnnulusOperator") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkArray.wrap b/Modules/Core/Common/wrapping/itkArray.wrap index 076a538912e..69f88213376 100644 --- a/Modules/Core/Common/wrapping/itkArray.wrap +++ b/Modules/Core/Common/wrapping/itkArray.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::Array") - set(WRAPPER_TEMPLATES "${itk_Wrap_Array}") +set(WRAPPER_TEMPLATES "${itk_Wrap_Array}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkArray2D.wrap b/Modules/Core/Common/wrapping/itkArray2D.wrap index 7c073730399..fb368ed4bcd 100644 --- a/Modules/Core/Common/wrapping/itkArray2D.wrap +++ b/Modules/Core/Common/wrapping/itkArray2D.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::Array2D") - UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() - itk_wrap_template("${ITKM_UI}" "${ITKT_UI}") +unique(types "D;${WRAP_ITK_REAL}") +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() +itk_wrap_template("${ITKM_UI}" "${ITKT_UI}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkBSplineInterpolationWeightFunction.wrap b/Modules/Core/Common/wrapping/itkBSplineInterpolationWeightFunction.wrap index d4cc4dbd5fe..17c955352f7 100644 --- a/Modules/Core/Common/wrapping/itkBSplineInterpolationWeightFunction.wrap +++ b/Modules/Core/Common/wrapping/itkBSplineInterpolationWeightFunction.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::BSplineInterpolationWeightFunction" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}3" "${ITKT_D},${d},3") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}3" "${ITKT_D},${d},3") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkBackwardDifferenceOperator.wrap b/Modules/Core/Common/wrapping/itkBackwardDifferenceOperator.wrap index c28528720cf..219760b876f 100644 --- a/Modules/Core/Common/wrapping/itkBackwardDifferenceOperator.wrap +++ b/Modules/Core/Common/wrapping/itkBackwardDifferenceOperator.wrap @@ -1,9 +1,9 @@ set(types "${WRAP_ITK_REAL}") itk_wrap_class("itk::BackwardDifferenceOperator") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkBoundingBox.wrap b/Modules/Core/Common/wrapping/itkBoundingBox.wrap index 6f94800f268..05094b31ba6 100644 --- a/Modules/Core/Common/wrapping/itkBoundingBox.wrap +++ b/Modules/Core/Common/wrapping/itkBoundingBox.wrap @@ -2,13 +2,13 @@ itk_wrap_include("itkVectorContainer.h") itk_wrap_include("itkMapContainer.h") itk_wrap_class("itk::BoundingBox" POINTER) - UNIQUE(types "${WRAP_ITK_REAL};D") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_IT}${d}${ITKM_${t}}VC${ITKM_IT}${ITKM_P${t}${d}}" - "${ITKT_IT},${d},${ITKT_${t}}, itk::VectorContainer< ${ITKT_IT}, ${ITKT_P${t}${d}} >") - itk_wrap_template("${ITKM_IT}${d}${ITKM_${t}}MC${ITKM_IT}${ITKM_P${t}${d}}" - "${ITKT_IT},${d},${ITKT_${t}}, itk::MapContainer< ${ITKT_IT}, ${ITKT_P${t}${d}} >") - endforeach() +unique(types "${WRAP_ITK_REAL};D") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_IT}${d}${ITKM_${t}}VC${ITKM_IT}${ITKM_P${t}${d}}" + "${ITKT_IT},${d},${ITKT_${t}}, itk::VectorContainer< ${ITKT_IT}, ${ITKT_P${t}${d}} >") + itk_wrap_template("${ITKM_IT}${d}${ITKM_${t}}MC${ITKM_IT}${ITKM_P${t}${d}}" + "${ITKT_IT},${d},${ITKT_${t}}, itk::MapContainer< ${ITKT_IT}, ${ITKT_P${t}${d}} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkContinuousIndex.wrap b/Modules/Core/Common/wrapping/itkContinuousIndex.wrap index 4db4fdfdaac..990fbacc8d7 100644 --- a/Modules/Core/Common/wrapping/itkContinuousIndex.wrap +++ b/Modules/Core/Common/wrapping/itkContinuousIndex.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ContinuousIndex") - set(WRAPPER_TEMPLATES "${itk_Wrap_ContinuousIndex}") +set(WRAPPER_TEMPLATES "${itk_Wrap_ContinuousIndex}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkCovariantVector.wrap b/Modules/Core/Common/wrapping/itkCovariantVector.wrap index 25d967a929c..01180b16ccf 100644 --- a/Modules/Core/Common/wrapping/itkCovariantVector.wrap +++ b/Modules/Core/Common/wrapping/itkCovariantVector.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::CovariantVector") - set(WRAPPER_TEMPLATES "${itk_Wrap_CovariantVector}") +set(WRAPPER_TEMPLATES "${itk_Wrap_CovariantVector}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkDefaultDynamicMeshTraits.wrap b/Modules/Core/Common/wrapping/itkDefaultDynamicMeshTraits.wrap index aabe5ba1091..892e60ac518 100644 --- a/Modules/Core/Common/wrapping/itkDefaultDynamicMeshTraits.wrap +++ b/Modules/Core/Common/wrapping/itkDefaultDynamicMeshTraits.wrap @@ -1,13 +1,15 @@ itk_wrap_class("itk::DefaultDynamicMeshTraits") - UNIQUE(types "${WRAP_ITK_SCALAR};D") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}},${d}") - itk_wrap_template("${ITKM_${t}}${d}${d}${ITKM_${t}}${ITKM_${t}}" "${ITKT_${t}},${d},${d},${ITKT_${t}},${ITKT_${t}}") - itk_wrap_template("${ITKM_${t}}${d}${d}${ITKM_${t}}${ITKM_${t}}${ITKM_${t}}" "${ITKT_${t}},${d},${d},${ITKT_${t}},${ITKT_${t}},${ITKT_${t}}") - endforeach() - itk_wrap_template("${ITKM_D}${d}${d}${ITKM_D}${ITKM_F}${ITKM_D}" "${ITKT_D},${d},${d},${ITKT_D},${ITKT_F},${ITKT_D}") - itk_wrap_template("M${ITKM_D}${d}${d}${d}${d}${ITKM_F}${ITKM_F}M${ITKM_D}${d}${d}" - "itk::Matrix< ${ITKT_D},${d},${d} >, ${d},${d},${ITKT_F},${ITKT_F}, itk::Matrix< ${ITKT_D}, ${d}, ${d} >") +unique(types "${WRAP_ITK_SCALAR};D") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}},${d}") + itk_wrap_template("${ITKM_${t}}${d}${d}${ITKM_${t}}${ITKM_${t}}" "${ITKT_${t}},${d},${d},${ITKT_${t}},${ITKT_${t}}") + itk_wrap_template("${ITKM_${t}}${d}${d}${ITKM_${t}}${ITKM_${t}}${ITKM_${t}}" + "${ITKT_${t}},${d},${d},${ITKT_${t}},${ITKT_${t}},${ITKT_${t}}") endforeach() + itk_wrap_template("${ITKM_D}${d}${d}${ITKM_D}${ITKM_F}${ITKM_D}" "${ITKT_D},${d},${d},${ITKT_D},${ITKT_F},${ITKT_D}") + itk_wrap_template( + "M${ITKM_D}${d}${d}${d}${d}${ITKM_F}${ITKM_F}M${ITKM_D}${d}${d}" + "itk::Matrix< ${ITKT_D},${d},${d} >, ${d},${d},${ITKT_F},${ITKT_F}, itk::Matrix< ${ITKT_D}, ${d}, ${d} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkDefaultStaticMeshTraits.wrap b/Modules/Core/Common/wrapping/itkDefaultStaticMeshTraits.wrap index 03c0e0d6a90..6fd5319b4a8 100644 --- a/Modules/Core/Common/wrapping/itkDefaultStaticMeshTraits.wrap +++ b/Modules/Core/Common/wrapping/itkDefaultStaticMeshTraits.wrap @@ -1,18 +1,20 @@ itk_wrap_class("itk::DefaultStaticMeshTraits") - UNIQUE(types "${WRAP_ITK_SCALAR};D") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}},${d}") - endforeach() - itk_wrap_template("${ITKM_D}${d}${d}${ITKM_D}${ITKM_D}${ITKM_D}" "${ITKT_D},${d},${d},${ITKT_D},${ITKT_D},${ITKT_D}") - itk_wrap_template("${ITKM_D}${d}${d}${ITKM_F}${ITKM_F}${ITKM_D}" "${ITKT_D},${d},${d},${ITKT_F},${ITKT_F},${ITKT_D}") - itk_wrap_template("M${ITKM_D}${d}${d}${d}${d}${ITKM_F}${ITKM_F}M${ITKM_D}${d}${d}" - "itk::Matrix< ${ITKT_D},${d},${d} >, ${d},${d},${ITKT_F},${ITKT_F}, itk::Matrix< ${ITKT_D}, ${d}, ${d} >") - itk_wrap_template("A${ITKM_D}${d}${d}${ITKM_F}${ITKM_F}A${ITKM_D}" - "itk::Array< ${ITKT_D} >, ${d},${d},${ITKT_F},${ITKT_F}, itk::Array< ${ITKT_D}>") - itk_wrap_template("${ITKM_VF${d}}${d}${d}${ITKM_F}${ITKM_F}${ITKM_VF${d}}" - "${ITKT_VF${d}},${d},${d},${ITKT_F},${ITKT_F},${ITKT_VF${d}}") - # used in itkImageRegistrationMethodv4 - itk_wrap_template("${ITKM_UI}${d}${d}${ITKM_F}${ITKM_F}${ITKM_UI}" "${ITKT_UI},${d},${d},${ITKT_F},${ITKT_F},${ITKT_UI}") +unique(types "${WRAP_ITK_SCALAR};D") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}},${d}") endforeach() + itk_wrap_template("${ITKM_D}${d}${d}${ITKM_D}${ITKM_D}${ITKM_D}" "${ITKT_D},${d},${d},${ITKT_D},${ITKT_D},${ITKT_D}") + itk_wrap_template("${ITKM_D}${d}${d}${ITKM_F}${ITKM_F}${ITKM_D}" "${ITKT_D},${d},${d},${ITKT_F},${ITKT_F},${ITKT_D}") + itk_wrap_template( + "M${ITKM_D}${d}${d}${d}${d}${ITKM_F}${ITKM_F}M${ITKM_D}${d}${d}" + "itk::Matrix< ${ITKT_D},${d},${d} >, ${d},${d},${ITKT_F},${ITKT_F}, itk::Matrix< ${ITKT_D}, ${d}, ${d} >") + itk_wrap_template("A${ITKM_D}${d}${d}${ITKM_F}${ITKM_F}A${ITKM_D}" + "itk::Array< ${ITKT_D} >, ${d},${d},${ITKT_F},${ITKT_F}, itk::Array< ${ITKT_D}>") + itk_wrap_template("${ITKM_VF${d}}${d}${d}${ITKM_F}${ITKM_F}${ITKM_VF${d}}" + "${ITKT_VF${d}},${d},${d},${ITKT_F},${ITKT_F},${ITKT_VF${d}}") + # used in itkImageRegistrationMethodv4 + itk_wrap_template("${ITKM_UI}${d}${d}${ITKM_F}${ITKM_F}${ITKM_UI}" + "${ITKT_UI},${d},${d},${ITKT_F},${ITKT_F},${ITKT_UI}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkDerivativeOperator.wrap b/Modules/Core/Common/wrapping/itkDerivativeOperator.wrap index 931dcd095b1..9c3ea456321 100644 --- a/Modules/Core/Common/wrapping/itkDerivativeOperator.wrap +++ b/Modules/Core/Common/wrapping/itkDerivativeOperator.wrap @@ -1,9 +1,9 @@ set(types "${WRAP_ITK_REAL}") itk_wrap_class("itk::DerivativeOperator") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkDiffusionTensor3D.wrap b/Modules/Core/Common/wrapping/itkDiffusionTensor3D.wrap index bff88bf7f99..a90d81c911e 100644 --- a/Modules/Core/Common/wrapping/itkDiffusionTensor3D.wrap +++ b/Modules/Core/Common/wrapping/itkDiffusionTensor3D.wrap @@ -1,4 +1,4 @@ itk_wrap_class("itk::DiffusionTensor3D") - itk_wrap_template("${ITKM_F}" "${ITKT_F}") - itk_wrap_template("${ITKM_D}" "${ITKT_D}") +itk_wrap_template("${ITKM_F}" "${ITKT_F}") +itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkExtractImageFilter.wrap b/Modules/Core/Common/wrapping/itkExtractImageFilter.wrap index 41eca17ce20..7f056607970 100644 --- a/Modules/Core/Common/wrapping/itkExtractImageFilter.wrap +++ b/Modules/Core/Common/wrapping/itkExtractImageFilter.wrap @@ -4,23 +4,22 @@ itk_wrap_include("itkExtractImageFilter.h") itk_wrap_simple_class("itk::ExtractImageFilterEnums") itk_wrap_class("itk::ExtractImageFilter" POINTER) - set(types "${WRAP_ITK_ALL_TYPES};UL") - itk_wrap_image_filter("${types}" 2) +set(types "${WRAP_ITK_ALL_TYPES};UL") +itk_wrap_image_filter("${types}" 2) - foreach(d1 ${ITK_WRAP_IMAGE_DIMS}) - foreach(d2 ${ITK_WRAP_IMAGE_DIMS}) - if("${d1}" GREATER "${d2}") - foreach(t ${WRAP_ITK_SCALAR} ${WRAP_ITK_RGB} ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_I${t}${d1}}${ITKM_I${t}${d2}}" - "${ITKT_I${t}${d1}},${ITKT_I${t}${d2}}") - endforeach() - # vector types requires to have the same dimension in the image and in the vector and so can't be - # extracted in an image of lower dimension - # foreach(t ${WRAP_ITK_VECTOR}) - # itk_wrap_template("${ITKM_I${t}${d1}${d1}}${ITKM_I${t}${d2}${d2}}" - # "${ITKT_I${t}${d1}${d1}},${ITKT_I${t}${d2}${d2}}") - # endforeach() - endif() - endforeach() +foreach(d1 ${ITK_WRAP_IMAGE_DIMS}) + foreach(d2 ${ITK_WRAP_IMAGE_DIMS}) + if("${d1}" GREATER "${d2}") + foreach(t ${WRAP_ITK_SCALAR} ${WRAP_ITK_RGB} ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_I${t}${d1}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d1}},${ITKT_I${t}${d2}}") + endforeach() + # vector types requires to have the same dimension in the image and in the vector and so can't be + # extracted in an image of lower dimension + # foreach(t ${WRAP_ITK_VECTOR}) + # itk_wrap_template("${ITKM_I${t}${d1}${d1}}${ITKM_I${t}${d2}${d2}}" + # "${ITKT_I${t}${d1}${d1}},${ITKT_I${t}${d2}${d2}}") + # endforeach() + endif() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkFixedArray.wrap b/Modules/Core/Common/wrapping/itkFixedArray.wrap index db582ddb032..d84a2e3bb4e 100644 --- a/Modules/Core/Common/wrapping/itkFixedArray.wrap +++ b/Modules/Core/Common/wrapping/itkFixedArray.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::FixedArray") - set(WRAPPER_TEMPLATES ${itk_Wrap_FixedArray}) +set(WRAPPER_TEMPLATES ${itk_Wrap_FixedArray}) itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkForwardDifferenceOperator.wrap b/Modules/Core/Common/wrapping/itkForwardDifferenceOperator.wrap index bc268a3cefe..0bd207c2ba5 100644 --- a/Modules/Core/Common/wrapping/itkForwardDifferenceOperator.wrap +++ b/Modules/Core/Common/wrapping/itkForwardDifferenceOperator.wrap @@ -1,9 +1,9 @@ set(types "${WRAP_ITK_REAL}") itk_wrap_class("itk::ForwardDifferenceOperator") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkFunctionBase.wrap b/Modules/Core/Common/wrapping/itkFunctionBase.wrap index 49f0501b3da..9fff4504cf4 100644 --- a/Modules/Core/Common/wrapping/itkFunctionBase.wrap +++ b/Modules/Core/Common/wrapping/itkFunctionBase.wrap @@ -1,42 +1,42 @@ itk_wrap_class("itk::FunctionBase" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) +foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(ITK_WRAP_float) - itk_wrap_template("${ITKM_IF${d}}${ITKM_D}" "${ITKT_IF${d}},${ITKT_D}") - endif() - if(ITK_WRAP_unsigned_short) - itk_wrap_template("${ITKM_IUS${d}}${ITKM_D}" "${ITKT_IUS${d}},${ITKT_D}") - endif() + if(ITK_WRAP_float) + itk_wrap_template("${ITKM_IF${d}}${ITKM_D}" "${ITKT_IF${d}},${ITKT_D}") + endif() + if(ITK_WRAP_unsigned_short) + itk_wrap_template("${ITKM_IUS${d}}${ITKM_D}" "${ITKT_IUS${d}},${ITKT_D}") + endif() - UNIQUE(real_types "D;${WRAP_ITK_REAL}") - foreach(t ${real_types}) - itk_wrap_template("${ITKM_PD${d}}${ITKM_${t}}" "${ITKT_PD${d}}, ${ITKT_${t}}") - itk_wrap_template("${ITKM_PF${d}}${ITKM_${t}}" "${ITKT_PF${d}}, ${ITKT_${t}}") - endforeach() - itk_wrap_template("${ITKM_CIF${d}}${ITKM_AD}" "${ITKT_CIF${d}} ,${ITKT_AD}") - itk_wrap_template("${ITKM_CID${d}}${ITKM_AD}" "${ITKT_CID${d}} ,${ITKT_AD}") - itk_wrap_template("${ITKM_PD${d}}${ITKM_VD${d}}" "${ITKT_PD${d}}, ${ITKT_VD${d}}") - itk_wrap_template("${ITKM_PD${d}}${ITKM_CVD${d}}" "${ITKT_PD${d}}, ${ITKT_CVD${d}}") - itk_wrap_template("${ITKM_VF${d}}${ITKM_D}" "${ITKT_VF${d}} ,${ITKT_D}") - - # Required by InterpolateImageFunction - foreach(t ${WRAP_ITK_COLOR}) - itk_wrap_template("${ITKM_PD${d}}${ITKM_${t}}" "${ITKT_PD${d}},${ITKT_${t}}") - endforeach() - itk_wrap_template("${ITKM_PD${d}}RGBD" "${ITKT_PD${d}},itk::RGBPixel< double >") - itk_wrap_template("${ITKM_PD${d}}RGBAD" "${ITKT_PD${d}},itk::RGBAPixel< double >") - - # Required by BSplineInterpolationWeightFunction - # Wrapping for spline order 3, components = (SplineOrder + 1)^SpaceDimension - set(comp 1) - foreach(i RANGE 1 ${d}) - math(EXPR comp "${comp}*4") - endforeach() - itk_wrap_template("${ITKM_CID${d}}${ITKM_FAD${comp}}" "${ITKT_CID${d}}, ${ITKT_FAD${comp}}") + unique(real_types "D;${WRAP_ITK_REAL}") + foreach(t ${real_types}) + itk_wrap_template("${ITKM_PD${d}}${ITKM_${t}}" "${ITKT_PD${d}}, ${ITKT_${t}}") + itk_wrap_template("${ITKM_PF${d}}${ITKM_${t}}" "${ITKT_PF${d}}, ${ITKT_${t}}") + endforeach() + itk_wrap_template("${ITKM_CIF${d}}${ITKM_AD}" "${ITKT_CIF${d}} ,${ITKT_AD}") + itk_wrap_template("${ITKM_CID${d}}${ITKM_AD}" "${ITKT_CID${d}} ,${ITKT_AD}") + itk_wrap_template("${ITKM_PD${d}}${ITKM_VD${d}}" "${ITKT_PD${d}}, ${ITKT_VD${d}}") + itk_wrap_template("${ITKM_PD${d}}${ITKM_CVD${d}}" "${ITKT_PD${d}}, ${ITKT_CVD${d}}") + itk_wrap_template("${ITKM_VF${d}}${ITKM_D}" "${ITKT_VF${d}} ,${ITKT_D}") + # Required by InterpolateImageFunction + foreach(t ${WRAP_ITK_COLOR}) + itk_wrap_template("${ITKM_PD${d}}${ITKM_${t}}" "${ITKT_PD${d}},${ITKT_${t}}") endforeach() + itk_wrap_template("${ITKM_PD${d}}RGBD" "${ITKT_PD${d}},itk::RGBPixel< double >") + itk_wrap_template("${ITKM_PD${d}}RGBAD" "${ITKT_PD${d}},itk::RGBAPixel< double >") - foreach(r ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_${r}}${ITKM_${r}}" "${ITKT_${r}},${ITKT_${r}}") + # Required by BSplineInterpolationWeightFunction + # Wrapping for spline order 3, components = (SplineOrder + 1)^SpaceDimension + set(comp 1) + foreach(i RANGE 1 ${d}) + math(EXPR comp "${comp}*4") endforeach() + itk_wrap_template("${ITKM_CID${d}}${ITKM_FAD${comp}}" "${ITKT_CID${d}}, ${ITKT_FAD${comp}}") + +endforeach() + +foreach(r ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_${r}}${ITKM_${r}}" "${ITKT_${r}},${ITKT_${r}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkGaussianDerivativeOperator.wrap b/Modules/Core/Common/wrapping/itkGaussianDerivativeOperator.wrap index 82203f07f8a..b0cab89ae35 100644 --- a/Modules/Core/Common/wrapping/itkGaussianDerivativeOperator.wrap +++ b/Modules/Core/Common/wrapping/itkGaussianDerivativeOperator.wrap @@ -3,9 +3,9 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkGaussianDerivativeOperator.h") itk_wrap_simple_class("itk::GaussianDerivativeOperatorEnums") itk_wrap_class("itk::GaussianDerivativeOperator") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkGaussianOperator.wrap b/Modules/Core/Common/wrapping/itkGaussianOperator.wrap index 7ec298cdf5b..4defd5b4e46 100644 --- a/Modules/Core/Common/wrapping/itkGaussianOperator.wrap +++ b/Modules/Core/Common/wrapping/itkGaussianOperator.wrap @@ -1,9 +1,9 @@ set(types "${WRAP_ITK_REAL}") itk_wrap_class("itk::GaussianOperator") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkImage.wrap b/Modules/Core/Common/wrapping/itkImage.wrap index 97aef003109..11448da791e 100644 --- a/Modules/Core/Common/wrapping/itkImage.wrap +++ b/Modules/Core/Common/wrapping/itkImage.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::ImageBase" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS_INCREMENTED}) - itk_wrap_template("${d}" "${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS_INCREMENTED}) + itk_wrap_template("${d}" "${d}") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::Image" POINTER) - set(WRAPPER_TEMPLATES "${itk_Wrap_Image}") +set(WRAPPER_TEMPLATES "${itk_Wrap_Image}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkImageBoundaryCondition.wrap b/Modules/Core/Common/wrapping/itkImageBoundaryCondition.wrap index de8c610efd4..79d4ba4471d 100644 --- a/Modules/Core/Common/wrapping/itkImageBoundaryCondition.wrap +++ b/Modules/Core/Common/wrapping/itkImageBoundaryCondition.wrap @@ -8,17 +8,17 @@ # endif() itk_wrap_class("itk::ImageBoundaryCondition") - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) itk_end_wrap_class() itk_wrap_class("itk::PeriodicBoundaryCondition") - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) itk_end_wrap_class() itk_wrap_class("itk::ZeroFluxNeumannBoundaryCondition") - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) itk_end_wrap_class() itk_wrap_class("itk::ConstantBoundaryCondition") - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkImageDuplicator.wrap b/Modules/Core/Common/wrapping/itkImageDuplicator.wrap index 711bf50905e..c77aa1b3fcb 100644 --- a/Modules/Core/Common/wrapping/itkImageDuplicator.wrap +++ b/Modules/Core/Common/wrapping/itkImageDuplicator.wrap @@ -1,63 +1,73 @@ macro(EXTEND_IMAGE_DUPLICATOR type) - if(ITK_WRAP_PYTHON) - set(import_text "%import pyCommon.i\n") - string(FIND ${ITK_WRAP_PYTHON_SWIG_EXT} ${import_text} pos) - if(${pos} EQUAL -1) - string(PREPEND ITK_WRAP_PYTHON_SWIG_EXT "${import_text}") - endif() - string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYTHON_FORCE_SNAKE_CASE_CLASS(itkImageDuplicator${type})\n") + if(ITK_WRAP_PYTHON) + set(import_text "%import pyCommon.i\n") + string(FIND ${ITK_WRAP_PYTHON_SWIG_EXT} ${import_text} pos) + if(${pos} EQUAL -1) + string(PREPEND ITK_WRAP_PYTHON_SWIG_EXT "${import_text}") endif() + string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYTHON_FORCE_SNAKE_CASE_CLASS(itkImageDuplicator${type})\n") + endif() endmacro() itk_wrap_class("itk::ImageDuplicator" POINTER) - # Making sure that all types wrapped in PyBuffer are also wrapped for ImageDuplicator - # as this filter is used in the Python NumPy bridge. - UNIQUE(types "${WRAP_ITK_SCALAR};UC;D;US;UI;UL;ULL;SC;SS;SI;SL;SLL;F") - foreach(t ${types}) - string(REGEX MATCHALL "(V${t}|CV${t})" VectorTypes ${WRAP_ITK_VECTOR}) - set(PixelType ${t}) - foreach(d ${ITK_WRAP_DIMS}) - if( DEFINED ITKT_I${t}${d} ) - EXTEND_IMAGE_DUPLICATOR("${ITKM_I${t}${d}}") - itk_wrap_template("${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}") - endif() +# Making sure that all types wrapped in PyBuffer are also wrapped for ImageDuplicator +# as this filter is used in the Python NumPy bridge. +unique(types "${WRAP_ITK_SCALAR};UC;D;US;UI;UL;ULL;SC;SS;SI;SL;SLL;F") +foreach(t ${types}) + string( + REGEX MATCHALL + "(V${t}|CV${t})" + VectorTypes + ${WRAP_ITK_VECTOR}) + set(PixelType ${t}) + foreach(d ${ITK_WRAP_DIMS}) + if(DEFINED ITKT_I${t}${d}) + extend_image_duplicator("${ITKM_I${t}${d}}") + itk_wrap_template("${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}") + endif() - # Wraps Symmetric Second Rank tensor images - if( DEFINED ITKM_ISSRT${t}${d}${d}) - EXTEND_IMAGE_DUPLICATOR("${ITKM_ISSRT${t}${d}${d}}") - itk_wrap_template("${ITKM_ISSRT${t}${d}${d}}" "${ITKT_ISSRT${t}${d}${d}}") - endif() + # Wraps Symmetric Second Rank tensor images + if(DEFINED ITKM_ISSRT${t}${d}${d}) + extend_image_duplicator("${ITKM_ISSRT${t}${d}${d}}") + itk_wrap_template("${ITKM_ISSRT${t}${d}${d}}" "${ITKT_ISSRT${t}${d}${d}}") + endif() - # Wraps RGB and RGBA types that have been selected to be wrapped. - # We have to recompute them all to extract the pixel component type. - foreach(p RGB;RGBA) - set(WRAP_RGBA_RGB "${WRAP_ITK_RGB};${WRAP_ITK_RGBA}") - list(FIND WRAP_RGBA_RGB "${p}${t}" pos) - if( NOT ${pos} EQUAL -1 AND DEFINED ITKT_I${p}${t}${d}) - EXTEND_IMAGE_DUPLICATOR("${ITKM_I${p}${t}${d}}") - itk_wrap_template("${ITKM_I${p}${t}${d}}" "${ITKT_I${p}${t}${d}}") + # Wraps RGB and RGBA types that have been selected to be wrapped. + # We have to recompute them all to extract the pixel component type. + foreach(p RGB;RGBA) + set(WRAP_RGBA_RGB "${WRAP_ITK_RGB};${WRAP_ITK_RGBA}") + list( + FIND + WRAP_RGBA_RGB + "${p}${t}" + pos) + if(NOT + ${pos} + EQUAL + -1 + AND DEFINED ITKT_I${p}${t}${d}) + extend_image_duplicator("${ITKM_I${p}${t}${d}}") + itk_wrap_template("${ITKM_I${p}${t}${d}}" "${ITKT_I${p}${t}${d}}") + endif() + endforeach(p) + # Image Vector types + foreach(vec_dim ${ITK_WRAP_VECTOR_COMPONENTS}) + foreach(vec_type ${VectorTypes}) + if(DEFINED ITKM_I${vec_type}${vec_dim}${d}) + extend_image_duplicator("${ITKM_I${vec_type}${vec_dim}${d}}") + itk_wrap_template("${ITKM_I${vec_type}${vec_dim}${d}}" "${ITKT_I${vec_type}${vec_dim}${d}}") endif() - endforeach(p) - # Image Vector types - foreach(vec_dim ${ITK_WRAP_VECTOR_COMPONENTS}) - foreach(vec_type ${VectorTypes}) - if( DEFINED ITKM_I${vec_type}${vec_dim}${d}) - EXTEND_IMAGE_DUPLICATOR("${ITKM_I${vec_type}${vec_dim}${d}}") - itk_wrap_template("${ITKM_I${vec_type}${vec_dim}${d}}" "${ITKT_I${vec_type}${vec_dim}${d}}") - endif() - endforeach() - endforeach() - endforeach(d) - endforeach(t) - UNIQUE(types "${WRAP_ITK_COMPLEX_REAL};${WRAP_ITK_SCALAR};UC") - foreach(t ${types}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}}") + endforeach() endforeach() + endforeach(d) +endforeach(t) +unique(types "${WRAP_ITK_COMPLEX_REAL};${WRAP_ITK_SCALAR};UC") +foreach(t ${types}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}}") endforeach() +endforeach() - - file(COPY ${CMAKE_CURRENT_LIST_DIR}/pyCommon.i - DESTINATION "${WRAP_ITK_TYPEDEFS_DIRECTORY}") +file(COPY ${CMAKE_CURRENT_LIST_DIR}/pyCommon.i DESTINATION "${WRAP_ITK_TYPEDEFS_DIRECTORY}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkImageKernelOperator.wrap b/Modules/Core/Common/wrapping/itkImageKernelOperator.wrap index a584f93b05f..9f965d00fea 100644 --- a/Modules/Core/Common/wrapping/itkImageKernelOperator.wrap +++ b/Modules/Core/Common/wrapping/itkImageKernelOperator.wrap @@ -1,9 +1,9 @@ set(types "${WRAP_ITK_REAL}") itk_wrap_class("itk::ImageKernelOperator") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkImageRegion.wrap b/Modules/Core/Common/wrapping/itkImageRegion.wrap index 2501c0ded78..c845645c1ca 100644 --- a/Modules/Core/Common/wrapping/itkImageRegion.wrap +++ b/Modules/Core/Common/wrapping/itkImageRegion.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ImageRegion") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template(${d} ${d}) - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template(${d} ${d}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkImageSink.wrap b/Modules/Core/Common/wrapping/itkImageSink.wrap index 1dbec2eb64d..6680ba22710 100644 --- a/Modules/Core/Common/wrapping/itkImageSink.wrap +++ b/Modules/Core/Common/wrapping/itkImageSink.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::ImageSink" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(type ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_VI${type}${d}}" "${ITKT_VI${type}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(type ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_VI${type}${d}}" "${ITKT_VI${type}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkImageSource.wrap b/Modules/Core/Common/wrapping/itkImageSource.wrap index 7dedfc8b85b..52468a0ae14 100644 --- a/Modules/Core/Common/wrapping/itkImageSource.wrap +++ b/Modules/Core/Common/wrapping/itkImageSource.wrap @@ -1,36 +1,40 @@ itk_wrap_include("itkPhasedArray3DSpecialCoordinatesImage.h") itk_wrap_class("itk::ImageSource" POINTER) - # Force uchar and ulong image sources for saving in 8 bits and watershed filter - UNIQUE(image_types "UC;RGBUC;RGBAUC;SI;UI;UL;ULL;${ITKM_IT};${WRAP_ITK_ALL_TYPES}") - itk_wrap_image_filter("${image_types}" 1) +# Force uchar and ulong image sources for saving in 8 bits and watershed filter +unique(image_types "UC;RGBUC;RGBAUC;SI;UI;UL;ULL;${ITKM_IT};${WRAP_ITK_ALL_TYPES}") +itk_wrap_image_filter("${image_types}" 1) - UNIQUE(to_types "${WRAP_ITK_SCALAR};UC") - UNIQUE(ssrt_types "${WRAP_ITK_REAL};D") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(type ${to_types}) - itk_wrap_template("${ITKM_VI${type}${d}}" "${ITKT_VI${type}${d}}") - endforeach() - foreach(t ${ssrt_types}) - itk_wrap_template("${ITKM_ISSRT${ITKM_${t}}${d}${d}}" "${ITKT_ISSRT${ITKM_${t}}${d}${d}}") - endforeach() +unique(to_types "${WRAP_ITK_SCALAR};UC") +unique(ssrt_types "${WRAP_ITK_REAL};D") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(type ${to_types}) + itk_wrap_template("${ITKM_VI${type}${d}}" "${ITKT_VI${type}${d}}") endforeach() - - list(FIND WRAP_ITK_COV_VECTOR_REAL "CVD" index) - if(index EQUAL -1) - itk_wrap_include("itkCovariantVector.h") - # Used in ImageRegistrationMethodv4 - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("ICV${ITKM_D}${d}${d}" - "itk::Image< itk::CovariantVector< ${ITKT_D},${d} >,${d} >") - endforeach() - endif() - - # PhasedArray3DSpecialCoordinatesImage - foreach(real_type ${WRAP_ITK_SCALAR}) - itk_wrap_template("PA3DSCI${ITKM_${real_type}}" "itk::PhasedArray3DSpecialCoordinatesImage<${ITKT_${real_type}}>") + foreach(t ${ssrt_types}) + itk_wrap_template("${ITKM_ISSRT${ITKM_${t}}${d}${d}}" "${ITKT_ISSRT${ITKM_${t}}${d}${d}}") endforeach() - foreach(complex_type ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("PA3DSCI${ITKM_${complex_type}}" "itk::PhasedArray3DSpecialCoordinatesImage<${ITKT_${complex_type}}>") +endforeach() + +list( + FIND + WRAP_ITK_COV_VECTOR_REAL + "CVD" + index) +if(index EQUAL -1) + itk_wrap_include("itkCovariantVector.h") + # Used in ImageRegistrationMethodv4 + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("ICV${ITKM_D}${d}${d}" "itk::Image< itk::CovariantVector< ${ITKT_D},${d} >,${d} >") endforeach() +endif() + +# PhasedArray3DSpecialCoordinatesImage +foreach(real_type ${WRAP_ITK_SCALAR}) + itk_wrap_template("PA3DSCI${ITKM_${real_type}}" "itk::PhasedArray3DSpecialCoordinatesImage<${ITKT_${real_type}}>") +endforeach() +foreach(complex_type ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("PA3DSCI${ITKM_${complex_type}}" + "itk::PhasedArray3DSpecialCoordinatesImage<${ITKT_${complex_type}}>") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkImageToImageFilterA.wrap b/Modules/Core/Common/wrapping/itkImageToImageFilterA.wrap index 90f15209fac..424240ccff3 100644 --- a/Modules/Core/Common/wrapping/itkImageToImageFilterA.wrap +++ b/Modules/Core/Common/wrapping/itkImageToImageFilterA.wrap @@ -1,98 +1,137 @@ itk_wrap_class("itk::ImageToImageFilter" POINTER) - # Wrap from each scalar type to each other, and also to uchar (for 8-bit saving) - # and to ulong (for watershed). - UNIQUE(from_types "UC;UL;SI;UI;${ITKM_IT};ULL;${WRAP_ITK_SCALAR}") - UNIQUE(to_types "UC;UL;SI;UI;${ITKM_IT};${WRAP_ITK_SCALAR}") - itk_wrap_image_filter_combinations("${from_types}" "${to_types}") +# Wrap from each scalar type to each other, and also to uchar (for 8-bit saving) +# and to ulong (for watershed). +unique(from_types "UC;UL;SI;UI;${ITKM_IT};ULL;${WRAP_ITK_SCALAR}") +unique(to_types "UC;UL;SI;UI;${ITKM_IT};${WRAP_ITK_SCALAR}") +itk_wrap_image_filter_combinations("${from_types}" "${to_types}") - UNIQUE(to_types "UC;${WRAP_ITK_SCALAR}") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${to_types}) - itk_wrap_template("${ITKM_VI${t}${d}}${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}},${ITKT_VI${t}${d}}") - endforeach() +unique(to_types "UC;${WRAP_ITK_SCALAR}") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${to_types}) + itk_wrap_template("${ITKM_VI${t}${d}}${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}},${ITKT_VI${t}${d}}") endforeach() +endforeach() - # Vector types - itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_VECTOR}") +# Vector types +itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_VECTOR}") - foreach(image_dim ${ITK_WRAP_IMAGE_DIMS}) - if(ITK_WRAP_vector_float AND ITK_WRAP_vector_double) - if(ITKM_VIF${image_dim} AND ITKM_VID${image_dim} AND ITKT_VIF${image_dim} AND ITKT_VID${image_dim}) - # VectorImage(float) <-> VectorImage(double) - itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_VID${image_dim}}" "${ITKT_VIF${image_dim}},${ITKT_VID${image_dim}}") - itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_VIF${image_dim}}" "${ITKT_VID${image_dim}},${ITKT_VIF${image_dim}}") - endif() - foreach(pixel_type "${WRAP_ITK_RGB};${WRAP_ITK_RGBA}") - if(ITKM_VIF${image_dim} AND ITKM_I${ITKM_${pixel_type}}${image_dim} AND ITKT_VIF${image_dim} AND ITKT_I${ITKM_${pixel_type}}${image_dim}) - # VectorImage(float) <-> (RGBPixel, RGBAPixel) - itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_I${ITKM_${pixel_type}}${image_dim}}" "${ITKT_VIF${image_dim}},${ITKT_I${ITKM_${pixel_type}}${image_dim}}") - itk_wrap_template("${ITKM_I${ITKM_${pixel_type}}${image_dim}}${ITKM_VIF${image_dim}}" "${ITKT_I${ITKM_${pixel_type}}${image_dim}},${ITKT_VIF${image_dim}}") - endif() - if(ITKM_VID${image_dim} AND ITKM_I${ITKM_${pixel_type}}${image_dim} AND ITKT_VID${image_dim} AND ITKT_I${ITKM_${pixel_type}}${image_dim}) - # VectorImage(double) <-> (RGBPixel, RGBAPixel) - itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_I${ITKM_${pixel_type}}${image_dim}}" "${ITKT_VID${image_dim}},${ITKT_I${ITKM_${pixel_type}}${image_dim}}") - itk_wrap_template("${ITKM_I${ITKM_${pixel_type}}${image_dim}}${ITKM_VID${image_dim}}" "${ITKT_I${ITKM_${pixel_type}}${image_dim}},${ITKT_VID${image_dim}}") - endif() - endforeach() +foreach(image_dim ${ITK_WRAP_IMAGE_DIMS}) + if(ITK_WRAP_vector_float AND ITK_WRAP_vector_double) + if(ITKM_VIF${image_dim} + AND ITKM_VID${image_dim} + AND ITKT_VIF${image_dim} + AND ITKT_VID${image_dim}) + # VectorImage(float) <-> VectorImage(double) + itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_VID${image_dim}}" + "${ITKT_VIF${image_dim}},${ITKT_VID${image_dim}}") + itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_VIF${image_dim}}" + "${ITKT_VID${image_dim}},${ITKT_VIF${image_dim}}") endif() - foreach(vector_components ${ITK_WRAP_VECTOR_COMPONENTS}) - if(ITK_WRAP_vector_float) - if(ITKM_IVF${vector_components}${image_dim} AND ITKM_VIF${image_dim} AND ITKT_IVF${vector_components}${image_dim} AND ITKT_VIF${image_dim}) - # VectorImage(float) <-> Vector(float) - itk_wrap_template("${ITKM_IVF${vector_components}${image_dim}}${ITKM_VIF${image_dim}}" "${ITKT_IVF${vector_components}${image_dim}},${ITKT_VIF${image_dim}}") - itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_IVF${vector_components}${image_dim}}" "${ITKT_VIF${image_dim}},${ITKT_IVF${vector_components}${image_dim}}") - endif() + foreach(pixel_type "${WRAP_ITK_RGB};${WRAP_ITK_RGBA}") + if(ITKM_VIF${image_dim} + AND ITKM_I${ITKM_${pixel_type}}${image_dim} + AND ITKT_VIF${image_dim} + AND ITKT_I${ITKM_${pixel_type}}${image_dim}) + # VectorImage(float) <-> (RGBPixel, RGBAPixel) + itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_I${ITKM_${pixel_type}}${image_dim}}" + "${ITKT_VIF${image_dim}},${ITKT_I${ITKM_${pixel_type}}${image_dim}}") + itk_wrap_template("${ITKM_I${ITKM_${pixel_type}}${image_dim}}${ITKM_VIF${image_dim}}" + "${ITKT_I${ITKM_${pixel_type}}${image_dim}},${ITKT_VIF${image_dim}}") + endif() + if(ITKM_VID${image_dim} + AND ITKM_I${ITKM_${pixel_type}}${image_dim} + AND ITKT_VID${image_dim} + AND ITKT_I${ITKM_${pixel_type}}${image_dim}) + # VectorImage(double) <-> (RGBPixel, RGBAPixel) + itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_I${ITKM_${pixel_type}}${image_dim}}" + "${ITKT_VID${image_dim}},${ITKT_I${ITKM_${pixel_type}}${image_dim}}") + itk_wrap_template("${ITKM_I${ITKM_${pixel_type}}${image_dim}}${ITKM_VID${image_dim}}" + "${ITKT_I${ITKM_${pixel_type}}${image_dim}},${ITKT_VID${image_dim}}") endif() - if(ITK_WRAP_covariant_vector_float) - if(ITKM_ICVF${vector_components}${image_dim} AND ITKM_VIF${image_dim} AND ITKT_ICVF${vector_components}${image_dim} AND ITKT_VIF${image_dim}) - # VectorImage(float) <-> CovariantVector(float) - itk_wrap_template("${ITKM_ICVF${vector_components}${image_dim}}${ITKM_VIF${image_dim}}" "${ITKT_ICVF${vector_components}${image_dim}},${ITKT_VIF${image_dim}}") - itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_ICVF${vector_components}${image_dim}}" "${ITKT_VIF${image_dim}},${ITKT_ICVF${vector_components}${image_dim}}") - endif() + endforeach() + endif() + foreach(vector_components ${ITK_WRAP_VECTOR_COMPONENTS}) + if(ITK_WRAP_vector_float) + if(ITKM_IVF${vector_components}${image_dim} + AND ITKM_VIF${image_dim} + AND ITKT_IVF${vector_components}${image_dim} + AND ITKT_VIF${image_dim}) + # VectorImage(float) <-> Vector(float) + itk_wrap_template("${ITKM_IVF${vector_components}${image_dim}}${ITKM_VIF${image_dim}}" + "${ITKT_IVF${vector_components}${image_dim}},${ITKT_VIF${image_dim}}") + itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_IVF${vector_components}${image_dim}}" + "${ITKT_VIF${image_dim}},${ITKT_IVF${vector_components}${image_dim}}") endif() - if(ITK_WRAP_vector_double) - if(ITKM_IVD${vector_components}${image_dim} AND ITKM_VID${image_dim} AND ITKT_IVD${vector_components}${image_dim} AND ITKT_VID${image_dim}) - # VectorImage(double) <-> Vector(double) - itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_IVD${vector_components}${image_dim}}" "${ITKT_VID${image_dim}},${ITKT_IVD${vector_components}${image_dim}}") - itk_wrap_template("${ITKM_IVD${vector_components}${image_dim}}${ITKM_VID${image_dim}}" "${ITKT_IVD${vector_components}${image_dim}},${ITKT_VID${image_dim}}") - endif() + endif() + if(ITK_WRAP_covariant_vector_float) + if(ITKM_ICVF${vector_components}${image_dim} + AND ITKM_VIF${image_dim} + AND ITKT_ICVF${vector_components}${image_dim} + AND ITKT_VIF${image_dim}) + # VectorImage(float) <-> CovariantVector(float) + itk_wrap_template("${ITKM_ICVF${vector_components}${image_dim}}${ITKM_VIF${image_dim}}" + "${ITKT_ICVF${vector_components}${image_dim}},${ITKT_VIF${image_dim}}") + itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_ICVF${vector_components}${image_dim}}" + "${ITKT_VIF${image_dim}},${ITKT_ICVF${vector_components}${image_dim}}") endif() - if(ITK_WRAP_covariant_vector_double) - if(ITKM_ICVD${vector_components}${image_dim} AND ITKM_VID${image_dim} AND ITKT_ICVD${vector_components}${image_dim} AND ITKT_VID${image_dim}) - # VectorImage(double) <-> CovariantVector(double) - itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_ICVD${vector_components}${image_dim}}" "${ITKT_VID${image_dim}},${ITKT_ICVD${vector_components}${image_dim}}") - itk_wrap_template("${ITKM_ICVD${vector_components}${image_dim}}${ITKM_VID${image_dim}}" "${ITKT_ICVD${vector_components}${image_dim}},${ITKT_VID${image_dim}}") - endif() + endif() + if(ITK_WRAP_vector_double) + if(ITKM_IVD${vector_components}${image_dim} + AND ITKM_VID${image_dim} + AND ITKT_IVD${vector_components}${image_dim} + AND ITKT_VID${image_dim}) + # VectorImage(double) <-> Vector(double) + itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_IVD${vector_components}${image_dim}}" + "${ITKT_VID${image_dim}},${ITKT_IVD${vector_components}${image_dim}}") + itk_wrap_template("${ITKM_IVD${vector_components}${image_dim}}${ITKM_VID${image_dim}}" + "${ITKT_IVD${vector_components}${image_dim}},${ITKT_VID${image_dim}}") endif() - endforeach() + endif() + if(ITK_WRAP_covariant_vector_double) + if(ITKM_ICVD${vector_components}${image_dim} + AND ITKM_VID${image_dim} + AND ITKT_ICVD${vector_components}${image_dim} + AND ITKT_VID${image_dim}) + # VectorImage(double) <-> CovariantVector(double) + itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_ICVD${vector_components}${image_dim}}" + "${ITKT_VID${image_dim}},${ITKT_ICVD${vector_components}${image_dim}}") + itk_wrap_template("${ITKM_ICVD${vector_components}${image_dim}}${ITKM_VID${image_dim}}" + "${ITKT_ICVD${vector_components}${image_dim}},${ITKT_VID${image_dim}}") + endif() + endif() endforeach() +endforeach() - # For GradientRecursiveGaussianImageFilter we need some specific combinations - foreach(image_dim ${ITK_WRAP_IMAGE_DIMS}) - foreach(input_vector_dim ${ITK_WRAP_VECTOR_COMPONENTS}) - math(EXPR output_vector_dim ${input_vector_dim}*2) - list(FIND ITK_WRAP_VECTOR_COMPONENTS "${output_vector_dim}" index) - if(index GREATER -1) - foreach(t ${WRAP_ITK_VECTOR_REAL}) - foreach(cv ${WRAP_ITK_COV_VECTOR_REAL}) - itk_wrap_template( - "${ITKM_I${t}${input_vector_dim}${image_dim}}${ITKM_I${cv}${output_vector_dim}${image_dim}}" - "${ITKT_I${t}${input_vector_dim}${image_dim}},${ITKT_I${cv}${output_vector_dim}${image_dim}}") - endforeach() +# For GradientRecursiveGaussianImageFilter we need some specific combinations +foreach(image_dim ${ITK_WRAP_IMAGE_DIMS}) + foreach(input_vector_dim ${ITK_WRAP_VECTOR_COMPONENTS}) + math(EXPR output_vector_dim ${input_vector_dim}*2) + list( + FIND + ITK_WRAP_VECTOR_COMPONENTS + "${output_vector_dim}" + index) + if(index GREATER -1) + foreach(t ${WRAP_ITK_VECTOR_REAL}) + foreach(cv ${WRAP_ITK_COV_VECTOR_REAL}) + itk_wrap_template( + "${ITKM_I${t}${input_vector_dim}${image_dim}}${ITKM_I${cv}${output_vector_dim}${image_dim}}" + "${ITKT_I${t}${input_vector_dim}${image_dim}},${ITKT_I${cv}${output_vector_dim}${image_dim}}") endforeach() - endif() - endforeach() + endforeach() + endif() endforeach() +endforeach() - # RGB types - UNIQUE(rgb "RGBUC;${WRAP_ITK_RGB}") - itk_wrap_image_filter_combinations("${rgb}" "${rgb}") +# RGB types +unique(rgb "RGBUC;${WRAP_ITK_RGB}") +itk_wrap_image_filter_combinations("${rgb}" "${rgb}") - # RGBA types - UNIQUE(rgba "RGBAUC;${WRAP_ITK_RGBA}") - itk_wrap_image_filter_combinations("${rgba}" "${rgba}") - unset(to_types) - unset(from_types) - unset(rgb) - unset(rgba) +# RGBA types +unique(rgba "RGBAUC;${WRAP_ITK_RGBA}") +itk_wrap_image_filter_combinations("${rgba}" "${rgba}") +unset(to_types) +unset(from_types) +unset(rgb) +unset(rgba) itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkImageToImageFilterB.wrap b/Modules/Core/Common/wrapping/itkImageToImageFilterB.wrap index 26d743be5d0..8bd49347a7d 100644 --- a/Modules/Core/Common/wrapping/itkImageToImageFilterB.wrap +++ b/Modules/Core/Common/wrapping/itkImageToImageFilterB.wrap @@ -1,102 +1,118 @@ itk_wrap_include("itkPhasedArray3DSpecialCoordinatesImage.h") itk_wrap_class("itk::ImageToImageFilter" POINTER) - # scalar <-> RGB - UNIQUE(stypes "${ITKM_IT};UL;${WRAP_ITK_SCALAR}") - itk_wrap_image_filter_combinations("${stypes}" "${WRAP_ITK_RGB}") - itk_wrap_image_filter_combinations("${WRAP_ITK_RGB}" "${stypes}") +# scalar <-> RGB +unique(stypes "${ITKM_IT};UL;${WRAP_ITK_SCALAR}") +itk_wrap_image_filter_combinations("${stypes}" "${WRAP_ITK_RGB}") +itk_wrap_image_filter_combinations("${WRAP_ITK_RGB}" "${stypes}") - # scalar <-> RGBA - UNIQUE(stypes "${ITKM_IT};UL;${WRAP_ITK_SCALAR}") - itk_wrap_image_filter_combinations("${stypes}" "${WRAP_ITK_RGBA}") - itk_wrap_image_filter_combinations("${WRAP_ITK_RGBA}" "${stypes}") +# scalar <-> RGBA +unique(stypes "${ITKM_IT};UL;${WRAP_ITK_SCALAR}") +itk_wrap_image_filter_combinations("${stypes}" "${WRAP_ITK_RGBA}") +itk_wrap_image_filter_combinations("${WRAP_ITK_RGBA}" "${stypes}") - # VectorImage <-> scalar - UNIQUE(to_types "UC;${WRAP_ITK_SCALAR}") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${to_types}) - foreach(t2 ${to_types}) - itk_wrap_template("${ITKM_VI${t}${d}}${ITKM_I${t2}${d}}" "${ITKT_VI${t}${d}},${ITKT_I${t2}${d}}") - itk_wrap_template("${ITKM_I${t2}${d}}${ITKM_VI${t}${d}}" "${ITKT_I${t2}${d}},${ITKT_VI${t}${d}}") - endforeach() - endforeach() +# VectorImage <-> scalar +unique(to_types "UC;${WRAP_ITK_SCALAR}") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${to_types}) + foreach(t2 ${to_types}) + itk_wrap_template("${ITKM_VI${t}${d}}${ITKM_I${t2}${d}}" "${ITKT_VI${t}${d}},${ITKT_I${t2}${d}}") + itk_wrap_template("${ITKM_I${t2}${d}}${ITKM_VI${t}${d}}" "${ITKT_I${t2}${d}},${ITKT_VI${t}${d}}") endforeach() - # *Vector <-> scalar - itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_SCALAR}") - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_VECTOR}") + endforeach() +endforeach() +# *Vector <-> scalar +itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_SCALAR}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_VECTOR}") - # complex types - itk_wrap_image_filter_combinations("${WRAP_ITK_COMPLEX_REAL}" "${WRAP_ITK_COMPLEX_REAL}") +# complex types +itk_wrap_image_filter_combinations("${WRAP_ITK_COMPLEX_REAL}" "${WRAP_ITK_COMPLEX_REAL}") - # complex <-> scalar - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_COMPLEX_REAL}") - itk_wrap_image_filter_combinations("${WRAP_ITK_COMPLEX_REAL}" "${WRAP_ITK_SCALAR}") +# complex <-> scalar +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_COMPLEX_REAL}") +itk_wrap_image_filter_combinations("${WRAP_ITK_COMPLEX_REAL}" "${WRAP_ITK_SCALAR}") - UNIQUE(real_types "${WRAP_ITK_REAL};D") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t2 ${real_types}) - foreach(t ${WRAP_ITK_SCALAR}) - # scalar <-> SymmetricSecondRankTensor - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_ISSRT${ITKM_${t2}}${d}${d}}" "${ITKT_I${t}${d}}, ${ITKT_ISSRT${ITKM_${t2}}${d}${d}}") - itk_wrap_template("${ITKM_ISSRT${ITKM_${t2}}${d}${d}}${ITKM_I${t}${d}}" "${ITKT_ISSRT${ITKM_${t2}}${d}${d}}, ${ITKT_I${t}${d}}") - endforeach() - # SymmetricSecondRankTensor -> SymmetricSecondRankTensor - foreach(t3 ${real_types}) - itk_wrap_template("${ITKM_ISSRT${ITKM_${t2}}${d}${d}}${ITKM_ISSRT${ITKM_${t3}}${d}${d}}" - "${ITKT_ISSRT${ITKM_${t2}}${d}${d}}, ${ITKT_ISSRT${ITKM_${t3}}${d}${d}}") - endforeach() +unique(real_types "${WRAP_ITK_REAL};D") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t2 ${real_types}) + foreach(t ${WRAP_ITK_SCALAR}) + # scalar <-> SymmetricSecondRankTensor + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_ISSRT${ITKM_${t2}}${d}${d}}" + "${ITKT_I${t}${d}}, ${ITKT_ISSRT${ITKM_${t2}}${d}${d}}") + itk_wrap_template("${ITKM_ISSRT${ITKM_${t2}}${d}${d}}${ITKM_I${t}${d}}" + "${ITKT_ISSRT${ITKM_${t2}}${d}${d}}, ${ITKT_I${t}${d}}") endforeach() - endforeach() - - # Wrap dim=3 -> dim=2, dim=3 -> dim=2, etc. - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(d2 ${ITK_WRAP_IMAGE_DIMS}) - if(NOT "${d}" EQUAL "${d2}") # this was already taken care of elsewhere - foreach(t ${WRAP_ITK_SCALAR} ${WRAP_ITK_RGB} ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" - "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") - endforeach() - endif() + # SymmetricSecondRankTensor -> SymmetricSecondRankTensor + foreach(t3 ${real_types}) + itk_wrap_template("${ITKM_ISSRT${ITKM_${t2}}${d}${d}}${ITKM_ISSRT${ITKM_${t3}}${d}${d}}" + "${ITKT_ISSRT${ITKM_${t2}}${d}${d}}, ${ITKT_ISSRT${ITKM_${t3}}${d}${d}}") endforeach() endforeach() +endforeach() - list(FIND WRAP_ITK_COV_VECTOR_REAL "CVD" index) - if(index EQUAL -1) - # Real <-> CovariantVector - itk_wrap_include("itkCovariantVector.h") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("I${ITKM_F}${d}ICV${ITKM_D}${d}${d}" - "itk::Image<${ITKT_F}, ${d}>, itk::Image, ${d}>") - itk_wrap_template("I${ITKM_D}${d}ICV${ITKM_D}${d}${d}" - "itk::Image<${ITKT_D}, ${d}>, itk::Image, ${d}>") - endforeach() - endif() +# Wrap dim=3 -> dim=2, dim=3 -> dim=2, etc. +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(d2 ${ITK_WRAP_IMAGE_DIMS}) + if(NOT + "${d}" + EQUAL + "${d2}") # this was already taken care of elsewhere + foreach(t ${WRAP_ITK_SCALAR} ${WRAP_ITK_RGB} ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") + endforeach() + endif() + endforeach() +endforeach() - # PhasedArray3DSpecialCoordinatesImage - foreach(t ${WRAP_ITK_SCALAR}) - foreach(ut ${WRAP_ITK_INT}) - itk_wrap_template("I${ITKM_${t}}3PA3DSCI${ITKM_${ut}}" - "itk::Image< ${ITKT_${t}}, 3 >, itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${ut}} >") - endforeach() - foreach(t2 ${WRAP_ITK_SCALAR}) - itk_wrap_template("PA3DSCI${ITKM_${t}}PA3DSCI${ITKM_${t2}}" - "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t2}} >") - itk_wrap_template("PA3DSCI${ITKM_${t}}I${ITKM_${t2}}3" - "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, itk::Image< ${ITKT_${t2}}, 3 >") - endforeach() +list( + FIND + WRAP_ITK_COV_VECTOR_REAL + "CVD" + index) +if(index EQUAL -1) + # Real <-> CovariantVector + itk_wrap_include("itkCovariantVector.h") + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("I${ITKM_F}${d}ICV${ITKM_D}${d}${d}" + "itk::Image<${ITKT_F}, ${d}>, itk::Image, ${d}>") + itk_wrap_template("I${ITKM_D}${d}ICV${ITKM_D}${d}${d}" + "itk::Image<${ITKT_D}, ${d}>, itk::Image, ${d}>") endforeach() +endif() - foreach(rt ${WRAP_ITK_REAL}) - foreach(ct ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("PA3DSCI${ITKM_${rt}}PA3DSCI${ITKM_${ct}}" - "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${rt}} >, itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${ct}} >") - itk_wrap_template("PA3DSCI${ITKM_${ct}}PA3DSCI${ITKM_${rt}}" - "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${ct}} >, itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${rt}} >") - endforeach() +# PhasedArray3DSpecialCoordinatesImage +foreach(t ${WRAP_ITK_SCALAR}) + foreach(ut ${WRAP_ITK_INT}) + itk_wrap_template("I${ITKM_${t}}3PA3DSCI${ITKM_${ut}}" + "itk::Image< ${ITKT_${t}}, 3 >, itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${ut}} >") endforeach() + foreach(t2 ${WRAP_ITK_SCALAR}) + itk_wrap_template( + "PA3DSCI${ITKM_${t}}PA3DSCI${ITKM_${t2}}" + "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t2}} >" + ) + itk_wrap_template("PA3DSCI${ITKM_${t}}I${ITKM_${t2}}3" + "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, itk::Image< ${ITKT_${t2}}, 3 >") + endforeach() +endforeach() - foreach(t3 ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("PA3DSCI${ITKM_${t3}}PA3DSCI${ITKM_${t3}}" - "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t3}} >, itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t3}} >") +foreach(rt ${WRAP_ITK_REAL}) + foreach(ct ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template( + "PA3DSCI${ITKM_${rt}}PA3DSCI${ITKM_${ct}}" + "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${rt}} >, itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${ct}} >" + ) + itk_wrap_template( + "PA3DSCI${ITKM_${ct}}PA3DSCI${ITKM_${rt}}" + "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${ct}} >, itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${rt}} >" + ) endforeach() +endforeach() + +foreach(t3 ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template( + "PA3DSCI${ITKM_${t3}}PA3DSCI${ITKM_${t3}}" + "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t3}} >, itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t3}} >" + ) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkImportImageFilter.wrap b/Modules/Core/Common/wrapping/itkImportImageFilter.wrap index d8631f40e56..78ba07539a2 100644 --- a/Modules/Core/Common/wrapping/itkImportImageFilter.wrap +++ b/Modules/Core/Common/wrapping/itkImportImageFilter.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::ImportImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}},${d}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkInPlaceImageFilterA.wrap b/Modules/Core/Common/wrapping/itkInPlaceImageFilterA.wrap index 577d31ce8d3..cca680ef510 100644 --- a/Modules/Core/Common/wrapping/itkInPlaceImageFilterA.wrap +++ b/Modules/Core/Common/wrapping/itkInPlaceImageFilterA.wrap @@ -1,48 +1,48 @@ itk_wrap_class("itk::InPlaceImageFilter" POINTER) - # Wrap from each scalar type to each other, and also to uchar (for 8-bit - # saving), UL for label images - UNIQUE(from_types "UC;UL;${ITKM_IT};ULL;${WRAP_ITK_SCALAR}") - UNIQUE(to_types "UC;UL;${ITKM_IT};${WRAP_ITK_SCALAR}") - itk_wrap_image_filter_combinations("${from_types}" "${to_types}") - - # Vector types - itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_VECTOR}") - - # RGB types - UNIQUE(rgb "RGBUC;${WRAP_ITK_RGB}") - itk_wrap_image_filter_combinations("${rgb}" "${rgb}") - - if(ITK_WRAP_rgb_unsigned_char) - UNIQUE(types "UL;${WRAP_ITK_SCALAR}") - itk_wrap_image_filter_combinations("${types}" "RGBUC") - endif() - - if(ITK_WRAP_rgb_unsigned_short) - UNIQUE(types "UL;${WRAP_ITK_SCALAR}") - itk_wrap_image_filter_combinations("${types}" "RGBUS") - endif() - - # RGBA types - UNIQUE(rgba "RGBAUC;${WRAP_ITK_RGBA}") - itk_wrap_image_filter_combinations("${rgba}" "${rgba}") - - # int <-> RGBA - if(ITK_WRAP_rgba_unsigned_char AND ITK_WRAP_unsigned_char) - itk_wrap_image_filter_types(RGBAUC UC) - endif() - - if(ITK_WRAP_rgba_unsigned_short AND ITK_WRAP_unsigned_short) - itk_wrap_image_filter_types(RGBAUS US) - endif() - - if(ITK_WRAP_rgba_unsigned_char) - UNIQUE(types "UL;${WRAP_ITK_SCALAR}") - itk_wrap_image_filter_combinations("${types}" "RGBAUC") - endif() - - if(ITK_WRAP_rgba_unsigned_short) - UNIQUE(types "UL;${WRAP_ITK_SCALAR}") - itk_wrap_image_filter_combinations("${types}" "RGBAUS") - endif() +# Wrap from each scalar type to each other, and also to uchar (for 8-bit +# saving), UL for label images +unique(from_types "UC;UL;${ITKM_IT};ULL;${WRAP_ITK_SCALAR}") +unique(to_types "UC;UL;${ITKM_IT};${WRAP_ITK_SCALAR}") +itk_wrap_image_filter_combinations("${from_types}" "${to_types}") + +# Vector types +itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_VECTOR}") + +# RGB types +unique(rgb "RGBUC;${WRAP_ITK_RGB}") +itk_wrap_image_filter_combinations("${rgb}" "${rgb}") + +if(ITK_WRAP_rgb_unsigned_char) + unique(types "UL;${WRAP_ITK_SCALAR}") + itk_wrap_image_filter_combinations("${types}" "RGBUC") +endif() + +if(ITK_WRAP_rgb_unsigned_short) + unique(types "UL;${WRAP_ITK_SCALAR}") + itk_wrap_image_filter_combinations("${types}" "RGBUS") +endif() + +# RGBA types +unique(rgba "RGBAUC;${WRAP_ITK_RGBA}") +itk_wrap_image_filter_combinations("${rgba}" "${rgba}") + +# int <-> RGBA +if(ITK_WRAP_rgba_unsigned_char AND ITK_WRAP_unsigned_char) + itk_wrap_image_filter_types(RGBAUC UC) +endif() + +if(ITK_WRAP_rgba_unsigned_short AND ITK_WRAP_unsigned_short) + itk_wrap_image_filter_types(RGBAUS US) +endif() + +if(ITK_WRAP_rgba_unsigned_char) + unique(types "UL;${WRAP_ITK_SCALAR}") + itk_wrap_image_filter_combinations("${types}" "RGBAUC") +endif() + +if(ITK_WRAP_rgba_unsigned_short) + unique(types "UL;${WRAP_ITK_SCALAR}") + itk_wrap_image_filter_combinations("${types}" "RGBAUS") +endif() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkInPlaceImageFilterB.wrap b/Modules/Core/Common/wrapping/itkInPlaceImageFilterB.wrap index a57a987e07e..fbb44d2a517 100644 --- a/Modules/Core/Common/wrapping/itkInPlaceImageFilterB.wrap +++ b/Modules/Core/Common/wrapping/itkInPlaceImageFilterB.wrap @@ -1,50 +1,52 @@ itk_wrap_include("itkPhasedArray3DSpecialCoordinatesImage.h") itk_wrap_class("itk::InPlaceImageFilter" POINTER) - # VectorImage <-> scalar - UNIQUE(to_types "UC;${WRAP_ITK_SCALAR}") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${to_types}) - itk_wrap_template("${ITKM_VI${t}${d}}${ITKM_I${t}${d}}" "${ITKT_VI${t}${d}},${ITKT_I${t}${d}}") - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_VI${t}${d}}" "${ITKT_I${t}${d}},${ITKT_VI${t}${d}}") - endforeach() +# VectorImage <-> scalar +unique(to_types "UC;${WRAP_ITK_SCALAR}") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${to_types}) + itk_wrap_template("${ITKM_VI${t}${d}}${ITKM_I${t}${d}}" "${ITKT_VI${t}${d}},${ITKT_I${t}${d}}") + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_VI${t}${d}}" "${ITKT_I${t}${d}},${ITKT_VI${t}${d}}") endforeach() +endforeach() - # *Vector <-> scalar - itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_SCALAR}") - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_VECTOR}") +# *Vector <-> scalar +itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_SCALAR}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_VECTOR}") - # RGB -> Scalar - foreach(type ${WRAP_ITK_SCALAR}) - foreach(rgbtype ${WRAP_ITK_RGB}) - itk_wrap_image_filter_combinations("${rgbtype}" "${type}") - endforeach() +# RGB -> Scalar +foreach(type ${WRAP_ITK_SCALAR}) + foreach(rgbtype ${WRAP_ITK_RGB}) + itk_wrap_image_filter_combinations("${rgbtype}" "${type}") endforeach() +endforeach() - # complex types - itk_wrap_image_filter_combinations("${WRAP_ITK_COMPLEX_REAL}" "${WRAP_ITK_COMPLEX_REAL}") +# complex types +itk_wrap_image_filter_combinations("${WRAP_ITK_COMPLEX_REAL}" "${WRAP_ITK_COMPLEX_REAL}") - # complex <-> scalar - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_COMPLEX_REAL}") - itk_wrap_image_filter_combinations("${WRAP_ITK_COMPLEX_REAL}" "${WRAP_ITK_SCALAR}") +# complex <-> scalar +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_COMPLEX_REAL}") +itk_wrap_image_filter_combinations("${WRAP_ITK_COMPLEX_REAL}" "${WRAP_ITK_SCALAR}") - # Wrap dim=3 -> dim=2, dim=3 -> dim=2, etc. - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(d2 ${ITK_WRAP_IMAGE_DIMS}) - if(NOT "${d}" EQUAL "${d2}") # this was already taken care of elsewhere - foreach(t ${WRAP_ITK_SCALAR} ${WRAP_ITK_RGB} ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" - "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") - endforeach() - endif() - endforeach() +# Wrap dim=3 -> dim=2, dim=3 -> dim=2, etc. +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(d2 ${ITK_WRAP_IMAGE_DIMS}) + if(NOT + "${d}" + EQUAL + "${d2}") # this was already taken care of elsewhere + foreach(t ${WRAP_ITK_SCALAR} ${WRAP_ITK_RGB} ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") + endforeach() + endif() endforeach() +endforeach() - # PhasedArray3DSpecialCoordinatesImage - foreach(t ${WRAP_ITK_SCALAR}) - foreach(ut ${WRAP_ITK_INT}) - itk_wrap_template("I${ITKM_${t}}3PA3DSCI${ITKM_${ut}}" - "itk::Image< ${ITKT_${t}}, 3 >, itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${ut}} >") - endforeach() +# PhasedArray3DSpecialCoordinatesImage +foreach(t ${WRAP_ITK_SCALAR}) + foreach(ut ${WRAP_ITK_INT}) + itk_wrap_template("I${ITKM_${t}}3PA3DSCI${ITKM_${ut}}" + "itk::Image< ${ITKT_${t}}, 3 >, itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${ut}} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkIndex.wrap b/Modules/Core/Common/wrapping/itkIndex.wrap index 6ed5f5ee88a..d49dfe25398 100644 --- a/Modules/Core/Common/wrapping/itkIndex.wrap +++ b/Modules/Core/Common/wrapping/itkIndex.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::Index") - UNIQUE(dims "${ITK_WRAP_IMAGE_DIMS_INCREMENTED};1;2") - foreach(d ${dims}) - itk_wrap_template(${d} ${d}) - endforeach() +unique(dims "${ITK_WRAP_IMAGE_DIMS_INCREMENTED};1;2") +foreach(d ${dims}) + itk_wrap_template(${d} ${d}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkKernelFunctionBase.wrap b/Modules/Core/Common/wrapping/itkKernelFunctionBase.wrap index 2a14e055b45..7c045703827 100644 --- a/Modules/Core/Common/wrapping/itkKernelFunctionBase.wrap +++ b/Modules/Core/Common/wrapping/itkKernelFunctionBase.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::KernelFunctionBase" POINTER) - foreach(r ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_${r}}" "${ITKT_${r}}") - endforeach() +foreach(r ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_${r}}" "${ITKT_${r}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkLaplacianOperator.wrap b/Modules/Core/Common/wrapping/itkLaplacianOperator.wrap index 561f2284a2a..164fefdf201 100644 --- a/Modules/Core/Common/wrapping/itkLaplacianOperator.wrap +++ b/Modules/Core/Common/wrapping/itkLaplacianOperator.wrap @@ -1,9 +1,9 @@ set(types "${WRAP_ITK_REAL}") itk_wrap_class("itk::LaplacianOperator") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkMapContainer.wrap b/Modules/Core/Common/wrapping/itkMapContainer.wrap index c917455744c..25dc0f673ab 100644 --- a/Modules/Core/Common/wrapping/itkMapContainer.wrap +++ b/Modules/Core/Common/wrapping/itkMapContainer.wrap @@ -1,15 +1,15 @@ itk_wrap_include("set") -UNIQUE(types "${WRAP_ITK_REAL};D") +unique(types "${WRAP_ITK_REAL};D") itk_wrap_class("itk::MapContainer" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_IT}${ITKM_V${t}${d}}" "${ITKT_IT},${ITKT_V${t}${d}}") - itk_wrap_template("${ITKM_IT}${ITKM_P${t}${d}}" "${ITKT_IT},${ITKT_P${t}${d}}") - endforeach() - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) foreach(t ${types}) - itk_wrap_template("${ITKM_IT}${ITKM_${t}}" "${ITKT_IT},${ITKT_${t}}") + itk_wrap_template("${ITKM_IT}${ITKM_V${t}${d}}" "${ITKT_IT},${ITKT_V${t}${d}}") + itk_wrap_template("${ITKM_IT}${ITKM_P${t}${d}}" "${ITKT_IT},${ITKT_P${t}${d}}") endforeach() - itk_wrap_template("${ITKM_IT}SIT" "${ITKT_IT}, std::set< ${ITKT_IT} >") +endforeach() +foreach(t ${types}) + itk_wrap_template("${ITKM_IT}${ITKM_${t}}" "${ITKT_IT},${ITKT_${t}}") +endforeach() +itk_wrap_template("${ITKM_IT}SIT" "${ITKT_IT}, std::set< ${ITKT_IT} >") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkMatrix.wrap b/Modules/Core/Common/wrapping/itkMatrix.wrap index 59da4af4e0b..b119dc09cd6 100644 --- a/Modules/Core/Common/wrapping/itkMatrix.wrap +++ b/Modules/Core/Common/wrapping/itkMatrix.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::Matrix") - foreach(d1 ${ITK_WRAP_IMAGE_DIMS_INCREMENTED}) - foreach(d2 ${ITK_WRAP_IMAGE_DIMS_INCREMENTED}) - itk_wrap_template("${ITKM_F}${d1}${d2}" "${ITKT_F},${d1},${d2}") - itk_wrap_template("${ITKM_D}${d1}${d2}" "${ITKT_D},${d1},${d2}") - endforeach() +foreach(d1 ${ITK_WRAP_IMAGE_DIMS_INCREMENTED}) + foreach(d2 ${ITK_WRAP_IMAGE_DIMS_INCREMENTED}) + itk_wrap_template("${ITKM_F}${d1}${d2}" "${ITKT_F},${d1},${d2}") + itk_wrap_template("${ITKM_D}${d1}${d2}" "${ITKT_D},${d1},${d2}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkMetaDataObject.wrap b/Modules/Core/Common/wrapping/itkMetaDataObject.wrap index b8a86a9fe6f..4b12768f0b5 100644 --- a/Modules/Core/Common/wrapping/itkMetaDataObject.wrap +++ b/Modules/Core/Common/wrapping/itkMetaDataObject.wrap @@ -3,21 +3,21 @@ itk_wrap_include("") itk_wrap_include("itkMatrix.h") itk_wrap_class("itk::MetaDataObject" POINTER) - itk_wrap_template("D" "double") - itk_wrap_template("F" "float") - itk_wrap_template("B" "bool") - itk_wrap_template("S" "std::string") - itk_wrap_template("SS" "signed short") - itk_wrap_template("SI" "signed int") - itk_wrap_template("UI" "unsigned int") - itk_wrap_template("US" "unsigned short") - itk_wrap_template("UL" "unsigned long") - itk_wrap_template("AF" "itk::Array< float >") - itk_wrap_template("AD" "itk::Array< double >") - itk_wrap_template("vectorF" "std::vector< float >") - itk_wrap_template("vectorD" "std::vector< double >") - itk_wrap_template("vectorvectorF" "std::vector< std::vector< float > >") - itk_wrap_template("vectorvectorD" "std::vector< std::vector< double > >") - itk_wrap_template("matrixD33" "itk::Matrix< double, 3, 3 >") - itk_wrap_template("matrixF44" "itk::Matrix< float, 4, 4 >") +itk_wrap_template("D" "double") +itk_wrap_template("F" "float") +itk_wrap_template("B" "bool") +itk_wrap_template("S" "std::string") +itk_wrap_template("SS" "signed short") +itk_wrap_template("SI" "signed int") +itk_wrap_template("UI" "unsigned int") +itk_wrap_template("US" "unsigned short") +itk_wrap_template("UL" "unsigned long") +itk_wrap_template("AF" "itk::Array< float >") +itk_wrap_template("AD" "itk::Array< double >") +itk_wrap_template("vectorF" "std::vector< float >") +itk_wrap_template("vectorD" "std::vector< double >") +itk_wrap_template("vectorvectorF" "std::vector< std::vector< float > >") +itk_wrap_template("vectorvectorD" "std::vector< std::vector< double > >") +itk_wrap_template("matrixD33" "itk::Matrix< double, 3, 3 >") +itk_wrap_template("matrixF44" "itk::Matrix< float, 4, 4 >") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkMinimumMaximumImageCalculator.wrap b/Modules/Core/Common/wrapping/itkMinimumMaximumImageCalculator.wrap index 7dee08bcf91..b0d635fced1 100644 --- a/Modules/Core/Common/wrapping/itkMinimumMaximumImageCalculator.wrap +++ b/Modules/Core/Common/wrapping/itkMinimumMaximumImageCalculator.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MinimumMaximumImageCalculator" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkNeighborhood.wrap b/Modules/Core/Common/wrapping/itkNeighborhood.wrap index 439d47a751b..3137a2f64c4 100644 --- a/Modules/Core/Common/wrapping/itkNeighborhood.wrap +++ b/Modules/Core/Common/wrapping/itkNeighborhood.wrap @@ -1,16 +1,16 @@ itk_wrap_class("itk::Neighborhood") - # force bool, for structuring element - UNIQUE(scalar_types "${WRAP_ITK_SCALAR};${WRAP_ITK_RGB};B") +# force bool, for structuring element +unique(scalar_types "${WRAP_ITK_SCALAR};${WRAP_ITK_RGB};B") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${scalar_types}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${scalar_types}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}},${d}") + endforeach() - set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions - foreach(t ${WRAP_ITK_VECTOR}) - itk_wrap_template("${ITKM_${t}${vector_dim}}${d}" "${ITKT_${t}${vector_dim}},${d}") - endforeach() + set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions + foreach(t ${WRAP_ITK_VECTOR}) + itk_wrap_template("${ITKM_${t}${vector_dim}}${d}" "${ITKT_${t}${vector_dim}},${d}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkNeighborhoodOperator.wrap b/Modules/Core/Common/wrapping/itkNeighborhoodOperator.wrap index 9e1253027c8..7c09f915a61 100644 --- a/Modules/Core/Common/wrapping/itkNeighborhoodOperator.wrap +++ b/Modules/Core/Common/wrapping/itkNeighborhoodOperator.wrap @@ -1,9 +1,9 @@ set(types "${WRAP_ITK_REAL}") itk_wrap_class("itk::NeighborhoodOperator") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkNumericTraits.wrap b/Modules/Core/Common/wrapping/itkNumericTraits.wrap index 9e758c85bfc..8a742b38cff 100644 --- a/Modules/Core/Common/wrapping/itkNumericTraits.wrap +++ b/Modules/Core/Common/wrapping/itkNumericTraits.wrap @@ -1,4 +1,3 @@ - set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkNumericTraits.h") itk_wrap_include("itkNumericTraitsRGBPixel.h") @@ -17,80 +16,111 @@ endif() # the superclass itk_wrap_class(std::numeric_limits EXPLICIT_SPECIALIZATION) - # the basic types - foreach(t UC US UI UL ULL SC SS SI SL F D LD B) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +# the basic types +foreach( + t + UC + US + UI + UL + ULL + SC + SS + SI + SL + F + D + LD + B) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() - itk_wrap_class("itk::NumericTraits" EXPLICIT_SPECIALIZATION) - # the basic types - foreach(t UC US UI UL ULL SC SS SI SL F D LD B) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +# the basic types +foreach( + t + UC + US + UI + UL + ULL + SC + SS + SI + SL + F + D + LD + B) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() - # complex - foreach(t ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +# complex +foreach(t ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() - # the ITK types +# the ITK types - # rgb, rgba - UNIQUE(rgbs "RGBUC;RGBAUC;RGBAF;${WRAP_ITK_RGB};${WRAP_ITK_RGBA}") - foreach(t ${WRAP_ITK_RGB} ${WRAP_ITK_RGBA}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +# rgb, rgba +unique(rgbs "RGBUC;RGBAUC;RGBAF;${WRAP_ITK_RGB};${WRAP_ITK_RGBA}") +foreach(t ${WRAP_ITK_RGB} ${WRAP_ITK_RGBA}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() - # covariant vector - foreach(d ${ITK_WRAP_VECTOR_COMPONENTS}) - foreach(t ${WRAP_ITK_COV_VECTOR_REAL}) - itk_wrap_template("${ITKM_${t}${d}}" "${ITKT_${t}${d}}") - endforeach() +# covariant vector +foreach(d ${ITK_WRAP_VECTOR_COMPONENTS}) + foreach(t ${WRAP_ITK_COV_VECTOR_REAL}) + itk_wrap_template("${ITKM_${t}${d}}" "${ITKT_${t}${d}}") endforeach() +endforeach() - # vector, as in WrapITKTypes.cmake - UNIQUE(vector_dims "1;${ITK_WRAP_VECTOR_COMPONENTS};6") - UNIQUE(vector_types "UC;F;D;${WRAP_ITK_SCALAR}") - foreach(d ${vector_dims}) - foreach(t ${vector_types}) - ADD_TEMPLATE("${ITKM_V${t}${d}}" "${ITKT_V${t}${d}}") - endforeach() +# vector, as in WrapITKTypes.cmake +unique(vector_dims "1;${ITK_WRAP_VECTOR_COMPONENTS};6") +unique(vector_types "UC;F;D;${WRAP_ITK_SCALAR}") +foreach(d ${vector_dims}) + foreach(t ${vector_types}) + add_template("${ITKM_V${t}${d}}" "${ITKT_V${t}${d}}") endforeach() +endforeach() - # fixed array, as in WrapITKTypes.cmake - set(dims ${ITK_WRAP_IMAGE_DIMS}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - math(EXPR d2 "${d} * 2") - # for itk::SymmetricSecondRankTensor - math(EXPR d3 "${d} * (${d} + 1) / 2") - list(APPEND dims ${d2} ${d3}) - endforeach() - UNIQUE(array_sizes "${dims};1;3;4;6") - # make sure that 1-D FixedArrays are wrapped. Also wrap for each selected - # image dimension. - # 3-D FixedArrays are required as superclass of rgb pixels - # TODO: Do we need fixed arrays for all of these types? For just the selected - # pixel types plus some few basic cases? Or just for a basic set of types? - foreach(d ${array_sizes}) - ADD_TEMPLATE("${ITKM_FAD${d}}" "${ITKT_FAD${d}}") - ADD_TEMPLATE("${ITKM_FAF${d}}" "${ITKT_FAF${d}}") - ADD_TEMPLATE("${ITKM_FAUL${d}}" "${ITKT_FAUL${d}}") - ADD_TEMPLATE("${ITKM_FAUS${d}}" "${ITKT_FAUS${d}}") - ADD_TEMPLATE("${ITKM_FAUC${d}}" "${ITKT_FAUC${d}}") - ADD_TEMPLATE("${ITKM_FAUI${d}}" "${ITKT_FAUI${d}}") - ADD_TEMPLATE("${ITKM_FASL${d}}" "${ITKT_FASL${d}}") - ADD_TEMPLATE("${ITKM_FASS${d}}" "${ITKT_FASS${d}}") - ADD_TEMPLATE("${ITKM_FASC${d}}" "${ITKT_FASC${d}}") - # this one is not defined in itkNumerictTraitsFixedArrayPixel.h - # ADD_TEMPLATE("${ITKM_FAB${d}}" "${ITKT_FAB${d}}") - endforeach() +# fixed array, as in WrapITKTypes.cmake +set(dims ${ITK_WRAP_IMAGE_DIMS}) +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + math(EXPR d2 "${d} * 2") + # for itk::SymmetricSecondRankTensor + math(EXPR d3 "${d} * (${d} + 1) / 2") + list( + APPEND + dims + ${d2} + ${d3}) +endforeach() +unique(array_sizes "${dims};1;3;4;6") +# make sure that 1-D FixedArrays are wrapped. Also wrap for each selected +# image dimension. +# 3-D FixedArrays are required as superclass of rgb pixels +# TODO: Do we need fixed arrays for all of these types? For just the selected +# pixel types plus some few basic cases? Or just for a basic set of types? +foreach(d ${array_sizes}) + add_template("${ITKM_FAD${d}}" "${ITKT_FAD${d}}") + add_template("${ITKM_FAF${d}}" "${ITKT_FAF${d}}") + add_template("${ITKM_FAUL${d}}" "${ITKT_FAUL${d}}") + add_template("${ITKM_FAUS${d}}" "${ITKT_FAUS${d}}") + add_template("${ITKM_FAUC${d}}" "${ITKT_FAUC${d}}") + add_template("${ITKM_FAUI${d}}" "${ITKT_FAUI${d}}") + add_template("${ITKM_FASL${d}}" "${ITKT_FASL${d}}") + add_template("${ITKM_FASS${d}}" "${ITKT_FASS${d}}") + add_template("${ITKM_FASC${d}}" "${ITKT_FASC${d}}") + # this one is not defined in itkNumerictTraitsFixedArrayPixel.h + # ADD_TEMPLATE("${ITKM_FAB${d}}" "${ITKT_FAB${d}}") +endforeach() - # variable length vector, as in WrapITKTypes.cmake - UNIQUE(wrap_image_types "${WRAP_ITK_SCALAR};UC") - foreach(type ${wrap_image_types}) - ADD_TEMPLATE("${ITKM_VLV${type}}" "${ITKT_VLV${type}}") - endforeach() +# variable length vector, as in WrapITKTypes.cmake +unique(wrap_image_types "${WRAP_ITK_SCALAR};UC") +foreach(type ${wrap_image_types}) + add_template("${ITKM_VLV${type}}" "${ITKT_VLV${type}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkOffset.wrap b/Modules/Core/Common/wrapping/itkOffset.wrap index df1ce627763..45943e96764 100644 --- a/Modules/Core/Common/wrapping/itkOffset.wrap +++ b/Modules/Core/Common/wrapping/itkOffset.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::Offset") - set(WRAPPER_TEMPLATES ${itk_Wrap_Offset}) +set(WRAPPER_TEMPLATES ${itk_Wrap_Offset}) itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkOptimizerParameters.wrap b/Modules/Core/Common/wrapping/itkOptimizerParameters.wrap index 0f3c6271765..30c9c13e06c 100644 --- a/Modules/Core/Common/wrapping/itkOptimizerParameters.wrap +++ b/Modules/Core/Common/wrapping/itkOptimizerParameters.wrap @@ -1,12 +1,12 @@ -UNIQUE(types "D;${WRAP_ITK_REAL}") +unique(types "D;${WRAP_ITK_REAL}") itk_wrap_class("itk::OptimizerParametersHelper") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::OptimizerParameters") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkPhasedArray3DSpecialCoordinatesImage.wrap b/Modules/Core/Common/wrapping/itkPhasedArray3DSpecialCoordinatesImage.wrap index 981ff044e24..c83302eff6e 100644 --- a/Modules/Core/Common/wrapping/itkPhasedArray3DSpecialCoordinatesImage.wrap +++ b/Modules/Core/Common/wrapping/itkPhasedArray3DSpecialCoordinatesImage.wrap @@ -6,7 +6,10 @@ itk_wrap_include("complex") # CMake for input to SWIG wrapping generation. # See `DECL_PYTHON_IMAGEBASE_CLASS` definition in `ITK/Wrapping/Generators/Python/PyBase/pyBase.i` # for precedent. -string(APPEND ITK_WRAP_PYTHON_SWIG_EXT " +string( + APPEND + ITK_WRAP_PYTHON_SWIG_EXT + " %inline %{ #include \"itkContinuousIndexSwigInterface.h\" %} @@ -36,14 +39,16 @@ string(APPEND ITK_WRAP_PYTHON_SWIG_EXT " # Wrap class for real and complex pixel types. Dimension is always 3. itk_wrap_class("itk::PhasedArray3DSpecialCoordinatesImage" POINTER_WITH_SUPERCLASS) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYTHON_PHASEDARRAY3DSPECIALCOORDINATESIMAGE_CLASS(${WRAPPER_SWIG_NAME}${ITKM_${t}}, 3)\n") - endforeach() - foreach(t3 ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_${t3}}" "${ITKT_${t3}}") - string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYTHON_PHASEDARRAY3DSPECIALCOORDINATESIMAGE_CLASS(${WRAPPER_SWIG_NAME}${ITKM_${t3}}, 3)\n") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") + string(APPEND ITK_WRAP_PYTHON_SWIG_EXT + "DECL_PYTHON_PHASEDARRAY3DSPECIALCOORDINATESIMAGE_CLASS(${WRAPPER_SWIG_NAME}${ITKM_${t}}, 3)\n") +endforeach() +foreach(t3 ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_${t3}}" "${ITKT_${t3}}") + string(APPEND ITK_WRAP_PYTHON_SWIG_EXT + "DECL_PYTHON_PHASEDARRAY3DSPECIALCOORDINATESIMAGE_CLASS(${WRAPPER_SWIG_NAME}${ITKM_${t3}}, 3)\n") +endforeach() itk_end_wrap_class() # Then wrap consuming filters in itkPhasedArray3DSpecialCoordinatesImageFilters.wrap diff --git a/Modules/Core/Common/wrapping/itkPoint.wrap b/Modules/Core/Common/wrapping/itkPoint.wrap index 68bba83c8ec..a54b23f85f4 100644 --- a/Modules/Core/Common/wrapping/itkPoint.wrap +++ b/Modules/Core/Common/wrapping/itkPoint.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::Point") - set(WRAPPER_TEMPLATES "${itk_Wrap_Point}") +set(WRAPPER_TEMPLATES "${itk_Wrap_Point}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkPointSet.wrap b/Modules/Core/Common/wrapping/itkPointSet.wrap index 2f5a5626c63..c357f04cc77 100644 --- a/Modules/Core/Common/wrapping/itkPointSet.wrap +++ b/Modules/Core/Common/wrapping/itkPointSet.wrap @@ -3,26 +3,28 @@ itk_wrap_include("itkDefaultDynamicMeshTraits.h") itk_wrap_filter_dims(has_d_3 3) itk_wrap_class("itk::PointSet" POINTER) - UNIQUE(types "${WRAP_ITK_SCALAR};D") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}},${d}") - endforeach() - endforeach() - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - # Also wrap the point set type needed for the kernel transforms, - # which may be a bug in ITK but they're needed currently. - itk_wrap_template("${ITKM_PD${d}}${d}ST${ITKM_D}${d}${d}${ITKM_D}${ITKM_D}" - "${ITKT_PD${d}},${d},itk::DefaultStaticMeshTraits< ${ITKT_D},${d},${d},${ITKT_D},${ITKT_D},${ITKT_D} >") - itk_wrap_template("${ITKM_UI}${d}DSM${ITKM_UI}${d}${d}${ITKM_F}${ITKM_F}${ITKM_UI}" - "${ITKT_UI},${d},itk::DefaultStaticMeshTraits<${ITKT_UI},${d},${d},${ITKT_F},${ITKT_F},${ITKT_UI} >") - endforeach() - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("M${ITKM_D}${d}${d}" "itk::Matrix <${ITKT_D},${d},${d}>,${d}") - itk_wrap_template("A${ITKM_D}${d}" "itk::Array <${ITKT_D}>,${d}") +unique(types "${WRAP_ITK_SCALAR};D") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}},${d}") endforeach() +endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + # Also wrap the point set type needed for the kernel transforms, + # which may be a bug in ITK but they're needed currently. + itk_wrap_template( + "${ITKM_PD${d}}${d}ST${ITKM_D}${d}${d}${ITKM_D}${ITKM_D}" + "${ITKT_PD${d}},${d},itk::DefaultStaticMeshTraits< ${ITKT_D},${d},${d},${ITKT_D},${ITKT_D},${ITKT_D} >") + itk_wrap_template( + "${ITKM_UI}${d}DSM${ITKM_UI}${d}${d}${ITKM_F}${ITKM_F}${ITKM_UI}" + "${ITKT_UI},${d},itk::DefaultStaticMeshTraits<${ITKT_UI},${d},${d},${ITKT_F},${ITKT_F},${ITKT_UI} >") +endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("M${ITKM_D}${d}${d}" "itk::Matrix <${ITKT_D},${d},${d}>,${d}") + itk_wrap_template("A${ITKM_D}${d}" "itk::Array <${ITKT_D}>,${d}") +endforeach() - if(has_d_3) - itk_wrap_template("VF33" "itk::Vector< float, 3 >, 3") - endif() +if(has_d_3) + itk_wrap_template("VF33" "itk::Vector< float, 3 >, 3") +endif() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkPointSetToImageFilter.wrap b/Modules/Core/Common/wrapping/itkPointSetToImageFilter.wrap index 70839719cd5..a90e5a19dc7 100644 --- a/Modules/Core/Common/wrapping/itkPointSetToImageFilter.wrap +++ b/Modules/Core/Common/wrapping/itkPointSetToImageFilter.wrap @@ -2,13 +2,12 @@ itk_wrap_include("itkPointSet.h") itk_wrap_include("itkDefaultStaticMeshTraits.h") itk_wrap_class("itk::PointSetToImageFilter" POINTER) - UNIQUE(mesh_types "${WRAP_ITK_SCALAR};D") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - foreach(t2 ${mesh_types}) - itk_wrap_template("PS${ITKM_${t2}}${d}${ITKM_I${t}${d}}" - "itk::PointSet< ${ITKT_${t2}},${d} >, ${ITKT_I${t}${d}}") - endforeach() - endforeach() +unique(mesh_types "${WRAP_ITK_SCALAR};D") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + foreach(t2 ${mesh_types}) + itk_wrap_template("PS${ITKM_${t2}}${d}${ITKM_I${t}${d}}" "itk::PointSet< ${ITKT_${t2}},${d} >, ${ITKT_I${t}${d}}") endforeach() + endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkRGBAPixel.wrap b/Modules/Core/Common/wrapping/itkRGBAPixel.wrap index 3de273a158f..f6fea82c310 100644 --- a/Modules/Core/Common/wrapping/itkRGBAPixel.wrap +++ b/Modules/Core/Common/wrapping/itkRGBAPixel.wrap @@ -1,3 +1,3 @@ -itk_wrap_class("itk::RGBAPixel" ) - set(WRAPPER_TEMPLATES "${itk_Wrap_RGBAPixel}") +itk_wrap_class("itk::RGBAPixel") +set(WRAPPER_TEMPLATES "${itk_Wrap_RGBAPixel}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkRGBPixel.wrap b/Modules/Core/Common/wrapping/itkRGBPixel.wrap index 4c8940098d2..746554fa439 100644 --- a/Modules/Core/Common/wrapping/itkRGBPixel.wrap +++ b/Modules/Core/Common/wrapping/itkRGBPixel.wrap @@ -1,3 +1,3 @@ -itk_wrap_class("itk::RGBPixel" ) - set(WRAPPER_TEMPLATES "${itk_Wrap_RGBPixel}") +itk_wrap_class("itk::RGBPixel") +set(WRAPPER_TEMPLATES "${itk_Wrap_RGBPixel}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkSimpleDataObjectDecorator.wrap b/Modules/Core/Common/wrapping/itkSimpleDataObjectDecorator.wrap index d8a09a21100..e2577de41d3 100644 --- a/Modules/Core/Common/wrapping/itkSimpleDataObjectDecorator.wrap +++ b/Modules/Core/Common/wrapping/itkSimpleDataObjectDecorator.wrap @@ -1,28 +1,28 @@ itk_wrap_class("itk::SimpleDataObjectDecorator" POINTER) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") - itk_wrap_template("${ITKM_F}" "${ITKT_F}") - itk_wrap_template("${ITKM_UL}" "${ITKT_UL}") - itk_wrap_template("${ITKM_ULL}" "${ITKT_ULL}") - itk_wrap_template("${ITKM_US}" "${ITKT_US}") - itk_wrap_template("${ITKM_UC}" "${ITKT_UC}") - itk_wrap_template("${ITKM_SL}" "${ITKT_SL}") - itk_wrap_template("${ITKM_SLL}" "${ITKT_SLL}") - itk_wrap_template("${ITKM_SS}" "${ITKT_SS}") - itk_wrap_template("${ITKM_SC}" "${ITKT_SC}") - itk_wrap_template("${ITKM_B}" "${ITKT_B}") - itk_wrap_template("${ITKM_AD}" "${ITKT_AD}") - itk_wrap_template("${ITKM_AF}" "${ITKT_AF}") - # For ImageToHistogramFilter - itk_wrap_template("${ITKM_AULL}" "${ITKT_AULL}") - itk_wrap_template("${ITKM_AUL}" "${ITKT_AUL}") - # non scalar types - foreach(t ${WRAP_ITK_VECTOR}) - foreach(d ${ITK_WRAP_VECTOR_COMPONENTS}) - itk_wrap_template("${ITKM_${t}${d}}" "${ITKT_${t}${d}}") - endforeach() +itk_wrap_template("${ITKM_D}" "${ITKT_D}") +itk_wrap_template("${ITKM_F}" "${ITKT_F}") +itk_wrap_template("${ITKM_UL}" "${ITKT_UL}") +itk_wrap_template("${ITKM_ULL}" "${ITKT_ULL}") +itk_wrap_template("${ITKM_US}" "${ITKT_US}") +itk_wrap_template("${ITKM_UC}" "${ITKT_UC}") +itk_wrap_template("${ITKM_SL}" "${ITKT_SL}") +itk_wrap_template("${ITKM_SLL}" "${ITKT_SLL}") +itk_wrap_template("${ITKM_SS}" "${ITKT_SS}") +itk_wrap_template("${ITKM_SC}" "${ITKT_SC}") +itk_wrap_template("${ITKM_B}" "${ITKT_B}") +itk_wrap_template("${ITKM_AD}" "${ITKT_AD}") +itk_wrap_template("${ITKM_AF}" "${ITKT_AF}") +# For ImageToHistogramFilter +itk_wrap_template("${ITKM_AULL}" "${ITKT_AULL}") +itk_wrap_template("${ITKM_AUL}" "${ITKT_AUL}") +# non scalar types +foreach(t ${WRAP_ITK_VECTOR}) + foreach(d ${ITK_WRAP_VECTOR_COMPONENTS}) + itk_wrap_template("${ITKM_${t}${d}}" "${ITKT_${t}${d}}") endforeach() - foreach(t ${WRAP_ITK_COLOR} ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() - itk_wrap_template("string" "std::string") +endforeach() +foreach(t ${WRAP_ITK_COLOR} ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() +itk_wrap_template("string" "std::string") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkSize.wrap b/Modules/Core/Common/wrapping/itkSize.wrap index f1fbdadcf87..3193f7f0433 100644 --- a/Modules/Core/Common/wrapping/itkSize.wrap +++ b/Modules/Core/Common/wrapping/itkSize.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::Size") - UNIQUE(dims "${ITK_WRAP_IMAGE_DIMS_INCREMENTED};1;2") - foreach(d ${dims}) - itk_wrap_template(${d} ${d}) - endforeach() +unique(dims "${ITK_WRAP_IMAGE_DIMS_INCREMENTED};1;2") +foreach(d ${dims}) + itk_wrap_template(${d} ${d}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkSobelOperator.wrap b/Modules/Core/Common/wrapping/itkSobelOperator.wrap index 9f943e7e510..5b3cee60aae 100644 --- a/Modules/Core/Common/wrapping/itkSobelOperator.wrap +++ b/Modules/Core/Common/wrapping/itkSobelOperator.wrap @@ -1,9 +1,9 @@ set(types "${WRAP_ITK_REAL}") itk_wrap_class("itk::SobelOperator") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkSpatialFunction.wrap b/Modules/Core/Common/wrapping/itkSpatialFunction.wrap index 2ffd4446c06..0adb41572ec 100644 --- a/Modules/Core/Common/wrapping/itkSpatialFunction.wrap +++ b/Modules/Core/Common/wrapping/itkSpatialFunction.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::SpatialFunction") -UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}${ITKM_PD${d}}" "${ITKT_${t}},${d},${ITKT_PD${d}}") - endforeach() +unique(types "D;${WRAP_ITK_REAL}") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}${ITKM_PD${d}}" "${ITKT_${t}},${d},${ITKT_PD${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkSpecialCoordinatesImage.wrap b/Modules/Core/Common/wrapping/itkSpecialCoordinatesImage.wrap index 962e4697d1c..2facc72e7ae 100644 --- a/Modules/Core/Common/wrapping/itkSpecialCoordinatesImage.wrap +++ b/Modules/Core/Common/wrapping/itkSpecialCoordinatesImage.wrap @@ -2,12 +2,12 @@ itk_wrap_include("complex") # Wrap underlying class hierarchy itk_wrap_class("itk::SpecialCoordinatesImage" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") - endforeach() - foreach(t3 ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_${t3}}${d}" "${ITKT_${t3}}, ${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") endforeach() + foreach(t3 ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_${t3}}${d}" "${ITKT_${t3}}, ${d}") + endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkStreamingImageFilter.wrap b/Modules/Core/Common/wrapping/itkStreamingImageFilter.wrap index 27a896553b3..183faab6ef9 100644 --- a/Modules/Core/Common/wrapping/itkStreamingImageFilter.wrap +++ b/Modules/Core/Common/wrapping/itkStreamingImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::StreamingImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR};${WRAP_ITK_VECTOR_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR};${WRAP_ITK_VECTOR_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkSymmetricSecondRankTensor.wrap b/Modules/Core/Common/wrapping/itkSymmetricSecondRankTensor.wrap index 91394e010b7..3934235ba98 100644 --- a/Modules/Core/Common/wrapping/itkSymmetricSecondRankTensor.wrap +++ b/Modules/Core/Common/wrapping/itkSymmetricSecondRankTensor.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::SymmetricSecondRankTensor") - set(WRAPPER_TEMPLATES "${itk_Wrap_SymmetricSecondRankTensor}") +set(WRAPPER_TEMPLATES "${itk_Wrap_SymmetricSecondRankTensor}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkTriangleHelper.wrap b/Modules/Core/Common/wrapping/itkTriangleHelper.wrap index ad67d26957e..b865fb4cdad 100644 --- a/Modules/Core/Common/wrapping/itkTriangleHelper.wrap +++ b/Modules/Core/Common/wrapping/itkTriangleHelper.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::TriangleHelper") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - ADD_TEMPLATE("${ITKM_PF${d}}" "${ITKT_PF${d}}") - ADD_TEMPLATE("${ITKM_PD${d}}" "${ITKT_PD${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + add_template("${ITKM_PF${d}}" "${ITKT_PF${d}}") + add_template("${ITKM_PD${d}}" "${ITKT_PD${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkVariableLengthVector.wrap b/Modules/Core/Common/wrapping/itkVariableLengthVector.wrap index 62cffac14fc..b467c43d146 100644 --- a/Modules/Core/Common/wrapping/itkVariableLengthVector.wrap +++ b/Modules/Core/Common/wrapping/itkVariableLengthVector.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::VariableLengthVector") - set(WRAPPER_TEMPLATES "${itk_Wrap_VariableLengthVector}") +set(WRAPPER_TEMPLATES "${itk_Wrap_VariableLengthVector}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkVariableSizeMatrix.wrap b/Modules/Core/Common/wrapping/itkVariableSizeMatrix.wrap index 56e87cac4d4..4a58483c89f 100644 --- a/Modules/Core/Common/wrapping/itkVariableSizeMatrix.wrap +++ b/Modules/Core/Common/wrapping/itkVariableSizeMatrix.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::VariableSizeMatrix") - itk_wrap_template("D" "double") +itk_wrap_template("D" "double") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkVector.wrap b/Modules/Core/Common/wrapping/itkVector.wrap index 2c3c5b1ab42..3ca76cc1318 100644 --- a/Modules/Core/Common/wrapping/itkVector.wrap +++ b/Modules/Core/Common/wrapping/itkVector.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::Vector") - set(WRAPPER_TEMPLATES "${itk_Wrap_Vector}") +set(WRAPPER_TEMPLATES "${itk_Wrap_Vector}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkVectorContainer.wrap b/Modules/Core/Common/wrapping/itkVectorContainer.wrap index 67e20497c6a..7f621a539ab 100644 --- a/Modules/Core/Common/wrapping/itkVectorContainer.wrap +++ b/Modules/Core/Common/wrapping/itkVectorContainer.wrap @@ -1,43 +1,46 @@ itk_wrap_include("set") itk_wrap_class("itk::VectorContainer" POINTER) - # double is always needed by KernelTransform - UNIQUE(scalar_types "${WRAP_ITK_SCALAR};D") - foreach(t ${scalar_types}) - # These are wrapped below with "vectypes" - if(NOT t IN_LIST WRAP_ITK_USIGN_INT) - itk_wrap_template("${ITKM_IT}${ITKM_${t}}" "${ITKT_IT},${ITKT_${t}}") - itk_wrap_template("${ITKM_UC}${ITKM_${t}}" "${ITKT_UC},${ITKT_${t}}") - endif() - endforeach() - UNIQUE(real_types "${WRAP_ITK_REAL};D") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${real_types}) - itk_wrap_template("${ITKM_IT}${ITKM_V${t}${d}}" "${ITKT_IT},${ITKT_V${t}${d}}") - itk_wrap_template("${ITKM_IT}${ITKM_P${t}${d}}" "${ITKT_IT},${ITKT_P${t}${d}}") - itk_wrap_template("${ITKM_IT}M${ITKM_${t}}${d}${d}" "${ITKT_IT}, itk::Matrix< ${ITKT_${t}}, ${d}, ${d} >") - endforeach() - endforeach() - UNIQUE(real_types "${WRAP_ITK_REAL};D") +# double is always needed by KernelTransform +unique(scalar_types "${WRAP_ITK_SCALAR};D") +foreach(t ${scalar_types}) + # These are wrapped below with "vectypes" + if(NOT + t + IN_LIST + WRAP_ITK_USIGN_INT) + itk_wrap_template("${ITKM_IT}${ITKM_${t}}" "${ITKT_IT},${ITKT_${t}}") + itk_wrap_template("${ITKM_UC}${ITKM_${t}}" "${ITKT_UC},${ITKT_${t}}") + endif() +endforeach() +unique(real_types "${WRAP_ITK_REAL};D") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) foreach(t ${real_types}) - itk_wrap_template("${ITKM_IT}A${ITKM_${t}}" "${ITKT_IT}, itk::Array< ${ITKT_${t}} >") - endforeach() - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_UC}${ITKM_O${d}}" "${ITKT_UC},${ITKT_O${d}}") - itk_wrap_template("${ITKM_UI}${ITKM_CID${d}}" "${ITKT_UI},${ITKT_CID${d}}") + itk_wrap_template("${ITKM_IT}${ITKM_V${t}${d}}" "${ITKT_IT},${ITKT_V${t}${d}}") + itk_wrap_template("${ITKM_IT}${ITKM_P${t}${d}}" "${ITKT_IT},${ITKT_P${t}${d}}") + itk_wrap_template("${ITKM_IT}M${ITKM_${t}}${d}${d}" "${ITKT_IT}, itk::Matrix< ${ITKT_${t}}, ${d}, ${d} >") endforeach() - # used in FastMarchingExtensionImageFilter - itk_wrap_template("${ITKM_UI}${ITKM_VUC1}" "${ITKT_UI},${ITKT_VUC1}") - itk_wrap_template("${ITKM_IT}S${ITKM_IT}" "${ITKT_IT}, std::set< ${ITKT_IT} >") - #used in ImageRegistrationMethodv4 - UNIQUE(vectypes "${ITKM_IT};UI;${WRAP_ITK_USIGN_INT}") - foreach(t1 ${vectypes}) - foreach(t2 ${vectypes}) - itk_wrap_template("${ITKM_${t1}}${ITKM_${t2}}" "${ITKT_${t1}}, ${ITKT_${t2}}") - endforeach() +endforeach() +unique(real_types "${WRAP_ITK_REAL};D") +foreach(t ${real_types}) + itk_wrap_template("${ITKM_IT}A${ITKM_${t}}" "${ITKT_IT}, itk::Array< ${ITKT_${t}} >") +endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_UC}${ITKM_O${d}}" "${ITKT_UC},${ITKT_O${d}}") + itk_wrap_template("${ITKM_UI}${ITKM_CID${d}}" "${ITKT_UI},${ITKT_CID${d}}") +endforeach() +# used in FastMarchingExtensionImageFilter +itk_wrap_template("${ITKM_UI}${ITKM_VUC1}" "${ITKT_UI},${ITKT_VUC1}") +itk_wrap_template("${ITKM_IT}S${ITKM_IT}" "${ITKT_IT}, std::set< ${ITKT_IT} >") +#used in ImageRegistrationMethodv4 +unique(vectypes "${ITKM_IT};UI;${WRAP_ITK_USIGN_INT}") +foreach(t1 ${vectypes}) + foreach(t2 ${vectypes}) + itk_wrap_template("${ITKM_${t1}}${ITKM_${t2}}" "${ITKT_${t1}}, ${ITKT_${t2}}") endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::DataObjectDecorator" POINTER) - itk_wrap_template("VC${ITKM_UC}${ITKM_D}" "itk::VectorContainer< ${ITKT_UC}, ${ITKT_D} >") +itk_wrap_template("VC${ITKM_UC}${ITKM_D}" "itk::VectorContainer< ${ITKT_UC}, ${ITKT_D} >") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkVectorImage.wrap b/Modules/Core/Common/wrapping/itkVectorImage.wrap index eb54cf2dde0..b55716feef7 100644 --- a/Modules/Core/Common/wrapping/itkVectorImage.wrap +++ b/Modules/Core/Common/wrapping/itkVectorImage.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::VectorImage" POINTER) - set(WRAPPER_TEMPLATES "${itk_Wrap_VectorImage}") +set(WRAPPER_TEMPLATES "${itk_Wrap_VectorImage}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/itkVersor.wrap b/Modules/Core/Common/wrapping/itkVersor.wrap index 9e3d6397e3a..1a4b86b065f 100644 --- a/Modules/Core/Common/wrapping/itkVersor.wrap +++ b/Modules/Core/Common/wrapping/itkVersor.wrap @@ -1,6 +1,6 @@ itk_wrap_filter_dims(d3 3) if(d3) itk_wrap_class("itk::Versor") - itk_wrap_template(${ITKM_D} ${ITKT_D}) + itk_wrap_template(${ITKM_D} ${ITKT_D}) itk_end_wrap_class() endif() diff --git a/Modules/Core/Common/wrapping/stdcomplex.wrap b/Modules/Core/Common/wrapping/stdcomplex.wrap index 7bcde8486b9..eb73cd31640 100644 --- a/Modules/Core/Common/wrapping/stdcomplex.wrap +++ b/Modules/Core/Common/wrapping/stdcomplex.wrap @@ -1,5 +1,5 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("complex") -itk_wrap_class("std::complex" ) - set(WRAPPER_TEMPLATES "${itk_Wrap_std_complex}") +itk_wrap_class("std::complex") +set(WRAPPER_TEMPLATES "${itk_Wrap_std_complex}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/test/CMakeLists.txt b/Modules/Core/Common/wrapping/test/CMakeLists.txt index 8cad2ae642b..650a83664b6 100644 --- a/Modules/Core/Common/wrapping/test/CMakeLists.txt +++ b/Modules/Core/Common/wrapping/test/CMakeLists.txt @@ -2,14 +2,54 @@ # try to compile it the compile fails. # itk_add_test(NAME itkVectorMultiplyTest COMMAND ITKCommon2TestDriver itkVectorMultiplyTest) if(ITK_WRAP_PYTHON) - itk_python_add_test(NAME itkMetaDataDictionaryPythonTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkMetaDataDictionaryTest.py) - itk_python_add_test(NAME itkDirectoryPythonTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkDirectoryTest.py) - itk_python_expression_add_test(NAME itkObjectPythonTest EXPRESSION "itkObject = itk.Object.New()") - itk_python_add_test(NAME itkIndexOffsetPythonTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkIndexOffsetTest.py) - itk_python_add_test(NAME itkImageDuplicatorPythonTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkImageDuplicatorTest.py) - itk_python_add_test(NAME itkImagePythonTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkImageTest.py) - itk_python_add_test(NAME itkMatrixPythonTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkMatrixTest.py) - itk_python_add_test(NAME itkVariableLengthVectorPythonTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkVariableLengthVectorTest.py) - itk_python_add_test(NAME itkPointSetSerializationTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkPointSetSerializationTest.py) - itk_python_add_test(NAME itkSpatialOrientationAdapterTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkSpatialOrientationAdapterTest.py) + itk_python_add_test( + NAME + itkMetaDataDictionaryPythonTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkMetaDataDictionaryTest.py) + itk_python_add_test( + NAME + itkDirectoryPythonTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkDirectoryTest.py) + itk_python_expression_add_test( + NAME + itkObjectPythonTest + EXPRESSION + "itkObject = itk.Object.New()") + itk_python_add_test( + NAME + itkIndexOffsetPythonTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkIndexOffsetTest.py) + itk_python_add_test( + NAME + itkImageDuplicatorPythonTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkImageDuplicatorTest.py) + itk_python_add_test( + NAME + itkImagePythonTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkImageTest.py) + itk_python_add_test( + NAME + itkMatrixPythonTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkMatrixTest.py) + itk_python_add_test( + NAME + itkVariableLengthVectorPythonTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkVariableLengthVectorTest.py) + itk_python_add_test( + NAME + itkPointSetSerializationTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkPointSetSerializationTest.py) + itk_python_add_test( + NAME + itkSpatialOrientationAdapterTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkSpatialOrientationAdapterTest.py) endif() diff --git a/Modules/Core/Common/wrapping/vnl_c_vector.wrap b/Modules/Core/Common/wrapping/vnl_c_vector.wrap index 47d104b071e..47de4b729aa 100644 --- a/Modules/Core/Common/wrapping/vnl_c_vector.wrap +++ b/Modules/Core/Common/wrapping/vnl_c_vector.wrap @@ -5,18 +5,18 @@ itk_wrap_include("complex") itk_wrap_include("vnl/vnl_c_vector.h") itk_wrap_class("vnl_c_vector" EXPLICIT_SPECIALIZATION) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") - itk_wrap_template("${ITKM_F}" "${ITKT_F}") - itk_wrap_template("${ITKM_SI}" "${ITKT_SI}") - itk_wrap_template("${ITKM_SL}" "${ITKT_SL}") - itk_wrap_template("${ITKM_SLL}" "${ITKT_SLL}") - itk_wrap_template("${ITKM_LD}" "${ITKT_LD}") - itk_wrap_template("${ITKM_SC}" "${ITKT_SC}") - itk_wrap_template("${ITKM_UC}" "un${ITKT_SC}") - itk_wrap_template("${ITKM_UI}" "un${ITKT_SI}") - itk_wrap_template("${ITKM_UL}" "un${ITKT_SL}") - itk_wrap_template("${ITKM_ULL}" "un${ITKT_SLL}") - foreach(t ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +itk_wrap_template("${ITKM_D}" "${ITKT_D}") +itk_wrap_template("${ITKM_F}" "${ITKT_F}") +itk_wrap_template("${ITKM_SI}" "${ITKT_SI}") +itk_wrap_template("${ITKM_SL}" "${ITKT_SL}") +itk_wrap_template("${ITKM_SLL}" "${ITKT_SLL}") +itk_wrap_template("${ITKM_LD}" "${ITKT_LD}") +itk_wrap_template("${ITKM_SC}" "${ITKT_SC}") +itk_wrap_template("${ITKM_UC}" "un${ITKT_SC}") +itk_wrap_template("${ITKM_UI}" "un${ITKT_SI}") +itk_wrap_template("${ITKM_UL}" "un${ITKT_SL}") +itk_wrap_template("${ITKM_ULL}" "un${ITKT_SLL}") +foreach(t ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/vnl_diag_matrix.wrap b/Modules/Core/Common/wrapping/vnl_diag_matrix.wrap index 0c7b82a1770..80e87869809 100644 --- a/Modules/Core/Common/wrapping/vnl_diag_matrix.wrap +++ b/Modules/Core/Common/wrapping/vnl_diag_matrix.wrap @@ -5,11 +5,11 @@ itk_wrap_include("complex") itk_wrap_include("vnl/vnl_diag_matrix.h") itk_wrap_class("vnl_diag_matrix" EXPLICIT_SPECIALIZATION) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") - itk_wrap_template("${ITKM_F}" "${ITKT_F}") - itk_wrap_template("${ITKM_SI}" "${ITKT_SI}") - itk_wrap_template("${ITKM_LD}" "${ITKT_LD}") - foreach(t ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +itk_wrap_template("${ITKM_D}" "${ITKT_D}") +itk_wrap_template("${ITKM_F}" "${ITKT_F}") +itk_wrap_template("${ITKM_SI}" "${ITKT_SI}") +itk_wrap_template("${ITKM_LD}" "${ITKT_LD}") +foreach(t ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/vnl_file_matrix.wrap b/Modules/Core/Common/wrapping/vnl_file_matrix.wrap index 8f823437b68..c8808c17e0d 100644 --- a/Modules/Core/Common/wrapping/vnl_file_matrix.wrap +++ b/Modules/Core/Common/wrapping/vnl_file_matrix.wrap @@ -4,6 +4,6 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("vnl/vnl_file_matrix.h") itk_wrap_class("vnl_file_matrix" EXPLICIT_SPECIALIZATION) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") - itk_wrap_template("${ITKM_F}" "${ITKT_F}") +itk_wrap_template("${ITKM_D}" "${ITKT_D}") +itk_wrap_template("${ITKM_F}" "${ITKT_F}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/vnl_file_vector.wrap b/Modules/Core/Common/wrapping/vnl_file_vector.wrap index 67dfcd8497b..6b967a499ab 100644 --- a/Modules/Core/Common/wrapping/vnl_file_vector.wrap +++ b/Modules/Core/Common/wrapping/vnl_file_vector.wrap @@ -4,5 +4,5 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("vnl/vnl_file_vector.h") itk_wrap_class("vnl_file_vector" EXPLICIT_SPECIALIZATION) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") +itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/vnl_fortran_copy.wrap b/Modules/Core/Common/wrapping/vnl_fortran_copy.wrap index 6ecde03eceb..33193bb6303 100644 --- a/Modules/Core/Common/wrapping/vnl_fortran_copy.wrap +++ b/Modules/Core/Common/wrapping/vnl_fortran_copy.wrap @@ -4,9 +4,9 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("vnl/vnl_fortran_copy.h") itk_wrap_class("vnl_fortran_copy" EXPLICIT_SPECIALIZATION) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") - itk_wrap_template("${ITKM_F}" "${ITKT_F}") - foreach(t ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +itk_wrap_template("${ITKM_D}" "${ITKT_D}") +itk_wrap_template("${ITKM_F}" "${ITKT_F}") +foreach(t ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/vnl_matrix.wrap b/Modules/Core/Common/wrapping/vnl_matrix.wrap index 6ca982d3ae3..17db585b221 100644 --- a/Modules/Core/Common/wrapping/vnl_matrix.wrap +++ b/Modules/Core/Common/wrapping/vnl_matrix.wrap @@ -6,20 +6,20 @@ itk_wrap_include("vnl/vnl_vector.h") itk_wrap_include("vnl/vnl_matrix.h") itk_wrap_class("vnl_matrix" EXPLICIT_SPECIALIZATION) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") - itk_wrap_template("${ITKM_F}" "${ITKT_F}") - itk_wrap_template("${ITKM_SI}" "${ITKT_SI}") - itk_wrap_template("${ITKM_SL}" "${ITKT_SL}") - itk_wrap_template("${ITKM_SLL}" "${ITKT_SLL}") - itk_wrap_template("${ITKM_LD}" "${ITKT_LD}") - itk_wrap_template("${ITKM_SC}" "${ITKT_SC}") - itk_wrap_template("${ITKM_UC}" "un${ITKT_SC}") - itk_wrap_template("${ITKM_UI}" "un${ITKT_SI}") - itk_wrap_template("${ITKM_UL}" "un${ITKT_SL}") - itk_wrap_template("${ITKM_ULL}" "un${ITKT_SLL}") - itk_wrap_template("${ITKM_SS}" "${ITKT_SS}") - itk_wrap_template("${ITKM_US}" "${ITKT_US}") - foreach(t ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +itk_wrap_template("${ITKM_D}" "${ITKT_D}") +itk_wrap_template("${ITKM_F}" "${ITKT_F}") +itk_wrap_template("${ITKM_SI}" "${ITKT_SI}") +itk_wrap_template("${ITKM_SL}" "${ITKT_SL}") +itk_wrap_template("${ITKM_SLL}" "${ITKT_SLL}") +itk_wrap_template("${ITKM_LD}" "${ITKT_LD}") +itk_wrap_template("${ITKM_SC}" "${ITKT_SC}") +itk_wrap_template("${ITKM_UC}" "un${ITKT_SC}") +itk_wrap_template("${ITKM_UI}" "un${ITKT_SI}") +itk_wrap_template("${ITKM_UL}" "un${ITKT_SL}") +itk_wrap_template("${ITKM_ULL}" "un${ITKT_SLL}") +itk_wrap_template("${ITKM_SS}" "${ITKT_SS}") +itk_wrap_template("${ITKM_US}" "${ITKT_US}") +foreach(t ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/vnl_matrix_fixed.wrap b/Modules/Core/Common/wrapping/vnl_matrix_fixed.wrap index 850609906b8..7b302ff4751 100644 --- a/Modules/Core/Common/wrapping/vnl_matrix_fixed.wrap +++ b/Modules/Core/Common/wrapping/vnl_matrix_fixed.wrap @@ -4,20 +4,20 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("vnl/vnl_matrix_fixed.h") itk_wrap_class("vnl_matrix_fixed" EXPLICIT_SPECIALIZATION) - itk_wrap_template("${ITKM_D}_2_2" "${ITKT_D},2,2") - itk_wrap_template("${ITKM_D}_2_3" "${ITKT_D},2,3") - itk_wrap_template("${ITKM_D}_2_6" "${ITKT_D},2,6") - itk_wrap_template("${ITKM_D}_3_12" "${ITKT_D},3,12") - itk_wrap_template("${ITKM_D}_3_3" "${ITKT_D},3,3") - itk_wrap_template("${ITKM_D}_3_4" "${ITKT_D},3,4") - itk_wrap_template("${ITKM_D}_4_3" "${ITKT_D},4,3") - itk_wrap_template("${ITKM_D}_4_4" "${ITKT_D},4,4") - itk_wrap_template("${ITKM_F}_2_2" "${ITKT_F},2,2") - itk_wrap_template("${ITKM_F}_2_3" "${ITKT_F},2,3") - itk_wrap_template("${ITKM_F}_2_6" "${ITKT_F},2,6") - itk_wrap_template("${ITKM_F}_3_12" "${ITKT_F},3,12") - itk_wrap_template("${ITKM_F}_3_3" "${ITKT_F},3,3") - itk_wrap_template("${ITKM_F}_3_4" "${ITKT_F},3,4") - itk_wrap_template("${ITKM_F}_4_3" "${ITKT_F},4,3") - itk_wrap_template("${ITKM_F}_4_4" "${ITKT_F},4,4") +itk_wrap_template("${ITKM_D}_2_2" "${ITKT_D},2,2") +itk_wrap_template("${ITKM_D}_2_3" "${ITKT_D},2,3") +itk_wrap_template("${ITKM_D}_2_6" "${ITKT_D},2,6") +itk_wrap_template("${ITKM_D}_3_12" "${ITKT_D},3,12") +itk_wrap_template("${ITKM_D}_3_3" "${ITKT_D},3,3") +itk_wrap_template("${ITKM_D}_3_4" "${ITKT_D},3,4") +itk_wrap_template("${ITKM_D}_4_3" "${ITKT_D},4,3") +itk_wrap_template("${ITKM_D}_4_4" "${ITKT_D},4,4") +itk_wrap_template("${ITKM_F}_2_2" "${ITKT_F},2,2") +itk_wrap_template("${ITKM_F}_2_3" "${ITKT_F},2,3") +itk_wrap_template("${ITKM_F}_2_6" "${ITKT_F},2,6") +itk_wrap_template("${ITKM_F}_3_12" "${ITKT_F},3,12") +itk_wrap_template("${ITKM_F}_3_3" "${ITKT_F},3,3") +itk_wrap_template("${ITKM_F}_3_4" "${ITKT_F},3,4") +itk_wrap_template("${ITKM_F}_4_3" "${ITKT_F},4,3") +itk_wrap_template("${ITKM_F}_4_4" "${ITKT_F},4,4") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/vnl_matrix_fixed_ref.wrap b/Modules/Core/Common/wrapping/vnl_matrix_fixed_ref.wrap index 2dae030e462..9b1b895758a 100644 --- a/Modules/Core/Common/wrapping/vnl_matrix_fixed_ref.wrap +++ b/Modules/Core/Common/wrapping/vnl_matrix_fixed_ref.wrap @@ -13,7 +13,7 @@ itk_wrap_class("vnl_matrix_fixed_ref_const" EXPLICIT_SPECIALIZATION) # itk_wrap_template("${ITKM_D}_3_4" "${ITKT_D},3,4") # itk_wrap_template("${ITKM_D}_4_3" "${ITKT_D},4,3") # itk_wrap_template("${ITKM_D}_4_4" "${ITKT_D},4,4") - itk_wrap_template("${ITKM_F}_3_3" "${ITKT_F},3,3") +itk_wrap_template("${ITKM_F}_3_3" "${ITKT_F},3,3") itk_end_wrap_class() itk_wrap_class("vnl_matrix_fixed_ref" EXPLICIT_SPECIALIZATION) @@ -25,5 +25,5 @@ itk_wrap_class("vnl_matrix_fixed_ref" EXPLICIT_SPECIALIZATION) # itk_wrap_template("${ITKM_D}_3_4" "${ITKT_D},3,4") # itk_wrap_template("${ITKM_D}_4_3" "${ITKT_D},4,3") # itk_wrap_template("${ITKM_D}_4_4" "${ITKT_D},4,4") - itk_wrap_template("${ITKM_F}_3_3" "${ITKT_F},3,3") +itk_wrap_template("${ITKM_F}_3_3" "${ITKT_F},3,3") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/vnl_matrix_ref.wrap b/Modules/Core/Common/wrapping/vnl_matrix_ref.wrap index 5fb641f171e..a9bcbacf8f4 100644 --- a/Modules/Core/Common/wrapping/vnl_matrix_ref.wrap +++ b/Modules/Core/Common/wrapping/vnl_matrix_ref.wrap @@ -4,6 +4,6 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("vnl/vnl_matrix_ref.h") itk_wrap_class("vnl_matrix_ref" EXPLICIT_SPECIALIZATION) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") - itk_wrap_template("${ITKM_F}" "${ITKT_F}") +itk_wrap_template("${ITKM_D}" "${ITKT_D}") +itk_wrap_template("${ITKM_F}" "${ITKT_F}") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/vnl_unary_function.wrap b/Modules/Core/Common/wrapping/vnl_unary_function.wrap index 2ebe5688ab9..3fc63bce2c6 100644 --- a/Modules/Core/Common/wrapping/vnl_unary_function.wrap +++ b/Modules/Core/Common/wrapping/vnl_unary_function.wrap @@ -5,5 +5,5 @@ itk_wrap_include("vnl/vnl_unary_function.h") itk_wrap_include("vnl/vnl_vector.h") itk_wrap_class("vnl_unary_function" EXPLICIT_SPECIALIZATION) - itk_wrap_template("${ITKM_D}_vnl_vector${ITKM_D}" "${ITKT_D}, vnl_vector< ${ITKT_D} >") +itk_wrap_template("${ITKM_D}_vnl_vector${ITKM_D}" "${ITKT_D}, vnl_vector< ${ITKT_D} >") itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/vnl_vector.wrap b/Modules/Core/Common/wrapping/vnl_vector.wrap index c38d2cc1ac0..7133794931a 100644 --- a/Modules/Core/Common/wrapping/vnl_vector.wrap +++ b/Modules/Core/Common/wrapping/vnl_vector.wrap @@ -6,12 +6,12 @@ itk_wrap_include("vnl/vnl_matrix.h") itk_wrap_include("vnl/vnl_vector.h") itk_wrap_class("vnl_vector" EXPLICIT_SPECIALIZATION) - UNIQUE(vector_types "D;F;SI;SL;SLL;LD;SC;UC;US;UI;UL;ULL;${ITKM_IT};${ITKM_OT};${WRAP_ITK_SCALAR}") - foreach(t ${vector_types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(vector_types "D;F;SI;SL;SLL;LD;SC;UC;US;UI;UL;ULL;${ITKM_IT};${ITKM_OT};${WRAP_ITK_SCALAR}") +foreach(t ${vector_types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() - foreach(t ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +foreach(t ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Common/wrapping/vnl_vector_ref.wrap b/Modules/Core/Common/wrapping/vnl_vector_ref.wrap index 540450ca84f..0ec9b24b6e2 100644 --- a/Modules/Core/Common/wrapping/vnl_vector_ref.wrap +++ b/Modules/Core/Common/wrapping/vnl_vector_ref.wrap @@ -4,12 +4,12 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("vnl/vnl_vector_ref.h") itk_wrap_class("vnl_vector_ref" EXPLICIT_SPECIALIZATION) - UNIQUE(vector_types "D;F;SI;SL;SLL;LD;SC;UC;US;UI;UL;ULL;${WRAP_ITK_SCALAR}") - foreach(t ${vector_types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(vector_types "D;F;SI;SL;SLL;LD;SC;UC;US;UI;UL;ULL;${WRAP_ITK_SCALAR}") +foreach(t ${vector_types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() - foreach(t ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +foreach(t ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/FiniteDifference/itk-module.cmake b/Modules/Core/FiniteDifference/itk-module.cmake index 6c0f0e9a0db..45ecf4745ff 100644 --- a/Modules/Core/FiniteDifference/itk-module.cmake +++ b/Modules/Core/FiniteDifference/itk-module.cmake @@ -1,13 +1,14 @@ -set(DOCUMENTATION "This module contains the base classes needed to implement +set(DOCUMENTATION + "This module contains the base classes needed to implement finite differences image filters. They include both sparse and dense finite differences. Most of the classes in this module are abstract and therefore are not intended to be instantiated by themselves.") -itk_module(ITKFiniteDifference +itk_module( + ITKFiniteDifference COMPILE_DEPENDS - ITKCommon + ITKCommon TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Core/FiniteDifference/wrapping/itkDenseFiniteDifferenceImageFilter.wrap b/Modules/Core/FiniteDifference/wrapping/itkDenseFiniteDifferenceImageFilter.wrap index a6b1cbd97be..a921b3fb7ba 100644 --- a/Modules/Core/FiniteDifference/wrapping/itkDenseFiniteDifferenceImageFilter.wrap +++ b/Modules/Core/FiniteDifference/wrapping/itkDenseFiniteDifferenceImageFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::DenseFiniteDifferenceImageFilter" POINTER) # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) - itk_wrap_image_filter("${WRAP_ITK_VECTOR_REAL}" 2) - itk_wrap_image_filter("${WRAP_ITK_COV_VECTOR_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_VECTOR_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_COV_VECTOR_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Core/FiniteDifference/wrapping/itkFiniteDifferenceFunction.wrap b/Modules/Core/FiniteDifference/wrapping/itkFiniteDifferenceFunction.wrap index 01efcb38adf..fb283ab8b49 100644 --- a/Modules/Core/FiniteDifference/wrapping/itkFiniteDifferenceFunction.wrap +++ b/Modules/Core/FiniteDifference/wrapping/itkFiniteDifferenceFunction.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::FiniteDifferenceFunction" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) - itk_wrap_image_filter("${WRAP_ITK_VECTOR_REAL}" 1) - itk_wrap_image_filter("${WRAP_ITK_COV_VECTOR_REAL}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_VECTOR_REAL}" 1) +itk_wrap_image_filter("${WRAP_ITK_COV_VECTOR_REAL}" 1) itk_end_wrap_class() diff --git a/Modules/Core/FiniteDifference/wrapping/itkFiniteDifferenceImageFilter.wrap b/Modules/Core/FiniteDifference/wrapping/itkFiniteDifferenceImageFilter.wrap index bf42ed6a1ec..9689580cc4b 100644 --- a/Modules/Core/FiniteDifference/wrapping/itkFiniteDifferenceImageFilter.wrap +++ b/Modules/Core/FiniteDifference/wrapping/itkFiniteDifferenceImageFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::FiniteDifferenceImageFilter" POINTER) # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) - itk_wrap_image_filter("${WRAP_ITK_VECTOR_REAL}" 2) - itk_wrap_image_filter("${WRAP_ITK_COV_VECTOR_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_VECTOR_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_COV_VECTOR_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Core/GPUCommon/CMakeLists.txt b/Modules/Core/GPUCommon/CMakeLists.txt index 6dfb0236dc0..7a7bdaf0644 100644 --- a/Modules/Core/GPUCommon/CMakeLists.txt +++ b/Modules/Core/GPUCommon/CMakeLists.txt @@ -4,23 +4,23 @@ project(ITKGPUCommon) if(NOT ITK_SOURCE_DIR) find_package(ITK REQUIRED) list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR}) - set(ITK_USE_GPU ON CACHE BOOL "Enable OpenCL GPU support." FORCE) + set(ITK_USE_GPU + ON + CACHE BOOL "Enable OpenCL GPU support." FORCE) set(ITK_USE_GPU ON) include(itkOpenCL) # Check for Blocks (see comments in .cxx test file) - try_compile(ITK_COMPILER_HAS_BLOCKS - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasBlocks.cxx) + try_compile(ITK_COMPILER_HAS_BLOCKS ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasBlocks.cxx) else() # Check for Blocks (see comments in .cxx test file) - try_compile(ITK_COMPILER_HAS_BLOCKS - ${ITK_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasBlocks.cxx) + try_compile(ITK_COMPILER_HAS_BLOCKS ${ITK_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkCheckHasBlocks.cxx) endif() - -if(ITK_USE_GPU AND APPLE AND NOT ITK_COMPILER_HAS_BLOCKS) - message(FATAL_ERROR "Your compiler does not support Blocks (C language extension). This is needed for ITK_USE_GPU=ON") +if(ITK_USE_GPU + AND APPLE + AND NOT ITK_COMPILER_HAS_BLOCKS) + message(FATAL_ERROR "Your compiler does not support Blocks (C language extension). This is needed for ITK_USE_GPU=ON") endif() if(ITK_USE_GPU) @@ -28,7 +28,11 @@ if(ITK_USE_GPU) if(APPLE) list(APPEND ITKGPUCommon_LIBRARIES "-framework OpenCL") elseif(WINDOWS) - list(APPEND ITKGPUCommon_LIBRARIES cfgmgr32 OneCoreUAP) + list( + APPEND + ITKGPUCommon_LIBRARIES + cfgmgr32 + OneCoreUAP) endif() set(ITKGPUCommon_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS}) diff --git a/Modules/Core/GPUCommon/itk-module.cmake b/Modules/Core/GPUCommon/itk-module.cmake index 83e36cd9a5b..34a666debf3 100644 --- a/Modules/Core/GPUCommon/itk-module.cmake +++ b/Modules/Core/GPUCommon/itk-module.cmake @@ -1,14 +1,15 @@ -set(DOCUMENTATION "This module contains the framework for processing images +set(DOCUMENTATION + "This module contains the framework for processing images with the GPU. This includes base classes for the GPU image filters, some OpenCL utilities, and classes to manage the interface between the CPU and the GPU. These classes manage the GPU kernel, transferring the data to and from the GPU, and managing the GPU contexts.") -itk_module(ITKGPUCommon +itk_module( + ITKGPUCommon DEPENDS - ITKCommon + ITKCommon TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Core/GPUCommon/src/CMakeLists.txt b/Modules/Core/GPUCommon/src/CMakeLists.txt index 0b39f2a9a50..0798da591a8 100644 --- a/Modules/Core/GPUCommon/src/CMakeLists.txt +++ b/Modules/Core/GPUCommon/src/CMakeLists.txt @@ -1,15 +1,11 @@ -if (ITK_USE_GPU) +if(ITK_USE_GPU) set(ITKGPUCommon_SRCS - itkGPUContextManager.cxx - itkGPUDataManager.cxx - itkGPUKernelManager.cxx - itkOpenCLUtil.cxx - ) + itkGPUContextManager.cxx + itkGPUDataManager.cxx + itkGPUKernelManager.cxx + itkOpenCLUtil.cxx) - set(ITKGPUCommon_Kernels - GPUImageOps.cl - GPUReduction.cl - ) + set(ITKGPUCommon_Kernels GPUImageOps.cl GPUReduction.cl) write_gpu_kernels("${ITKGPUCommon_Kernels}" ITKGPUCommon_SRCS) diff --git a/Modules/Core/GPUCommon/test/CMakeLists.txt b/Modules/Core/GPUCommon/test/CMakeLists.txt index 3b54b4b764a..bd381f3e999 100644 --- a/Modules/Core/GPUCommon/test/CMakeLists.txt +++ b/Modules/Core/GPUCommon/test/CMakeLists.txt @@ -1,14 +1,21 @@ -if (ITK_USE_GPU) +if(ITK_USE_GPU) -itk_module_test() + itk_module_test() -set(ITKGPUCommon-tests - itkGPUImageTest.cxx - itkGPUReductionTest.cxx - ) + set(ITKGPUCommon-tests itkGPUImageTest.cxx itkGPUReductionTest.cxx) -CreateTestDriver(ITKGPUCommon "${ITKGPUCommon-Test_LIBRARIES}" "${ITKGPUCommon-tests}") -itk_add_test(NAME itkGPUImageTest COMMAND ITKGPUCommonTestDriver itkGPUImageTest) -itk_add_test(NAME itkGPUReductionTest COMMAND ITKGPUCommonTestDriver itkGPUReductionTest) + createtestdriver(ITKGPUCommon "${ITKGPUCommon-Test_LIBRARIES}" "${ITKGPUCommon-tests}") + itk_add_test( + NAME + itkGPUImageTest + COMMAND + ITKGPUCommonTestDriver + itkGPUImageTest) + itk_add_test( + NAME + itkGPUReductionTest + COMMAND + ITKGPUCommonTestDriver + itkGPUReductionTest) endif() diff --git a/Modules/Core/GPUCommon/wrapping/CMakeLists.txt b/Modules/Core/GPUCommon/wrapping/CMakeLists.txt index d7eb65c2809..718ed81f5c2 100644 --- a/Modules/Core/GPUCommon/wrapping/CMakeLists.txt +++ b/Modules/Core/GPUCommon/wrapping/CMakeLists.txt @@ -1,13 +1,12 @@ if(ITK_USE_GPU OR NOT ITK_SOURCE_DIR) -itk_wrap_module(ITKGPUCommon) -set(WRAPPER_SUBMODULE_ORDER - itkGPUContextManager - itkGPUKernelManager - itkGPUDataManager - itkGPUImage - itkGPUImageToImageFilter -) -itk_auto_load_and_end_wrap_submodules() + itk_wrap_module(ITKGPUCommon) + set(WRAPPER_SUBMODULE_ORDER + itkGPUContextManager + itkGPUKernelManager + itkGPUDataManager + itkGPUImage + itkGPUImageToImageFilter) + itk_auto_load_and_end_wrap_submodules() endif() diff --git a/Modules/Core/GPUCommon/wrapping/itkGPUImage.wrap b/Modules/Core/GPUCommon/wrapping/itkGPUImage.wrap index eb4c6550c44..67e0b76de72 100644 --- a/Modules/Core/GPUCommon/wrapping/itkGPUImage.wrap +++ b/Modules/Core/GPUCommon/wrapping/itkGPUImage.wrap @@ -1,24 +1,24 @@ -UNIQUE(types "UC;UL;${ITKM_IT};${WRAP_ITK_SCALAR}") -UNIQUE(vector_types "${WRAP_ITK_VECTOR_REAL};${WRAP_ITK_COV_VECTOR_REAL}") +unique(types "UC;UL;${ITKM_IT};${WRAP_ITK_SCALAR}") +unique(vector_types "${WRAP_ITK_VECTOR_REAL};${WRAP_ITK_COV_VECTOR_REAL}") itk_wrap_class("itk::GPUImage" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") - endforeach() - foreach(t ${vector_types}) - itk_wrap_template("${ITKM_${t}${d}}${d}" "${ITKT_${t}${d}}, ${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") endforeach() + foreach(t ${vector_types}) + itk_wrap_template("${ITKM_${t}${d}}${d}" "${ITKT_${t}${d}}, ${d}") + endforeach() +endforeach() itk_end_wrap_class() itk_wrap_include("itkGPUImageDataManager.h") itk_wrap_class("itk::GPUImageDataManager" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >") - endforeach() - foreach(t ${vector_types}) - itk_wrap_template("GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >") + endforeach() + foreach(t ${vector_types}) + itk_wrap_template("GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/GPUCommon/wrapping/itkGPUImageToImageFilter.wrap b/Modules/Core/GPUCommon/wrapping/itkGPUImageToImageFilter.wrap index d5f10d4b14f..d54deb61545 100644 --- a/Modules/Core/GPUCommon/wrapping/itkGPUImageToImageFilter.wrap +++ b/Modules/Core/GPUCommon/wrapping/itkGPUImageToImageFilter.wrap @@ -1,48 +1,60 @@ -UNIQUE(from_types "UC;UL;${WRAP_ITK_SCALAR}") -UNIQUE(to_types "UC;UL;${ITKM_IT};${WRAP_ITK_SCALAR}") -UNIQUE(vector_types "${WRAP_ITK_VECTOR_REAL};${WRAP_ITK_COV_VECTOR_REAL}") +unique(from_types "UC;UL;${WRAP_ITK_SCALAR}") +unique(to_types "UC;UL;${ITKM_IT};${WRAP_ITK_SCALAR}") +unique(vector_types "${WRAP_ITK_VECTOR_REAL};${WRAP_ITK_COV_VECTOR_REAL}") itk_wrap_class("itk::ImageSource" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(to ${to_types}) - itk_wrap_template("GI${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${to}}, ${d} >") - endforeach() - foreach(t ${vector_types}) - itk_wrap_template("GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(to ${to_types}) + itk_wrap_template("GI${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${to}}, ${d} >") endforeach() + foreach(t ${vector_types}) + itk_wrap_template("GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") + endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::ImageToImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(from ${from_types}) - foreach(to ${to_types}) - itk_wrap_template("I${ITKM_${from}}${d}GI${ITKM_${to}}${d}" "itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") - itk_wrap_template("GI${ITKM_${from}}${d}I${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >") - itk_wrap_template("GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") - endforeach() - endforeach() - foreach(t ${vector_types}) - itk_wrap_template("I${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" "itk::Image< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") - itk_wrap_template("GI${ITKM_${t}${d}}${d}I${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::Image< ${ITKT_${t}${d}}, ${d} >") - itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(from ${from_types}) + foreach(to ${to_types}) + itk_wrap_template("I${ITKM_${from}}${d}GI${ITKM_${to}}${d}" + "itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") + itk_wrap_template("GI${ITKM_${from}}${d}I${ITKM_${to}}${d}" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >") + itk_wrap_template("GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") endforeach() endforeach() + foreach(t ${vector_types}) + itk_wrap_template("I${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" + "itk::Image< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") + itk_wrap_template("GI${ITKM_${t}${d}}${d}I${ITKM_${t}${d}}${d}" + "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::Image< ${ITKT_${t}${d}}, ${d} >") + itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" + "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") + endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUImageToImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(from ${from_types}) - foreach(to ${to_types}) - itk_wrap_template("I${ITKM_${from}}${d}GI${ITKM_${to}}${d}" "itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") - itk_wrap_template("GI${ITKM_${from}}${d}I${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >") - itk_wrap_template("GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") - endforeach() - endforeach() - foreach(t ${vector_types}) - itk_wrap_template("I${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" "itk::Image< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") - itk_wrap_template("GI${ITKM_${t}${d}}${d}I${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::Image< ${ITKT_${t}${d}}, ${d} >") - itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(from ${from_types}) + foreach(to ${to_types}) + itk_wrap_template("I${ITKM_${from}}${d}GI${ITKM_${to}}${d}" + "itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") + itk_wrap_template("GI${ITKM_${from}}${d}I${ITKM_${to}}${d}" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >") + itk_wrap_template("GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") endforeach() endforeach() + foreach(t ${vector_types}) + itk_wrap_template("I${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" + "itk::Image< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") + itk_wrap_template("GI${ITKM_${t}${d}}${d}I${ITKM_${t}${d}}${d}" + "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::Image< ${ITKT_${t}${d}}, ${d} >") + itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" + "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") + endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/GPUCommon/wrapping/itkGPUInPlaceImageFilter.wrap b/Modules/Core/GPUCommon/wrapping/itkGPUInPlaceImageFilter.wrap index e18fb8c4d83..0f70516af7e 100644 --- a/Modules/Core/GPUCommon/wrapping/itkGPUInPlaceImageFilter.wrap +++ b/Modules/Core/GPUCommon/wrapping/itkGPUInPlaceImageFilter.wrap @@ -1,53 +1,73 @@ -UNIQUE(from_types "UC;${WRAP_ITK_SCALAR}") -UNIQUE(to_types "UC;UL;${ITKM_IT};${WRAP_ITK_SCALAR}") -UNIQUE(vector_types "${WRAP_ITK_VECTOR_REAL};${WRAP_ITK_COV_VECTOR_REAL}") +unique(from_types "UC;${WRAP_ITK_SCALAR}") +unique(to_types "UC;UL;${ITKM_IT};${WRAP_ITK_SCALAR}") +unique(vector_types "${WRAP_ITK_VECTOR_REAL};${WRAP_ITK_COV_VECTOR_REAL}") itk_wrap_class("itk::InPlaceImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(to ${to_types}) + itk_wrap_template("I${ITKM_${to}}${d}GI${ITKM_${to}}${d}" + "itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") + itk_wrap_template("GI${ITKM_${to}}${d}I${ITKM_${to}}${d}" + "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >") + itk_wrap_template("GI${ITKM_${to}}${d}GI${ITKM_${to}}${d}" + "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") + endforeach() + foreach(from ${from_types}) foreach(to ${to_types}) - itk_wrap_template("I${ITKM_${to}}${d}GI${ITKM_${to}}${d}" "itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") - itk_wrap_template("GI${ITKM_${to}}${d}I${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >") - itk_wrap_template("GI${ITKM_${to}}${d}GI${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") - endforeach() - foreach(from ${from_types}) - foreach(to ${to_types}) - if(NOT ${from} STREQUAL ${to}) - itk_wrap_template("I${ITKM_${from}}${d}GI${ITKM_${to}}${d}" "itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") - itk_wrap_template("GI${ITKM_${from}}${d}I${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >") - itk_wrap_template("GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") - endif() - endforeach() - endforeach() - foreach(t ${vector_types}) - itk_wrap_template("I${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" "itk::Image< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") - itk_wrap_template("GI${ITKM_${t}${d}}${d}I${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::Image< ${ITKT_${t}${d}}, ${d} >") - itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") + if(NOT + ${from} + STREQUAL + ${to}) + itk_wrap_template("I${ITKM_${from}}${d}GI${ITKM_${to}}${d}" + "itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") + itk_wrap_template("GI${ITKM_${from}}${d}I${ITKM_${to}}${d}" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >") + itk_wrap_template("GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") + endif() endforeach() endforeach() + foreach(t ${vector_types}) + itk_wrap_template("I${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" + "itk::Image< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") + itk_wrap_template("GI${ITKM_${t}${d}}${d}I${ITKM_${t}${d}}${d}" + "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::Image< ${ITKT_${t}${d}}, ${d} >") + itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" + "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") + endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUImageToImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(from ${from_types}) - foreach(to ${to_types}) - itk_wrap_template("GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}InPlaceImageFilter" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::InPlaceImageFilter< itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >") - endforeach() - endforeach() - foreach(t ${vector_types}) - itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}InPlaceImageFilter" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::InPlaceImageFilter< itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} > >") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(from ${from_types}) + foreach(to ${to_types}) + itk_wrap_template( + "GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}InPlaceImageFilter" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::InPlaceImageFilter< itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >" + ) endforeach() endforeach() + foreach(t ${vector_types}) + itk_wrap_template( + "GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}InPlaceImageFilter" + "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::InPlaceImageFilter< itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} > >" + ) + endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUInPlaceImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(from ${from_types}) - foreach(to ${to_types}) - itk_wrap_template("GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") - endforeach() - endforeach() - foreach(t ${vector_types}) - itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(from ${from_types}) + foreach(to ${to_types}) + itk_wrap_template("GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") endforeach() endforeach() + foreach(t ${vector_types}) + itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" + "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") + endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/GPUCommon/wrapping/itkGPUReduction.wrap b/Modules/Core/GPUCommon/wrapping/itkGPUReduction.wrap index d7fc0d20cce..05e5202ea01 100644 --- a/Modules/Core/GPUCommon/wrapping/itkGPUReduction.wrap +++ b/Modules/Core/GPUCommon/wrapping/itkGPUReduction.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::GPUReduction" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/GPUCommon/wrapping/test/CMakeLists.txt b/Modules/Core/GPUCommon/wrapping/test/CMakeLists.txt index 4c95900de1e..6a16c887639 100644 --- a/Modules/Core/GPUCommon/wrapping/test/CMakeLists.txt +++ b/Modules/Core/GPUCommon/wrapping/test/CMakeLists.txt @@ -1,4 +1,12 @@ if(ITK_WRAP_PYTHON) - itk_python_add_test(NAME itkGPUImagePythonTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkGPUImageTest.py) - itk_python_add_test(NAME itkGPUReductionPythonTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkGPUReductionTest.py) + itk_python_add_test( + NAME + itkGPUImagePythonTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkGPUImageTest.py) + itk_python_add_test( + NAME + itkGPUReductionPythonTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkGPUReductionTest.py) endif() diff --git a/Modules/Core/GPUFiniteDifference/CMakeLists.txt b/Modules/Core/GPUFiniteDifference/CMakeLists.txt index 71a4703cca5..f96c2ab9c2e 100644 --- a/Modules/Core/GPUFiniteDifference/CMakeLists.txt +++ b/Modules/Core/GPUFiniteDifference/CMakeLists.txt @@ -4,11 +4,13 @@ project(ITKGPUFiniteDifference) if(NOT ITK_SOURCE_DIR) find_package(ITK REQUIRED) list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR}) - set(ITK_USE_GPU ON CACHE BOOL "Enable OpenCL GPU support." FORCE) + set(ITK_USE_GPU + ON + CACHE BOOL "Enable OpenCL GPU support." FORCE) include(itkOpenCL) endif() -if (ITK_USE_GPU) +if(ITK_USE_GPU) set(ITKGPUFiniteDifference_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) set(ITKGPUFiniteDifference_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) set(ITKGPUFiniteDifference_LIBRARIES ITKGPUFiniteDifference) diff --git a/Modules/Core/GPUFiniteDifference/itk-module.cmake b/Modules/Core/GPUFiniteDifference/itk-module.cmake index c9ea371abd7..27fbebcbfff 100644 --- a/Modules/Core/GPUFiniteDifference/itk-module.cmake +++ b/Modules/Core/GPUFiniteDifference/itk-module.cmake @@ -1,16 +1,17 @@ -set(DOCUMENTATION "This module contains the GPU implementations of base classes +set(DOCUMENTATION + "This module contains the GPU implementations of base classes needed for finite difference image filters. Most of the classes in this module are abstract and therefore are not intended to be instantiated by themselves.") -itk_module(ITKGPUFiniteDifference +itk_module( + ITKGPUFiniteDifference ENABLE_SHARED DEPENDS - ITKCommon - ITKGPUCommon + ITKCommon + ITKGPUCommon COMPILE_DEPENDS - ITKFiniteDifference + ITKFiniteDifference TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Core/GPUFiniteDifference/src/CMakeLists.txt b/Modules/Core/GPUFiniteDifference/src/CMakeLists.txt index 8425cc02581..c16b43d0301 100644 --- a/Modules/Core/GPUFiniteDifference/src/CMakeLists.txt +++ b/Modules/Core/GPUFiniteDifference/src/CMakeLists.txt @@ -1,11 +1,7 @@ -set(ITKGPUFiniteDifference_SRCS - itkGPUFiniteDifferenceFilterEnum.cxx -) +set(ITKGPUFiniteDifference_SRCS itkGPUFiniteDifferenceFilterEnum.cxx) -if (ITK_USE_GPU) - set(ITKGPUFiniteDifference_Kernels - GPUDenseFiniteDifferenceImageFilter.cl - ) +if(ITK_USE_GPU) + set(ITKGPUFiniteDifference_Kernels GPUDenseFiniteDifferenceImageFilter.cl) write_gpu_kernels("${ITKGPUFiniteDifference_Kernels}" ITKGPUFiniteDifference_SRCS) itk_module_add_library(ITKGPUFiniteDifference ${ITKGPUFiniteDifference_SRCS}) diff --git a/Modules/Core/GPUFiniteDifference/wrapping/CMakeLists.txt b/Modules/Core/GPUFiniteDifference/wrapping/CMakeLists.txt index 740bdc42058..89cc30a7913 100644 --- a/Modules/Core/GPUFiniteDifference/wrapping/CMakeLists.txt +++ b/Modules/Core/GPUFiniteDifference/wrapping/CMakeLists.txt @@ -1,4 +1,4 @@ if(ITK_USE_GPU OR NOT ITK_SOURCE_DIR) -itk_wrap_module(ITKGPUFiniteDifference) -itk_auto_load_and_end_wrap_submodules() + itk_wrap_module(ITKGPUFiniteDifference) + itk_auto_load_and_end_wrap_submodules() endif() diff --git a/Modules/Core/GPUFiniteDifference/wrapping/itkGPUDenseFiniteDifferenceImageFilter.wrap b/Modules/Core/GPUFiniteDifference/wrapping/itkGPUDenseFiniteDifferenceImageFilter.wrap index e51ef96e1a9..19889cd598e 100644 --- a/Modules/Core/GPUFiniteDifference/wrapping/itkGPUDenseFiniteDifferenceImageFilter.wrap +++ b/Modules/Core/GPUFiniteDifference/wrapping/itkGPUDenseFiniteDifferenceImageFilter.wrap @@ -1,57 +1,79 @@ -UNIQUE(types "${WRAP_ITK_REAL}") -UNIQUE(vector_types "${WRAP_ITK_VECTOR_REAL};${WRAP_ITK_COV_VECTOR_REAL}") +unique(types "${WRAP_ITK_REAL}") +unique(vector_types "${WRAP_ITK_VECTOR_REAL};${WRAP_ITK_COV_VECTOR_REAL}") itk_wrap_class("itk::DenseFiniteDifferenceImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") - endforeach() - foreach(t ${vector_types}) - itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") endforeach() + foreach(t ${vector_types}) + itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" + "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") + endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUImageToImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}DenseFiniteDifferenceImageFilter" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::DenseFiniteDifferenceImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >") - endforeach() - foreach(t ${vector_types}) - itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}DenseFiniteDifferenceImageFilter" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::DenseFiniteDifferenceImageFilter< itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} > >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template( + "GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}DenseFiniteDifferenceImageFilter" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::DenseFiniteDifferenceImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >" + ) + endforeach() + foreach(t ${vector_types}) + itk_wrap_template( + "GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}DenseFiniteDifferenceImageFilter" + "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::DenseFiniteDifferenceImageFilter< itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} > >" + ) endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUInPlaceImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}DenseFiniteDifferenceImageFilter" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::DenseFiniteDifferenceImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >") - endforeach() - foreach(t ${vector_types}) - itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}DenseFiniteDifferenceImageFilter" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::DenseFiniteDifferenceImageFilter< itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} > >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template( + "GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}DenseFiniteDifferenceImageFilter" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::DenseFiniteDifferenceImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >" + ) + endforeach() + foreach(t ${vector_types}) + itk_wrap_template( + "GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}DenseFiniteDifferenceImageFilter" + "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::DenseFiniteDifferenceImageFilter< itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} > >" + ) endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUFiniteDifferenceImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}DenseFiniteDifferenceImageFilter" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::DenseFiniteDifferenceImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >") - endforeach() - foreach(t ${vector_types}) - itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}DenseFiniteDifferenceImageFilter" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::DenseFiniteDifferenceImageFilter< itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} > >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template( + "GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}DenseFiniteDifferenceImageFilter" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::DenseFiniteDifferenceImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >" + ) endforeach() + foreach(t ${vector_types}) + itk_wrap_template( + "GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}DenseFiniteDifferenceImageFilter" + "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::DenseFiniteDifferenceImageFilter< itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} > >" + ) + endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUDenseFiniteDifferenceImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") - endforeach() - foreach(t ${vector_types}) - itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") + endforeach() + foreach(t ${vector_types}) + itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" + "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/GPUFiniteDifference/wrapping/itkGPUFiniteDifferenceFunction.wrap b/Modules/Core/GPUFiniteDifference/wrapping/itkGPUFiniteDifferenceFunction.wrap index a72c9d7d429..d0ae30336ad 100644 --- a/Modules/Core/GPUFiniteDifference/wrapping/itkGPUFiniteDifferenceFunction.wrap +++ b/Modules/Core/GPUFiniteDifference/wrapping/itkGPUFiniteDifferenceFunction.wrap @@ -1,24 +1,24 @@ -UNIQUE(types "${WRAP_ITK_REAL}") -UNIQUE(vector_types "${WRAP_ITK_VECTOR_REAL};${WRAP_ITK_COV_VECTOR_REAL}") +unique(types "${WRAP_ITK_REAL}") +unique(vector_types "${WRAP_ITK_VECTOR_REAL};${WRAP_ITK_COV_VECTOR_REAL}") itk_wrap_class("itk::FiniteDifferenceFunction" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >") - endforeach() - foreach(t ${vector_types}) - itk_wrap_template("GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >") endforeach() + foreach(t ${vector_types}) + itk_wrap_template("GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") + endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUFiniteDifferenceFunction" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >") - endforeach() - foreach(t ${vector_types}) - itk_wrap_template("GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >") + endforeach() + foreach(t ${vector_types}) + itk_wrap_template("GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/GPUFiniteDifference/wrapping/itkGPUFiniteDifferenceImageFilter.wrap b/Modules/Core/GPUFiniteDifference/wrapping/itkGPUFiniteDifferenceImageFilter.wrap index 10e00c598e0..465a8c7afb4 100644 --- a/Modules/Core/GPUFiniteDifference/wrapping/itkGPUFiniteDifferenceImageFilter.wrap +++ b/Modules/Core/GPUFiniteDifference/wrapping/itkGPUFiniteDifferenceImageFilter.wrap @@ -1,14 +1,16 @@ -UNIQUE(types "${WRAP_ITK_REAL}") -UNIQUE(vector_types "${WRAP_ITK_VECTOR_REAL};${WRAP_ITK_COV_VECTOR_REAL}") +unique(types "${WRAP_ITK_REAL}") +unique(vector_types "${WRAP_ITK_VECTOR_REAL};${WRAP_ITK_COV_VECTOR_REAL}") itk_wrap_include("itkGPUImage.h") itk_wrap_class("itk::FiniteDifferenceImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") - endforeach() - foreach(t ${vector_types}) - itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") endforeach() + foreach(t ${vector_types}) + itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" + "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") + endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/ImageAdaptors/itk-module.cmake b/Modules/Core/ImageAdaptors/itk-module.cmake index 23d92aee283..dfc6e7a63eb 100644 --- a/Modules/Core/ImageAdaptors/itk-module.cmake +++ b/Modules/Core/ImageAdaptors/itk-module.cmake @@ -1,15 +1,16 @@ -set(DOCUMENTATION "Image Adaptors are classes that can take an itk::Image and +set(DOCUMENTATION + "Image Adaptors are classes that can take an itk::Image and present it as a different type of image. They are commonly used for trivial pixel-wise operations that do not justify the memory duplication that a normal ITK filter may imply. They are also very useful for implementing casting operations on the fly.") -itk_module(ITKImageAdaptors +itk_module( + ITKImageAdaptors PRIVATE_DEPENDS - ITKCommon + ITKCommon TEST_DEPENDS - ITKTestKernel - ITKCommon + ITKTestKernel + ITKCommon DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Core/ImageAdaptors/test/CMakeLists.txt b/Modules/Core/ImageAdaptors/test/CMakeLists.txt index c48e9f55554..5be45cf900f 100644 --- a/Modules/Core/ImageAdaptors/test/CMakeLists.txt +++ b/Modules/Core/ImageAdaptors/test/CMakeLists.txt @@ -1,31 +1,53 @@ itk_module_test() set(ITKImageAdaptorsTests -itkComplexConjugateImageAdaptorTest.cxx -itkImageAdaptorTest.cxx -itkNthElementPixelAccessorTest.cxx -itkRGBToVectorImageAdaptorTest.cxx -itkVectorImageTest.cxx -itkVectorImageToImageAdaptorTest.cxx -) + itkComplexConjugateImageAdaptorTest.cxx + itkImageAdaptorTest.cxx + itkNthElementPixelAccessorTest.cxx + itkRGBToVectorImageAdaptorTest.cxx + itkVectorImageTest.cxx + itkVectorImageToImageAdaptorTest.cxx) -CreateTestDriver(ITKImageAdaptors "${ITKImageAdaptors-Test_LIBRARIES}" "${ITKImageAdaptorsTests}") +createtestdriver(ITKImageAdaptors "${ITKImageAdaptors-Test_LIBRARIES}" "${ITKImageAdaptorsTests}") -itk_add_test(NAME itkNthElementPixelAccessorTest - COMMAND ITKImageAdaptorsTestDriver itkNthElementPixelAccessorTest) -itk_add_test(NAME itkImageAdaptorTest - COMMAND ITKImageAdaptorsTestDriver itkImageAdaptorTest) -itk_add_test(NAME itkRGBToVectorImageAdaptorTest - COMMAND ITKImageAdaptorsTestDriver itkRGBToVectorImageAdaptorTest) -itk_add_test(NAME itkVectorImageTest - COMMAND ITKImageAdaptorsTestDriver itkVectorImageTest - ${ITK_TEST_OUTPUT_DIR}/VectorImage.nrrd ${ITK_TEST_OUTPUT_DIR}/VectorImage.mhd) -itk_add_test(NAME itkComplexConjugateImageAdaptorTest - COMMAND ITKImageAdaptorsTestDriver itkComplexConjugateImageAdaptorTest) -itk_add_test(NAME itkVectorImageToImageAdaptorTest - COMMAND ITKImageAdaptorsTestDriver itkVectorImageToImageAdaptorTest) +itk_add_test( + NAME + itkNthElementPixelAccessorTest + COMMAND + ITKImageAdaptorsTestDriver + itkNthElementPixelAccessorTest) +itk_add_test( + NAME + itkImageAdaptorTest + COMMAND + ITKImageAdaptorsTestDriver + itkImageAdaptorTest) +itk_add_test( + NAME + itkRGBToVectorImageAdaptorTest + COMMAND + ITKImageAdaptorsTestDriver + itkRGBToVectorImageAdaptorTest) +itk_add_test( + NAME + itkVectorImageTest + COMMAND + ITKImageAdaptorsTestDriver + itkVectorImageTest + ${ITK_TEST_OUTPUT_DIR}/VectorImage.nrrd + ${ITK_TEST_OUTPUT_DIR}/VectorImage.mhd) +itk_add_test( + NAME + itkComplexConjugateImageAdaptorTest + COMMAND + ITKImageAdaptorsTestDriver + itkComplexConjugateImageAdaptorTest) +itk_add_test( + NAME + itkVectorImageToImageAdaptorTest + COMMAND + ITKImageAdaptorsTestDriver + itkVectorImageToImageAdaptorTest) -set(ITKImageAdaptorsGTests - itkImageAdaptorGTest.cxx -) +set(ITKImageAdaptorsGTests itkImageAdaptorGTest.cxx) -CreateGoogleTestDriver(ITKImageAdaptors "${ITKImageAdaptors-Test_LIBRARIES}" "${ITKImageAdaptorsGTests}") +creategoogletestdriver(ITKImageAdaptors "${ITKImageAdaptors-Test_LIBRARIES}" "${ITKImageAdaptorsGTests}") diff --git a/Modules/Core/ImageFunction/itk-module.cmake b/Modules/Core/ImageFunction/itk-module.cmake index cc51b4003c8..4a441217f62 100644 --- a/Modules/Core/ImageFunction/itk-module.cmake +++ b/Modules/Core/ImageFunction/itk-module.cmake @@ -1,4 +1,5 @@ -set(DOCUMENTATION "ImageFunctions are typically used as helper classes in the +set(DOCUMENTATION + "ImageFunctions are typically used as helper classes in the implementation of ITK filters. In many cases they may act as pluggable components at run time, while in other cases they may be implementing the actions that a filter will apply at every iteration, or the operation a @@ -6,13 +7,13 @@ filter may apply to every pixel. These classes are rarely used from applications. Their main role is to assist in the implementation of ITK filters.") -itk_module(ITKImageFunction +itk_module( + ITKImageFunction COMPILE_DEPENDS - ITKImageAdaptors - ITKTransform - ITKStatistics + ITKImageAdaptors + ITKTransform + ITKStatistics TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Core/ImageFunction/test/CMakeLists.txt b/Modules/Core/ImageFunction/test/CMakeLists.txt index 6f4f1bde86f..0d687069058 100644 --- a/Modules/Core/ImageFunction/test/CMakeLists.txt +++ b/Modules/Core/ImageFunction/test/CMakeLists.txt @@ -1,99 +1,210 @@ itk_module_test() set(ITKImageFunctionTests -itkGaussianBlurImageFunctionTest.cxx -itkVectorInterpolateImageFunctionTest.cxx -itkVarianceImageFunctionTest.cxx -itkMedianImageFunctionTest.cxx -itkBinaryThresholdImageFunctionTest.cxx -itkBSplineDecompositionImageFilterTest.cxx -itkBSplineInterpolateImageFunctionTest.cxx -itkBSplineResampleImageFunctionTest.cxx -itkScatterMatrixImageFunctionTest.cxx -itkMeanImageFunctionTest.cxx -itkGaussianDerivativeImageFunctionTest.cxx -itkCentralDifferenceImageFunctionTest.cxx -itkCentralDifferenceImageFunctionOnVectorTest.cxx -itkImageAdaptorInterpolateImageFunctionTest.cxx -itkCovarianceImageFunctionTest.cxx -itkRayCastInterpolateImageFunctionTest.cxx -itkNearestNeighborExtrapolateImageFunctionTest.cxx -itkVectorMeanImageFunctionTest.cxx -itkMahalanobisDistanceThresholdImageFunctionTest.cxx -itkInterpolateTest.cxx -itkRGBInterpolateImageFunctionTest.cxx -itkWindowedSincInterpolateImageFunctionTest.cxx -itkLinearInterpolateImageFunctionTest.cxx -itkNeighborhoodOperatorImageFunctionTest.cxx -itkNearestNeighborInterpolateImageFunctionTest.cxx -itkGaussianInterpolateImageFunctionTest.cxx -itkLabelImageGaussianInterpolateImageFunctionTest.cxx -itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest.cxx -itkCentralDifferenceImageFunctionSpeedTest.cxx -itkCentralDifferenceImageFunctionOnVectorSpeedTest.cxx -) + itkGaussianBlurImageFunctionTest.cxx + itkVectorInterpolateImageFunctionTest.cxx + itkVarianceImageFunctionTest.cxx + itkMedianImageFunctionTest.cxx + itkBinaryThresholdImageFunctionTest.cxx + itkBSplineDecompositionImageFilterTest.cxx + itkBSplineInterpolateImageFunctionTest.cxx + itkBSplineResampleImageFunctionTest.cxx + itkScatterMatrixImageFunctionTest.cxx + itkMeanImageFunctionTest.cxx + itkGaussianDerivativeImageFunctionTest.cxx + itkCentralDifferenceImageFunctionTest.cxx + itkCentralDifferenceImageFunctionOnVectorTest.cxx + itkImageAdaptorInterpolateImageFunctionTest.cxx + itkCovarianceImageFunctionTest.cxx + itkRayCastInterpolateImageFunctionTest.cxx + itkNearestNeighborExtrapolateImageFunctionTest.cxx + itkVectorMeanImageFunctionTest.cxx + itkMahalanobisDistanceThresholdImageFunctionTest.cxx + itkInterpolateTest.cxx + itkRGBInterpolateImageFunctionTest.cxx + itkWindowedSincInterpolateImageFunctionTest.cxx + itkLinearInterpolateImageFunctionTest.cxx + itkNeighborhoodOperatorImageFunctionTest.cxx + itkNearestNeighborInterpolateImageFunctionTest.cxx + itkGaussianInterpolateImageFunctionTest.cxx + itkLabelImageGaussianInterpolateImageFunctionTest.cxx + itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest.cxx + itkCentralDifferenceImageFunctionSpeedTest.cxx + itkCentralDifferenceImageFunctionOnVectorSpeedTest.cxx) -CreateTestDriver(ITKImageFunction "${ITKImageFunction-Test_LIBRARIES}" "${ITKImageFunctionTests}") +createtestdriver(ITKImageFunction "${ITKImageFunction-Test_LIBRARIES}" "${ITKImageFunctionTests}") -itk_add_test(NAME itkGaussianBlurImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkGaussianBlurImageFunctionTest) -itk_add_test(NAME itkVectorInterpolateImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkVectorInterpolateImageFunctionTest) -itk_add_test(NAME itkVarianceImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkVarianceImageFunctionTest) -itk_add_test(NAME itkMedianImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkMedianImageFunctionTest) -itk_add_test(NAME itkBinaryThresholdImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkBinaryThresholdImageFunctionTest) -itk_add_test(NAME itkBSplineDecompositionImageFilterTest - COMMAND ITKImageFunctionTestDriver itkBSplineDecompositionImageFilterTest 3 -0.26794919243112281) -itk_add_test(NAME itkBSplineInterpolateImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkBSplineInterpolateImageFunctionTest) -itk_add_test(NAME itkBSplineResampleImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkBSplineResampleImageFunctionTest) -itk_add_test(NAME itkScatterMatrixImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkScatterMatrixImageFunctionTest) -itk_add_test(NAME itkMeanImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkMeanImageFunctionTest) -itk_add_test(NAME itkGaussianDerivativeImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkGaussianDerivativeImageFunctionTest) -itk_add_test(NAME itkCentralDifferenceImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkCentralDifferenceImageFunctionTest) -itk_add_test(NAME itkCentralDifferenceImageFunctionOnVectorTest - COMMAND ITKImageFunctionTestDriver itkCentralDifferenceImageFunctionOnVectorTest) -itk_add_test(NAME itkImageAdaptorInterpolateImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkImageAdaptorInterpolateImageFunctionTest) -itk_add_test(NAME itkCovarianceImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkCovarianceImageFunctionTest) -itk_add_test(NAME itkRayCastInterpolateImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkRayCastInterpolateImageFunctionTest) -itk_add_test(NAME itkNearestNeighborExtrapolateImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkNearestNeighborExtrapolateImageFunctionTest) -itk_add_test(NAME itkVectorMeanImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkVectorMeanImageFunctionTest) -itk_add_test(NAME itkMahalanobisDistanceThresholdImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkMahalanobisDistanceThresholdImageFunctionTest) -itk_add_test(NAME itkInterpolateTest - COMMAND ITKImageFunctionTestDriver itkInterpolateTest) -itk_add_test(NAME itkRGBInterpolateImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkRGBInterpolateImageFunctionTest) +itk_add_test( + NAME + itkGaussianBlurImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkGaussianBlurImageFunctionTest) +itk_add_test( + NAME + itkVectorInterpolateImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkVectorInterpolateImageFunctionTest) +itk_add_test( + NAME + itkVarianceImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkVarianceImageFunctionTest) +itk_add_test( + NAME + itkMedianImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkMedianImageFunctionTest) +itk_add_test( + NAME + itkBinaryThresholdImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkBinaryThresholdImageFunctionTest) +itk_add_test( + NAME + itkBSplineDecompositionImageFilterTest + COMMAND + ITKImageFunctionTestDriver + itkBSplineDecompositionImageFilterTest + 3 + -0.26794919243112281) +itk_add_test( + NAME + itkBSplineInterpolateImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkBSplineInterpolateImageFunctionTest) +itk_add_test( + NAME + itkBSplineResampleImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkBSplineResampleImageFunctionTest) +itk_add_test( + NAME + itkScatterMatrixImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkScatterMatrixImageFunctionTest) +itk_add_test( + NAME + itkMeanImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkMeanImageFunctionTest) +itk_add_test( + NAME + itkGaussianDerivativeImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkGaussianDerivativeImageFunctionTest) +itk_add_test( + NAME + itkCentralDifferenceImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkCentralDifferenceImageFunctionTest) +itk_add_test( + NAME + itkCentralDifferenceImageFunctionOnVectorTest + COMMAND + ITKImageFunctionTestDriver + itkCentralDifferenceImageFunctionOnVectorTest) +itk_add_test( + NAME + itkImageAdaptorInterpolateImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkImageAdaptorInterpolateImageFunctionTest) +itk_add_test( + NAME + itkCovarianceImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkCovarianceImageFunctionTest) +itk_add_test( + NAME + itkRayCastInterpolateImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkRayCastInterpolateImageFunctionTest) +itk_add_test( + NAME + itkNearestNeighborExtrapolateImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkNearestNeighborExtrapolateImageFunctionTest) +itk_add_test( + NAME + itkVectorMeanImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkVectorMeanImageFunctionTest) +itk_add_test( + NAME + itkMahalanobisDistanceThresholdImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkMahalanobisDistanceThresholdImageFunctionTest) +itk_add_test( + NAME + itkInterpolateTest + COMMAND + ITKImageFunctionTestDriver + itkInterpolateTest) +itk_add_test( + NAME + itkRGBInterpolateImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkRGBInterpolateImageFunctionTest) -itk_add_test(NAME itkWindowedSincInterpolateImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkWindowedSincInterpolateImageFunctionTest) -itk_add_test(NAME itkLinearInterpolateImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkLinearInterpolateImageFunctionTest) -itk_add_test(NAME itkNeighborhoodOperatorImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkNeighborhoodOperatorImageFunctionTest) -itk_add_test(NAME itkNearestNeighborInterpolateImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkNearestNeighborInterpolateImageFunctionTest) -itk_add_test(NAME itkGaussianInterpolateImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkGaussianInterpolateImageFunctionTest) -itk_add_test(NAME itkLabelImageGaussianInterpolateImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkLabelImageGaussianInterpolateImageFunctionTest) +itk_add_test( + NAME + itkWindowedSincInterpolateImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkWindowedSincInterpolateImageFunctionTest) +itk_add_test( + NAME + itkLinearInterpolateImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkLinearInterpolateImageFunctionTest) +itk_add_test( + NAME + itkNeighborhoodOperatorImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkNeighborhoodOperatorImageFunctionTest) +itk_add_test( + NAME + itkNearestNeighborInterpolateImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkNearestNeighborInterpolateImageFunctionTest) +itk_add_test( + NAME + itkGaussianInterpolateImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkGaussianInterpolateImageFunctionTest) +itk_add_test( + NAME + itkLabelImageGaussianInterpolateImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkLabelImageGaussianInterpolateImageFunctionTest) -itk_add_test(NAME itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest - COMMAND ITKImageFunctionTestDriver itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest) +itk_add_test( + NAME + itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest + COMMAND + ITKImageFunctionTestDriver + itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest) -set(ITKImageFunctionGTests - itkSumOfSquaresImageFunctionGTest.cxx -) -CreateGoogleTestDriver(ITKImageFunction "${ITKImageFunction-Test_LIBRARIES}" "${ITKImageFunctionGTests}") +set(ITKImageFunctionGTests itkSumOfSquaresImageFunctionGTest.cxx) +creategoogletestdriver(ITKImageFunction "${ITKImageFunction-Test_LIBRARIES}" "${ITKImageFunctionGTests}") diff --git a/Modules/Core/ImageFunction/wrapping/CMakeLists.txt b/Modules/Core/ImageFunction/wrapping/CMakeLists.txt index 827ddee3dcf..75efa9a8a29 100644 --- a/Modules/Core/ImageFunction/wrapping/CMakeLists.txt +++ b/Modules/Core/ImageFunction/wrapping/CMakeLists.txt @@ -1,5 +1,3 @@ itk_wrap_module(ITKImageFunction) -set(WRAPPER_SUBMODULE_ORDER - itkImageFunctionBase -) +set(WRAPPER_SUBMODULE_ORDER itkImageFunctionBase) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Core/ImageFunction/wrapping/itkBSplineDecompositionImageFilter.wrap b/Modules/Core/ImageFunction/wrapping/itkBSplineDecompositionImageFilter.wrap index 81a49c567e9..0f2a54a679d 100644 --- a/Modules/Core/ImageFunction/wrapping/itkBSplineDecompositionImageFilter.wrap +++ b/Modules/Core/ImageFunction/wrapping/itkBSplineDecompositionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BSplineDecompositionImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Core/ImageFunction/wrapping/itkBSplineInterpolateImageFunction.wrap b/Modules/Core/ImageFunction/wrapping/itkBSplineInterpolateImageFunction.wrap index a22437ff10c..38c3feb44e8 100644 --- a/Modules/Core/ImageFunction/wrapping/itkBSplineInterpolateImageFunction.wrap +++ b/Modules/Core/ImageFunction/wrapping/itkBSplineInterpolateImageFunction.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::BSplineInterpolateImageFunction" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - # itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D}") - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}${ITKM_${t}}" "${ITKT_I${t}${d}},${ITKT_D},${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + # itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D}") + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}${ITKM_${t}}" "${ITKT_I${t}${d}},${ITKT_D},${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/ImageFunction/wrapping/itkBSplineResampleImageFunction.wrap b/Modules/Core/ImageFunction/wrapping/itkBSplineResampleImageFunction.wrap index 279b91dfd8b..6406e8c588e 100644 --- a/Modules/Core/ImageFunction/wrapping/itkBSplineResampleImageFunction.wrap +++ b/Modules/Core/ImageFunction/wrapping/itkBSplineResampleImageFunction.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::BSplineResampleImageFunction" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/ImageFunction/wrapping/itkExtrapolateImageFunction.wrap b/Modules/Core/ImageFunction/wrapping/itkExtrapolateImageFunction.wrap index 5fffbbf1de6..8cfbef2888c 100644 --- a/Modules/Core/ImageFunction/wrapping/itkExtrapolateImageFunction.wrap +++ b/Modules/Core/ImageFunction/wrapping/itkExtrapolateImageFunction.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::ExtrapolateImageFunction" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/ImageFunction/wrapping/itkGaussianInterpolateImageFunction.wrap b/Modules/Core/ImageFunction/wrapping/itkGaussianInterpolateImageFunction.wrap index 14a2542e29f..0832805097f 100644 --- a/Modules/Core/ImageFunction/wrapping/itkGaussianInterpolateImageFunction.wrap +++ b/Modules/Core/ImageFunction/wrapping/itkGaussianInterpolateImageFunction.wrap @@ -1,17 +1,17 @@ itk_wrap_include("itkPhasedArray3DSpecialCoordinatesImage.h") itk_wrap_class("itk::GaussianInterpolateImageFunction" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D}") endforeach() +endforeach() - set(PA3DSCI_types "F") - if(ITK_WRAP_unsigned_char) - list(APPEND PA3DSCI_types "UC") - endif() - foreach(t ${PA3DSCI_types}) - itk_wrap_template("PA3DSCI${ITKM_${t}}${ITKM_D}" - "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, ${ITKT_D}") - endforeach() +set(PA3DSCI_types "F") +if(ITK_WRAP_unsigned_char) + list(APPEND PA3DSCI_types "UC") +endif() +foreach(t ${PA3DSCI_types}) + itk_wrap_template("PA3DSCI${ITKM_${t}}${ITKM_D}" + "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, ${ITKT_D}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/ImageFunction/wrapping/itkImageFunctionBase.wrap b/Modules/Core/ImageFunction/wrapping/itkImageFunctionBase.wrap index 2b3188d42a0..9be321aeea9 100644 --- a/Modules/Core/ImageFunction/wrapping/itkImageFunctionBase.wrap +++ b/Modules/Core/ImageFunction/wrapping/itkImageFunctionBase.wrap @@ -1,44 +1,41 @@ itk_wrap_include("itkPhasedArray3DSpecialCoordinatesImage.h") itk_wrap_class("itk::ImageFunction" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - # UC is required for InterpolateImageFunction - UNIQUE(types "${WRAP_ITK_SCALAR};UC") - foreach(t ${types}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}${ITKM_F}" "${ITKT_I${t}${d}},${ITKT_D},${ITKT_F}") - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D},${ITKT_D}") - endforeach() - - # Required by InterpolateImageFunction - set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions - foreach(t ${WRAP_ITK_VECTOR}) - itk_wrap_template( - "${ITKM_I${t}${vector_dim}${d}}${ITKM_VD${vector_dim}}${ITKM_D}" - "${ITKT_I${t}${vector_dim}${d}},${ITKT_VD${vector_dim}},${ITKT_D}") - itk_wrap_template( - "${ITKM_I${t}${vector_dim}${d}}${ITKM_CVD${vector_dim}}${ITKM_D}" - "${ITKT_I${t}${vector_dim}${d}},${ITKT_CVD${vector_dim}},${ITKT_D}") - itk_wrap_template( - "${ITKM_I${t}${vector_dim}${d}}${ITKM_D}${ITKM_D}" - "${ITKT_I${t}${vector_dim}${d}},${ITKT_D},${ITKT_D}") - endforeach() - foreach(t ${WRAP_ITK_COLOR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_${t}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_${t}},${ITKT_D}") - endforeach() - foreach(t ${WRAP_ITK_RGB}) - itk_wrap_template("${ITKM_I${t}${d}}RGBD${ITKM_D}" "${ITKT_I${t}${d}},itk::RGBPixel< double >,${ITKT_D}") - endforeach() - foreach(t ${WRAP_ITK_RGBA}) - itk_wrap_template("${ITKM_I${t}${d}}RGBAD${ITKM_D}" "${ITKT_I${t}${d}},itk::RGBAPixel< double >,${ITKT_D}") - endforeach() - +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + # UC is required for InterpolateImageFunction + unique(types "${WRAP_ITK_SCALAR};UC") + foreach(t ${types}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}${ITKM_F}" "${ITKT_I${t}${d}},${ITKT_D},${ITKT_F}") + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D},${ITKT_D}") endforeach() - set(PA3DSCI_types "F") - if(ITK_WRAP_unsigned_char) - list(APPEND PA3DSCI_types "UC") - endif() - foreach(t ${PA3DSCI_types}) - itk_wrap_template("PA3DSCI${ITKM_${t}}${ITKM_D}" - "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, ${ITKT_D}, ${ITKT_D}") + # Required by InterpolateImageFunction + set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions + foreach(t ${WRAP_ITK_VECTOR}) + itk_wrap_template("${ITKM_I${t}${vector_dim}${d}}${ITKM_VD${vector_dim}}${ITKM_D}" + "${ITKT_I${t}${vector_dim}${d}},${ITKT_VD${vector_dim}},${ITKT_D}") + itk_wrap_template("${ITKM_I${t}${vector_dim}${d}}${ITKM_CVD${vector_dim}}${ITKM_D}" + "${ITKT_I${t}${vector_dim}${d}},${ITKT_CVD${vector_dim}},${ITKT_D}") + itk_wrap_template("${ITKM_I${t}${vector_dim}${d}}${ITKM_D}${ITKM_D}" + "${ITKT_I${t}${vector_dim}${d}},${ITKT_D},${ITKT_D}") + endforeach() + foreach(t ${WRAP_ITK_COLOR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_${t}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_${t}},${ITKT_D}") + endforeach() + foreach(t ${WRAP_ITK_RGB}) + itk_wrap_template("${ITKM_I${t}${d}}RGBD${ITKM_D}" "${ITKT_I${t}${d}},itk::RGBPixel< double >,${ITKT_D}") endforeach() + foreach(t ${WRAP_ITK_RGBA}) + itk_wrap_template("${ITKM_I${t}${d}}RGBAD${ITKM_D}" "${ITKT_I${t}${d}},itk::RGBAPixel< double >,${ITKT_D}") + endforeach() + +endforeach() + +set(PA3DSCI_types "F") +if(ITK_WRAP_unsigned_char) + list(APPEND PA3DSCI_types "UC") +endif() +foreach(t ${PA3DSCI_types}) + itk_wrap_template("PA3DSCI${ITKM_${t}}${ITKM_D}" + "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, ${ITKT_D}, ${ITKT_D}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/ImageFunction/wrapping/itkInterpolateImageFunction.wrap b/Modules/Core/ImageFunction/wrapping/itkInterpolateImageFunction.wrap index c2e785c27b1..bfaccbdd66c 100644 --- a/Modules/Core/ImageFunction/wrapping/itkInterpolateImageFunction.wrap +++ b/Modules/Core/ImageFunction/wrapping/itkInterpolateImageFunction.wrap @@ -1,27 +1,26 @@ itk_wrap_include("itkPhasedArray3DSpecialCoordinatesImage.h") itk_wrap_class("itk::InterpolateImageFunction" POINTER) - UNIQUE(types "${WRAP_ITK_SCALAR};UC") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D}") - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_F}" "${ITKT_I${t}${d}},${ITKT_F}") - endforeach() - set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions - foreach(v ${WRAP_ITK_VECTOR}) - itk_wrap_template( - "${ITKM_I${v}${vector_dim}${d}}${ITKM_D}" - "${ITKT_I${v}${vector_dim}${d}},${ITKT_D}") - endforeach() - foreach(v ${WRAP_ITK_COLOR}) - itk_wrap_template("${ITKM_I${v}${d}}${ITKM_D}" "${ITKT_I${v}${d}},${ITKT_D}") - endforeach() +unique(types "${WRAP_ITK_SCALAR};UC") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D}") + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_F}" "${ITKT_I${t}${d}},${ITKT_F}") endforeach() - - set(PA3DSCI_types "F") - if(ITK_WRAP_unsigned_char) - list(APPEND PA3DSCI_types "UC") - endif() - foreach(t ${PA3DSCI_types}) - itk_wrap_template("PA3DSCI${ITKM_${t}}${ITKM_D}" "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, ${ITKT_D}") + set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions + foreach(v ${WRAP_ITK_VECTOR}) + itk_wrap_template("${ITKM_I${v}${vector_dim}${d}}${ITKM_D}" "${ITKT_I${v}${vector_dim}${d}},${ITKT_D}") + endforeach() + foreach(v ${WRAP_ITK_COLOR}) + itk_wrap_template("${ITKM_I${v}${d}}${ITKM_D}" "${ITKT_I${v}${d}},${ITKT_D}") endforeach() +endforeach() + +set(PA3DSCI_types "F") +if(ITK_WRAP_unsigned_char) + list(APPEND PA3DSCI_types "UC") +endif() +foreach(t ${PA3DSCI_types}) + itk_wrap_template("PA3DSCI${ITKM_${t}}${ITKM_D}" + "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, ${ITKT_D}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/ImageFunction/wrapping/itkLabelImageGaussianInterpolateImageFunction.wrap b/Modules/Core/ImageFunction/wrapping/itkLabelImageGaussianInterpolateImageFunction.wrap index 85492f3e211..1ee3fac6782 100644 --- a/Modules/Core/ImageFunction/wrapping/itkLabelImageGaussianInterpolateImageFunction.wrap +++ b/Modules/Core/ImageFunction/wrapping/itkLabelImageGaussianInterpolateImageFunction.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::LabelImageGaussianInterpolateImageFunction" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_INT}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_INT}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/ImageFunction/wrapping/itkLinearInterpolateImageFunction.wrap b/Modules/Core/ImageFunction/wrapping/itkLinearInterpolateImageFunction.wrap index 8479eaf0cd9..9bdc36a12c0 100644 --- a/Modules/Core/ImageFunction/wrapping/itkLinearInterpolateImageFunction.wrap +++ b/Modules/Core/ImageFunction/wrapping/itkLinearInterpolateImageFunction.wrap @@ -1,26 +1,24 @@ itk_wrap_include("itkPhasedArray3DSpecialCoordinatesImage.h") itk_wrap_class("itk::LinearInterpolateImageFunction" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D}") - endforeach() - set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions - foreach(v ${WRAP_ITK_VECTOR}) - itk_wrap_template( - "${ITKM_I${v}${vector_dim}${d}}${ITKM_D}" - "${ITKT_I${v}${vector_dim}${d}},${ITKT_D}") - endforeach() - foreach(v ${WRAP_ITK_COLOR}) - itk_wrap_template("${ITKM_I${v}${d}}${ITKM_D}" "${ITKT_I${v}${d}},${ITKT_D}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D}") endforeach() - - set(PA3DSCI_types "F") - if(ITK_WRAP_unsigned_char) - list(APPEND PA3DSCI_types "UC") - endif() - foreach(t ${PA3DSCI_types}) - itk_wrap_template("PA3DSCI${ITKM_${t}}${ITKM_D}" - "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, ${ITKT_D}") + set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions + foreach(v ${WRAP_ITK_VECTOR}) + itk_wrap_template("${ITKM_I${v}${vector_dim}${d}}${ITKM_D}" "${ITKT_I${v}${vector_dim}${d}},${ITKT_D}") + endforeach() + foreach(v ${WRAP_ITK_COLOR}) + itk_wrap_template("${ITKM_I${v}${d}}${ITKM_D}" "${ITKT_I${v}${d}},${ITKT_D}") endforeach() +endforeach() + +set(PA3DSCI_types "F") +if(ITK_WRAP_unsigned_char) + list(APPEND PA3DSCI_types "UC") +endif() +foreach(t ${PA3DSCI_types}) + itk_wrap_template("PA3DSCI${ITKM_${t}}${ITKM_D}" + "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, ${ITKT_D}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/ImageFunction/wrapping/itkNearestNeighborInterpolateImageFunction.wrap b/Modules/Core/ImageFunction/wrapping/itkNearestNeighborInterpolateImageFunction.wrap index 7fc7d4141bf..bb8e3efa768 100644 --- a/Modules/Core/ImageFunction/wrapping/itkNearestNeighborInterpolateImageFunction.wrap +++ b/Modules/Core/ImageFunction/wrapping/itkNearestNeighborInterpolateImageFunction.wrap @@ -1,17 +1,17 @@ itk_wrap_include("itkPhasedArray3DSpecialCoordinatesImage.h") itk_wrap_class("itk::NearestNeighborInterpolateImageFunction" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D}") endforeach() +endforeach() - set(PA3DSCI_types "F") - if(ITK_WRAP_unsigned_char) - list(APPEND PA3DSCI_types "UC") - endif() - foreach(t ${PA3DSCI_types}) - itk_wrap_template("PA3DSCI${ITKM_${t}}${ITKM_D}" - "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, ${ITKT_D}") - endforeach() +set(PA3DSCI_types "F") +if(ITK_WRAP_unsigned_char) + list(APPEND PA3DSCI_types "UC") +endif() +foreach(t ${PA3DSCI_types}) + itk_wrap_template("PA3DSCI${ITKM_${t}}${ITKM_D}" + "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, ${ITKT_D}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/ImageFunction/wrapping/itkRayCastInterpolateImageFunction.wrap b/Modules/Core/ImageFunction/wrapping/itkRayCastInterpolateImageFunction.wrap index 9337a5da590..609377b7d36 100644 --- a/Modules/Core/ImageFunction/wrapping/itkRayCastInterpolateImageFunction.wrap +++ b/Modules/Core/ImageFunction/wrapping/itkRayCastInterpolateImageFunction.wrap @@ -1,14 +1,14 @@ itk_wrap_filter_dims(has_d_3 3) if(has_d_3) - set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) - itk_wrap_include("itkRayCastInterpolateImageFunction.h") - itk_wrap_simple_class("RayCastHelperEnums") - itk_wrap_class("itk::RayCastInterpolateImageFunction" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - # This interpolator works for 3-dimensional images only. - itk_wrap_template("${ITKM_I${t}3}${ITKM_D}" "${ITKT_I${t}3},${ITKT_D}") - itk_wrap_template("${ITKM_I${t}3}${ITKM_F}" "${ITKT_I${t}3},${ITKT_F}") - endforeach() - itk_end_wrap_class() + set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) + itk_wrap_include("itkRayCastInterpolateImageFunction.h") + itk_wrap_simple_class("RayCastHelperEnums") + itk_wrap_class("itk::RayCastInterpolateImageFunction" POINTER) + foreach(t ${WRAP_ITK_SCALAR}) + # This interpolator works for 3-dimensional images only. + itk_wrap_template("${ITKM_I${t}3}${ITKM_D}" "${ITKT_I${t}3},${ITKT_D}") + itk_wrap_template("${ITKM_I${t}3}${ITKM_F}" "${ITKT_I${t}3},${ITKT_F}") + endforeach() + itk_end_wrap_class() endif() diff --git a/Modules/Core/ImageFunction/wrapping/itkWindowedSincInterpolateImageFunction.wrap b/Modules/Core/ImageFunction/wrapping/itkWindowedSincInterpolateImageFunction.wrap index e3c79750efb..490e2515486 100644 --- a/Modules/Core/ImageFunction/wrapping/itkWindowedSincInterpolateImageFunction.wrap +++ b/Modules/Core/ImageFunction/wrapping/itkWindowedSincInterpolateImageFunction.wrap @@ -2,36 +2,44 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkWindowedSincInterpolateImageFunction.h") itk_wrap_include("itkPhasedArray3DSpecialCoordinatesImage.h") -set(window_functions "Hamming" "Cosine" "Welch" "Lanczos") +set(window_functions + "Hamming" + "Cosine" + "Welch" + "Lanczos") set(radii 2 3) foreach(function ${window_functions}) itk_wrap_class("itk::Function::${function}WindowFunction") - foreach(r ${radii}) - itk_wrap_template("${r}" "${r}") - endforeach() + foreach(r ${radii}) + itk_wrap_template("${r}" "${r}") + endforeach() itk_end_wrap_class() endforeach() itk_wrap_class("itk::WindowedSincInterpolateImageFunction" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - foreach(r ${radii}) # radius - foreach(function ${window_functions}) - itk_wrap_template("${ITKM_I${t}${d}}${r}${function}" "${ITKT_I${t}${d}}, ${r}, itk::Function::${function}WindowFunction< ${r} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + foreach(r ${radii}) # radius + foreach(function ${window_functions}) + itk_wrap_template("${ITKM_I${t}${d}}${r}${function}" + "${ITKT_I${t}${d}}, ${r}, itk::Function::${function}WindowFunction< ${r} >") endforeach() endforeach() endforeach() +endforeach() - set(PA3DSCI_types "F") - if(ITK_WRAP_unsigned_char) - list(APPEND PA3DSCI_types "UC") - endif() - foreach(t ${PA3DSCI_types}) - foreach(r ${radii}) # radius - foreach(function ${window_functions}) - itk_wrap_template("PA3DSCI${ITKM_${t}}${r}${function}" "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, ${r}, itk::Function::${function}WindowFunction< ${r} >") - endforeach() +set(PA3DSCI_types "F") +if(ITK_WRAP_unsigned_char) + list(APPEND PA3DSCI_types "UC") +endif() +foreach(t ${PA3DSCI_types}) + foreach(r ${radii}) # radius + foreach(function ${window_functions}) + itk_wrap_template( + "PA3DSCI${ITKM_${t}}${r}${function}" + "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, ${r}, itk::Function::${function}WindowFunction< ${r} >" + ) endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/ImageFunction/wrapping/test/CMakeLists.txt b/Modules/Core/ImageFunction/wrapping/test/CMakeLists.txt index bcdc241ed61..0e499c0eaf0 100644 --- a/Modules/Core/ImageFunction/wrapping/test/CMakeLists.txt +++ b/Modules/Core/ImageFunction/wrapping/test/CMakeLists.txt @@ -1,6 +1,12 @@ if(ITK_WRAP_PYTHON) - itk_python_expression_add_test(NAME itkExtrapolateImageFunctionPythonTest - EXPRESSION "extrapolate = itk.ExtrapolateImageFunction.New()") - itk_python_expression_add_test(NAME itkWindowedSincInterpolateImageFunctionPythonTest - EXPRESSION "windowed_sinc = itk.WindowedSincInterpolateImageFunction.New()") + itk_python_expression_add_test( + NAME + itkExtrapolateImageFunctionPythonTest + EXPRESSION + "extrapolate = itk.ExtrapolateImageFunction.New()") + itk_python_expression_add_test( + NAME + itkWindowedSincInterpolateImageFunctionPythonTest + EXPRESSION + "windowed_sinc = itk.WindowedSincInterpolateImageFunction.New()") endif() diff --git a/Modules/Core/Mesh/itk-module.cmake b/Modules/Core/Mesh/itk-module.cmake index 75d754d5ad3..6ca48e0ef86 100644 --- a/Modules/Core/Mesh/itk-module.cmake +++ b/Modules/Core/Mesh/itk-module.cmake @@ -1,25 +1,26 @@ -set(DOCUMENTATION "The Mesh module contains the datastructures required for +set(DOCUMENTATION + "The Mesh module contains the datastructures required for representing N-Dimensional meshes in ITK. The Mesh class is heavily templated and very generic. It can represent a K-Complex in an N-Dimensional space. Many of the Mesh properties are defined in Traits helper classes, and then propagate to the components of the Mesh. These classes are typically used for representing the outcome of image segmentation.") -itk_module(ITKMesh +itk_module( + ITKMesh ENABLE_SHARED DEPENDS - ITKTransform + ITKTransform TEST_DEPENDS - ITKTestKernel - ITKSpatialObjects - ITKIOSpatialObjects - ITKImageGrid - ITKIOMesh - ITKMetaIO - ITKTransform - ITKThresholding + ITKTestKernel + ITKSpatialObjects + ITKIOSpatialObjects + ITKImageGrid + ITKIOMesh + ITKMetaIO + ITKTransform + ITKThresholding DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") # Extra test dependency on IO-SpatialObjects is caused by itkMeshSpatialObjectIOTest. diff --git a/Modules/Core/Mesh/src/CMakeLists.txt b/Modules/Core/Mesh/src/CMakeLists.txt index 76cef2d6056..3f6a8417eec 100644 --- a/Modules/Core/Mesh/src/CMakeLists.txt +++ b/Modules/Core/Mesh/src/CMakeLists.txt @@ -1,7 +1,3 @@ -set(ITKMesh_SRCS - itkMeshRegion.cxx - itkSimplexMeshGeometry.cxx - itkTriangleMeshCurvatureCalculator.cxx - ) +set(ITKMesh_SRCS itkMeshRegion.cxx itkSimplexMeshGeometry.cxx itkTriangleMeshCurvatureCalculator.cxx) itk_module_add_library(ITKMesh ${ITKMesh_SRCS}) diff --git a/Modules/Core/Mesh/test/CMakeLists.txt b/Modules/Core/Mesh/test/CMakeLists.txt index 2f4def587e9..4a9136535b7 100644 --- a/Modules/Core/Mesh/test/CMakeLists.txt +++ b/Modules/Core/Mesh/test/CMakeLists.txt @@ -1,220 +1,492 @@ itk_module_test() set(ITKMeshTests -itkAutomaticTopologyMeshSourceTest.cxx -itkImageToParametricSpaceFilterTest.cxx -itkInteriorExteriorMeshFilterTest.cxx -itkParametricSpaceToImageSpaceMeshFilterTest.cxx -itkRegularSphereMeshSourceTest.cxx -itkRegularSphereMeshSourceTest2.cxx -itkSimplexMeshTest.cxx -itkSimplexMeshAdaptTopologyFilterTest.cxx -itkSimplexMeshToTriangleMeshFilterTest.cxx -itkSimplexMeshVolumeCalculatorTest.cxx -itkSphereMeshSourceTest.cxx -itkTransformMeshFilterTest.cxx -itkTriangleMeshToBinaryImageFilterTest.cxx -itkTriangleMeshToBinaryImageFilterTest1.cxx -itkTriangleMeshToBinaryImageFilterTest2.cxx -itkTriangleMeshToBinaryImageFilterTest3.cxx -itkTriangleMeshToBinaryImageFilterTest4.cxx -itkTriangleMeshToSimplexMeshFilterTest.cxx -itkVTKPolyDataReaderTest.cxx -itkVTKPolyDataWriterTest01.cxx -itkVTKPolyDataWriterTest02.cxx -itkWarpMeshFilterTest.cxx -itkMeshTest.cxx -itkBinaryMask3DMeshSourceTest.cxx -itkDynamicMeshTest.cxx -itkConnectedRegionsMeshFilterTest1.cxx -itkConnectedRegionsMeshFilterTest2.cxx -itkMeshFstreamTest.cxx -itkMeshSourceGraftOutputTest.cxx -itkMeshSpatialObjectIOTest.cxx -itkTriangleMeshToSimplexMeshFilter2Test.cxx -itkCellInterfaceTest.cxx -itkNewTest.cxx -itkQuadrilateralCellTest.cxx -itkTriangleCellTest.cxx -itkMeshCellDataTest.cxx -itkTriangleMeshCurvatureCalculatorTest.cxx -) + itkAutomaticTopologyMeshSourceTest.cxx + itkImageToParametricSpaceFilterTest.cxx + itkInteriorExteriorMeshFilterTest.cxx + itkParametricSpaceToImageSpaceMeshFilterTest.cxx + itkRegularSphereMeshSourceTest.cxx + itkRegularSphereMeshSourceTest2.cxx + itkSimplexMeshTest.cxx + itkSimplexMeshAdaptTopologyFilterTest.cxx + itkSimplexMeshToTriangleMeshFilterTest.cxx + itkSimplexMeshVolumeCalculatorTest.cxx + itkSphereMeshSourceTest.cxx + itkTransformMeshFilterTest.cxx + itkTriangleMeshToBinaryImageFilterTest.cxx + itkTriangleMeshToBinaryImageFilterTest1.cxx + itkTriangleMeshToBinaryImageFilterTest2.cxx + itkTriangleMeshToBinaryImageFilterTest3.cxx + itkTriangleMeshToBinaryImageFilterTest4.cxx + itkTriangleMeshToSimplexMeshFilterTest.cxx + itkVTKPolyDataReaderTest.cxx + itkVTKPolyDataWriterTest01.cxx + itkVTKPolyDataWriterTest02.cxx + itkWarpMeshFilterTest.cxx + itkMeshTest.cxx + itkBinaryMask3DMeshSourceTest.cxx + itkDynamicMeshTest.cxx + itkConnectedRegionsMeshFilterTest1.cxx + itkConnectedRegionsMeshFilterTest2.cxx + itkMeshFstreamTest.cxx + itkMeshSourceGraftOutputTest.cxx + itkMeshSpatialObjectIOTest.cxx + itkTriangleMeshToSimplexMeshFilter2Test.cxx + itkCellInterfaceTest.cxx + itkNewTest.cxx + itkQuadrilateralCellTest.cxx + itkTriangleCellTest.cxx + itkMeshCellDataTest.cxx + itkTriangleMeshCurvatureCalculatorTest.cxx) set(ITKMesh-Test_LIBRARIES ${ITKMesh-Test_LIBRARIES}) -CreateTestDriver(ITKMesh "${ITKMesh-Test_LIBRARIES}" "${ITKMeshTests}") +createtestdriver(ITKMesh "${ITKMesh-Test_LIBRARIES}" "${ITKMeshTests}") -itk_add_test(NAME itkMeshTest - COMMAND ITKMeshTestDriver itkMeshTest) -itk_add_test(NAME itkSimplexMeshTest - COMMAND ITKMeshTestDriver itkSimplexMeshTest) -itk_add_test(NAME itkAutomaticTopologyMeshSourceTest - COMMAND ITKMeshTestDriver itkAutomaticTopologyMeshSourceTest) -itk_add_test(NAME itkBinaryMask3DMeshSourceTestRegionOff - COMMAND ITKMeshTestDriver itkBinaryMask3DMeshSourceTest 0) -itk_add_test(NAME itkBinaryMask3DMeshSourceTestRegionOn - COMMAND ITKMeshTestDriver itkBinaryMask3DMeshSourceTest 1) -itk_add_test(NAME itkImageToParametricSpaceFilterTest - COMMAND ITKMeshTestDriver itkImageToParametricSpaceFilterTest) -itk_add_test(NAME itkInteriorExteriorMeshFilterTest - COMMAND ITKMeshTestDriver itkInteriorExteriorMeshFilterTest) -itk_add_test(NAME itkRegularSphereMeshSourceTest - COMMAND ITKMeshTestDriver itkRegularSphereMeshSourceTest) -itk_add_test(NAME itkRegularSphereMeshSourceTest2 - COMMAND ITKMeshTestDriver itkRegularSphereMeshSourceTest2) -itk_add_test(NAME itkSimplexMeshAdaptTopologyFilterTest - COMMAND ITKMeshTestDriver itkSimplexMeshAdaptTopologyFilterTest 0.5 0) -itk_add_test(NAME itkSimplexMeshToTriangleMeshFilterTest - COMMAND ITKMeshTestDriver itkSimplexMeshToTriangleMeshFilterTest) -itk_add_test(NAME itkSimplexMeshVolumeCalculatorTest - COMMAND ITKMeshTestDriver itkSimplexMeshVolumeCalculatorTest) -itk_add_test(NAME itkSphereMeshSourceTest - COMMAND ITKMeshTestDriver itkSphereMeshSourceTest) -itk_add_test(NAME itkTransformMeshFilterTest - COMMAND ITKMeshTestDriver itkTransformMeshFilterTest) -itk_add_test(NAME itkTriangleMeshToBinaryImageFilterTest - COMMAND ITKMeshTestDriver itkTriangleMeshToBinaryImageFilterTest - ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest.mha) -itk_add_test(NAME itkTriangleMeshToBinaryImageFilterTest1 - COMMAND ITKMeshTestDriver itkTriangleMeshToBinaryImageFilterTest1 - ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest1.mha) -itk_add_test(NAME itkTriangleMeshToBinaryImageFilterTest2 - COMMAND ITKMeshTestDriver - --redirectOutput ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest2.txt - --compare DATA{Baseline/itkTriangleMeshToBinaryImageFilterTest2.mha} - ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest2.mha - --compareIntensityTolerance 0 - itkTriangleMeshToBinaryImageFilterTest2 - ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest2.mha) -set_tests_properties(itkTriangleMeshToBinaryImageFilterTest2 PROPERTIES - ATTACHED_FILES_ON_FAIL ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest2.txt) -itk_add_test(NAME itkTriangleMeshToBinaryImageFilterTest3 - COMMAND ITKMeshTestDriver itkTriangleMeshToBinaryImageFilterTest3 - DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk} ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest3.mha 140 160 180 -0.7 -0.8 -0.9 0.01 0.01 0.01) -itk_add_test(NAME itkTriangleMeshToBinaryImageFilterTest4 - COMMAND ITKMeshTestDriver itkTriangleMeshToBinaryImageFilterTest4 - DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk} ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest4.mha 140 160 180 -0.7 -0.8 -0.9 0.01 0.01 0.01) -itk_add_test(NAME itkTriangleMeshToSimplexMeshFilterTest - COMMAND ITKMeshTestDriver itkTriangleMeshToSimplexMeshFilterTest) -itk_add_test(NAME itkVTKPolyDataReaderTest - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderTest2 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/sphereBinary.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest0 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad0.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest1 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad1.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest2 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad2.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest3 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad3.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest4 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad4.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest5 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad5.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest6 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad6.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest7 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad7.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest8 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad8.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest9 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad9.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest10 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad10.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest11 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad11.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest12 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad12.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest13 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad13.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest14 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad14.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest15 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad15.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest16 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad16.vtk}) -itk_add_test(NAME itkVTKPolyDataReaderBadTest17 - COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest - DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad17.vtk}) -itk_add_test(NAME itkVTKPolyDataWriterTest01 - COMMAND ITKMeshTestDriver itkVTKPolyDataWriterTest01 - ${ITK_TEST_OUTPUT_DIR}/VTKPolyDataWriterTest01.vtk) -itk_add_test(NAME itkVTKPolyDataWriterTest02 - COMMAND ITKMeshTestDriver itkVTKPolyDataWriterTest02 - ${ITK_TEST_OUTPUT_DIR}/VTKPolyDataWriterTest02.vtk) -itk_add_test(NAME itkWarpMeshFilterTest - COMMAND ITKMeshTestDriver itkWarpMeshFilterTest) -itk_add_test(NAME itkDynamicMeshTest - COMMAND ITKMeshTestDriver itkDynamicMeshTest) -itk_add_test(NAME itkConnectedRegionsMeshFilterTest1 - COMMAND ITKMeshTestDriver itkConnectedRegionsMeshFilterTest1) -itk_add_test(NAME itkConnectedRegionsMeshFilterTest2 - COMMAND ITKMeshTestDriver itkConnectedRegionsMeshFilterTest2 - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} 15 2154) -itk_add_test(NAME itkMeshFstreamTest - COMMAND ITKMeshTestDriver itkMeshFstreamTest - ${ITK_TEST_OUTPUT_DIR}/testMeshFstream.txt) -itk_add_test(NAME itkMeshSourceGraftOutputTest - COMMAND ITKMeshTestDriver itkMeshSourceGraftOutputTest) -itk_add_test(NAME itkMeshSpatialObjectIOTest - COMMAND ITKMeshTestDriver itkMeshSpatialObjectIOTest - ${ITK_TEST_OUTPUT_DIR}/metameshIOTest.txt) -itk_add_test(NAME itkMeshSpatialObjectIOTest1 - COMMAND ITKMeshTestDriver itkMeshSpatialObjectIOTest - ${ITK_TEST_OUTPUT_DIR}/metameshIOTest1.txt binary) -itk_add_test(NAME itkMeshSpatialObjectIOTest2 - COMMAND ITKMeshTestDriver itkMeshSpatialObjectIOTest - ${ITK_TEST_OUTPUT_DIR}/metameshIOTest2.txt DATA{${ITK_DATA_ROOT}/Input/metamesh.txt}) -itk_add_test(NAME itkParametricSpaceToImageSpaceMeshFilterTest - COMMAND ITKMeshTestDriver itkParametricSpaceToImageSpaceMeshFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png}) -itk_add_test(NAME itkTriangleMeshToSimplexMeshFilter2Test - COMMAND ITKMeshTestDriver itkTriangleMeshToSimplexMeshFilter2Test) -itk_add_test(NAME itkTriangleMeshCurvatureCalculatorTest - COMMAND ITKMeshTestDriver itkTriangleMeshCurvatureCalculatorTest - DATA{${ITK_DATA_ROOT}/Input/mushroom.vtk}) +itk_add_test( + NAME + itkMeshTest + COMMAND + ITKMeshTestDriver + itkMeshTest) +itk_add_test( + NAME + itkSimplexMeshTest + COMMAND + ITKMeshTestDriver + itkSimplexMeshTest) +itk_add_test( + NAME + itkAutomaticTopologyMeshSourceTest + COMMAND + ITKMeshTestDriver + itkAutomaticTopologyMeshSourceTest) +itk_add_test( + NAME + itkBinaryMask3DMeshSourceTestRegionOff + COMMAND + ITKMeshTestDriver + itkBinaryMask3DMeshSourceTest + 0) +itk_add_test( + NAME + itkBinaryMask3DMeshSourceTestRegionOn + COMMAND + ITKMeshTestDriver + itkBinaryMask3DMeshSourceTest + 1) +itk_add_test( + NAME + itkImageToParametricSpaceFilterTest + COMMAND + ITKMeshTestDriver + itkImageToParametricSpaceFilterTest) +itk_add_test( + NAME + itkInteriorExteriorMeshFilterTest + COMMAND + ITKMeshTestDriver + itkInteriorExteriorMeshFilterTest) +itk_add_test( + NAME + itkRegularSphereMeshSourceTest + COMMAND + ITKMeshTestDriver + itkRegularSphereMeshSourceTest) +itk_add_test( + NAME + itkRegularSphereMeshSourceTest2 + COMMAND + ITKMeshTestDriver + itkRegularSphereMeshSourceTest2) +itk_add_test( + NAME + itkSimplexMeshAdaptTopologyFilterTest + COMMAND + ITKMeshTestDriver + itkSimplexMeshAdaptTopologyFilterTest + 0.5 + 0) +itk_add_test( + NAME + itkSimplexMeshToTriangleMeshFilterTest + COMMAND + ITKMeshTestDriver + itkSimplexMeshToTriangleMeshFilterTest) +itk_add_test( + NAME + itkSimplexMeshVolumeCalculatorTest + COMMAND + ITKMeshTestDriver + itkSimplexMeshVolumeCalculatorTest) +itk_add_test( + NAME + itkSphereMeshSourceTest + COMMAND + ITKMeshTestDriver + itkSphereMeshSourceTest) +itk_add_test( + NAME + itkTransformMeshFilterTest + COMMAND + ITKMeshTestDriver + itkTransformMeshFilterTest) +itk_add_test( + NAME + itkTriangleMeshToBinaryImageFilterTest + COMMAND + ITKMeshTestDriver + itkTriangleMeshToBinaryImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest.mha) +itk_add_test( + NAME + itkTriangleMeshToBinaryImageFilterTest1 + COMMAND + ITKMeshTestDriver + itkTriangleMeshToBinaryImageFilterTest1 + ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest1.mha) +itk_add_test( + NAME + itkTriangleMeshToBinaryImageFilterTest2 + COMMAND + ITKMeshTestDriver + --redirectOutput + ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest2.txt + --compare + DATA{Baseline/itkTriangleMeshToBinaryImageFilterTest2.mha} + ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest2.mha + --compareIntensityTolerance + 0 + itkTriangleMeshToBinaryImageFilterTest2 + ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest2.mha) +set_tests_properties( + itkTriangleMeshToBinaryImageFilterTest2 PROPERTIES ATTACHED_FILES_ON_FAIL + ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest2.txt) +itk_add_test( + NAME + itkTriangleMeshToBinaryImageFilterTest3 + COMMAND + ITKMeshTestDriver + itkTriangleMeshToBinaryImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk} + ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest3.mha + 140 + 160 + 180 + -0.7 + -0.8 + -0.9 + 0.01 + 0.01 + 0.01) +itk_add_test( + NAME + itkTriangleMeshToBinaryImageFilterTest4 + COMMAND + ITKMeshTestDriver + itkTriangleMeshToBinaryImageFilterTest4 + DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk} + ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest4.mha + 140 + 160 + 180 + -0.7 + -0.8 + -0.9 + 0.01 + 0.01 + 0.01) +itk_add_test( + NAME + itkTriangleMeshToSimplexMeshFilterTest + COMMAND + ITKMeshTestDriver + itkTriangleMeshToSimplexMeshFilterTest) +itk_add_test( + NAME + itkVTKPolyDataReaderTest + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderTest2 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/sphereBinary.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest0 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad0.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest1 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad1.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest2 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad2.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest3 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad3.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest4 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad4.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest5 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad5.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest6 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad6.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest7 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad7.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest8 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad8.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest9 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad9.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest10 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad10.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest11 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad11.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest12 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad12.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest13 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad13.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest14 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad14.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest15 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad15.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest16 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad16.vtk}) +itk_add_test( + NAME + itkVTKPolyDataReaderBadTest17 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataReaderTest + DATA{${ITK_DATA_ROOT}/Input/vtkPolyDataBad17.vtk}) +itk_add_test( + NAME + itkVTKPolyDataWriterTest01 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataWriterTest01 + ${ITK_TEST_OUTPUT_DIR}/VTKPolyDataWriterTest01.vtk) +itk_add_test( + NAME + itkVTKPolyDataWriterTest02 + COMMAND + ITKMeshTestDriver + itkVTKPolyDataWriterTest02 + ${ITK_TEST_OUTPUT_DIR}/VTKPolyDataWriterTest02.vtk) +itk_add_test( + NAME + itkWarpMeshFilterTest + COMMAND + ITKMeshTestDriver + itkWarpMeshFilterTest) +itk_add_test( + NAME + itkDynamicMeshTest + COMMAND + ITKMeshTestDriver + itkDynamicMeshTest) +itk_add_test( + NAME + itkConnectedRegionsMeshFilterTest1 + COMMAND + ITKMeshTestDriver + itkConnectedRegionsMeshFilterTest1) +itk_add_test( + NAME + itkConnectedRegionsMeshFilterTest2 + COMMAND + ITKMeshTestDriver + itkConnectedRegionsMeshFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + 15 + 2154) +itk_add_test( + NAME + itkMeshFstreamTest + COMMAND + ITKMeshTestDriver + itkMeshFstreamTest + ${ITK_TEST_OUTPUT_DIR}/testMeshFstream.txt) +itk_add_test( + NAME + itkMeshSourceGraftOutputTest + COMMAND + ITKMeshTestDriver + itkMeshSourceGraftOutputTest) +itk_add_test( + NAME + itkMeshSpatialObjectIOTest + COMMAND + ITKMeshTestDriver + itkMeshSpatialObjectIOTest + ${ITK_TEST_OUTPUT_DIR}/metameshIOTest.txt) +itk_add_test( + NAME + itkMeshSpatialObjectIOTest1 + COMMAND + ITKMeshTestDriver + itkMeshSpatialObjectIOTest + ${ITK_TEST_OUTPUT_DIR}/metameshIOTest1.txt + binary) +itk_add_test( + NAME + itkMeshSpatialObjectIOTest2 + COMMAND + ITKMeshTestDriver + itkMeshSpatialObjectIOTest + ${ITK_TEST_OUTPUT_DIR}/metameshIOTest2.txt + DATA{${ITK_DATA_ROOT}/Input/metamesh.txt}) +itk_add_test( + NAME + itkParametricSpaceToImageSpaceMeshFilterTest + COMMAND + ITKMeshTestDriver + itkParametricSpaceToImageSpaceMeshFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png}) +itk_add_test( + NAME + itkTriangleMeshToSimplexMeshFilter2Test + COMMAND + ITKMeshTestDriver + itkTriangleMeshToSimplexMeshFilter2Test) +itk_add_test( + NAME + itkTriangleMeshCurvatureCalculatorTest + COMMAND + ITKMeshTestDriver + itkTriangleMeshCurvatureCalculatorTest + DATA{${ITK_DATA_ROOT}/Input/mushroom.vtk}) -itk_add_test(NAME itkNewTest COMMAND ITKMeshTestDriver itkNewTest) -itk_add_test(NAME itkCellInterfaceTest COMMAND ITKMeshTestDriver itkCellInterfaceTest) -itk_add_test(NAME itkTriangleCellTest COMMAND ITKMeshTestDriver itkTriangleCellTest) -itk_add_test(NAME itkQuadrilateralCellTest COMMAND ITKMeshTestDriver itkQuadrilateralCellTest) -itk_add_test(NAME itkMeshCellDataTest COMMAND ITKMeshTestDriver itkMeshCellDataTest) +itk_add_test( + NAME + itkNewTest + COMMAND + ITKMeshTestDriver + itkNewTest) +itk_add_test( + NAME + itkCellInterfaceTest + COMMAND + ITKMeshTestDriver + itkCellInterfaceTest) +itk_add_test( + NAME + itkTriangleCellTest + COMMAND + ITKMeshTestDriver + itkTriangleCellTest) +itk_add_test( + NAME + itkQuadrilateralCellTest + COMMAND + ITKMeshTestDriver + itkQuadrilateralCellTest) +itk_add_test( + NAME + itkMeshCellDataTest + COMMAND + ITKMeshTestDriver + itkMeshCellDataTest) -set_tests_properties(itkVTKPolyDataReaderTest2 - itkVTKPolyDataReaderBadTest0 - itkVTKPolyDataReaderBadTest1 - itkVTKPolyDataReaderBadTest2 - itkVTKPolyDataReaderBadTest3 - itkVTKPolyDataReaderBadTest4 - itkVTKPolyDataReaderBadTest5 - itkVTKPolyDataReaderBadTest6 - itkVTKPolyDataReaderBadTest7 - itkVTKPolyDataReaderBadTest8 - itkVTKPolyDataReaderBadTest9 - itkVTKPolyDataReaderBadTest10 - itkVTKPolyDataReaderBadTest11 - itkVTKPolyDataReaderBadTest12 - itkVTKPolyDataReaderBadTest13 - itkVTKPolyDataReaderBadTest14 - itkVTKPolyDataReaderBadTest15 - itkVTKPolyDataReaderBadTest16 - itkVTKPolyDataReaderBadTest17 - PROPERTIES WILL_FAIL true) +set_tests_properties( + itkVTKPolyDataReaderTest2 + itkVTKPolyDataReaderBadTest0 + itkVTKPolyDataReaderBadTest1 + itkVTKPolyDataReaderBadTest2 + itkVTKPolyDataReaderBadTest3 + itkVTKPolyDataReaderBadTest4 + itkVTKPolyDataReaderBadTest5 + itkVTKPolyDataReaderBadTest6 + itkVTKPolyDataReaderBadTest7 + itkVTKPolyDataReaderBadTest8 + itkVTKPolyDataReaderBadTest9 + itkVTKPolyDataReaderBadTest10 + itkVTKPolyDataReaderBadTest11 + itkVTKPolyDataReaderBadTest12 + itkVTKPolyDataReaderBadTest13 + itkVTKPolyDataReaderBadTest14 + itkVTKPolyDataReaderBadTest15 + itkVTKPolyDataReaderBadTest16 + itkVTKPolyDataReaderBadTest17 + PROPERTIES WILL_FAIL true) diff --git a/Modules/Core/Mesh/wrapping/CMakeLists.txt b/Modules/Core/Mesh/wrapping/CMakeLists.txt index e4ddd9edebd..fc5aca3d622 100644 --- a/Modules/Core/Mesh/wrapping/CMakeLists.txt +++ b/Modules/Core/Mesh/wrapping/CMakeLists.txt @@ -1,11 +1,10 @@ itk_wrap_module(ITKMesh) set(WRAPPER_SUBMODULE_ORDER - itkMeshBase - itkMeshSource - itkImageToMeshFilter - itkMeshToMeshFilter - itkVTKPolyDataReader - itkVTKPolyDataWriter -) + itkMeshBase + itkMeshSource + itkImageToMeshFilter + itkMeshToMeshFilter + itkVTKPolyDataReader + itkVTKPolyDataWriter) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Core/Mesh/wrapping/itkBinaryMask3DMeshSource.wrap b/Modules/Core/Mesh/wrapping/itkBinaryMask3DMeshSource.wrap index d5774778ae0..b097944bf5d 100644 --- a/Modules/Core/Mesh/wrapping/itkBinaryMask3DMeshSource.wrap +++ b/Modules/Core/Mesh/wrapping/itkBinaryMask3DMeshSource.wrap @@ -6,12 +6,11 @@ if(d3) itk_wrap_include("itkMesh.h") itk_wrap_class("itk::BinaryMask3DMeshSource" POINTER) - UNIQUE(mesh_types "${WRAP_ITK_SCALAR};D") - foreach(t ${WRAP_ITK_INT}) - foreach(t2 ${mesh_types}) - itk_wrap_template("${ITKM_I${t}3}M${ITKM_${t2}}3" - "${ITKT_I${t}3}, itk::Mesh< ${ITKT_${t2}},3 >") - endforeach() + unique(mesh_types "${WRAP_ITK_SCALAR};D") + foreach(t ${WRAP_ITK_INT}) + foreach(t2 ${mesh_types}) + itk_wrap_template("${ITKM_I${t}3}M${ITKM_${t2}}3" "${ITKT_I${t}3}, itk::Mesh< ${ITKT_${t2}},3 >") endforeach() + endforeach() itk_end_wrap_class() endif() diff --git a/Modules/Core/Mesh/wrapping/itkConnectedRegionsMeshFilter.wrap b/Modules/Core/Mesh/wrapping/itkConnectedRegionsMeshFilter.wrap index 53aeca2f127..a406ca4d5d6 100644 --- a/Modules/Core/Mesh/wrapping/itkConnectedRegionsMeshFilter.wrap +++ b/Modules/Core/Mesh/wrapping/itkConnectedRegionsMeshFilter.wrap @@ -2,10 +2,10 @@ itk_wrap_include("itkMesh.h") itk_wrap_include("itkDefaultStaticMeshTraits.h") itk_wrap_class("itk::ConnectedRegionsMeshFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("M${ITKM_${t}}${d}M${ITKM_${t}}${d}" - "itk::Mesh< ${ITKT_${t}},${d} >, itk::Mesh< ${ITKT_${t}},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("M${ITKM_${t}}${d}M${ITKM_${t}}${d}" + "itk::Mesh< ${ITKT_${t}},${d} >, itk::Mesh< ${ITKT_${t}},${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Mesh/wrapping/itkImageToMeshFilter.wrap b/Modules/Core/Mesh/wrapping/itkImageToMeshFilter.wrap index b915bd41edd..a0de1925a1c 100644 --- a/Modules/Core/Mesh/wrapping/itkImageToMeshFilter.wrap +++ b/Modules/Core/Mesh/wrapping/itkImageToMeshFilter.wrap @@ -3,15 +3,13 @@ itk_wrap_include("itkPointSet.h") itk_wrap_include("itkDefaultStaticMeshTraits.h") itk_wrap_class("itk::ImageToMeshFilter" POINTER) - UNIQUE(mesh_types "${WRAP_ITK_SCALAR};D") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - foreach(t2 ${mesh_types}) - itk_wrap_template("${ITKM_I${t}${d}}M${ITKM_${t2}}${d}" - "${ITKT_I${t}${d}}, itk::Mesh< ${ITKT_${t2}},${d} >") - itk_wrap_template("${ITKM_I${t}${d}}PS${ITKM_${t2}}${d}" - "${ITKT_I${t}${d}}, itk::PointSet< ${ITKT_${t2}},${d} >") - endforeach() +unique(mesh_types "${WRAP_ITK_SCALAR};D") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + foreach(t2 ${mesh_types}) + itk_wrap_template("${ITKM_I${t}${d}}M${ITKM_${t2}}${d}" "${ITKT_I${t}${d}}, itk::Mesh< ${ITKT_${t2}},${d} >") + itk_wrap_template("${ITKM_I${t}${d}}PS${ITKM_${t2}}${d}" "${ITKT_I${t}${d}}, itk::PointSet< ${ITKT_${t2}},${d} >") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Mesh/wrapping/itkMeshBase.wrap b/Modules/Core/Mesh/wrapping/itkMeshBase.wrap index 11f49d6808c..3487db66e92 100644 --- a/Modules/Core/Mesh/wrapping/itkMeshBase.wrap +++ b/Modules/Core/Mesh/wrapping/itkMeshBase.wrap @@ -1,72 +1,93 @@ itk_wrap_include("itkDefaultStaticMeshTraits.h") itk_wrap_include("itkDefaultDynamicMeshTraits.h") -UNIQUE(types "${WRAP_ITK_SCALAR};D") +unique(types "${WRAP_ITK_SCALAR};D") set(WRAPPER_AUTO_INCLUDE_HEADERS ON) itk_wrap_class("itk::Mesh" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}},${d}") - endforeach() - itk_wrap_template("A${ITKM_D}${d}" "itk::Array<${ITKT_D}>,${d}") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}},${d}") endforeach() + itk_wrap_template("A${ITKM_D}${d}" "itk::Array<${ITKT_D}>,${d}") +endforeach() itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkCellInterface.h") itk_wrap_class("itk::CellTraitsInfo") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${d}${ITKM_F}${ITKM_F}${ITKM_IT}${ITKM_IT}${ITKM_IT}${ITKM_PF${d}}MC${ITKM_IT}${ITKM_PF${d}}" - "${d},${ITKT_F},${ITKT_F},${ITKT_IT},${ITKT_IT},${ITKT_IT},${ITKT_PF${d}},itk::MapContainer< ${ITKT_IT},${ITKT_PF${d}} >, std::set< ${ITKT_IT} >") - itk_wrap_template("${d}${ITKM_F}${ITKM_F}${ITKM_IT}${ITKM_IT}${ITKM_IT}${ITKM_PF${d}}VC${ITKM_IT}${ITKM_PF${d}}" - "${d},${ITKT_F},${ITKT_F},${ITKT_IT},${ITKT_IT},${ITKT_IT},${ITKT_PF${d}},itk::VectorContainer< ${ITKT_IT},${ITKT_PF${d}} >, std::set< ${ITKT_IT} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template( + "${d}${ITKM_F}${ITKM_F}${ITKM_IT}${ITKM_IT}${ITKM_IT}${ITKM_PF${d}}MC${ITKM_IT}${ITKM_PF${d}}" + "${d},${ITKT_F},${ITKT_F},${ITKT_IT},${ITKT_IT},${ITKT_IT},${ITKT_PF${d}},itk::MapContainer< ${ITKT_IT},${ITKT_PF${d}} >, std::set< ${ITKT_IT} >" + ) + itk_wrap_template( + "${d}${ITKM_F}${ITKM_F}${ITKM_IT}${ITKM_IT}${ITKM_IT}${ITKM_PF${d}}VC${ITKM_IT}${ITKM_PF${d}}" + "${d},${ITKT_F},${ITKT_F},${ITKT_IT},${ITKT_IT},${ITKT_IT},${ITKT_PF${d}},itk::VectorContainer< ${ITKT_IT},${ITKT_PF${d}} >, std::set< ${ITKT_IT} >" + ) +endforeach() itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS ON) -set(mangle_CellInterface_MapContainer "\${ITKM_\${pixel_type}}CTI\${d}\${ITKM_F}\${ITKM_F}\${ITKM_IT}\${ITKM_IT}\${ITKM_IT}\${ITKM_PF\${d}}MC\${ITKM_IT}\${ITKM_PF\${d}}") -set(type_CellInterface_MapContainer "\${ITKT_\${pixel_type}},itk::CellTraitsInfo< \${d},\${ITKT_F},\${ITKT_F},\${ITKT_IT},\${ITKT_IT},\${ITKT_IT},\${ITKT_PF\${d}},itk::MapContainer< \${ITKT_IT},\${ITKT_PF\${d}} >, std::set< \${ITKT_IT} > >" ) +set(mangle_CellInterface_MapContainer + "\${ITKM_\${pixel_type}}CTI\${d}\${ITKM_F}\${ITKM_F}\${ITKM_IT}\${ITKM_IT}\${ITKM_IT}\${ITKM_PF\${d}}MC\${ITKM_IT}\${ITKM_PF\${d}}" +) +set(type_CellInterface_MapContainer + "\${ITKT_\${pixel_type}},itk::CellTraitsInfo< \${d},\${ITKT_F},\${ITKT_F},\${ITKT_IT},\${ITKT_IT},\${ITKT_IT},\${ITKT_PF\${d}},itk::MapContainer< \${ITKT_IT},\${ITKT_PF\${d}} >, std::set< \${ITKT_IT} > >" +) -set(mangle_CellInterface_VectorContainer "\${ITKM_\${pixel_type}}CTI\${d}\${ITKM_F}\${ITKM_F}\${ITKM_IT}\${ITKM_IT}\${ITKM_IT}\${ITKM_PF\${d}}VC\${ITKM_IT}\${ITKM_PF\${d}}") -set(type_CellInterface_VectorContainer "\${ITKT_\${pixel_type}},itk::CellTraitsInfo< \${d},\${ITKT_F},\${ITKT_F},\${ITKT_IT},\${ITKT_IT},\${ITKT_IT},\${ITKT_PF\${d}},itk::VectorContainer< \${ITKT_IT},\${ITKT_PF\${d}} >, std::set< \${ITKT_IT} > >" ) +set(mangle_CellInterface_VectorContainer + "\${ITKM_\${pixel_type}}CTI\${d}\${ITKM_F}\${ITKM_F}\${ITKM_IT}\${ITKM_IT}\${ITKM_IT}\${ITKM_PF\${d}}VC\${ITKM_IT}\${ITKM_PF\${d}}" +) +set(type_CellInterface_VectorContainer + "\${ITKT_\${pixel_type}},itk::CellTraitsInfo< \${d},\${ITKT_F},\${ITKT_F},\${ITKT_IT},\${ITKT_IT},\${ITKT_IT},\${ITKT_PF\${d}},itk::VectorContainer< \${ITKT_IT},\${ITKT_PF\${d}} >, std::set< \${ITKT_IT} > >" +) -set(mangle_CellInterface_Array_VectorContainer "A\${ITKM_D}CTI\${d}\${ITKM_F}\${ITKM_F}\${ITKM_IT}\${ITKM_IT}\${ITKM_IT}\${ITKM_PF\${d}}VC\${ITKM_IT}\${ITKM_PF\${d}}") -set(type_CellInterface_Array_VectorContainer "itk::Array< \${ITKT_D} >,itk::CellTraitsInfo< \${d},\${ITKT_F},\${ITKT_F},\${ITKT_IT},\${ITKT_IT},\${ITKT_IT},\${ITKT_PF\${d}},itk::VectorContainer< \${ITKT_IT},\${ITKT_PF\${d}} >, std::set< \${ITKT_IT} > >" ) +set(mangle_CellInterface_Array_VectorContainer + "A\${ITKM_D}CTI\${d}\${ITKM_F}\${ITKM_F}\${ITKM_IT}\${ITKM_IT}\${ITKM_IT}\${ITKM_PF\${d}}VC\${ITKM_IT}\${ITKM_PF\${d}}" +) +set(type_CellInterface_Array_VectorContainer + "itk::Array< \${ITKT_D} >,itk::CellTraitsInfo< \${d},\${ITKT_F},\${ITKT_F},\${ITKT_IT},\${ITKT_IT},\${ITKT_IT},\${ITKT_PF\${d}},itk::VectorContainer< \${ITKT_IT},\${ITKT_PF\${d}} >, std::set< \${ITKT_IT} > >" +) itk_wrap_class("itk::CellInterface" AUTOPOINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(pixel_type ${types}) - itk_wrap_template("${mangle_CellInterface_MapContainer}" "${type_CellInterface_MapContainer}") - itk_wrap_template("${mangle_CellInterface_VectorContainer}" "${type_CellInterface_VectorContainer}") - endforeach() - itk_wrap_template("${mangle_CellInterface_Array_VectorContainer}" "${type_CellInterface_Array_VectorContainer}") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(pixel_type ${types}) + itk_wrap_template("${mangle_CellInterface_MapContainer}" "${type_CellInterface_MapContainer}") + itk_wrap_template("${mangle_CellInterface_VectorContainer}" "${type_CellInterface_VectorContainer}") endforeach() + itk_wrap_template("${mangle_CellInterface_Array_VectorContainer}" "${type_CellInterface_Array_VectorContainer}") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::MapContainer" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(pixel_type ${types}) - itk_wrap_template("${ITKM_IT}CI${mangle_CellInterface_MapContainer}" "${ITKT_IT}, itk::CellInterface< ${type_CellInterface_MapContainer} > *") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(pixel_type ${types}) + itk_wrap_template("${ITKM_IT}CI${mangle_CellInterface_MapContainer}" + "${ITKT_IT}, itk::CellInterface< ${type_CellInterface_MapContainer} > *") endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::VectorContainer" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(pixel_type ${types}) - itk_wrap_template("${ITKM_IT}CI${mangle_CellInterface_VectorContainer}" "${ITKT_IT}, itk::CellInterface< ${type_CellInterface_VectorContainer} > *") - endforeach() - itk_wrap_template("${ITKM_IT}CI${mangle_CellInterface_Array_VectorContainer}" "${ITKT_IT}, itk::CellInterface< ${type_CellInterface_Array_VectorContainer} > *") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(pixel_type ${types}) + itk_wrap_template("${ITKM_IT}CI${mangle_CellInterface_VectorContainer}" + "${ITKT_IT}, itk::CellInterface< ${type_CellInterface_VectorContainer} > *") endforeach() + itk_wrap_template("${ITKM_IT}CI${mangle_CellInterface_Array_VectorContainer}" + "${ITKT_IT}, itk::CellInterface< ${type_CellInterface_Array_VectorContainer} > *") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::CellInterfaceVisitor" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}CTI${d}${ITKM_F}${ITKM_F}${ITKM_IT}${ITKM_IT}${ITKM_IT}${ITKM_PF${d}}MC${ITKM_IT}${ITKM_PF${d}}" - "${ITKT_${t}}, itk::CellTraitsInfo< ${d},${ITKT_F},${ITKT_F},${ITKT_IT},${ITKT_IT},${ITKT_IT},${ITKT_PF${d}},itk::MapContainer< ${ITKT_IT},${ITKT_PF${d}} >, std::set< ${ITKT_IT} > > ") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template( + "${ITKM_${t}}CTI${d}${ITKM_F}${ITKM_F}${ITKM_IT}${ITKM_IT}${ITKM_IT}${ITKM_PF${d}}MC${ITKM_IT}${ITKM_PF${d}}" + "${ITKT_${t}}, itk::CellTraitsInfo< ${d},${ITKT_F},${ITKT_F},${ITKT_IT},${ITKT_IT},${ITKT_IT},${ITKT_PF${d}},itk::MapContainer< ${ITKT_IT},${ITKT_PF${d}} >, std::set< ${ITKT_IT} > > " + ) endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Mesh/wrapping/itkMeshSource.wrap b/Modules/Core/Mesh/wrapping/itkMeshSource.wrap index 38a3a3d35f0..c08309b6d02 100644 --- a/Modules/Core/Mesh/wrapping/itkMeshSource.wrap +++ b/Modules/Core/Mesh/wrapping/itkMeshSource.wrap @@ -2,11 +2,11 @@ itk_wrap_include("itkMesh.h") itk_wrap_include("itkDefaultStaticMeshTraits.h") itk_wrap_class("itk::MeshSource" POINTER) - UNIQUE(types "${WRAP_ITK_SCALAR};D") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >") - itk_wrap_template("M${ITKM_${t}}${d}" "itk::Mesh< ${ITKT_${t}},${d} >") - endforeach() +unique(types "${WRAP_ITK_SCALAR};D") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >") + itk_wrap_template("M${ITKM_${t}}${d}" "itk::Mesh< ${ITKT_${t}},${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Mesh/wrapping/itkMeshToMeshFilter.wrap b/Modules/Core/Mesh/wrapping/itkMeshToMeshFilter.wrap index 0796da97e70..4b169452b01 100644 --- a/Modules/Core/Mesh/wrapping/itkMeshToMeshFilter.wrap +++ b/Modules/Core/Mesh/wrapping/itkMeshToMeshFilter.wrap @@ -2,10 +2,10 @@ itk_wrap_include("itkMesh.h") itk_wrap_include("itkDefaultStaticMeshTraits.h") itk_wrap_class("itk::MeshToMeshFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("M${ITKM_${t}}${d}M${ITKM_${t}}${d}" - "itk::Mesh< ${ITKT_${t}},${d} >, itk::Mesh< ${ITKT_${t}},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("M${ITKM_${t}}${d}M${ITKM_${t}}${d}" + "itk::Mesh< ${ITKT_${t}},${d} >, itk::Mesh< ${ITKT_${t}},${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Mesh/wrapping/itkRegularSphereMeshSource.wrap b/Modules/Core/Mesh/wrapping/itkRegularSphereMeshSource.wrap index 0ca7d459398..4f759a0fe7e 100644 --- a/Modules/Core/Mesh/wrapping/itkRegularSphereMeshSource.wrap +++ b/Modules/Core/Mesh/wrapping/itkRegularSphereMeshSource.wrap @@ -1,9 +1,9 @@ itk_wrap_include("itkMesh.h") itk_wrap_class("itk::RegularSphereMeshSource" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("M${ITKM_${t}}${d}" "itk::Mesh< ${ITKT_${t}},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("M${ITKM_${t}}${d}" "itk::Mesh< ${ITKT_${t}},${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Mesh/wrapping/itkSphereMeshSource.wrap b/Modules/Core/Mesh/wrapping/itkSphereMeshSource.wrap index d18a11a7302..2fd8c9c9461 100644 --- a/Modules/Core/Mesh/wrapping/itkSphereMeshSource.wrap +++ b/Modules/Core/Mesh/wrapping/itkSphereMeshSource.wrap @@ -1,9 +1,9 @@ itk_wrap_include("itkMesh.h") itk_wrap_class("itk::SphereMeshSource" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("M${ITKM_${t}}${d}" "itk::Mesh< ${ITKT_${t}},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("M${ITKM_${t}}${d}" "itk::Mesh< ${ITKT_${t}},${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Mesh/wrapping/itkTransformMeshFilter.wrap b/Modules/Core/Mesh/wrapping/itkTransformMeshFilter.wrap index 8449acf21a6..177fb85acc6 100644 --- a/Modules/Core/Mesh/wrapping/itkTransformMeshFilter.wrap +++ b/Modules/Core/Mesh/wrapping/itkTransformMeshFilter.wrap @@ -3,14 +3,15 @@ itk_wrap_include("itkPointSet.h") itk_wrap_include("itkTransform.h") itk_wrap_class("itk::TransformMeshFilter" POINTER) - # Transform parameter types - UNIQUE(transform_type "D;${WRAP_ITK_REAL}") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - foreach(tt ${transform_type}) - itk_wrap_template("M${ITKM_${t}}${d}M${ITKM_${t}}${d}T${ITKM_${tt}}${d}${d}" - "itk::Mesh< ${ITKT_${t}},${d} >, itk::Mesh< ${ITKT_${t}},${d} >, itk::Transform< ${ITKT_${tt}}, ${d}, ${d} >") - endforeach() +# Transform parameter types +unique(transform_type "D;${WRAP_ITK_REAL}") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + foreach(tt ${transform_type}) + itk_wrap_template( + "M${ITKM_${t}}${d}M${ITKM_${t}}${d}T${ITKM_${tt}}${d}${d}" + "itk::Mesh< ${ITKT_${t}},${d} >, itk::Mesh< ${ITKT_${t}},${d} >, itk::Transform< ${ITKT_${tt}}, ${d}, ${d} >") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Mesh/wrapping/itkTriangleMeshCurvatureCalculator.wrap b/Modules/Core/Mesh/wrapping/itkTriangleMeshCurvatureCalculator.wrap index bb343da2214..59a6efbb23a 100644 --- a/Modules/Core/Mesh/wrapping/itkTriangleMeshCurvatureCalculator.wrap +++ b/Modules/Core/Mesh/wrapping/itkTriangleMeshCurvatureCalculator.wrap @@ -5,9 +5,9 @@ if(has_d_3) itk_wrap_simple_class("itk::TriangleMeshCurvatureCalculatorEnums") itk_wrap_class("itk::TriangleMeshCurvatureCalculator" POINTER) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("M${ITKM_${t}}3" "itk::Mesh< ${ITKT_${t}}, 3 >") - endforeach() + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("M${ITKM_${t}}3" "itk::Mesh< ${ITKT_${t}}, 3 >") + endforeach() itk_end_wrap_class() endif() diff --git a/Modules/Core/Mesh/wrapping/itkTriangleMeshToBinaryImageFilter.wrap b/Modules/Core/Mesh/wrapping/itkTriangleMeshToBinaryImageFilter.wrap index 3a8c785e1c4..2cc006ca63c 100644 --- a/Modules/Core/Mesh/wrapping/itkTriangleMeshToBinaryImageFilter.wrap +++ b/Modules/Core/Mesh/wrapping/itkTriangleMeshToBinaryImageFilter.wrap @@ -6,10 +6,10 @@ if(d3) itk_wrap_include("itkTriangleMeshToBinaryImageFilter.h") itk_wrap_simple_class("itk::Point1D") itk_wrap_class("itk::TriangleMeshToBinaryImageFilter" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - foreach(d 3) - itk_wrap_template("M${ITKM_${t}}${d}${ITKM_I${t}${d}}" "itk::Mesh< ${ITKT_${t}},${d} >, ${ITKT_I${t}${d}} ") - endforeach() + foreach(t ${WRAP_ITK_SCALAR}) + foreach(d 3) + itk_wrap_template("M${ITKM_${t}}${d}${ITKM_I${t}${d}}" "itk::Mesh< ${ITKT_${t}},${d} >, ${ITKT_I${t}${d}} ") endforeach() + endforeach() itk_end_wrap_class() endif() diff --git a/Modules/Core/Mesh/wrapping/itkVTKPolyDataReader.wrap b/Modules/Core/Mesh/wrapping/itkVTKPolyDataReader.wrap index 9f0449efabf..721a0be5107 100644 --- a/Modules/Core/Mesh/wrapping/itkVTKPolyDataReader.wrap +++ b/Modules/Core/Mesh/wrapping/itkVTKPolyDataReader.wrap @@ -1,12 +1,12 @@ itk_wrap_include("itkDefaultStaticMeshTraits.h") itk_wrap_include("itkMesh.h") -UNIQUE(types "${WRAP_ITK_REAL};D") +unique(types "${WRAP_ITK_REAL};D") itk_wrap_class("itk::VTKPolyDataReader" POINTER_WITH_SUPERCLASS) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("M${ITKM_${t}}${d}" "itk::Mesh< ${ITKT_${t}},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("M${ITKM_${t}}${d}" "itk::Mesh< ${ITKT_${t}},${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Mesh/wrapping/itkVTKPolyDataWriter.wrap b/Modules/Core/Mesh/wrapping/itkVTKPolyDataWriter.wrap index 320e110a0e3..e2c84fe6556 100644 --- a/Modules/Core/Mesh/wrapping/itkVTKPolyDataWriter.wrap +++ b/Modules/Core/Mesh/wrapping/itkVTKPolyDataWriter.wrap @@ -1,12 +1,12 @@ itk_wrap_include("itkDefaultStaticMeshTraits.h") itk_wrap_include("itkMesh.h") -UNIQUE(types "${WRAP_ITK_REAL};D") +unique(types "${WRAP_ITK_REAL};D") itk_wrap_class("itk::VTKPolyDataWriter" POINTER_WITH_SUPERCLASS) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("M${ITKM_${t}}${d}" "itk::Mesh<${ITKT_${t}},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("M${ITKM_${t}}${d}" "itk::Mesh<${ITKT_${t}},${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Mesh/wrapping/test/CMakeLists.txt b/Modules/Core/Mesh/wrapping/test/CMakeLists.txt index d60808fbf72..8777be8f3f8 100644 --- a/Modules/Core/Mesh/wrapping/test/CMakeLists.txt +++ b/Modules/Core/Mesh/wrapping/test/CMakeLists.txt @@ -1,32 +1,85 @@ -list(FIND ITK_WRAP_IMAGE_DIMS 3 wrap_3_index) +list( + FIND + ITK_WRAP_IMAGE_DIMS + 3 + wrap_3_index) if(ITK_WRAP_PYTHON) if(wrap_3_index GREATER -1) - itk_python_expression_add_test(NAME itkTriangleMeshToBinaryImageFilterPythonTest - EXPRESSION "instance = itk.TriangleMeshToBinaryImageFilter.New()") + itk_python_expression_add_test( + NAME + itkTriangleMeshToBinaryImageFilterPythonTest + EXPRESSION + "instance = itk.TriangleMeshToBinaryImageFilter.New()") endif() - itk_python_expression_add_test(NAME itkBYUMeshIOPythonTest - EXPRESSION "instance = itk.BYUMeshIO.New()") - itk_python_expression_add_test(NAME itkFreeSurferAsciiMeshIOPythonTest - EXPRESSION "instance = itk.FreeSurferAsciiMeshIO.New()") - itk_python_expression_add_test(NAME itkFreeSurferBinaryMeshIOPythonTest - EXPRESSION "instance = itk.FreeSurferBinaryMeshIO.New()") - itk_python_expression_add_test(NAME itkMeshFileWriterPythonTest - EXPRESSION "instance = itk.MeshFileWriter.New()") - itk_python_expression_add_test(NAME itkOBJMeshIOPythonTest - EXPRESSION "instance = itk.OBJMeshIO.New()") - itk_python_expression_add_test(NAME itkOFFMeshIOPythonTest - EXPRESSION "instance = itk.OFFMeshIO.New()") - itk_python_expression_add_test(NAME itkVTKPolyDataMeshIOPythonTest - EXPRESSION "instance = itk.VTKPolyDataMeshIO.New()") - itk_python_expression_add_test(NAME itkTransformMeshFilterPythonTest - EXPRESSION "instance = itk.TransformMeshFilter.New()") - itk_python_expression_add_test(NAME itkRegularSphereMeshSourcePythonTest - EXPRESSION "instance = itk.RegularSphereMeshSource.New()") - itk_python_expression_add_test(NAME itkSphereMeshSourcePythonTest - EXPRESSION "instance = itk.SphereMeshSource.New()") + itk_python_expression_add_test( + NAME + itkBYUMeshIOPythonTest + EXPRESSION + "instance = itk.BYUMeshIO.New()") + itk_python_expression_add_test( + NAME + itkFreeSurferAsciiMeshIOPythonTest + EXPRESSION + "instance = itk.FreeSurferAsciiMeshIO.New()") + itk_python_expression_add_test( + NAME + itkFreeSurferBinaryMeshIOPythonTest + EXPRESSION + "instance = itk.FreeSurferBinaryMeshIO.New()") + itk_python_expression_add_test( + NAME + itkMeshFileWriterPythonTest + EXPRESSION + "instance = itk.MeshFileWriter.New()") + itk_python_expression_add_test( + NAME + itkOBJMeshIOPythonTest + EXPRESSION + "instance = itk.OBJMeshIO.New()") + itk_python_expression_add_test( + NAME + itkOFFMeshIOPythonTest + EXPRESSION + "instance = itk.OFFMeshIO.New()") + itk_python_expression_add_test( + NAME + itkVTKPolyDataMeshIOPythonTest + EXPRESSION + "instance = itk.VTKPolyDataMeshIO.New()") + itk_python_expression_add_test( + NAME + itkTransformMeshFilterPythonTest + EXPRESSION + "instance = itk.TransformMeshFilter.New()") + itk_python_expression_add_test( + NAME + itkRegularSphereMeshSourcePythonTest + EXPRESSION + "instance = itk.RegularSphereMeshSource.New()") + itk_python_expression_add_test( + NAME + itkSphereMeshSourcePythonTest + EXPRESSION + "instance = itk.SphereMeshSource.New()") - itk_python_add_test(NAME itkMeshArrayPixelTypePythonTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkMeshArrayPixelTypeTest.py) - itk_python_add_test(NAME itkConnectedRegionsMeshFilterPythonTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkConnectedRegionsMeshFilterTest.py DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} 15 2154) - itk_python_add_test(NAME itkMeshSerializationTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkMeshSerializationTest.py DATA{${ITK_DATA_ROOT}/Input/mushroom.vtk}) + itk_python_add_test( + NAME + itkMeshArrayPixelTypePythonTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkMeshArrayPixelTypeTest.py) + itk_python_add_test( + NAME + itkConnectedRegionsMeshFilterPythonTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkConnectedRegionsMeshFilterTest.py + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + 15 + 2154) + itk_python_add_test( + NAME + itkMeshSerializationTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkMeshSerializationTest.py + DATA{${ITK_DATA_ROOT}/Input/mushroom.vtk}) endif() diff --git a/Modules/Core/QuadEdgeMesh/itk-module.cmake b/Modules/Core/QuadEdgeMesh/itk-module.cmake index 7d0938fbb25..26003f17487 100644 --- a/Modules/Core/QuadEdgeMesh/itk-module.cmake +++ b/Modules/Core/QuadEdgeMesh/itk-module.cmake @@ -1,4 +1,5 @@ -set(DOCUMENTATION "The QuadEdgeMesh module contain a specialized set of Mesh +set(DOCUMENTATION + "The QuadEdgeMesh module contain a specialized set of Mesh classes intended to represent 2-manifolds embedded in a N-Dimensional space. This family of classes provides a consistent representation of oriented surfaces and therefore they are used as a base for implementing common mesh @@ -69,15 +70,15 @@ With those criteria in mind the following choices were made: copy of the mesh should follow the classical ITK filter pattern and inherit from itk::MeshToMeshFilter.") -itk_module(ITKQuadEdgeMesh +itk_module( + ITKQuadEdgeMesh ENABLE_SHARED PRIVATE_DEPENDS - ITKMesh + ITKMesh COMPILE_DEPENDS - ITKCommon + ITKCommon TEST_DEPENDS - ITKTestKernel - ITKMesh + ITKTestKernel + ITKMesh DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Core/QuadEdgeMesh/src/CMakeLists.txt b/Modules/Core/QuadEdgeMesh/src/CMakeLists.txt index e288a403518..05d3c3750b3 100644 --- a/Modules/Core/QuadEdgeMesh/src/CMakeLists.txt +++ b/Modules/Core/QuadEdgeMesh/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKQuadEdgeMesh_SRCS - itkQuadEdge.cxx - itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.cxx - ) +set(ITKQuadEdgeMesh_SRCS itkQuadEdge.cxx itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.cxx) itk_module_add_library(ITKQuadEdgeMesh ${ITKQuadEdgeMesh_SRCS}) diff --git a/Modules/Core/QuadEdgeMesh/test/CMakeLists.txt b/Modules/Core/QuadEdgeMesh/test/CMakeLists.txt index 2f880443037..85c90aa743e 100644 --- a/Modules/Core/QuadEdgeMesh/test/CMakeLists.txt +++ b/Modules/Core/QuadEdgeMesh/test/CMakeLists.txt @@ -1,129 +1,274 @@ itk_module_test() set(ITKQuadEdgeMeshTests -itkQuadEdgeMeshPointTest1.cxx -itkQuadEdgeMeshTest1.cxx -itkQuadEdgeMeshTest2.cxx -itkQuadEdgeMeshTest3.cxx -itkQuadEdgeMeshPolygonCellTest.cxx -itkQuadEdgeMeshFrontIteratorTest.cxx -itkQuadEdgeMeshScalarDataVTKPolyDataWriterTest1.cxx -itkQuadEdgeTest1.cxx -itkGeometricalQuadEdgeTest1.cxx -itkQuadEdgeMeshAddFaceTest1.cxx -itkQuadEdgeMeshAddFaceTest2.cxx -itkQuadEdgeMeshBasicLayerTest.cxx -itkQuadEdgeMeshCellInterfaceTest.cxx -itkQuadEdgeMeshCountingCellsTest.cxx -itkQuadEdgeMeshDeleteEdgeTest.cxx -itkQuadEdgeMeshDeletePointAndReorderIDsTest.cxx -itkQuadEdgeMeshEulerOperatorCreateCenterVertexTest.cxx -itkQuadEdgeMeshEulerOperatorDeleteCenterVertexTest.cxx -itkQuadEdgeMeshEulerOperatorFlipTest.cxx -itkQuadEdgeMeshEulerOperatorJoinFacetTest.cxx -itkQuadEdgeMeshEulerOperatorJoinVertexTest.cxx -itkQuadEdgeMeshEulerOperatorSplitEdgeTest.cxx -itkQuadEdgeMeshEulerOperatorSplitFaceTest.cxx -itkQuadEdgeMeshEulerOperatorSplitVertexTest.cxx -itkQuadEdgeMeshIteratorTest.cxx -itkQuadEdgeMeshNoPointConstTest.cxx -itkVTKPolyDataIOQuadEdgeMeshTest.cxx -itkVTKPolyDataReaderQuadEdgeMeshTest.cxx -itkDynamicQuadEdgeMeshTest.cxx -) + itkQuadEdgeMeshPointTest1.cxx + itkQuadEdgeMeshTest1.cxx + itkQuadEdgeMeshTest2.cxx + itkQuadEdgeMeshTest3.cxx + itkQuadEdgeMeshPolygonCellTest.cxx + itkQuadEdgeMeshFrontIteratorTest.cxx + itkQuadEdgeMeshScalarDataVTKPolyDataWriterTest1.cxx + itkQuadEdgeTest1.cxx + itkGeometricalQuadEdgeTest1.cxx + itkQuadEdgeMeshAddFaceTest1.cxx + itkQuadEdgeMeshAddFaceTest2.cxx + itkQuadEdgeMeshBasicLayerTest.cxx + itkQuadEdgeMeshCellInterfaceTest.cxx + itkQuadEdgeMeshCountingCellsTest.cxx + itkQuadEdgeMeshDeleteEdgeTest.cxx + itkQuadEdgeMeshDeletePointAndReorderIDsTest.cxx + itkQuadEdgeMeshEulerOperatorCreateCenterVertexTest.cxx + itkQuadEdgeMeshEulerOperatorDeleteCenterVertexTest.cxx + itkQuadEdgeMeshEulerOperatorFlipTest.cxx + itkQuadEdgeMeshEulerOperatorJoinFacetTest.cxx + itkQuadEdgeMeshEulerOperatorJoinVertexTest.cxx + itkQuadEdgeMeshEulerOperatorSplitEdgeTest.cxx + itkQuadEdgeMeshEulerOperatorSplitFaceTest.cxx + itkQuadEdgeMeshEulerOperatorSplitVertexTest.cxx + itkQuadEdgeMeshIteratorTest.cxx + itkQuadEdgeMeshNoPointConstTest.cxx + itkVTKPolyDataIOQuadEdgeMeshTest.cxx + itkVTKPolyDataReaderQuadEdgeMeshTest.cxx + itkDynamicQuadEdgeMeshTest.cxx) -CreateTestDriver(ITKQuadEdgeMesh "${ITKQuadEdgeMesh-Test_LIBRARIES}" "${ITKQuadEdgeMeshTests}") +createtestdriver(ITKQuadEdgeMesh "${ITKQuadEdgeMesh-Test_LIBRARIES}" "${ITKQuadEdgeMeshTests}") -itk_add_test(NAME itkQuadEdgeMeshPointTest1 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshPointTest1) -itk_add_test(NAME itkQuadEdgeMeshTest1 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshTest1) -itk_add_test(NAME itkQuadEdgeMeshTest2 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshTest2) -itk_add_test(NAME itkQuadEdgeMeshTest3 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshTest3) -itk_add_test(NAME itkQuadEdgeMeshPolygonCellTest - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshPolygonCellTest) -itk_add_test(NAME itkQuadEdgeMeshFrontIteratorTest - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshFrontIteratorTest) -itk_add_test(NAME itkQuadEdgeMeshScalarDataVTKPolyDataWriterTest1 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshScalarDataVTKPolyDataWriterTest1 - ${ITK_TEST_OUTPUT_DIR}/sphere.vtk) -itk_add_test(NAME itkQuadEdgeTest1 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeTest1) -itk_add_test(NAME itkGeometricalQuadEdgeTest1 - COMMAND ITKQuadEdgeMeshTestDriver itkGeometricalQuadEdgeTest1) -itk_add_test(NAME itkQuadEdgeMeshAddFaceTest1_0 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshAddFaceTest1 - 0) -itk_add_test(NAME itkQuadEdgeMeshAddFaceTest1_1 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshAddFaceTest1 - 1) -itk_add_test(NAME itkQuadEdgeMeshAddFaceTest1_2 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshAddFaceTest1 - 2) -itk_add_test(NAME itkQuadEdgeMeshAddFaceTest1_3 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshAddFaceTest1 - 3) -itk_add_test(NAME itkQuadEdgeMeshAddFaceTest1_4 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshAddFaceTest1 - 4) -itk_add_test(NAME itkQuadEdgeMeshAddFaceTest1_5 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshAddFaceTest1 - 5) -itk_add_test(NAME itkQuadEdgeMeshAddFaceTest2 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshAddFaceTest2) -itk_add_test(NAME itkQuadEdgeMeshCellInterfaceTest - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshCellInterfaceTest) -itk_add_test(NAME itkQuadEdgeMeshCountingCellsTest - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshCountingCellsTest) -itk_add_test(NAME itkQuadEdgeMeshDeleteEdgeTest - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshDeleteEdgeTest) -itk_add_test(NAME itkQuadEdgeMeshDeletePointAndReorderIDsTest - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshDeletePointAndReorderIDsTest) -itk_add_test(NAME itkQuadEdgeMeshEulerOperatorCreateCenterVertexTest - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshEulerOperatorCreateCenterVertexTest) -itk_add_test(NAME itkQuadEdgeMeshEulerOperatorDeleteCenterVertexTest - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshEulerOperatorDeleteCenterVertexTest) -itk_add_test(NAME itkQuadEdgeMeshEulerOperatorFlipTest - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshEulerOperatorFlipTest) -itk_add_test(NAME itkQuadEdgeMeshEulerOperatorJoinFacetTest - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshEulerOperatorJoinFacetTest) -itk_add_test(NAME itkQuadEdgeMeshEulerOperatorJoinVertexTest0 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshEulerOperatorJoinVertexTest - 0) -itk_add_test(NAME itkQuadEdgeMeshEulerOperatorJoinVertexTest1 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshEulerOperatorJoinVertexTest - 1) -itk_add_test(NAME itkQuadEdgeMeshEulerOperatorJoinVertexTest2 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshEulerOperatorJoinVertexTest - 2) -itk_add_test(NAME itkQuadEdgeMeshEulerOperatorJoinVertexTest3 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshEulerOperatorJoinVertexTest - 3) -itk_add_test(NAME itkQuadEdgeMeshEulerOperatorJoinVertexTest4 - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshEulerOperatorJoinVertexTest - 4) -itk_add_test(NAME itkQuadEdgeMeshEulerOperatorSplitEdgeTest - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshEulerOperatorSplitEdgeTest) -itk_add_test(NAME itkQuadEdgeMeshEulerOperatorSplitFaceTest - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshEulerOperatorSplitFaceTest) -itk_add_test(NAME itkQuadEdgeMeshEulerOperatorSplitVertexTest - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshEulerOperatorSplitVertexTest) -itk_add_test(NAME itkQuadEdgeMeshIteratorTest - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshIteratorTest) -itk_add_test(NAME itkQuadEdgeMeshNoPointConstTest - COMMAND ITKQuadEdgeMeshTestDriver itkQuadEdgeMeshNoPointConstTest) -itk_add_test(NAME itkVTKPolyDataIOQuadEdgeMeshTest - COMMAND ITKQuadEdgeMeshTestDriver itkVTKPolyDataIOQuadEdgeMeshTest - DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk} ${ITK_TEST_OUTPUT_DIR}/VTKPolyDataIOTest.vtk) -itk_add_test(NAME itkVTKPolyDataReaderQuadEdgeMeshTest - COMMAND ITKQuadEdgeMeshTestDriver itkVTKPolyDataReaderQuadEdgeMeshTest - DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk}) -itk_add_test(NAME itkDynamicQuadEdgeMeshTest - COMMAND ITKQuadEdgeMeshTestDriver itkDynamicQuadEdgeMeshTest) +itk_add_test( + NAME + itkQuadEdgeMeshPointTest1 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshPointTest1) +itk_add_test( + NAME + itkQuadEdgeMeshTest1 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshTest1) +itk_add_test( + NAME + itkQuadEdgeMeshTest2 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshTest2) +itk_add_test( + NAME + itkQuadEdgeMeshTest3 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshTest3) +itk_add_test( + NAME + itkQuadEdgeMeshPolygonCellTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshPolygonCellTest) +itk_add_test( + NAME + itkQuadEdgeMeshFrontIteratorTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshFrontIteratorTest) +itk_add_test( + NAME + itkQuadEdgeMeshScalarDataVTKPolyDataWriterTest1 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshScalarDataVTKPolyDataWriterTest1 + ${ITK_TEST_OUTPUT_DIR}/sphere.vtk) +itk_add_test( + NAME + itkQuadEdgeTest1 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeTest1) +itk_add_test( + NAME + itkGeometricalQuadEdgeTest1 + COMMAND + ITKQuadEdgeMeshTestDriver + itkGeometricalQuadEdgeTest1) +itk_add_test( + NAME + itkQuadEdgeMeshAddFaceTest1_0 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshAddFaceTest1 + 0) +itk_add_test( + NAME + itkQuadEdgeMeshAddFaceTest1_1 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshAddFaceTest1 + 1) +itk_add_test( + NAME + itkQuadEdgeMeshAddFaceTest1_2 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshAddFaceTest1 + 2) +itk_add_test( + NAME + itkQuadEdgeMeshAddFaceTest1_3 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshAddFaceTest1 + 3) +itk_add_test( + NAME + itkQuadEdgeMeshAddFaceTest1_4 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshAddFaceTest1 + 4) +itk_add_test( + NAME + itkQuadEdgeMeshAddFaceTest1_5 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshAddFaceTest1 + 5) +itk_add_test( + NAME + itkQuadEdgeMeshAddFaceTest2 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshAddFaceTest2) +itk_add_test( + NAME + itkQuadEdgeMeshCellInterfaceTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshCellInterfaceTest) +itk_add_test( + NAME + itkQuadEdgeMeshCountingCellsTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshCountingCellsTest) +itk_add_test( + NAME + itkQuadEdgeMeshDeleteEdgeTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshDeleteEdgeTest) +itk_add_test( + NAME + itkQuadEdgeMeshDeletePointAndReorderIDsTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshDeletePointAndReorderIDsTest) +itk_add_test( + NAME + itkQuadEdgeMeshEulerOperatorCreateCenterVertexTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshEulerOperatorCreateCenterVertexTest) +itk_add_test( + NAME + itkQuadEdgeMeshEulerOperatorDeleteCenterVertexTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshEulerOperatorDeleteCenterVertexTest) +itk_add_test( + NAME + itkQuadEdgeMeshEulerOperatorFlipTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshEulerOperatorFlipTest) +itk_add_test( + NAME + itkQuadEdgeMeshEulerOperatorJoinFacetTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshEulerOperatorJoinFacetTest) +itk_add_test( + NAME + itkQuadEdgeMeshEulerOperatorJoinVertexTest0 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshEulerOperatorJoinVertexTest + 0) +itk_add_test( + NAME + itkQuadEdgeMeshEulerOperatorJoinVertexTest1 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshEulerOperatorJoinVertexTest + 1) +itk_add_test( + NAME + itkQuadEdgeMeshEulerOperatorJoinVertexTest2 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshEulerOperatorJoinVertexTest + 2) +itk_add_test( + NAME + itkQuadEdgeMeshEulerOperatorJoinVertexTest3 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshEulerOperatorJoinVertexTest + 3) +itk_add_test( + NAME + itkQuadEdgeMeshEulerOperatorJoinVertexTest4 + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshEulerOperatorJoinVertexTest + 4) +itk_add_test( + NAME + itkQuadEdgeMeshEulerOperatorSplitEdgeTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshEulerOperatorSplitEdgeTest) +itk_add_test( + NAME + itkQuadEdgeMeshEulerOperatorSplitFaceTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshEulerOperatorSplitFaceTest) +itk_add_test( + NAME + itkQuadEdgeMeshEulerOperatorSplitVertexTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshEulerOperatorSplitVertexTest) +itk_add_test( + NAME + itkQuadEdgeMeshIteratorTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshIteratorTest) +itk_add_test( + NAME + itkQuadEdgeMeshNoPointConstTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkQuadEdgeMeshNoPointConstTest) +itk_add_test( + NAME + itkVTKPolyDataIOQuadEdgeMeshTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkVTKPolyDataIOQuadEdgeMeshTest + DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk} + ${ITK_TEST_OUTPUT_DIR}/VTKPolyDataIOTest.vtk) +itk_add_test( + NAME + itkVTKPolyDataReaderQuadEdgeMeshTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkVTKPolyDataReaderQuadEdgeMeshTest + DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk}) +itk_add_test( + NAME + itkDynamicQuadEdgeMeshTest + COMMAND + ITKQuadEdgeMeshTestDriver + itkDynamicQuadEdgeMeshTest) - -set(ITKQuadEdgeMeshGTests - itkQuadEdgeMeshTypeTraitsGTest.cxx -) -CreateGoogleTestDriver(ITKQuadEdgeMesh "${ITKQuadEdgeMesh-Test_LIBRARIES}" "${ITKQuadEdgeMeshGTests}") +set(ITKQuadEdgeMeshGTests itkQuadEdgeMeshTypeTraitsGTest.cxx) +creategoogletestdriver(ITKQuadEdgeMesh "${ITKQuadEdgeMesh-Test_LIBRARIES}" "${ITKQuadEdgeMeshGTests}") diff --git a/Modules/Core/QuadEdgeMesh/wrapping/CMakeLists.txt b/Modules/Core/QuadEdgeMesh/wrapping/CMakeLists.txt index 4aa262ed217..07ac5da7489 100644 --- a/Modules/Core/QuadEdgeMesh/wrapping/CMakeLists.txt +++ b/Modules/Core/QuadEdgeMesh/wrapping/CMakeLists.txt @@ -1,14 +1,13 @@ itk_wrap_module(ITKQuadEdgeMesh) set(WRAPPER_SUBMODULE_ORDER - itkQuadEdge - itkGeometricalQuadEdge - itkQuadEdgeMeshPoint - itkQuadEdgeMeshTraits - itkQuadEdgeCellTraitsInfo - itkQuadEdgeMeshLineCell - itkQuadEdgeMeshBase - # itkQuadEdgeMesh - itkQuadEdgeMeshToQuadEdgeMeshFilter -) + itkQuadEdge + itkGeometricalQuadEdge + itkQuadEdgeMeshPoint + itkQuadEdgeMeshTraits + itkQuadEdgeCellTraitsInfo + itkQuadEdgeMeshLineCell + itkQuadEdgeMeshBase + # itkQuadEdgeMesh + itkQuadEdgeMeshToQuadEdgeMeshFilter) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Core/QuadEdgeMesh/wrapping/itkGeometricalQuadEdge.wrap b/Modules/Core/QuadEdgeMesh/wrapping/itkGeometricalQuadEdge.wrap index 3858b21faa9..57168419b6d 100644 --- a/Modules/Core/QuadEdgeMesh/wrapping/itkGeometricalQuadEdge.wrap +++ b/Modules/Core/QuadEdgeMesh/wrapping/itkGeometricalQuadEdge.wrap @@ -1,4 +1,4 @@ itk_wrap_class("itk::GeometricalQuadEdge" EXPLICIT_SPECIALIZATION) - itk_wrap_template("${ITKM_IT}${ITKM_IT}BBF" "${ITKT_IT}, ${ITKT_IT}, bool, bool, true") - itk_wrap_template("${ITKM_IT}${ITKM_IT}BBT" "${ITKT_IT}, ${ITKT_IT}, bool, bool, false") +itk_wrap_template("${ITKM_IT}${ITKM_IT}BBF" "${ITKT_IT}, ${ITKT_IT}, bool, bool, true") +itk_wrap_template("${ITKM_IT}${ITKM_IT}BBT" "${ITKT_IT}, ${ITKT_IT}, bool, bool, false") itk_end_wrap_class() diff --git a/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeCellTraitsInfo.wrap b/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeCellTraitsInfo.wrap index dd2fb68a0d2..4270e6d5a17 100644 --- a/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeCellTraitsInfo.wrap +++ b/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeCellTraitsInfo.wrap @@ -3,17 +3,21 @@ itk_wrap_include("itkQuadEdgeCellTraitsInfo.h") set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) set(mangle_MapContainer "\${ITKM_IT}QEMP\${ITKM_F}\${d}GQE\${ITKM_IT}\${ITKM_IT}BBT") -set(type_MapContainer "\${ITKT_IT},itk::QuadEdgeMeshPoint< \${ITKT_F},\${d},itk::GeometricalQuadEdge< \${ITKT_IT},\${ITKT_IT},bool,bool,true > >") +set(type_MapContainer + "\${ITKT_IT},itk::QuadEdgeMeshPoint< \${ITKT_F},\${d},itk::GeometricalQuadEdge< \${ITKT_IT},\${ITKT_IT},bool,bool,true > >" +) itk_wrap_class("itk::MapContainer" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${mangle_MapContainer}" "${type_MapContainer}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${mangle_MapContainer}" "${type_MapContainer}") +endforeach() itk_end_wrap_class() - itk_wrap_class("itk::QuadEdgeMeshCellTraitsInfo") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${d}${ITKM_F}${ITKM_F}${ITKM_IT}${ITKM_IT}${ITKM_UC}QEMPGQE${mangle_MapContainer}GQE" "${d},${ITKT_F},${ITKT_F},${ITKT_IT},${ITKT_IT},${ITKT_UC},itk::QuadEdgeMeshPoint< ${ITKT_F},${d},itk::GeometricalQuadEdge< ${ITKT_IT}, ${ITKT_IT},bool,bool,true > >,itk::MapContainer<${type_MapContainer} >,std::set< ${ITKT_IT} >,itk::GeometricalQuadEdge< ${ITKT_IT},${ITKT_IT},bool,bool,true >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template( + "${d}${ITKM_F}${ITKM_F}${ITKM_IT}${ITKM_IT}${ITKM_UC}QEMPGQE${mangle_MapContainer}GQE" + "${d},${ITKT_F},${ITKT_F},${ITKT_IT},${ITKT_IT},${ITKT_UC},itk::QuadEdgeMeshPoint< ${ITKT_F},${d},itk::GeometricalQuadEdge< ${ITKT_IT}, ${ITKT_IT},bool,bool,true > >,itk::MapContainer<${type_MapContainer} >,std::set< ${ITKT_IT} >,itk::GeometricalQuadEdge< ${ITKT_IT},${ITKT_IT},bool,bool,true >" + ) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshBase.wrap b/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshBase.wrap index 6b9ca233152..2f2d0142c32 100644 --- a/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshBase.wrap +++ b/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshBase.wrap @@ -4,54 +4,68 @@ itk_wrap_include("itkMesh.h") itk_wrap_include("itkQuadEdgeMeshTraits.h") itk_wrap_class("itk::MapContainer" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_IT}CI${ITKM_D}QEMCTI${d}" "${ITKT_IT}, itk::CellInterface< ${ITKT_D}, itk::QuadEdgeMeshCellTraitsInfo< ${d},${ITKT_F},${ITKT_F},${ITKT_IT},${ITKT_IT},${ITKT_UC},itk::QuadEdgeMeshPoint< ${ITKT_F},${d},itk::GeometricalQuadEdge< ${ITKT_IT}, ${ITKT_IT},bool,bool,true > >,itk::MapContainer< ${ITKT_IT},itk::QuadEdgeMeshPoint< ${ITKT_F},${d},itk::GeometricalQuadEdge< ${ITKT_IT},${ITKT_IT},bool,bool,true > > >,std::set< ${ITKT_IT} >,itk::GeometricalQuadEdge< ${ITKT_IT},${ITKT_IT},bool,bool,true > > >*") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template( + "${ITKM_IT}CI${ITKM_D}QEMCTI${d}" + "${ITKT_IT}, itk::CellInterface< ${ITKT_D}, itk::QuadEdgeMeshCellTraitsInfo< ${d},${ITKT_F},${ITKT_F},${ITKT_IT},${ITKT_IT},${ITKT_UC},itk::QuadEdgeMeshPoint< ${ITKT_F},${d},itk::GeometricalQuadEdge< ${ITKT_IT}, ${ITKT_IT},bool,bool,true > >,itk::MapContainer< ${ITKT_IT},itk::QuadEdgeMeshPoint< ${ITKT_F},${d},itk::GeometricalQuadEdge< ${ITKT_IT},${ITKT_IT},bool,bool,true > > >,std::set< ${ITKT_IT} >,itk::GeometricalQuadEdge< ${ITKT_IT},${ITKT_IT},bool,bool,true > > >*" + ) +endforeach() itk_end_wrap_class() itk_wrap_class("itk::Mesh" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}QEMT${ITKM_D}${d}${ITKM_B}${ITKM_B}${ITKM_F}${ITKM_F}" "${ITKT_D},${d},itk::QuadEdgeMeshTraits< ${ITKT_D},${d},${ITKT_B},${ITKT_B},${ITKT_F},${ITKT_F} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}QEMT${ITKM_D}${d}${ITKM_B}${ITKM_B}${ITKM_F}${ITKM_F}" + "${ITKT_D},${d},itk::QuadEdgeMeshTraits< ${ITKT_D},${d},${ITKT_B},${ITKT_B},${ITKT_F},${ITKT_F} >") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::PointSet" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}QEMT${ITKM_D}${d}${ITKM_B}${ITKM_B}${ITKM_F}${ITKM_F}" "${ITKT_D},${d},itk::QuadEdgeMeshTraits< ${ITKT_D},${d},${ITKT_B},${ITKT_B},${ITKT_F},${ITKT_F} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}QEMT${ITKM_D}${d}${ITKM_B}${ITKM_B}${ITKM_F}${ITKM_F}" + "${ITKT_D},${d},itk::QuadEdgeMeshTraits< ${ITKT_D},${d},${ITKT_B},${ITKT_B},${ITKT_F},${ITKT_F} >") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::BoundingBox" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_IT}${d}FMC${ITKM_IT}QEMPF${d}" "${ITKT_IT}, ${d}, float, itk::MapContainer< ${ITKT_IT}, itk::QuadEdgeMeshPoint< float,${d},itk::GeometricalQuadEdge< ${ITKT_IT},${ITKT_IT},bool,bool,true > > >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template( + "${ITKM_IT}${d}FMC${ITKM_IT}QEMPF${d}" + "${ITKT_IT}, ${d}, float, itk::MapContainer< ${ITKT_IT}, itk::QuadEdgeMeshPoint< float,${d},itk::GeometricalQuadEdge< ${ITKT_IT},${ITKT_IT},bool,bool,true > > >" + ) +endforeach() itk_end_wrap_class() itk_wrap_class("itk::QuadEdgeMesh" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::MeshSource" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) -# itk_wrap_template("MD${d}Q" "itk::Mesh< ${ITKT_D},${d},itk::QuadEdgeMeshTraits< ${ITKT_D},${d},${ITKT_B},${ITKT_B},${ITKT_F},${ITKT_F} > >") - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - itk_wrap_template("M${ITKM_D}${d}QEMT${ITKM_D}${d}${ITKM_B}${ITKM_B}${ITKM_F}${ITKM_F}" "itk::Mesh< ${ITKT_D},${d},itk::QuadEdgeMeshTraits< ${ITKT_D},${d},${ITKT_B},${ITKT_B},${ITKT_F},${ITKT_F} > >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + # itk_wrap_template("MD${d}Q" "itk::Mesh< ${ITKT_D},${d},itk::QuadEdgeMeshTraits< ${ITKT_D},${d},${ITKT_B},${ITKT_B},${ITKT_F},${ITKT_F} > >") + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") + itk_wrap_template( + "M${ITKM_D}${d}QEMT${ITKM_D}${d}${ITKM_B}${ITKM_B}${ITKM_F}${ITKM_F}" + "itk::Mesh< ${ITKT_D},${d},itk::QuadEdgeMeshTraits< ${ITKT_D},${d},${ITKT_B},${ITKT_B},${ITKT_F},${ITKT_F} > >") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::MeshToMeshFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) -# itk_wrap_template("MD${d}QMD${d}Q" "itk::Mesh< ${ITKT_D},${d},itk::QuadEdgeMeshTraits< ${ITKT_D},${d},${ITKT_B},${ITKT_B},${ITKT_F},${ITKT_F} > >, itk::Mesh< ${ITKT_D},${d},itk::QuadEdgeMeshTraits< ${ITKT_D},${d},${ITKT_B},${ITKT_B},${ITKT_F},${ITKT_F} > >") - itk_wrap_template("QEM${ITKM_D}${d}QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >, itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + # itk_wrap_template("MD${d}QMD${d}Q" "itk::Mesh< ${ITKT_D},${d},itk::QuadEdgeMeshTraits< ${ITKT_D},${d},${ITKT_B},${ITKT_B},${ITKT_F},${ITKT_F} > >, itk::Mesh< ${ITKT_D},${d},itk::QuadEdgeMeshTraits< ${ITKT_D},${d},${ITKT_B},${ITKT_B},${ITKT_F},${ITKT_F} > >") + itk_wrap_template("QEM${ITKM_D}${d}QEM${ITKM_D}${d}" + "itk::QuadEdgeMesh< ${ITKT_D},${d} >, itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::ImageToMeshFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_INT}) - itk_wrap_template("${ITKM_I${t}${d}}M${ITKM_D}${d}QEMT${ITKM_D}${d}${ITKM_B}${ITKM_B}${ITKM_F}${ITKM_F}" "${ITKT_I${t}${d}}, itk::Mesh< ${ITKT_D},${d},itk::QuadEdgeMeshTraits< ${ITKT_D},${d},${ITKT_B},${ITKT_B},${ITKT_F},${ITKT_F} > >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_INT}) + itk_wrap_template( + "${ITKM_I${t}${d}}M${ITKM_D}${d}QEMT${ITKM_D}${d}${ITKM_B}${ITKM_B}${ITKM_F}${ITKM_F}" + "${ITKT_I${t}${d}}, itk::Mesh< ${ITKT_D},${d},itk::QuadEdgeMeshTraits< ${ITKT_D},${d},${ITKT_B},${ITKT_B},${ITKT_F},${ITKT_F} > >" + ) endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshLineCell.wrap b/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshLineCell.wrap index 2d33b4203eb..3c2ed336e48 100644 --- a/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshLineCell.wrap +++ b/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshLineCell.wrap @@ -1,18 +1,19 @@ itk_wrap_include("itkQuadEdgeCellTraitsInfo.h") set(mangle_CellInterface "\${ITKM_D}QEMCTI\${d}") -set(type_CellInterface "\${ITKT_D}, itk::QuadEdgeMeshCellTraitsInfo< \${d},\${ITKT_F},\${ITKT_F},\${ITKT_IT},\${ITKT_IT},\${ITKT_UC},itk::QuadEdgeMeshPoint< \${ITKT_F},\${d},itk::GeometricalQuadEdge< \${ITKT_IT}, \${ITKT_IT},bool,bool,true > >,itk::MapContainer< \${ITKT_IT},itk::QuadEdgeMeshPoint< \${ITKT_F},\${d},itk::GeometricalQuadEdge< \${ITKT_IT},\${ITKT_IT},bool,bool,true > > >,std::set< \${ITKT_IT} >,itk::GeometricalQuadEdge< \${ITKT_IT},\${ITKT_IT},bool,bool,true > >") +set(type_CellInterface + "\${ITKT_D}, itk::QuadEdgeMeshCellTraitsInfo< \${d},\${ITKT_F},\${ITKT_F},\${ITKT_IT},\${ITKT_IT},\${ITKT_UC},itk::QuadEdgeMeshPoint< \${ITKT_F},\${d},itk::GeometricalQuadEdge< \${ITKT_IT}, \${ITKT_IT},bool,bool,true > >,itk::MapContainer< \${ITKT_IT},itk::QuadEdgeMeshPoint< \${ITKT_F},\${d},itk::GeometricalQuadEdge< \${ITKT_IT},\${ITKT_IT},bool,bool,true > > >,std::set< \${ITKT_IT} >,itk::GeometricalQuadEdge< \${ITKT_IT},\${ITKT_IT},bool,bool,true > >" +) # CellInterface is in ITKCommon itk_wrap_class("itk::CellInterface" AUTOPOINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${mangle_CellInterface}" "${type_CellInterface}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${mangle_CellInterface}" "${type_CellInterface}") +endforeach() itk_end_wrap_class() - itk_wrap_class("itk::QuadEdgeMeshLineCell" AUTOPOINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("CI${mangle_CellInterface}" "itk::CellInterface< ${type_CellInterface} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("CI${mangle_CellInterface}" "itk::CellInterface< ${type_CellInterface} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshPoint.wrap b/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshPoint.wrap index 3ac4d0eb13d..32c6d6646cc 100644 --- a/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshPoint.wrap +++ b/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshPoint.wrap @@ -1,5 +1,6 @@ itk_wrap_class("itk::QuadEdgeMeshPoint") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("F${d}GQE${ITKM_IT}${ITKM_IT}BBT" "float,${d},itk::GeometricalQuadEdge< ${ITKT_IT},${ITKT_IT},bool,bool,true >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("F${d}GQE${ITKM_IT}${ITKM_IT}BBT" + "float,${d},itk::GeometricalQuadEdge< ${ITKT_IT},${ITKT_IT},bool,bool,true >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshToQuadEdgeMeshFilter.wrap b/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshToQuadEdgeMeshFilter.wrap index 5df653b704e..498086504aa 100644 --- a/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshToQuadEdgeMeshFilter.wrap +++ b/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshToQuadEdgeMeshFilter.wrap @@ -1,7 +1,8 @@ itk_wrap_include("itkQuadEdgeMesh.h") itk_wrap_class("itk::QuadEdgeMeshToQuadEdgeMeshFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >, itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}QEM${ITKM_D}${d}" + "itk::QuadEdgeMesh< ${ITKT_D},${d} >, itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshTraits.wrap b/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshTraits.wrap index dcb39c0ea0c..a8c65f7b2ed 100644 --- a/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshTraits.wrap +++ b/Modules/Core/QuadEdgeMesh/wrapping/itkQuadEdgeMeshTraits.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::QuadEdgeMeshTraits") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("D${d}BBFF" "double, ${d}, bool, bool, float, float") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("D${d}BBFF" "double, ${d}, bool, bool, float, float") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/itk-module.cmake b/Modules/Core/SpatialObjects/itk-module.cmake index d7e289cb34c..426308b19de 100644 --- a/Modules/Core/SpatialObjects/itk-module.cmake +++ b/Modules/Core/SpatialObjects/itk-module.cmake @@ -1,24 +1,25 @@ -set(DOCUMENTATION "SpatialObjects are intended to represent regions in space. +set(DOCUMENTATION + "SpatialObjects are intended to represent regions in space. The basic functionality of an itk::SpatialObject is to answer the question of whether a physical point is inside or outside of the itk::SpatialObject. They are commonly used for representing masks in an analytical form, as well as approximations of shape by combining them into hierarchical structures similar to scene graphs.") -itk_module(ITKSpatialObjects +itk_module( + ITKSpatialObjects DEPENDS - ITKTransform + ITKTransform PRIVATE_DEPENDS - ITKMesh - ITKCommon + ITKMesh + ITKCommon COMPILE_DEPENDS - ITKImageFunction - ITKMetaIO + ITKImageFunction + ITKMetaIO TEST_DEPENDS - ITKTestKernel - ITKMetaIO - ITKMesh + ITKTestKernel + ITKMetaIO + ITKMesh DESCRIPTION - "${DOCUMENTATION}" - ENABLE_SHARED -) + "${DOCUMENTATION}" + ENABLE_SHARED) diff --git a/Modules/Core/SpatialObjects/src/CMakeLists.txt b/Modules/Core/SpatialObjects/src/CMakeLists.txt index 24185b0e3fa..b03edc8c4b8 100644 --- a/Modules/Core/SpatialObjects/src/CMakeLists.txt +++ b/Modules/Core/SpatialObjects/src/CMakeLists.txt @@ -1,9 +1,8 @@ set(ITKSpatialObjects_SRCS - itkMetaEvent.cxx - itkSpatialObjectFactoryBase.cxx - itkSpatialObjectProperty.cxx - itkDTITubeSpatialObjectPoint.cxx - itkContourSpatialObject.cxx - ) + itkMetaEvent.cxx + itkSpatialObjectFactoryBase.cxx + itkSpatialObjectProperty.cxx + itkDTITubeSpatialObjectPoint.cxx + itkContourSpatialObject.cxx) itk_module_add_library(ITKSpatialObjects ${ITKSpatialObjects_SRCS}) diff --git a/Modules/Core/SpatialObjects/test/CMakeLists.txt b/Modules/Core/SpatialObjects/test/CMakeLists.txt index e4e0573b477..043d3371ae5 100644 --- a/Modules/Core/SpatialObjects/test/CMakeLists.txt +++ b/Modules/Core/SpatialObjects/test/CMakeLists.txt @@ -1,107 +1,219 @@ itk_module_test() set(ITKSpatialObjectsTests -itkCastSpatialObjectFilterTest.cxx -itkContourSpatialObjectPointTest.cxx -itkSpatialObjectToImageFilterTest.cxx -itkLandmarkSpatialObjectTest.cxx -itkImageSpatialObjectTest.cxx -itkSpatialObjectToImageStatisticsCalculatorTest.cxx -itkImageMaskSpatialObjectTest.cxx -itkImageMaskSpatialObjectTest2.cxx -itkImageMaskSpatialObjectTest3.cxx -itkImageMaskSpatialObjectTest4.cxx -itkBlobSpatialObjectTest.cxx -itkContourSpatialObjectTest.cxx -itkSurfaceSpatialObjectTest.cxx -itkMetaArrowConverterTest.cxx -itkMetaGaussianConverterTest.cxx -itkTubeSpatialObjectTest.cxx -itkDTITubeSpatialObjectTest.cxx -itkSpatialObjectToPointSetFilterTest.cxx -itkSpatialObjectDuplicatorTest.cxx -itkBoxSpatialObjectTest.cxx -itkGaussianSpatialObjectTest.cxx -itkPolygonSpatialObjectTest.cxx -itkPolygonSpatialObjectIsInsideInObjectSpaceTest.cxx -itkEllipseSpatialObjectTest.cxx -itkMeshSpatialObjectTest.cxx -itkArrowSpatialObjectTest.cxx -itkLineSpatialObjectTest.cxx -itkNewMetaObjectTypeTest.cxx -) + itkCastSpatialObjectFilterTest.cxx + itkContourSpatialObjectPointTest.cxx + itkSpatialObjectToImageFilterTest.cxx + itkLandmarkSpatialObjectTest.cxx + itkImageSpatialObjectTest.cxx + itkSpatialObjectToImageStatisticsCalculatorTest.cxx + itkImageMaskSpatialObjectTest.cxx + itkImageMaskSpatialObjectTest2.cxx + itkImageMaskSpatialObjectTest3.cxx + itkImageMaskSpatialObjectTest4.cxx + itkBlobSpatialObjectTest.cxx + itkContourSpatialObjectTest.cxx + itkSurfaceSpatialObjectTest.cxx + itkMetaArrowConverterTest.cxx + itkMetaGaussianConverterTest.cxx + itkTubeSpatialObjectTest.cxx + itkDTITubeSpatialObjectTest.cxx + itkSpatialObjectToPointSetFilterTest.cxx + itkSpatialObjectDuplicatorTest.cxx + itkBoxSpatialObjectTest.cxx + itkGaussianSpatialObjectTest.cxx + itkPolygonSpatialObjectTest.cxx + itkPolygonSpatialObjectIsInsideInObjectSpaceTest.cxx + itkEllipseSpatialObjectTest.cxx + itkMeshSpatialObjectTest.cxx + itkArrowSpatialObjectTest.cxx + itkLineSpatialObjectTest.cxx + itkNewMetaObjectTypeTest.cxx) -CreateTestDriver(ITKSpatialObjects "${ITKSpatialObjects-Test_LIBRARIES}" "${ITKSpatialObjectsTests}") +createtestdriver(ITKSpatialObjects "${ITKSpatialObjects-Test_LIBRARIES}" "${ITKSpatialObjectsTests}") -itk_add_test(NAME itkCastSpatialObjectFilterTest - COMMAND ITKSpatialObjectsTestDriver itkCastSpatialObjectFilterTest) -itk_add_test(NAME itkContourSpatialObjectPointTest - COMMAND ITKSpatialObjectsTestDriver itkContourSpatialObjectPointTest) -itk_add_test(NAME itkSpatialObjectToImageFilterTest - COMMAND ITKSpatialObjectsTestDriver itkSpatialObjectToImageFilterTest) -itk_add_test(NAME itkLandmarkSpatialObjectTest - COMMAND ITKSpatialObjectsTestDriver itkLandmarkSpatialObjectTest) -itk_add_test(NAME itkImageSpatialObjectTest - COMMAND ITKSpatialObjectsTestDriver itkImageSpatialObjectTest) -itk_add_test(NAME itkSpatialObjectToImageStatisticsCalculatorTest - COMMAND ITKSpatialObjectsTestDriver itkSpatialObjectToImageStatisticsCalculatorTest) -itk_add_test(NAME itkImageMaskSpatialObjectTest - COMMAND ITKSpatialObjectsTestDriver itkImageMaskSpatialObjectTest) -itk_add_test(NAME itkImageMaskSpatialObjectTest2 - COMMAND ITKSpatialObjectsTestDriver itkImageMaskSpatialObjectTest2) -itk_add_test(NAME itkImageMaskSpatialObjectTest3 - COMMAND ITKSpatialObjectsTestDriver itkImageMaskSpatialObjectTest3) -itk_add_test(NAME itkImageMaskSpatialObjectTest4 - COMMAND ITKSpatialObjectsTestDriver itkImageMaskSpatialObjectTest4) -itk_add_test(NAME itkBlobSpatialObjectTest - COMMAND ITKSpatialObjectsTestDriver itkBlobSpatialObjectTest) -itk_add_test(NAME itkContourSpatialObjectTest - COMMAND ITKSpatialObjectsTestDriver itkContourSpatialObjectTest) -itk_add_test(NAME itkSurfaceSpatialObjectTest - COMMAND ITKSpatialObjectsTestDriver itkSurfaceSpatialObjectTest) -itk_add_test(NAME itkMetaArrowConverterTest - COMMAND ITKSpatialObjectsTestDriver itkMetaArrowConverterTest - ${ITK_TEST_OUTPUT_DIR}/MetaArrowConverterTestFile.mha) -itk_add_test(NAME itkMetaGaussianConverterTest - COMMAND ITKSpatialObjectsTestDriver itkMetaGaussianConverterTest - ${ITK_TEST_OUTPUT_DIR}/MetaGaussianConverterTest.mha) -itk_add_test(NAME itkTubeSpatialObjectTest - COMMAND ITKSpatialObjectsTestDriver itkTubeSpatialObjectTest) -itk_add_test(NAME itkDTITubeSpatialObjectTest - COMMAND ITKSpatialObjectsTestDriver itkDTITubeSpatialObjectTest) -itk_add_test(NAME itkSpatialObjectToPointSetFilterTest - COMMAND ITKSpatialObjectsTestDriver itkSpatialObjectToPointSetFilterTest) -itk_add_test(NAME itkSpatialObjectDuplicatorTest - COMMAND ITKSpatialObjectsTestDriver itkSpatialObjectDuplicatorTest) -itk_add_test(NAME itkBoxSpatialObjectTest - COMMAND ITKSpatialObjectsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/SpatialObjects/BoxSpatialObjectTest.png} - ${ITK_TEST_OUTPUT_DIR}/BoxSpatialObjectTest.png - itkBoxSpatialObjectTest ${ITK_TEST_OUTPUT_DIR}/BoxSpatialObjectTest.png) -itk_add_test(NAME itkGaussianSpatialObjectTest - COMMAND ITKSpatialObjectsTestDriver itkGaussianSpatialObjectTest) -itk_add_test(NAME itkPolygonSpatialObjectTest - COMMAND ITKSpatialObjectsTestDriver itkPolygonSpatialObjectTest) -itk_add_test(NAME itkPolygonSpatialObjectIsInsideInObjectSpaceTest - COMMAND ITKSpatialObjectsTestDriver --compareIntensityTolerance 0 - --compare DATA{Baseline/itkPolygonSpatialObjectIsInsideInObjectSpaceTest.mha} - ${ITK_TEST_OUTPUT_DIR}/itkPolygonSpatialObjectIsInsideInObjectSpaceTest.mha - itkPolygonSpatialObjectIsInsideInObjectSpaceTest - DATA{Input/PolygonContourPoints.csv} - DATA{Baseline/itkPolygonSpatialObjectIsInsideInObjectSpaceTest.mha} - ${ITK_TEST_OUTPUT_DIR}/itkPolygonSpatialObjectIsInsideInObjectSpaceTest.mha) -itk_add_test(NAME itkEllipseSpatialObjectTest - COMMAND ITKSpatialObjectsTestDriver itkEllipseSpatialObjectTest) -itk_add_test(NAME itkMeshSpatialObjectTest - COMMAND ITKSpatialObjectsTestDriver itkMeshSpatialObjectTest) -itk_add_test(NAME itkArrowSpatialObjectTest - COMMAND ITKSpatialObjectsTestDriver itkArrowSpatialObjectTest) -itk_add_test(NAME itkLineSpatialObjectTest - COMMAND ITKSpatialObjectsTestDriver itkLineSpatialObjectTest) -itk_add_test(NAME itkNewMetaObjectTypeTest - COMMAND ITKSpatialObjectsTestDriver itkNewMetaObjectTypeTest - ${ITK_TEST_OUTPUT_DIR}/NewMetaObjectType.meta) +itk_add_test( + NAME + itkCastSpatialObjectFilterTest + COMMAND + ITKSpatialObjectsTestDriver + itkCastSpatialObjectFilterTest) +itk_add_test( + NAME + itkContourSpatialObjectPointTest + COMMAND + ITKSpatialObjectsTestDriver + itkContourSpatialObjectPointTest) +itk_add_test( + NAME + itkSpatialObjectToImageFilterTest + COMMAND + ITKSpatialObjectsTestDriver + itkSpatialObjectToImageFilterTest) +itk_add_test( + NAME + itkLandmarkSpatialObjectTest + COMMAND + ITKSpatialObjectsTestDriver + itkLandmarkSpatialObjectTest) +itk_add_test( + NAME + itkImageSpatialObjectTest + COMMAND + ITKSpatialObjectsTestDriver + itkImageSpatialObjectTest) +itk_add_test( + NAME + itkSpatialObjectToImageStatisticsCalculatorTest + COMMAND + ITKSpatialObjectsTestDriver + itkSpatialObjectToImageStatisticsCalculatorTest) +itk_add_test( + NAME + itkImageMaskSpatialObjectTest + COMMAND + ITKSpatialObjectsTestDriver + itkImageMaskSpatialObjectTest) +itk_add_test( + NAME + itkImageMaskSpatialObjectTest2 + COMMAND + ITKSpatialObjectsTestDriver + itkImageMaskSpatialObjectTest2) +itk_add_test( + NAME + itkImageMaskSpatialObjectTest3 + COMMAND + ITKSpatialObjectsTestDriver + itkImageMaskSpatialObjectTest3) +itk_add_test( + NAME + itkImageMaskSpatialObjectTest4 + COMMAND + ITKSpatialObjectsTestDriver + itkImageMaskSpatialObjectTest4) +itk_add_test( + NAME + itkBlobSpatialObjectTest + COMMAND + ITKSpatialObjectsTestDriver + itkBlobSpatialObjectTest) +itk_add_test( + NAME + itkContourSpatialObjectTest + COMMAND + ITKSpatialObjectsTestDriver + itkContourSpatialObjectTest) +itk_add_test( + NAME + itkSurfaceSpatialObjectTest + COMMAND + ITKSpatialObjectsTestDriver + itkSurfaceSpatialObjectTest) +itk_add_test( + NAME + itkMetaArrowConverterTest + COMMAND + ITKSpatialObjectsTestDriver + itkMetaArrowConverterTest + ${ITK_TEST_OUTPUT_DIR}/MetaArrowConverterTestFile.mha) +itk_add_test( + NAME + itkMetaGaussianConverterTest + COMMAND + ITKSpatialObjectsTestDriver + itkMetaGaussianConverterTest + ${ITK_TEST_OUTPUT_DIR}/MetaGaussianConverterTest.mha) +itk_add_test( + NAME + itkTubeSpatialObjectTest + COMMAND + ITKSpatialObjectsTestDriver + itkTubeSpatialObjectTest) +itk_add_test( + NAME + itkDTITubeSpatialObjectTest + COMMAND + ITKSpatialObjectsTestDriver + itkDTITubeSpatialObjectTest) +itk_add_test( + NAME + itkSpatialObjectToPointSetFilterTest + COMMAND + ITKSpatialObjectsTestDriver + itkSpatialObjectToPointSetFilterTest) +itk_add_test( + NAME + itkSpatialObjectDuplicatorTest + COMMAND + ITKSpatialObjectsTestDriver + itkSpatialObjectDuplicatorTest) +itk_add_test( + NAME + itkBoxSpatialObjectTest + COMMAND + ITKSpatialObjectsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/SpatialObjects/BoxSpatialObjectTest.png} + ${ITK_TEST_OUTPUT_DIR}/BoxSpatialObjectTest.png + itkBoxSpatialObjectTest + ${ITK_TEST_OUTPUT_DIR}/BoxSpatialObjectTest.png) +itk_add_test( + NAME + itkGaussianSpatialObjectTest + COMMAND + ITKSpatialObjectsTestDriver + itkGaussianSpatialObjectTest) +itk_add_test( + NAME + itkPolygonSpatialObjectTest + COMMAND + ITKSpatialObjectsTestDriver + itkPolygonSpatialObjectTest) +itk_add_test( + NAME + itkPolygonSpatialObjectIsInsideInObjectSpaceTest + COMMAND + ITKSpatialObjectsTestDriver + --compareIntensityTolerance + 0 + --compare + DATA{Baseline/itkPolygonSpatialObjectIsInsideInObjectSpaceTest.mha} + ${ITK_TEST_OUTPUT_DIR}/itkPolygonSpatialObjectIsInsideInObjectSpaceTest.mha + itkPolygonSpatialObjectIsInsideInObjectSpaceTest + DATA{Input/PolygonContourPoints.csv} + DATA{Baseline/itkPolygonSpatialObjectIsInsideInObjectSpaceTest.mha} + ${ITK_TEST_OUTPUT_DIR}/itkPolygonSpatialObjectIsInsideInObjectSpaceTest.mha) +itk_add_test( + NAME + itkEllipseSpatialObjectTest + COMMAND + ITKSpatialObjectsTestDriver + itkEllipseSpatialObjectTest) +itk_add_test( + NAME + itkMeshSpatialObjectTest + COMMAND + ITKSpatialObjectsTestDriver + itkMeshSpatialObjectTest) +itk_add_test( + NAME + itkArrowSpatialObjectTest + COMMAND + ITKSpatialObjectsTestDriver + itkArrowSpatialObjectTest) +itk_add_test( + NAME + itkLineSpatialObjectTest + COMMAND + ITKSpatialObjectsTestDriver + itkLineSpatialObjectTest) +itk_add_test( + NAME + itkNewMetaObjectTypeTest + COMMAND + ITKSpatialObjectsTestDriver + itkNewMetaObjectTypeTest + ${ITK_TEST_OUTPUT_DIR}/NewMetaObjectType.meta) -set(ITKSpatialObjectsGTests - itkImageMaskSpatialObjectGTest.cxx -) -CreateGoogleTestDriver(ITKSpatialObjects "${ITKSpatialObjects-Test_LIBRARIES}" "${ITKSpatialObjectsGTests}") +set(ITKSpatialObjectsGTests itkImageMaskSpatialObjectGTest.cxx) +creategoogletestdriver(ITKSpatialObjects "${ITKSpatialObjects-Test_LIBRARIES}" "${ITKSpatialObjectsGTests}") diff --git a/Modules/Core/SpatialObjects/wrapping/CMakeLists.txt b/Modules/Core/SpatialObjects/wrapping/CMakeLists.txt index 752e3f40eae..ae21b1382ac 100644 --- a/Modules/Core/SpatialObjects/wrapping/CMakeLists.txt +++ b/Modules/Core/SpatialObjects/wrapping/CMakeLists.txt @@ -1,31 +1,30 @@ itk_wrap_module(ITKSpatialObjects) set(WRAPPER_SUBMODULE_ORDER - itkSpatialObjectProperty - itkSpatialObjectBase - itkSpatialObjectPoint - itkPointBasedSpatialObject - itkContourSpatialObjectPoint - itkContourSpatialObject - itkTubeSpatialObjectPoint - itkTubeSpatialObject - itkDTITubeSpatialObjectPoint - itkDTITubeSpatialObject - itkLineSpatialObjectPoint - itkLineSpatialObject - itkSurfaceSpatialObjectPoint - itkSurfaceSpatialObject - itkLandmarkSpatialObject - itkBlobSpatialObject - itkPolygonSpatialObject - itkImageSpatialObject - itkImageMaskSpatialObject - itkArrowSpatialObject - itkBoxSpatialObject - itkEllipseSpatialObject - itkGaussianSpatialObject - itkGroupSpatialObject - itkSpatialObjectToImageFilter - itkCastSpatialObjectFilter -) + itkSpatialObjectProperty + itkSpatialObjectBase + itkSpatialObjectPoint + itkPointBasedSpatialObject + itkContourSpatialObjectPoint + itkContourSpatialObject + itkTubeSpatialObjectPoint + itkTubeSpatialObject + itkDTITubeSpatialObjectPoint + itkDTITubeSpatialObject + itkLineSpatialObjectPoint + itkLineSpatialObject + itkSurfaceSpatialObjectPoint + itkSurfaceSpatialObject + itkLandmarkSpatialObject + itkBlobSpatialObject + itkPolygonSpatialObject + itkImageSpatialObject + itkImageMaskSpatialObject + itkArrowSpatialObject + itkBoxSpatialObject + itkEllipseSpatialObject + itkGaussianSpatialObject + itkGroupSpatialObject + itkSpatialObjectToImageFilter + itkCastSpatialObjectFilter) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Core/SpatialObjects/wrapping/itkArrowSpatialObject.wrap b/Modules/Core/SpatialObjects/wrapping/itkArrowSpatialObject.wrap index 99289555ae8..7344283e533 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkArrowSpatialObject.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkArrowSpatialObject.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ArrowSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template(${d} ${d}) - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template(${d} ${d}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkBlobSpatialObject.wrap b/Modules/Core/SpatialObjects/wrapping/itkBlobSpatialObject.wrap index f39381830cc..f7ee4bdaed5 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkBlobSpatialObject.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkBlobSpatialObject.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::BlobSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template(${d} ${d}) - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template(${d} ${d}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkBoxSpatialObject.wrap b/Modules/Core/SpatialObjects/wrapping/itkBoxSpatialObject.wrap index 403dc742b17..af2b1ab81c9 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkBoxSpatialObject.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkBoxSpatialObject.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::BoxSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template(${d} ${d}) - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template(${d} ${d}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkCastSpatialObjectFilter.wrap b/Modules/Core/SpatialObjects/wrapping/itkCastSpatialObjectFilter.wrap index 29cfb8b0a43..50f8ba08200 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkCastSpatialObjectFilter.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkCastSpatialObjectFilter.wrap @@ -1,6 +1,6 @@ itk_wrap_include("itkSpatialObject.h") itk_wrap_class("itk::CastSpatialObjectFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${d}" "${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${d}" "${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkContourSpatialObject.wrap b/Modules/Core/SpatialObjects/wrapping/itkContourSpatialObject.wrap index b172d717639..96ddfc91977 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkContourSpatialObject.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkContourSpatialObject.wrap @@ -1,14 +1,14 @@ itk_wrap_class("itk::PointBasedSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("Contour${d}" "${d}, itk::ContourSpatialObjectPoint<${d}>") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("Contour${d}" "${d}, itk::ContourSpatialObjectPoint<${d}>") +endforeach() itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkContourSpatialObject.h") itk_wrap_simple_class("itk::ContourSpatialObjectEnums") itk_wrap_class("itk::ContourSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template(${d} ${d}) - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template(${d} ${d}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkContourSpatialObjectPoint.wrap b/Modules/Core/SpatialObjects/wrapping/itkContourSpatialObjectPoint.wrap index e336ac6c6f9..dc9f8517af6 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkContourSpatialObjectPoint.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkContourSpatialObjectPoint.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ContourSpatialObjectPoint") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${d}" "${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${d}" "${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkDTITubeSpatialObject.wrap b/Modules/Core/SpatialObjects/wrapping/itkDTITubeSpatialObject.wrap index 27e1c30f3c7..9b507c57a9b 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkDTITubeSpatialObject.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkDTITubeSpatialObject.wrap @@ -2,10 +2,10 @@ itk_wrap_filter_dims(has_d_3 3) if(has_d_3) itk_wrap_class("itk::PointBasedSpatialObject" POINTER) - itk_wrap_template("DTITube3" "3, itk::DTITubeSpatialObjectPoint<3>") + itk_wrap_template("DTITube3" "3, itk::DTITubeSpatialObjectPoint<3>") itk_end_wrap_class() itk_wrap_class("itk::DTITubeSpatialObject" POINTER_WITH_SUPERCLASS) - itk_wrap_template(3 3) + itk_wrap_template(3 3) itk_end_wrap_class() endif() diff --git a/Modules/Core/SpatialObjects/wrapping/itkDTITubeSpatialObjectPoint.wrap b/Modules/Core/SpatialObjects/wrapping/itkDTITubeSpatialObjectPoint.wrap index 66fc53964e2..401e5b18eeb 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkDTITubeSpatialObjectPoint.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkDTITubeSpatialObjectPoint.wrap @@ -7,6 +7,6 @@ if(has_d_3) itk_wrap_simple_class("itk::DTITubeSpatialObjectPointEnums") itk_wrap_class("itk::DTITubeSpatialObjectPoint") - itk_wrap_template(3 3) + itk_wrap_template(3 3) itk_end_wrap_class() endif() diff --git a/Modules/Core/SpatialObjects/wrapping/itkEllipseSpatialObject.wrap b/Modules/Core/SpatialObjects/wrapping/itkEllipseSpatialObject.wrap index 79ee0afbbbe..edf151533e8 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkEllipseSpatialObject.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkEllipseSpatialObject.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::EllipseSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template(${d} ${d}) - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template(${d} ${d}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkGaussianSpatialObject.wrap b/Modules/Core/SpatialObjects/wrapping/itkGaussianSpatialObject.wrap index 8ab239fdb0c..db0bc277e89 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkGaussianSpatialObject.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkGaussianSpatialObject.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::GaussianSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template(${d} ${d}) - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template(${d} ${d}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkGroupSpatialObject.wrap b/Modules/Core/SpatialObjects/wrapping/itkGroupSpatialObject.wrap index 070686703fd..0f87c604307 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkGroupSpatialObject.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkGroupSpatialObject.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::GroupSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template(${d} ${d}) - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template(${d} ${d}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkImageMaskSpatialObject.wrap b/Modules/Core/SpatialObjects/wrapping/itkImageMaskSpatialObject.wrap index 45c25bf72b5..9890a76e291 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkImageMaskSpatialObject.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkImageMaskSpatialObject.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ImageMaskSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${d}" "${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${d}" "${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkImageSpatialObject.wrap b/Modules/Core/SpatialObjects/wrapping/itkImageSpatialObject.wrap index 570dbd80825..5c16c8e3688 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkImageSpatialObject.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkImageSpatialObject.wrap @@ -1,10 +1,10 @@ itk_wrap_class("itk::ImageSpatialObject" POINTER) - # unsigned char required for the ImageMaskSpatialObject - UNIQUE(types "UC;${WRAP_ITK_SCALAR}") +# unsigned char required for the ImageMaskSpatialObject +unique(types "UC;${WRAP_ITK_SCALAR}") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${d}${ITKM_${t}}" "${d},${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${d}${ITKM_${t}}" "${d},${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkLandmarkSpatialObject.wrap b/Modules/Core/SpatialObjects/wrapping/itkLandmarkSpatialObject.wrap index 4339b76d86e..9a679366d92 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkLandmarkSpatialObject.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkLandmarkSpatialObject.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::LandmarkSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template(${d} ${d}) - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template(${d} ${d}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkLineSpatialObject.wrap b/Modules/Core/SpatialObjects/wrapping/itkLineSpatialObject.wrap index d307ec03bb4..aff49e64369 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkLineSpatialObject.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkLineSpatialObject.wrap @@ -1,11 +1,11 @@ itk_wrap_class("itk::PointBasedSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("Line${d}" "${d}, itk::LineSpatialObjectPoint<${d}>") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("Line${d}" "${d}, itk::LineSpatialObjectPoint<${d}>") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::LineSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template(${d} ${d}) - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template(${d} ${d}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkLineSpatialObjectPoint.wrap b/Modules/Core/SpatialObjects/wrapping/itkLineSpatialObjectPoint.wrap index a6c2a3d936c..0c4c1fade8a 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkLineSpatialObjectPoint.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkLineSpatialObjectPoint.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::LineSpatialObjectPoint") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${d}" "${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${d}" "${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkMetaConverterBase.wrap b/Modules/Core/SpatialObjects/wrapping/itkMetaConverterBase.wrap index 604b571065f..a9004397b46 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkMetaConverterBase.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkMetaConverterBase.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::MetaConverterBase") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template(${d} ${d}) - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template(${d} ${d}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkPointBasedSpatialObject.wrap b/Modules/Core/SpatialObjects/wrapping/itkPointBasedSpatialObject.wrap index 91d768e38a3..a762f8d247a 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkPointBasedSpatialObject.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkPointBasedSpatialObject.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::PointBasedSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template(${d} ${d}) - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template(${d} ${d}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkPolygonSpatialObject.wrap b/Modules/Core/SpatialObjects/wrapping/itkPolygonSpatialObject.wrap index f5f9668f983..54c3f415fc4 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkPolygonSpatialObject.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkPolygonSpatialObject.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::PolygonSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template(${d} ${d}) - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template(${d} ${d}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkSpatialObjectBase.wrap b/Modules/Core/SpatialObjects/wrapping/itkSpatialObjectBase.wrap index de349f318a7..dfc23ed20fa 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkSpatialObjectBase.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkSpatialObjectBase.wrap @@ -2,9 +2,9 @@ itk_wrap_include("itkSpatialObject.h") itk_wrap_simple_class("itk::MetaEvent") itk_wrap_class("itk::SpatialObject" POINTER_WITH_CONST_POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${d}" "${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${d}" "${d}") +endforeach() itk_end_wrap_class() # the file must have a different name than the class name for java @@ -15,7 +15,7 @@ itk_end_wrap_class() # set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_named_class("MetaEvent" "itkMetaEvent_Superclass") - # to avoid useless warning: no template can be defined in - set(WRAPPER_WARN_ABOUT_NO_TEMPLATE OFF) - itk_wrap_one_type("FORCE_INSTANTIATE" "${WRAPPER_CLASS}" "${WRAPPER_SWIG_NAME}") +# to avoid useless warning: no template can be defined in +set(WRAPPER_WARN_ABOUT_NO_TEMPLATE OFF) +itk_wrap_one_type("FORCE_INSTANTIATE" "${WRAPPER_CLASS}" "${WRAPPER_SWIG_NAME}") itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkSpatialObjectPoint.wrap b/Modules/Core/SpatialObjects/wrapping/itkSpatialObjectPoint.wrap index 706535b88d4..1e7866ee430 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkSpatialObjectPoint.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkSpatialObjectPoint.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::SpatialObjectPoint") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${d}" "${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${d}" "${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkSpatialObjectToImageFilter.wrap b/Modules/Core/SpatialObjects/wrapping/itkSpatialObjectToImageFilter.wrap index 012d70a3364..762ff785155 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkSpatialObjectToImageFilter.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkSpatialObjectToImageFilter.wrap @@ -1,8 +1,8 @@ itk_wrap_include("itkSpatialObject.h") itk_wrap_class("itk::SpatialObjectToImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_SO${d}}${ITKM_I${t}${d}}" "${ITKT_SO${d}},${ITKT_I${t}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_SO${d}}${ITKM_I${t}${d}}" "${ITKT_SO${d}},${ITKT_I${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkSurfaceSpatialObject.wrap b/Modules/Core/SpatialObjects/wrapping/itkSurfaceSpatialObject.wrap index 69f75d95ed8..07ac6c127d3 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkSurfaceSpatialObject.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkSurfaceSpatialObject.wrap @@ -1,11 +1,11 @@ itk_wrap_class("itk::PointBasedSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("Surface${d}" "${d}, itk::SurfaceSpatialObjectPoint<${d}>") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("Surface${d}" "${d}, itk::SurfaceSpatialObjectPoint<${d}>") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::SurfaceSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template(${d} ${d}) - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template(${d} ${d}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkSurfaceSpatialObjectPoint.wrap b/Modules/Core/SpatialObjects/wrapping/itkSurfaceSpatialObjectPoint.wrap index 67ce6f312bc..b4d1b36e86e 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkSurfaceSpatialObjectPoint.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkSurfaceSpatialObjectPoint.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::SurfaceSpatialObjectPoint") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${d}" "${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${d}" "${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkTubeSpatialObject.wrap b/Modules/Core/SpatialObjects/wrapping/itkTubeSpatialObject.wrap index ed31f594908..ebfdfea0feb 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkTubeSpatialObject.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkTubeSpatialObject.wrap @@ -1,11 +1,11 @@ itk_wrap_class("itk::PointBasedSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("Tube${d}" "${d}, itk::TubeSpatialObjectPoint<${d}>") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("Tube${d}" "${d}, itk::TubeSpatialObjectPoint<${d}>") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::TubeSpatialObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template(${d} ${d}) - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template(${d} ${d}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/itkTubeSpatialObjectPoint.wrap b/Modules/Core/SpatialObjects/wrapping/itkTubeSpatialObjectPoint.wrap index 175558099f1..fcd9dc7598d 100644 --- a/Modules/Core/SpatialObjects/wrapping/itkTubeSpatialObjectPoint.wrap +++ b/Modules/Core/SpatialObjects/wrapping/itkTubeSpatialObjectPoint.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::TubeSpatialObjectPoint") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${d}" "${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${d}" "${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/SpatialObjects/wrapping/test/CMakeLists.txt b/Modules/Core/SpatialObjects/wrapping/test/CMakeLists.txt index ead8d0004ce..7d7c8a2162a 100644 --- a/Modules/Core/SpatialObjects/wrapping/test/CMakeLists.txt +++ b/Modules/Core/SpatialObjects/wrapping/test/CMakeLists.txt @@ -1,7 +1,15 @@ -list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) -if(ITK_WRAP_PYTHON AND ITK_WRAP_float AND wrap_2_index GREATER -1) - itk_python_add_test(NAME PythonSpatialObjectTest +list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) +if(ITK_WRAP_PYTHON + AND ITK_WRAP_float + AND wrap_2_index GREATER -1) + itk_python_add_test( + NAME + PythonSpatialObjectTest TEST_DRIVER_ARGS - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/SpatialObjectTest.py - ) + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/SpatialObjectTest.py) endif() diff --git a/Modules/Core/TestKernel/itk-module.cmake b/Modules/Core/TestKernel/itk-module.cmake index e1c68dc267a..5cc03cd2272 100644 --- a/Modules/Core/TestKernel/itk-module.cmake +++ b/Modules/Core/TestKernel/itk-module.cmake @@ -1,36 +1,37 @@ -set(DOCUMENTATION "This Module contains helper classes used for the Testing +set(DOCUMENTATION + "This Module contains helper classes used for the Testing infrastructure of ITK. As an application developer you should not normally need any of these classes. However, they are essential for the quality control system supporting ITK.") -itk_module(ITKTestKernel +itk_module( + ITKTestKernel DEPENDS - ITKCommon - ITKIOImageBase + ITKCommon + ITKIOImageBase PRIVATE_DEPENDS - ITKIOBMP - ITKIOGDCM - ITKIOGIPL - ITKIOJPEG - ITKIOMeta - ITKIONIFTI - ITKIONRRD - ITKIOPNG - ITKIOTIFF - ITKIOVTK - ITKIOMeshVTK - ITKIOMeshBYU - ITKIOMeshFreeSurfer - ITKIOMeshGifti - ITKIOMeshOBJ - ITKIOMeshOFF - ITKFFT + ITKIOBMP + ITKIOGDCM + ITKIOGIPL + ITKIOJPEG + ITKIOMeta + ITKIONIFTI + ITKIONRRD + ITKIOPNG + ITKIOTIFF + ITKIOVTK + ITKIOMeshVTK + ITKIOMeshBYU + ITKIOMeshFreeSurfer + ITKIOMeshGifti + ITKIOMeshOBJ + ITKIOMeshOFF + ITKFFT COMPILE_DEPENDS - ITKKWSys - ITKDoubleConversion + ITKKWSys + ITKDoubleConversion TEST_DEPENDS - ITKImageStatistics - ITKGoogleTest + ITKImageStatistics + ITKGoogleTest DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Core/TestKernel/src/CMakeLists.txt b/Modules/Core/TestKernel/src/CMakeLists.txt index 6258cf24035..e363d6431dc 100644 --- a/Modules/Core/TestKernel/src/CMakeLists.txt +++ b/Modules/Core/TestKernel/src/CMakeLists.txt @@ -1,8 +1,12 @@ if(NOT DO_NOT_BUILD_ITK_TEST_DRIVER) add_executable(itkTestDriver itkTestDriver.cxx) - target_link_libraries(itkTestDriver - LINK_PRIVATE ${ITK_MODULE_ITKTestKernel_PRIVATE_DEPENDS} - LINK_PUBLIC ${ITK_MODULE_ITKTestKernel_PUBLIC_DEPENDS} ${ITKTestKernel_LIBRARIES}) + target_link_libraries( + itkTestDriver + LINK_PRIVATE + ${ITK_MODULE_ITKTestKernel_PRIVATE_DEPENDS} + LINK_PUBLIC + ${ITK_MODULE_ITKTestKernel_PUBLIC_DEPENDS} + ${ITKTestKernel_LIBRARIES}) itk_module_target_label(itkTestDriver) itk_module_target_export(itkTestDriver) @@ -12,9 +16,9 @@ if(NOT DO_NOT_BUILD_ITK_TEST_DRIVER) endif() set(ITKTestKernel_SRCS - itkTestDriverIncludeRequiredFactories.cxx - itkTestDriverInclude.cxx - itkTestingExtractSliceImageFilter.cxx - itkTestingHashImageFilter.cxx) + itkTestDriverIncludeRequiredFactories.cxx + itkTestDriverInclude.cxx + itkTestingExtractSliceImageFilter.cxx + itkTestingHashImageFilter.cxx) itk_module_add_library(ITKTestKernel ${ITKTestKernel_SRCS}) diff --git a/Modules/Core/TestKernel/test/CMakeLists.txt b/Modules/Core/TestKernel/test/CMakeLists.txt index 86ae3ba3cd5..4ce8c2a64e8 100644 --- a/Modules/Core/TestKernel/test/CMakeLists.txt +++ b/Modules/Core/TestKernel/test/CMakeLists.txt @@ -1,37 +1,47 @@ itk_module_test() set(ITKTestKernelTests -itkRandomImageSourceAttributesTest.cxx -itkRandomImageSourceValuesTest.cxx -itkTestingExtractSliceImageFilterTest.cxx -itkTestingStretchIntensityImageFilterTest.cxx -) + itkRandomImageSourceAttributesTest.cxx + itkRandomImageSourceValuesTest.cxx + itkTestingExtractSliceImageFilterTest.cxx + itkTestingStretchIntensityImageFilterTest.cxx) -CreateTestDriver(ITKTestKernel "${ITKTestKernel-Test_LIBRARIES}" "${ITKTestKernelTests}") +createtestdriver(ITKTestKernel "${ITKTestKernel-Test_LIBRARIES}" "${ITKTestKernelTests}") set(BASELINE "${ITK_DATA_ROOT}/Baseline/Common") set(TEMP ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkRandomImageSourceAttributesTest - COMMAND ITKTestKernelTestDriver itkRandomImageSourceAttributesTest) - -itk_add_test(NAME itkRandomImageSourceValuesTest - COMMAND ITKTestKernelTestDriver - --compare DATA{Baseline/itkRandomImageSourceValuesTest.mha} ${ITK_TEST_OUTPUT_DIR}/itkRandomImageSourceValuesTest.mha - itkRandomImageSourceValuesTest ${ITK_TEST_OUTPUT_DIR}/itkRandomImageSourceValuesTest.mha) - -itk_add_test(NAME itkTestingExtractSliceImageFilterTest - COMMAND ITKTestKernelTestDriver itkTestingExtractSliceImageFilterTest) - -itk_add_test(NAME itkTestingStretchIntensityImageFilterTest - COMMAND ITKTestKernelTestDriver itkTestingStretchIntensityImageFilterTest - ) - -set(ITKTestKernelGTests - itkGoogleTest.cxx - itkGoogleTestFixture.cxx -) - - -CreateGoogleTestDriver(ITKTestKernel "${ITKTestKernel-Test_LIBRARIES}" "${ITKTestKernelGTests}") - - +itk_add_test( + NAME + itkRandomImageSourceAttributesTest + COMMAND + ITKTestKernelTestDriver + itkRandomImageSourceAttributesTest) + +itk_add_test( + NAME + itkRandomImageSourceValuesTest + COMMAND + ITKTestKernelTestDriver + --compare + DATA{Baseline/itkRandomImageSourceValuesTest.mha} + ${ITK_TEST_OUTPUT_DIR}/itkRandomImageSourceValuesTest.mha + itkRandomImageSourceValuesTest + ${ITK_TEST_OUTPUT_DIR}/itkRandomImageSourceValuesTest.mha) + +itk_add_test( + NAME + itkTestingExtractSliceImageFilterTest + COMMAND + ITKTestKernelTestDriver + itkTestingExtractSliceImageFilterTest) + +itk_add_test( + NAME + itkTestingStretchIntensityImageFilterTest + COMMAND + ITKTestKernelTestDriver + itkTestingStretchIntensityImageFilterTest) + +set(ITKTestKernelGTests itkGoogleTest.cxx itkGoogleTestFixture.cxx) + +creategoogletestdriver(ITKTestKernel "${ITKTestKernel-Test_LIBRARIES}" "${ITKTestKernelGTests}") diff --git a/Modules/Core/TestKernel/wrapping/itkComparisonImageFilter.wrap b/Modules/Core/TestKernel/wrapping/itkComparisonImageFilter.wrap index 7055cd66da3..7263a28207c 100644 --- a/Modules/Core/TestKernel/wrapping/itkComparisonImageFilter.wrap +++ b/Modules/Core/TestKernel/wrapping/itkComparisonImageFilter.wrap @@ -2,7 +2,7 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkTestingComparisonImageFilter.h") itk_wrap_class("itk::Testing::ComparisonImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) - # itk_wrap_image_filter("${WRAP_ITK_VECTOR_REAL}" 2) - # itk_wrap_image_filter("${WRAP_ITK_COV_VECTOR_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +# itk_wrap_image_filter("${WRAP_ITK_VECTOR_REAL}" 2) +# itk_wrap_image_filter("${WRAP_ITK_COV_VECTOR_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Core/TestKernel/wrapping/itkPipelineMonitorImageFilter.wrap b/Modules/Core/TestKernel/wrapping/itkPipelineMonitorImageFilter.wrap index 1c7f391dd31..acb4b35408a 100644 --- a/Modules/Core/TestKernel/wrapping/itkPipelineMonitorImageFilter.wrap +++ b/Modules/Core/TestKernel/wrapping/itkPipelineMonitorImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::PipelineMonitorImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) itk_end_wrap_class() diff --git a/Modules/Core/TestKernel/wrapping/itkRandomImageSource.wrap b/Modules/Core/TestKernel/wrapping/itkRandomImageSource.wrap index 0420db9ae00..c865d1c60da 100644 --- a/Modules/Core/TestKernel/wrapping/itkRandomImageSource.wrap +++ b/Modules/Core/TestKernel/wrapping/itkRandomImageSource.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::RandomImageSource" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Core/Transform/itk-module.cmake b/Modules/Core/Transform/itk-module.cmake index a12e35853a9..d0d056ba89c 100644 --- a/Modules/Core/Transform/itk-module.cmake +++ b/Modules/Core/Transform/itk-module.cmake @@ -1,4 +1,5 @@ -set(DOCUMENTATION "Transforms are essential components of image registration +set(DOCUMENTATION + "Transforms are essential components of image registration framework in ITK. They are typically used for representing the mapping between the physical coordinate system of one image and the physical coordinate system of another image. They are also commonly used in the process of resampling @@ -6,20 +7,20 @@ images, particularly when mapping them between coordinate systems. Transforms are a large family in ITK and form a prolific group of classes in the toolkit.") -itk_module(ITKTransform +itk_module( + ITKTransform ENABLE_SHARED DEPENDS - ITKCommon + ITKCommon COMPILE_DEPENDS - ITKStatistics - ITKImageFilterBase + ITKStatistics + ITKImageFilterBase TEST_DEPENDS - ITKTestKernel - ITKGoogleTest - ITKDisplacementField + ITKTestKernel + ITKGoogleTest + ITKDisplacementField DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") # Extra dependencies on ImageFilterBase introduced by itkGaussianSmoothingOnUpdateDisplacementFieldTransform. # Extra test dependencies on ImageFunction and ImageGrid are introduced by itkBSplineDeformableTransformTest. diff --git a/Modules/Core/Transform/src/CMakeLists.txt b/Modules/Core/Transform/src/CMakeLists.txt index 84b882055c1..a7e44ccf4da 100644 --- a/Modules/Core/Transform/src/CMakeLists.txt +++ b/Modules/Core/Transform/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKTransform_SRCS - itkTransformBase.cxx - ) +set(ITKTransform_SRCS itkTransformBase.cxx) itk_module_add_library(ITKTransform ${ITKTransform_SRCS}) diff --git a/Modules/Core/Transform/test/CMakeLists.txt b/Modules/Core/Transform/test/CMakeLists.txt index 177d04594c1..0dbf1400cd5 100644 --- a/Modules/Core/Transform/test/CMakeLists.txt +++ b/Modules/Core/Transform/test/CMakeLists.txt @@ -1,196 +1,466 @@ itk_module_test() set(ITKTransformTests -itkFixedCenterOfRotationAffineTransformTest.cxx -itkAffineTransformTest.cxx -itkScaleSkewVersor3DTransformTest.cxx -itkComposeScaleSkewVersor3DTransformTest.cxx -itkEuler3DTransformTest.cxx -itkCenteredRigid2DTransformTest.cxx -itkEuler2DTransformTest.cxx -itkRigid3DTransformTest.cxx -itkScaleVersor3DTransformTest.cxx -itkTransformTest.cxx -itkRigid3DPerspectiveTransformTest.cxx -itkSimilarity2DTransformTest.cxx -itkTranslationTransformTest.cxx -itkIdentityTransformTest.cxx -itkCenteredAffineTransformTest.cxx -itkRigid2DTransformTest.cxx -itkScaleLogarithmicTransformTest.cxx -itkQuaternionRigidTransformTest.cxx -itkScaleTransformTest.cxx -itkSimilarity3DTransformTest.cxx -itkAzimuthElevationToCartesianTransformTest.cxx -itkCenteredEuler3DTransformTest.cxx -itkTransformsSetParametersTest.cxx -itkBSplineDeformableTransformTest.cxx -itkBSplineDeformableTransformTest2.cxx -itkBSplineDeformableTransformTest3.cxx -itkBSplineTransformTest.cxx -itkBSplineTransformTest2.cxx -itkBSplineTransformTest3.cxx -itkBSplineTransformInitializerTest1.cxx -itkBSplineTransformInitializerTest2.cxx -itkVersorRigid3DTransformTest.cxx -itkVersorTransformTest.cxx -itkSplineKernelTransformTest.cxx -itkCompositeTransformTest.cxx -itkTransformCloneTest.cxx -itkMultiTransformTest.cxx -itkTestTransformGetInverse.cxx - itkTransformGeometryImageFilterTest.cxx -) + itkFixedCenterOfRotationAffineTransformTest.cxx + itkAffineTransformTest.cxx + itkScaleSkewVersor3DTransformTest.cxx + itkComposeScaleSkewVersor3DTransformTest.cxx + itkEuler3DTransformTest.cxx + itkCenteredRigid2DTransformTest.cxx + itkEuler2DTransformTest.cxx + itkRigid3DTransformTest.cxx + itkScaleVersor3DTransformTest.cxx + itkTransformTest.cxx + itkRigid3DPerspectiveTransformTest.cxx + itkSimilarity2DTransformTest.cxx + itkTranslationTransformTest.cxx + itkIdentityTransformTest.cxx + itkCenteredAffineTransformTest.cxx + itkRigid2DTransformTest.cxx + itkScaleLogarithmicTransformTest.cxx + itkQuaternionRigidTransformTest.cxx + itkScaleTransformTest.cxx + itkSimilarity3DTransformTest.cxx + itkAzimuthElevationToCartesianTransformTest.cxx + itkCenteredEuler3DTransformTest.cxx + itkTransformsSetParametersTest.cxx + itkBSplineDeformableTransformTest.cxx + itkBSplineDeformableTransformTest2.cxx + itkBSplineDeformableTransformTest3.cxx + itkBSplineTransformTest.cxx + itkBSplineTransformTest2.cxx + itkBSplineTransformTest3.cxx + itkBSplineTransformInitializerTest1.cxx + itkBSplineTransformInitializerTest2.cxx + itkVersorRigid3DTransformTest.cxx + itkVersorTransformTest.cxx + itkSplineKernelTransformTest.cxx + itkCompositeTransformTest.cxx + itkTransformCloneTest.cxx + itkMultiTransformTest.cxx + itkTestTransformGetInverse.cxx + itkTransformGeometryImageFilterTest.cxx) -CreateTestDriver(ITKTransform "${ITKTransform-Test_LIBRARIES}" "${ITKTransformTests}") -itk_add_test(NAME itkFixedCenterOfRotationAffineTransformTest - COMMAND ITKTransformTestDriver itkFixedCenterOfRotationAffineTransformTest) -itk_add_test(NAME itkAffineTransformTest - COMMAND ITKTransformTestDriver itkAffineTransformTest) -itk_add_test(NAME itkScaleSkewVersor3DTransformTest - COMMAND ITKTransformTestDriver itkScaleSkewVersor3DTransformTest) -itk_add_test(NAME itkComposeScaleSkewVersor3DTransformTest - COMMAND ITKTransformTestDriver - itkComposeScaleSkewVersor3DTransformTest) -itk_add_test(NAME itkEuler3DTransformTest - COMMAND ITKTransformTestDriver itkEuler3DTransformTest) -itk_add_test(NAME itkCenteredRigid2DTransformTest - COMMAND ITKTransformTestDriver itkCenteredRigid2DTransformTest) -itk_add_test(NAME itkEuler2DTransformTest - COMMAND ITKTransformTestDriver itkEuler2DTransformTest) -itk_add_test(NAME itkRigid3DTransformTest - COMMAND ITKTransformTestDriver itkRigid3DTransformTest) -itk_add_test(NAME itkScaleVersor3DTransformTest - COMMAND ITKTransformTestDriver itkScaleVersor3DTransformTest) -itk_add_test(NAME itkTransformTest - COMMAND ITKTransformTestDriver itkTransformTest) -itk_add_test(NAME itkRigid3DPerspectiveTransformTest - COMMAND ITKTransformTestDriver itkRigid3DPerspectiveTransformTest) -itk_add_test(NAME itkSimilarity2DTransformTest - COMMAND ITKTransformTestDriver itkSimilarity2DTransformTest) -itk_add_test(NAME itkTranslationTransformTest - COMMAND ITKTransformTestDriver itkTranslationTransformTest) -itk_add_test(NAME itkIdentityTransformTest - COMMAND ITKTransformTestDriver itkIdentityTransformTest) -itk_add_test(NAME itkCenteredAffineTransformTest - COMMAND ITKTransformTestDriver itkCenteredAffineTransformTest) -itk_add_test(NAME itkRigid2DTransformTest - COMMAND ITKTransformTestDriver itkRigid2DTransformTest) -itk_add_test(NAME itkScaleLogarithmicTransformTest - COMMAND ITKTransformTestDriver itkScaleLogarithmicTransformTest) -itk_add_test(NAME itkQuaternionRigidTransformTest - COMMAND ITKTransformTestDriver itkQuaternionRigidTransformTest) -itk_add_test(NAME itkScaleTransformTest - COMMAND ITKTransformTestDriver itkScaleTransformTest) -itk_add_test(NAME itkSimilarity3DTransformTest - COMMAND ITKTransformTestDriver itkSimilarity3DTransformTest) -itk_add_test(NAME itkAzimuthElevationToCartesianTransformTest - COMMAND ITKTransformTestDriver itkAzimuthElevationToCartesianTransformTest 0 0 1.0 1.0 1.0 0.0) -itk_add_test(NAME itkCenteredEuler3DTransformTest - COMMAND ITKTransformTestDriver itkCenteredEuler3DTransformTest) -itk_add_test(NAME itkTransformsSetParametersTest - COMMAND ITKTransformTestDriver itkTransformsSetParametersTest) +createtestdriver(ITKTransform "${ITKTransform-Test_LIBRARIES}" "${ITKTransformTests}") +itk_add_test( + NAME + itkFixedCenterOfRotationAffineTransformTest + COMMAND + ITKTransformTestDriver + itkFixedCenterOfRotationAffineTransformTest) +itk_add_test( + NAME + itkAffineTransformTest + COMMAND + ITKTransformTestDriver + itkAffineTransformTest) +itk_add_test( + NAME + itkScaleSkewVersor3DTransformTest + COMMAND + ITKTransformTestDriver + itkScaleSkewVersor3DTransformTest) +itk_add_test( + NAME + itkComposeScaleSkewVersor3DTransformTest + COMMAND + ITKTransformTestDriver + itkComposeScaleSkewVersor3DTransformTest) +itk_add_test( + NAME + itkEuler3DTransformTest + COMMAND + ITKTransformTestDriver + itkEuler3DTransformTest) +itk_add_test( + NAME + itkCenteredRigid2DTransformTest + COMMAND + ITKTransformTestDriver + itkCenteredRigid2DTransformTest) +itk_add_test( + NAME + itkEuler2DTransformTest + COMMAND + ITKTransformTestDriver + itkEuler2DTransformTest) +itk_add_test( + NAME + itkRigid3DTransformTest + COMMAND + ITKTransformTestDriver + itkRigid3DTransformTest) +itk_add_test( + NAME + itkScaleVersor3DTransformTest + COMMAND + ITKTransformTestDriver + itkScaleVersor3DTransformTest) +itk_add_test( + NAME + itkTransformTest + COMMAND + ITKTransformTestDriver + itkTransformTest) +itk_add_test( + NAME + itkRigid3DPerspectiveTransformTest + COMMAND + ITKTransformTestDriver + itkRigid3DPerspectiveTransformTest) +itk_add_test( + NAME + itkSimilarity2DTransformTest + COMMAND + ITKTransformTestDriver + itkSimilarity2DTransformTest) +itk_add_test( + NAME + itkTranslationTransformTest + COMMAND + ITKTransformTestDriver + itkTranslationTransformTest) +itk_add_test( + NAME + itkIdentityTransformTest + COMMAND + ITKTransformTestDriver + itkIdentityTransformTest) +itk_add_test( + NAME + itkCenteredAffineTransformTest + COMMAND + ITKTransformTestDriver + itkCenteredAffineTransformTest) +itk_add_test( + NAME + itkRigid2DTransformTest + COMMAND + ITKTransformTestDriver + itkRigid2DTransformTest) +itk_add_test( + NAME + itkScaleLogarithmicTransformTest + COMMAND + ITKTransformTestDriver + itkScaleLogarithmicTransformTest) +itk_add_test( + NAME + itkQuaternionRigidTransformTest + COMMAND + ITKTransformTestDriver + itkQuaternionRigidTransformTest) +itk_add_test( + NAME + itkScaleTransformTest + COMMAND + ITKTransformTestDriver + itkScaleTransformTest) +itk_add_test( + NAME + itkSimilarity3DTransformTest + COMMAND + ITKTransformTestDriver + itkSimilarity3DTransformTest) +itk_add_test( + NAME + itkAzimuthElevationToCartesianTransformTest + COMMAND + ITKTransformTestDriver + itkAzimuthElevationToCartesianTransformTest + 0 + 0 + 1.0 + 1.0 + 1.0 + 0.0) +itk_add_test( + NAME + itkCenteredEuler3DTransformTest + COMMAND + ITKTransformTestDriver + itkCenteredEuler3DTransformTest) +itk_add_test( + NAME + itkTransformsSetParametersTest + COMMAND + ITKTransformTestDriver + itkTransformsSetParametersTest) ## Tests for ITKv3 version of BSplineDeformableTransforms -itk_add_test(NAME itkBSplineDeformableTransformTest - COMMAND ITKTransformTestDriver itkBSplineDeformableTransformTest) -itk_add_test(NAME itkBSplineDeformableTransformTest2 - COMMAND ITKTransformTestDriver - --compare DATA{Baseline/itkBSplineDeformableTransformTest2PixelCentered.png} - ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest2PixelCentered.png - itkBSplineDeformableTransformTest2 DATA{Baseline/BSplineDeformationTransformDisplacements5.txt} ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest2PixelCentered.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest2DeformationFieldPixelCentered.mhd 1) -itk_add_test(NAME itkBSplineDeformableTransformTest3 - COMMAND ITKTransformTestDriver - --compare DATA{Baseline/itkBSplineDeformableTransformTest3PixelCentered.png} - ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest3PixelCentered.png - itkBSplineDeformableTransformTest2 DATA{Baseline/BSplineDeformationTransformDisplacements3.txt} ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest3PixelCentered.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest3DeformationFieldPixelCentered.mhd 2) -itk_add_test(NAME itkBSplineDeformableTransformTest4 - COMMAND ITKTransformTestDriver - --compare DATA{Baseline/itkBSplineDeformableTransformTest4PixelCentered.png} - ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest4PixelCentered.png - itkBSplineDeformableTransformTest2 DATA{Baseline/BSplineDeformationTransformDisplacements1.txt} ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest4PixelCentered.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest4DeformationFieldPixelCentered.mhd 3) -itk_add_test(NAME itkBSplineDeformableTransformTest5 - COMMAND ITKTransformTestDriver - --compare DATA{Baseline/itkBSplineDeformableTransformTest5PixelCentered.png} - ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest5PixelCentered.png - itkBSplineDeformableTransformTest3 DATA{Baseline/BSplineDeformationTransformDisplacements1.txt} ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest5PixelCentered.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest5DeformationFieldPixelCentered.mhd 0) -itk_add_test(NAME itkBSplineDeformableTransformTest6 - COMMAND ITKTransformTestDriver - --compare DATA{Baseline/itkBSplineDeformableTransformTest5PixelCentered.png} - ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest6PixelCentered.png - itkBSplineDeformableTransformTest3 DATA{Baseline/BSplineDeformationTransformDisplacements1.txt} ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest6PixelCentered.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest6DeformationFieldPixelCentered.mhd 1) -itk_add_test(NAME itkBSplineDeformableTransformTest7 - COMMAND ITKTransformTestDriver - --compare DATA{Baseline/itkBSplineDeformableTransformTest5PixelCentered.png} - ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest7PixelCentered.png - itkBSplineDeformableTransformTest3 DATA{Baseline/BSplineDeformationTransformDisplacements1.txt} ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest7PixelCentered.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest7DeformationFieldPixelCentered.mhd 2) +itk_add_test( + NAME + itkBSplineDeformableTransformTest + COMMAND + ITKTransformTestDriver + itkBSplineDeformableTransformTest) +itk_add_test( + NAME + itkBSplineDeformableTransformTest2 + COMMAND + ITKTransformTestDriver + --compare + DATA{Baseline/itkBSplineDeformableTransformTest2PixelCentered.png} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest2PixelCentered.png + itkBSplineDeformableTransformTest2 + DATA{Baseline/BSplineDeformationTransformDisplacements5.txt} + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest2PixelCentered.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest2DeformationFieldPixelCentered.mhd + 1) +itk_add_test( + NAME + itkBSplineDeformableTransformTest3 + COMMAND + ITKTransformTestDriver + --compare + DATA{Baseline/itkBSplineDeformableTransformTest3PixelCentered.png} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest3PixelCentered.png + itkBSplineDeformableTransformTest2 + DATA{Baseline/BSplineDeformationTransformDisplacements3.txt} + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest3PixelCentered.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest3DeformationFieldPixelCentered.mhd + 2) +itk_add_test( + NAME + itkBSplineDeformableTransformTest4 + COMMAND + ITKTransformTestDriver + --compare + DATA{Baseline/itkBSplineDeformableTransformTest4PixelCentered.png} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest4PixelCentered.png + itkBSplineDeformableTransformTest2 + DATA{Baseline/BSplineDeformationTransformDisplacements1.txt} + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest4PixelCentered.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest4DeformationFieldPixelCentered.mhd + 3) +itk_add_test( + NAME + itkBSplineDeformableTransformTest5 + COMMAND + ITKTransformTestDriver + --compare + DATA{Baseline/itkBSplineDeformableTransformTest5PixelCentered.png} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest5PixelCentered.png + itkBSplineDeformableTransformTest3 + DATA{Baseline/BSplineDeformationTransformDisplacements1.txt} + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest5PixelCentered.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest5DeformationFieldPixelCentered.mhd + 0) +itk_add_test( + NAME + itkBSplineDeformableTransformTest6 + COMMAND + ITKTransformTestDriver + --compare + DATA{Baseline/itkBSplineDeformableTransformTest5PixelCentered.png} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest6PixelCentered.png + itkBSplineDeformableTransformTest3 + DATA{Baseline/BSplineDeformationTransformDisplacements1.txt} + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest6PixelCentered.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest6DeformationFieldPixelCentered.mhd + 1) +itk_add_test( + NAME + itkBSplineDeformableTransformTest7 + COMMAND + ITKTransformTestDriver + --compare + DATA{Baseline/itkBSplineDeformableTransformTest5PixelCentered.png} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest7PixelCentered.png + itkBSplineDeformableTransformTest3 + DATA{Baseline/BSplineDeformationTransformDisplacements1.txt} + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest7PixelCentered.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDeformableTransformTest7DeformationFieldPixelCentered.mhd + 2) ## Tests for ITKv4 version of BSplineTransforms -itk_add_test(NAME itkBSplineTransformTest - COMMAND ITKTransformTestDriver itkBSplineTransformTest) -itk_add_test(NAME itkBSplineTransformTest2 - COMMAND ITKTransformTestDriver - --compare DATA{Baseline/itkBSplineTransformTest2PixelCentered.png} - ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest2PixelCentered.png - itkBSplineTransformTest2 ${ITK_EXAMPLE_DATA_ROOT}/BSplineDisplacements5.txt ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest2PixelCentered.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest2DeformationFieldPixelCentered.mhd 1) -itk_add_test(NAME itkBSplineTransformTest3 - COMMAND ITKTransformTestDriver - --compare DATA{Baseline/itkBSplineTransformTest3PixelCentered.png} - ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest3PixelCentered.png - itkBSplineTransformTest2 ${ITK_EXAMPLE_DATA_ROOT}/BSplineDisplacements3.txt ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest3PixelCentered.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest3DeformationFieldPixelCentered.mhd 2) -itk_add_test(NAME itkBSplineTransformTest4 - COMMAND ITKTransformTestDriver - --compare DATA{Baseline/itkBSplineTransformTest4PixelCentered.png} - ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest4PixelCentered.png - itkBSplineTransformTest2 ${ITK_EXAMPLE_DATA_ROOT}/BSplineDisplacements1.txt ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest4PixelCentered.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest4DeformationFieldPixelCentered.mhd 3) -itk_add_test(NAME itkBSplineTransformTest5 - COMMAND ITKTransformTestDriver - --compare DATA{Baseline/itkBSplineTransformTest4PixelCentered.png} - ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest5PixelCentered.png - itkBSplineTransformTest3 ${ITK_EXAMPLE_DATA_ROOT}/BSplineDisplacements1.txt ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest5PixelCentered.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest5DeformationFieldPixelCentered.mhd 0) -itk_add_test(NAME itkBSplineTransformTest6 - COMMAND ITKTransformTestDriver - --compare DATA{Baseline/itkBSplineTransformTest4PixelCentered.png} - ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest6PixelCentered.png - itkBSplineTransformTest3 ${ITK_EXAMPLE_DATA_ROOT}/BSplineDisplacements1.txt ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest6PixelCentered.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest6DeformationFieldPixelCentered.mhd 1) -itk_add_test(NAME itkBSplineTransformTest7 - COMMAND ITKTransformTestDriver - --compare DATA{Baseline/itkBSplineTransformTest4PixelCentered.png} - ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest7PixelCentered.png - itkBSplineTransformTest3 ${ITK_EXAMPLE_DATA_ROOT}/BSplineDisplacements1.txt ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest7PixelCentered.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest7DeformationFieldPixelCentered.mhd 2) -itk_add_test(NAME itkBSplineTransformInitializerTest1 - COMMAND ITKTransformTestDriver itkBSplineTransformInitializerTest1 - ${ITK_EXAMPLE_DATA_ROOT}/BSplineDisplacements1.txt ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformInitializerTest1.png ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformInitializerTest1DeformationField.mhd) -itk_add_test(NAME itkBSplineTransformInitializerTest2 - COMMAND ITKTransformTestDriver itkBSplineTransformInitializerTest2 - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png) -itk_add_test(NAME itkVersorRigid3DTransformTest - COMMAND ITKTransformTestDriver itkVersorRigid3DTransformTest) -itk_add_test(NAME itkVersorTransformTest - COMMAND ITKTransformTestDriver itkVersorTransformTest) -itk_add_test(NAME itkSplineKernelTransformTest - COMMAND ITKTransformTestDriver itkSplineKernelTransformTest) -itk_add_test(NAME itkCompositeTransformTest - COMMAND ITKTransformTestDriver itkCompositeTransformTest) -itk_add_test(NAME itkTransformCloneTest - COMMAND ITKTransformTestDriver itkTransformCloneTest) -itk_add_test(NAME itkMultiTransformTest - COMMAND ITKTransformTestDriver itkMultiTransformTest) -itk_add_test(NAME itkTestTransformGetInverse - COMMAND ITKTransformTestDriver itkTestTransformGetInverse) -set_property(TEST itkTestTransformGetInverse APPEND PROPERTY LABELS RUNS_LONG) +itk_add_test( + NAME + itkBSplineTransformTest + COMMAND + ITKTransformTestDriver + itkBSplineTransformTest) +itk_add_test( + NAME + itkBSplineTransformTest2 + COMMAND + ITKTransformTestDriver + --compare + DATA{Baseline/itkBSplineTransformTest2PixelCentered.png} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest2PixelCentered.png + itkBSplineTransformTest2 + ${ITK_EXAMPLE_DATA_ROOT}/BSplineDisplacements5.txt + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest2PixelCentered.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest2DeformationFieldPixelCentered.mhd + 1) +itk_add_test( + NAME + itkBSplineTransformTest3 + COMMAND + ITKTransformTestDriver + --compare + DATA{Baseline/itkBSplineTransformTest3PixelCentered.png} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest3PixelCentered.png + itkBSplineTransformTest2 + ${ITK_EXAMPLE_DATA_ROOT}/BSplineDisplacements3.txt + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest3PixelCentered.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest3DeformationFieldPixelCentered.mhd + 2) +itk_add_test( + NAME + itkBSplineTransformTest4 + COMMAND + ITKTransformTestDriver + --compare + DATA{Baseline/itkBSplineTransformTest4PixelCentered.png} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest4PixelCentered.png + itkBSplineTransformTest2 + ${ITK_EXAMPLE_DATA_ROOT}/BSplineDisplacements1.txt + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest4PixelCentered.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest4DeformationFieldPixelCentered.mhd + 3) +itk_add_test( + NAME + itkBSplineTransformTest5 + COMMAND + ITKTransformTestDriver + --compare + DATA{Baseline/itkBSplineTransformTest4PixelCentered.png} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest5PixelCentered.png + itkBSplineTransformTest3 + ${ITK_EXAMPLE_DATA_ROOT}/BSplineDisplacements1.txt + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest5PixelCentered.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest5DeformationFieldPixelCentered.mhd + 0) +itk_add_test( + NAME + itkBSplineTransformTest6 + COMMAND + ITKTransformTestDriver + --compare + DATA{Baseline/itkBSplineTransformTest4PixelCentered.png} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest6PixelCentered.png + itkBSplineTransformTest3 + ${ITK_EXAMPLE_DATA_ROOT}/BSplineDisplacements1.txt + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest6PixelCentered.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest6DeformationFieldPixelCentered.mhd + 1) +itk_add_test( + NAME + itkBSplineTransformTest7 + COMMAND + ITKTransformTestDriver + --compare + DATA{Baseline/itkBSplineTransformTest4PixelCentered.png} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest7PixelCentered.png + itkBSplineTransformTest3 + ${ITK_EXAMPLE_DATA_ROOT}/BSplineDisplacements1.txt + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest7PixelCentered.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformTest7DeformationFieldPixelCentered.mhd + 2) +itk_add_test( + NAME + itkBSplineTransformInitializerTest1 + COMMAND + ITKTransformTestDriver + itkBSplineTransformInitializerTest1 + ${ITK_EXAMPLE_DATA_ROOT}/BSplineDisplacements1.txt + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformInitializerTest1.png + ${ITK_TEST_OUTPUT_DIR}/itkBSplineTransformInitializerTest1DeformationField.mhd) +itk_add_test( + NAME + itkBSplineTransformInitializerTest2 + COMMAND + ITKTransformTestDriver + itkBSplineTransformInitializerTest2 + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png) +itk_add_test( + NAME + itkVersorRigid3DTransformTest + COMMAND + ITKTransformTestDriver + itkVersorRigid3DTransformTest) +itk_add_test( + NAME + itkVersorTransformTest + COMMAND + ITKTransformTestDriver + itkVersorTransformTest) +itk_add_test( + NAME + itkSplineKernelTransformTest + COMMAND + ITKTransformTestDriver + itkSplineKernelTransformTest) +itk_add_test( + NAME + itkCompositeTransformTest + COMMAND + ITKTransformTestDriver + itkCompositeTransformTest) +itk_add_test( + NAME + itkTransformCloneTest + COMMAND + ITKTransformTestDriver + itkTransformCloneTest) +itk_add_test( + NAME + itkMultiTransformTest + COMMAND + ITKTransformTestDriver + itkMultiTransformTest) +itk_add_test( + NAME + itkTestTransformGetInverse + COMMAND + ITKTransformTestDriver + itkTestTransformGetInverse) +set_property( + TEST itkTestTransformGetInverse + APPEND + PROPERTY LABELS RUNS_LONG) set_tests_properties(itkTestTransformGetInverse PROPERTIES COST 50) -itk_add_test(NAME itkTransformGeometryImageFilterTest - COMMAND ITKTransformTestDriver itkTransformGeometryImageFilterTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensity3Slices.mha - DATA{Baseline/BrainProtonDensity3SlicesHardened.mha} - ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensity3SlicesHardened.mha) +itk_add_test( + NAME + itkTransformGeometryImageFilterTest + COMMAND + ITKTransformTestDriver + itkTransformGeometryImageFilterTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensity3Slices.mha + DATA{Baseline/BrainProtonDensity3SlicesHardened.mha} + ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensity3SlicesHardened.mha) set(ITKTransformGTests - itkBSplineTransformGTest.cxx - itkEuler3DTransformGTest.cxx - itkMatrixOffsetTransformBaseGTest.cxx - itkSimilarityTransformGTest.cxx - itkTransformGTest.cxx - itkTranslationTransformGTest.cxx -) -CreateGoogleTestDriver(ITKTransform "${ITKTransform-Test_LIBRARIES}" "${ITKTransformGTests}") + itkBSplineTransformGTest.cxx + itkEuler3DTransformGTest.cxx + itkMatrixOffsetTransformBaseGTest.cxx + itkSimilarityTransformGTest.cxx + itkTransformGTest.cxx + itkTranslationTransformGTest.cxx) +creategoogletestdriver(ITKTransform "${ITKTransform-Test_LIBRARIES}" "${ITKTransformGTests}") diff --git a/Modules/Core/Transform/wrapping/CMakeLists.txt b/Modules/Core/Transform/wrapping/CMakeLists.txt index 32afb56fc0a..2476c3c76c5 100644 --- a/Modules/Core/Transform/wrapping/CMakeLists.txt +++ b/Modules/Core/Transform/wrapping/CMakeLists.txt @@ -1,20 +1,19 @@ itk_wrap_module(ITKTransform) set(WRAPPER_SUBMODULE_ORDER - itkCompositeTransform - itkTransformBase - itkMatrixOffsetTransformBase - itkEuler2DTransform - itkEuler3DTransform - itkMultiTransform - itkVersorTransform - itkVersorRigid3DTransform - itkSimilarity2DTransform - itkSimilarity3DTransform - itkAffineTransform - itkScalableAffineTransform - itkScaleTransform - itkKernelTransform - itkTransformGeometryImageFilter -) + itkCompositeTransform + itkTransformBase + itkMatrixOffsetTransformBase + itkEuler2DTransform + itkEuler3DTransform + itkMultiTransform + itkVersorTransform + itkVersorRigid3DTransform + itkSimilarity2DTransform + itkSimilarity3DTransform + itkAffineTransform + itkScalableAffineTransform + itkScaleTransform + itkKernelTransform + itkTransformGeometryImageFilter) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Core/Transform/wrapping/itkAffineTransform.wrap b/Modules/Core/Transform/wrapping/itkAffineTransform.wrap index 40c12aa6f1a..0054e44fa71 100644 --- a/Modules/Core/Transform/wrapping/itkAffineTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkAffineTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::AffineTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkAzimuthElevationToCartesianTransform.wrap b/Modules/Core/Transform/wrapping/itkAzimuthElevationToCartesianTransform.wrap index de43dd2ef16..a2793ecbd0c 100644 --- a/Modules/Core/Transform/wrapping/itkAzimuthElevationToCartesianTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkAzimuthElevationToCartesianTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::AzimuthElevationToCartesianTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkBSplineBaseTransform.wrap b/Modules/Core/Transform/wrapping/itkBSplineBaseTransform.wrap index 25b42c3134e..512527a66cc 100644 --- a/Modules/Core/Transform/wrapping/itkBSplineBaseTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkBSplineBaseTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::BSplineBaseTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}3" "${ITKT_D},${d},3") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}3" "${ITKT_D},${d},3") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkBSplineTransform.wrap b/Modules/Core/Transform/wrapping/itkBSplineTransform.wrap index 1e007b64089..a170e3efffd 100644 --- a/Modules/Core/Transform/wrapping/itkBSplineTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkBSplineTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::BSplineTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}3" "${ITKT_D},${d},3") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}3" "${ITKT_D},${d},3") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkBSplineTransformInitializer.wrap b/Modules/Core/Transform/wrapping/itkBSplineTransformInitializer.wrap index 420d02601f8..3e0fd3b2996 100644 --- a/Modules/Core/Transform/wrapping/itkBSplineTransformInitializer.wrap +++ b/Modules/Core/Transform/wrapping/itkBSplineTransformInitializer.wrap @@ -1,8 +1,9 @@ itk_wrap_include("itkBSplineTransform.h") itk_wrap_class("itk::BSplineTransformInitializer" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("BST${ITKM_D}${d}3${ITKM_I${t}${d}}" "itk::BSplineTransform< ${ITKT_D}, ${d}, 3 >, ${ITKT_I${t}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("BST${ITKM_D}${d}3${ITKM_I${t}${d}}" + "itk::BSplineTransform< ${ITKT_D}, ${d}, 3 >, ${ITKT_I${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkCenteredAffineTransform.wrap b/Modules/Core/Transform/wrapping/itkCenteredAffineTransform.wrap index 640885ea619..0e940d709db 100644 --- a/Modules/Core/Transform/wrapping/itkCenteredAffineTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkCenteredAffineTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::CenteredAffineTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkCenteredEuler3DTransform.wrap b/Modules/Core/Transform/wrapping/itkCenteredEuler3DTransform.wrap index a9e3017e69f..08dd671f23e 100644 --- a/Modules/Core/Transform/wrapping/itkCenteredEuler3DTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkCenteredEuler3DTransform.wrap @@ -1,6 +1,6 @@ itk_wrap_filter_dims(d3 3) if(d3) itk_wrap_class("itk::CenteredEuler3DTransform" POINTER) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") + itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() endif() diff --git a/Modules/Core/Transform/wrapping/itkCenteredRigid2DTransform.wrap b/Modules/Core/Transform/wrapping/itkCenteredRigid2DTransform.wrap index baef47e4149..7e50ade9b0c 100644 --- a/Modules/Core/Transform/wrapping/itkCenteredRigid2DTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkCenteredRigid2DTransform.wrap @@ -1,6 +1,6 @@ itk_wrap_filter_dims(d2 2) if(d2) itk_wrap_class("itk::CenteredRigid2DTransform" POINTER) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") + itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() endif() diff --git a/Modules/Core/Transform/wrapping/itkCenteredSimilarity2DTransform.wrap b/Modules/Core/Transform/wrapping/itkCenteredSimilarity2DTransform.wrap index 5914f8d99f1..c32610453bc 100644 --- a/Modules/Core/Transform/wrapping/itkCenteredSimilarity2DTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkCenteredSimilarity2DTransform.wrap @@ -1,6 +1,6 @@ itk_wrap_filter_dims(d2 2) if(d2) itk_wrap_class("itk::CenteredSimilarity2DTransform" POINTER) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") + itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() endif() diff --git a/Modules/Core/Transform/wrapping/itkComposeScaleSkewVersor3DTransform.wrap b/Modules/Core/Transform/wrapping/itkComposeScaleSkewVersor3DTransform.wrap index c8784c5815a..ccf24ff4b11 100644 --- a/Modules/Core/Transform/wrapping/itkComposeScaleSkewVersor3DTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkComposeScaleSkewVersor3DTransform.wrap @@ -1,6 +1,6 @@ itk_wrap_filter_dims(d3 3) if(d3) itk_wrap_class("itk::ComposeScaleSkewVersor3DTransform" POINTER) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") + itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() endif() diff --git a/Modules/Core/Transform/wrapping/itkCompositeTransform.wrap b/Modules/Core/Transform/wrapping/itkCompositeTransform.wrap index 4803e671999..b4d2ce4d07e 100644 --- a/Modules/Core/Transform/wrapping/itkCompositeTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkCompositeTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::CompositeTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkElasticBodyReciprocalSplineKernelTransform.wrap b/Modules/Core/Transform/wrapping/itkElasticBodyReciprocalSplineKernelTransform.wrap index be490dc99a4..ca5c2c80a46 100644 --- a/Modules/Core/Transform/wrapping/itkElasticBodyReciprocalSplineKernelTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkElasticBodyReciprocalSplineKernelTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ElasticBodyReciprocalSplineKernelTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkElasticBodySplineKernelTransform.wrap b/Modules/Core/Transform/wrapping/itkElasticBodySplineKernelTransform.wrap index 28843ad866f..1506084bc50 100644 --- a/Modules/Core/Transform/wrapping/itkElasticBodySplineKernelTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkElasticBodySplineKernelTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ElasticBodySplineKernelTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkEuler2DTransform.wrap b/Modules/Core/Transform/wrapping/itkEuler2DTransform.wrap index 1f07dd0dd27..66afff95ee1 100644 --- a/Modules/Core/Transform/wrapping/itkEuler2DTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkEuler2DTransform.wrap @@ -1,6 +1,6 @@ itk_wrap_filter_dims(d2 2) if(d2) itk_wrap_class("itk::Euler2DTransform" POINTER) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") + itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() endif() diff --git a/Modules/Core/Transform/wrapping/itkEuler3DTransform.wrap b/Modules/Core/Transform/wrapping/itkEuler3DTransform.wrap index 59d18d716fe..8b3376f48ab 100644 --- a/Modules/Core/Transform/wrapping/itkEuler3DTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkEuler3DTransform.wrap @@ -1,6 +1,6 @@ itk_wrap_filter_dims(d3 3) if(d3) itk_wrap_class("itk::Euler3DTransform" POINTER) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") + itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() endif() diff --git a/Modules/Core/Transform/wrapping/itkFixedCenterOfRotationAffineTransform.wrap b/Modules/Core/Transform/wrapping/itkFixedCenterOfRotationAffineTransform.wrap index 23880ae829c..7bb246b59e4 100644 --- a/Modules/Core/Transform/wrapping/itkFixedCenterOfRotationAffineTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkFixedCenterOfRotationAffineTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::FixedCenterOfRotationAffineTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkIdentityTransform.wrap b/Modules/Core/Transform/wrapping/itkIdentityTransform.wrap index 0c1519b1aa0..342fdb4f8a2 100644 --- a/Modules/Core/Transform/wrapping/itkIdentityTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkIdentityTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::IdentityTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkKernelTransform.wrap b/Modules/Core/Transform/wrapping/itkKernelTransform.wrap index 86c74d74bc0..8ad75d74a5a 100644 --- a/Modules/Core/Transform/wrapping/itkKernelTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkKernelTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::KernelTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkMatrixOffsetTransformBase.wrap b/Modules/Core/Transform/wrapping/itkMatrixOffsetTransformBase.wrap index eed82477459..568fc906da3 100644 --- a/Modules/Core/Transform/wrapping/itkMatrixOffsetTransformBase.wrap +++ b/Modules/Core/Transform/wrapping/itkMatrixOffsetTransformBase.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::MatrixOffsetTransformBase" POINTER) - UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}${d}" "${ITKT_${t}},${d},${d}") - endforeach() +unique(types "D;${WRAP_ITK_REAL}") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}${d}" "${ITKT_${t}},${d},${d}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkMultiTransform.wrap b/Modules/Core/Transform/wrapping/itkMultiTransform.wrap index 06175c1f298..43d86a8ec75 100644 --- a/Modules/Core/Transform/wrapping/itkMultiTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkMultiTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::MultiTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}${d}" "${ITKT_D},${d},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}${d}" "${ITKT_D},${d},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkQuaternionRigidTransform.wrap b/Modules/Core/Transform/wrapping/itkQuaternionRigidTransform.wrap index f6d33ef16fb..a9389769405 100644 --- a/Modules/Core/Transform/wrapping/itkQuaternionRigidTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkQuaternionRigidTransform.wrap @@ -1,6 +1,6 @@ itk_wrap_filter_dims(d3 3) if(d3) itk_wrap_class("itk::QuaternionRigidTransform" POINTER) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") + itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() endif() diff --git a/Modules/Core/Transform/wrapping/itkRigid2DTransform.wrap b/Modules/Core/Transform/wrapping/itkRigid2DTransform.wrap index 2d310a113fc..49484bec044 100644 --- a/Modules/Core/Transform/wrapping/itkRigid2DTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkRigid2DTransform.wrap @@ -1,6 +1,6 @@ itk_wrap_filter_dims(d2 2) if(d2) itk_wrap_class("itk::Rigid2DTransform" POINTER) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") + itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() endif() diff --git a/Modules/Core/Transform/wrapping/itkRigid3DPerspectiveTransform.wrap b/Modules/Core/Transform/wrapping/itkRigid3DPerspectiveTransform.wrap index a9ad58860ce..11d6ac387dd 100644 --- a/Modules/Core/Transform/wrapping/itkRigid3DPerspectiveTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkRigid3DPerspectiveTransform.wrap @@ -1,6 +1,6 @@ itk_wrap_filter_dims(d3 3) if(d3 AND d2) itk_wrap_class("itk::Rigid3DPerspectiveTransform" POINTER) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") + itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() endif() diff --git a/Modules/Core/Transform/wrapping/itkRigid3DTransform.wrap b/Modules/Core/Transform/wrapping/itkRigid3DTransform.wrap index 7da52143cb9..de1d7202385 100644 --- a/Modules/Core/Transform/wrapping/itkRigid3DTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkRigid3DTransform.wrap @@ -1,6 +1,6 @@ itk_wrap_filter_dims(d3 3) if(d3) itk_wrap_class("itk::Rigid3DTransform" POINTER) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") + itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() endif() diff --git a/Modules/Core/Transform/wrapping/itkScalableAffineTransform.wrap b/Modules/Core/Transform/wrapping/itkScalableAffineTransform.wrap index 3719e00860f..bfa49ba6aee 100644 --- a/Modules/Core/Transform/wrapping/itkScalableAffineTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkScalableAffineTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ScalableAffineTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkScaleLogarithmicTransform.wrap b/Modules/Core/Transform/wrapping/itkScaleLogarithmicTransform.wrap index 4b96d4bb6b3..093396dd7c8 100644 --- a/Modules/Core/Transform/wrapping/itkScaleLogarithmicTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkScaleLogarithmicTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ScaleLogarithmicTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkScaleSkewVersor3DTransform.wrap b/Modules/Core/Transform/wrapping/itkScaleSkewVersor3DTransform.wrap index 19d17c99b0b..889b67f350c 100644 --- a/Modules/Core/Transform/wrapping/itkScaleSkewVersor3DTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkScaleSkewVersor3DTransform.wrap @@ -1,6 +1,6 @@ itk_wrap_filter_dims(d3 3) if(d3) itk_wrap_class("itk::ScaleSkewVersor3DTransform" POINTER) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") + itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() endif() diff --git a/Modules/Core/Transform/wrapping/itkScaleTransform.wrap b/Modules/Core/Transform/wrapping/itkScaleTransform.wrap index 896c266e6ca..eec568f111a 100644 --- a/Modules/Core/Transform/wrapping/itkScaleTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkScaleTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ScaleTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkScaleVersor3DTransform.wrap b/Modules/Core/Transform/wrapping/itkScaleVersor3DTransform.wrap index 715cc10e2d3..cb672751a95 100644 --- a/Modules/Core/Transform/wrapping/itkScaleVersor3DTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkScaleVersor3DTransform.wrap @@ -1,6 +1,6 @@ itk_wrap_filter_dims(d3 3) if(d3) itk_wrap_class("itk::ScaleVersor3DTransform" POINTER) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") + itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() endif() diff --git a/Modules/Core/Transform/wrapping/itkSimilarity2DTransform.wrap b/Modules/Core/Transform/wrapping/itkSimilarity2DTransform.wrap index 39d55069c23..4273063ef7a 100644 --- a/Modules/Core/Transform/wrapping/itkSimilarity2DTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkSimilarity2DTransform.wrap @@ -1,6 +1,6 @@ itk_wrap_filter_dims(d2 2) if(d2) itk_wrap_class("itk::Similarity2DTransform" POINTER) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") + itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() endif() diff --git a/Modules/Core/Transform/wrapping/itkSimilarity3DTransform.wrap b/Modules/Core/Transform/wrapping/itkSimilarity3DTransform.wrap index 3c0857ef815..f884e2e3ad4 100644 --- a/Modules/Core/Transform/wrapping/itkSimilarity3DTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkSimilarity3DTransform.wrap @@ -1,6 +1,6 @@ itk_wrap_filter_dims(d3 3) if(d3) itk_wrap_class("itk::Similarity3DTransform" POINTER) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") + itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() endif() diff --git a/Modules/Core/Transform/wrapping/itkThinPlateR2LogRSplineKernelTransform.wrap b/Modules/Core/Transform/wrapping/itkThinPlateR2LogRSplineKernelTransform.wrap index c215c25ac62..850b9aba341 100644 --- a/Modules/Core/Transform/wrapping/itkThinPlateR2LogRSplineKernelTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkThinPlateR2LogRSplineKernelTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ThinPlateR2LogRSplineKernelTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkThinPlateSplineKernelTransform.wrap b/Modules/Core/Transform/wrapping/itkThinPlateSplineKernelTransform.wrap index 45bc9d86a8b..e43092a506a 100644 --- a/Modules/Core/Transform/wrapping/itkThinPlateSplineKernelTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkThinPlateSplineKernelTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ThinPlateSplineKernelTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkTransformBase.wrap b/Modules/Core/Transform/wrapping/itkTransformBase.wrap index 46aa15038eb..5a5c9bd6ac3 100644 --- a/Modules/Core/Transform/wrapping/itkTransformBase.wrap +++ b/Modules/Core/Transform/wrapping/itkTransformBase.wrap @@ -1,36 +1,36 @@ -UNIQUE(types "D;${WRAP_ITK_REAL}") +unique(types "D;${WRAP_ITK_REAL}") set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkTransformBase.h") itk_wrap_simple_class("itk::TransformBaseTemplateEnums") itk_wrap_class("itk::TransformBaseTemplate" POINTER_WITH_CONST_POINTER) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS ON) itk_wrap_class("itk::Transform" POINTER) - foreach(d1 ${ITK_WRAP_IMAGE_DIMS}) - foreach(d2 ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d1}${d2}" "${ITKT_${t}},${d1},${d2}") - endforeach() - endforeach() - endforeach() - foreach(d ${ITK_WRAP_IMAGE_DIMS}) +foreach(d1 ${ITK_WRAP_IMAGE_DIMS}) + foreach(d2 ${ITK_WRAP_IMAGE_DIMS}) foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}},${d}") + itk_wrap_template("${ITKM_${t}}${d1}${d2}" "${ITKT_${t}},${d1},${d2}") endforeach() endforeach() +endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}},${d}") + endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::DataObjectDecorator" POINTER) - foreach(d1 ${ITK_WRAP_IMAGE_DIMS}) - foreach(d2 ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("T${ITKM_${t}}${d1}${d2}" "itk::Transform< ${ITKT_${t}},${d1},${d2} >") - endforeach() +foreach(d1 ${ITK_WRAP_IMAGE_DIMS}) + foreach(d2 ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("T${ITKM_${t}}${d1}${d2}" "itk::Transform< ${ITKT_${t}},${d1},${d2} >") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkTransformGeometryImageFilter.wrap b/Modules/Core/Transform/wrapping/itkTransformGeometryImageFilter.wrap index 9a9a783542a..8df2930c4c4 100644 --- a/Modules/Core/Transform/wrapping/itkTransformGeometryImageFilter.wrap +++ b/Modules/Core/Transform/wrapping/itkTransformGeometryImageFilter.wrap @@ -1,8 +1,8 @@ itk_wrap_filter_dims(d3 3) if(d3) itk_wrap_class("itk::TransformGeometryImageFilter" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d3}}${ITKM_I${t}${d3}}" "${ITKT_I${t}${d3}},${ITKT_I${t}${d3}}") - endforeach() + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d3}}${ITKM_I${t}${d3}}" "${ITKT_I${t}${d3}},${ITKT_I${t}${d3}}") + endforeach() itk_end_wrap_class() endif() diff --git a/Modules/Core/Transform/wrapping/itkTranslationTransform.wrap b/Modules/Core/Transform/wrapping/itkTranslationTransform.wrap index 230551764f8..e48600599b6 100644 --- a/Modules/Core/Transform/wrapping/itkTranslationTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkTranslationTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::TranslationTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/itkVersorRigid3DTransform.wrap b/Modules/Core/Transform/wrapping/itkVersorRigid3DTransform.wrap index 5d7c4f55714..8b91601e411 100644 --- a/Modules/Core/Transform/wrapping/itkVersorRigid3DTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkVersorRigid3DTransform.wrap @@ -1,6 +1,6 @@ itk_wrap_filter_dims(d3 3) if(d3) itk_wrap_class("itk::VersorRigid3DTransform" POINTER) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") + itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() endif() diff --git a/Modules/Core/Transform/wrapping/itkVersorTransform.wrap b/Modules/Core/Transform/wrapping/itkVersorTransform.wrap index 08bac661e6a..2131f3d124d 100644 --- a/Modules/Core/Transform/wrapping/itkVersorTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkVersorTransform.wrap @@ -2,6 +2,6 @@ itk_wrap_filter_dims(has_d_3 3) if(has_d_3) itk_wrap_class("itk::VersorTransform" POINTER) - itk_wrap_template("${ITKM_D}" "${ITKT_D}") + itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() endif() diff --git a/Modules/Core/Transform/wrapping/itkVolumeSplineKernelTransform.wrap b/Modules/Core/Transform/wrapping/itkVolumeSplineKernelTransform.wrap index 38cd66c6b77..46f38f0c647 100644 --- a/Modules/Core/Transform/wrapping/itkVolumeSplineKernelTransform.wrap +++ b/Modules/Core/Transform/wrapping/itkVolumeSplineKernelTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::VolumeSplineKernelTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Core/Transform/wrapping/test/CMakeLists.txt b/Modules/Core/Transform/wrapping/test/CMakeLists.txt index 2c11d09ba19..51fbaec3979 100644 --- a/Modules/Core/Transform/wrapping/test/CMakeLists.txt +++ b/Modules/Core/Transform/wrapping/test/CMakeLists.txt @@ -1,7 +1,9 @@ if(ITK_WRAP_PYTHON) - itk_python_add_test(NAME itkTransformSerializationTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkTransformSerializationTest.py + itk_python_add_test( + NAME + itkTransformSerializationTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkTransformSerializationTest.py DATA{Baseline/BSplineDeformationTransformDisplacements5.txt} - ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png - ) + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png) endif() diff --git a/Modules/Filtering/AnisotropicSmoothing/itk-module.cmake b/Modules/Filtering/AnisotropicSmoothing/itk-module.cmake index d6d30e33c27..1e95ec830d1 100644 --- a/Modules/Filtering/AnisotropicSmoothing/itk-module.cmake +++ b/Modules/Filtering/AnisotropicSmoothing/itk-module.cmake @@ -1,16 +1,17 @@ -set(DOCUMENTATION "This module contains filters that implement variations of +set(DOCUMENTATION + "This module contains filters that implement variations of anisotropic smoothing. This is an image denoising technique that strives for preserving edges on the images while smoothing regions of uniform intensity. This type of filtering is convenient as a preprocessing stage of segmentation algorithms. You may find useful as well the filters in \\\\ref ITKCurvatureFlow and \\\\ref ITKSmoothing.") -itk_module(ITKAnisotropicSmoothing +itk_module( + ITKAnisotropicSmoothing COMPILE_DEPENDS - ITKImageGrid - ITKCurvatureFlow + ITKImageGrid + ITKCurvatureFlow TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/AnisotropicSmoothing/test/CMakeLists.txt b/Modules/Filtering/AnisotropicSmoothing/test/CMakeLists.txt index 48e8a29e1ac..1257dda2921 100644 --- a/Modules/Filtering/AnisotropicSmoothing/test/CMakeLists.txt +++ b/Modules/Filtering/AnisotropicSmoothing/test/CMakeLists.txt @@ -1,24 +1,45 @@ itk_module_test() set(ITKAnisotropicSmoothingTests -itkGradientAnisotropicDiffusionImageFilterTest.cxx -itkCurvatureAnisotropicDiffusionImageFilterTest.cxx -itkMinMaxCurvatureFlowImageFilterTest.cxx -itkVectorAnisotropicDiffusionImageFilterTest.cxx -itkGradientAnisotropicDiffusionImageFilterTest2.cxx -) + itkGradientAnisotropicDiffusionImageFilterTest.cxx + itkCurvatureAnisotropicDiffusionImageFilterTest.cxx + itkMinMaxCurvatureFlowImageFilterTest.cxx + itkVectorAnisotropicDiffusionImageFilterTest.cxx + itkGradientAnisotropicDiffusionImageFilterTest2.cxx) -CreateTestDriver(ITKAnisotropicSmoothing "${ITKAnisotropicSmoothing-Test_LIBRARIES}" "${ITKAnisotropicSmoothingTests}") +createtestdriver(ITKAnisotropicSmoothing "${ITKAnisotropicSmoothing-Test_LIBRARIES}" "${ITKAnisotropicSmoothingTests}") -itk_add_test(NAME itkGradientAnisotropicDiffusionImageFilterTest - COMMAND ITKAnisotropicSmoothingTestDriver itkGradientAnisotropicDiffusionImageFilterTest) -itk_add_test(NAME itkCurvatureAnisotropicDiffusionImageFilterTest - COMMAND ITKAnisotropicSmoothingTestDriver itkCurvatureAnisotropicDiffusionImageFilterTest) -itk_add_test(NAME itkMinMaxCurvatureFlowImageFilterTest - COMMAND ITKAnisotropicSmoothingTestDriver itkMinMaxCurvatureFlowImageFilterTest) -itk_add_test(NAME itkVectorAnisotropicDiffusionImageFilterTest - COMMAND ITKAnisotropicSmoothingTestDriver itkVectorAnisotropicDiffusionImageFilterTest) -itk_add_test(NAME itkGradientAnisotropicDiffusionImageFilterTest2 - COMMAND ITKAnisotropicSmoothingTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/GradientAnisotropicDiffusionImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/GradientAnisotropicDiffusionImageFilterTest2.png - itkGradientAnisotropicDiffusionImageFilterTest2 DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} ${ITK_TEST_OUTPUT_DIR}/GradientAnisotropicDiffusionImageFilterTest2.png) +itk_add_test( + NAME + itkGradientAnisotropicDiffusionImageFilterTest + COMMAND + ITKAnisotropicSmoothingTestDriver + itkGradientAnisotropicDiffusionImageFilterTest) +itk_add_test( + NAME + itkCurvatureAnisotropicDiffusionImageFilterTest + COMMAND + ITKAnisotropicSmoothingTestDriver + itkCurvatureAnisotropicDiffusionImageFilterTest) +itk_add_test( + NAME + itkMinMaxCurvatureFlowImageFilterTest + COMMAND + ITKAnisotropicSmoothingTestDriver + itkMinMaxCurvatureFlowImageFilterTest) +itk_add_test( + NAME + itkVectorAnisotropicDiffusionImageFilterTest + COMMAND + ITKAnisotropicSmoothingTestDriver + itkVectorAnisotropicDiffusionImageFilterTest) +itk_add_test( + NAME + itkGradientAnisotropicDiffusionImageFilterTest2 + COMMAND + ITKAnisotropicSmoothingTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/GradientAnisotropicDiffusionImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/GradientAnisotropicDiffusionImageFilterTest2.png + itkGradientAnisotropicDiffusionImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} + ${ITK_TEST_OUTPUT_DIR}/GradientAnisotropicDiffusionImageFilterTest2.png) diff --git a/Modules/Filtering/AnisotropicSmoothing/wrapping/itkAnisotropicDiffusionImageFilter.wrap b/Modules/Filtering/AnisotropicSmoothing/wrapping/itkAnisotropicDiffusionImageFilter.wrap index 844face8b11..e5ce9405367 100644 --- a/Modules/Filtering/AnisotropicSmoothing/wrapping/itkAnisotropicDiffusionImageFilter.wrap +++ b/Modules/Filtering/AnisotropicSmoothing/wrapping/itkAnisotropicDiffusionImageFilter.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::AnisotropicDiffusionImageFilter" POINTER) # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) - itk_wrap_image_filter("${WRAP_ITK_VECTOR}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_VECTOR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/AnisotropicSmoothing/wrapping/itkCurvatureAnisotropicDiffusionImageFilter.wrap b/Modules/Filtering/AnisotropicSmoothing/wrapping/itkCurvatureAnisotropicDiffusionImageFilter.wrap index 10e0964e064..fcf87f6553d 100644 --- a/Modules/Filtering/AnisotropicSmoothing/wrapping/itkCurvatureAnisotropicDiffusionImageFilter.wrap +++ b/Modules/Filtering/AnisotropicSmoothing/wrapping/itkCurvatureAnisotropicDiffusionImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::CurvatureAnisotropicDiffusionImageFilter" POINTER) # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/AnisotropicSmoothing/wrapping/itkGradientAnisotropicDiffusionImageFilter.wrap b/Modules/Filtering/AnisotropicSmoothing/wrapping/itkGradientAnisotropicDiffusionImageFilter.wrap index a213c289210..3f78fdcf6ee 100644 --- a/Modules/Filtering/AnisotropicSmoothing/wrapping/itkGradientAnisotropicDiffusionImageFilter.wrap +++ b/Modules/Filtering/AnisotropicSmoothing/wrapping/itkGradientAnisotropicDiffusionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::GradientAnisotropicDiffusionImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/AnisotropicSmoothing/wrapping/itkVectorCurvatureAnisotropicDiffusionImageFilter.wrap b/Modules/Filtering/AnisotropicSmoothing/wrapping/itkVectorCurvatureAnisotropicDiffusionImageFilter.wrap index c20dc02b13d..ebb439032de 100644 --- a/Modules/Filtering/AnisotropicSmoothing/wrapping/itkVectorCurvatureAnisotropicDiffusionImageFilter.wrap +++ b/Modules/Filtering/AnisotropicSmoothing/wrapping/itkVectorCurvatureAnisotropicDiffusionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::VectorCurvatureAnisotropicDiffusionImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_VECTOR}" 2) +itk_wrap_image_filter("${WRAP_ITK_VECTOR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/AnisotropicSmoothing/wrapping/itkVectorGradientAnisotropicDiffusionImageFilter.wrap b/Modules/Filtering/AnisotropicSmoothing/wrapping/itkVectorGradientAnisotropicDiffusionImageFilter.wrap index d649a05559c..99f3c3cd61a 100644 --- a/Modules/Filtering/AnisotropicSmoothing/wrapping/itkVectorGradientAnisotropicDiffusionImageFilter.wrap +++ b/Modules/Filtering/AnisotropicSmoothing/wrapping/itkVectorGradientAnisotropicDiffusionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::VectorGradientAnisotropicDiffusionImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_VECTOR}" 2) +itk_wrap_image_filter("${WRAP_ITK_VECTOR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/AnisotropicSmoothing/wrapping/test/CMakeLists.txt b/Modules/Filtering/AnisotropicSmoothing/wrapping/test/CMakeLists.txt index 25cef13d7e0..64812235aae 100644 --- a/Modules/Filtering/AnisotropicSmoothing/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/AnisotropicSmoothing/wrapping/test/CMakeLists.txt @@ -1,26 +1,43 @@ set(test_input_dir ${itk-module_SOURCE_DIR}/test/Input) -list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) -if(ITK_WRAP_PYTHON AND ITK_WRAP_float AND wrap_2_index GREATER -1) - itk_python_add_test(NAME PythonCurvatureAnisotropicDiffusionImageFilterTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/CurvatureAnisotropicDiffusionImageFilterTest.py - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/CurvatureAnisotropicDiffusionImageFilterTest.png - 5 0.125 3 - ) - itk_python_add_test(NAME PythonSmoothingRecursiveGaussianImageFilterTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/SmoothingRecursiveGaussianImageFilterTest.py - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/SmoothingRecursiveGaussianImageFilterTest.png - 3 - ) - itk_python_add_test(NAME PythonGradientAnisotropicDiffusionImageFilterTest +list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) +if(ITK_WRAP_PYTHON + AND ITK_WRAP_float + AND wrap_2_index GREATER -1) + itk_python_add_test( + NAME + PythonCurvatureAnisotropicDiffusionImageFilterTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/CurvatureAnisotropicDiffusionImageFilterTest.py + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/CurvatureAnisotropicDiffusionImageFilterTest.png + 5 + 0.125 + 3) + itk_python_add_test( + NAME + PythonSmoothingRecursiveGaussianImageFilterTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/SmoothingRecursiveGaussianImageFilterTest.py + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/SmoothingRecursiveGaussianImageFilterTest.png + 3) + itk_python_add_test( + NAME + PythonGradientAnisotropicDiffusionImageFilterTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonGradientAnisotropicDiffusionImageFilterTest.png - DATA{Baseline/PythonGradientAnisotropicDiffusionImageFilterTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/GradientAnisotropicDiffusionImageFilterTest.py - DATA{${test_input_dir}/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/PythonGradientAnisotropicDiffusionImageFilterTest.png - 5 0.125 1.0 - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonGradientAnisotropicDiffusionImageFilterTest.png + DATA{Baseline/PythonGradientAnisotropicDiffusionImageFilterTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/GradientAnisotropicDiffusionImageFilterTest.py + DATA{${test_input_dir}/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/PythonGradientAnisotropicDiffusionImageFilterTest.png + 5 + 0.125 + 1.0) endif() diff --git a/Modules/Filtering/AntiAlias/itk-module.cmake b/Modules/Filtering/AntiAlias/itk-module.cmake index 3566546da38..6ccab822ef8 100644 --- a/Modules/Filtering/AntiAlias/itk-module.cmake +++ b/Modules/Filtering/AntiAlias/itk-module.cmake @@ -1,14 +1,15 @@ -set(DOCUMENTATION "This module contains classes for applying antialiasing +set(DOCUMENTATION + "This module contains classes for applying antialiasing filters to images. This is typically done to smooth the outcome of segmentations, previous to extracting contours or surfaces from them. Note that you can also achieve effects similar to anti-aliasing by using a binary segmentation as input to a level set filter.") -itk_module(ITKAntiAlias +itk_module( + ITKAntiAlias COMPILE_DEPENDS - ITKLevelSets + ITKLevelSets TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/AntiAlias/test/CMakeLists.txt b/Modules/Filtering/AntiAlias/test/CMakeLists.txt index 828743ae317..bc2a0ed3c51 100644 --- a/Modules/Filtering/AntiAlias/test/CMakeLists.txt +++ b/Modules/Filtering/AntiAlias/test/CMakeLists.txt @@ -1,14 +1,15 @@ itk_module_test() -set(ITKAntiAliasTests -itkAntiAliasBinaryImageFilterTest.cxx -) +set(ITKAntiAliasTests itkAntiAliasBinaryImageFilterTest.cxx) -CreateTestDriver(ITKAntiAlias "${ITKAntiAlias-Test_LIBRARIES}" "${ITKAntiAliasTests}") +createtestdriver(ITKAntiAlias "${ITKAntiAlias-Test_LIBRARIES}" "${ITKAntiAliasTests}") -itk_add_test(NAME itkAntiAliasBinaryImageFilterTest - COMMAND ITKAntiAliasTestDriver - --compare DATA{Baseline/itkAntiAliasBinaryImageFilterTestBaseline.mha} - ${ITK_TEST_OUTPUT_DIR}/itkAntiAliasBinaryImageFilterTest.mha +itk_add_test( + NAME itkAntiAliasBinaryImageFilterTest + COMMAND + ITKAntiAliasTestDriver + --compare + DATA{Baseline/itkAntiAliasBinaryImageFilterTestBaseline.mha} ${ITK_TEST_OUTPUT_DIR}/itkAntiAliasBinaryImageFilterTest.mha - ) + itkAntiAliasBinaryImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkAntiAliasBinaryImageFilterTest.mha) diff --git a/Modules/Filtering/AntiAlias/wrapping/itkAntiAliasBinaryImageFilter.wrap b/Modules/Filtering/AntiAlias/wrapping/itkAntiAliasBinaryImageFilter.wrap index 2fa614426ea..9b0568f0fa4 100644 --- a/Modules/Filtering/AntiAlias/wrapping/itkAntiAliasBinaryImageFilter.wrap +++ b/Modules/Filtering/AntiAlias/wrapping/itkAntiAliasBinaryImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::AntiAliasBinaryImageFilter" POINTER) - # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +# itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +# itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/BiasCorrection/itk-module.cmake b/Modules/Filtering/BiasCorrection/itk-module.cmake index d79f9a6c33f..908e12d0d80 100644 --- a/Modules/Filtering/BiasCorrection/itk-module.cmake +++ b/Modules/Filtering/BiasCorrection/itk-module.cmake @@ -1,24 +1,25 @@ -set(DOCUMENTATION "This module contains classes implementing bias correction +set(DOCUMENTATION + "This module contains classes implementing bias correction methods. This is commonly needed for MRI imaging when the intensities in the middle of the image are higher than the intensities in the borders of the image. The same need is common in microscopy images when the illumination is not uniform across the field of view.") -itk_module(ITKBiasCorrection +itk_module( + ITKBiasCorrection ENABLE_SHARED DEPENDS - ITKImageIntensity + ITKImageIntensity PRIVATE_DEPENDS - ITKCommon + ITKCommon COMPILE_DEPENDS - ITKOptimizers - ITKImageGrid - ITKPolynomials + ITKOptimizers + ITKImageGrid + ITKPolynomials TEST_DEPENDS - ITKTestKernel - ITKOptimizers - ITKPolynomials - ITKThresholding + ITKTestKernel + ITKOptimizers + ITKPolynomials + ITKThresholding DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/BiasCorrection/src/CMakeLists.txt b/Modules/Filtering/BiasCorrection/src/CMakeLists.txt index d1d428e0822..eea51ff1a56 100644 --- a/Modules/Filtering/BiasCorrection/src/CMakeLists.txt +++ b/Modules/Filtering/BiasCorrection/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKBiasCorrection_SRCS - itkCompositeValleyFunction.cxx - itkCacheableScalarFunction.cxx - ) +set(ITKBiasCorrection_SRCS itkCompositeValleyFunction.cxx itkCacheableScalarFunction.cxx) itk_module_add_library(ITKBiasCorrection ${ITKBiasCorrection_SRCS}) diff --git a/Modules/Filtering/BiasCorrection/test/CMakeLists.txt b/Modules/Filtering/BiasCorrection/test/CMakeLists.txt index 6f5fcf5e183..66d2f57da70 100644 --- a/Modules/Filtering/BiasCorrection/test/CMakeLists.txt +++ b/Modules/Filtering/BiasCorrection/test/CMakeLists.txt @@ -1,53 +1,71 @@ itk_module_test() -set(ITKBiasCorrectionTests -itkCompositeValleyFunctionTest.cxx -itkMRIBiasFieldCorrectionFilterTest.cxx -itkN4BiasFieldCorrectionImageFilterTest.cxx -) +set(ITKBiasCorrectionTests itkCompositeValleyFunctionTest.cxx itkMRIBiasFieldCorrectionFilterTest.cxx + itkN4BiasFieldCorrectionImageFilterTest.cxx) -CreateTestDriver(ITKBiasCorrection "${ITKBiasCorrection-Test_LIBRARIES}" "${ITKBiasCorrectionTests}") +createtestdriver(ITKBiasCorrection "${ITKBiasCorrection-Test_LIBRARIES}" "${ITKBiasCorrectionTests}") -itk_add_test(NAME itkCompositeValleyFunctionTest - COMMAND ITKBiasCorrectionTestDriver itkCompositeValleyFunctionTest) -itk_add_test(NAME itkMRIBiasFieldCorrectionFilterTest - COMMAND ITKBiasCorrectionTestDriver itkMRIBiasFieldCorrectionFilterTest) -itk_add_test(NAME itkN4BiasFieldCorrectionImageFilterTest1 - COMMAND ITKBiasCorrectionTestDriver - --compare DATA{Baseline/N4ControlPoints_2D.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_2D.nii.gz - itkN4BiasFieldCorrectionImageFilterTest 2 - ${ITK_EXAMPLE_DATA_ROOT}/BrainT1SliceBorder20.png # input - ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_2D.nii.gz # control point lattice - 4 # shrink factor - 20x20 # number of iterations - none # mask - 200 # spline distance - ) -itk_add_test(NAME itkN4BiasFieldCorrectionImageFilterTest2 - COMMAND ITKBiasCorrectionTestDriver - --compare DATA{Baseline/N4ControlPoints_3D.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_3D_Test2.nii.gz - itkN4BiasFieldCorrectionImageFilterTest - 3 - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeCompressed.mha} # input - ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_3D_Test2.nii.gz # control point lattice - 3 # shrink factor - 10x10x10 # number of iterations - none # mask - 150 # spline distance - ) +itk_add_test( + NAME + itkCompositeValleyFunctionTest + COMMAND + ITKBiasCorrectionTestDriver + itkCompositeValleyFunctionTest) +itk_add_test( + NAME + itkMRIBiasFieldCorrectionFilterTest + COMMAND + ITKBiasCorrectionTestDriver + itkMRIBiasFieldCorrectionFilterTest) +itk_add_test( + NAME + itkN4BiasFieldCorrectionImageFilterTest1 + COMMAND + ITKBiasCorrectionTestDriver + --compare + DATA{Baseline/N4ControlPoints_2D.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_2D.nii.gz + itkN4BiasFieldCorrectionImageFilterTest + 2 + ${ITK_EXAMPLE_DATA_ROOT}/BrainT1SliceBorder20.png # input + ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_2D.nii.gz # control point lattice + 4 # shrink factor + 20x20 # number of iterations + none # mask + 200 # spline distance +) +itk_add_test( + NAME + itkN4BiasFieldCorrectionImageFilterTest2 + COMMAND + ITKBiasCorrectionTestDriver + --compare + DATA{Baseline/N4ControlPoints_3D.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_3D_Test2.nii.gz + itkN4BiasFieldCorrectionImageFilterTest + 3 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeCompressed.mha} # input + ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_3D_Test2.nii.gz # control point lattice + 3 # shrink factor + 10x10x10 # number of iterations + none # mask + 150 # spline distance +) -itk_add_test(NAME itkN4BiasFieldCorrectionImageFilterTest3 - COMMAND ITKBiasCorrectionTestDriver - --compare DATA{Baseline/N4ControlPoints_3D.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_3D_Test3.nii.gz - itkN4BiasFieldCorrectionImageFilterTest - 3 - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeCompressed.mha} # input - ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_3D_Test3.nii.gz # control point lattice - 3 # shrink factor - 10x10x10 # number of iterations - none # mask - 150 # spline distance - 1 # mask label - ) +itk_add_test( + NAME + itkN4BiasFieldCorrectionImageFilterTest3 + COMMAND + ITKBiasCorrectionTestDriver + --compare + DATA{Baseline/N4ControlPoints_3D.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_3D_Test3.nii.gz + itkN4BiasFieldCorrectionImageFilterTest + 3 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeCompressed.mha} # input + ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_3D_Test3.nii.gz # control point lattice + 3 # shrink factor + 10x10x10 # number of iterations + none # mask + 150 # spline distance + 1 # mask label +) diff --git a/Modules/Filtering/BiasCorrection/wrapping/itkN4BiasFieldCorrectionImageFilter.wrap b/Modules/Filtering/BiasCorrection/wrapping/itkN4BiasFieldCorrectionImageFilter.wrap index 27257bfe498..ca63085e8a3 100644 --- a/Modules/Filtering/BiasCorrection/wrapping/itkN4BiasFieldCorrectionImageFilter.wrap +++ b/Modules/Filtering/BiasCorrection/wrapping/itkN4BiasFieldCorrectionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::N4BiasFieldCorrectionImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "UC" "${WRAP_ITK_SCALAR}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "UC" "${WRAP_ITK_SCALAR}") itk_end_wrap_class() diff --git a/Modules/Filtering/BinaryMathematicalMorphology/itk-module.cmake b/Modules/Filtering/BinaryMathematicalMorphology/itk-module.cmake index c385beecf29..eda2cfd40e8 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/itk-module.cmake +++ b/Modules/Filtering/BinaryMathematicalMorphology/itk-module.cmake @@ -1,14 +1,15 @@ -set(DOCUMENTATION "This module contains classes that implement variations of +set(DOCUMENTATION + "This module contains classes that implement variations of mathematical morphology techniques for binary images. In addition to the classical erosion, dilation, opening and closing filters, you will find here geodesic operations, maxima and minima filters, and reconstruction filters.") -itk_module(ITKBinaryMathematicalMorphology +itk_module( + ITKBinaryMathematicalMorphology COMPILE_DEPENDS - ITKLabelMap - ITKMathematicalMorphology + ITKLabelMap + ITKMathematicalMorphology TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/BinaryMathematicalMorphology/test/CMakeLists.txt b/Modules/Filtering/BinaryMathematicalMorphology/test/CMakeLists.txt index 90f5025dde2..579cdef8d05 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/test/CMakeLists.txt +++ b/Modules/Filtering/BinaryMathematicalMorphology/test/CMakeLists.txt @@ -1,135 +1,363 @@ itk_module_test() set(ITKBinaryMathematicalMorphologyTests -itkBinaryClosingByReconstructionImageFilterTest.cxx -itkBinaryDilateImageFilterTest.cxx -itkFastIncrementalBinaryDilateImageFilterTest.cxx -itkBinaryDilateImageFilterTest3.cxx -itkBinaryErodeImageFilterTest.cxx -itkBinaryErodeImageFilterTest3.cxx -itkBinaryMorphologicalClosingImageFilterTest.cxx -itkBinaryMorphologicalOpeningImageFilterTest.cxx -itkBinaryOpeningByReconstructionImageFilterTest.cxx -itkBinaryThinningImageFilterTest.cxx -itkErodeObjectMorphologyImageFilterTest.cxx -) + itkBinaryClosingByReconstructionImageFilterTest.cxx + itkBinaryDilateImageFilterTest.cxx + itkFastIncrementalBinaryDilateImageFilterTest.cxx + itkBinaryDilateImageFilterTest3.cxx + itkBinaryErodeImageFilterTest.cxx + itkBinaryErodeImageFilterTest3.cxx + itkBinaryMorphologicalClosingImageFilterTest.cxx + itkBinaryMorphologicalOpeningImageFilterTest.cxx + itkBinaryOpeningByReconstructionImageFilterTest.cxx + itkBinaryThinningImageFilterTest.cxx + itkErodeObjectMorphologyImageFilterTest.cxx) -CreateTestDriver(ITKBinaryMathematicalMorphology "${ITKBinaryMathematicalMorphology-Test_LIBRARIES}" "${ITKBinaryMathematicalMorphologyTests}") +createtestdriver(ITKBinaryMathematicalMorphology "${ITKBinaryMathematicalMorphology-Test_LIBRARIES}" + "${ITKBinaryMathematicalMorphologyTests}") -itk_add_test(NAME itkErodeObjectMorphologyImageFilterTest - COMMAND ITKBinaryMathematicalMorphologyTestDriver itkErodeObjectMorphologyImageFilterTest) -itk_add_test(NAME itkBinaryClosingByReconstructionImageFilterTest - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkBinaryClosingByReconstructionImageFilterTest.png - "4eadd941a629c7b52f9aa1be048c854c" - itkBinaryClosingByReconstructionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1-bin.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryClosingByReconstructionImageFilterTest.png 0 255 10) -itk_add_test(NAME itkBinaryDilateImageFilterTest - COMMAND ITKBinaryMathematicalMorphologyTestDriver itkBinaryDilateImageFilterTest) -itk_add_test(NAME itkFastIncrementalBinaryDilateImageFilterTest - COMMAND ITKBinaryMathematicalMorphologyTestDriver itkFastIncrementalBinaryDilateImageFilterTest) -itk_add_test(NAME itkBinaryDilateImageFilterTest-100-0-0 - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-100-0-0.png - "6fd97580a84c71b381d220b132b1335a" - itkBinaryDilateImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-100-0-0.png 100 0 0 10) -itk_add_test(NAME itkBinaryDilateImageFilterTest-100-0-1 - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryDilateImageFilterTest-100-0-1.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-100-0-1.png - itkBinaryDilateImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-100-0-1.png 100 0 1 10) -itk_add_test(NAME itkBinaryDilateImageFilterTest-100-150-0 - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryDilateImageFilterTest-100-150-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-100-150-0.png - itkBinaryDilateImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-100-150-0.png 100 150 0 10) -itk_add_test(NAME itkBinaryDilateImageFilterTest-100-150-1 - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryDilateImageFilterTest-100-150-1.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-100-150-1.png - itkBinaryDilateImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-100-150-1.png 100 150 1 10) -itk_add_test(NAME itkBinaryDilateImageFilterTest-200-0-0 - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryDilateImageFilterTest-200-0-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-200-0-0.png - itkBinaryDilateImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-200-0-0.png 200 0 0 10) -itk_add_test(NAME itkBinaryDilateImageFilterTest-200-0-1 - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryDilateImageFilterTest-200-0-1.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-200-0-1.png - itkBinaryDilateImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-200-0-1.png 200 0 1 10) -itk_add_test(NAME itkBinaryDilateImageFilterTest-200-150-0 - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryDilateImageFilterTest-200-150-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-200-150-0.png - itkBinaryDilateImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-200-150-0.png 200 150 0 10) -itk_add_test(NAME itkBinaryDilateImageFilterTest-200-150-1 - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryDilateImageFilterTest-200-150-1.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-200-150-1.png - itkBinaryDilateImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-200-150-1.png 200 150 1 10) -itk_add_test(NAME itkBinaryErodeImageFilterTest - COMMAND ITKBinaryMathematicalMorphologyTestDriver itkBinaryErodeImageFilterTest) -itk_add_test(NAME itkBinaryErodeImageFilterTest-100-0-0 - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryErodeImageFilterTest-100-0-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-100-0-0.png - itkBinaryErodeImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-100-0-0.png 100 0 0 10) -itk_add_test(NAME itkBinaryErodeImageFilterTest-100-0-1 - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryErodeImageFilterTest-100-0-1.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-100-0-1.png - itkBinaryErodeImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-100-0-1.png 100 0 1 10) -itk_add_test(NAME itkBinaryErodeImageFilterTest-100-150-0 - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryErodeImageFilterTest-100-150-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-100-150-0.png - itkBinaryErodeImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-100-150-0.png 100 150 0 10) -itk_add_test(NAME itkBinaryErodeImageFilterTest-100-150-1 - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryErodeImageFilterTest-100-150-1.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-100-150-1.png - itkBinaryErodeImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-100-150-1.png 100 150 1 10) -itk_add_test(NAME itkBinaryErodeImageFilterTest-200-0-0 - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryErodeImageFilterTest-200-0-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-200-0-0.png - itkBinaryErodeImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-200-0-0.png 200 0 0 10) -itk_add_test(NAME itkBinaryErodeImageFilterTest-200-0-1 - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryErodeImageFilterTest-200-0-1.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-200-0-1.png - itkBinaryErodeImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-200-0-1.png 200 0 1 10) -itk_add_test(NAME itkBinaryErodeImageFilterTest-200-150-0 - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryErodeImageFilterTest-200-150-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-200-150-0.png - itkBinaryErodeImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-200-150-0.png 200 150 0 10) -itk_add_test(NAME itkBinaryErodeImageFilterTest-200-150-1 - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryErodeImageFilterTest-200-150-1.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-200-150-1.png - itkBinaryErodeImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-200-150-1.png 200 150 1 10) -itk_add_test(NAME itkBinaryMorphologicalClosingImageFilterTest - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{Baseline/itkBinaryMorphologicalClosingImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryMorphologicalClosingImageFilterTest.png - itkBinaryMorphologicalClosingImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryMorphologicalClosingImageFilterTest.png 40 1 200) -itk_add_test(NAME itkBinaryMorphologicalClosingImageFilterTestUnsafe - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{Baseline/itkBinaryMorphologicalClosingImageFilterTestUnsafe.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryMorphologicalClosingImageFilterTestUnsafe.png - itkBinaryMorphologicalClosingImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryMorphologicalClosingImageFilterTestUnsafe.png 40 0 200) -itk_add_test(NAME itkBinaryMorphologicalOpeningImageFilterTest - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{Baseline/itkBinaryMorphologicalOpeningImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryMorphologicalOpeningImageFilterTest.png - itkBinaryMorphologicalOpeningImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryMorphologicalOpeningImageFilterTest.png 8 150 200) -itk_add_test(NAME itkBinaryOpeningByReconstructionImageFilterTest - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{Baseline/itkBinaryOpeningByReconstructionImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryOpeningByReconstructionImageFilterTest.png - itkBinaryOpeningByReconstructionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1-bin.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryOpeningByReconstructionImageFilterTest.png 10 0 255 0) -itk_add_test(NAME itkBinaryThinningImageFilterTest - COMMAND ITKBinaryMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/BinaryThinningImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/BinaryThinningImageFilterTest.png - itkBinaryThinningImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Shapes.png} ${ITK_TEST_OUTPUT_DIR}/BinaryThinningImageFilterTest.png) +itk_add_test( + NAME + itkErodeObjectMorphologyImageFilterTest + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + itkErodeObjectMorphologyImageFilterTest) +itk_add_test( + NAME + itkBinaryClosingByReconstructionImageFilterTest + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkBinaryClosingByReconstructionImageFilterTest.png + "4eadd941a629c7b52f9aa1be048c854c" + itkBinaryClosingByReconstructionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1-bin.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryClosingByReconstructionImageFilterTest.png + 0 + 255 + 10) +itk_add_test( + NAME + itkBinaryDilateImageFilterTest + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + itkBinaryDilateImageFilterTest) +itk_add_test( + NAME + itkFastIncrementalBinaryDilateImageFilterTest + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + itkFastIncrementalBinaryDilateImageFilterTest) +itk_add_test( + NAME + itkBinaryDilateImageFilterTest-100-0-0 + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-100-0-0.png + "6fd97580a84c71b381d220b132b1335a" + itkBinaryDilateImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-100-0-0.png + 100 + 0 + 0 + 10) +itk_add_test( + NAME + itkBinaryDilateImageFilterTest-100-0-1 + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryDilateImageFilterTest-100-0-1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-100-0-1.png + itkBinaryDilateImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-100-0-1.png + 100 + 0 + 1 + 10) +itk_add_test( + NAME + itkBinaryDilateImageFilterTest-100-150-0 + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryDilateImageFilterTest-100-150-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-100-150-0.png + itkBinaryDilateImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-100-150-0.png + 100 + 150 + 0 + 10) +itk_add_test( + NAME + itkBinaryDilateImageFilterTest-100-150-1 + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryDilateImageFilterTest-100-150-1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-100-150-1.png + itkBinaryDilateImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-100-150-1.png + 100 + 150 + 1 + 10) +itk_add_test( + NAME + itkBinaryDilateImageFilterTest-200-0-0 + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryDilateImageFilterTest-200-0-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-200-0-0.png + itkBinaryDilateImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-200-0-0.png + 200 + 0 + 0 + 10) +itk_add_test( + NAME + itkBinaryDilateImageFilterTest-200-0-1 + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryDilateImageFilterTest-200-0-1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-200-0-1.png + itkBinaryDilateImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-200-0-1.png + 200 + 0 + 1 + 10) +itk_add_test( + NAME + itkBinaryDilateImageFilterTest-200-150-0 + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryDilateImageFilterTest-200-150-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-200-150-0.png + itkBinaryDilateImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-200-150-0.png + 200 + 150 + 0 + 10) +itk_add_test( + NAME + itkBinaryDilateImageFilterTest-200-150-1 + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryDilateImageFilterTest-200-150-1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-200-150-1.png + itkBinaryDilateImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryDilateImageFilterTest-200-150-1.png + 200 + 150 + 1 + 10) +itk_add_test( + NAME + itkBinaryErodeImageFilterTest + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + itkBinaryErodeImageFilterTest) +itk_add_test( + NAME + itkBinaryErodeImageFilterTest-100-0-0 + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryErodeImageFilterTest-100-0-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-100-0-0.png + itkBinaryErodeImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-100-0-0.png + 100 + 0 + 0 + 10) +itk_add_test( + NAME + itkBinaryErodeImageFilterTest-100-0-1 + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryErodeImageFilterTest-100-0-1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-100-0-1.png + itkBinaryErodeImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-100-0-1.png + 100 + 0 + 1 + 10) +itk_add_test( + NAME + itkBinaryErodeImageFilterTest-100-150-0 + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryErodeImageFilterTest-100-150-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-100-150-0.png + itkBinaryErodeImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-100-150-0.png + 100 + 150 + 0 + 10) +itk_add_test( + NAME + itkBinaryErodeImageFilterTest-100-150-1 + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryErodeImageFilterTest-100-150-1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-100-150-1.png + itkBinaryErodeImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-100-150-1.png + 100 + 150 + 1 + 10) +itk_add_test( + NAME + itkBinaryErodeImageFilterTest-200-0-0 + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryErodeImageFilterTest-200-0-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-200-0-0.png + itkBinaryErodeImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-200-0-0.png + 200 + 0 + 0 + 10) +itk_add_test( + NAME + itkBinaryErodeImageFilterTest-200-0-1 + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryErodeImageFilterTest-200-0-1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-200-0-1.png + itkBinaryErodeImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-200-0-1.png + 200 + 0 + 1 + 10) +itk_add_test( + NAME + itkBinaryErodeImageFilterTest-200-150-0 + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryErodeImageFilterTest-200-150-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-200-150-0.png + itkBinaryErodeImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-200-150-0.png + 200 + 150 + 0 + 10) +itk_add_test( + NAME + itkBinaryErodeImageFilterTest-200-150-1 + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBinaryErodeImageFilterTest-200-150-1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-200-150-1.png + itkBinaryErodeImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryErodeImageFilterTest-200-150-1.png + 200 + 150 + 1 + 10) +itk_add_test( + NAME + itkBinaryMorphologicalClosingImageFilterTest + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{Baseline/itkBinaryMorphologicalClosingImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryMorphologicalClosingImageFilterTest.png + itkBinaryMorphologicalClosingImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryMorphologicalClosingImageFilterTest.png + 40 + 1 + 200) +itk_add_test( + NAME + itkBinaryMorphologicalClosingImageFilterTestUnsafe + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{Baseline/itkBinaryMorphologicalClosingImageFilterTestUnsafe.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryMorphologicalClosingImageFilterTestUnsafe.png + itkBinaryMorphologicalClosingImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryMorphologicalClosingImageFilterTestUnsafe.png + 40 + 0 + 200) +itk_add_test( + NAME + itkBinaryMorphologicalOpeningImageFilterTest + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{Baseline/itkBinaryMorphologicalOpeningImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryMorphologicalOpeningImageFilterTest.png + itkBinaryMorphologicalOpeningImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryMorphologicalOpeningImageFilterTest.png + 8 + 150 + 200) +itk_add_test( + NAME + itkBinaryOpeningByReconstructionImageFilterTest + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{Baseline/itkBinaryOpeningByReconstructionImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryOpeningByReconstructionImageFilterTest.png + itkBinaryOpeningByReconstructionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1-bin.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryOpeningByReconstructionImageFilterTest.png + 10 + 0 + 255 + 0) +itk_add_test( + NAME + itkBinaryThinningImageFilterTest + COMMAND + ITKBinaryMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/BinaryThinningImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/BinaryThinningImageFilterTest.png + itkBinaryThinningImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Shapes.png} + ${ITK_TEST_OUTPUT_DIR}/BinaryThinningImageFilterTest.png) diff --git a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryClosingByReconstructionImageFilter.wrap b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryClosingByReconstructionImageFilter.wrap index e5e0e4ef147..0158574500d 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryClosingByReconstructionImageFilter.wrap +++ b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryClosingByReconstructionImageFilter.wrap @@ -1,9 +1,9 @@ itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::BinaryClosingByReconstructionImageFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(d ${restricted_dims}) - foreach(t ${WRAP_ITK_USIGN_INT}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +itk_wrap_filter_dims(restricted_dims 2+) +foreach(d ${restricted_dims}) + foreach(t ${WRAP_ITK_USIGN_INT}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryDilateImageFilter.wrap b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryDilateImageFilter.wrap index f0fbbb9c772..12705bad7f8 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryDilateImageFilter.wrap +++ b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryDilateImageFilter.wrap @@ -1,8 +1,9 @@ itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::BinaryDilateImageFilter" POINTER_WITH_SUPERCLASS) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryErodeImageFilter.wrap b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryErodeImageFilter.wrap index 3a84b2e2b83..30cdb1c9862 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryErodeImageFilter.wrap +++ b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryErodeImageFilter.wrap @@ -1,8 +1,9 @@ itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::BinaryErodeImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryMorphologicalClosingImageFilter.wrap b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryMorphologicalClosingImageFilter.wrap index 13a26c8d61a..bb5f20d3a5f 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryMorphologicalClosingImageFilter.wrap +++ b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryMorphologicalClosingImageFilter.wrap @@ -1,8 +1,8 @@ itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::BinaryMorphologicalClosingImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}SE${d}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}SE${d}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryMorphologicalOpeningImageFilter.wrap b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryMorphologicalOpeningImageFilter.wrap index 65ab3540848..93b51992043 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryMorphologicalOpeningImageFilter.wrap +++ b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryMorphologicalOpeningImageFilter.wrap @@ -1,8 +1,8 @@ itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::BinaryMorphologicalOpeningImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}SE${d}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}SE${d}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryOpeningByReconstructionImageFilter.wrap b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryOpeningByReconstructionImageFilter.wrap index d8e5597ff2a..36564c6d46b 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryOpeningByReconstructionImageFilter.wrap +++ b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryOpeningByReconstructionImageFilter.wrap @@ -1,9 +1,9 @@ itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::BinaryOpeningByReconstructionImageFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(d ${restricted_dims}) - foreach(t ${WRAP_ITK_USIGN_INT}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +itk_wrap_filter_dims(restricted_dims 2+) +foreach(d ${restricted_dims}) + foreach(t ${WRAP_ITK_USIGN_INT}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryPruningImageFilter.wrap b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryPruningImageFilter.wrap index 89fd24aa9e3..b0b8776249f 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryPruningImageFilter.wrap +++ b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryPruningImageFilter.wrap @@ -1,4 +1,4 @@ itk_wrap_class("itk::BinaryPruningImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2) +itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2) itk_end_wrap_class() diff --git a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryThinningImageFilter.wrap b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryThinningImageFilter.wrap index 942cef7ee84..aafc682ecfe 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryThinningImageFilter.wrap +++ b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkBinaryThinningImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::BinaryThinningImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2 2) - itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2 2) - # itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2) +itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2 2) +itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2 2) +# itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2) itk_end_wrap_class() diff --git a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkDilateObjectMorphologyImageFilter.wrap b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkDilateObjectMorphologyImageFilter.wrap index 50e8890d515..e3895cae809 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkDilateObjectMorphologyImageFilter.wrap +++ b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkDilateObjectMorphologyImageFilter.wrap @@ -1,8 +1,9 @@ itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::DilateObjectMorphologyImageFilter" POINTER_WITH_SUPERCLASS) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkErodeObjectMorphologyImageFilter.wrap b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkErodeObjectMorphologyImageFilter.wrap index 3069ffb2e7e..a171b5f9dc5 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkErodeObjectMorphologyImageFilter.wrap +++ b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/itkErodeObjectMorphologyImageFilter.wrap @@ -1,8 +1,9 @@ itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::ErodeObjectMorphologyImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/test/CMakeLists.txt b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/test/CMakeLists.txt index 4d5a30287d2..d01498d0192 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/BinaryMathematicalMorphology/wrapping/test/CMakeLists.txt @@ -1,21 +1,34 @@ # some tests will fail if dim=2 and unsigned short are not wrapped -list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) -if(ITK_WRAP_PYTHON AND ITK_WRAP_unsigned_char AND wrap_2_index GREATER -1) - itk_python_add_test(NAME PythonBinaryDilateImageFilterTest +list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) +if(ITK_WRAP_PYTHON + AND ITK_WRAP_unsigned_char + AND wrap_2_index GREATER -1) + itk_python_add_test( + NAME + PythonBinaryDilateImageFilterTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonBinaryDilateImageFilterTest.png DATA{Baseline/PythonBinaryDilateImageFilterTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/BinaryDilateImageFilterTest.py + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonBinaryDilateImageFilterTest.png + DATA{Baseline/PythonBinaryDilateImageFilterTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/BinaryDilateImageFilterTest.py DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/PythonBinaryDilateImageFilterTest.png - 5 - ) - itk_python_add_test(NAME PythonBinaryErodeImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/PythonBinaryDilateImageFilterTest.png + 5) + itk_python_add_test( + NAME + PythonBinaryErodeImageFilterTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonBinaryErodeImageFilterTest.png - DATA{Baseline/PythonBinaryErodeImageFilterTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/BinaryErodeImageFilterTest.py + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonBinaryErodeImageFilterTest.png + DATA{Baseline/PythonBinaryErodeImageFilterTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/BinaryErodeImageFilterTest.py DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/PythonBinaryErodeImageFilterTest.png - 5 - ) + ${ITK_TEST_OUTPUT_DIR}/PythonBinaryErodeImageFilterTest.png + 5) endif() diff --git a/Modules/Filtering/Colormap/itk-module.cmake b/Modules/Filtering/Colormap/itk-module.cmake index 7df9574c2b2..243c7d95494 100644 --- a/Modules/Filtering/Colormap/itk-module.cmake +++ b/Modules/Filtering/Colormap/itk-module.cmake @@ -1,12 +1,12 @@ set(DOCUMENTATION "This module contains filter/functions for converting grayscale images to colormapped RGB images.") -itk_module(ITKColormap +itk_module( + ITKColormap ENABLE_SHARED COMPILE_DEPENDS - ITKCommon + ITKCommon TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/Colormap/src/CMakeLists.txt b/Modules/Filtering/Colormap/src/CMakeLists.txt index 8e422b15d34..f65b2372094 100644 --- a/Modules/Filtering/Colormap/src/CMakeLists.txt +++ b/Modules/Filtering/Colormap/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKColormap_SRCS - itkScalarToRGBColormapImageFilter.cxx - ) +set(ITKColormap_SRCS itkScalarToRGBColormapImageFilter.cxx) itk_module_add_library(ITKColormap ${ITKColormap_SRCS}) diff --git a/Modules/Filtering/Colormap/test/CMakeLists.txt b/Modules/Filtering/Colormap/test/CMakeLists.txt index 8c708764cdd..b4c17707b4c 100644 --- a/Modules/Filtering/Colormap/test/CMakeLists.txt +++ b/Modules/Filtering/Colormap/test/CMakeLists.txt @@ -1,91 +1,183 @@ itk_module_test() -set(ITKColormapTests -itkCustomColormapFunctionTest.cxx -itkScalarToRGBColormapImageFilterTest.cxx -) +set(ITKColormapTests itkCustomColormapFunctionTest.cxx itkScalarToRGBColormapImageFilterTest.cxx) -CreateTestDriver(ITKColormap "${ITKColormap-Test_LIBRARIES}" "${ITKColormapTests}") +createtestdriver(ITKColormap "${ITKColormap-Test_LIBRARIES}" "${ITKColormapTests}") -itk_add_test(NAME itkCustomColormapFunctionTest - COMMAND ITKColormapTestDriver - itkCustomColormapFunctionTest - DATA{Input/bone.txt} 106) +itk_add_test( + NAME + itkCustomColormapFunctionTest + COMMAND + ITKColormapTestDriver + itkCustomColormapFunctionTest + DATA{Input/bone.txt} + 106) -itk_add_test(NAME RGBColormapTest_red - COMMAND ITKColormapTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_red.png - DATA{Baseline/RGBColormapTest_red.png} - itkScalarToRGBColormapImageFilterTest - DATA{Input/Colormap_Grey.png} ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_red.png red 1) -itk_add_test(NAME RGBColormapTest_green - COMMAND ITKColormapTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_green.png - DATA{Baseline/RGBColormapTest_green.png} - itkScalarToRGBColormapImageFilterTest - DATA{Input/Colormap_Grey.png} ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_green.png green 1) -itk_add_test(NAME RGBColormapTest_blue - COMMAND ITKColormapTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_blue.png - DATA{Baseline/RGBColormapTest_blue.png} - itkScalarToRGBColormapImageFilterTest - DATA{Input/Colormap_Grey.png} ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_blue.png blue 1) -itk_add_test(NAME RGBColormapTest_hot - COMMAND ITKColormapTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_hot.png - DATA{Baseline/RGBColormapTest_hot.png} - itkScalarToRGBColormapImageFilterTest - DATA{Input/Colormap_Grey.png} ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_hot.png hot 1) -itk_add_test(NAME RGBColormapTest_cool - COMMAND ITKColormapTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_cool.png - DATA{Baseline/RGBColormapTest_cool.png} - itkScalarToRGBColormapImageFilterTest - DATA{Input/Colormap_Grey.png} ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_cool.png cool 1) -itk_add_test(NAME RGBColormapTest_spring - COMMAND ITKColormapTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_spring.png - DATA{Baseline/RGBColormapTest_spring.png} - itkScalarToRGBColormapImageFilterTest - DATA{Input/Colormap_Grey.png} ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_spring.png spring 1) -itk_add_test(NAME RGBColormapTest_summer - COMMAND ITKColormapTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_summer.png - DATA{Baseline/RGBColormapTest_summer.png} - itkScalarToRGBColormapImageFilterTest - DATA{Input/Colormap_Grey.png} ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_summer.png summer 1) -itk_add_test(NAME RGBColormapTest_autumn - COMMAND ITKColormapTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_autumn.png - DATA{Baseline/RGBColormapTest_autumn.png} - itkScalarToRGBColormapImageFilterTest - DATA{Input/Colormap_Grey.png} ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_autumn.png autumn 1) -itk_add_test(NAME RGBColormapTest_winter - COMMAND ITKColormapTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_winter.png - DATA{Baseline/RGBColormapTest_winter.png} - itkScalarToRGBColormapImageFilterTest - DATA{Input/Colormap_Grey.png} ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_winter.png winter 1) -itk_add_test(NAME RGBColormapTest_copper - COMMAND ITKColormapTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_copper.png - DATA{Baseline/RGBColormapTest_copper.png} - itkScalarToRGBColormapImageFilterTest - DATA{Input/Colormap_Grey.png} ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_copper.png copper 1) -itk_add_test(NAME RGBColormapTest_hsv - COMMAND ITKColormapTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_hsv.png - DATA{Baseline/RGBColormapTest_hsv.png} - itkScalarToRGBColormapImageFilterTest - DATA{Input/Colormap_Grey.png} ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_hsv.png hsv 1) -itk_add_test(NAME RGBColormapTest_jet - COMMAND ITKColormapTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_jet.png - DATA{Baseline/RGBColormapTest_jet.png} - itkScalarToRGBColormapImageFilterTest - DATA{Input/Colormap_Grey.png} ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_jet.png jet 1) -itk_add_test(NAME RGBColormapTest_overunder - COMMAND ITKColormapTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_overunder.png - DATA{Baseline/RGBColormapTest_overunder.png} - itkScalarToRGBColormapImageFilterTest - DATA{Input/Colormap_Grey.png} ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_overunder.png overunder 1) +itk_add_test( + NAME + RGBColormapTest_red + COMMAND + ITKColormapTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_red.png + DATA{Baseline/RGBColormapTest_red.png} + itkScalarToRGBColormapImageFilterTest + DATA{Input/Colormap_Grey.png} + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_red.png + red + 1) +itk_add_test( + NAME + RGBColormapTest_green + COMMAND + ITKColormapTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_green.png + DATA{Baseline/RGBColormapTest_green.png} + itkScalarToRGBColormapImageFilterTest + DATA{Input/Colormap_Grey.png} + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_green.png + green + 1) +itk_add_test( + NAME + RGBColormapTest_blue + COMMAND + ITKColormapTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_blue.png + DATA{Baseline/RGBColormapTest_blue.png} + itkScalarToRGBColormapImageFilterTest + DATA{Input/Colormap_Grey.png} + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_blue.png + blue + 1) +itk_add_test( + NAME + RGBColormapTest_hot + COMMAND + ITKColormapTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_hot.png + DATA{Baseline/RGBColormapTest_hot.png} + itkScalarToRGBColormapImageFilterTest + DATA{Input/Colormap_Grey.png} + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_hot.png + hot + 1) +itk_add_test( + NAME + RGBColormapTest_cool + COMMAND + ITKColormapTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_cool.png + DATA{Baseline/RGBColormapTest_cool.png} + itkScalarToRGBColormapImageFilterTest + DATA{Input/Colormap_Grey.png} + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_cool.png + cool + 1) +itk_add_test( + NAME + RGBColormapTest_spring + COMMAND + ITKColormapTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_spring.png + DATA{Baseline/RGBColormapTest_spring.png} + itkScalarToRGBColormapImageFilterTest + DATA{Input/Colormap_Grey.png} + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_spring.png + spring + 1) +itk_add_test( + NAME + RGBColormapTest_summer + COMMAND + ITKColormapTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_summer.png + DATA{Baseline/RGBColormapTest_summer.png} + itkScalarToRGBColormapImageFilterTest + DATA{Input/Colormap_Grey.png} + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_summer.png + summer + 1) +itk_add_test( + NAME + RGBColormapTest_autumn + COMMAND + ITKColormapTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_autumn.png + DATA{Baseline/RGBColormapTest_autumn.png} + itkScalarToRGBColormapImageFilterTest + DATA{Input/Colormap_Grey.png} + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_autumn.png + autumn + 1) +itk_add_test( + NAME + RGBColormapTest_winter + COMMAND + ITKColormapTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_winter.png + DATA{Baseline/RGBColormapTest_winter.png} + itkScalarToRGBColormapImageFilterTest + DATA{Input/Colormap_Grey.png} + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_winter.png + winter + 1) +itk_add_test( + NAME + RGBColormapTest_copper + COMMAND + ITKColormapTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_copper.png + DATA{Baseline/RGBColormapTest_copper.png} + itkScalarToRGBColormapImageFilterTest + DATA{Input/Colormap_Grey.png} + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_copper.png + copper + 1) +itk_add_test( + NAME + RGBColormapTest_hsv + COMMAND + ITKColormapTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_hsv.png + DATA{Baseline/RGBColormapTest_hsv.png} + itkScalarToRGBColormapImageFilterTest + DATA{Input/Colormap_Grey.png} + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_hsv.png + hsv + 1) +itk_add_test( + NAME + RGBColormapTest_jet + COMMAND + ITKColormapTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_jet.png + DATA{Baseline/RGBColormapTest_jet.png} + itkScalarToRGBColormapImageFilterTest + DATA{Input/Colormap_Grey.png} + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_jet.png + jet + 1) +itk_add_test( + NAME + RGBColormapTest_overunder + COMMAND + ITKColormapTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_overunder.png + DATA{Baseline/RGBColormapTest_overunder.png} + itkScalarToRGBColormapImageFilterTest + DATA{Input/Colormap_Grey.png} + ${ITK_TEST_OUTPUT_DIR}/RGBColormapTest_overunder.png + overunder + 1) diff --git a/Modules/Filtering/Colormap/wrapping/itkColormapFunction.wrap b/Modules/Filtering/Colormap/wrapping/itkColormapFunction.wrap index ef316757802..f9d0f6a3649 100644 --- a/Modules/Filtering/Colormap/wrapping/itkColormapFunction.wrap +++ b/Modules/Filtering/Colormap/wrapping/itkColormapFunction.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::Function::ColormapFunction" POINTER) - foreach(d ${WRAP_ITK_RGB_PIXEL_TYPES}) - itk_wrap_template("${ITKM_${d}}RGBP${ITKM_${d}}" "${ITKT_${d}}, itk::RGBPixel< ${ITKT_${d}} >") - endforeach() - foreach(d ${WRAP_ITK_RGBA_PIXEL_TYPES}) - itk_wrap_template("${ITKM_${d}}RGBAP${ITKM_${d}}" "${ITKT_${d}}, itk::RGBAPixel< ${ITKT_${d}} >") - endforeach() +foreach(d ${WRAP_ITK_RGB_PIXEL_TYPES}) + itk_wrap_template("${ITKM_${d}}RGBP${ITKM_${d}}" "${ITKT_${d}}, itk::RGBPixel< ${ITKT_${d}} >") +endforeach() +foreach(d ${WRAP_ITK_RGBA_PIXEL_TYPES}) + itk_wrap_template("${ITKM_${d}}RGBAP${ITKM_${d}}" "${ITKT_${d}}, itk::RGBAPixel< ${ITKT_${d}} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Colormap/wrapping/itkCustomColormapFunction.wrap b/Modules/Filtering/Colormap/wrapping/itkCustomColormapFunction.wrap index 4930f9d0263..c79d5554676 100644 --- a/Modules/Filtering/Colormap/wrapping/itkCustomColormapFunction.wrap +++ b/Modules/Filtering/Colormap/wrapping/itkCustomColormapFunction.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::Function::CustomColormapFunction" POINTER) - foreach(d ${WRAP_ITK_RGB_PIXEL_TYPES}) - itk_wrap_template("${ITKM_${d}}RGBP${ITKM_${d}}" "${ITKT_${d}}, itk::RGBPixel< ${ITKT_${d}} >") - endforeach() - foreach(d ${WRAP_ITK_RGBA_PIXEL_TYPES}) - itk_wrap_template("${ITKM_${d}}RGBAP${ITKM_${d}}" "${ITKT_${d}}, itk::RGBAPixel< ${ITKT_${d}} >") - endforeach() +foreach(d ${WRAP_ITK_RGB_PIXEL_TYPES}) + itk_wrap_template("${ITKM_${d}}RGBP${ITKM_${d}}" "${ITKT_${d}}, itk::RGBPixel< ${ITKT_${d}} >") +endforeach() +foreach(d ${WRAP_ITK_RGBA_PIXEL_TYPES}) + itk_wrap_template("${ITKM_${d}}RGBAP${ITKM_${d}}" "${ITKT_${d}}, itk::RGBAPixel< ${ITKT_${d}} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Colormap/wrapping/itkScalarToRGBColormapImageFilter.wrap b/Modules/Filtering/Colormap/wrapping/itkScalarToRGBColormapImageFilter.wrap index c541154e0cf..199e90c5ac7 100644 --- a/Modules/Filtering/Colormap/wrapping/itkScalarToRGBColormapImageFilter.wrap +++ b/Modules/Filtering/Colormap/wrapping/itkScalarToRGBColormapImageFilter.wrap @@ -4,8 +4,8 @@ itk_wrap_include("itkScalarToRGBColormapImageFilter.h") itk_wrap_simple_class("itk::ScalarToRGBColormapImageFilterEnums") itk_wrap_class("itk::ScalarToRGBColormapImageFilter" POINTER) - # Wrap itk::IdentifierType to create colormaps from the output of watershed - # segmentations - UNIQUE(types "${ITKM_IT};${WRAP_ITK_SCALAR}") - itk_wrap_image_filter_combinations("${types}" "${WRAP_ITK_COLOR}") +# Wrap itk::IdentifierType to create colormaps from the output of watershed +# segmentations +unique(types "${ITKM_IT};${WRAP_ITK_SCALAR}") +itk_wrap_image_filter_combinations("${types}" "${WRAP_ITK_COLOR}") itk_end_wrap_class() diff --git a/Modules/Filtering/Convolution/itk-module.cmake b/Modules/Filtering/Convolution/itk-module.cmake index f54efa8a126..ba03a0c426d 100644 --- a/Modules/Filtering/Convolution/itk-module.cmake +++ b/Modules/Filtering/Convolution/itk-module.cmake @@ -1,17 +1,18 @@ -set(DOCUMENTATION "This module contains filters that convolve an image +set(DOCUMENTATION + "This module contains filters that convolve an image with a kernel. Convolution is a fundamental operation in many image analysis algorithms.") -itk_module(ITKConvolution +itk_module( + ITKConvolution ENABLE_SHARED DEPENDS - ITKFFT - ITKImageGrid - ITKImageIntensity - ITKThresholding + ITKFFT + ITKImageGrid + ITKImageIntensity + ITKThresholding TEST_DEPENDS - ITKTestKernel - ITKImageSources + ITKTestKernel + ITKImageSources DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/Convolution/src/CMakeLists.txt b/Modules/Filtering/Convolution/src/CMakeLists.txt index 74bdb2f9c7b..0899087a5db 100644 --- a/Modules/Filtering/Convolution/src/CMakeLists.txt +++ b/Modules/Filtering/Convolution/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKConvolution_SRCS - itkConvolutionImageFilterBase.cxx - ) +set(ITKConvolution_SRCS itkConvolutionImageFilterBase.cxx) itk_module_add_library(ITKConvolution ${ITKConvolution_SRCS}) diff --git a/Modules/Filtering/Convolution/test/CMakeLists.txt b/Modules/Filtering/Convolution/test/CMakeLists.txt index ab8a61597cc..d541d9965e1 100644 --- a/Modules/Filtering/Convolution/test/CMakeLists.txt +++ b/Modules/Filtering/Convolution/test/CMakeLists.txt @@ -1,171 +1,415 @@ itk_module_test() set(ITKConvolutionTests - itkConvolutionImageFilterTest.cxx - itkConvolutionImageFilterTestInt.cxx - itkConvolutionImageFilterDeltaFunctionTest.cxx - itkConvolutionImageFilterStreamingTest.cxx - itkConvolutionImageFilterSubregionTest.cxx - itkFFTConvolutionImageFilterTest.cxx - itkFFTConvolutionImageFilterTestInt.cxx - itkFFTConvolutionImageFilterDeltaFunctionTest.cxx - itkNormalizedCorrelationImageFilterTest.cxx - itkMaskedFFTNormalizedCorrelationImageFilterTest.cxx - itkFFTNormalizedCorrelationImageFilterTest.cxx -) + itkConvolutionImageFilterTest.cxx + itkConvolutionImageFilterTestInt.cxx + itkConvolutionImageFilterDeltaFunctionTest.cxx + itkConvolutionImageFilterStreamingTest.cxx + itkConvolutionImageFilterSubregionTest.cxx + itkFFTConvolutionImageFilterTest.cxx + itkFFTConvolutionImageFilterTestInt.cxx + itkFFTConvolutionImageFilterDeltaFunctionTest.cxx + itkNormalizedCorrelationImageFilterTest.cxx + itkMaskedFFTNormalizedCorrelationImageFilterTest.cxx + itkFFTNormalizedCorrelationImageFilterTest.cxx) -CreateTestDriver(ITKConvolution "${ITKConvolution-Test_LIBRARIES}" "${ITKConvolutionTests}") +createtestdriver(ITKConvolution "${ITKConvolution-Test_LIBRARIES}" "${ITKConvolutionTests}") -itk_add_test(NAME itkConvolutionImageFilterTestSobelX - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterTestSobelX.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTestSobelX.nrrd - itkConvolutionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/sobel_x.nii.gz} ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTestSobelX.nrrd) -itk_add_test(NAME itkConvolutionImageFilterTestSobelY - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterTestSobelY.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTestSobelY.nrrd - itkConvolutionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/sobel_y.nii.gz} ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTestSobelY.nrrd) -itk_add_test(NAME itkConvolutionImageFilterTest4x4Mean - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterTest4x4Mean.png} - ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest4x4Mean.png - itkConvolutionImageFilterTestInt DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{Input/4x4-constant.png} ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest4x4Mean.png 1 SAME) -itk_add_test(NAME itkConvolutionImageFilterTest4x5Mean - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterTest4x5Mean.png} - ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest4x5Mean.png - itkConvolutionImageFilterTestInt DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{Input/4x5-constant.png} ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest4x5Mean.png 1 SAME) -itk_add_test(NAME itkConvolutionImageFilterTest5x5Mean - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterTest5x5Mean.png} - ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest5x5Mean.png - itkConvolutionImageFilterTestInt DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/5x5-constant.png} ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest5x5Mean.png 1 SAME) -itk_add_test(NAME itkConvolutionImageFilterTest4x4MeanValidRegion - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterTest4x4MeanValidRegion.png} - ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest4x4MeanValidRegion.png - itkConvolutionImageFilterTestInt DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{Input/4x4-constant.png} ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest4x4MeanValidRegion.png 1 VALID) -itk_add_test(NAME itkConvolutionImageFilterTest4x5MeanValidRegion - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterTest4x5MeanValidRegion.png} - ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest4x5MeanValidRegion.png - itkConvolutionImageFilterTestInt DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{Input/4x5-constant.png} ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest4x5MeanValidRegion.png 1 VALID) -itk_add_test(NAME itkConvolutionImageFilterTest5x5MeanValidRegion - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterTest5x5MeanValidRegion.png} - ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest5x5MeanValidRegion.png - itkConvolutionImageFilterTestInt DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/5x5-constant.png} ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest5x5MeanValidRegion.png 1 VALID) -itk_add_test(NAME itkConvolutionImageFilterDeltaFunctionTest - COMMAND ITKConvolutionTestDriver - --compare DATA{${ITK_DATA_ROOT}/Input/level.png} - ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterDeltaFunctionTest.png - itkConvolutionImageFilterDeltaFunctionTest DATA{${ITK_DATA_ROOT}/Input/level.png} ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterDeltaFunctionTest.png) +itk_add_test( + NAME + itkConvolutionImageFilterTestSobelX + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterTestSobelX.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTestSobelX.nrrd + itkConvolutionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/sobel_x.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTestSobelX.nrrd) +itk_add_test( + NAME + itkConvolutionImageFilterTestSobelY + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterTestSobelY.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTestSobelY.nrrd + itkConvolutionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/sobel_y.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTestSobelY.nrrd) +itk_add_test( + NAME + itkConvolutionImageFilterTest4x4Mean + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterTest4x4Mean.png} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest4x4Mean.png + itkConvolutionImageFilterTestInt + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{Input/4x4-constant.png} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest4x4Mean.png + 1 + SAME) +itk_add_test( + NAME + itkConvolutionImageFilterTest4x5Mean + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterTest4x5Mean.png} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest4x5Mean.png + itkConvolutionImageFilterTestInt + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{Input/4x5-constant.png} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest4x5Mean.png + 1 + SAME) +itk_add_test( + NAME + itkConvolutionImageFilterTest5x5Mean + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterTest5x5Mean.png} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest5x5Mean.png + itkConvolutionImageFilterTestInt + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/5x5-constant.png} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest5x5Mean.png + 1 + SAME) +itk_add_test( + NAME + itkConvolutionImageFilterTest4x4MeanValidRegion + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterTest4x4MeanValidRegion.png} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest4x4MeanValidRegion.png + itkConvolutionImageFilterTestInt + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{Input/4x4-constant.png} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest4x4MeanValidRegion.png + 1 + VALID) +itk_add_test( + NAME + itkConvolutionImageFilterTest4x5MeanValidRegion + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterTest4x5MeanValidRegion.png} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest4x5MeanValidRegion.png + itkConvolutionImageFilterTestInt + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{Input/4x5-constant.png} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest4x5MeanValidRegion.png + 1 + VALID) +itk_add_test( + NAME + itkConvolutionImageFilterTest5x5MeanValidRegion + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterTest5x5MeanValidRegion.png} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest5x5MeanValidRegion.png + itkConvolutionImageFilterTestInt + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/5x5-constant.png} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterTest5x5MeanValidRegion.png + 1 + VALID) +itk_add_test( + NAME + itkConvolutionImageFilterDeltaFunctionTest + COMMAND + ITKConvolutionTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/level.png} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterDeltaFunctionTest.png + itkConvolutionImageFilterDeltaFunctionTest + DATA{${ITK_DATA_ROOT}/Input/level.png} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterDeltaFunctionTest.png) # FFT convolution tests -itk_add_test(NAME itkFFTConvolutionImageFilterTestSobelX - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkFFTConvolutionImageFilterTestSobelX.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelX.nrrd - itkFFTConvolutionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/sobel_x.nii.gz} ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelX.nrrd) -itk_add_test(NAME itkFFTConvolutionImageFilterTestSobelY - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkFFTConvolutionImageFilterTestSobelY.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelY.nrrd - itkFFTConvolutionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/sobel_y.nii.gz} ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelY.nrrd) -itk_add_test(NAME itkFFTConvolutionImageFilterTestSobelYPeriodic - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterTestSobelYPeriodic.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelYPeriodic.nrrd - itkFFTConvolutionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/sobel_y.nii.gz} ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelYPeriodic.nrrd 2 0 SAME PERIODIC) -itk_add_test(NAME itkFFTConvolutionImageFilterTestSobelXConstant - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterTestSobelXConstant.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelXConstant.nrrd - itkFFTConvolutionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/sobel_x.nii.gz} ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelXConstant.nrrd 2 0 SAME CONSTANT) -itk_add_test(NAME itkFFTConvolutionImageFilterTestSobelXZeroFluxNeumann - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterTestSobelXZeroFluxNeumann.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelXZeroFluxNeumann.nrrd - itkFFTConvolutionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/sobel_x.nii.gz} ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelXZeroFluxNeumann.nrrd 2 0 VALID ZEROFLUXNEUMANN) -itk_add_test(NAME itkFFTConvolutionImageFilterTest4x4Mean - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkFFTConvolutionImageFilterTest4x4Mean.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest4x4Mean.png - itkFFTConvolutionImageFilterTestInt DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{Input/4x4-constant.png} ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest4x4Mean.png 1 SAME) -itk_add_test(NAME itkFFTConvolutionImageFilterTest4x5Mean - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterTest4x5Mean.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest4x5Mean.png - itkFFTConvolutionImageFilterTestInt DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{Input/4x5-constant.png} ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest4x5Mean.png 1 SAME) -itk_add_test(NAME itkFFTConvolutionImageFilterTest5x5Mean - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterTest5x5Mean.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest5x5Mean.png - itkFFTConvolutionImageFilterTestInt DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/5x5-constant.png} ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest5x5Mean.png 1 SAME) -itk_add_test(NAME itkFFTConvolutionImageFilterTest4x4MeanValidRegion - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkFFTConvolutionImageFilterTest4x4MeanValidRegion.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest4x4MeanValidRegion.png - itkFFTConvolutionImageFilterTestInt DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{Input/4x4-constant.png} ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest4x4MeanValidRegion.png 1 VALID) -itk_add_test(NAME itkFFTConvolutionImageFilterTest4x5MeanValidRegion - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterTest4x5MeanValidRegion.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest4x5MeanValidRegion.png - itkFFTConvolutionImageFilterTestInt DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{Input/4x5-constant.png} ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest4x5MeanValidRegion.png 1 VALID) -itk_add_test(NAME itkFFTConvolutionImageFilterTest5x5MeanValidRegion - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterTest5x5MeanValidRegion.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest5x5MeanValidRegion.png - itkFFTConvolutionImageFilterTestInt DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/5x5-constant.png} ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest5x5MeanValidRegion.png 1 VALID) -itk_add_test(NAME itkFFTConvolutionImageFilterDeltaFunctionTest - COMMAND ITKConvolutionTestDriver - --compare DATA{${ITK_DATA_ROOT}/Input/level.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterDeltaFunctionTest.png - itkFFTConvolutionImageFilterDeltaFunctionTest DATA{${ITK_DATA_ROOT}/Input/level.png} ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterDeltaFunctionTest.png 5) +itk_add_test( + NAME + itkFFTConvolutionImageFilterTestSobelX + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkFFTConvolutionImageFilterTestSobelX.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelX.nrrd + itkFFTConvolutionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/sobel_x.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelX.nrrd) +itk_add_test( + NAME + itkFFTConvolutionImageFilterTestSobelY + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkFFTConvolutionImageFilterTestSobelY.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelY.nrrd + itkFFTConvolutionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/sobel_y.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelY.nrrd) +itk_add_test( + NAME + itkFFTConvolutionImageFilterTestSobelYPeriodic + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterTestSobelYPeriodic.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelYPeriodic.nrrd + itkFFTConvolutionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/sobel_y.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelYPeriodic.nrrd + 2 + 0 + SAME + PERIODIC) +itk_add_test( + NAME + itkFFTConvolutionImageFilterTestSobelXConstant + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterTestSobelXConstant.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelXConstant.nrrd + itkFFTConvolutionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/sobel_x.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelXConstant.nrrd + 2 + 0 + SAME + CONSTANT) +itk_add_test( + NAME + itkFFTConvolutionImageFilterTestSobelXZeroFluxNeumann + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterTestSobelXZeroFluxNeumann.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelXZeroFluxNeumann.nrrd + itkFFTConvolutionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/sobel_x.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTestSobelXZeroFluxNeumann.nrrd + 2 + 0 + VALID + ZEROFLUXNEUMANN) +itk_add_test( + NAME + itkFFTConvolutionImageFilterTest4x4Mean + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkFFTConvolutionImageFilterTest4x4Mean.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest4x4Mean.png + itkFFTConvolutionImageFilterTestInt + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{Input/4x4-constant.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest4x4Mean.png + 1 + SAME) +itk_add_test( + NAME + itkFFTConvolutionImageFilterTest4x5Mean + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterTest4x5Mean.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest4x5Mean.png + itkFFTConvolutionImageFilterTestInt + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{Input/4x5-constant.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest4x5Mean.png + 1 + SAME) +itk_add_test( + NAME + itkFFTConvolutionImageFilterTest5x5Mean + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterTest5x5Mean.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest5x5Mean.png + itkFFTConvolutionImageFilterTestInt + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/5x5-constant.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest5x5Mean.png + 1 + SAME) +itk_add_test( + NAME + itkFFTConvolutionImageFilterTest4x4MeanValidRegion + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkFFTConvolutionImageFilterTest4x4MeanValidRegion.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest4x4MeanValidRegion.png + itkFFTConvolutionImageFilterTestInt + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{Input/4x4-constant.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest4x4MeanValidRegion.png + 1 + VALID) +itk_add_test( + NAME + itkFFTConvolutionImageFilterTest4x5MeanValidRegion + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterTest4x5MeanValidRegion.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest4x5MeanValidRegion.png + itkFFTConvolutionImageFilterTestInt + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{Input/4x5-constant.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest4x5MeanValidRegion.png + 1 + VALID) +itk_add_test( + NAME + itkFFTConvolutionImageFilterTest5x5MeanValidRegion + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterTest5x5MeanValidRegion.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest5x5MeanValidRegion.png + itkFFTConvolutionImageFilterTestInt + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/5x5-constant.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterTest5x5MeanValidRegion.png + 1 + VALID) +itk_add_test( + NAME + itkFFTConvolutionImageFilterDeltaFunctionTest + COMMAND + ITKConvolutionTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/level.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterDeltaFunctionTest.png + itkFFTConvolutionImageFilterDeltaFunctionTest + DATA{${ITK_DATA_ROOT}/Input/level.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterDeltaFunctionTest.png + 5) # NCC tests -itk_add_test(NAME itkNormalizedCorrelationImageFilterTest - COMMAND ITKConvolutionTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/NormalizedCorrelationImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/NormalizedCorrelationImageFilterTest.png - itkNormalizedCorrelationImageFilterTest DATA{${ITK_DATA_ROOT}/Input/sf4.png} DATA{${ITK_DATA_ROOT}/Input/circle.png} ${ITK_TEST_OUTPUT_DIR}/NormalizedCorrelationImageFilterTest.png) +itk_add_test( + NAME + itkNormalizedCorrelationImageFilterTest + COMMAND + ITKConvolutionTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/NormalizedCorrelationImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/NormalizedCorrelationImageFilterTest.png + itkNormalizedCorrelationImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/sf4.png} + DATA{${ITK_DATA_ROOT}/Input/circle.png} + ${ITK_TEST_OUTPUT_DIR}/NormalizedCorrelationImageFilterTest.png) # Masked FFT NCC tests # Test with three different shapes -itk_add_test(NAME itkMaskedFFTNormalizedCorrelationImageFilterTest1 - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkMaskedFFTNormalizedCorrelationImageFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest1.png - itkMaskedFFTNormalizedCorrelationImageFilterTest DATA{Input/FixedRectangles.png} DATA{Input/MovingRectangles.png} ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest1.png 0.1 DATA{Input/FixedRectangleMask1.png} DATA{Input/MovingRectanglesMask.png}) -itk_add_test(NAME itkMaskedFFTNormalizedCorrelationImageFilterTest2 - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkMaskedFFTNormalizedCorrelationImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest2.png - itkMaskedFFTNormalizedCorrelationImageFilterTest DATA{Input/FixedRectangles.png} DATA{Input/MovingRectangles.png} ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest2.png 0.1 DATA{Input/FixedRectangleMask2.png} DATA{Input/MovingRectanglesMask.png}) -itk_add_test(NAME itkMaskedFFTNormalizedCorrelationImageFilterTest3 - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkMaskedFFTNormalizedCorrelationImageFilterTest3.png} - ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest3.png - itkMaskedFFTNormalizedCorrelationImageFilterTest DATA{Input/FixedRectangles.png} DATA{Input/MovingRectangles.png} ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest3.png 0.1 DATA{Input/FixedRectangleMask3.png} DATA{Input/MovingRectanglesMask.png}) +itk_add_test( + NAME + itkMaskedFFTNormalizedCorrelationImageFilterTest1 + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkMaskedFFTNormalizedCorrelationImageFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest1.png + itkMaskedFFTNormalizedCorrelationImageFilterTest + DATA{Input/FixedRectangles.png} + DATA{Input/MovingRectangles.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest1.png + 0.1 + DATA{Input/FixedRectangleMask1.png} + DATA{Input/MovingRectanglesMask.png}) +itk_add_test( + NAME + itkMaskedFFTNormalizedCorrelationImageFilterTest2 + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkMaskedFFTNormalizedCorrelationImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest2.png + itkMaskedFFTNormalizedCorrelationImageFilterTest + DATA{Input/FixedRectangles.png} + DATA{Input/MovingRectangles.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest2.png + 0.1 + DATA{Input/FixedRectangleMask2.png} + DATA{Input/MovingRectanglesMask.png}) +itk_add_test( + NAME + itkMaskedFFTNormalizedCorrelationImageFilterTest3 + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkMaskedFFTNormalizedCorrelationImageFilterTest3.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest3.png + itkMaskedFFTNormalizedCorrelationImageFilterTest + DATA{Input/FixedRectangles.png} + DATA{Input/MovingRectangles.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest3.png + 0.1 + DATA{Input/FixedRectangleMask3.png} + DATA{Input/MovingRectanglesMask.png}) # Test with different size images -itk_add_test(NAME itkMaskedFFTNormalizedCorrelationImageFilterTest4 - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkMaskedFFTNormalizedCorrelationImageFilterTest4.png} - ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest4.png - itkMaskedFFTNormalizedCorrelationImageFilterTest DATA{Input/FixedRectangles.png} DATA{Input/MovingRectanglesCropped.png} ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest4.png 0.1 DATA{Input/FixedRectangleMask3.png}) +itk_add_test( + NAME + itkMaskedFFTNormalizedCorrelationImageFilterTest4 + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkMaskedFFTNormalizedCorrelationImageFilterTest4.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest4.png + itkMaskedFFTNormalizedCorrelationImageFilterTest + DATA{Input/FixedRectangles.png} + DATA{Input/MovingRectanglesCropped.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest4.png + 0.1 + DATA{Input/FixedRectangleMask3.png}) # Test with not passing the fixed mask or moving mask. # Also test with requiring no minimum overlapping pixels. This leads to more noise on the borders. -itk_add_test(NAME itkMaskedFFTNormalizedCorrelationImageFilterTest5 - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkMaskedFFTNormalizedCorrelationImageFilterTest5.png} - ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest5.png - itkMaskedFFTNormalizedCorrelationImageFilterTest DATA{Input/FixedRectangles.png} DATA{Input/MovingRectangles.png} ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest5.png 0) +itk_add_test( + NAME + itkMaskedFFTNormalizedCorrelationImageFilterTest5 + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkMaskedFFTNormalizedCorrelationImageFilterTest5.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest5.png + itkMaskedFFTNormalizedCorrelationImageFilterTest + DATA{Input/FixedRectangles.png} + DATA{Input/MovingRectangles.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest5.png + 0) # Test with not passing the moving mask. This should be the same as Test3 since the moving mask was set to all ones. -itk_add_test(NAME itkMaskedFFTNormalizedCorrelationImageFilterTest6 - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkMaskedFFTNormalizedCorrelationImageFilterTest3.png} - ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest6.png - itkMaskedFFTNormalizedCorrelationImageFilterTest DATA{Input/FixedRectangles.png} DATA{Input/MovingRectangles.png} ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest6.png 0.1 DATA{Input/FixedRectangleMask3.png}) +itk_add_test( + NAME + itkMaskedFFTNormalizedCorrelationImageFilterTest6 + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkMaskedFFTNormalizedCorrelationImageFilterTest3.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest6.png + itkMaskedFFTNormalizedCorrelationImageFilterTest + DATA{Input/FixedRectangles.png} + DATA{Input/MovingRectangles.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaskedFFTNormalizedCorrelationImageFilterTest6.png + 0.1 + DATA{Input/FixedRectangleMask3.png}) # Standard FFT NCC tests # Test with three different shapes. @@ -174,152 +418,258 @@ itk_add_test(NAME itkMaskedFFTNormalizedCorrelationImageFilterTest6 # Thus, the output of masking first and then correlation can be directly compared with masked correlation. # It is clear from the resulting images that these results are different and that masked correlation # outputs the correct results. -itk_add_test(NAME itkFFTNormalizedCorrelationImageFilterTest1 - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkFFTNormalizedCorrelationImageFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest1.png - itkFFTNormalizedCorrelationImageFilterTest DATA{Input/FixedRectangle1.png} DATA{Input/MovingRectangles.png} ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest1.png 0.1) -itk_add_test(NAME itkFFTNormalizedCorrelationImageFilterTest2 - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkFFTNormalizedCorrelationImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest2.png - itkFFTNormalizedCorrelationImageFilterTest DATA{Input/FixedRectangle2.png} DATA{Input/MovingRectangles.png} ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest2.png 0.1) -itk_add_test(NAME itkFFTNormalizedCorrelationImageFilterTest3 - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkFFTNormalizedCorrelationImageFilterTest3.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest3.png - itkFFTNormalizedCorrelationImageFilterTest DATA{Input/FixedRectangle3.png} DATA{Input/MovingRectangles.png} ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest3.png 0.1) +itk_add_test( + NAME + itkFFTNormalizedCorrelationImageFilterTest1 + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkFFTNormalizedCorrelationImageFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest1.png + itkFFTNormalizedCorrelationImageFilterTest + DATA{Input/FixedRectangle1.png} + DATA{Input/MovingRectangles.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest1.png + 0.1) +itk_add_test( + NAME + itkFFTNormalizedCorrelationImageFilterTest2 + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkFFTNormalizedCorrelationImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest2.png + itkFFTNormalizedCorrelationImageFilterTest + DATA{Input/FixedRectangle2.png} + DATA{Input/MovingRectangles.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest2.png + 0.1) +itk_add_test( + NAME + itkFFTNormalizedCorrelationImageFilterTest3 + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkFFTNormalizedCorrelationImageFilterTest3.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest3.png + itkFFTNormalizedCorrelationImageFilterTest + DATA{Input/FixedRectangle3.png} + DATA{Input/MovingRectangles.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest3.png + 0.1) # Test with different size images -itk_add_test(NAME itkFFTNormalizedCorrelationImageFilterTest4 - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkFFTNormalizedCorrelationImageFilterTest4.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest4.png - itkMaskedFFTNormalizedCorrelationImageFilterTest DATA{Input/FixedRectangle3.png} DATA{Input/MovingRectanglesCropped.png} ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest4.png 0.1) +itk_add_test( + NAME + itkFFTNormalizedCorrelationImageFilterTest4 + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkFFTNormalizedCorrelationImageFilterTest4.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest4.png + itkMaskedFFTNormalizedCorrelationImageFilterTest + DATA{Input/FixedRectangle3.png} + DATA{Input/MovingRectanglesCropped.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest4.png + 0.1) # Test NCC of the original fixed and moving images, without masking the fixed image first. # The result should be the same as Test5 of MaskedFFTNormalizedCorrelation -itk_add_test(NAME itkFFTNormalizedCorrelationImageFilterTest5 - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkMaskedFFTNormalizedCorrelationImageFilterTest5.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest5.png - itkMaskedFFTNormalizedCorrelationImageFilterTest DATA{Input/FixedRectangles.png} DATA{Input/MovingRectangles.png} ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest5.png 0) +itk_add_test( + NAME + itkFFTNormalizedCorrelationImageFilterTest5 + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkMaskedFFTNormalizedCorrelationImageFilterTest5.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest5.png + itkMaskedFFTNormalizedCorrelationImageFilterTest + DATA{Input/FixedRectangles.png} + DATA{Input/MovingRectangles.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTNormalizedCorrelationImageFilterTest5.png + 0) # Test with subregion -itk_add_test(NAME itkConvolutionImageFilterSubregionTest - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterSubregionTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterSubregionTestOutput.mha - itkConvolutionImageFilterSubregionTest - spatial - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterSubregionTestOutput.mha - 50 50 150 150 - 0 - same - DATA{${ITK_DATA_ROOT}/Input/sobel_y.nii.gz} - ) -itk_add_test(NAME itkFFTConvolutionImageFilterSubregionTest - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterSubregionTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterSubregionTestOutput.mha - itkConvolutionImageFilterSubregionTest - frequency - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterSubregionTestOutput.mha - 50 50 150 150 - 0 - same - DATA{${ITK_DATA_ROOT}/Input/sobel_y.nii.gz} - ) -itk_add_test(NAME itkConvolutionImageFilterSubregionTest2 - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterSubregionTestOutput2.mha} - ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterSubregionTestOutput2.mha - itkConvolutionImageFilterSubregionTest - spatial - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterSubregionTestOutput2.mha - 2 3 150 180 - 0 - same - # with inline Gaussian kernel - ) -itk_add_test(NAME itkFFTConvolutionImageFilterSubregionTest2 - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterSubregionTestOutput2.mha} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterSubregionTestOutput2.mha - itkConvolutionImageFilterSubregionTest - frequency - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterSubregionTestOutput2.mha - 2 3 150 180 - 0 - same - # with inline Gaussian kernel - ) -itk_add_test(NAME itkFFTConvolutionImageFilterSubregionValidTest - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkFFTConvolutionImageFilterSubregionValidTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterSubregionValidTestOutput.mha - itkConvolutionImageFilterSubregionTest - frequency - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterSubregionValidTestOutput.mha - 25 25 200 200 - 0 - valid - # with inline Gaussian kernel - ) -itk_add_test(NAME itkFFTConvolutionImageFilterSubregionNormalizeTest - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkFFTConvolutionImageFilterSubregionNormalizeTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterSubregionNormalizeTestOutput.mha - itkConvolutionImageFilterSubregionTest - frequency - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterSubregionNormalizeTestOutput.mha - 0 0 250 250 - 1 - same - # with inline Gaussian kernel - ) -itk_add_test(NAME itkConvolutionImageFilterStreamingTest - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterStreamingTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterStreamingTestOutput.mha - itkConvolutionImageFilterStreamingTest - spatial - DATA{Input/cthead1.mha} - ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterStreamingTestOutput.mha - 50 75 150 150 - ) -itk_add_test(NAME itkFFTConvolutionImageFilterStreamingTest - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterStreamingTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterStreamingTestOutput.mha - itkConvolutionImageFilterStreamingTest - frequency - DATA{Input/cthead1.mha} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterStreamingTestOutput.mha - 50 75 150 150 - ) -itk_add_test(NAME itkConvolutionImageFilterStreamingValidTest - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterStreamingTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterStreamingTestOutput.mha - itkConvolutionImageFilterStreamingTest - spatial - DATA{Input/cthead1.mha} - ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterStreamingTestOutput.mha - 50 75 150 150 - valid # use only valid input region (no pad for kernel) - ) -itk_add_test(NAME itkFFTConvolutionImageFilterStreamingValidTest - COMMAND ITKConvolutionTestDriver - --compare DATA{Baseline/itkConvolutionImageFilterStreamingTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterStreamingTestOutput.mha - itkConvolutionImageFilterStreamingTest - frequency - DATA{Input/cthead1.mha} - ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterStreamingTestOutput.mha - 50 75 150 150 - valid # use only valid input region (no pad for kernel) - ) +itk_add_test( + NAME + itkConvolutionImageFilterSubregionTest + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterSubregionTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterSubregionTestOutput.mha + itkConvolutionImageFilterSubregionTest + spatial + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterSubregionTestOutput.mha + 50 + 50 + 150 + 150 + 0 + same + DATA{${ITK_DATA_ROOT}/Input/sobel_y.nii.gz}) +itk_add_test( + NAME + itkFFTConvolutionImageFilterSubregionTest + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterSubregionTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterSubregionTestOutput.mha + itkConvolutionImageFilterSubregionTest + frequency + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterSubregionTestOutput.mha + 50 + 50 + 150 + 150 + 0 + same + DATA{${ITK_DATA_ROOT}/Input/sobel_y.nii.gz}) +itk_add_test( + NAME + itkConvolutionImageFilterSubregionTest2 + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterSubregionTestOutput2.mha} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterSubregionTestOutput2.mha + itkConvolutionImageFilterSubregionTest + spatial + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterSubregionTestOutput2.mha + 2 + 3 + 150 + 180 + 0 + same + # with inline Gaussian kernel +) +itk_add_test( + NAME + itkFFTConvolutionImageFilterSubregionTest2 + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterSubregionTestOutput2.mha} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterSubregionTestOutput2.mha + itkConvolutionImageFilterSubregionTest + frequency + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterSubregionTestOutput2.mha + 2 + 3 + 150 + 180 + 0 + same + # with inline Gaussian kernel +) +itk_add_test( + NAME + itkFFTConvolutionImageFilterSubregionValidTest + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkFFTConvolutionImageFilterSubregionValidTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterSubregionValidTestOutput.mha + itkConvolutionImageFilterSubregionTest + frequency + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterSubregionValidTestOutput.mha + 25 + 25 + 200 + 200 + 0 + valid + # with inline Gaussian kernel +) +itk_add_test( + NAME + itkFFTConvolutionImageFilterSubregionNormalizeTest + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkFFTConvolutionImageFilterSubregionNormalizeTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterSubregionNormalizeTestOutput.mha + itkConvolutionImageFilterSubregionTest + frequency + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterSubregionNormalizeTestOutput.mha + 0 + 0 + 250 + 250 + 1 + same + # with inline Gaussian kernel +) +itk_add_test( + NAME + itkConvolutionImageFilterStreamingTest + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterStreamingTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterStreamingTestOutput.mha + itkConvolutionImageFilterStreamingTest + spatial + DATA{Input/cthead1.mha} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterStreamingTestOutput.mha + 50 + 75 + 150 + 150) +itk_add_test( + NAME + itkFFTConvolutionImageFilterStreamingTest + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterStreamingTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterStreamingTestOutput.mha + itkConvolutionImageFilterStreamingTest + frequency + DATA{Input/cthead1.mha} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterStreamingTestOutput.mha + 50 + 75 + 150 + 150) +itk_add_test( + NAME + itkConvolutionImageFilterStreamingValidTest + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterStreamingTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterStreamingTestOutput.mha + itkConvolutionImageFilterStreamingTest + spatial + DATA{Input/cthead1.mha} + ${ITK_TEST_OUTPUT_DIR}/itkConvolutionImageFilterStreamingTestOutput.mha + 50 + 75 + 150 + 150 + valid # use only valid input region (no pad for kernel) +) +itk_add_test( + NAME + itkFFTConvolutionImageFilterStreamingValidTest + COMMAND + ITKConvolutionTestDriver + --compare + DATA{Baseline/itkConvolutionImageFilterStreamingTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterStreamingTestOutput.mha + itkConvolutionImageFilterStreamingTest + frequency + DATA{Input/cthead1.mha} + ${ITK_TEST_OUTPUT_DIR}/itkFFTConvolutionImageFilterStreamingTestOutput.mha + 50 + 75 + 150 + 150 + valid # use only valid input region (no pad for kernel) +) diff --git a/Modules/Filtering/Convolution/wrapping/CMakeLists.txt b/Modules/Filtering/Convolution/wrapping/CMakeLists.txt index c6a87d55d6d..07772fb6a2e 100644 --- a/Modules/Filtering/Convolution/wrapping/CMakeLists.txt +++ b/Modules/Filtering/Convolution/wrapping/CMakeLists.txt @@ -1,5 +1,3 @@ itk_wrap_module(ITKConvolution) -set(WRAPPER_SUBMODULE_ORDER - itkConvolutionImageFilterBase -) +set(WRAPPER_SUBMODULE_ORDER itkConvolutionImageFilterBase) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Filtering/Convolution/wrapping/itkConvolutionImageFilter.wrap b/Modules/Filtering/Convolution/wrapping/itkConvolutionImageFilter.wrap index f41f7030a9d..e5633e0a934 100644 --- a/Modules/Filtering/Convolution/wrapping/itkConvolutionImageFilter.wrap +++ b/Modules/Filtering/Convolution/wrapping/itkConvolutionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ConvolutionImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/Convolution/wrapping/itkConvolutionImageFilterBase.wrap b/Modules/Filtering/Convolution/wrapping/itkConvolutionImageFilterBase.wrap index ed08f8c0f74..4475dd36295 100644 --- a/Modules/Filtering/Convolution/wrapping/itkConvolutionImageFilterBase.wrap +++ b/Modules/Filtering/Convolution/wrapping/itkConvolutionImageFilterBase.wrap @@ -4,5 +4,5 @@ itk_wrap_include("itkConvolutionImageFilterBase.h") itk_wrap_simple_class("itk::ConvolutionImageFilterBaseEnums") itk_wrap_class("itk::ConvolutionImageFilterBase" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/Convolution/wrapping/itkFFTConvolutionImageFilter.wrap b/Modules/Filtering/Convolution/wrapping/itkFFTConvolutionImageFilter.wrap index c594d916d23..5d19b051aea 100644 --- a/Modules/Filtering/Convolution/wrapping/itkFFTConvolutionImageFilter.wrap +++ b/Modules/Filtering/Convolution/wrapping/itkFFTConvolutionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::FFTConvolutionImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 "2;3;4") +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 "2;3;4") itk_end_wrap_class() diff --git a/Modules/Filtering/Convolution/wrapping/itkFFTNormalizedCorrelationImageFilter.wrap b/Modules/Filtering/Convolution/wrapping/itkFFTNormalizedCorrelationImageFilter.wrap index f17ec2d5432..8b7894c3b4e 100644 --- a/Modules/Filtering/Convolution/wrapping/itkFFTNormalizedCorrelationImageFilter.wrap +++ b/Modules/Filtering/Convolution/wrapping/itkFFTNormalizedCorrelationImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::FFTNormalizedCorrelationImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_REAL}" "2;3;4") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_REAL}" "2;3;4") itk_end_wrap_class() diff --git a/Modules/Filtering/Convolution/wrapping/itkMaskedFFTNormalizedCorrelationImageFilter.wrap b/Modules/Filtering/Convolution/wrapping/itkMaskedFFTNormalizedCorrelationImageFilter.wrap index b9a0137faab..5220656f5dd 100644 --- a/Modules/Filtering/Convolution/wrapping/itkMaskedFFTNormalizedCorrelationImageFilter.wrap +++ b/Modules/Filtering/Convolution/wrapping/itkMaskedFFTNormalizedCorrelationImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MaskedFFTNormalizedCorrelationImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_REAL}" "2;3;4") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_REAL}" "2;3;4") itk_end_wrap_class() diff --git a/Modules/Filtering/Convolution/wrapping/test/CMakeLists.txt b/Modules/Filtering/Convolution/wrapping/test/CMakeLists.txt index caeb7d38f88..c3fa99c17ba 100644 --- a/Modules/Filtering/Convolution/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/Convolution/wrapping/test/CMakeLists.txt @@ -1,9 +1,17 @@ -list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) -if(ITK_WRAP_PYTHON AND ITK_WRAP_float AND wrap_2_index GREATER -1) - itk_python_add_test(NAME PythonFFTConvolutionImageFilterTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/FFTConvolutionImageFilterTest.py - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - DATA{${ITK_DATA_ROOT}/Input/sobel_x.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/PythonFFTConvolutionImageFilterTest.nrrd - ) +list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) +if(ITK_WRAP_PYTHON + AND ITK_WRAP_float + AND wrap_2_index GREATER -1) + itk_python_add_test( + NAME + PythonFFTConvolutionImageFilterTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/FFTConvolutionImageFilterTest.py + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/sobel_x.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/PythonFFTConvolutionImageFilterTest.nrrd) endif() diff --git a/Modules/Filtering/CurvatureFlow/itk-module.cmake b/Modules/Filtering/CurvatureFlow/itk-module.cmake index b7f56318f57..25ee26e8553 100644 --- a/Modules/Filtering/CurvatureFlow/itk-module.cmake +++ b/Modules/Filtering/CurvatureFlow/itk-module.cmake @@ -1,17 +1,18 @@ -set(DOCUMENTATION "This module contains filters that implement variations of +set(DOCUMENTATION + "This module contains filters that implement variations of Curvature Flow. This is a technique that uses an iterative solution of partial differential equations to implement image denoising image filtering. These classes are typically used as edge-preserving smoothing filters. You may also find the \\\\ref ITKSmoothing and the \\\\ref ITKAnisotropicSmoothing useful as well.") -itk_module(ITKCurvatureFlow +itk_module( + ITKCurvatureFlow COMPILE_DEPENDS - ITKFiniteDifference - ITKImageFilterBase + ITKFiniteDifference + ITKImageFilterBase TEST_DEPENDS - ITKTestKernel - ITKIOVTK + ITKTestKernel + ITKIOVTK DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/CurvatureFlow/test/CMakeLists.txt b/Modules/Filtering/CurvatureFlow/test/CMakeLists.txt index 2c413e9ffad..2aec3d6f273 100644 --- a/Modules/Filtering/CurvatureFlow/test/CMakeLists.txt +++ b/Modules/Filtering/CurvatureFlow/test/CMakeLists.txt @@ -1,12 +1,18 @@ itk_module_test() -set(ITKCurvatureFlowTests -itkBinaryMinMaxCurvatureFlowImageFilterTest.cxx -itkCurvatureFlowTest.cxx -) +set(ITKCurvatureFlowTests itkBinaryMinMaxCurvatureFlowImageFilterTest.cxx itkCurvatureFlowTest.cxx) -CreateTestDriver(ITKCurvatureFlow "${ITKCurvatureFlow-Test_LIBRARIES}" "${ITKCurvatureFlowTests}") +createtestdriver(ITKCurvatureFlow "${ITKCurvatureFlow-Test_LIBRARIES}" "${ITKCurvatureFlowTests}") -itk_add_test(NAME itkBinaryMinMaxCurvatureFlowImageFilterTest - COMMAND ITKCurvatureFlowTestDriver itkBinaryMinMaxCurvatureFlowImageFilterTest) -itk_add_test(NAME itkCurvatureFlowTesti - COMMAND ITKCurvatureFlowTestDriver itkCurvatureFlowTest ${ITK_TEST_OUTPUT_DIR}/itkCurvatureFlowTest.vtk) +itk_add_test( + NAME + itkBinaryMinMaxCurvatureFlowImageFilterTest + COMMAND + ITKCurvatureFlowTestDriver + itkBinaryMinMaxCurvatureFlowImageFilterTest) +itk_add_test( + NAME + itkCurvatureFlowTesti + COMMAND + ITKCurvatureFlowTestDriver + itkCurvatureFlowTest + ${ITK_TEST_OUTPUT_DIR}/itkCurvatureFlowTest.vtk) diff --git a/Modules/Filtering/CurvatureFlow/wrapping/CMakeLists.txt b/Modules/Filtering/CurvatureFlow/wrapping/CMakeLists.txt index b3aae67f59a..e4aadfa6a2f 100644 --- a/Modules/Filtering/CurvatureFlow/wrapping/CMakeLists.txt +++ b/Modules/Filtering/CurvatureFlow/wrapping/CMakeLists.txt @@ -1,7 +1,4 @@ itk_wrap_module(ITKCurvatureFlow) -set(WRAPPER_SUBMODULE_ORDER - itkCurvatureFlowImageFilter - itkMinMaxCurvatureFlowImageFilter -) +set(WRAPPER_SUBMODULE_ORDER itkCurvatureFlowImageFilter itkMinMaxCurvatureFlowImageFilter) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Filtering/CurvatureFlow/wrapping/itkBinaryMinMaxCurvatureFlowImageFilter.wrap b/Modules/Filtering/CurvatureFlow/wrapping/itkBinaryMinMaxCurvatureFlowImageFilter.wrap index e6ce60a17f0..6afe3a93d20 100644 --- a/Modules/Filtering/CurvatureFlow/wrapping/itkBinaryMinMaxCurvatureFlowImageFilter.wrap +++ b/Modules/Filtering/CurvatureFlow/wrapping/itkBinaryMinMaxCurvatureFlowImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::BinaryMinMaxCurvatureFlowImageFilter" POINTER) - # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +# itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +# itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/CurvatureFlow/wrapping/itkCurvatureFlowImageFilter.wrap b/Modules/Filtering/CurvatureFlow/wrapping/itkCurvatureFlowImageFilter.wrap index 7ad8f68ba7d..ce6b49c4f37 100644 --- a/Modules/Filtering/CurvatureFlow/wrapping/itkCurvatureFlowImageFilter.wrap +++ b/Modules/Filtering/CurvatureFlow/wrapping/itkCurvatureFlowImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::CurvatureFlowImageFilter" POINTER) - # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +# itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +# itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/CurvatureFlow/wrapping/itkMinMaxCurvatureFlowImageFilter.wrap b/Modules/Filtering/CurvatureFlow/wrapping/itkMinMaxCurvatureFlowImageFilter.wrap index cebc1fefcca..597abc4a3af 100644 --- a/Modules/Filtering/CurvatureFlow/wrapping/itkMinMaxCurvatureFlowImageFilter.wrap +++ b/Modules/Filtering/CurvatureFlow/wrapping/itkMinMaxCurvatureFlowImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::MinMaxCurvatureFlowImageFilter" POINTER) - # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +# itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +# itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/CurvatureFlow/wrapping/test/CMakeLists.txt b/Modules/Filtering/CurvatureFlow/wrapping/test/CMakeLists.txt index 871fc8252ae..5c12ed07b09 100644 --- a/Modules/Filtering/CurvatureFlow/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/CurvatureFlow/wrapping/test/CMakeLists.txt @@ -1,9 +1,19 @@ -list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) -if(ITK_WRAP_PYTHON AND ITK_WRAP_float AND wrap_2_index GREATER -1) - itk_python_add_test(NAME PythonCurvatureFlowImageFilterTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/CurvatureFlowImageFilterTest.py - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/CurvatureFlowImageFilterTest.png - 5 0.125 1.0 - ) +list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) +if(ITK_WRAP_PYTHON + AND ITK_WRAP_float + AND wrap_2_index GREATER -1) + itk_python_add_test( + NAME + PythonCurvatureFlowImageFilterTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/CurvatureFlowImageFilterTest.py + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/CurvatureFlowImageFilterTest.png + 5 + 0.125 + 1.0) endif() diff --git a/Modules/Filtering/Deconvolution/itk-module.cmake b/Modules/Filtering/Deconvolution/itk-module.cmake index ce603f7a626..806dda12d53 100644 --- a/Modules/Filtering/Deconvolution/itk-module.cmake +++ b/Modules/Filtering/Deconvolution/itk-module.cmake @@ -1,12 +1,12 @@ set(DOCUMENTATION "This module contains filters that deconvolve images that have been blurred with a shift-invariant kernel.") -itk_module(ITKDeconvolution +itk_module( + ITKDeconvolution COMPILE_DEPENDS - ITKConvolution - ITKImageSources + ITKConvolution + ITKImageSources TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/Deconvolution/test/CMakeLists.txt b/Modules/Filtering/Deconvolution/test/CMakeLists.txt index 7a6f84f0705..2e36a4f642e 100644 --- a/Modules/Filtering/Deconvolution/test/CMakeLists.txt +++ b/Modules/Filtering/Deconvolution/test/CMakeLists.txt @@ -1,152 +1,208 @@ itk_module_test() set(ITKDeconvolutionTests - itkInverseDeconvolutionImageFilterTest.cxx - itkLandweberDeconvolutionImageFilterTest.cxx - itkProjectedIterativeDeconvolutionImageFilterTest.cxx - itkProjectedLandweberDeconvolutionImageFilterTest.cxx - itkRichardsonLucyDeconvolutionImageFilterTest.cxx - itkTikhonovDeconvolutionImageFilterTest.cxx - itkWienerDeconvolutionImageFilterTest.cxx - itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.cxx -) + itkInverseDeconvolutionImageFilterTest.cxx + itkLandweberDeconvolutionImageFilterTest.cxx + itkProjectedIterativeDeconvolutionImageFilterTest.cxx + itkProjectedLandweberDeconvolutionImageFilterTest.cxx + itkRichardsonLucyDeconvolutionImageFilterTest.cxx + itkTikhonovDeconvolutionImageFilterTest.cxx + itkWienerDeconvolutionImageFilterTest.cxx + itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.cxx) -CreateTestDriver(ITKDeconvolution "${ITKDeconvolution-Test_LIBRARIES}" "${ITKDeconvolutionTests}") +createtestdriver(ITKDeconvolution "${ITKDeconvolution-Test_LIBRARIES}" "${ITKDeconvolutionTests}") -itk_add_test(NAME itkRichardsonLucyDeconvolutionImageFilterGaussianKernelTest - COMMAND ITKDeconvolutionTestDriver - --compare DATA{Baseline/itkRichardsonLucyDeconvolutionImageFilterGaussianKernelTest.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkRichardsonLucyDeconvolutionImageFilterGaussianKernelTest.nrrd - --ignoreInputInformation - itkRichardsonLucyDeconvolutionImageFilterTest - DATA{Input/itkDeconvolutionImageFilterTestInput.png} - DATA{Input/itkDeconvolutionImageFilterTestKernel.png} - ${ITK_TEST_OUTPUT_DIR}/itkRichardsonLucyDeconvolutionImageFilterGaussianKernelTest.nrrd 1 -) -itk_add_test(NAME itkRichardsonLucyDeconvolutionImageFilterIrregularKernelTest - COMMAND ITKDeconvolutionTestDriver - --compare DATA{Baseline/itkRichardsonLucyDeconvolutionImageFilterIrregularKernelTest.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkRichardsonLucyDeconvolutionImageFilterIrregularKernelTest.nrrd - itkRichardsonLucyDeconvolutionImageFilterTest - DATA{Input/itkDeconvolutionImageFilterTestInput.png} - DATA{Input/itkDeconvolutionImageFilterTestKernelIrregular.tif} - ${ITK_TEST_OUTPUT_DIR}/itkRichardsonLucyDeconvolutionImageFilterIrregularKernelTest.nrrd 1 -) -itk_add_test(NAME itkRichardsonLucyDeconvolutionImageFilterNonNullImageOriginTest - COMMAND ITKDeconvolutionTestDriver - --compare DATA{Baseline/itkRichardsonLucyDeconvolutionImageFilterGaussianKernelNonNullImageOriginTest.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkRichardsonLucyDeconvolutionImageFilterNonNullImageOriginTest.nrrd - itkRichardsonLucyDeconvolutionImageFilterTest - DATA{Input/itkDeconvolutionImageFilterTestNonNullOriginInput.mha} - DATA{Input/itkDeconvolutionImageFilterTestKernel.png} - ${ITK_TEST_OUTPUT_DIR}/itkRichardsonLucyDeconvolutionImageFilterNonNullImageOriginTest.nrrd 1 -) -itk_add_test(NAME itkLandweberDeconvolutionImageFilterGaussianKernelTest - COMMAND ITKDeconvolutionTestDriver - --compare DATA{Baseline/itkLandweberDeconvolutionImageFilterGaussianKernelTest.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkLandweberDeconvolutionImageFilterGaussianKernelTest.nrrd - itkLandweberDeconvolutionImageFilterTest - DATA{Input/itkDeconvolutionImageFilterTestInput.png} - DATA{Input/itkDeconvolutionImageFilterTestKernel.png} - ${ITK_TEST_OUTPUT_DIR}/itkLandweberDeconvolutionImageFilterGaussianKernelTest.nrrd 1 2.0 -) -itk_add_test(NAME itkLandweberDeconvolutionImageFilterIrregularKernelTest - COMMAND ITKDeconvolutionTestDriver - --compare DATA{Baseline/itkLandweberDeconvolutionImageFilterIrregularKernelTest.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkLandweberDeconvolutionImageFilterIrregularKernelTest.nrrd - itkLandweberDeconvolutionImageFilterTest - DATA{Input/itkDeconvolutionImageFilterTestInput.png} - DATA{Input/itkDeconvolutionImageFilterTestKernelIrregular.tif} - ${ITK_TEST_OUTPUT_DIR}/itkLandweberDeconvolutionImageFilterIrregularKernelTest.nrrd 1 2.0 -) -itk_add_test(NAME itkProjectedIterativeDeconvolutionimageFilterTest - COMMAND ITKDeconvolutionTestDriver - itkProjectedIterativeDeconvolutionImageFilterTest -) -itk_add_test(NAME itkProjectedLandweberDeconvolutionImageFilterGaussianKernelTest - COMMAND ITKDeconvolutionTestDriver - --compare DATA{Baseline/itkProjectedLandweberDeconvolutionImageFilterGaussianKernelTest.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkProjectedLandweberDeconvolutionImageFilterGaussianKernelTest.nrrd - itkProjectedLandweberDeconvolutionImageFilterTest - DATA{Input/itkDeconvolutionImageFilterTestInput.png} - DATA{Input/itkDeconvolutionImageFilterTestKernel.png} - ${ITK_TEST_OUTPUT_DIR}/itkProjectedLandweberDeconvolutionImageFilterGaussianKernelTest.nrrd 1 2.0 -) -itk_add_test(NAME itkProjectedLandweberDeconvolutionImageFilterIrregularKernelTest - COMMAND ITKDeconvolutionTestDriver - --compare DATA{Baseline/itkProjectedLandweberDeconvolutionImageFilterIrregularKernelTest.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkProjectedLandweberDeconvolutionImageFilterIrregularKernelTest.nrrd - itkProjectedLandweberDeconvolutionImageFilterTest - DATA{Input/itkDeconvolutionImageFilterTestInput.png} - DATA{Input/itkDeconvolutionImageFilterTestKernelIrregular.tif} - ${ITK_TEST_OUTPUT_DIR}/itkProjectedLandweberDeconvolutionImageFilterIrregularKernelTest.nrrd 1 2.0 -) -itk_add_test(NAME itkInverseDeconvolutionImageFilterGaussianKernelTest - COMMAND ITKDeconvolutionTestDriver - --compare DATA{Baseline/itkInverseDeconvolutionImageFilterGaussianKernelTest.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkInverseDeconvolutionImageFilterGaussianKernelTest.nrrd - itkInverseDeconvolutionImageFilterTest - DATA{Input/itkDeconvolutionImageFilterTestInput.png} - DATA{Input/itkDeconvolutionImageFilterTestKernel.png} - ${ITK_TEST_OUTPUT_DIR}/itkInverseDeconvolutionImageFilterGaussianKernelTest.nrrd - 1 -) -itk_add_test(NAME itkInverseDeconvolutionImageFilterIrregularKernelTest - COMMAND ITKDeconvolutionTestDriver - --compare DATA{Baseline/itkInverseDeconvolutionImageFilterIrregularKernelTest.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkInverseDeconvolutionImageFilterIrregularKernelTest.nrrd - itkInverseDeconvolutionImageFilterTest - DATA{Input/itkDeconvolutionImageFilterTestInput.png} - DATA{Input/itkDeconvolutionImageFilterTestKernelIrregular.tif} - ${ITK_TEST_OUTPUT_DIR}/itkInverseDeconvolutionImageFilterIrregularKernelTest.nrrd - 1 -) -itk_add_test(NAME itkTikhonovDeconvolutionImageFilterGaussianKernelTest - COMMAND ITKDeconvolutionTestDriver - --compare DATA{Baseline/itkTikhonovDeconvolutionImageFilterGaussianKernelTest.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkTikhonovDeconvolutionImageFilterGaussianKernelTest.nrrd - itkTikhonovDeconvolutionImageFilterTest - DATA{Input/itkDeconvolutionImageFilterTestInput.png} - DATA{Input/itkDeconvolutionImageFilterTestKernel.png} - ${ITK_TEST_OUTPUT_DIR}/itkTikhonovDeconvolutionImageFilterGaussianKernelTest.nrrd - 1 -) -itk_add_test(NAME itkTikhonovDeconvolutionImageFilterIrregularKernelTest - COMMAND ITKDeconvolutionTestDriver - --compare DATA{Baseline/itkTikhonovDeconvolutionImageFilterIrregularKernelTest.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkTikhonovDeconvolutionImageFilterIrregularKernelTest.nrrd - itkTikhonovDeconvolutionImageFilterTest - DATA{Input/itkDeconvolutionImageFilterTestInput.png} - DATA{Input/itkDeconvolutionImageFilterTestKernelIrregular.tif} - ${ITK_TEST_OUTPUT_DIR}/itkTikhonovDeconvolutionImageFilterIrregularKernelTest.nrrd - 1 -) -itk_add_test(NAME itkWienerDeconvolutionImageFilterGaussianKernelTest - COMMAND ITKDeconvolutionTestDriver - --compare DATA{Baseline/itkWienerDeconvolutionImageFilterGaussianKernelTest.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkWienerDeconvolutionImageFilterGaussianKernelTest.nrrd - itkWienerDeconvolutionImageFilterTest - DATA{Input/itkDeconvolutionImageFilterTestInput.png} - DATA{Input/itkDeconvolutionImageFilterTestKernel.png} - ${ITK_TEST_OUTPUT_DIR}/itkWienerDeconvolutionImageFilterGaussianKernelTest.nrrd - 1 -) -itk_add_test(NAME itkWienerDeconvolutionImageFilterIrregularKernelTest - COMMAND ITKDeconvolutionTestDriver - --compare DATA{Baseline/itkWienerDeconvolutionImageFilterIrregularKernelTest.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkWienerDeconvolutionImageFilterIrregularKernelTest.nrrd - itkWienerDeconvolutionImageFilterTest - DATA{Input/itkDeconvolutionImageFilterTestInput.png} - DATA{Input/itkDeconvolutionImageFilterTestKernelIrregular.tif} - ${ITK_TEST_OUTPUT_DIR}/itkWienerDeconvolutionImageFilterIrregularKernelTest.nrrd - 1 -) -itk_add_test(NAME itkParametricBlindLeastSquaresDeconvolutionImageFilterTest - COMMAND ITKDeconvolutionTestDriver - --compare DATA{Baseline/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.nrrd - itkParametricBlindLeastSquaresDeconvolutionImageFilterTest - DATA{Input/itkDeconvolutionImageFilterTestInput.png} - ${ITK_TEST_OUTPUT_DIR}/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.nrrd - 1 1 0.5 - ${ITK_TEST_OUTPUT_DIR}/itkParametricBlindLeastSquaresDeconvolutionImageFilterTestInput.nrrd -) +itk_add_test( + NAME + itkRichardsonLucyDeconvolutionImageFilterGaussianKernelTest + COMMAND + ITKDeconvolutionTestDriver + --compare + DATA{Baseline/itkRichardsonLucyDeconvolutionImageFilterGaussianKernelTest.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkRichardsonLucyDeconvolutionImageFilterGaussianKernelTest.nrrd + --ignoreInputInformation + itkRichardsonLucyDeconvolutionImageFilterTest + DATA{Input/itkDeconvolutionImageFilterTestInput.png} + DATA{Input/itkDeconvolutionImageFilterTestKernel.png} + ${ITK_TEST_OUTPUT_DIR}/itkRichardsonLucyDeconvolutionImageFilterGaussianKernelTest.nrrd + 1) +itk_add_test( + NAME + itkRichardsonLucyDeconvolutionImageFilterIrregularKernelTest + COMMAND + ITKDeconvolutionTestDriver + --compare + DATA{Baseline/itkRichardsonLucyDeconvolutionImageFilterIrregularKernelTest.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkRichardsonLucyDeconvolutionImageFilterIrregularKernelTest.nrrd + itkRichardsonLucyDeconvolutionImageFilterTest + DATA{Input/itkDeconvolutionImageFilterTestInput.png} + DATA{Input/itkDeconvolutionImageFilterTestKernelIrregular.tif} + ${ITK_TEST_OUTPUT_DIR}/itkRichardsonLucyDeconvolutionImageFilterIrregularKernelTest.nrrd + 1) +itk_add_test( + NAME + itkRichardsonLucyDeconvolutionImageFilterNonNullImageOriginTest + COMMAND + ITKDeconvolutionTestDriver + --compare + DATA{Baseline/itkRichardsonLucyDeconvolutionImageFilterGaussianKernelNonNullImageOriginTest.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkRichardsonLucyDeconvolutionImageFilterNonNullImageOriginTest.nrrd + itkRichardsonLucyDeconvolutionImageFilterTest + DATA{Input/itkDeconvolutionImageFilterTestNonNullOriginInput.mha} + DATA{Input/itkDeconvolutionImageFilterTestKernel.png} + ${ITK_TEST_OUTPUT_DIR}/itkRichardsonLucyDeconvolutionImageFilterNonNullImageOriginTest.nrrd + 1) +itk_add_test( + NAME + itkLandweberDeconvolutionImageFilterGaussianKernelTest + COMMAND + ITKDeconvolutionTestDriver + --compare + DATA{Baseline/itkLandweberDeconvolutionImageFilterGaussianKernelTest.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkLandweberDeconvolutionImageFilterGaussianKernelTest.nrrd + itkLandweberDeconvolutionImageFilterTest + DATA{Input/itkDeconvolutionImageFilterTestInput.png} + DATA{Input/itkDeconvolutionImageFilterTestKernel.png} + ${ITK_TEST_OUTPUT_DIR}/itkLandweberDeconvolutionImageFilterGaussianKernelTest.nrrd + 1 + 2.0) +itk_add_test( + NAME + itkLandweberDeconvolutionImageFilterIrregularKernelTest + COMMAND + ITKDeconvolutionTestDriver + --compare + DATA{Baseline/itkLandweberDeconvolutionImageFilterIrregularKernelTest.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkLandweberDeconvolutionImageFilterIrregularKernelTest.nrrd + itkLandweberDeconvolutionImageFilterTest + DATA{Input/itkDeconvolutionImageFilterTestInput.png} + DATA{Input/itkDeconvolutionImageFilterTestKernelIrregular.tif} + ${ITK_TEST_OUTPUT_DIR}/itkLandweberDeconvolutionImageFilterIrregularKernelTest.nrrd + 1 + 2.0) +itk_add_test( + NAME + itkProjectedIterativeDeconvolutionimageFilterTest + COMMAND + ITKDeconvolutionTestDriver + itkProjectedIterativeDeconvolutionImageFilterTest) +itk_add_test( + NAME + itkProjectedLandweberDeconvolutionImageFilterGaussianKernelTest + COMMAND + ITKDeconvolutionTestDriver + --compare + DATA{Baseline/itkProjectedLandweberDeconvolutionImageFilterGaussianKernelTest.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkProjectedLandweberDeconvolutionImageFilterGaussianKernelTest.nrrd + itkProjectedLandweberDeconvolutionImageFilterTest + DATA{Input/itkDeconvolutionImageFilterTestInput.png} + DATA{Input/itkDeconvolutionImageFilterTestKernel.png} + ${ITK_TEST_OUTPUT_DIR}/itkProjectedLandweberDeconvolutionImageFilterGaussianKernelTest.nrrd + 1 + 2.0) +itk_add_test( + NAME + itkProjectedLandweberDeconvolutionImageFilterIrregularKernelTest + COMMAND + ITKDeconvolutionTestDriver + --compare + DATA{Baseline/itkProjectedLandweberDeconvolutionImageFilterIrregularKernelTest.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkProjectedLandweberDeconvolutionImageFilterIrregularKernelTest.nrrd + itkProjectedLandweberDeconvolutionImageFilterTest + DATA{Input/itkDeconvolutionImageFilterTestInput.png} + DATA{Input/itkDeconvolutionImageFilterTestKernelIrregular.tif} + ${ITK_TEST_OUTPUT_DIR}/itkProjectedLandweberDeconvolutionImageFilterIrregularKernelTest.nrrd + 1 + 2.0) +itk_add_test( + NAME + itkInverseDeconvolutionImageFilterGaussianKernelTest + COMMAND + ITKDeconvolutionTestDriver + --compare + DATA{Baseline/itkInverseDeconvolutionImageFilterGaussianKernelTest.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkInverseDeconvolutionImageFilterGaussianKernelTest.nrrd + itkInverseDeconvolutionImageFilterTest + DATA{Input/itkDeconvolutionImageFilterTestInput.png} + DATA{Input/itkDeconvolutionImageFilterTestKernel.png} + ${ITK_TEST_OUTPUT_DIR}/itkInverseDeconvolutionImageFilterGaussianKernelTest.nrrd + 1) +itk_add_test( + NAME + itkInverseDeconvolutionImageFilterIrregularKernelTest + COMMAND + ITKDeconvolutionTestDriver + --compare + DATA{Baseline/itkInverseDeconvolutionImageFilterIrregularKernelTest.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkInverseDeconvolutionImageFilterIrregularKernelTest.nrrd + itkInverseDeconvolutionImageFilterTest + DATA{Input/itkDeconvolutionImageFilterTestInput.png} + DATA{Input/itkDeconvolutionImageFilterTestKernelIrregular.tif} + ${ITK_TEST_OUTPUT_DIR}/itkInverseDeconvolutionImageFilterIrregularKernelTest.nrrd + 1) +itk_add_test( + NAME + itkTikhonovDeconvolutionImageFilterGaussianKernelTest + COMMAND + ITKDeconvolutionTestDriver + --compare + DATA{Baseline/itkTikhonovDeconvolutionImageFilterGaussianKernelTest.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkTikhonovDeconvolutionImageFilterGaussianKernelTest.nrrd + itkTikhonovDeconvolutionImageFilterTest + DATA{Input/itkDeconvolutionImageFilterTestInput.png} + DATA{Input/itkDeconvolutionImageFilterTestKernel.png} + ${ITK_TEST_OUTPUT_DIR}/itkTikhonovDeconvolutionImageFilterGaussianKernelTest.nrrd + 1) +itk_add_test( + NAME + itkTikhonovDeconvolutionImageFilterIrregularKernelTest + COMMAND + ITKDeconvolutionTestDriver + --compare + DATA{Baseline/itkTikhonovDeconvolutionImageFilterIrregularKernelTest.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkTikhonovDeconvolutionImageFilterIrregularKernelTest.nrrd + itkTikhonovDeconvolutionImageFilterTest + DATA{Input/itkDeconvolutionImageFilterTestInput.png} + DATA{Input/itkDeconvolutionImageFilterTestKernelIrregular.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTikhonovDeconvolutionImageFilterIrregularKernelTest.nrrd + 1) +itk_add_test( + NAME + itkWienerDeconvolutionImageFilterGaussianKernelTest + COMMAND + ITKDeconvolutionTestDriver + --compare + DATA{Baseline/itkWienerDeconvolutionImageFilterGaussianKernelTest.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkWienerDeconvolutionImageFilterGaussianKernelTest.nrrd + itkWienerDeconvolutionImageFilterTest + DATA{Input/itkDeconvolutionImageFilterTestInput.png} + DATA{Input/itkDeconvolutionImageFilterTestKernel.png} + ${ITK_TEST_OUTPUT_DIR}/itkWienerDeconvolutionImageFilterGaussianKernelTest.nrrd + 1) +itk_add_test( + NAME + itkWienerDeconvolutionImageFilterIrregularKernelTest + COMMAND + ITKDeconvolutionTestDriver + --compare + DATA{Baseline/itkWienerDeconvolutionImageFilterIrregularKernelTest.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkWienerDeconvolutionImageFilterIrregularKernelTest.nrrd + itkWienerDeconvolutionImageFilterTest + DATA{Input/itkDeconvolutionImageFilterTestInput.png} + DATA{Input/itkDeconvolutionImageFilterTestKernelIrregular.tif} + ${ITK_TEST_OUTPUT_DIR}/itkWienerDeconvolutionImageFilterIrregularKernelTest.nrrd + 1) +itk_add_test( + NAME + itkParametricBlindLeastSquaresDeconvolutionImageFilterTest + COMMAND + ITKDeconvolutionTestDriver + --compare + DATA{Baseline/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.nrrd + itkParametricBlindLeastSquaresDeconvolutionImageFilterTest + DATA{Input/itkDeconvolutionImageFilterTestInput.png} + ${ITK_TEST_OUTPUT_DIR}/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.nrrd + 1 + 1 + 0.5 + ${ITK_TEST_OUTPUT_DIR}/itkParametricBlindLeastSquaresDeconvolutionImageFilterTestInput.nrrd) diff --git a/Modules/Filtering/Deconvolution/wrapping/CMakeLists.txt b/Modules/Filtering/Deconvolution/wrapping/CMakeLists.txt index b9303756e6e..f2b580af4e3 100644 --- a/Modules/Filtering/Deconvolution/wrapping/CMakeLists.txt +++ b/Modules/Filtering/Deconvolution/wrapping/CMakeLists.txt @@ -1,5 +1,3 @@ itk_wrap_module(ITKDeconvolution) -set(WRAPPER_SUBMODULE_ORDER - itkIterativeDeconvolutionImageFilter -) +set(WRAPPER_SUBMODULE_ORDER itkIterativeDeconvolutionImageFilter) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Filtering/Deconvolution/wrapping/itkInverseDeconvolutionImageFilter.wrap b/Modules/Filtering/Deconvolution/wrapping/itkInverseDeconvolutionImageFilter.wrap index fc13db06d9f..8a57498ff3a 100644 --- a/Modules/Filtering/Deconvolution/wrapping/itkInverseDeconvolutionImageFilter.wrap +++ b/Modules/Filtering/Deconvolution/wrapping/itkInverseDeconvolutionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::InverseDeconvolutionImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 "2;3;4") +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 "2;3;4") itk_end_wrap_class() diff --git a/Modules/Filtering/Deconvolution/wrapping/itkIterativeDeconvolutionImageFilter.wrap b/Modules/Filtering/Deconvolution/wrapping/itkIterativeDeconvolutionImageFilter.wrap index 0ffa9218935..ea7267da82f 100644 --- a/Modules/Filtering/Deconvolution/wrapping/itkIterativeDeconvolutionImageFilter.wrap +++ b/Modules/Filtering/Deconvolution/wrapping/itkIterativeDeconvolutionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::IterativeDeconvolutionImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 "2;3;4") +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 "2;3;4") itk_end_wrap_class() diff --git a/Modules/Filtering/Deconvolution/wrapping/itkLandweberDeconvolutionImageFilter.wrap b/Modules/Filtering/Deconvolution/wrapping/itkLandweberDeconvolutionImageFilter.wrap index 88e92560b40..4c46e3cbdf2 100644 --- a/Modules/Filtering/Deconvolution/wrapping/itkLandweberDeconvolutionImageFilter.wrap +++ b/Modules/Filtering/Deconvolution/wrapping/itkLandweberDeconvolutionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::LandweberDeconvolutionImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 "2;3;4") +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 "2;3;4") itk_end_wrap_class() diff --git a/Modules/Filtering/Deconvolution/wrapping/itkProjectedLandweberDeconvolutionImageFilter.wrap b/Modules/Filtering/Deconvolution/wrapping/itkProjectedLandweberDeconvolutionImageFilter.wrap index 3ac5b7beadc..1a89f248442 100644 --- a/Modules/Filtering/Deconvolution/wrapping/itkProjectedLandweberDeconvolutionImageFilter.wrap +++ b/Modules/Filtering/Deconvolution/wrapping/itkProjectedLandweberDeconvolutionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ProjectedLandweberDeconvolutionImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 "2;3;4") +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 "2;3;4") itk_end_wrap_class() diff --git a/Modules/Filtering/Deconvolution/wrapping/itkRichardsonLucyDeconvolutionImageFilter.wrap b/Modules/Filtering/Deconvolution/wrapping/itkRichardsonLucyDeconvolutionImageFilter.wrap index f3cc1499978..1a4d61eccb3 100644 --- a/Modules/Filtering/Deconvolution/wrapping/itkRichardsonLucyDeconvolutionImageFilter.wrap +++ b/Modules/Filtering/Deconvolution/wrapping/itkRichardsonLucyDeconvolutionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::RichardsonLucyDeconvolutionImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 "2;3;4") +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 "2;3;4") itk_end_wrap_class() diff --git a/Modules/Filtering/Deconvolution/wrapping/itkTikhonovDeconvolutionImageFilter.wrap b/Modules/Filtering/Deconvolution/wrapping/itkTikhonovDeconvolutionImageFilter.wrap index c046c5eb00e..f61199868e4 100644 --- a/Modules/Filtering/Deconvolution/wrapping/itkTikhonovDeconvolutionImageFilter.wrap +++ b/Modules/Filtering/Deconvolution/wrapping/itkTikhonovDeconvolutionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::TikhonovDeconvolutionImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 "2;3;4") +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 "2;3;4") itk_end_wrap_class() diff --git a/Modules/Filtering/Deconvolution/wrapping/itkWienerDeconvolutionImageFilter.wrap b/Modules/Filtering/Deconvolution/wrapping/itkWienerDeconvolutionImageFilter.wrap index ab0cedfbd5c..ffd5de81edb 100644 --- a/Modules/Filtering/Deconvolution/wrapping/itkWienerDeconvolutionImageFilter.wrap +++ b/Modules/Filtering/Deconvolution/wrapping/itkWienerDeconvolutionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::WienerDeconvolutionImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 "2;3;4") +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 "2;3;4") itk_end_wrap_class() diff --git a/Modules/Filtering/Denoising/itk-module.cmake b/Modules/Filtering/Denoising/itk-module.cmake index 4194074b77f..02f1fa84856 100644 --- a/Modules/Filtering/Denoising/itk-module.cmake +++ b/Modules/Filtering/Denoising/itk-module.cmake @@ -1,16 +1,16 @@ set(DOCUMENTATION "This module contains denoising algorithms such as patch-based denoising.") -itk_module(ITKDenoising +itk_module( + ITKDenoising ENABLE_SHARED COMPILE_DEPENDS - ITKImageAdaptors - ITKImageGrid - ITKImageStatistics - ITKIOImageBase - ITKStatistics + ITKImageAdaptors + ITKImageGrid + ITKImageStatistics + ITKIOImageBase + ITKStatistics TEST_DEPENDS - ITKTestKernel - ITKImageGrid + ITKTestKernel + ITKImageGrid DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/Denoising/src/CMakeLists.txt b/Modules/Filtering/Denoising/src/CMakeLists.txt index 04b2da3ddcc..a7def8401d5 100644 --- a/Modules/Filtering/Denoising/src/CMakeLists.txt +++ b/Modules/Filtering/Denoising/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKDenoising_SRCS - itkPatchBasedDenoisingBaseImageFilter.cxx - ) +set(ITKDenoising_SRCS itkPatchBasedDenoisingBaseImageFilter.cxx) itk_module_add_library(ITKDenoising ${ITKDenoising_SRCS}) diff --git a/Modules/Filtering/Denoising/test/CMakeLists.txt b/Modules/Filtering/Denoising/test/CMakeLists.txt index 8e841286c43..1b27d38272c 100644 --- a/Modules/Filtering/Denoising/test/CMakeLists.txt +++ b/Modules/Filtering/Denoising/test/CMakeLists.txt @@ -1,68 +1,146 @@ itk_module_test() -set(ITKDenoisingTests -itkPatchBasedDenoisingImageFilterTest.cxx -itkPatchBasedDenoisingImageFilterDefaultTest.cxx -) +set(ITKDenoisingTests itkPatchBasedDenoisingImageFilterTest.cxx itkPatchBasedDenoisingImageFilterDefaultTest.cxx) -CreateTestDriver(ITKDenoising "${ITKDenoising-Test_LIBRARIES}" "${ITKDenoisingTests}") +createtestdriver(ITKDenoising "${ITKDenoising-Test_LIBRARIES}" "${ITKDenoisingTests}") -itk_add_test(NAME itkPatchBasedDenoisingImageFilterDefaultTest - COMMAND ITKDenoisingTestDriver - --compare DATA{Baseline/PatchBasedDenoisingImageFilterDefaultTest.mha} - ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterDefaultTest.mha - itkPatchBasedDenoisingImageFilterDefaultTest - DATA{Input/noisy_checkerboard.mha} - ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterDefaultTest.mha - 2) -itk_add_test(NAME itkPatchBasedDenoisingImageFilterTest0 - COMMAND ITKDenoisingTestDriver - --compareRadiusTolerance 2 - --compareIntensityTolerance 15 - --compare DATA{Baseline/PatchBasedDenoisingImageFilterTest0.mha} - ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTest0.mha - itkPatchBasedDenoisingImageFilterTest - DATA{Input/noisy_checkerboard.mha} - ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTest0.mha - 2 1 14.093142951003070 0 0 2 2 200) -itk_add_test(NAME itkPatchBasedDenoisingImageFilterTestGaussian - COMMAND ITKDenoisingTestDriver - --compareRadiusTolerance 2 - --compareIntensityTolerance 15 - --compare DATA{Baseline/PatchBasedDenoisingImageFilterTestGaussian.mha} - ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTestGaussian.mha - itkPatchBasedDenoisingImageFilterTest - DATA{Input/checkerboard_noise10Gaussian.mha} - ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTestGaussian.mha - 2 1 14.418708309529121 0 0 2 2 200 0 1 GAUSSIAN 0.1) -itk_add_test(NAME itkPatchBasedDenoisingImageFilterTestRician - COMMAND ITKDenoisingTestDriver - --compareRadiusTolerance 2 - --compareIntensityTolerance 15 - --compare DATA{Baseline/PatchBasedDenoisingImageFilterTestRician.mha} - ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTestRician.mha - itkPatchBasedDenoisingImageFilterTest - DATA{Input/checkerboard_noise10Rician.mha} - ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTestRician.mha - 2 1 12.283962106667094 0 0 2 2 200 0 1 RICIAN 0.1) -itk_add_test(NAME itkPatchBasedDenoisingImageFilterTestPoisson - COMMAND ITKDenoisingTestDriver - --compareRadiusTolerance 3 - --compareIntensityTolerance 8 - --compare DATA{Baseline/PatchBasedDenoisingImageFilterTestPoisson.mha} - ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTestPoisson.mha - itkPatchBasedDenoisingImageFilterTest - DATA{Input/checkerboard_noise10Poisson.mha} - ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTestPoisson.mha - 2 1 9.9250532200729378 0 0 2 2 200 0 1 POISSON 0.1) +itk_add_test( + NAME + itkPatchBasedDenoisingImageFilterDefaultTest + COMMAND + ITKDenoisingTestDriver + --compare + DATA{Baseline/PatchBasedDenoisingImageFilterDefaultTest.mha} + ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterDefaultTest.mha + itkPatchBasedDenoisingImageFilterDefaultTest + DATA{Input/noisy_checkerboard.mha} + ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterDefaultTest.mha + 2) +itk_add_test( + NAME + itkPatchBasedDenoisingImageFilterTest0 + COMMAND + ITKDenoisingTestDriver + --compareRadiusTolerance + 2 + --compareIntensityTolerance + 15 + --compare + DATA{Baseline/PatchBasedDenoisingImageFilterTest0.mha} + ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTest0.mha + itkPatchBasedDenoisingImageFilterTest + DATA{Input/noisy_checkerboard.mha} + ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTest0.mha + 2 + 1 + 14.093142951003070 + 0 + 0 + 2 + 2 + 200) +itk_add_test( + NAME + itkPatchBasedDenoisingImageFilterTestGaussian + COMMAND + ITKDenoisingTestDriver + --compareRadiusTolerance + 2 + --compareIntensityTolerance + 15 + --compare + DATA{Baseline/PatchBasedDenoisingImageFilterTestGaussian.mha} + ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTestGaussian.mha + itkPatchBasedDenoisingImageFilterTest + DATA{Input/checkerboard_noise10Gaussian.mha} + ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTestGaussian.mha + 2 + 1 + 14.418708309529121 + 0 + 0 + 2 + 2 + 200 + 0 + 1 + GAUSSIAN + 0.1) +itk_add_test( + NAME + itkPatchBasedDenoisingImageFilterTestRician + COMMAND + ITKDenoisingTestDriver + --compareRadiusTolerance + 2 + --compareIntensityTolerance + 15 + --compare + DATA{Baseline/PatchBasedDenoisingImageFilterTestRician.mha} + ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTestRician.mha + itkPatchBasedDenoisingImageFilterTest + DATA{Input/checkerboard_noise10Rician.mha} + ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTestRician.mha + 2 + 1 + 12.283962106667094 + 0 + 0 + 2 + 2 + 200 + 0 + 1 + RICIAN + 0.1) +itk_add_test( + NAME + itkPatchBasedDenoisingImageFilterTestPoisson + COMMAND + ITKDenoisingTestDriver + --compareRadiusTolerance + 3 + --compareIntensityTolerance + 8 + --compare + DATA{Baseline/PatchBasedDenoisingImageFilterTestPoisson.mha} + ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTestPoisson.mha + itkPatchBasedDenoisingImageFilterTest + DATA{Input/checkerboard_noise10Poisson.mha} + ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTestPoisson.mha + 2 + 1 + 9.9250532200729378 + 0 + 0 + 2 + 2 + 200 + 0 + 1 + POISSON + 0.1) # Extra tolerance for Tensors. The alternative EigenValues-computation of this class is faster, # but numerically unstable. The extra tolerance covers the difference between 64 and 32 bits machines. -itk_add_test(NAME itkPatchBasedDenoisingImageFilterTestTensors - COMMAND ITKDenoisingTestDriver - --compareNumberOfPixelsTolerance 10 - --compare - DATA{Baseline/PatchBasedDenoisingImageFilterTestTensors.nrrd} - ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTestTensors.nrrd - itkPatchBasedDenoisingImageFilterTest - DATA{Input/noisyDiffusionTensors.nrrd} - ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTestTensors.nrrd - 2 6 5.4377394641246628 0 0 2 2 100 0 2) +itk_add_test( + NAME + itkPatchBasedDenoisingImageFilterTestTensors + COMMAND + ITKDenoisingTestDriver + --compareNumberOfPixelsTolerance + 10 + --compare + DATA{Baseline/PatchBasedDenoisingImageFilterTestTensors.nrrd} + ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTestTensors.nrrd + itkPatchBasedDenoisingImageFilterTest + DATA{Input/noisyDiffusionTensors.nrrd} + ${ITK_TEST_OUTPUT_DIR}/PatchBasedDenoisingImageFilterTestTensors.nrrd + 2 + 6 + 5.4377394641246628 + 0 + 0 + 2 + 2 + 100 + 0 + 2) diff --git a/Modules/Filtering/DiffusionTensorImage/itk-module.cmake b/Modules/Filtering/DiffusionTensorImage/itk-module.cmake index 5522b60cc9f..4783f81f57a 100644 --- a/Modules/Filtering/DiffusionTensorImage/itk-module.cmake +++ b/Modules/Filtering/DiffusionTensorImage/itk-module.cmake @@ -1,14 +1,15 @@ -set(DOCUMENTATION "This module contains classes intended to generate or process +set(DOCUMENTATION + "This module contains classes intended to generate or process diffusion tensor images. In particular you will find here the filter that computes a tensor image from a set of gradient images.") -itk_module(ITKDiffusionTensorImage +itk_module( + ITKDiffusionTensorImage ENABLE_SHARED COMPILE_DEPENDS - ITKSpatialObjects + ITKSpatialObjects TEST_DEPENDS - ITKTestKernel - ITKImageFeature + ITKTestKernel + ITKImageFeature DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/DiffusionTensorImage/src/CMakeLists.txt b/Modules/Filtering/DiffusionTensorImage/src/CMakeLists.txt index 4b262afa8bc..a29f5f7c951 100644 --- a/Modules/Filtering/DiffusionTensorImage/src/CMakeLists.txt +++ b/Modules/Filtering/DiffusionTensorImage/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKDiffusionTensorImage_SRCS - itkDiffusionTensor3DReconstructionImageFilter.cxx - ) +set(ITKDiffusionTensorImage_SRCS itkDiffusionTensor3DReconstructionImageFilter.cxx) itk_module_add_library(ITKDiffusionTensorImage ${ITKDiffusionTensorImage_SRCS}) diff --git a/Modules/Filtering/DiffusionTensorImage/test/CMakeLists.txt b/Modules/Filtering/DiffusionTensorImage/test/CMakeLists.txt index 39a7b206f7c..c0091016bb2 100644 --- a/Modules/Filtering/DiffusionTensorImage/test/CMakeLists.txt +++ b/Modules/Filtering/DiffusionTensorImage/test/CMakeLists.txt @@ -1,18 +1,34 @@ itk_module_test() set(ITKDiffusionTensorImageTests -itkDiffusionTensor3DTest.cxx -itkDiffusionTensor3DReconstructionImageFilterTest.cxx -itkTensorRelativeAnisotropyImageFilterTest.cxx -itkTensorFractionalAnisotropyImageFilterTest.cxx -) + itkDiffusionTensor3DTest.cxx + itkDiffusionTensor3DReconstructionImageFilterTest.cxx + itkTensorRelativeAnisotropyImageFilterTest.cxx + itkTensorFractionalAnisotropyImageFilterTest.cxx) -CreateTestDriver(ITKDiffusionTensorImage "${ITKDiffusionTensorImage-Test_LIBRARIES}" "${ITKDiffusionTensorImageTests}") +createtestdriver(ITKDiffusionTensorImage "${ITKDiffusionTensorImage-Test_LIBRARIES}" "${ITKDiffusionTensorImageTests}") -itk_add_test(NAME itkDiffusionTensor3DTest - COMMAND ITKDiffusionTensorImageTestDriver itkDiffusionTensor3DTest) -itk_add_test(NAME itkDiffusionTensor3DReconstructionImageFilterTest - COMMAND ITKDiffusionTensorImageTestDriver itkDiffusionTensor3DReconstructionImageFilterTest 1.0) -itk_add_test(NAME itkTensorRelativeAnisotropyImageFilterTest - COMMAND ITKDiffusionTensorImageTestDriver itkTensorRelativeAnisotropyImageFilterTest) -itk_add_test(NAME itkTensorFractionalAnisotropyImageFilterTest - COMMAND ITKDiffusionTensorImageTestDriver itkTensorFractionalAnisotropyImageFilterTest) +itk_add_test( + NAME + itkDiffusionTensor3DTest + COMMAND + ITKDiffusionTensorImageTestDriver + itkDiffusionTensor3DTest) +itk_add_test( + NAME + itkDiffusionTensor3DReconstructionImageFilterTest + COMMAND + ITKDiffusionTensorImageTestDriver + itkDiffusionTensor3DReconstructionImageFilterTest + 1.0) +itk_add_test( + NAME + itkTensorRelativeAnisotropyImageFilterTest + COMMAND + ITKDiffusionTensorImageTestDriver + itkTensorRelativeAnisotropyImageFilterTest) +itk_add_test( + NAME + itkTensorFractionalAnisotropyImageFilterTest + COMMAND + ITKDiffusionTensorImageTestDriver + itkTensorFractionalAnisotropyImageFilterTest) diff --git a/Modules/Filtering/DisplacementField/itk-module.cmake b/Modules/Filtering/DisplacementField/itk-module.cmake index 20cd7014bad..22e0daa98df 100644 --- a/Modules/Filtering/DisplacementField/itk-module.cmake +++ b/Modules/Filtering/DisplacementField/itk-module.cmake @@ -1,18 +1,19 @@ -set(DOCUMENTATION "This module contains filters for computing and manipulating +set(DOCUMENTATION + "This module contains filters for computing and manipulating deformation fields. In ITK a deformation field is usually represented as an image of vectors. That is, every pixel contains a vector. In this module you will find filters for: computing a deformation field from a transform, computing inverse deformation fields, and computing the Jacobian Determinant of a deformation field.") -itk_module(ITKDisplacementField +itk_module( + ITKDisplacementField DEPENDS - ITKSmoothing - ITKImageIntensity + ITKSmoothing + ITKImageIntensity COMPILE_DEPENDS - ITKImageGrid + ITKImageGrid TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/DisplacementField/test/CMakeLists.txt b/Modules/Filtering/DisplacementField/test/CMakeLists.txt index 74319ab88dd..31ad06b3870 100644 --- a/Modules/Filtering/DisplacementField/test/CMakeLists.txt +++ b/Modules/Filtering/DisplacementField/test/CMakeLists.txt @@ -1,87 +1,184 @@ itk_module_test() set(ITKDisplacementFieldTests -itkComposeDisplacementFieldsImageFilterTest.cxx -itkDisplacementFieldJacobianDeterminantFilterTest.cxx -itkIterativeInverseDisplacementFieldImageFilterTest.cxx -itkLandmarkDisplacementFieldSourceTest.cxx -itkInverseDisplacementFieldImageFilterTest.cxx -itkInvertDisplacementFieldImageFilterTest.cxx -itkDisplacementFieldToBSplineImageFilterTest.cxx -itkDisplacementFieldTransformTest.cxx -itkGaussianSmoothingOnUpdateDisplacementFieldTransformTest.cxx -itkBSplineSmoothingOnUpdateDisplacementFieldTransformTest.cxx -itkGaussianExponentialDiffeomorphicTransformTest.cxx -itkBSplineExponentialDiffeomorphicTransformTest.cxx -itkTimeVaryingVelocityFieldTransformTest.cxx -itkTimeVaryingVelocityFieldIntegrationImageFilterTest.cxx -itkTimeVaryingBSplineVelocityFieldTransformTest.cxx -itkTransformToDisplacementFieldFilterTest.cxx -itkTransformToDisplacementFieldFilterTest1.cxx -itkDisplacementFieldTransformCloneTest.cxx -itkExponentialDisplacementFieldImageFilterTest.cxx -) + itkComposeDisplacementFieldsImageFilterTest.cxx + itkDisplacementFieldJacobianDeterminantFilterTest.cxx + itkIterativeInverseDisplacementFieldImageFilterTest.cxx + itkLandmarkDisplacementFieldSourceTest.cxx + itkInverseDisplacementFieldImageFilterTest.cxx + itkInvertDisplacementFieldImageFilterTest.cxx + itkDisplacementFieldToBSplineImageFilterTest.cxx + itkDisplacementFieldTransformTest.cxx + itkGaussianSmoothingOnUpdateDisplacementFieldTransformTest.cxx + itkBSplineSmoothingOnUpdateDisplacementFieldTransformTest.cxx + itkGaussianExponentialDiffeomorphicTransformTest.cxx + itkBSplineExponentialDiffeomorphicTransformTest.cxx + itkTimeVaryingVelocityFieldTransformTest.cxx + itkTimeVaryingVelocityFieldIntegrationImageFilterTest.cxx + itkTimeVaryingBSplineVelocityFieldTransformTest.cxx + itkTransformToDisplacementFieldFilterTest.cxx + itkTransformToDisplacementFieldFilterTest1.cxx + itkDisplacementFieldTransformCloneTest.cxx + itkExponentialDisplacementFieldImageFilterTest.cxx) -CreateTestDriver(ITKDisplacementField "${ITKDisplacementField-Test_LIBRARIES}" "${ITKDisplacementFieldTests}") +createtestdriver(ITKDisplacementField "${ITKDisplacementField-Test_LIBRARIES}" "${ITKDisplacementFieldTests}") -itk_add_test(NAME itkComposeDisplacementFieldsImageFilterTest - COMMAND ITKDisplacementFieldTestDriver itkComposeDisplacementFieldsImageFilterTest) -itk_add_test(NAME itkDisplacementFieldJacobianDeterminantFilterTest - COMMAND ITKDisplacementFieldTestDriver itkDisplacementFieldJacobianDeterminantFilterTest) -itk_add_test(NAME itkIterativeInverseDisplacementFieldImageFilterTest - COMMAND ITKDisplacementFieldTestDriver itkIterativeInverseDisplacementFieldImageFilterTest - ${ITK_TEST_OUTPUT_DIR}/itkIterativeInverseDisplacementFieldImageFilterTest.mha 5 0) -itk_add_test(NAME itkLandmarkDisplacementFieldSourceTest - COMMAND ITKDisplacementFieldTestDriver itkLandmarkDisplacementFieldSourceTest - ${ITK_TEST_OUTPUT_DIR}/itkLandmarkDisplacementFieldSourceTestLandmarks.txt ${ITK_TEST_OUTPUT_DIR}/itkLandmarkDisplacementFieldSourceTest.mha) -itk_add_test(NAME itkInverseDisplacementFieldImageFilterTest - COMMAND ITKDisplacementFieldTestDriver itkInverseDisplacementFieldImageFilterTest - ${ITK_TEST_OUTPUT_DIR}/itkInverseDisplacementFieldImageFilterTest.mha) -itk_add_test(NAME itkDisplacementFieldTransformTest - COMMAND ITKDisplacementFieldTestDriver itkDisplacementFieldTransformTest 1e-6 1e-6) -itk_add_test(NAME itkGaussianSmoothingOnUpdateDisplacementFieldTransformTest - COMMAND ITKDisplacementFieldTestDriver - itkGaussianSmoothingOnUpdateDisplacementFieldTransformTest) -itk_add_test(NAME itkBSplineSmoothingOnUpdateDisplacementFieldTransformTest - COMMAND ITKDisplacementFieldTestDriver - itkBSplineSmoothingOnUpdateDisplacementFieldTransformTest) -itk_add_test(NAME itkGaussianExponentialDiffeomorphicTransformTest - COMMAND ITKDisplacementFieldTestDriver - itkGaussianExponentialDiffeomorphicTransformTest) -itk_add_test(NAME itkBSplineExponentialDiffeomorphicTransformTest - COMMAND ITKDisplacementFieldTestDriver - itkBSplineExponentialDiffeomorphicTransformTest) -itk_add_test(NAME itkTimeVaryingVelocityFieldTransformTest - COMMAND ITKDisplacementFieldTestDriver itkTimeVaryingVelocityFieldTransformTest) -itk_add_test(NAME itkTimeVaryingVelocityFieldIntegrationImageFilterTest - COMMAND ITKDisplacementFieldTestDriver itkTimeVaryingVelocityFieldIntegrationImageFilterTest 0.3 0.75 100 0.2 0.8 50 1.0 0.0 100) -itk_add_test(NAME itkTimeVaryingBSplineVelocityFieldTransformTest - COMMAND ITKDisplacementFieldTestDriver itkTimeVaryingBSplineVelocityFieldTransformTest) -itk_add_test(NAME itkInvertDisplacementFieldImageFilterTest - COMMAND ITKDisplacementFieldTestDriver itkInvertDisplacementFieldImageFilterTest 50 0.1 0.001 0) -itk_add_test(NAME itkDisplacementFieldToBSplineImageFilterTest - COMMAND ITKDisplacementFieldTestDriver itkDisplacementFieldToBSplineImageFilterTest) -itk_add_test(NAME itkTransformToDisplacementFieldFilterTest01 - COMMAND ITKDisplacementFieldTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/itkTransformToDisplacementFieldFilterTestField01.mha - DATA{Baseline/itkTransformToDisplacementFieldFilterTestField01.mha} - itkTransformToDisplacementFieldFilterTest - Affine - ${ITK_TEST_OUTPUT_DIR}/itkTransformToDisplacementFieldFilterTestField01.mha) -itk_add_test(NAME itkTransformToDisplacementFieldFilterTest02 - COMMAND ITKDisplacementFieldTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/itkTransformToDisplacementFieldFilterTestField02.mha - DATA{Baseline/itkTransformToDisplacementFieldFilterTestField02.mha} - itkTransformToDisplacementFieldFilterTest - BSpline - ${ITK_TEST_OUTPUT_DIR}/itkTransformToDisplacementFieldFilterTestField02.mha - DATA{${ITK_DATA_ROOT}/Input/parametersBSpline.txt}) -itk_add_test(NAME itkTransformToDisplacementFieldFilterTest03 - COMMAND ITKDisplacementFieldTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/transformedImage.nii - ${ITK_TEST_OUTPUT_DIR}/warpedImage.nii - --compareNumberOfPixelsTolerance 20 - itkTransformToDisplacementFieldFilterTest1 ${ITK_TEST_OUTPUT_DIR}/transformedImage.nii ${ITK_TEST_OUTPUT_DIR}/warpedImage.nii 1) -itk_add_test(NAME itkDisplacementFieldTransformCloneTest - COMMAND ITKDisplacementFieldTestDriver itkDisplacementFieldTransformCloneTest) -itk_add_test(NAME itkExponentialDisplacementFieldImageFilterTest - COMMAND ITKDisplacementFieldTestDriver itkExponentialDisplacementFieldImageFilterTest) +itk_add_test( + NAME + itkComposeDisplacementFieldsImageFilterTest + COMMAND + ITKDisplacementFieldTestDriver + itkComposeDisplacementFieldsImageFilterTest) +itk_add_test( + NAME + itkDisplacementFieldJacobianDeterminantFilterTest + COMMAND + ITKDisplacementFieldTestDriver + itkDisplacementFieldJacobianDeterminantFilterTest) +itk_add_test( + NAME + itkIterativeInverseDisplacementFieldImageFilterTest + COMMAND + ITKDisplacementFieldTestDriver + itkIterativeInverseDisplacementFieldImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkIterativeInverseDisplacementFieldImageFilterTest.mha + 5 + 0) +itk_add_test( + NAME + itkLandmarkDisplacementFieldSourceTest + COMMAND + ITKDisplacementFieldTestDriver + itkLandmarkDisplacementFieldSourceTest + ${ITK_TEST_OUTPUT_DIR}/itkLandmarkDisplacementFieldSourceTestLandmarks.txt + ${ITK_TEST_OUTPUT_DIR}/itkLandmarkDisplacementFieldSourceTest.mha) +itk_add_test( + NAME + itkInverseDisplacementFieldImageFilterTest + COMMAND + ITKDisplacementFieldTestDriver + itkInverseDisplacementFieldImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkInverseDisplacementFieldImageFilterTest.mha) +itk_add_test( + NAME + itkDisplacementFieldTransformTest + COMMAND + ITKDisplacementFieldTestDriver + itkDisplacementFieldTransformTest + 1e-6 + 1e-6) +itk_add_test( + NAME + itkGaussianSmoothingOnUpdateDisplacementFieldTransformTest + COMMAND + ITKDisplacementFieldTestDriver + itkGaussianSmoothingOnUpdateDisplacementFieldTransformTest) +itk_add_test( + NAME + itkBSplineSmoothingOnUpdateDisplacementFieldTransformTest + COMMAND + ITKDisplacementFieldTestDriver + itkBSplineSmoothingOnUpdateDisplacementFieldTransformTest) +itk_add_test( + NAME + itkGaussianExponentialDiffeomorphicTransformTest + COMMAND + ITKDisplacementFieldTestDriver + itkGaussianExponentialDiffeomorphicTransformTest) +itk_add_test( + NAME + itkBSplineExponentialDiffeomorphicTransformTest + COMMAND + ITKDisplacementFieldTestDriver + itkBSplineExponentialDiffeomorphicTransformTest) +itk_add_test( + NAME + itkTimeVaryingVelocityFieldTransformTest + COMMAND + ITKDisplacementFieldTestDriver + itkTimeVaryingVelocityFieldTransformTest) +itk_add_test( + NAME + itkTimeVaryingVelocityFieldIntegrationImageFilterTest + COMMAND + ITKDisplacementFieldTestDriver + itkTimeVaryingVelocityFieldIntegrationImageFilterTest + 0.3 + 0.75 + 100 + 0.2 + 0.8 + 50 + 1.0 + 0.0 + 100) +itk_add_test( + NAME + itkTimeVaryingBSplineVelocityFieldTransformTest + COMMAND + ITKDisplacementFieldTestDriver + itkTimeVaryingBSplineVelocityFieldTransformTest) +itk_add_test( + NAME + itkInvertDisplacementFieldImageFilterTest + COMMAND + ITKDisplacementFieldTestDriver + itkInvertDisplacementFieldImageFilterTest + 50 + 0.1 + 0.001 + 0) +itk_add_test( + NAME + itkDisplacementFieldToBSplineImageFilterTest + COMMAND + ITKDisplacementFieldTestDriver + itkDisplacementFieldToBSplineImageFilterTest) +itk_add_test( + NAME + itkTransformToDisplacementFieldFilterTest01 + COMMAND + ITKDisplacementFieldTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/itkTransformToDisplacementFieldFilterTestField01.mha + DATA{Baseline/itkTransformToDisplacementFieldFilterTestField01.mha} + itkTransformToDisplacementFieldFilterTest + Affine + ${ITK_TEST_OUTPUT_DIR}/itkTransformToDisplacementFieldFilterTestField01.mha) +itk_add_test( + NAME + itkTransformToDisplacementFieldFilterTest02 + COMMAND + ITKDisplacementFieldTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/itkTransformToDisplacementFieldFilterTestField02.mha + DATA{Baseline/itkTransformToDisplacementFieldFilterTestField02.mha} + itkTransformToDisplacementFieldFilterTest + BSpline + ${ITK_TEST_OUTPUT_DIR}/itkTransformToDisplacementFieldFilterTestField02.mha + DATA{${ITK_DATA_ROOT}/Input/parametersBSpline.txt}) +itk_add_test( + NAME + itkTransformToDisplacementFieldFilterTest03 + COMMAND + ITKDisplacementFieldTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/transformedImage.nii + ${ITK_TEST_OUTPUT_DIR}/warpedImage.nii + --compareNumberOfPixelsTolerance + 20 + itkTransformToDisplacementFieldFilterTest1 + ${ITK_TEST_OUTPUT_DIR}/transformedImage.nii + ${ITK_TEST_OUTPUT_DIR}/warpedImage.nii + 1) +itk_add_test( + NAME + itkDisplacementFieldTransformCloneTest + COMMAND + ITKDisplacementFieldTestDriver + itkDisplacementFieldTransformCloneTest) +itk_add_test( + NAME + itkExponentialDisplacementFieldImageFilterTest + COMMAND + ITKDisplacementFieldTestDriver + itkExponentialDisplacementFieldImageFilterTest) diff --git a/Modules/Filtering/DisplacementField/wrapping/CMakeLists.txt b/Modules/Filtering/DisplacementField/wrapping/CMakeLists.txt index 34c190114f7..560c12556dd 100644 --- a/Modules/Filtering/DisplacementField/wrapping/CMakeLists.txt +++ b/Modules/Filtering/DisplacementField/wrapping/CMakeLists.txt @@ -1,5 +1,3 @@ itk_wrap_module(ITKDisplacementField) -set(WRAPPER_SUBMODULE_ORDER - itkTimeVaryingVelocityFieldTransform -) +set(WRAPPER_SUBMODULE_ORDER itkTimeVaryingVelocityFieldTransform) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Filtering/DisplacementField/wrapping/itkBSplineExponentialDiffeomorphicTransform.wrap b/Modules/Filtering/DisplacementField/wrapping/itkBSplineExponentialDiffeomorphicTransform.wrap index 752fec92260..a3fc3c26442 100644 --- a/Modules/Filtering/DisplacementField/wrapping/itkBSplineExponentialDiffeomorphicTransform.wrap +++ b/Modules/Filtering/DisplacementField/wrapping/itkBSplineExponentialDiffeomorphicTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::BSplineExponentialDiffeomorphicTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/DisplacementField/wrapping/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.wrap b/Modules/Filtering/DisplacementField/wrapping/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.wrap index caf6cbd0def..7fe7746a5a6 100644 --- a/Modules/Filtering/DisplacementField/wrapping/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.wrap +++ b/Modules/Filtering/DisplacementField/wrapping/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::BSplineSmoothingOnUpdateDisplacementFieldTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/DisplacementField/wrapping/itkConstantVelocityFieldTransform.wrap b/Modules/Filtering/DisplacementField/wrapping/itkConstantVelocityFieldTransform.wrap index fe3c16652d7..9d485ff878e 100644 --- a/Modules/Filtering/DisplacementField/wrapping/itkConstantVelocityFieldTransform.wrap +++ b/Modules/Filtering/DisplacementField/wrapping/itkConstantVelocityFieldTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ConstantVelocityFieldTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/DisplacementField/wrapping/itkDisplacementFieldJacobianDeterminantFilter.wrap b/Modules/Filtering/DisplacementField/wrapping/itkDisplacementFieldJacobianDeterminantFilter.wrap index e9270972e42..556694de5bb 100644 --- a/Modules/Filtering/DisplacementField/wrapping/itkDisplacementFieldJacobianDeterminantFilter.wrap +++ b/Modules/Filtering/DisplacementField/wrapping/itkDisplacementFieldJacobianDeterminantFilter.wrap @@ -1,14 +1,12 @@ itk_wrap_class("itk::DisplacementFieldJacobianDeterminantFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions - if(vector_dim GREATER 0 AND vector_dim LESS 5) - foreach(v ${WRAP_ITK_VECTOR_REAL}) - foreach(r ${WRAP_ITK_REAL}) - itk_wrap_template( - "${ITKM_I${v}${vector_dim}${d}}${ITKM_${r}}" - "${ITKT_I${v}${vector_dim}${d}}, ${ITKT_${r}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions + if(vector_dim GREATER 0 AND vector_dim LESS 5) + foreach(v ${WRAP_ITK_VECTOR_REAL}) + foreach(r ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${v}${vector_dim}${d}}${ITKM_${r}}" "${ITKT_I${v}${vector_dim}${d}}, ${ITKT_${r}}") endforeach() - endif() - endforeach() + endforeach() + endif() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/DisplacementField/wrapping/itkDisplacementFieldTransform.wrap b/Modules/Filtering/DisplacementField/wrapping/itkDisplacementFieldTransform.wrap index 5f40361e980..552e64c23c7 100644 --- a/Modules/Filtering/DisplacementField/wrapping/itkDisplacementFieldTransform.wrap +++ b/Modules/Filtering/DisplacementField/wrapping/itkDisplacementFieldTransform.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::DisplacementFieldTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - if (ITK_WRAP_vector_float) - itk_wrap_template("${ITKM_F}${d}" "${ITKT_F},${d}") - endif() - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") + if(ITK_WRAP_vector_float) + itk_wrap_template("${ITKM_F}${d}" "${ITKT_F},${d}") + endif() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/DisplacementField/wrapping/itkGaussianExponentialDiffeomorphicTransform.wrap b/Modules/Filtering/DisplacementField/wrapping/itkGaussianExponentialDiffeomorphicTransform.wrap index fd5536436aa..478b5fe1558 100644 --- a/Modules/Filtering/DisplacementField/wrapping/itkGaussianExponentialDiffeomorphicTransform.wrap +++ b/Modules/Filtering/DisplacementField/wrapping/itkGaussianExponentialDiffeomorphicTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::GaussianExponentialDiffeomorphicTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/DisplacementField/wrapping/itkGaussianSmoothingOnUpdateDisplacementFieldTransform.wrap b/Modules/Filtering/DisplacementField/wrapping/itkGaussianSmoothingOnUpdateDisplacementFieldTransform.wrap index f8c1abfe8fd..399d942a917 100644 --- a/Modules/Filtering/DisplacementField/wrapping/itkGaussianSmoothingOnUpdateDisplacementFieldTransform.wrap +++ b/Modules/Filtering/DisplacementField/wrapping/itkGaussianSmoothingOnUpdateDisplacementFieldTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::GaussianSmoothingOnUpdateDisplacementFieldTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/DisplacementField/wrapping/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.wrap b/Modules/Filtering/DisplacementField/wrapping/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.wrap index 77a73beae42..5f264bf6245 100644 --- a/Modules/Filtering/DisplacementField/wrapping/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.wrap +++ b/Modules/Filtering/DisplacementField/wrapping/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/DisplacementField/wrapping/itkTimeVaryingBSplineVelocityFieldTransform.wrap b/Modules/Filtering/DisplacementField/wrapping/itkTimeVaryingBSplineVelocityFieldTransform.wrap index 26482d79dac..c31b48af3f9 100644 --- a/Modules/Filtering/DisplacementField/wrapping/itkTimeVaryingBSplineVelocityFieldTransform.wrap +++ b/Modules/Filtering/DisplacementField/wrapping/itkTimeVaryingBSplineVelocityFieldTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::TimeVaryingBSplineVelocityFieldTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/DisplacementField/wrapping/itkTimeVaryingVelocityFieldTransform.wrap b/Modules/Filtering/DisplacementField/wrapping/itkTimeVaryingVelocityFieldTransform.wrap index 7a72f70ce72..339435372af 100644 --- a/Modules/Filtering/DisplacementField/wrapping/itkTimeVaryingVelocityFieldTransform.wrap +++ b/Modules/Filtering/DisplacementField/wrapping/itkTimeVaryingVelocityFieldTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::TimeVaryingVelocityFieldTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/DisplacementField/wrapping/itkTransformToDisplacementFieldFilter.wrap b/Modules/Filtering/DisplacementField/wrapping/itkTransformToDisplacementFieldFilter.wrap index a0acd67d9db..7f4893c5dab 100644 --- a/Modules/Filtering/DisplacementField/wrapping/itkTransformToDisplacementFieldFilter.wrap +++ b/Modules/Filtering/DisplacementField/wrapping/itkTransformToDisplacementFieldFilter.wrap @@ -1,10 +1,10 @@ -UNIQUE(transform_param_types "${WRAP_ITK_REAL};D") +unique(transform_param_types "${WRAP_ITK_REAL};D") itk_wrap_class("itk::TransformToDisplacementFieldFilter" POINTER) - foreach(vt ${WRAP_ITK_VECTOR}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${transform_param_types}) - itk_wrap_template("${ITKM_I${vt}${d}${d}}${ITKM_${t}}" "${ITKT_I${vt}${d}${d}}, ${ITKT_${t}}") - endforeach() +foreach(vt ${WRAP_ITK_VECTOR}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${transform_param_types}) + itk_wrap_template("${ITKM_I${vt}${d}${d}}${ITKM_${t}}" "${ITKT_I${vt}${d}${d}}, ${ITKT_${t}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/DisplacementField/wrapping/itkVelocityFieldTransform.wrap b/Modules/Filtering/DisplacementField/wrapping/itkVelocityFieldTransform.wrap index 3915b61ea70..780d7f54321 100644 --- a/Modules/Filtering/DisplacementField/wrapping/itkVelocityFieldTransform.wrap +++ b/Modules/Filtering/DisplacementField/wrapping/itkVelocityFieldTransform.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::VelocityFieldTransform" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/DisplacementField/wrapping/test/CMakeLists.txt b/Modules/Filtering/DisplacementField/wrapping/test/CMakeLists.txt index 2d1e7a97a80..f014366c2ac 100644 --- a/Modules/Filtering/DisplacementField/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/DisplacementField/wrapping/test/CMakeLists.txt @@ -1,6 +1,12 @@ if(ITK_WRAP_PYTHON) - itk_python_add_test(NAME itkDisplacementFieldTransformPythonTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkDisplacementFieldTransformTest.py) - itk_python_add_test(NAME itkTransformToDisplacementFieldPythonTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkTransformToDisplacementFieldTest.py) + itk_python_add_test( + NAME + itkDisplacementFieldTransformPythonTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkDisplacementFieldTransformTest.py) + itk_python_add_test( + NAME + itkTransformToDisplacementFieldPythonTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkTransformToDisplacementFieldTest.py) endif() diff --git a/Modules/Filtering/DistanceMap/itk-module.cmake b/Modules/Filtering/DistanceMap/itk-module.cmake index 4982fb1f2b5..353acd43da3 100644 --- a/Modules/Filtering/DistanceMap/itk-module.cmake +++ b/Modules/Filtering/DistanceMap/itk-module.cmake @@ -1,13 +1,15 @@ -set(DOCUMENTATION "This module contains multiple implementations of distance +set(DOCUMENTATION + "This module contains multiple implementations of distance map filters. They include the implementations of Danielsson and Maurer, as well as other distance concepts such as Hausdorff and Chamfer distances.") -itk_module(ITKDistanceMap +itk_module( + ITKDistanceMap COMPILE_DEPENDS - ITKBinaryMathematicalMorphology - ITKImageLabel - ITKNarrowBand + ITKBinaryMathematicalMorphology + ITKImageLabel + ITKNarrowBand TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}") + "${DOCUMENTATION}") diff --git a/Modules/Filtering/DistanceMap/test/CMakeLists.txt b/Modules/Filtering/DistanceMap/test/CMakeLists.txt index 3e218da9210..1010dac8797 100644 --- a/Modules/Filtering/DistanceMap/test/CMakeLists.txt +++ b/Modules/Filtering/DistanceMap/test/CMakeLists.txt @@ -1,144 +1,292 @@ itk_module_test() set(ITKDistanceMapTests -itkDanielssonDistanceMapImageFilterTest.cxx -itkDanielssonDistanceMapImageFilterTest1.cxx -itkDanielssonDistanceMapImageFilterTest2.cxx -itkDirectedHausdorffDistanceImageFilterTest1.cxx -itkDirectedHausdorffDistanceImageFilterTest2.cxx -itkSignedDanielssonDistanceMapImageFilterTest.cxx -itkSignedDanielssonDistanceMapImageFilterTest1.cxx -itkSignedDanielssonDistanceMapImageFilterTest2.cxx -itkContourMeanDistanceImageFilterTest.cxx -itkContourDirectedMeanDistanceImageFilterTest.cxx -itkFastChamferDistanceImageFilterTest.cxx -itkHausdorffDistanceImageFilterTest.cxx -itkReflectiveImageRegionIteratorTest.cxx -itkSignedMaurerDistanceMapImageFilterTest.cxx -itkApproximateSignedDistanceMapImageFilterTest.cxx -itkIsoContourDistanceImageFilterTest.cxx -itkSignedMaurerDistanceMapImageFilterTest11.cxx -itkSignedDanielssonDistanceMapImageFilterTest11.cxx -) + itkDanielssonDistanceMapImageFilterTest.cxx + itkDanielssonDistanceMapImageFilterTest1.cxx + itkDanielssonDistanceMapImageFilterTest2.cxx + itkDirectedHausdorffDistanceImageFilterTest1.cxx + itkDirectedHausdorffDistanceImageFilterTest2.cxx + itkSignedDanielssonDistanceMapImageFilterTest.cxx + itkSignedDanielssonDistanceMapImageFilterTest1.cxx + itkSignedDanielssonDistanceMapImageFilterTest2.cxx + itkContourMeanDistanceImageFilterTest.cxx + itkContourDirectedMeanDistanceImageFilterTest.cxx + itkFastChamferDistanceImageFilterTest.cxx + itkHausdorffDistanceImageFilterTest.cxx + itkReflectiveImageRegionIteratorTest.cxx + itkSignedMaurerDistanceMapImageFilterTest.cxx + itkApproximateSignedDistanceMapImageFilterTest.cxx + itkIsoContourDistanceImageFilterTest.cxx + itkSignedMaurerDistanceMapImageFilterTest11.cxx + itkSignedDanielssonDistanceMapImageFilterTest11.cxx) -CreateTestDriver(ITKDistanceMap "${ITKDistanceMap-Test_LIBRARIES}" "${ITKDistanceMapTests}") +createtestdriver(ITKDistanceMap "${ITKDistanceMap-Test_LIBRARIES}" "${ITKDistanceMapTests}") -itk_add_test(NAME itkSignedMaurerDistanceMapImageFilterTest11 - COMMAND ITKDistanceMapTestDriver itkSignedMaurerDistanceMapImageFilterTest11) +itk_add_test( + NAME + itkSignedMaurerDistanceMapImageFilterTest11 + COMMAND + ITKDistanceMapTestDriver + itkSignedMaurerDistanceMapImageFilterTest11) -itk_add_test(NAME itkSignedDanielssonDistanceMapImageFilterTest11 - COMMAND ITKDistanceMapTestDriver itkSignedDanielssonDistanceMapImageFilterTest11) +itk_add_test( + NAME + itkSignedDanielssonDistanceMapImageFilterTest11 + COMMAND + ITKDistanceMapTestDriver + itkSignedDanielssonDistanceMapImageFilterTest11) -itk_add_test(NAME itkDanielssonDistanceMapImageFilterTest - COMMAND ITKDistanceMapTestDriver itkDanielssonDistanceMapImageFilterTest) -itk_add_test(NAME itkDanielssonDistanceMapImageFilterTest1 - COMMAND ITKDistanceMapTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkDanielssonDistanceMapImageFilterTest1.mhd,itkDanielssonDistanceMapImageFilterTest1.zraw} - ${ITK_TEST_OUTPUT_DIR}/itkDanielssonDistanceMapImageFilterTest1.mhd - itkDanielssonDistanceMapImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/BinaryImageWithVariousShapes01.png} ${ITK_TEST_OUTPUT_DIR}/itkDanielssonDistanceMapImageFilterTest1.mhd 0 0 1) -itk_add_test(NAME itkDanielssonDistanceMapImageFilterTest2 - COMMAND ITKDistanceMapTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkDanielssonDistanceMapImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/itkDanielssonDistanceMapImageFilterTest2.png - itkDanielssonDistanceMapImageFilterTest2 DATA{${ITK_DATA_ROOT}/Input/BinaryImageWithVariousShapes01.png} ${ITK_TEST_OUTPUT_DIR}/itkDanielssonDistanceMapImageFilterTest2.png) -itk_add_test(NAME itkDirectedHausdorffDistanceImageFilterTest1 - COMMAND ITKDistanceMapTestDriver itkDirectedHausdorffDistanceImageFilterTest1) -itk_add_test(NAME itkDirectedHausdorffDistanceImageFilterTest2 - COMMAND ITKDistanceMapTestDriver - itkDirectedHausdorffDistanceImageFilterTest2 - DATA{${ITK_DATA_ROOT}/Input/BinaryImageWithVariousShapes01.png} - ${ITK_TEST_OUTPUT_DIR}/itkDirectedHausdorffDistanceImageFilterTest2.png) -itk_add_test(NAME itkSignedDanielssonDistanceMapImageFilterTest - COMMAND ITKDistanceMapTestDriver itkSignedDanielssonDistanceMapImageFilterTest) -itk_add_test(NAME itkSignedDanielssonDistanceMapImageFilterTest1 - COMMAND ITKDistanceMapTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedDanielssonDistanceMapImageFilterTest1.mhd,itkSignedDanielssonDistanceMapImageFilterTest1.zraw} - ${ITK_TEST_OUTPUT_DIR}/itkSignedDanielssonDistanceMapImageFilterTest1.mhd - itkSignedDanielssonDistanceMapImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/BinaryImageWithVariousShapes01.png} ${ITK_TEST_OUTPUT_DIR}/itkSignedDanielssonDistanceMapImageFilterTest1.mhd 2) -itk_add_test(NAME itkSignedDanielssonDistanceMapImageFilterTest2 - COMMAND ITKDistanceMapTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedDanielssonDistanceMapImageFilterTest2.mha} - ${ITK_TEST_OUTPUT_DIR}/itkSignedDanielssonDistanceMapImageFilterTest2.mha - itkSignedDanielssonDistanceMapImageFilterTest2 DATA{${ITK_DATA_ROOT}/Input/BinaryImageWithVariousShapes01.png} ${ITK_TEST_OUTPUT_DIR}/itkSignedDanielssonDistanceMapImageFilterTest2.mha) +itk_add_test( + NAME + itkDanielssonDistanceMapImageFilterTest + COMMAND + ITKDistanceMapTestDriver + itkDanielssonDistanceMapImageFilterTest) +itk_add_test( + NAME + itkDanielssonDistanceMapImageFilterTest1 + COMMAND + ITKDistanceMapTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkDanielssonDistanceMapImageFilterTest1.mhd,itkDanielssonDistanceMapImageFilterTest1.zraw} + ${ITK_TEST_OUTPUT_DIR}/itkDanielssonDistanceMapImageFilterTest1.mhd + itkDanielssonDistanceMapImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/BinaryImageWithVariousShapes01.png} + ${ITK_TEST_OUTPUT_DIR}/itkDanielssonDistanceMapImageFilterTest1.mhd + 0 + 0 + 1) +itk_add_test( + NAME + itkDanielssonDistanceMapImageFilterTest2 + COMMAND + ITKDistanceMapTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkDanielssonDistanceMapImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/itkDanielssonDistanceMapImageFilterTest2.png + itkDanielssonDistanceMapImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/BinaryImageWithVariousShapes01.png} + ${ITK_TEST_OUTPUT_DIR}/itkDanielssonDistanceMapImageFilterTest2.png) +itk_add_test( + NAME + itkDirectedHausdorffDistanceImageFilterTest1 + COMMAND + ITKDistanceMapTestDriver + itkDirectedHausdorffDistanceImageFilterTest1) +itk_add_test( + NAME + itkDirectedHausdorffDistanceImageFilterTest2 + COMMAND + ITKDistanceMapTestDriver + itkDirectedHausdorffDistanceImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/BinaryImageWithVariousShapes01.png} + ${ITK_TEST_OUTPUT_DIR}/itkDirectedHausdorffDistanceImageFilterTest2.png) +itk_add_test( + NAME + itkSignedDanielssonDistanceMapImageFilterTest + COMMAND + ITKDistanceMapTestDriver + itkSignedDanielssonDistanceMapImageFilterTest) +itk_add_test( + NAME + itkSignedDanielssonDistanceMapImageFilterTest1 + COMMAND + ITKDistanceMapTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedDanielssonDistanceMapImageFilterTest1.mhd,itkSignedDanielssonDistanceMapImageFilterTest1.zraw} + ${ITK_TEST_OUTPUT_DIR}/itkSignedDanielssonDistanceMapImageFilterTest1.mhd + itkSignedDanielssonDistanceMapImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/BinaryImageWithVariousShapes01.png} + ${ITK_TEST_OUTPUT_DIR}/itkSignedDanielssonDistanceMapImageFilterTest1.mhd + 2) +itk_add_test( + NAME + itkSignedDanielssonDistanceMapImageFilterTest2 + COMMAND + ITKDistanceMapTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedDanielssonDistanceMapImageFilterTest2.mha} + ${ITK_TEST_OUTPUT_DIR}/itkSignedDanielssonDistanceMapImageFilterTest2.mha + itkSignedDanielssonDistanceMapImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/BinaryImageWithVariousShapes01.png} + ${ITK_TEST_OUTPUT_DIR}/itkSignedDanielssonDistanceMapImageFilterTest2.mha) # Test the distance filter on a 3D volume. # The output should be the same as the output of the Maurer distance map filter. -itk_add_test(NAME itkSignedDanielssonDistanceMapImageFilterTest3D - COMMAND ITKDistanceMapTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedMaurerDistanceMapImageFilterTest3D.mhd,itkSignedMaurerDistanceMapImageFilterTest3D.zraw} - ${ITK_TEST_OUTPUT_DIR}/itkSignedDanielssonDistanceMapImageFilterTest3D.mhd - itkSignedDanielssonDistanceMapImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/BinarySquare3D.mhd,BinarySquare3D.zraw} ${ITK_TEST_OUTPUT_DIR}/itkSignedDanielssonDistanceMapImageFilterTest3D.mhd 3) +itk_add_test( + NAME + itkSignedDanielssonDistanceMapImageFilterTest3D + COMMAND + ITKDistanceMapTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedMaurerDistanceMapImageFilterTest3D.mhd,itkSignedMaurerDistanceMapImageFilterTest3D.zraw} + ${ITK_TEST_OUTPUT_DIR}/itkSignedDanielssonDistanceMapImageFilterTest3D.mhd + itkSignedDanielssonDistanceMapImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/BinarySquare3D.mhd,BinarySquare3D.zraw} + ${ITK_TEST_OUTPUT_DIR}/itkSignedDanielssonDistanceMapImageFilterTest3D.mhd + 3) # Test the distance filter on a 4D volume. # The middle 3D volume of the output 4D volume should be exactly the same as the # 3D volume of the previous test. # The output 4D volume should be the same as the output of the Maurer distance map filter. -itk_add_test(NAME itkSignedDanielssonDistanceMapImageFilterTest4D - COMMAND ITKDistanceMapTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedMaurerDistanceMapImageFilterTest4D.mhd,itkSignedMaurerDistanceMapImageFilterTest4D.zraw} - ${ITK_TEST_OUTPUT_DIR}/itkSignedDanielssonDistanceMapImageFilterTest4D.mhd - itkSignedDanielssonDistanceMapImageFilterTest1 - DATA{${ITK_DATA_ROOT}/Input/BinarySquare4D.mhd,BinarySquare4D.zraw} - ${ITK_TEST_OUTPUT_DIR}/itkSignedDanielssonDistanceMapImageFilterTest4D.mhd 4) +itk_add_test( + NAME + itkSignedDanielssonDistanceMapImageFilterTest4D + COMMAND + ITKDistanceMapTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedMaurerDistanceMapImageFilterTest4D.mhd,itkSignedMaurerDistanceMapImageFilterTest4D.zraw} + ${ITK_TEST_OUTPUT_DIR}/itkSignedDanielssonDistanceMapImageFilterTest4D.mhd + itkSignedDanielssonDistanceMapImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/BinarySquare4D.mhd,BinarySquare4D.zraw} + ${ITK_TEST_OUTPUT_DIR}/itkSignedDanielssonDistanceMapImageFilterTest4D.mhd + 4) -itk_add_test(NAME itkContourMeanDistanceImageFilterTest - COMMAND ITKDistanceMapTestDriver itkContourMeanDistanceImageFilterTest 1) -itk_add_test(NAME itkContourDirectedMeanDistanceImageFilterTest - COMMAND ITKDistanceMapTestDriver itkContourDirectedMeanDistanceImageFilterTest) -itk_add_test(NAME itkFastChamferDistanceImageFilterTest1 - COMMAND ITKDistanceMapTestDriver itkFastChamferDistanceImageFilterTest 1) -itk_add_test(NAME itkFastChamferDistanceImageFilterTest2 - COMMAND ITKDistanceMapTestDriver itkFastChamferDistanceImageFilterTest 2) -itk_add_test(NAME itkFastChamferDistanceImageFilterTest3 - COMMAND ITKDistanceMapTestDriver itkFastChamferDistanceImageFilterTest 3) -itk_add_test(NAME itkFastChamferDistanceImageFilterTest4 - COMMAND ITKDistanceMapTestDriver itkFastChamferDistanceImageFilterTest 4) -itk_add_test(NAME itkHausdorffDistanceImageFilterTest - COMMAND ITKDistanceMapTestDriver itkHausdorffDistanceImageFilterTest 1) -itk_add_test(NAME itkReflectiveImageRegionIteratorTest - COMMAND ITKDistanceMapTestDriver itkReflectiveImageRegionIteratorTest) -itk_add_test(NAME itkSignedMaurerDistanceMapImageFilterTest1 - COMMAND ITKDistanceMapTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedMaurerDistanceMapImageFilterTest1.mhd,itkSignedMaurerDistanceMapImageFilterTest1.zraw} - ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest1.mhd - itkSignedMaurerDistanceMapImageFilterTest DATA{${ITK_DATA_ROOT}/Input/SquareBinary201.png} ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest1.mhd 2) -itk_add_test(NAME itkSignedMaurerDistanceMapImageFilterTest2 - COMMAND ITKDistanceMapTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedMaurerDistanceMapImageFilterTest2.mhd,itkSignedMaurerDistanceMapImageFilterTest2.zraw} - ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest2.mhd - itkSignedMaurerDistanceMapImageFilterTest DATA{${ITK_DATA_ROOT}/Input/BrainSliceBinary.png} ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest2.mhd 2) -itk_add_test(NAME itkSignedMaurerDistanceMapImageFilterTest3 - COMMAND ITKDistanceMapTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedMaurerDistanceMapImageFilterTest3.mhd,itkSignedMaurerDistanceMapImageFilterTest3.zraw} - ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest3.mhd - itkSignedMaurerDistanceMapImageFilterTest DATA{${ITK_DATA_ROOT}/Input/LungSliceBinary.png} ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest3.mhd 2) +itk_add_test( + NAME + itkContourMeanDistanceImageFilterTest + COMMAND + ITKDistanceMapTestDriver + itkContourMeanDistanceImageFilterTest + 1) +itk_add_test( + NAME + itkContourDirectedMeanDistanceImageFilterTest + COMMAND + ITKDistanceMapTestDriver + itkContourDirectedMeanDistanceImageFilterTest) +itk_add_test( + NAME + itkFastChamferDistanceImageFilterTest1 + COMMAND + ITKDistanceMapTestDriver + itkFastChamferDistanceImageFilterTest + 1) +itk_add_test( + NAME + itkFastChamferDistanceImageFilterTest2 + COMMAND + ITKDistanceMapTestDriver + itkFastChamferDistanceImageFilterTest + 2) +itk_add_test( + NAME + itkFastChamferDistanceImageFilterTest3 + COMMAND + ITKDistanceMapTestDriver + itkFastChamferDistanceImageFilterTest + 3) +itk_add_test( + NAME + itkFastChamferDistanceImageFilterTest4 + COMMAND + ITKDistanceMapTestDriver + itkFastChamferDistanceImageFilterTest + 4) +itk_add_test( + NAME + itkHausdorffDistanceImageFilterTest + COMMAND + ITKDistanceMapTestDriver + itkHausdorffDistanceImageFilterTest + 1) +itk_add_test( + NAME + itkReflectiveImageRegionIteratorTest + COMMAND + ITKDistanceMapTestDriver + itkReflectiveImageRegionIteratorTest) +itk_add_test( + NAME + itkSignedMaurerDistanceMapImageFilterTest1 + COMMAND + ITKDistanceMapTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedMaurerDistanceMapImageFilterTest1.mhd,itkSignedMaurerDistanceMapImageFilterTest1.zraw} + ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest1.mhd + itkSignedMaurerDistanceMapImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/SquareBinary201.png} + ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest1.mhd + 2) +itk_add_test( + NAME + itkSignedMaurerDistanceMapImageFilterTest2 + COMMAND + ITKDistanceMapTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedMaurerDistanceMapImageFilterTest2.mhd,itkSignedMaurerDistanceMapImageFilterTest2.zraw} + ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest2.mhd + itkSignedMaurerDistanceMapImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/BrainSliceBinary.png} + ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest2.mhd + 2) +itk_add_test( + NAME + itkSignedMaurerDistanceMapImageFilterTest3 + COMMAND + ITKDistanceMapTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedMaurerDistanceMapImageFilterTest3.mhd,itkSignedMaurerDistanceMapImageFilterTest3.zraw} + ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest3.mhd + itkSignedMaurerDistanceMapImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/LungSliceBinary.png} + ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest3.mhd + 2) # Test the distance filter on a 3D volume. -itk_add_test(NAME itkSignedMaurerDistanceMapImageFilterTest3D - COMMAND ITKDistanceMapTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedMaurerDistanceMapImageFilterTest3D.mhd,itkSignedMaurerDistanceMapImageFilterTest3D.zraw} - ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest3D.mhd - itkSignedMaurerDistanceMapImageFilterTest DATA{${ITK_DATA_ROOT}/Input/BinarySquare3D.mhd,BinarySquare3D.zraw} ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest3D.mhd 3) +itk_add_test( + NAME + itkSignedMaurerDistanceMapImageFilterTest3D + COMMAND + ITKDistanceMapTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedMaurerDistanceMapImageFilterTest3D.mhd,itkSignedMaurerDistanceMapImageFilterTest3D.zraw} + ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest3D.mhd + itkSignedMaurerDistanceMapImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/BinarySquare3D.mhd,BinarySquare3D.zraw} + ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest3D.mhd + 3) # Test the distance filter on a 4D volume. # The middle 3D volume of the output 4D volume should be exactly the same as the # 3D volume of the previous test. -itk_add_test(NAME itkSignedMaurerDistanceMapImageFilterTest4D - COMMAND ITKDistanceMapTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedMaurerDistanceMapImageFilterTest4D.mhd,itkSignedMaurerDistanceMapImageFilterTest4D.zraw} - ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest4D.mhd - itkSignedMaurerDistanceMapImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/BinarySquare4D.mhd,BinarySquare4D.zraw} - ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest4D.mhd - 4) +itk_add_test( + NAME + itkSignedMaurerDistanceMapImageFilterTest4D + COMMAND + ITKDistanceMapTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkSignedMaurerDistanceMapImageFilterTest4D.mhd,itkSignedMaurerDistanceMapImageFilterTest4D.zraw} + ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest4D.mhd + itkSignedMaurerDistanceMapImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/BinarySquare4D.mhd,BinarySquare4D.zraw} + ${ITK_TEST_OUTPUT_DIR}/itkSignedMaurerDistanceMapImageFilterTest4D.mhd + 4) -itk_add_test(NAME itkApproximateSignedDistanceMapImageFilterTest0 - COMMAND ITKDistanceMapTestDriver - --compare - DATA{Data/Baseline/itkApproximateSignedDistanceMapImageFilterTest0.mha} - ${ITK_TEST_OUTPUT_DIR}/itkApproximateSignedDistanceMapImageFilterTest0.mha - --compare-MD5 - ${ITK_TEST_OUTPUT_DIR}/itkApproximateSignedDistanceMapImageFilterTest0.mha - "dad6e6dd8b849b884d15e91954f808d1" - itkApproximateSignedDistanceMapImageFilterTest 100 ${ITK_TEST_OUTPUT_DIR}/itkApproximateSignedDistanceMapImageFilterTest0.mha) -itk_add_test(NAME itkApproximateSignedDistanceMapImageFilterTest1 - COMMAND ITKDistanceMapTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkApproximateSignedDistanceMapImageFilterTest1.mhd "dad6e6dd8b849b884d15e91954f808d1" - itkApproximateSignedDistanceMapImageFilterTest 1 ${ITK_TEST_OUTPUT_DIR}/itkApproximateSignedDistanceMapImageFilterTest1.mhd) -itk_add_test(NAME itkIsoContourDistanceImageFilterTest - COMMAND ITKDistanceMapTestDriver itkIsoContourDistanceImageFilterTest) +itk_add_test( + NAME + itkApproximateSignedDistanceMapImageFilterTest0 + COMMAND + ITKDistanceMapTestDriver + --compare + DATA{Data/Baseline/itkApproximateSignedDistanceMapImageFilterTest0.mha} + ${ITK_TEST_OUTPUT_DIR}/itkApproximateSignedDistanceMapImageFilterTest0.mha + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkApproximateSignedDistanceMapImageFilterTest0.mha + "dad6e6dd8b849b884d15e91954f808d1" + itkApproximateSignedDistanceMapImageFilterTest + 100 + ${ITK_TEST_OUTPUT_DIR}/itkApproximateSignedDistanceMapImageFilterTest0.mha) +itk_add_test( + NAME + itkApproximateSignedDistanceMapImageFilterTest1 + COMMAND + ITKDistanceMapTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkApproximateSignedDistanceMapImageFilterTest1.mhd + "dad6e6dd8b849b884d15e91954f808d1" + itkApproximateSignedDistanceMapImageFilterTest + 1 + ${ITK_TEST_OUTPUT_DIR}/itkApproximateSignedDistanceMapImageFilterTest1.mhd) +itk_add_test( + NAME + itkIsoContourDistanceImageFilterTest + COMMAND + ITKDistanceMapTestDriver + itkIsoContourDistanceImageFilterTest) diff --git a/Modules/Filtering/DistanceMap/wrapping/itkApproximateSignedDistanceMapImageFilter.wrap b/Modules/Filtering/DistanceMap/wrapping/itkApproximateSignedDistanceMapImageFilter.wrap index b4b09d8595c..fddad798866 100644 --- a/Modules/Filtering/DistanceMap/wrapping/itkApproximateSignedDistanceMapImageFilter.wrap +++ b/Modules/Filtering/DistanceMap/wrapping/itkApproximateSignedDistanceMapImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ApproximateSignedDistanceMapImageFilter" POINTER) - # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +# itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/DistanceMap/wrapping/itkContourDirectedMeanDistanceImageFilter.wrap b/Modules/Filtering/DistanceMap/wrapping/itkContourDirectedMeanDistanceImageFilter.wrap index b4298b9a4da..113a96dbb7d 100644 --- a/Modules/Filtering/DistanceMap/wrapping/itkContourDirectedMeanDistanceImageFilter.wrap +++ b/Modules/Filtering/DistanceMap/wrapping/itkContourDirectedMeanDistanceImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ContourDirectedMeanDistanceImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2 2+) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) - itk_wrap_image_filter_combinations("${WRAP_ITK_USIGN_INT}" "${WRAP_ITK_REAL}" 2+) +itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) +itk_wrap_image_filter_combinations("${WRAP_ITK_USIGN_INT}" "${WRAP_ITK_REAL}" 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/DistanceMap/wrapping/itkContourMeanDistanceImageFilter.wrap b/Modules/Filtering/DistanceMap/wrapping/itkContourMeanDistanceImageFilter.wrap index 65f4123b166..2d4839c93e4 100644 --- a/Modules/Filtering/DistanceMap/wrapping/itkContourMeanDistanceImageFilter.wrap +++ b/Modules/Filtering/DistanceMap/wrapping/itkContourMeanDistanceImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ContourMeanDistanceImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2 2+) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) - itk_wrap_image_filter_combinations("${WRAP_ITK_USIGN_INT}" "${WRAP_ITK_REAL}" 2+) +itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) +itk_wrap_image_filter_combinations("${WRAP_ITK_USIGN_INT}" "${WRAP_ITK_REAL}" 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/DistanceMap/wrapping/itkDanielssonDistanceMapImageFilter.wrap b/Modules/Filtering/DistanceMap/wrapping/itkDanielssonDistanceMapImageFilter.wrap index f0aa9ff3be9..761416984ae 100644 --- a/Modules/Filtering/DistanceMap/wrapping/itkDanielssonDistanceMapImageFilter.wrap +++ b/Modules/Filtering/DistanceMap/wrapping/itkDanielssonDistanceMapImageFilter.wrap @@ -1,4 +1,4 @@ itk_wrap_class("itk::DanielssonDistanceMapImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) - itk_wrap_image_filter_combinations("${WRAP_ITK_USIGN_INT}" "${WRAP_ITK_REAL}") +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter_combinations("${WRAP_ITK_USIGN_INT}" "${WRAP_ITK_REAL}") itk_end_wrap_class() diff --git a/Modules/Filtering/DistanceMap/wrapping/itkDirectedHausdorffDistanceImageFilter.wrap b/Modules/Filtering/DistanceMap/wrapping/itkDirectedHausdorffDistanceImageFilter.wrap index 2516604f802..b50ec7139c5 100644 --- a/Modules/Filtering/DistanceMap/wrapping/itkDirectedHausdorffDistanceImageFilter.wrap +++ b/Modules/Filtering/DistanceMap/wrapping/itkDirectedHausdorffDistanceImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::DirectedHausdorffDistanceImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2 2+) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) - itk_wrap_image_filter_combinations("${WRAP_ITK_USIGN_INT}" "${WRAP_ITK_REAL}" 2+) +itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) +itk_wrap_image_filter_combinations("${WRAP_ITK_USIGN_INT}" "${WRAP_ITK_REAL}" 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/DistanceMap/wrapping/itkFastChamferDistanceImageFilter.wrap b/Modules/Filtering/DistanceMap/wrapping/itkFastChamferDistanceImageFilter.wrap index 12451b429a7..8eaa14c28b6 100644 --- a/Modules/Filtering/DistanceMap/wrapping/itkFastChamferDistanceImageFilter.wrap +++ b/Modules/Filtering/DistanceMap/wrapping/itkFastChamferDistanceImageFilter.wrap @@ -1,4 +1,4 @@ itk_wrap_class("itk::FastChamferDistanceImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/DistanceMap/wrapping/itkHausdorffDistanceImageFilter.wrap b/Modules/Filtering/DistanceMap/wrapping/itkHausdorffDistanceImageFilter.wrap index 8785a9fcb18..fbac0331701 100644 --- a/Modules/Filtering/DistanceMap/wrapping/itkHausdorffDistanceImageFilter.wrap +++ b/Modules/Filtering/DistanceMap/wrapping/itkHausdorffDistanceImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::HausdorffDistanceImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2 2+) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) - itk_wrap_image_filter_combinations("${WRAP_ITK_USIGN_INT}" "${WRAP_ITK_REAL}" 2+) +itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) +itk_wrap_image_filter_combinations("${WRAP_ITK_USIGN_INT}" "${WRAP_ITK_REAL}" 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/DistanceMap/wrapping/itkIsoContourDistanceImageFilter.wrap b/Modules/Filtering/DistanceMap/wrapping/itkIsoContourDistanceImageFilter.wrap index c3d19276e4e..d5ecb79efcd 100644 --- a/Modules/Filtering/DistanceMap/wrapping/itkIsoContourDistanceImageFilter.wrap +++ b/Modules/Filtering/DistanceMap/wrapping/itkIsoContourDistanceImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::IsoContourDistanceImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/DistanceMap/wrapping/itkSignedDanielssonDistanceMapImageFilter.wrap b/Modules/Filtering/DistanceMap/wrapping/itkSignedDanielssonDistanceMapImageFilter.wrap index 2d1fdf8bef3..bee1dd480ef 100644 --- a/Modules/Filtering/DistanceMap/wrapping/itkSignedDanielssonDistanceMapImageFilter.wrap +++ b/Modules/Filtering/DistanceMap/wrapping/itkSignedDanielssonDistanceMapImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::SignedDanielssonDistanceMapImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_REAL}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_REAL}") itk_end_wrap_class() diff --git a/Modules/Filtering/DistanceMap/wrapping/itkSignedMaurerDistanceMapImageFilter.wrap b/Modules/Filtering/DistanceMap/wrapping/itkSignedMaurerDistanceMapImageFilter.wrap index 8d337ca84fc..3ba72d78157 100644 --- a/Modules/Filtering/DistanceMap/wrapping/itkSignedMaurerDistanceMapImageFilter.wrap +++ b/Modules/Filtering/DistanceMap/wrapping/itkSignedMaurerDistanceMapImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::SignedMaurerDistanceMapImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_REAL}" 2+) +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_REAL}" 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/itk-module.cmake b/Modules/Filtering/FFT/itk-module.cmake index 0f6aef8e34d..5e93692fdf2 100644 --- a/Modules/Filtering/FFT/itk-module.cmake +++ b/Modules/Filtering/FFT/itk-module.cmake @@ -1,4 +1,5 @@ -set(DOCUMENTATION "This module provides interfaces to FFT +set(DOCUMENTATION + "This module provides interfaces to FFT implementations. In particular it provides the direct and inverse computations of Fast Fourier Transforms based on VXL and @@ -11,18 +12,18 @@ if(ITK_USE_FFTWF OR ITK_USE_FFTWD) list(PREPEND _fft_backends "FFTImageFilterInit::FFTW") endif() -itk_module(ITKFFT +itk_module( + ITKFFT ENABLE_SHARED DEPENDS - ITKCommon + ITKCommon COMPILE_DEPENDS - ITKImageGrid + ITKImageGrid TEST_DEPENDS - ITKTestKernel - ITKImageCompare - ITKImageIntensity + ITKTestKernel + ITKImageCompare + ITKImageIntensity FACTORY_NAMES - ${_fft_backends} + ${_fft_backends} DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/FFT/src/CMakeLists.txt b/Modules/Filtering/FFT/src/CMakeLists.txt index c637e2290ec..83b176cde17 100644 --- a/Modules/Filtering/FFT/src/CMakeLists.txt +++ b/Modules/Filtering/FFT/src/CMakeLists.txt @@ -1,6 +1,4 @@ -set(ITKFFT_SRCS - itkComplexToComplexFFTImageFilter.cxx - itkVnlFFTImageFilterInitFactory.cxx) +set(ITKFFT_SRCS itkComplexToComplexFFTImageFilter.cxx itkVnlFFTImageFilterInitFactory.cxx) if(ITK_USE_FFTWF OR ITK_USE_FFTWD) list(APPEND ITKFFT_SRCS itkFFTWFFTImageFilterInitFactory.cxx) @@ -12,7 +10,9 @@ endif() itk_module_add_library(ITKFFT ${ITKFFT_SRCS}) # this library is only needed if FFTW is used -if(ITK_USE_FFTWF OR ITK_USE_FFTWD AND NOT ITK_USE_CUFFTW) +if(ITK_USE_FFTWF + OR ITK_USE_FFTWD + AND NOT ITK_USE_CUFFTW) if(ITK_USE_FFTWD) if(NOT ITK_USE_SYSTEM_FFTW) add_dependencies(ITKFFT fftwd) # Ensure that local FFTW is built before using diff --git a/Modules/Filtering/FFT/test/CMakeLists.txt b/Modules/Filtering/FFT/test/CMakeLists.txt index 75a84c465c9..ca553cd16ea 100644 --- a/Modules/Filtering/FFT/test/CMakeLists.txt +++ b/Modules/Filtering/FFT/test/CMakeLists.txt @@ -1,144 +1,276 @@ itk_module_test() set(ITKFFTTests -itkComplexToComplex1DFFTImageFilterTest.cxx -itkComplexToComplexFFTImageFilterTest.cxx -itkFFT1DImageFilterTest.cxx -itkFFTPadImageFilterTest.cxx -itkFFTShiftImageFilterTest.cxx -itkForward1DFFTImageFilterTest.cxx -itkForwardInverseFFTImageFilterTest.cxx -itkFullToHalfHermitianImageFilterTest.cxx -itkHalfToFullHermitianImageFilterTest.cxx -itkInverse1DFFTImageFilterTest.cxx -itkVnlFFTTest.cxx -itkVnlRealFFTTest.cxx -itkVnlComplexToComplexFFTImageFilterTest.cxx -) + itkComplexToComplex1DFFTImageFilterTest.cxx + itkComplexToComplexFFTImageFilterTest.cxx + itkFFT1DImageFilterTest.cxx + itkFFTPadImageFilterTest.cxx + itkFFTShiftImageFilterTest.cxx + itkForward1DFFTImageFilterTest.cxx + itkForwardInverseFFTImageFilterTest.cxx + itkFullToHalfHermitianImageFilterTest.cxx + itkHalfToFullHermitianImageFilterTest.cxx + itkInverse1DFFTImageFilterTest.cxx + itkVnlFFTTest.cxx + itkVnlRealFFTTest.cxx + itkVnlComplexToComplexFFTImageFilterTest.cxx) if(ITK_USE_FFTWF) - list(APPEND ITKFFTTests + list( + APPEND + ITKFFTTests itkFFTWF_FFTTest.cxx itkFFTWF_RealFFTTest.cxx itkVnlFFTWF_FFTTest.cxx - itkVnlFFTWF_RealFFTTest.cxx - ) + itkVnlFFTWF_RealFFTTest.cxx) endif() if(ITK_USE_FFTWD) - list(APPEND ITKFFTTests + list( + APPEND + ITKFFTTests itkFFTWD_FFTTest.cxx itkFFTWD_RealFFTTest.cxx itkVnlFFTWD_FFTTest.cxx - itkVnlFFTWD_RealFFTTest.cxx - ) + itkVnlFFTWD_RealFFTTest.cxx) endif() if(ITK_USE_FFTWF OR ITK_USE_FFTWD) - list(APPEND ITKFFTTests - itkFFTWComplexToComplexFFTImageFilterTest.cxx - ) + list(APPEND ITKFFTTests itkFFTWComplexToComplexFFTImageFilterTest.cxx) endif() -CreateTestDriver(ITKFFT "${ITKFFT-Test_LIBRARIES}" "${ITKFFTTests}") +createtestdriver(ITKFFT "${ITKFFT-Test_LIBRARIES}" "${ITKFFTTests}") set(TEMP ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkVnlFFTTest - COMMAND ITKFFTTestDriver --redirectOutput ${TEMP}/itkVnlFFTTest.txt - itkVnlFFTTest) +itk_add_test( + NAME + itkVnlFFTTest + COMMAND + ITKFFTTestDriver + --redirectOutput + ${TEMP}/itkVnlFFTTest.txt + itkVnlFFTTest) set_tests_properties(itkVnlFFTTest PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkVnlFFTTest.txt) -itk_add_test(NAME itkVnlRealFFTTest - COMMAND ITKFFTTestDriver --redirectOutput ${TEMP}/itkVnlRealFFTTest.txt - itkVnlRealFFTTest) +itk_add_test( + NAME + itkVnlRealFFTTest + COMMAND + ITKFFTTestDriver + --redirectOutput + ${TEMP}/itkVnlRealFFTTest.txt + itkVnlRealFFTTest) set_tests_properties(itkVnlRealFFTTest PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkVnlRealFFTTest.txt) if(ITK_USE_FFTWF) - itk_add_test(NAME itkFFTWF_FFTTest - COMMAND ITKFFTTestDriver itkFFTWF_FFTTest ${ITK_TEST_OUTPUT_DIR}) - itk_add_test(NAME itkFFTWF_RealFFTTest - COMMAND ITKFFTTestDriver itkFFTWF_RealFFTTest ${ITK_TEST_OUTPUT_DIR}) - itk_add_test(NAME itkVnlFFTWF_FFTTest - COMMAND ITKFFTTestDriver itkVnlFFTWF_FFTTest) - itk_add_test(NAME itkVnlFFTWF_RealFFTTest - COMMAND ITKFFTTestDriver itkVnlFFTWF_RealFFTTest) - set_tests_properties(itkVnlFFTWF_FFTTest itkVnlFFTWF_RealFFTTest PROPERTIES ENVIRONMENT - "ITK_FFTW_READ_WISDOM_CACHE=oN;ITK_FFTW_WRITE_WISDOM_CACHE=oN;ITK_FFTW_WISDOM_CACHE_FILE=${ITK_TEST_OUTPUT_DIR}/.wisdom_from_ITK_FFTW_WISDOM_CACHE_FILE;ITK_FFTW_PLAN_RIGOR=FFTW_EXHAUSTIVE") + itk_add_test( + NAME + itkFFTWF_FFTTest + COMMAND + ITKFFTTestDriver + itkFFTWF_FFTTest + ${ITK_TEST_OUTPUT_DIR}) + itk_add_test( + NAME + itkFFTWF_RealFFTTest + COMMAND + ITKFFTTestDriver + itkFFTWF_RealFFTTest + ${ITK_TEST_OUTPUT_DIR}) + itk_add_test( + NAME + itkVnlFFTWF_FFTTest + COMMAND + ITKFFTTestDriver + itkVnlFFTWF_FFTTest) + itk_add_test( + NAME + itkVnlFFTWF_RealFFTTest + COMMAND + ITKFFTTestDriver + itkVnlFFTWF_RealFFTTest) + set_tests_properties( + itkVnlFFTWF_FFTTest itkVnlFFTWF_RealFFTTest + PROPERTIES + ENVIRONMENT + "ITK_FFTW_READ_WISDOM_CACHE=oN;ITK_FFTW_WRITE_WISDOM_CACHE=oN;ITK_FFTW_WISDOM_CACHE_FILE=${ITK_TEST_OUTPUT_DIR}/.wisdom_from_ITK_FFTW_WISDOM_CACHE_FILE;ITK_FFTW_PLAN_RIGOR=FFTW_EXHAUSTIVE" + ) endif() if(ITK_USE_FFTWD) - itk_add_test(NAME itkFFTWD_FFTTest - COMMAND ITKFFTTestDriver itkFFTWD_FFTTest ${ITK_TEST_OUTPUT_DIR}) - itk_add_test(NAME itkFFTWD_RealFFTTest - COMMAND ITKFFTTestDriver itkFFTWD_RealFFTTest ${ITK_TEST_OUTPUT_DIR}) - itk_add_test(NAME itkVnlFFTWD_FFTTest - COMMAND ITKFFTTestDriver itkVnlFFTWD_FFTTest) - itk_add_test(NAME itkVnlFFTWD_RealFFTTest - COMMAND ITKFFTTestDriver itkVnlFFTWD_RealFFTTest) - set_tests_properties(itkVnlFFTWD_FFTTest itkVnlFFTWD_RealFFTTest PROPERTIES ENVIRONMENT - "ITK_FFTW_READ_WISDOM_CACHE=oN;ITK_FFTW_WISDOM_CACHE_BASE=${ITK_TEST_OUTPUT_DIR};ITK_FFTW_PLAN_RIGOR=FFTW_EXHAUSTIVE;ITK_FFTW_WRITE_WISDOM_CACHE=oN") + itk_add_test( + NAME + itkFFTWD_FFTTest + COMMAND + ITKFFTTestDriver + itkFFTWD_FFTTest + ${ITK_TEST_OUTPUT_DIR}) + itk_add_test( + NAME + itkFFTWD_RealFFTTest + COMMAND + ITKFFTTestDriver + itkFFTWD_RealFFTTest + ${ITK_TEST_OUTPUT_DIR}) + itk_add_test( + NAME + itkVnlFFTWD_FFTTest + COMMAND + ITKFFTTestDriver + itkVnlFFTWD_FFTTest) + itk_add_test( + NAME + itkVnlFFTWD_RealFFTTest + COMMAND + ITKFFTTestDriver + itkVnlFFTWD_RealFFTTest) + set_tests_properties( + itkVnlFFTWD_FFTTest itkVnlFFTWD_RealFFTTest + PROPERTIES + ENVIRONMENT + "ITK_FFTW_READ_WISDOM_CACHE=oN;ITK_FFTW_WISDOM_CACHE_BASE=${ITK_TEST_OUTPUT_DIR};ITK_FFTW_PLAN_RIGOR=FFTW_EXHAUSTIVE;ITK_FFTW_WRITE_WISDOM_CACHE=oN" + ) endif() -itk_add_test(NAME itkFFTShiftImageFilterTestOdd0 - COMMAND ITKFFTTestDriver - --compare DATA{Baseline/itkFFTShiftImageFilterTest0.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTShiftImageFilterTest0.png - itkFFTShiftImageFilterTest DATA{${ITK_DATA_ROOT}/Input/BrainSliceBinary.png} ${ITK_TEST_OUTPUT_DIR}/itkFFTShiftImageFilterTest0.png 0) -itk_add_test(NAME itkFFTShiftImageFilterTestOdd1 - COMMAND ITKFFTTestDriver - --compare DATA{${ITK_DATA_ROOT}/Input/BrainSliceBinary.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTShiftImageFilterTest1.png - itkFFTShiftImageFilterTest DATA{Baseline/itkFFTShiftImageFilterTest0.png} ${ITK_TEST_OUTPUT_DIR}/itkFFTShiftImageFilterTest1.png 1) -itk_add_test(NAME itkFFTShiftImageFilterTestEven0 - COMMAND ITKFFTTestDriver - --compare DATA{Baseline/itkFFTShiftImageFilterTestEven0.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTShiftImageFilterTestEven0.png - itkFFTShiftImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkFFTShiftImageFilterTestEven0.png 0) -itk_add_test(NAME itkFFTShiftImageFilterTestEven1 - COMMAND ITKFFTTestDriver - --compare DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTShiftImageFilterTestEven1.png - itkFFTShiftImageFilterTest DATA{Baseline/itkFFTShiftImageFilterTestEven0.png} ${ITK_TEST_OUTPUT_DIR}/itkFFTShiftImageFilterTestEven1.png 1) -itk_add_test(NAME itkHalfToFullHermitianImageFilterTestEvenEven - COMMAND ITKFFTTestDriver - itkHalfToFullHermitianImageFilterTest 10 10) -itk_add_test(NAME itkHalfToFullHermitianImageFilterTestEvenOdd - COMMAND ITKFFTTestDriver - itkHalfToFullHermitianImageFilterTest 10 15) -itk_add_test(NAME itkHalfToFullHermitianImageFilterTestOddEven - COMMAND ITKFFTTestDriver - itkHalfToFullHermitianImageFilterTest 15 10) -itk_add_test(NAME itkHalfToFullHermitianImageFilterTestOddOdd - COMMAND ITKFFTTestDriver - itkHalfToFullHermitianImageFilterTest 15 15) -itk_add_test(NAME itkFullToHalfHermitianImageFilterTestEvenEven - COMMAND ITKFFTTestDriver - itkFullToHalfHermitianImageFilterTest 10 10) -itk_add_test(NAME itkFullToHalfHermitianImageFilterTestEvenOdd - COMMAND ITKFFTTestDriver - itkFullToHalfHermitianImageFilterTest 10 15) -itk_add_test(NAME itkFullToHalfHermitianImageFilterTestOddEven - COMMAND ITKFFTTestDriver - itkFullToHalfHermitianImageFilterTest 15 10) -itk_add_test(NAME itkFullToHalfHermitianImageFilterTestOddOdd - COMMAND ITKFFTTestDriver - itkFullToHalfHermitianImageFilterTest 15 15) -itk_add_test(NAME itkForwardInverseFFTImageFilterTest1 - COMMAND ITKFFTTestDriver - itkForwardInverseFFTImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png}) -itk_add_test(NAME itkForwardInverseFFTImageFilterTest2 - COMMAND ITKFFTTestDriver - itkForwardInverseFFTImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Shapes.png}) +itk_add_test( + NAME + itkFFTShiftImageFilterTestOdd0 + COMMAND + ITKFFTTestDriver + --compare + DATA{Baseline/itkFFTShiftImageFilterTest0.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTShiftImageFilterTest0.png + itkFFTShiftImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/BrainSliceBinary.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTShiftImageFilterTest0.png + 0) +itk_add_test( + NAME + itkFFTShiftImageFilterTestOdd1 + COMMAND + ITKFFTTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/BrainSliceBinary.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTShiftImageFilterTest1.png + itkFFTShiftImageFilterTest + DATA{Baseline/itkFFTShiftImageFilterTest0.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTShiftImageFilterTest1.png + 1) +itk_add_test( + NAME + itkFFTShiftImageFilterTestEven0 + COMMAND + ITKFFTTestDriver + --compare + DATA{Baseline/itkFFTShiftImageFilterTestEven0.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTShiftImageFilterTestEven0.png + itkFFTShiftImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTShiftImageFilterTestEven0.png + 0) +itk_add_test( + NAME + itkFFTShiftImageFilterTestEven1 + COMMAND + ITKFFTTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTShiftImageFilterTestEven1.png + itkFFTShiftImageFilterTest + DATA{Baseline/itkFFTShiftImageFilterTestEven0.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTShiftImageFilterTestEven1.png + 1) +itk_add_test( + NAME + itkHalfToFullHermitianImageFilterTestEvenEven + COMMAND + ITKFFTTestDriver + itkHalfToFullHermitianImageFilterTest + 10 + 10) +itk_add_test( + NAME + itkHalfToFullHermitianImageFilterTestEvenOdd + COMMAND + ITKFFTTestDriver + itkHalfToFullHermitianImageFilterTest + 10 + 15) +itk_add_test( + NAME + itkHalfToFullHermitianImageFilterTestOddEven + COMMAND + ITKFFTTestDriver + itkHalfToFullHermitianImageFilterTest + 15 + 10) +itk_add_test( + NAME + itkHalfToFullHermitianImageFilterTestOddOdd + COMMAND + ITKFFTTestDriver + itkHalfToFullHermitianImageFilterTest + 15 + 15) +itk_add_test( + NAME + itkFullToHalfHermitianImageFilterTestEvenEven + COMMAND + ITKFFTTestDriver + itkFullToHalfHermitianImageFilterTest + 10 + 10) +itk_add_test( + NAME + itkFullToHalfHermitianImageFilterTestEvenOdd + COMMAND + ITKFFTTestDriver + itkFullToHalfHermitianImageFilterTest + 10 + 15) +itk_add_test( + NAME + itkFullToHalfHermitianImageFilterTestOddEven + COMMAND + ITKFFTTestDriver + itkFullToHalfHermitianImageFilterTest + 15 + 10) +itk_add_test( + NAME + itkFullToHalfHermitianImageFilterTestOddOdd + COMMAND + ITKFFTTestDriver + itkFullToHalfHermitianImageFilterTest + 15 + 15) +itk_add_test( + NAME + itkForwardInverseFFTImageFilterTest1 + COMMAND + ITKFFTTestDriver + itkForwardInverseFFTImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png}) +itk_add_test( + NAME + itkForwardInverseFFTImageFilterTest2 + COMMAND + ITKFFTTestDriver + itkForwardInverseFFTImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Shapes.png}) -itk_add_test(NAME itkComplexToComplexFFTImageFilter2DFloatTest - COMMAND ITKFFTTestDriver - --compare - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplexFFTImageFilter2DFloatTest.mha - itkComplexToComplexFFTImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplexFFTImageFilter2DFloatTest.mha - float) +itk_add_test( + NAME + itkComplexToComplexFFTImageFilter2DFloatTest + COMMAND + ITKFFTTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplexFFTImageFilter2DFloatTest.mha + itkComplexToComplexFFTImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplexFFTImageFilter2DFloatTest.mha + float) # The data contained in ${ITK_DATA_ROOT}/Input/DicomSeries/ # is required by mri3D.mhd: # ElementDataFile = DicomSeries/Image%04d.dcm 75 77 1 @@ -148,244 +280,305 @@ itk_add_test(NAME itkComplexToComplexFFTImageFilter2DFloatTest # Since DATA{} does not allow to specify an associated # file that is in a different directory, we call ExternalData_Expand_Arguments # manually to download the required files. -ExternalData_Expand_Arguments(ITKData - ExpandedData - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} - ) -itk_add_test(NAME itkComplexToComplexFFTImageFilter3DFloatTest - COMMAND ITKFFTTestDriver - --compare - DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} - ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplexFFTImageFilter3DFloatTest.mha - itkComplexToComplexFFTImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} - ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplexFFTImageFilter3DFloatTest.mha - float) -itk_add_test(NAME itkComplexToComplexFFTImageFilter2DDoubleTest - COMMAND ITKFFTTestDriver - --compare - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplexFFTImageFilter2DDoubleTest.mha - itkComplexToComplexFFTImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplexFFTImageFilter2DDoubleTest.mha - double) -itk_add_test(NAME itkComplexToComplexFFTImageFilter3DDoubleTest - COMMAND ITKFFTTestDriver - --compare - DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} - ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplexFFTImageFilter3DDoubleTest.mha - itkComplexToComplexFFTImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} - ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplexFFTImageFilter3DDoubleTest.mha - double) +ExternalData_expand_arguments(ITKData ExpandedData DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm}) +itk_add_test( + NAME + itkComplexToComplexFFTImageFilter3DFloatTest + COMMAND + ITKFFTTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} + ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplexFFTImageFilter3DFloatTest.mha + itkComplexToComplexFFTImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} + ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplexFFTImageFilter3DFloatTest.mha + float) +itk_add_test( + NAME + itkComplexToComplexFFTImageFilter2DDoubleTest + COMMAND + ITKFFTTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplexFFTImageFilter2DDoubleTest.mha + itkComplexToComplexFFTImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplexFFTImageFilter2DDoubleTest.mha + double) +itk_add_test( + NAME + itkComplexToComplexFFTImageFilter3DDoubleTest + COMMAND + ITKFFTTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} + ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplexFFTImageFilter3DDoubleTest.mha + itkComplexToComplexFFTImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} + ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplexFFTImageFilter3DDoubleTest.mha + double) + +itk_add_test( + NAME + itkVnlComplexToComplexFFTImageFilter2DFloatTest + COMMAND + ITKFFTTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplexFFTImageFilter2DFloatTest.mha + itkVnlComplexToComplexFFTImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplexFFTImageFilter2DFloatTest.mha + float) +itk_add_test( + NAME + itkVnlComplexToComplexFFTImageFilter3DFloatTest + COMMAND + ITKFFTTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} + ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplexFFTImageFilter3DFloatTest.mha + itkVnlComplexToComplexFFTImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} + ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplexFFTImageFilter3DFloatTest.mha + float) +itk_add_test( + NAME + itkVnlComplexToComplexFFTImageFilter2DDoubleTest + COMMAND + ITKFFTTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplexFFTImageFilter2DDoubleTest.mha + itkVnlComplexToComplexFFTImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplexFFTImageFilter2DDoubleTest.mha + double) +itk_add_test( + NAME + itkVnlComplexToComplexFFTImageFilter3DDoubleTest + COMMAND + ITKFFTTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} + ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplexFFTImageFilter3DDoubleTest.mha + itkVnlComplexToComplexFFTImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} + ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplexFFTImageFilter3DDoubleTest.mha + double) -itk_add_test(NAME itkVnlComplexToComplexFFTImageFilter2DFloatTest - COMMAND ITKFFTTestDriver +if(ITK_USE_FFTWF) + itk_add_test( + NAME + itkFFTWComplexToComplexFFTImageFilter2DFloatTest + COMMAND + ITKFFTTestDriver --compare - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplexFFTImageFilter2DFloatTest.mha - itkVnlComplexToComplexFFTImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplexFFTImageFilter2DFloatTest.mha - float) -itk_add_test(NAME itkVnlComplexToComplexFFTImageFilter3DFloatTest - COMMAND ITKFFTTestDriver + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplexFFTImageFilter2DFloatTest.mha + itkFFTWComplexToComplexFFTImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplexFFTImageFilter2DFloatTest.mha + float) + itk_add_test( + NAME + itkFFTWComplexToComplexFFTImageFilter3DFloatTest + COMMAND + ITKFFTTestDriver --compare DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} - ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplexFFTImageFilter3DFloatTest.mha - itkVnlComplexToComplexFFTImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} - ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplexFFTImageFilter3DFloatTest.mha - float) -itk_add_test(NAME itkVnlComplexToComplexFFTImageFilter2DDoubleTest - COMMAND ITKFFTTestDriver - --compare - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplexFFTImageFilter2DDoubleTest.mha - itkVnlComplexToComplexFFTImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplexFFTImageFilter2DDoubleTest.mha - double) -itk_add_test(NAME itkVnlComplexToComplexFFTImageFilter3DDoubleTest - COMMAND ITKFFTTestDriver - --compare + ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplexFFTImageFilter3DFloatTest.mha + itkFFTWComplexToComplexFFTImageFilterTest DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} - ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplexFFTImageFilter3DDoubleTest.mha - itkVnlComplexToComplexFFTImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} - ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplexFFTImageFilter3DDoubleTest.mha - double) - -if(ITK_USE_FFTWF) - itk_add_test(NAME itkFFTWComplexToComplexFFTImageFilter2DFloatTest - COMMAND ITKFFTTestDriver - --compare - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplexFFTImageFilter2DFloatTest.mha - itkFFTWComplexToComplexFFTImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplexFFTImageFilter2DFloatTest.mha - float) - itk_add_test(NAME itkFFTWComplexToComplexFFTImageFilter3DFloatTest - COMMAND ITKFFTTestDriver - --compare - DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} - ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplexFFTImageFilter3DFloatTest.mha - itkFFTWComplexToComplexFFTImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} - ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplexFFTImageFilter3DFloatTest.mha - float) + ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplexFFTImageFilter3DFloatTest.mha + float) endif() if(ITK_USE_FFTWD) - itk_add_test(NAME itkFFTWComplexToComplexFFTImageFilter2DDoubleTest - COMMAND ITKFFTTestDriver - --compare - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplexFFTImageFilter2DDoubleTest.mha - itkFFTWComplexToComplexFFTImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplexFFTImageFilter2DDoubleTest.mha - double) - itk_add_test(NAME itkFFTWComplexToComplexFFTImageFilter3DDoubleTest - COMMAND ITKFFTTestDriver - --compare - DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} - ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplexFFTImageFilter3DDoubleTest.mha - itkFFTWComplexToComplexFFTImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} - ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplexFFTImageFilter3DDoubleTest.mha - double) + itk_add_test( + NAME + itkFFTWComplexToComplexFFTImageFilter2DDoubleTest + COMMAND + ITKFFTTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplexFFTImageFilter2DDoubleTest.mha + itkFFTWComplexToComplexFFTImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplexFFTImageFilter2DDoubleTest.mha + double) + itk_add_test( + NAME + itkFFTWComplexToComplexFFTImageFilter3DDoubleTest + COMMAND + ITKFFTTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} + ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplexFFTImageFilter3DDoubleTest.mha + itkFFTWComplexToComplexFFTImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} + ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplexFFTImageFilter3DDoubleTest.mha + double) endif() foreach(padMethod ZeroFluxNeumann Zero Wrap) # Mirror foreach(gpf 5 13) - itk_add_test(NAME itkFFTPadImageFilterTest${padMethod}${gpf} - COMMAND ITKFFTTestDriver - --compare DATA{Baseline/itkFFTPadImageFilterTest${padMethod}${gpf}.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTPadImageFilterTest${padMethod}${gpf}.png - itkFFTPadImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1-257.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTPadImageFilterTest${padMethod}${gpf}.png ${gpf} ${padMethod}) + itk_add_test( + NAME + itkFFTPadImageFilterTest${padMethod}${gpf} + COMMAND + ITKFFTTestDriver + --compare + DATA{Baseline/itkFFTPadImageFilterTest${padMethod}${gpf}.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTPadImageFilterTest${padMethod}${gpf}.png + itkFFTPadImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1-257.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTPadImageFilterTest${padMethod}${gpf}.png + ${gpf} + ${padMethod}) endforeach() endforeach() # Test header files circular dependencies add_executable(ITKFFTTestCircularDependency itkTestCircularDependency.cxx) target_link_libraries(ITKFFTTestCircularDependency ${ITKFFT-Test_LIBRARIES}) -itk_add_test(NAME itkFFTTestCircularDependency COMMAND ITKFFTTestCircularDependency) +itk_add_test( + NAME + itkFFTTestCircularDependency + COMMAND + ITKFFTTestCircularDependency) # Get test data input directory for test parameter -itk_add_test(NAME itkComplexToComplex1DFFTImageFilterTest - COMMAND ITKFFTTestDriver +itk_add_test( + NAME + itkComplexToComplex1DFFTImageFilterTest + COMMAND + ITKFFTTestDriver --compare - DATA{Input/TreeBarkTexture.png} - ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplex1DFFTImageFilterTestOutput.mha + DATA{Input/TreeBarkTexture.png} + ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplex1DFFTImageFilterTestOutput.mha itkComplexToComplex1DFFTImageFilterTest - DATA{Input/itkForward1DFFTImageFilterTestBaselineRealFull.mhd} - DATA{Input/itkForward1DFFTImageFilterTestBaselineImaginaryFull.mhd} - ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplex1DFFTImageFilterTestOutput.mha - ) + DATA{Input/itkForward1DFFTImageFilterTestBaselineRealFull.mhd} + DATA{Input/itkForward1DFFTImageFilterTestBaselineImaginaryFull.mhd} + ${ITK_TEST_OUTPUT_DIR}/itkComplexToComplex1DFFTImageFilterTestOutput.mha) # use a forward fft, then inverse fft for this instead because of the FullMatrix # issue -itk_add_test(NAME itkFFT1DImageFilterTest - COMMAND ITKFFTTestDriver +itk_add_test( + NAME + itkFFT1DImageFilterTest + COMMAND + ITKFFTTestDriver --compare - DATA{Input/TreeBarkTexture.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFT1DImageFilterTestOutput.mha + DATA{Input/TreeBarkTexture.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFT1DImageFilterTestOutput.mha itkFFT1DImageFilterTest - DATA{Input/TreeBarkTexture.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFT1DImageFilterTestOutput.mha - ) -itk_add_test(NAME itkVnlComplexToComplex1DFFTImageFilterTest - COMMAND ITKFFTTestDriver + DATA{Input/TreeBarkTexture.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFT1DImageFilterTestOutput.mha) +itk_add_test( + NAME + itkVnlComplexToComplex1DFFTImageFilterTest + COMMAND + ITKFFTTestDriver --compare - DATA{Input/TreeBarkTexture.png} - ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplex1DFFTImageFilterTestOutput.mhd + DATA{Input/TreeBarkTexture.png} + ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplex1DFFTImageFilterTestOutput.mhd itkComplexToComplex1DFFTImageFilterTest - DATA{Input/itkForward1DFFTImageFilterTestBaselineRealFull.mhd,itkForward1DFFTImageFilterTestBaselineRealFull.raw} - DATA{Input/itkForward1DFFTImageFilterTestBaselineImaginaryFull.mhd,itkForward1DFFTImageFilterTestBaselineImaginaryFull.raw} - ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplex1DFFTImageFilterTestOutput.mhd - 1 - ) -itk_add_test(NAME itkVnlForward1DFFTImageFilterTest - COMMAND ITKFFTTestDriver + DATA{Input/itkForward1DFFTImageFilterTestBaselineRealFull.mhd,itkForward1DFFTImageFilterTestBaselineRealFull.raw} + DATA{Input/itkForward1DFFTImageFilterTestBaselineImaginaryFull.mhd,itkForward1DFFTImageFilterTestBaselineImaginaryFull.raw} + ${ITK_TEST_OUTPUT_DIR}/itkVnlComplexToComplex1DFFTImageFilterTestOutput.mhd + 1) +itk_add_test( + NAME + itkVnlForward1DFFTImageFilterTest + COMMAND + ITKFFTTestDriver --compare - DATA{Input/itkForward1DFFTImageFilterTestBaselineRealFull.mhd,itkForward1DFFTImageFilterTestBaselineRealFull.raw} - ${ITK_TEST_OUTPUT_DIR}/itkVnlForward1DFFTImageFilterTestOutputReal.mha + DATA{Input/itkForward1DFFTImageFilterTestBaselineRealFull.mhd,itkForward1DFFTImageFilterTestBaselineRealFull.raw} + ${ITK_TEST_OUTPUT_DIR}/itkVnlForward1DFFTImageFilterTestOutputReal.mha --compare - DATA{Input/itkForward1DFFTImageFilterTestBaselineImaginaryFull.mhd,itkForward1DFFTImageFilterTestBaselineImaginaryFull.raw} - ${ITK_TEST_OUTPUT_DIR}/itkVnlForward1DFFTImageFilterTestOutputImaginary.mha + DATA{Input/itkForward1DFFTImageFilterTestBaselineImaginaryFull.mhd,itkForward1DFFTImageFilterTestBaselineImaginaryFull.raw} + ${ITK_TEST_OUTPUT_DIR}/itkVnlForward1DFFTImageFilterTestOutputImaginary.mha itkForward1DFFTImageFilterTest - DATA{Input/TreeBarkTexture.png} - ${ITK_TEST_OUTPUT_DIR}/itkVnlForward1DFFTImageFilterTestOutput - 1 - ) -itk_add_test(NAME itkVnlInverse1DFFTImageFilterTest - COMMAND ITKFFTTestDriver + DATA{Input/TreeBarkTexture.png} + ${ITK_TEST_OUTPUT_DIR}/itkVnlForward1DFFTImageFilterTestOutput + 1) +itk_add_test( + NAME + itkVnlInverse1DFFTImageFilterTest + COMMAND + ITKFFTTestDriver --compare - DATA{Input/TreeBarkTexture.png} - ${ITK_TEST_OUTPUT_DIR}/itkVnlInverse1DFFTImageFilterTestOutput.mhd + DATA{Input/TreeBarkTexture.png} + ${ITK_TEST_OUTPUT_DIR}/itkVnlInverse1DFFTImageFilterTestOutput.mhd itkInverse1DFFTImageFilterTest - DATA{Input/itkForward1DFFTImageFilterTestBaselineRealFull.mhd,itkForward1DFFTImageFilterTestBaselineRealFull.raw} - DATA{Input/itkForward1DFFTImageFilterTestBaselineImaginaryFull.mhd,itkForward1DFFTImageFilterTestBaselineImaginaryFull.raw} - ${ITK_TEST_OUTPUT_DIR}/itkVnlInverse1DFFTImageFilterTestOutput.mhd - 1 - ) -itk_add_test(NAME itkVnlFFT1DImageFilterTest - COMMAND ITKFFTTestDriver + DATA{Input/itkForward1DFFTImageFilterTestBaselineRealFull.mhd,itkForward1DFFTImageFilterTestBaselineRealFull.raw} + DATA{Input/itkForward1DFFTImageFilterTestBaselineImaginaryFull.mhd,itkForward1DFFTImageFilterTestBaselineImaginaryFull.raw} + ${ITK_TEST_OUTPUT_DIR}/itkVnlInverse1DFFTImageFilterTestOutput.mhd + 1) +itk_add_test( + NAME + itkVnlFFT1DImageFilterTest + COMMAND + ITKFFTTestDriver --compare - DATA{Input/TreeBarkTexture.png} - ${ITK_TEST_OUTPUT_DIR}/itkVnlFFT1DImageFilterTestOutput.mha + DATA{Input/TreeBarkTexture.png} + ${ITK_TEST_OUTPUT_DIR}/itkVnlFFT1DImageFilterTestOutput.mha itkFFT1DImageFilterTest - DATA{Input/TreeBarkTexture.png} - ${ITK_TEST_OUTPUT_DIR}/itkVnlFFT1DImageFilterTestOutput.mha - 1 - ) + DATA{Input/TreeBarkTexture.png} + ${ITK_TEST_OUTPUT_DIR}/itkVnlFFT1DImageFilterTestOutput.mha + 1) if(ITK_USE_FFTWF OR ITK_USE_FFTWD) - itk_add_test(NAME itkFFTWForward1DFFTImageFilterTest - COMMAND ITKFFTTestDriver + itk_add_test( + NAME + itkFFTWForward1DFFTImageFilterTest + COMMAND + ITKFFTTestDriver --compare - DATA{Input/itkForward1DFFTImageFilterTestBaselineRealFull.mhd,itkForward1DFFTImageFilterTestBaselineRealFull.raw} - ${ITK_TEST_OUTPUT_DIR}/itkFFTWForward1DFFTImageFilterTestOutputReal.mha + DATA{Input/itkForward1DFFTImageFilterTestBaselineRealFull.mhd,itkForward1DFFTImageFilterTestBaselineRealFull.raw} + ${ITK_TEST_OUTPUT_DIR}/itkFFTWForward1DFFTImageFilterTestOutputReal.mha --compare - DATA{Input/itkForward1DFFTImageFilterTestBaselineImaginaryFull.mhd,itkForward1DFFTImageFilterTestBaselineImaginaryFull.raw} - ${ITK_TEST_OUTPUT_DIR}/itkFFTWForward1DFFTImageFilterTestOutputImaginary.mha + DATA{Input/itkForward1DFFTImageFilterTestBaselineImaginaryFull.mhd,itkForward1DFFTImageFilterTestBaselineImaginaryFull.raw} + ${ITK_TEST_OUTPUT_DIR}/itkFFTWForward1DFFTImageFilterTestOutputImaginary.mha itkForward1DFFTImageFilterTest - DATA{Input/TreeBarkTexture.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTWForward1DFFTImageFilterTestOutput - 2 - ) - itk_add_test(NAME itkFFTWInverse1DFFTImageFilterTest - COMMAND ITKFFTTestDriver + DATA{Input/TreeBarkTexture.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTWForward1DFFTImageFilterTestOutput + 2) + itk_add_test( + NAME + itkFFTWInverse1DFFTImageFilterTest + COMMAND + ITKFFTTestDriver --compare - DATA{Input/TreeBarkTexture.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTWInverse1DFFTImageFilterTestOutput.mha + DATA{Input/TreeBarkTexture.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTWInverse1DFFTImageFilterTestOutput.mha itkInverse1DFFTImageFilterTest - DATA{Input/itkForward1DFFTImageFilterTestBaselineRealFull.mhd,itkForward1DFFTImageFilterTestBaselineRealFull.raw} - DATA{Input/itkForward1DFFTImageFilterTestBaselineImaginaryFull.mhd,itkForward1DFFTImageFilterTestBaselineImaginaryFull.raw} - ${ITK_TEST_OUTPUT_DIR}/itkFFTWInverse1DFFTImageFilterTestOutput.mha - 2 - ) - itk_add_test(NAME itkFFTWComplexToComplex1DFFTImageFilterTest - COMMAND ITKFFTTestDriver + DATA{Input/itkForward1DFFTImageFilterTestBaselineRealFull.mhd,itkForward1DFFTImageFilterTestBaselineRealFull.raw} + DATA{Input/itkForward1DFFTImageFilterTestBaselineImaginaryFull.mhd,itkForward1DFFTImageFilterTestBaselineImaginaryFull.raw} + ${ITK_TEST_OUTPUT_DIR}/itkFFTWInverse1DFFTImageFilterTestOutput.mha + 2) + itk_add_test( + NAME + itkFFTWComplexToComplex1DFFTImageFilterTest + COMMAND + ITKFFTTestDriver --compare - DATA{Input/TreeBarkTexture.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplex1DFFTImageFilterTestOutput.mha + DATA{Input/TreeBarkTexture.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplex1DFFTImageFilterTestOutput.mha itkComplexToComplex1DFFTImageFilterTest - DATA{Input/itkForward1DFFTImageFilterTestBaselineRealFull.mhd} - DATA{Input/itkForward1DFFTImageFilterTestBaselineImaginaryFull.mhd} - ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplex1DFFTImageFilterTestOutput.mha - 2 - ) - itk_add_test(NAME itkFFTW1DImageFilterTest - COMMAND ITKFFTTestDriver + DATA{Input/itkForward1DFFTImageFilterTestBaselineRealFull.mhd} + DATA{Input/itkForward1DFFTImageFilterTestBaselineImaginaryFull.mhd} + ${ITK_TEST_OUTPUT_DIR}/itkFFTWComplexToComplex1DFFTImageFilterTestOutput.mha + 2) + itk_add_test( + NAME + itkFFTW1DImageFilterTest + COMMAND + ITKFFTTestDriver --compare - DATA{Input/TreeBarkTexture.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTW1DImageFilterTestOutput.mha + DATA{Input/TreeBarkTexture.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTW1DImageFilterTestOutput.mha itkFFT1DImageFilterTest - DATA{Input/TreeBarkTexture.png} - ${ITK_TEST_OUTPUT_DIR}/itkFFTW1DImageFilterTestOutput.mha - 2 - ) + DATA{Input/TreeBarkTexture.png} + ${ITK_TEST_OUTPUT_DIR}/itkFFTW1DImageFilterTestOutput.mha + 2) endif() diff --git a/Modules/Filtering/FFT/wrapping/itkComplexToComplex1DFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkComplexToComplex1DFFTImageFilter.wrap index 1ca210b8941..638bab2bc4c 100644 --- a/Modules/Filtering/FFT/wrapping/itkComplexToComplex1DFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkComplexToComplex1DFFTImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ComplexToComplex1DFFTImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 1) +itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkComplexToComplexFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkComplexToComplexFFTImageFilter.wrap index 951f6039ae9..746b1f3caba 100644 --- a/Modules/Filtering/FFT/wrapping/itkComplexToComplexFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkComplexToComplexFFTImageFilter.wrap @@ -2,5 +2,5 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkComplexToComplexFFTImageFilter.h") itk_wrap_simple_class("itk::ComplexToComplexFFTImageFilterEnums") itk_wrap_class("itk::ComplexToComplexFFTImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 1) +itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkFFTPadImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkFFTPadImageFilter.wrap index e4f2f029883..8d4b5d2b915 100644 --- a/Modules/Filtering/FFT/wrapping/itkFFTPadImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkFFTPadImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::FFTPadImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkFFTShiftImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkFFTShiftImageFilter.wrap index 45d85f1d0ab..49c34de9222 100644 --- a/Modules/Filtering/FFT/wrapping/itkFFTShiftImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkFFTShiftImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::FFTShiftImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkFFTWComplexToComplex1DFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkFFTWComplexToComplex1DFFTImageFilter.wrap index eba710071a0..d82735d5c06 100644 --- a/Modules/Filtering/FFT/wrapping/itkFFTWComplexToComplex1DFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkFFTWComplexToComplex1DFFTImageFilter.wrap @@ -1,10 +1,10 @@ if(ITK_USE_FFTWF OR ITK_USE_FFTWD) itk_wrap_class("itk::FFTWComplexToComplex1DFFTImageFilter" POINTER) - if(ITK_USE_FFTWF AND ITK_WRAP_complex_float) - itk_wrap_image_filter(CF 1) - endif() - if(ITK_USE_FFTWD AND ITK_WRAP_complex_double) - itk_wrap_image_filter(CD 1) - endif() + if(ITK_USE_FFTWF AND ITK_WRAP_complex_float) + itk_wrap_image_filter(CF 1) + endif() + if(ITK_USE_FFTWD AND ITK_WRAP_complex_double) + itk_wrap_image_filter(CD 1) + endif() itk_end_wrap_class() endif() diff --git a/Modules/Filtering/FFT/wrapping/itkFFTWComplexToComplexFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkFFTWComplexToComplexFFTImageFilter.wrap index d8d38201c00..49ad7d1bc7b 100644 --- a/Modules/Filtering/FFT/wrapping/itkFFTWComplexToComplexFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkFFTWComplexToComplexFFTImageFilter.wrap @@ -1,10 +1,10 @@ if(ITK_USE_FFTWF OR ITK_USE_FFTWD) itk_wrap_class("itk::FFTWComplexToComplexFFTImageFilter" POINTER) - if(ITK_USE_FFTWF AND ITK_WRAP_complex_float) - itk_wrap_image_filter(CF 1) - endif() - if(ITK_USE_FFTWD AND ITK_WRAP_complex_double) - itk_wrap_image_filter(CD 1) - endif() + if(ITK_USE_FFTWF AND ITK_WRAP_complex_float) + itk_wrap_image_filter(CF 1) + endif() + if(ITK_USE_FFTWD AND ITK_WRAP_complex_double) + itk_wrap_image_filter(CD 1) + endif() itk_end_wrap_class() endif() diff --git a/Modules/Filtering/FFT/wrapping/itkFFTWForward1DFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkFFTWForward1DFFTImageFilter.wrap index 7851cabe076..d045fd2e4c3 100644 --- a/Modules/Filtering/FFT/wrapping/itkFFTWForward1DFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkFFTWForward1DFFTImageFilter.wrap @@ -1,15 +1,19 @@ if(ITK_USE_FFTWF OR ITK_USE_FFTWD) itk_wrap_class("itk::FFTWForward1DFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_USE_FFTWF AND ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_IF${d}}" "${ITKT_IF${d}}") - endif() + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_USE_FFTWF + AND ITK_WRAP_complex_float + AND ITK_WRAP_float) + itk_wrap_template("${ITKM_IF${d}}" "${ITKT_IF${d}}") + endif() - if(ITK_USE_FFTWD AND ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ID${d}}" "${ITKT_ID${d}}") - endif() + if(ITK_USE_FFTWD + AND ITK_WRAP_complex_double + AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ID${d}}" "${ITKT_ID${d}}") endif() - endforeach() + endif() + endforeach() itk_end_wrap_class() endif() diff --git a/Modules/Filtering/FFT/wrapping/itkFFTWForwardFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkFFTWForwardFFTImageFilter.wrap index 556fc413243..7bdcaab7505 100644 --- a/Modules/Filtering/FFT/wrapping/itkFFTWForwardFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkFFTWForwardFFTImageFilter.wrap @@ -1,15 +1,19 @@ if(ITK_USE_FFTWF OR ITK_USE_FFTWD) itk_wrap_class("itk::FFTWForwardFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_USE_FFTWF AND ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_IF${d}}${ITKM_ICF${d}}" "${ITKT_IF${d}}, ${ITKT_ICF${d}}") - endif() + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_USE_FFTWF + AND ITK_WRAP_complex_float + AND ITK_WRAP_float) + itk_wrap_template("${ITKM_IF${d}}${ITKM_ICF${d}}" "${ITKT_IF${d}}, ${ITKT_ICF${d}}") + endif() - if(ITK_USE_FFTWD AND ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ID${d}}${ITKM_ICD${d}}" "${ITKT_ID${d}}, ${ITKT_ICD${d}}") - endif() + if(ITK_USE_FFTWD + AND ITK_WRAP_complex_double + AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ID${d}}${ITKM_ICD${d}}" "${ITKT_ID${d}}, ${ITKT_ICD${d}}") endif() - endforeach() + endif() + endforeach() itk_end_wrap_class() endif() diff --git a/Modules/Filtering/FFT/wrapping/itkFFTWGlobalConfiguration.wrap b/Modules/Filtering/FFT/wrapping/itkFFTWGlobalConfiguration.wrap index 7d30bef2680..0f08577cb50 100644 --- a/Modules/Filtering/FFT/wrapping/itkFFTWGlobalConfiguration.wrap +++ b/Modules/Filtering/FFT/wrapping/itkFFTWGlobalConfiguration.wrap @@ -1,4 +1,4 @@ -if((ITK_USE_FFTWF OR ITK_USE_FFTWD) AND NOT ITK_USE_CUFFTW ) +if((ITK_USE_FFTWF OR ITK_USE_FFTWD) AND NOT ITK_USE_CUFFTW) itk_wrap_simple_class("itk::FFTWGlobalConfiguration") set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) diff --git a/Modules/Filtering/FFT/wrapping/itkFFTWHalfHermitianToRealInverseFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkFFTWHalfHermitianToRealInverseFFTImageFilter.wrap index c3b2b1f3461..fa8a13a27cd 100644 --- a/Modules/Filtering/FFT/wrapping/itkFFTWHalfHermitianToRealInverseFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkFFTWHalfHermitianToRealInverseFFTImageFilter.wrap @@ -1,15 +1,19 @@ if(ITK_USE_FFTWF OR ITK_USE_FFTWD) itk_wrap_class("itk::FFTWHalfHermitianToRealInverseFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_USE_FFTWF AND ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_ICF${d}}${ITKM_IF${d}}" "${ITKT_ICF${d}}, ${ITKT_IF${d}}") - endif() + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_USE_FFTWF + AND ITK_WRAP_complex_float + AND ITK_WRAP_float) + itk_wrap_template("${ITKM_ICF${d}}${ITKM_IF${d}}" "${ITKT_ICF${d}}, ${ITKT_IF${d}}") + endif() - if(ITK_USE_FFTWD AND ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ICD${d}}${ITKM_ID${d}}" "${ITKT_ICD${d}}, ${ITKT_ID${d}}") - endif() + if(ITK_USE_FFTWD + AND ITK_WRAP_complex_double + AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ICD${d}}${ITKM_ID${d}}" "${ITKT_ICD${d}}, ${ITKT_ID${d}}") endif() - endforeach() + endif() + endforeach() itk_end_wrap_class() endif() diff --git a/Modules/Filtering/FFT/wrapping/itkFFTWInverse1DFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkFFTWInverse1DFFTImageFilter.wrap index 9b123dd7847..9593d754ca4 100644 --- a/Modules/Filtering/FFT/wrapping/itkFFTWInverse1DFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkFFTWInverse1DFFTImageFilter.wrap @@ -1,15 +1,19 @@ if(ITK_USE_FFTWF OR ITK_USE_FFTWD) itk_wrap_class("itk::FFTWInverse1DFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_USE_FFTWF AND ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_ICF${d}}" "${ITKT_ICF${d}}") - endif() + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_USE_FFTWF + AND ITK_WRAP_complex_float + AND ITK_WRAP_float) + itk_wrap_template("${ITKM_ICF${d}}" "${ITKT_ICF${d}}") + endif() - if(ITK_USE_FFTWD AND ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ICD${d}}" "${ITKT_ICD${d}}") - endif() + if(ITK_USE_FFTWD + AND ITK_WRAP_complex_double + AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ICD${d}}" "${ITKT_ICD${d}}") endif() - endforeach() + endif() + endforeach() itk_end_wrap_class() endif() diff --git a/Modules/Filtering/FFT/wrapping/itkFFTWInverseFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkFFTWInverseFFTImageFilter.wrap index afaf9b38cd8..28e61d347ff 100644 --- a/Modules/Filtering/FFT/wrapping/itkFFTWInverseFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkFFTWInverseFFTImageFilter.wrap @@ -1,15 +1,19 @@ if(ITK_USE_FFTWF OR ITK_USE_FFTWD) itk_wrap_class("itk::FFTWInverseFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_USE_FFTWF AND ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_ICF${d}}${ITKM_IF${d}}" "${ITKT_ICF${d}}, ${ITKT_IF${d}}") - endif() + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_USE_FFTWF + AND ITK_WRAP_complex_float + AND ITK_WRAP_float) + itk_wrap_template("${ITKM_ICF${d}}${ITKM_IF${d}}" "${ITKT_ICF${d}}, ${ITKT_IF${d}}") + endif() - if(ITK_USE_FFTWD AND ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ICD${d}}${ITKM_ID${d}}" "${ITKT_ICD${d}}, ${ITKT_ID${d}}") - endif() + if(ITK_USE_FFTWD + AND ITK_WRAP_complex_double + AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ICD${d}}${ITKM_ID${d}}" "${ITKT_ICD${d}}, ${ITKT_ID${d}}") endif() - endforeach() + endif() + endforeach() itk_end_wrap_class() endif() diff --git a/Modules/Filtering/FFT/wrapping/itkFFTWRealToHalfHermitianForwardFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkFFTWRealToHalfHermitianForwardFFTImageFilter.wrap index 689e3f68ce6..048da0cf1aa 100644 --- a/Modules/Filtering/FFT/wrapping/itkFFTWRealToHalfHermitianForwardFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkFFTWRealToHalfHermitianForwardFFTImageFilter.wrap @@ -1,15 +1,19 @@ if(ITK_USE_FFTWF OR ITK_USE_FFTWD) itk_wrap_class("itk::FFTWRealToHalfHermitianForwardFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_USE_FFTWF AND ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_IF${d}}${ITKM_ICF${d}}" "${ITKT_IF${d}}, ${ITKT_ICF${d}}") - endif() + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_USE_FFTWF + AND ITK_WRAP_complex_float + AND ITK_WRAP_float) + itk_wrap_template("${ITKM_IF${d}}${ITKM_ICF${d}}" "${ITKT_IF${d}}, ${ITKT_ICF${d}}") + endif() - if(ITK_USE_FFTWD AND ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ID${d}}${ITKM_ICD${d}}" "${ITKT_ID${d}}, ${ITKT_ICD${d}}") - endif() + if(ITK_USE_FFTWD + AND ITK_WRAP_complex_double + AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ID${d}}${ITKM_ICD${d}}" "${ITKT_ID${d}}, ${ITKT_ICD${d}}") endif() - endforeach() + endif() + endforeach() itk_end_wrap_class() endif() diff --git a/Modules/Filtering/FFT/wrapping/itkForward1DFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkForward1DFFTImageFilter.wrap index c1eb0a251eb..faf6e7979bf 100644 --- a/Modules/Filtering/FFT/wrapping/itkForward1DFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkForward1DFFTImageFilter.wrap @@ -1,12 +1,12 @@ itk_wrap_class("itk::Forward1DFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_IF${d}}" "${ITKT_IF${d}}") - endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ID${d}}" "${ITKT_ID${d}}") - endif() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_template("${ITKM_IF${d}}" "${ITKT_IF${d}}") endif() - endforeach() + if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ID${d}}" "${ITKT_ID${d}}") + endif() + endif() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkForwardFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkForwardFFTImageFilter.wrap index c8ab246a8ff..4228c7feb09 100644 --- a/Modules/Filtering/FFT/wrapping/itkForwardFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkForwardFFTImageFilter.wrap @@ -1,13 +1,13 @@ itk_wrap_class("itk::ForwardFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_IF${d}}${ITKM_ICF${d}}" "${ITKT_IF${d}}, ${ITKT_ICF${d}}") - endif() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_template("${ITKM_IF${d}}${ITKM_ICF${d}}" "${ITKT_IF${d}}, ${ITKT_ICF${d}}") + endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ID${d}}${ITKM_ICD${d}}" "${ITKT_ID${d}}, ${ITKT_ICD${d}}") - endif() + if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ID${d}}${ITKM_ICD${d}}" "${ITKT_ID${d}}, ${ITKT_ICD${d}}") endif() - endforeach() + endif() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkFullToHalfHermitianImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkFullToHalfHermitianImageFilter.wrap index 1c8ce767522..cc51f7a5212 100644 --- a/Modules/Filtering/FFT/wrapping/itkFullToHalfHermitianImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkFullToHalfHermitianImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::FullToHalfHermitianImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 1) +itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkHalfHermitianToRealInverseFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkHalfHermitianToRealInverseFFTImageFilter.wrap index 90ac9ce42ec..a7695ad86c0 100644 --- a/Modules/Filtering/FFT/wrapping/itkHalfHermitianToRealInverseFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkHalfHermitianToRealInverseFFTImageFilter.wrap @@ -1,13 +1,13 @@ itk_wrap_class("itk::HalfHermitianToRealInverseFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_ICF${d}}${ITKM_IF${d}}" "${ITKT_ICF${d}}, ${ITKT_IF${d}}") - endif() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_template("${ITKM_ICF${d}}${ITKM_IF${d}}" "${ITKT_ICF${d}}, ${ITKT_IF${d}}") + endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ICD${d}}${ITKM_ID${d}}" "${ITKT_ICD${d}}, ${ITKT_ID${d}}") - endif() + if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ICD${d}}${ITKM_ID${d}}" "${ITKT_ICD${d}}, ${ITKT_ID${d}}") endif() - endforeach() + endif() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkHalfToFullHermitianImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkHalfToFullHermitianImageFilter.wrap index e08de0f49c4..811938013b1 100644 --- a/Modules/Filtering/FFT/wrapping/itkHalfToFullHermitianImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkHalfToFullHermitianImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::HalfToFullHermitianImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 1) +itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkInverse1DFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkInverse1DFFTImageFilter.wrap index 168c43d71f4..216c583c1ab 100644 --- a/Modules/Filtering/FFT/wrapping/itkInverse1DFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkInverse1DFFTImageFilter.wrap @@ -1,13 +1,13 @@ itk_wrap_include("itkImage.h") itk_wrap_class("itk::Inverse1DFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_ICF${d}}" "${ITKT_ICF${d}}") - endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ICD${d}}" "${ITKT_ICD${d}}") - endif() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_template("${ITKM_ICF${d}}" "${ITKT_ICF${d}}") endif() - endforeach() + if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ICD${d}}" "${ITKT_ICD${d}}") + endif() + endif() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkInverseFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkInverseFFTImageFilter.wrap index 1588fd79db0..3315c2cd87a 100644 --- a/Modules/Filtering/FFT/wrapping/itkInverseFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkInverseFFTImageFilter.wrap @@ -1,13 +1,13 @@ itk_wrap_class("itk::InverseFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_ICF${d}}${ITKM_IF${d}}" "${ITKT_ICF${d}}, ${ITKT_IF${d}}") - endif() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_template("${ITKM_ICF${d}}${ITKM_IF${d}}" "${ITKT_ICF${d}}, ${ITKT_IF${d}}") + endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ICD${d}}${ITKM_ID${d}}" "${ITKT_ICD${d}}, ${ITKT_ID${d}}") - endif() + if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ICD${d}}${ITKM_ID${d}}" "${ITKT_ICD${d}}, ${ITKT_ID${d}}") endif() - endforeach() + endif() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkRealToHalfHermitianForwardFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkRealToHalfHermitianForwardFFTImageFilter.wrap index 466841f06b0..b3c85b689f1 100644 --- a/Modules/Filtering/FFT/wrapping/itkRealToHalfHermitianForwardFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkRealToHalfHermitianForwardFFTImageFilter.wrap @@ -1,13 +1,13 @@ itk_wrap_class("itk::RealToHalfHermitianForwardFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_IF${d}}${ITKM_ICF${d}}" "${ITKT_IF${d}}, ${ITKT_ICF${d}}") - endif() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_template("${ITKM_IF${d}}${ITKM_ICF${d}}" "${ITKT_IF${d}}, ${ITKT_ICF${d}}") + endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ID${d}}${ITKM_ICD${d}}" "${ITKT_ID${d}}, ${ITKT_ICD${d}}") - endif() + if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ID${d}}${ITKM_ICD${d}}" "${ITKT_ID${d}}, ${ITKT_ICD${d}}") endif() - endforeach() + endif() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkVnlComplexToComplex1DFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkVnlComplexToComplex1DFFTImageFilter.wrap index 66237ad8473..3ed66a26365 100644 --- a/Modules/Filtering/FFT/wrapping/itkVnlComplexToComplex1DFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkVnlComplexToComplex1DFFTImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::VnlComplexToComplex1DFFTImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 1) +itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkVnlComplexToComplexFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkVnlComplexToComplexFFTImageFilter.wrap index 4bfab9ba7b7..968946e3ee1 100644 --- a/Modules/Filtering/FFT/wrapping/itkVnlComplexToComplexFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkVnlComplexToComplexFFTImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::VnlComplexToComplexFFTImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 1) +itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkVnlForward1DFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkVnlForward1DFFTImageFilter.wrap index 874f331d826..80184d6b15e 100644 --- a/Modules/Filtering/FFT/wrapping/itkVnlForward1DFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkVnlForward1DFFTImageFilter.wrap @@ -1,13 +1,13 @@ itk_wrap_include("itkImage.h") itk_wrap_class("itk::VnlForward1DFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_IF${d}}" "${ITKT_IF${d}}") - endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ID${d}}" "${ITKT_ID${d}}") - endif() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_template("${ITKM_IF${d}}" "${ITKT_IF${d}}") endif() - endforeach() + if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ID${d}}" "${ITKT_ID${d}}") + endif() + endif() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkVnlForwardFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkVnlForwardFFTImageFilter.wrap index b6192da1c39..43d3aeb2cb9 100644 --- a/Modules/Filtering/FFT/wrapping/itkVnlForwardFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkVnlForwardFFTImageFilter.wrap @@ -1,13 +1,13 @@ itk_wrap_class("itk::VnlForwardFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_IF${d}}${ITKM_ICF${d}}" "${ITKT_IF${d}}, ${ITKT_ICF${d}}") - endif() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_template("${ITKM_IF${d}}${ITKM_ICF${d}}" "${ITKT_IF${d}}, ${ITKT_ICF${d}}") + endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ID${d}}${ITKM_ICD${d}}" "${ITKT_ID${d}}, ${ITKT_ICD${d}}") - endif() + if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ID${d}}${ITKM_ICD${d}}" "${ITKT_ID${d}}, ${ITKT_ICD${d}}") endif() - endforeach() + endif() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkVnlHalfHermitianToRealInverseFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkVnlHalfHermitianToRealInverseFFTImageFilter.wrap index e99dace2a69..ff0c83efdb4 100644 --- a/Modules/Filtering/FFT/wrapping/itkVnlHalfHermitianToRealInverseFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkVnlHalfHermitianToRealInverseFFTImageFilter.wrap @@ -1,13 +1,13 @@ itk_wrap_class("itk::VnlHalfHermitianToRealInverseFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_ICF${d}}${ITKM_IF${d}}" "${ITKT_ICF${d}}, ${ITKT_IF${d}}") - endif() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_template("${ITKM_ICF${d}}${ITKM_IF${d}}" "${ITKT_ICF${d}}, ${ITKT_IF${d}}") + endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ICD${d}}${ITKM_ID${d}}" "${ITKT_ICD${d}}, ${ITKT_ID${d}}") - endif() + if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ICD${d}}${ITKM_ID${d}}" "${ITKT_ICD${d}}, ${ITKT_ID${d}}") endif() - endforeach() + endif() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkVnlInverse1DFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkVnlInverse1DFFTImageFilter.wrap index 9c623b22e03..81ff73f38c2 100644 --- a/Modules/Filtering/FFT/wrapping/itkVnlInverse1DFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkVnlInverse1DFFTImageFilter.wrap @@ -1,13 +1,13 @@ itk_wrap_class("itk::VnlInverse1DFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_ICF${d}}" "${ITKT_ICF${d}}") - endif() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_template("${ITKM_ICF${d}}" "${ITKT_ICF${d}}") + endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ICD${d}}" "${ITKT_ICD${d}}") - endif() + if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ICD${d}}" "${ITKT_ICD${d}}") endif() - endforeach() + endif() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkVnlInverseFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkVnlInverseFFTImageFilter.wrap index a06ff635c87..e7975a81d82 100644 --- a/Modules/Filtering/FFT/wrapping/itkVnlInverseFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkVnlInverseFFTImageFilter.wrap @@ -1,13 +1,13 @@ itk_wrap_class("itk::VnlInverseFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_ICF${d}}${ITKM_IF${d}}" "${ITKT_ICF${d}}, ${ITKT_IF${d}}") - endif() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_template("${ITKM_ICF${d}}${ITKM_IF${d}}" "${ITKT_ICF${d}}, ${ITKT_IF${d}}") + endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ICD${d}}${ITKM_ID${d}}" "${ITKT_ICD${d}}, ${ITKT_ID${d}}") - endif() + if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ICD${d}}${ITKM_ID${d}}" "${ITKT_ICD${d}}, ${ITKT_ID${d}}") endif() - endforeach() + endif() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/itkVnlRealToHalfHermitianForwardFFTImageFilter.wrap b/Modules/Filtering/FFT/wrapping/itkVnlRealToHalfHermitianForwardFFTImageFilter.wrap index 19dab2078f6..8d4ef9efcda 100644 --- a/Modules/Filtering/FFT/wrapping/itkVnlRealToHalfHermitianForwardFFTImageFilter.wrap +++ b/Modules/Filtering/FFT/wrapping/itkVnlRealToHalfHermitianForwardFFTImageFilter.wrap @@ -1,13 +1,13 @@ itk_wrap_class("itk::VnlRealToHalfHermitianForwardFFTImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(d GREATER 0 AND d LESS 5) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_IF${d}}${ITKM_ICF${d}}" "${ITKT_IF${d}}, ${ITKT_ICF${d}}") - endif() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(d GREATER 0 AND d LESS 5) + if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_template("${ITKM_IF${d}}${ITKM_ICF${d}}" "${ITKT_IF${d}}, ${ITKT_ICF${d}}") + endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ID${d}}${ITKM_ICD${d}}" "${ITKT_ID${d}}, ${ITKT_ICD${d}}") - endif() + if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ID${d}}${ITKM_ICD${d}}" "${ITKT_ID${d}}, ${ITKT_ICD${d}}") endif() - endforeach() + endif() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/FFT/wrapping/test/CMakeLists.txt b/Modules/Filtering/FFT/wrapping/test/CMakeLists.txt index 4197c6547c7..0e5bd91eed9 100644 --- a/Modules/Filtering/FFT/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/FFT/wrapping/test/CMakeLists.txt @@ -1,16 +1,30 @@ -list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) -if(ITK_WRAP_PYTHON AND ITK_WRAP_float AND wrap_2_index GREATER -1) - itk_python_add_test(NAME PythonFFTImageFilterTest +list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) +if(ITK_WRAP_PYTHON + AND ITK_WRAP_float + AND wrap_2_index GREATER -1) + itk_python_add_test( + NAME + PythonFFTImageFilterTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonFFTImageFilterRealTest.png DATA{Baseline/PythonFFTImageFilterRealTest.png} - --compare ${ITK_TEST_OUTPUT_DIR}/PythonFFTImageFilterImaginaryTest.png DATA{Baseline/PythonFFTImageFilterImaginaryTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/FFTImageFilterTest.py - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/PythonFFTImageFilterRealTest.png - ${ITK_TEST_OUTPUT_DIR}/PythonFFTImageFilterImaginaryTest.png - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonFFTImageFilterRealTest.png + DATA{Baseline/PythonFFTImageFilterRealTest.png} + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonFFTImageFilterImaginaryTest.png + DATA{Baseline/PythonFFTImageFilterImaginaryTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/FFTImageFilterTest.py + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/PythonFFTImageFilterRealTest.png + ${ITK_TEST_OUTPUT_DIR}/PythonFFTImageFilterImaginaryTest.png) - itk_python_add_test(NAME PythonFFTObjectFactoryTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/FFTObjectFactoryTest.py - ) + itk_python_add_test( + NAME + PythonFFTObjectFactoryTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/FFTObjectFactoryTest.py) endif() diff --git a/Modules/Filtering/FastMarching/itk-module.cmake b/Modules/Filtering/FastMarching/itk-module.cmake index c55b957f464..6e7788881b9 100644 --- a/Modules/Filtering/FastMarching/itk-module.cmake +++ b/Modules/Filtering/FastMarching/itk-module.cmake @@ -1,17 +1,18 @@ -set(DOCUMENTATION "This module contains implementations of generalized versions +set(DOCUMENTATION + "This module contains implementations of generalized versions of the Fast Marching filter. These implementations cover the use of Fast Marching in both itk::Image and itk::QuadEdgeMesh objects.") -itk_module(ITKFastMarching +itk_module( + ITKFastMarching ENABLE_SHARED COMPILE_DEPENDS - ITKMesh - ITKQuadEdgeMesh - ITKConnectedComponents + ITKMesh + ITKQuadEdgeMesh + ITKConnectedComponents TEST_DEPENDS - ITKTestKernel - ITKImageLabel - ITKIOMesh + ITKTestKernel + ITKImageLabel + ITKIOMesh DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/FastMarching/src/CMakeLists.txt b/Modules/Filtering/FastMarching/src/CMakeLists.txt index afde3bf79d9..af035e0fe68 100644 --- a/Modules/Filtering/FastMarching/src/CMakeLists.txt +++ b/Modules/Filtering/FastMarching/src/CMakeLists.txt @@ -1,8 +1,7 @@ set(ITKFastMarching_SRCS - itkFastMarchingBase.cxx - itkFastMarchingReachedTargetNodesStoppingCriterion.cxx - itkFastMarchingImageFilter.cxx - itkFastMarchingUpwindGradientImageFilter.cxx - ) + itkFastMarchingBase.cxx + itkFastMarchingReachedTargetNodesStoppingCriterion.cxx + itkFastMarchingImageFilter.cxx + itkFastMarchingUpwindGradientImageFilter.cxx) itk_module_add_library(ITKFastMarching ${ITKFastMarching_SRCS}) diff --git a/Modules/Filtering/FastMarching/test/CMakeLists.txt b/Modules/Filtering/FastMarching/test/CMakeLists.txt index 65a353a474f..43c50ab586d 100644 --- a/Modules/Filtering/FastMarching/test/CMakeLists.txt +++ b/Modules/Filtering/FastMarching/test/CMakeLists.txt @@ -1,83 +1,167 @@ itk_module_test() set(ITKFastMarchingTests -itkFastMarchingExtensionImageFilterTest.cxx -itkFastMarchingTest.cxx -itkFastMarchingTest2.cxx -itkFastMarchingUpwindGradientTest.cxx -# New files -itkFastMarchingBaseTest.cxx -itkFastMarchingImageFilterBaseTest.cxx -itkFastMarchingImageFilterRealTest1.cxx -itkFastMarchingImageFilterRealTest2.cxx -itkFastMarchingImageFilterRealWithNumberOfElementsTest.cxx -itkFastMarchingImageTopologicalTest.cxx -itkFastMarchingQuadEdgeMeshFilterBaseTest2.cxx -itkFastMarchingQuadEdgeMeshFilterBaseTest3.cxx -itkFastMarchingQuadEdgeMeshFilterBaseTest4.cxx -itkFastMarchingQuadEdgeMeshFilterBaseTest.cxx -itkFastMarchingQuadEdgeMeshFilterWithNumberOfElementsTest.cxx -itkFastMarchingStoppingCriterionBaseTest.cxx -itkFastMarchingThresholdStoppingCriterionTest.cxx -itkFastMarchingNumberOfElementsStoppingCriterionTest.cxx -itkFastMarchingUpwindGradientBaseTest.cxx -) - -CreateTestDriver(ITKFastMarching "${ITKFastMarching-Test_LIBRARIES}" "${ITKFastMarchingTests}") - -itk_add_test(NAME itkFastMarchingExtensionImageFilterTest - COMMAND ITKFastMarchingTestDriver itkFastMarchingExtensionImageFilterTest) -itk_add_test(NAME itkFastMarchingTest - COMMAND ITKFastMarchingTestDriver itkFastMarchingTest 1.0 1.0 100.0 0 0 1.0 0.0 0) -itk_add_test(NAME itkFastMarchingTest2 - COMMAND ITKFastMarchingTestDriver itkFastMarchingTest2) -itk_add_test(NAME itkFastMarchingUpwindGradientTest - COMMAND ITKFastMarchingTestDriver itkFastMarchingUpwindGradientTest) - -itk_add_test(NAME itkFastMarchingBaseTest0 - COMMAND ITKFastMarchingTestDriver itkFastMarchingBaseTest 0) -itk_add_test(NAME itkFastMarchingBaseTest1 - COMMAND ITKFastMarchingTestDriver itkFastMarchingBaseTest 1) - -itk_add_test(NAME itkFastMarchingImageFilterBaseTest - COMMAND ITKFastMarchingTestDriver itkFastMarchingImageFilterBaseTest) - -itk_add_test(NAME itkFastMarchingImageFilterRealTest1 - COMMAND ITKFastMarchingTestDriver itkFastMarchingImageFilterRealTest1) - -itk_add_test(NAME itkFastMarchingImageFilterRealTest2 - COMMAND ITKFastMarchingTestDriver itkFastMarchingImageFilterRealTest2) - -itk_add_test(NAME itkFastMarchingImageFilterRealWithNumberOfElementsTest - COMMAND ITKFastMarchingTestDriver - itkFastMarchingImageFilterRealWithNumberOfElementsTest) - -itk_add_test(NAME itkFastMarchingUpwindGradientBaseTest - COMMAND ITKFastMarchingTestDriver itkFastMarchingUpwindGradientBaseTest) - -itk_add_test(NAME itkFastMarchingQuadEdgeMeshFilterBaseTest - COMMAND ITKFastMarchingTestDriver itkFastMarchingQuadEdgeMeshFilterBaseTest) - -itk_add_test(NAME itkFastMarchingQuadEdgeMeshFilterBaseTest2 - COMMAND ITKFastMarchingTestDriver itkFastMarchingQuadEdgeMeshFilterBaseTest2) - -itk_add_test(NAME itkFastMarchingQuadEdgeMeshFilterBaseTest3 - COMMAND ITKFastMarchingTestDriver itkFastMarchingQuadEdgeMeshFilterBaseTest3) - -itk_add_test(NAME itkFastMarchingQuadEdgeMeshFilterBaseTest4 - COMMAND ITKFastMarchingTestDriver itkFastMarchingQuadEdgeMeshFilterBaseTest4) - -itk_add_test(NAME itkFastMarchingQuadEdgeMeshFilterWithNumberOfElementsTest - COMMAND ITKFastMarchingTestDriver itkFastMarchingQuadEdgeMeshFilterWithNumberOfElementsTest) - -itk_add_test(NAME itkFastMarchingStoppingCriterionBaseTest - COMMAND ITKFastMarchingTestDriver itkFastMarchingStoppingCriterionBaseTest) - -itk_add_test(NAME itkFastMarchingThresholdStoppingCriterionTest - COMMAND ITKFastMarchingTestDriver itkFastMarchingThresholdStoppingCriterionTest) - -itk_add_test(NAME itkFastMarchingNumberOfElementsStoppingCriterionTest - COMMAND ITKFastMarchingTestDriver itkFastMarchingNumberOfElementsStoppingCriterionTest) + itkFastMarchingExtensionImageFilterTest.cxx + itkFastMarchingTest.cxx + itkFastMarchingTest2.cxx + itkFastMarchingUpwindGradientTest.cxx + # New files + itkFastMarchingBaseTest.cxx + itkFastMarchingImageFilterBaseTest.cxx + itkFastMarchingImageFilterRealTest1.cxx + itkFastMarchingImageFilterRealTest2.cxx + itkFastMarchingImageFilterRealWithNumberOfElementsTest.cxx + itkFastMarchingImageTopologicalTest.cxx + itkFastMarchingQuadEdgeMeshFilterBaseTest2.cxx + itkFastMarchingQuadEdgeMeshFilterBaseTest3.cxx + itkFastMarchingQuadEdgeMeshFilterBaseTest4.cxx + itkFastMarchingQuadEdgeMeshFilterBaseTest.cxx + itkFastMarchingQuadEdgeMeshFilterWithNumberOfElementsTest.cxx + itkFastMarchingStoppingCriterionBaseTest.cxx + itkFastMarchingThresholdStoppingCriterionTest.cxx + itkFastMarchingNumberOfElementsStoppingCriterionTest.cxx + itkFastMarchingUpwindGradientBaseTest.cxx) + +createtestdriver(ITKFastMarching "${ITKFastMarching-Test_LIBRARIES}" "${ITKFastMarchingTests}") + +itk_add_test( + NAME + itkFastMarchingExtensionImageFilterTest + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingExtensionImageFilterTest) +itk_add_test( + NAME + itkFastMarchingTest + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingTest + 1.0 + 1.0 + 100.0 + 0 + 0 + 1.0 + 0.0 + 0) +itk_add_test( + NAME + itkFastMarchingTest2 + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingTest2) +itk_add_test( + NAME + itkFastMarchingUpwindGradientTest + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingUpwindGradientTest) + +itk_add_test( + NAME + itkFastMarchingBaseTest0 + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingBaseTest + 0) +itk_add_test( + NAME + itkFastMarchingBaseTest1 + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingBaseTest + 1) + +itk_add_test( + NAME + itkFastMarchingImageFilterBaseTest + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingImageFilterBaseTest) + +itk_add_test( + NAME + itkFastMarchingImageFilterRealTest1 + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingImageFilterRealTest1) + +itk_add_test( + NAME + itkFastMarchingImageFilterRealTest2 + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingImageFilterRealTest2) + +itk_add_test( + NAME + itkFastMarchingImageFilterRealWithNumberOfElementsTest + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingImageFilterRealWithNumberOfElementsTest) + +itk_add_test( + NAME + itkFastMarchingUpwindGradientBaseTest + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingUpwindGradientBaseTest) + +itk_add_test( + NAME + itkFastMarchingQuadEdgeMeshFilterBaseTest + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingQuadEdgeMeshFilterBaseTest) + +itk_add_test( + NAME + itkFastMarchingQuadEdgeMeshFilterBaseTest2 + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingQuadEdgeMeshFilterBaseTest2) + +itk_add_test( + NAME + itkFastMarchingQuadEdgeMeshFilterBaseTest3 + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingQuadEdgeMeshFilterBaseTest3) + +itk_add_test( + NAME + itkFastMarchingQuadEdgeMeshFilterBaseTest4 + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingQuadEdgeMeshFilterBaseTest4) + +itk_add_test( + NAME + itkFastMarchingQuadEdgeMeshFilterWithNumberOfElementsTest + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingQuadEdgeMeshFilterWithNumberOfElementsTest) + +itk_add_test( + NAME + itkFastMarchingStoppingCriterionBaseTest + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingStoppingCriterionBaseTest) + +itk_add_test( + NAME + itkFastMarchingThresholdStoppingCriterionTest + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingThresholdStoppingCriterionTest) + +itk_add_test( + NAME + itkFastMarchingNumberOfElementsStoppingCriterionTest + COMMAND + ITKFastMarchingTestDriver + itkFastMarchingNumberOfElementsStoppingCriterionTest) # ------------------------------------------------------------------------- # Topology constrained front propagation @@ -86,162 +170,208 @@ itk_add_test(NAME itkFastMarchingNumberOfElementsStoppingCriterionTest # ************************************************************************ # 2D -itk_add_test(NAME itkFastMarchingImageFilterTest_Brain2D_SingleSeed_NoTopo - COMMAND ITKFastMarchingTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_singleSeed_NoTopo.nii.gz - DATA{Baseline/BrainProtonDensitySlice_singleSeed_NoTopo_out.nii.gz} - itkFastMarchingImageTopologicalTest - 2 - DATA{Baseline/BrainProtonDensitySlice_speed.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_singleSeed_NoTopo.nii.gz - DATA{Baseline/BrainProtonDensitySlice_singleSeed.nii.gz} - 150 - 0 -) - -itk_add_test(NAME itkFastMarchingImageFilterTest_Brain2D_SingleSeed_StrictTopo - COMMAND ITKFastMarchingTestDriver - --compare DATA{Baseline/BrainProtonDensitySlice_singleSeed_StrictTopo_out.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_singleSeed_StrictTopo.nii.gz - itkFastMarchingImageTopologicalTest - 2 - DATA{Baseline/BrainProtonDensitySlice_speed.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_singleSeed_StrictTopo.nii.gz - DATA{Baseline/BrainProtonDensitySlice_singleSeed.nii.gz} - 150 - 1 -) - -itk_add_test(NAME itkFastMarchingImageFilterTest_Brain2D_SingleSeed_NoHandlesTopo - COMMAND ITKFastMarchingTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_singleSeed_NoHandlesTopo.nii.gz - DATA{Baseline/BrainProtonDensitySlice_singleSeed_NoHandlesTopo_out.nii.gz} - itkFastMarchingImageTopologicalTest - 2 - DATA{Baseline/BrainProtonDensitySlice_speed.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_singleSeed_NoHandlesTopo.nii.gz - DATA{Baseline/BrainProtonDensitySlice_singleSeed.nii.gz} - 150 - 2 -) - -itk_add_test(NAME itkFastMarchingImageFilterTest_Brain2D_multipleSeeds_NoTopo - COMMAND ITKFastMarchingTestDriver - --compare DATA{Baseline/BrainProtonDensitySlice_multipleSeeds_NoTopo_out.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_multipleSeeds_NoTopo.nii.gz - itkFastMarchingImageTopologicalTest 2 +itk_add_test( + NAME + itkFastMarchingImageFilterTest_Brain2D_SingleSeed_NoTopo + COMMAND + ITKFastMarchingTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_singleSeed_NoTopo.nii.gz + DATA{Baseline/BrainProtonDensitySlice_singleSeed_NoTopo_out.nii.gz} + itkFastMarchingImageTopologicalTest + 2 + DATA{Baseline/BrainProtonDensitySlice_speed.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_singleSeed_NoTopo.nii.gz + DATA{Baseline/BrainProtonDensitySlice_singleSeed.nii.gz} + 150 + 0) + +itk_add_test( + NAME + itkFastMarchingImageFilterTest_Brain2D_SingleSeed_StrictTopo + COMMAND + ITKFastMarchingTestDriver + --compare + DATA{Baseline/BrainProtonDensitySlice_singleSeed_StrictTopo_out.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_singleSeed_StrictTopo.nii.gz + itkFastMarchingImageTopologicalTest + 2 + DATA{Baseline/BrainProtonDensitySlice_speed.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_singleSeed_StrictTopo.nii.gz + DATA{Baseline/BrainProtonDensitySlice_singleSeed.nii.gz} + 150 + 1) + +itk_add_test( + NAME + itkFastMarchingImageFilterTest_Brain2D_SingleSeed_NoHandlesTopo + COMMAND + ITKFastMarchingTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_singleSeed_NoHandlesTopo.nii.gz + DATA{Baseline/BrainProtonDensitySlice_singleSeed_NoHandlesTopo_out.nii.gz} + itkFastMarchingImageTopologicalTest + 2 + DATA{Baseline/BrainProtonDensitySlice_speed.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_singleSeed_NoHandlesTopo.nii.gz + DATA{Baseline/BrainProtonDensitySlice_singleSeed.nii.gz} + 150 + 2) + +itk_add_test( + NAME + itkFastMarchingImageFilterTest_Brain2D_multipleSeeds_NoTopo + COMMAND + ITKFastMarchingTestDriver + --compare + DATA{Baseline/BrainProtonDensitySlice_multipleSeeds_NoTopo_out.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_multipleSeeds_NoTopo.nii.gz + itkFastMarchingImageTopologicalTest + 2 DATA{Baseline/BrainProtonDensitySlice_speed.nii.gz} ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_multipleSeeds_NoTopo.nii.gz DATA{Baseline/BrainProtonDensitySlice_multipleSeeds.nii.gz} 150 - 0 -) + 0) -itk_add_test(NAME itkFastMarchingImageFilterTest_Brain2D_multipleSeeds_StrictTopo - COMMAND ITKFastMarchingTestDriver - --compare DATA{Baseline/BrainProtonDensitySlice_multipleSeeds_StrictTopo_out.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_multipleSeeds_StrictTopo.nii.gz +itk_add_test( + NAME + itkFastMarchingImageFilterTest_Brain2D_multipleSeeds_StrictTopo + COMMAND + ITKFastMarchingTestDriver + --compare + DATA{Baseline/BrainProtonDensitySlice_multipleSeeds_StrictTopo_out.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_multipleSeeds_StrictTopo.nii.gz itkFastMarchingImageTopologicalTest 2 DATA{Baseline/BrainProtonDensitySlice_speed.nii.gz} ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_multipleSeeds_StrictTopo.nii.gz DATA{Baseline/BrainProtonDensitySlice_multipleSeeds.nii.gz} 150 - 1 -) + 1) -itk_add_test(NAME itkFastMarchingImageFilterTest_Brain2D_multipleSeeds_NoHandlesTopo - COMMAND ITKFastMarchingTestDriver - --compare DATA{Baseline/BrainProtonDensitySlice_multipleSeeds_NoHandlesTopo_out.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_multipleSeeds_NoHandlesTopo.nii.gz +itk_add_test( + NAME + itkFastMarchingImageFilterTest_Brain2D_multipleSeeds_NoHandlesTopo + COMMAND + ITKFastMarchingTestDriver + --compare + DATA{Baseline/BrainProtonDensitySlice_multipleSeeds_NoHandlesTopo_out.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_multipleSeeds_NoHandlesTopo.nii.gz itkFastMarchingImageTopologicalTest 2 DATA{Baseline/BrainProtonDensitySlice_speed.nii.gz} ${ITK_TEST_OUTPUT_DIR}/test_Brain2D_multipleSeeds_NoHandlesTopo.nii.gz DATA{Baseline/BrainProtonDensitySlice_multipleSeeds.nii.gz} 150 - 2 -) + 2) # ************************************************************************ # 3D -itk_add_test(NAME itkFastMarchingImageFilterTest_torus_multipleSeeds_NoTopo - COMMAND ITKFastMarchingTestDriver - --compare DATA{Baseline/torus_multipleSeeds_NoTopo_out.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_torus_multipleSeeds_NoTopo.nii.gz - itkFastMarchingImageTopologicalTest - 3 - DATA{Baseline/torus.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_torus_multipleSeeds_NoTopo.nii.gz - DATA{Baseline/torus_multipleSeeds.nii.gz} - 150 - 0 -) - -itk_add_test(NAME itkFastMarchingImageFilterTest_torus_multipleSeeds_StrictTopo - COMMAND ITKFastMarchingTestDriver - --compare DATA{Baseline/torus_multipleSeeds_StrictTopo_out.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_torus_multipleSeeds_StrictTopo.nii.gz - itkFastMarchingImageTopologicalTest - 3 - DATA{Baseline/torus.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_torus_multipleSeeds_StrictTopo.nii.gz - DATA{Baseline/torus_multipleSeeds.nii.gz} - 150 - 1 -) - -itk_add_test(NAME itkFastMarchingImageFilterTest_torus_multipleSeeds_NoHandlesTopo - COMMAND ITKFastMarchingTestDriver - --compare DATA{Baseline/torus_multipleSeeds_NoHandlesTopo_out.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_torus_multipleSeeds_NoHandlesTopo.nii.gz - itkFastMarchingImageTopologicalTest - 3 - DATA{Baseline/torus.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_torus_multipleSeeds_NoHandlesTopo.nii.gz - DATA{Baseline/torus_multipleSeeds.nii.gz} - 150 - 2 -) - -itk_add_test(NAME itkFastMarchingImageFilterTest_wm_multipleSeeds_NoTopo - COMMAND ITKFastMarchingTestDriver - --compare DATA{Baseline/wm_multipleSeeds_NoTopo_out.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_wm_multipleSeeds_NoTopo.nii.gz - itkFastMarchingImageTopologicalTest - 3 - DATA{Baseline/wm.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_wm_multipleSeeds_NoTopo.nii.gz - DATA{Baseline/wm_multipleSeeds.nii.gz} - 150 - 0 -) -set_property(TEST itkFastMarchingImageFilterTest_wm_multipleSeeds_NoTopo APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME itkFastMarchingImageFilterTest_wm_multipleSeeds_StrictTopo - COMMAND ITKFastMarchingTestDriver - --compare DATA{Baseline/wm_multipleSeeds_StrictTopo_out.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_wm_multipleSeeds_StrictTopo.nii.gz - itkFastMarchingImageTopologicalTest - 3 - DATA{Baseline/wm.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_wm_multipleSeeds_StrictTopo.nii.gz - DATA{Baseline/wm_multipleSeeds.nii.gz} - 150 - 1 -) -set_property(TEST itkFastMarchingImageFilterTest_wm_multipleSeeds_StrictTopo APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME itkFastMarchingImageFilterTest_wm_multipleSeeds_NoHandlesTopo - COMMAND ITKFastMarchingTestDriver - --compare DATA{Baseline/wm_multipleSeeds_NoHandlesTopo_out.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_wm_multipleSeeds_NoHandlesTopo.nii.gz - itkFastMarchingImageTopologicalTest - 3 - DATA{Baseline/wm.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/test_wm_multipleSeeds_NoHandlesTopo.nii.gz - DATA{Baseline/wm_multipleSeeds.nii.gz} - 150 - 2 -) -set_property(TEST itkFastMarchingImageFilterTest_wm_multipleSeeds_NoHandlesTopo APPEND PROPERTY LABELS RUNS_LONG) +itk_add_test( + NAME + itkFastMarchingImageFilterTest_torus_multipleSeeds_NoTopo + COMMAND + ITKFastMarchingTestDriver + --compare + DATA{Baseline/torus_multipleSeeds_NoTopo_out.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_torus_multipleSeeds_NoTopo.nii.gz + itkFastMarchingImageTopologicalTest + 3 + DATA{Baseline/torus.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_torus_multipleSeeds_NoTopo.nii.gz + DATA{Baseline/torus_multipleSeeds.nii.gz} + 150 + 0) + +itk_add_test( + NAME + itkFastMarchingImageFilterTest_torus_multipleSeeds_StrictTopo + COMMAND + ITKFastMarchingTestDriver + --compare + DATA{Baseline/torus_multipleSeeds_StrictTopo_out.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_torus_multipleSeeds_StrictTopo.nii.gz + itkFastMarchingImageTopologicalTest + 3 + DATA{Baseline/torus.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_torus_multipleSeeds_StrictTopo.nii.gz + DATA{Baseline/torus_multipleSeeds.nii.gz} + 150 + 1) + +itk_add_test( + NAME + itkFastMarchingImageFilterTest_torus_multipleSeeds_NoHandlesTopo + COMMAND + ITKFastMarchingTestDriver + --compare + DATA{Baseline/torus_multipleSeeds_NoHandlesTopo_out.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_torus_multipleSeeds_NoHandlesTopo.nii.gz + itkFastMarchingImageTopologicalTest + 3 + DATA{Baseline/torus.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_torus_multipleSeeds_NoHandlesTopo.nii.gz + DATA{Baseline/torus_multipleSeeds.nii.gz} + 150 + 2) + +itk_add_test( + NAME + itkFastMarchingImageFilterTest_wm_multipleSeeds_NoTopo + COMMAND + ITKFastMarchingTestDriver + --compare + DATA{Baseline/wm_multipleSeeds_NoTopo_out.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_wm_multipleSeeds_NoTopo.nii.gz + itkFastMarchingImageTopologicalTest + 3 + DATA{Baseline/wm.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_wm_multipleSeeds_NoTopo.nii.gz + DATA{Baseline/wm_multipleSeeds.nii.gz} + 150 + 0) +set_property( + TEST itkFastMarchingImageFilterTest_wm_multipleSeeds_NoTopo + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + itkFastMarchingImageFilterTest_wm_multipleSeeds_StrictTopo + COMMAND + ITKFastMarchingTestDriver + --compare + DATA{Baseline/wm_multipleSeeds_StrictTopo_out.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_wm_multipleSeeds_StrictTopo.nii.gz + itkFastMarchingImageTopologicalTest + 3 + DATA{Baseline/wm.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_wm_multipleSeeds_StrictTopo.nii.gz + DATA{Baseline/wm_multipleSeeds.nii.gz} + 150 + 1) +set_property( + TEST itkFastMarchingImageFilterTest_wm_multipleSeeds_StrictTopo + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + itkFastMarchingImageFilterTest_wm_multipleSeeds_NoHandlesTopo + COMMAND + ITKFastMarchingTestDriver + --compare + DATA{Baseline/wm_multipleSeeds_NoHandlesTopo_out.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_wm_multipleSeeds_NoHandlesTopo.nii.gz + itkFastMarchingImageTopologicalTest + 3 + DATA{Baseline/wm.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/test_wm_multipleSeeds_NoHandlesTopo.nii.gz + DATA{Baseline/wm_multipleSeeds.nii.gz} + 150 + 2) +set_property( + TEST itkFastMarchingImageFilterTest_wm_multipleSeeds_NoHandlesTopo + APPEND + PROPERTY LABELS RUNS_LONG) diff --git a/Modules/Filtering/FastMarching/wrapping/CMakeLists.txt b/Modules/Filtering/FastMarching/wrapping/CMakeLists.txt index d2ecacbdca7..a5076ac8403 100644 --- a/Modules/Filtering/FastMarching/wrapping/CMakeLists.txt +++ b/Modules/Filtering/FastMarching/wrapping/CMakeLists.txt @@ -1,10 +1,9 @@ itk_wrap_module(ITKFastMarching) set(WRAPPER_SUBMODULE_ORDER - itkLevelSetNode - itkNodePair - itkFastMarchingStoppingCriterionBase - ITKFastMarchingBase - itkFastMarchingImageFilterBase -) + itkLevelSetNode + itkNodePair + itkFastMarchingStoppingCriterionBase + ITKFastMarchingBase + itkFastMarchingImageFilterBase) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Filtering/FastMarching/wrapping/ITKFastMarchingBase.wrap b/Modules/Filtering/FastMarching/wrapping/ITKFastMarchingBase.wrap index 72b713e3879..cae473ef928 100644 --- a/Modules/Filtering/FastMarching/wrapping/ITKFastMarchingBase.wrap +++ b/Modules/Filtering/FastMarching/wrapping/ITKFastMarchingBase.wrap @@ -2,12 +2,12 @@ itk_wrap_include("itkNodePair.h") itk_wrap_include("itkLevelSetNode.h") itk_wrap_class("itk::VectorContainer" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_UI}${ITKM_LSN${t}${d}}" "${ITKT_UI},${ITKT_LSN${t}${d}}") - itk_wrap_template("${ITKM_IT}NPI${d}${ITKM_${t}}" "${ITKT_IT}, itk::NodePair< itk::Index<${d}>, ${ITKT_${t}} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_UI}${ITKM_LSN${t}${d}}" "${ITKT_UI},${ITKT_LSN${t}${d}}") + itk_wrap_template("${ITKM_IT}NPI${d}${ITKM_${t}}" "${ITKT_IT}, itk::NodePair< itk::Index<${d}>, ${ITKT_${t}} >") endforeach() +endforeach() itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) @@ -16,5 +16,5 @@ itk_wrap_simple_class("itk::FastMarchingTraitsEnums") itk_wrap_class("itk::FastMarchingBase" POINTER) # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingExtensionImageFilter.wrap b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingExtensionImageFilter.wrap index b1bd9364f71..f3e121f0b9d 100644 --- a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingExtensionImageFilter.wrap +++ b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingExtensionImageFilter.wrap @@ -1,8 +1,9 @@ itk_wrap_class("itk::FastMarchingExtensionImageFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(d ${restricted_dims}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_UC}1${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}, ${ITKT_UC}, 1, ${ITKT_I${t}${d}}") - endforeach() +itk_wrap_filter_dims(restricted_dims 2+) +foreach(d ${restricted_dims}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_UC}1${ITKM_I${t}${d}}" + "${ITKT_I${t}${d}}, ${ITKT_UC}, 1, ${ITKT_I${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingImageFilter.wrap b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingImageFilter.wrap index fab35b740c4..b9e52a4f52d 100644 --- a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingImageFilter.wrap +++ b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingImageFilter.wrap @@ -4,5 +4,5 @@ itk_wrap_simple_class("itk::FastMarchingImageFilterEnums") itk_wrap_class("itk::FastMarchingImageFilter" POINTER) # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingImageFilterBase.wrap b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingImageFilterBase.wrap index 77ee06d3da9..4355a51e75e 100644 --- a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingImageFilterBase.wrap +++ b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingImageFilterBase.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::FastMarchingImageFilterBase" POINTER) # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingImageToNodePairContainerAdaptor.wrap b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingImageToNodePairContainerAdaptor.wrap index 9019b6bc8de..49822b627cd 100644 --- a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingImageToNodePairContainerAdaptor.wrap +++ b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingImageToNodePairContainerAdaptor.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::FastMarchingImageToNodePairContainerAdaptor" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 3) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 3) itk_end_wrap_class() diff --git a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingReachedTargetNodesStoppingCriterion.wrap b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingReachedTargetNodesStoppingCriterion.wrap index cbb0ac99570..8156e35162f 100644 --- a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingReachedTargetNodesStoppingCriterion.wrap +++ b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingReachedTargetNodesStoppingCriterion.wrap @@ -4,5 +4,5 @@ itk_wrap_simple_class("itk::FastMarchingReachedTargetNodesStoppingCriterionEnums itk_wrap_class("itk::FastMarchingReachedTargetNodesStoppingCriterion" POINTER) # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingStoppingCriterionBase.wrap b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingStoppingCriterionBase.wrap index bd688296f0e..0fd2c16bd5c 100644 --- a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingStoppingCriterionBase.wrap +++ b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingStoppingCriterionBase.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::FastMarchingStoppingCriterionBase" POINTER) # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingThresholdStoppingCriterion.wrap b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingThresholdStoppingCriterion.wrap index be31c6216a2..88aa584b8dd 100644 --- a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingThresholdStoppingCriterion.wrap +++ b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingThresholdStoppingCriterion.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::FastMarchingThresholdStoppingCriterion" POINTER) # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingUpwindGradientImageFilter.wrap b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingUpwindGradientImageFilter.wrap index 6bdcf4f9e2c..36e22f9f278 100644 --- a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingUpwindGradientImageFilter.wrap +++ b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingUpwindGradientImageFilter.wrap @@ -2,7 +2,7 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkFastMarchingUpwindGradientImageFilter.h") itk_wrap_simple_class("itk::FastMarchingUpwindGradientImageFilterEnums") itk_wrap_class("itk::FastMarchingUpwindGradientImageFilter" POINTER) - #itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2 2+) - #itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2 2+) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) +#itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2 2+) +#itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingUpwindGradientImageFilterBase.wrap b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingUpwindGradientImageFilterBase.wrap index 9cbda595296..b3fd38a74f1 100644 --- a/Modules/Filtering/FastMarching/wrapping/itkFastMarchingUpwindGradientImageFilterBase.wrap +++ b/Modules/Filtering/FastMarching/wrapping/itkFastMarchingUpwindGradientImageFilterBase.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::FastMarchingUpwindGradientImageFilterBase" POINTER) - #itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2 2+) - #itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2 2+) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) +#itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2 2+) +#itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/FastMarching/wrapping/itkLevelSetNode.wrap b/Modules/Filtering/FastMarching/wrapping/itkLevelSetNode.wrap index a71a25176da..a1184b907de 100644 --- a/Modules/Filtering/FastMarching/wrapping/itkLevelSetNode.wrap +++ b/Modules/Filtering/FastMarching/wrapping/itkLevelSetNode.wrap @@ -4,5 +4,5 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkLevelSet.h") itk_wrap_class("itk::LevelSetNode") - set(WRAPPER_TEMPLATES "${itk_Wrap_LevelSetNode}") +set(WRAPPER_TEMPLATES "${itk_Wrap_LevelSetNode}") itk_end_wrap_class() diff --git a/Modules/Filtering/FastMarching/wrapping/itkNodePair.wrap b/Modules/Filtering/FastMarching/wrapping/itkNodePair.wrap index c86cda124d0..6463d411228 100644 --- a/Modules/Filtering/FastMarching/wrapping/itkNodePair.wrap +++ b/Modules/Filtering/FastMarching/wrapping/itkNodePair.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::NodePair") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("I${d}${ITKM_${t}}" "itk::Index<${d}>, ${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("I${d}${ITKM_${t}}" "itk::Index<${d}>, ${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/FastMarching/wrapping/test/CMakeLists.txt b/Modules/Filtering/FastMarching/wrapping/test/CMakeLists.txt index 315b37b43d6..3888e071355 100644 --- a/Modules/Filtering/FastMarching/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/FastMarching/wrapping/test/CMakeLists.txt @@ -1,45 +1,87 @@ set(test_input_dir ${itk-module_SOURCE_DIR}/test/Input) set(test_baseline_dir ${itk-module_SOURCE_DIR}/test/Baseline) -list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) -if(ITK_WRAP_PYTHON AND ITK_WRAP_float AND wrap_2_index GREATER -1) - itk_python_add_test(NAME PythonFastMarchingLeftVentricleTest +list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) +if(ITK_WRAP_PYTHON + AND ITK_WRAP_float + AND wrap_2_index GREATER -1) + itk_python_add_test( + NAME + PythonFastMarchingLeftVentricleTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/FastMarchingLeftVentricleTest.png - DATA{${test_baseline_dir}/FastMarchingLeftVentricleTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/FastMarchingImageFilterTest.py + --compare + ${ITK_TEST_OUTPUT_DIR}/FastMarchingLeftVentricleTest.png + DATA{${test_baseline_dir}/FastMarchingLeftVentricleTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/FastMarchingImageFilterTest.py DATA{${test_input_dir}/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/FastMarchingLeftVentricleTest.png - 81 114 1.0 -0.5 3.0 100 100 - ) + ${ITK_TEST_OUTPUT_DIR}/FastMarchingLeftVentricleTest.png + 81 + 114 + 1.0 + -0.5 + 3.0 + 100 + 100) - itk_python_add_test(NAME PythonFastMarchingRightVentricleTest + itk_python_add_test( + NAME + PythonFastMarchingRightVentricleTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/FastMarchingRightVentricleTest.png - DATA{${test_baseline_dir}/FastMarchingRightVentricleTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/FastMarchingImageFilterTest.py - DATA{${test_input_dir}/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/FastMarchingRightVentricleTest.png - 99 114 1.0 -0.5 3.0 100 100 - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/FastMarchingRightVentricleTest.png + DATA{${test_baseline_dir}/FastMarchingRightVentricleTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/FastMarchingImageFilterTest.py + DATA{${test_input_dir}/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/FastMarchingRightVentricleTest.png + 99 + 114 + 1.0 + -0.5 + 3.0 + 100 + 100) - itk_python_add_test(NAME PythonFastMarchingWhiteMatterTest + itk_python_add_test( + NAME + PythonFastMarchingWhiteMatterTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/FastMarchingWhiteMatterTest.png - DATA{${test_baseline_dir}/FastMarchingWhiteMatterTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/FastMarchingImageFilterTest.py - DATA{${test_input_dir}/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/FastMarchingWhiteMatterTest.png - 56 92 1.0 -0.3 2.0 200 100 - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/FastMarchingWhiteMatterTest.png + DATA{${test_baseline_dir}/FastMarchingWhiteMatterTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/FastMarchingImageFilterTest.py + DATA{${test_input_dir}/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/FastMarchingWhiteMatterTest.png + 56 + 92 + 1.0 + -0.3 + 2.0 + 200 + 100) - itk_python_add_test(NAME PythonFastMarchingGrayMatterTest + itk_python_add_test( + NAME + PythonFastMarchingGrayMatterTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/FastMarchingGrayMatterTest.png - DATA{${test_baseline_dir}/FastMarchingGrayMatterTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/FastMarchingImageFilterTest.py - DATA{${test_input_dir}/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/FastMarchingGrayMatterTest.png - 40 90 .5 -0.3 2.0 200 100 - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/FastMarchingGrayMatterTest.png + DATA{${test_baseline_dir}/FastMarchingGrayMatterTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/FastMarchingImageFilterTest.py + DATA{${test_input_dir}/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/FastMarchingGrayMatterTest.png + 40 + 90 + .5 + -0.3 + 2.0 + 200 + 100) endif() diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/CMakeLists.txt b/Modules/Filtering/GPUAnisotropicSmoothing/CMakeLists.txt index 0d1e7865e03..152c95e5f54 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/CMakeLists.txt +++ b/Modules/Filtering/GPUAnisotropicSmoothing/CMakeLists.txt @@ -4,11 +4,13 @@ project(ITKGPUAnisotropicSmoothing) if(NOT ITK_SOURCE_DIR) find_package(ITK REQUIRED) list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR}) - set(ITK_USE_GPU ON CACHE BOOL "Enable OpenCL GPU support." FORCE) + set(ITK_USE_GPU + ON + CACHE BOOL "Enable OpenCL GPU support." FORCE) include(itkOpenCL) endif() -if (ITK_USE_GPU) +if(ITK_USE_GPU) set(ITKGPUAnisotropicSmoothing_LIBRARIES ITKGPUAnisotropicSmoothing) set(ITKGPUAnisotropicSmoothing_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) set(ITKGPUAnisotropicSmoothing_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/itk-module.cmake b/Modules/Filtering/GPUAnisotropicSmoothing/itk-module.cmake index b3ed24fd7a6..04db0c4ddf8 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/itk-module.cmake +++ b/Modules/Filtering/GPUAnisotropicSmoothing/itk-module.cmake @@ -1,19 +1,20 @@ -set(DOCUMENTATION "This module contains the GPU implementation of filters that +set(DOCUMENTATION + "This module contains the GPU implementation of filters that implement variations of anisotropic smoothing. This is an image denoising technique that strives for preserving edges on the images while smoothing regions of uniform intensity. This type of filtering is convenient as a preprocessing stage of segmentation algorithms. You may find useful as well the filters in the \\\\ref ITKGPUSmoothing.") -itk_module(ITKGPUAnisotropicSmoothing +itk_module( + ITKGPUAnisotropicSmoothing DEPENDS - ITKCommon - ITKGPUCommon - ITKGPUFiniteDifference + ITKCommon + ITKGPUCommon + ITKGPUFiniteDifference COMPILE_DEPENDS - ITKAnisotropicSmoothing + ITKAnisotropicSmoothing TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/src/CMakeLists.txt b/Modules/Filtering/GPUAnisotropicSmoothing/src/CMakeLists.txt index 558a2322155..0202a7fb8a2 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/src/CMakeLists.txt +++ b/Modules/Filtering/GPUAnisotropicSmoothing/src/CMakeLists.txt @@ -1,11 +1,8 @@ -if (ITK_USE_GPU) - set(ITKGPUAnisotropicSmoothing_SRCS - ) +if(ITK_USE_GPU) + set(ITKGPUAnisotropicSmoothing_SRCS) - set(ITKGPUAnisotropicSmoothing_Kernels - GPUGradientNDAnisotropicDiffusionFunction.cl - GPUScalarAnisotropicDiffusionFunction.cl - ) + set(ITKGPUAnisotropicSmoothing_Kernels GPUGradientNDAnisotropicDiffusionFunction.cl + GPUScalarAnisotropicDiffusionFunction.cl) write_gpu_kernels("${ITKGPUAnisotropicSmoothing_Kernels}" ITKGPUAnisotropicSmoothing_SRCS) diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/test/CMakeLists.txt b/Modules/Filtering/GPUAnisotropicSmoothing/test/CMakeLists.txt index 21dd9701981..99bfa15d4b8 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/test/CMakeLists.txt +++ b/Modules/Filtering/GPUAnisotropicSmoothing/test/CMakeLists.txt @@ -1,21 +1,30 @@ -if (ITK_USE_GPU) +if(ITK_USE_GPU) -itk_module_test() + itk_module_test() -set(ITKGPUAnisotropicSmoothing-tests - itkGPUGradientAnisotropicDiffusionImageFilterTest.cxx -) + set(ITKGPUAnisotropicSmoothing-tests itkGPUGradientAnisotropicDiffusionImageFilterTest.cxx) -CreateTestDriver(ITKGPUAnisotropicSmoothing "${ITKGPUAnisotropicSmoothing-Test_LIBRARIES}" "${ITKGPUAnisotropicSmoothing-tests}") + createtestdriver(ITKGPUAnisotropicSmoothing "${ITKGPUAnisotropicSmoothing-Test_LIBRARIES}" + "${ITKGPUAnisotropicSmoothing-tests}") -itk_add_test(NAME itkGPUGradientAnisotropicDiffusionImageFilterTest2D - COMMAND ITKGPUAnisotropicSmoothingTestDriver itkGPUGradientAnisotropicDiffusionImageFilterTest - DATA{Input/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/gpuGradientAnisotropicDiffusionImageFilterTest2D.mha 2) + itk_add_test( + NAME + itkGPUGradientAnisotropicDiffusionImageFilterTest2D + COMMAND + ITKGPUAnisotropicSmoothingTestDriver + itkGPUGradientAnisotropicDiffusionImageFilterTest + DATA{Input/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/gpuGradientAnisotropicDiffusionImageFilterTest2D.mha + 2) -itk_add_test(NAME itkGPUGradientAnisotropicDiffusionImageFilterTest3D - COMMAND ITKGPUAnisotropicSmoothingTestDriver itkGPUGradientAnisotropicDiffusionImageFilterTest - DATA{Input/HeadMRVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/gpuGradientAnisotropicDiffusionImageFilterTest3D.mha 3) + itk_add_test( + NAME + itkGPUGradientAnisotropicDiffusionImageFilterTest3D + COMMAND + ITKGPUAnisotropicSmoothingTestDriver + itkGPUGradientAnisotropicDiffusionImageFilterTest + DATA{Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/gpuGradientAnisotropicDiffusionImageFilterTest3D.mha + 3) endif() diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/wrapping/CMakeLists.txt b/Modules/Filtering/GPUAnisotropicSmoothing/wrapping/CMakeLists.txt index 01323102f4f..ccd9e7f351c 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/wrapping/CMakeLists.txt +++ b/Modules/Filtering/GPUAnisotropicSmoothing/wrapping/CMakeLists.txt @@ -1,4 +1,4 @@ if(ITK_USE_GPU OR NOT ITK_SOURCE_DIR) -itk_wrap_module(ITKGPUAnisotropicSmoothing) -itk_auto_load_and_end_wrap_submodules() + itk_wrap_module(ITKGPUAnisotropicSmoothing) + itk_auto_load_and_end_wrap_submodules() endif() diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/wrapping/itkGPUAnisotropicDiffusionImageFilter.wrap b/Modules/Filtering/GPUAnisotropicSmoothing/wrapping/itkGPUAnisotropicDiffusionImageFilter.wrap index 5ada5879c6e..9db3e22f373 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/wrapping/itkGPUAnisotropicDiffusionImageFilter.wrap +++ b/Modules/Filtering/GPUAnisotropicSmoothing/wrapping/itkGPUAnisotropicDiffusionImageFilter.wrap @@ -3,12 +3,13 @@ set(vector_types "${WRAP_ITK_VECTOR_REAL}") itk_wrap_include("itkGPUImage.h") itk_wrap_class("itk::AnisotropicDiffusionImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") - endforeach() - #foreach(t ${vector_types}) - #itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") - #endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") endforeach() + #foreach(t ${vector_types}) + #itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") + #endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/wrapping/itkGPUGradientAnisotropicDiffusionImageFilter.wrap b/Modules/Filtering/GPUAnisotropicSmoothing/wrapping/itkGPUGradientAnisotropicDiffusionImageFilter.wrap index cea565862d1..14b726cbc82 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/wrapping/itkGPUGradientAnisotropicDiffusionImageFilter.wrap +++ b/Modules/Filtering/GPUAnisotropicSmoothing/wrapping/itkGPUGradientAnisotropicDiffusionImageFilter.wrap @@ -5,58 +5,74 @@ itk_wrap_include("itkGPUImage.h") itk_wrap_include("itkGradientAnisotropicDiffusionImageFilter.h") itk_wrap_class("itk::GradientAnisotropicDiffusionImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUFiniteDifferenceImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}GradientAnisotropicDiffusionImageFilter" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GradientAnisotropicDiffusionImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template( + "GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}GradientAnisotropicDiffusionImageFilter" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GradientAnisotropicDiffusionImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >" + ) endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUDenseFiniteDifferenceImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}GradientAnisotropicDiffusionImageFilter" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GradientAnisotropicDiffusionImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template( + "GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}GradientAnisotropicDiffusionImageFilter" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GradientAnisotropicDiffusionImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >" + ) endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUImageToImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}GradientAnisotropicDiffusionImageFilter" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GradientAnisotropicDiffusionImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template( + "GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}GradientAnisotropicDiffusionImageFilter" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GradientAnisotropicDiffusionImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >" + ) endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUInPlaceImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}GradientAnisotropicDiffusionImageFilter" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GradientAnisotropicDiffusionImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template( + "GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}GradientAnisotropicDiffusionImageFilter" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GradientAnisotropicDiffusionImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >" + ) endforeach() +endforeach() itk_end_wrap_class() - itk_wrap_class("itk::GPUAnisotropicDiffusionImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}GradientAnisotropicDiffusionImageFilter" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GradientAnisotropicDiffusionImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template( + "GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}GradientAnisotropicDiffusionImageFilter" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GradientAnisotropicDiffusionImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >" + ) endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUGradientAnisotropicDiffusionImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/wrapping/test/CMakeLists.txt b/Modules/Filtering/GPUAnisotropicSmoothing/wrapping/test/CMakeLists.txt index f83bcbc9ed1..5a2934483e9 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/GPUAnisotropicSmoothing/wrapping/test/CMakeLists.txt @@ -1,15 +1,21 @@ if(ITK_WRAP_PYTHON) - itk_python_add_test(NAME itkGPUGradientAnisotropicDiffusionImageFilterPythonTest2D + itk_python_add_test( + NAME + itkGPUGradientAnisotropicDiffusionImageFilterPythonTest2D TEST_DRIVER_ARGS - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkGPUGradientAnisotropicDiffusionImageFilterTest.py - DATA{../../test/Input/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/gpuGradientAnisotropicDiffusionImageFilterTest2DPython.mha 2 - ) + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkGPUGradientAnisotropicDiffusionImageFilterTest.py + DATA{../../test/Input/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/gpuGradientAnisotropicDiffusionImageFilterTest2DPython.mha + 2) - itk_python_add_test(NAME itkGPUGradientAnisotropicDiffusionImageFilterPythonTest3D + itk_python_add_test( + NAME + itkGPUGradientAnisotropicDiffusionImageFilterPythonTest3D TEST_DRIVER_ARGS - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tkGPUGradientAnisotropicDiffusionImageFilterTest.py - DATA{../../test/Input/HeadMRVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/gpuGradientAnisotropicDiffusionImageFilterTest3DPython.mha 3 - ) + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/tkGPUGradientAnisotropicDiffusionImageFilterTest.py + DATA{../../test/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/gpuGradientAnisotropicDiffusionImageFilterTest3DPython.mha + 3) endif() diff --git a/Modules/Filtering/GPUImageFilterBase/CMakeLists.txt b/Modules/Filtering/GPUImageFilterBase/CMakeLists.txt index 01786362bef..efaaed4d390 100644 --- a/Modules/Filtering/GPUImageFilterBase/CMakeLists.txt +++ b/Modules/Filtering/GPUImageFilterBase/CMakeLists.txt @@ -4,11 +4,13 @@ project(ITKGPUImageFilterBase) if(NOT ITK_SOURCE_DIR) find_package(ITK REQUIRED) list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR}) - set(ITK_USE_GPU ON CACHE BOOL "Enable OpenCL GPU support." FORCE) + set(ITK_USE_GPU + ON + CACHE BOOL "Enable OpenCL GPU support." FORCE) include(itkOpenCL) endif() -if (ITK_USE_GPU) +if(ITK_USE_GPU) set(ITKGPUImageFilterBase_LIBRARIES ITKGPUImageFilterBase) set(ITKGPUImageFilterBase_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) set(ITKGPUImageFilterBase_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) diff --git a/Modules/Filtering/GPUImageFilterBase/itk-module.cmake b/Modules/Filtering/GPUImageFilterBase/itk-module.cmake index eaeb65abbd8..95f55ef5063 100644 --- a/Modules/Filtering/GPUImageFilterBase/itk-module.cmake +++ b/Modules/Filtering/GPUImageFilterBase/itk-module.cmake @@ -1,17 +1,18 @@ -set(DOCUMENTATION "This module contains GPU implementations of the base +set(DOCUMENTATION + "This module contains GPU implementations of the base classes that support image filters. For the most part, these are classes that developers will use to create new image filters (and that are the base classes of existing image filters). You will find here: box filters, recursive separable filters and the base classes for neighborhood filters.") -itk_module(ITKGPUImageFilterBase +itk_module( + ITKGPUImageFilterBase DEPENDS - ITKCommon - ITKGPUCommon + ITKCommon + ITKGPUCommon COMPILE_DEPENDS - ITKImageFilterBase + ITKImageFilterBase TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/GPUImageFilterBase/src/CMakeLists.txt b/Modules/Filtering/GPUImageFilterBase/src/CMakeLists.txt index 251493f5e91..042cee4e1c4 100644 --- a/Modules/Filtering/GPUImageFilterBase/src/CMakeLists.txt +++ b/Modules/Filtering/GPUImageFilterBase/src/CMakeLists.txt @@ -1,11 +1,7 @@ -if (ITK_USE_GPU) - set(ITKGPUImageFilterBase_SRCS - ) +if(ITK_USE_GPU) + set(ITKGPUImageFilterBase_SRCS) - set(ITKGPUImageFilterBase_Kernels - GPUCastImageFilter.cl - GPUNeighborhoodOperatorImageFilter.cl - ) + set(ITKGPUImageFilterBase_Kernels GPUCastImageFilter.cl GPUNeighborhoodOperatorImageFilter.cl) write_gpu_kernels("${ITKGPUImageFilterBase_Kernels}" ITKGPUImageFilterBase_SRCS) diff --git a/Modules/Filtering/GPUImageFilterBase/test/CMakeLists.txt b/Modules/Filtering/GPUImageFilterBase/test/CMakeLists.txt index d58abd68119..036231cd8a4 100644 --- a/Modules/Filtering/GPUImageFilterBase/test/CMakeLists.txt +++ b/Modules/Filtering/GPUImageFilterBase/test/CMakeLists.txt @@ -1,21 +1,29 @@ -if (ITK_USE_GPU) +if(ITK_USE_GPU) -itk_module_test() + itk_module_test() -set(ITKGPUImageFilterBase-tests - itkGPUNeighborhoodOperatorImageFilterTest.cxx -) + set(ITKGPUImageFilterBase-tests itkGPUNeighborhoodOperatorImageFilterTest.cxx) -CreateTestDriver(ITKGPUImageFilterBase "${ITKGPUImageFilterBase-Test_LIBRARIES}" "${ITKGPUImageFilterBase-tests}") + createtestdriver(ITKGPUImageFilterBase "${ITKGPUImageFilterBase-Test_LIBRARIES}" "${ITKGPUImageFilterBase-tests}") -itk_add_test(NAME itkGPUNeighborhoodOperatorImageFilterTest2D - COMMAND ITKGPUImageFilterBaseTestDriver itkGPUNeighborhoodOperatorImageFilterTest - DATA{Input/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/gpuNeighborhoodOperatorImageFilterTest2D.mha 2) + itk_add_test( + NAME + itkGPUNeighborhoodOperatorImageFilterTest2D + COMMAND + ITKGPUImageFilterBaseTestDriver + itkGPUNeighborhoodOperatorImageFilterTest + DATA{Input/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/gpuNeighborhoodOperatorImageFilterTest2D.mha + 2) -itk_add_test(NAME itkGPUNeighborhoodOperatorImageFilterTest3D - COMMAND ITKGPUImageFilterBaseTestDriver itkGPUNeighborhoodOperatorImageFilterTest - DATA{Input/HeadMRVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/gpuNeighborhoodOperatorImageFilterTest3D.mha 3) + itk_add_test( + NAME + itkGPUNeighborhoodOperatorImageFilterTest3D + COMMAND + ITKGPUImageFilterBaseTestDriver + itkGPUNeighborhoodOperatorImageFilterTest + DATA{Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/gpuNeighborhoodOperatorImageFilterTest3D.mha + 3) endif() diff --git a/Modules/Filtering/GPUImageFilterBase/wrapping/CMakeLists.txt b/Modules/Filtering/GPUImageFilterBase/wrapping/CMakeLists.txt index 0cf15b2e4da..4ac4ab8494a 100644 --- a/Modules/Filtering/GPUImageFilterBase/wrapping/CMakeLists.txt +++ b/Modules/Filtering/GPUImageFilterBase/wrapping/CMakeLists.txt @@ -1,4 +1,4 @@ if(ITK_USE_GPU OR NOT ITK_SOURCE_DIR) -itk_wrap_module(ITKGPUImageFilterBase) -itk_auto_load_and_end_wrap_submodules() + itk_wrap_module(ITKGPUImageFilterBase) + itk_auto_load_and_end_wrap_submodules() endif() diff --git a/Modules/Filtering/GPUImageFilterBase/wrapping/itkGPUBoxImageFilter.wrap b/Modules/Filtering/GPUImageFilterBase/wrapping/itkGPUBoxImageFilter.wrap index f0e4b8bfee5..1ae42cd9507 100644 --- a/Modules/Filtering/GPUImageFilterBase/wrapping/itkGPUBoxImageFilter.wrap +++ b/Modules/Filtering/GPUImageFilterBase/wrapping/itkGPUBoxImageFilter.wrap @@ -1,8 +1,9 @@ itk_wrap_include("itkGPUImage.h") itk_wrap_class("itk::BoxImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/GPUImageFilterBase/wrapping/itkGPUCastImageFilter.wrap b/Modules/Filtering/GPUImageFilterBase/wrapping/itkGPUCastImageFilter.wrap index 5f8943bb72f..7c1116884d7 100644 --- a/Modules/Filtering/GPUImageFilterBase/wrapping/itkGPUCastImageFilter.wrap +++ b/Modules/Filtering/GPUImageFilterBase/wrapping/itkGPUCastImageFilter.wrap @@ -1,127 +1,213 @@ -UNIQUE(from_types "UC;${WRAP_ITK_SCALAR}") -UNIQUE(to_types "UC;UL;${ITKM_IT};${WRAP_ITK_SCALAR}") -UNIQUE(vector_types "${WRAP_ITK_VECTOR_REAL};${WRAP_ITK_COV_VECTOR_REAL}") +unique(from_types "UC;${WRAP_ITK_SCALAR}") +unique(to_types "UC;UL;${ITKM_IT};${WRAP_ITK_SCALAR}") +unique(vector_types "${WRAP_ITK_VECTOR_REAL};${WRAP_ITK_COV_VECTOR_REAL}") itk_wrap_include("itkGPUImage.h") itk_wrap_include("itkGPUCastImageFilter.h") set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_class("itk::Functor::GPUCast") +# Add from == to pixel type first for preference +foreach(to ${to_types}) + itk_wrap_template("${ITKM_${to}}${ITKM_${to}}" "${ITKT_${to}}, ${ITKT_${to}}") +endforeach() +foreach(from ${from_types}) + foreach(to ${to_types}) + if(NOT + ${from} + STREQUAL + ${to}) + itk_wrap_template("${ITKM_${from}}${ITKM_${to}}" "${ITKT_${from}}, ${ITKT_${to}}") + endif() + endforeach() +endforeach() +itk_end_wrap_class() + +itk_wrap_class("itk::CastImageFilter" POINTER) +foreach(d ${ITK_WRAP_IMAGE_DIMS}) # Add from == to pixel type first for preference foreach(to ${to_types}) - itk_wrap_template("${ITKM_${to}}${ITKM_${to}}" "${ITKT_${to}}, ${ITKT_${to}}") + itk_wrap_template("I${ITKM_${to}}${d}GI${ITKM_${to}}${d}" + "itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") + itk_wrap_template("GI${ITKM_${to}}${d}I${ITKM_${to}}${d}" + "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >") + itk_wrap_template("GI${ITKM_${to}}${d}GI${ITKM_${to}}${d}" + "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") endforeach() foreach(from ${from_types}) foreach(to ${to_types}) - if(NOT ${from} STREQUAL ${to}) - itk_wrap_template("${ITKM_${from}}${ITKM_${to}}" "${ITKT_${from}}, ${ITKT_${to}}") + if(NOT + ${from} + STREQUAL + ${to}) + itk_wrap_template("I${ITKM_${from}}${d}GI${ITKM_${to}}${d}" + "itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") + itk_wrap_template("GI${ITKM_${from}}${d}I${ITKM_${to}}${d}" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >") + itk_wrap_template("GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") endif() endforeach() endforeach() -itk_end_wrap_class() - -itk_wrap_class("itk::CastImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - # Add from == to pixel type first for preference - foreach(to ${to_types}) - itk_wrap_template("I${ITKM_${to}}${d}GI${ITKM_${to}}${d}" "itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") - itk_wrap_template("GI${ITKM_${to}}${d}I${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >") - itk_wrap_template("GI${ITKM_${to}}${d}GI${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") - endforeach() - foreach(from ${from_types}) - foreach(to ${to_types}) - if(NOT ${from} STREQUAL ${to}) - itk_wrap_template("I${ITKM_${from}}${d}GI${ITKM_${to}}${d}" "itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") - itk_wrap_template("GI${ITKM_${from}}${d}I${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >") - itk_wrap_template("GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") - endif() - endforeach() - endforeach() - foreach(t ${vector_types}) - itk_wrap_template("I${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" "itk::Image< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") - itk_wrap_template("GI${ITKM_${t}${d}}${d}I${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::Image< ${ITKT_${t}${d}}, ${d} >") - itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") - endforeach() + foreach(t ${vector_types}) + itk_wrap_template("I${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" + "itk::Image< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") + itk_wrap_template("GI${ITKM_${t}${d}}${d}I${ITKM_${t}${d}}${d}" + "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::Image< ${ITKT_${t}${d}}, ${d} >") + itk_wrap_template("GI${ITKM_${t}${d}}${d}GI${ITKM_${t}${d}}${d}" + "itk::GPUImage< ${ITKT_${t}${d}}, ${d} >, itk::GPUImage< ${ITKT_${t}${d}}, ${d} >") endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUImageToImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - # Add from == to pixel type first for preference +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + # Add from == to pixel type first for preference + foreach(to ${to_types}) + itk_wrap_template( + "I${ITKM_${to}}${d}GI${ITKM_${to}}${d}CastImageFilter" + "itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >" + ) + itk_wrap_template( + "GI${ITKM_${to}}${d}I${ITKM_${to}}${d}CastImageFilter" + "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} > >" + ) + itk_wrap_template( + "GI${ITKM_${to}}${d}GI${ITKM_${to}}${d}CastImageFilter" + "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >" + ) + endforeach() + foreach(from ${from_types}) foreach(to ${to_types}) - itk_wrap_template("I${ITKM_${to}}${d}GI${ITKM_${to}}${d}CastImageFilter" "itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >") - itk_wrap_template("GI${ITKM_${to}}${d}I${ITKM_${to}}${d}CastImageFilter" "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} > >") - itk_wrap_template("GI${ITKM_${to}}${d}GI${ITKM_${to}}${d}CastImageFilter" "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >") - endforeach() - foreach(from ${from_types}) - foreach(to ${to_types}) - if(NOT ${from} STREQUAL ${to}) - itk_wrap_template("I${ITKM_${from}}${d}GI${ITKM_${to}}${d}CastImageFilter" "itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >") - itk_wrap_template("GI${ITKM_${from}}${d}I${ITKM_${to}}${d}CastImageFilter" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} > >") - itk_wrap_template("GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}CastImageFilter" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >") - endif() - endforeach() + if(NOT + ${from} + STREQUAL + ${to}) + itk_wrap_template( + "I${ITKM_${from}}${d}GI${ITKM_${to}}${d}CastImageFilter" + "itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >" + ) + itk_wrap_template( + "GI${ITKM_${from}}${d}I${ITKM_${to}}${d}CastImageFilter" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} > >" + ) + itk_wrap_template( + "GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}CastImageFilter" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >" + ) + endif() endforeach() endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUInPlaceImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - # Add from == to pixel type first for preference +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + # Add from == to pixel type first for preference + foreach(to ${to_types}) + itk_wrap_template( + "I${ITKM_${to}}${d}GI${ITKM_${to}}${d}CastImageFilter" + "itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >" + ) + itk_wrap_template( + "GI${ITKM_${to}}${d}I${ITKM_${to}}${d}CastImageFilter" + "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} > >" + ) + itk_wrap_template( + "GI${ITKM_${to}}${d}GI${ITKM_${to}}${d}CastImageFilter" + "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >" + ) + endforeach() + foreach(from ${from_types}) foreach(to ${to_types}) - itk_wrap_template("I${ITKM_${to}}${d}GI${ITKM_${to}}${d}CastImageFilter" "itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >") - itk_wrap_template("GI${ITKM_${to}}${d}I${ITKM_${to}}${d}CastImageFilter" "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} > >") - itk_wrap_template("GI${ITKM_${to}}${d}GI${ITKM_${to}}${d}CastImageFilter" "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >") - endforeach() - foreach(from ${from_types}) - foreach(to ${to_types}) - if(NOT ${from} STREQUAL ${to}) - itk_wrap_template("I${ITKM_${from}}${d}GI${ITKM_${to}}${d}CastImageFilter" "itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >") - itk_wrap_template("GI${ITKM_${from}}${d}I${ITKM_${to}}${d}CastImageFilter" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} > >") - itk_wrap_template("GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}CastImageFilter" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >") - endif() - endforeach() + if(NOT + ${from} + STREQUAL + ${to}) + itk_wrap_template( + "I${ITKM_${from}}${d}GI${ITKM_${to}}${d}CastImageFilter" + "itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >" + ) + itk_wrap_template( + "GI${ITKM_${from}}${d}I${ITKM_${to}}${d}CastImageFilter" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} > >" + ) + itk_wrap_template( + "GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}CastImageFilter" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >" + ) + endif() endforeach() endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUUnaryFunctorImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - # Add from == to pixel type first for preference +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + # Add from == to pixel type first for preference + foreach(to ${to_types}) + itk_wrap_template( + "I${ITKM_${to}}${d}GI${ITKM_${to}}${d}GPUCast${ITKM_${to}}${ITKM_${to}}CastImageFilter" + "itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Functor::GPUCast< ${ITKT_${to}}, ${ITKT_${to}} >, itk::CastImageFilter< itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >" + ) + itk_wrap_template( + "GI${ITKM_${to}}${d}I${ITKM_${to}}${d}${ITKM_${to}}${ITKM_${to}}CastImageFilter" + "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >, itk::Functor::GPUCast< ${ITKT_${to}}, ${ITKT_${to}} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} > >" + ) + itk_wrap_template( + "GI${ITKM_${to}}${d}GI${ITKM_${to}}${d}${ITKM_${to}}${ITKM_${to}}CastImageFilter" + "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Functor::GPUCast< ${ITKT_${to}}, ${ITKT_${to}} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >" + ) + endforeach() + foreach(from ${from_types}) foreach(to ${to_types}) - itk_wrap_template("I${ITKM_${to}}${d}GI${ITKM_${to}}${d}GPUCast${ITKM_${to}}${ITKM_${to}}CastImageFilter" - "itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Functor::GPUCast< ${ITKT_${to}}, ${ITKT_${to}} >, itk::CastImageFilter< itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >") - itk_wrap_template("GI${ITKM_${to}}${d}I${ITKM_${to}}${d}${ITKM_${to}}${ITKM_${to}}CastImageFilter" "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >, itk::Functor::GPUCast< ${ITKT_${to}}, ${ITKT_${to}} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} > >") - itk_wrap_template("GI${ITKM_${to}}${d}GI${ITKM_${to}}${d}${ITKM_${to}}${ITKM_${to}}CastImageFilter" "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Functor::GPUCast< ${ITKT_${to}}, ${ITKT_${to}} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >") - endforeach() - foreach(from ${from_types}) - foreach(to ${to_types}) - if(NOT ${from} STREQUAL ${to}) - itk_wrap_template("I${ITKM_${from}}${d}GI${ITKM_${to}}${d}${ITKM_${from}}${ITKM_${to}}CastImageFilter" "itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Functor::GPUCast< ${ITKT_${from}}, ${ITKT_${to}} >, itk::CastImageFilter< itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >") - itk_wrap_template("GI${ITKM_${from}}${d}I${ITKM_${to}}${d}${ITKM_${from}}${ITKM_${to}}CastImageFilter" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >, itk::Functor::GPUCast< ${ITKT_${from}}, ${ITKT_${to}} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} > >") - itk_wrap_template("GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}${ITKM_${from}}${ITKM_${to}}CastImageFilter" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Functor::GPUCast< ${ITKT_${from}}, ${ITKT_${to}} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >") - endif() - endforeach() + if(NOT + ${from} + STREQUAL + ${to}) + itk_wrap_template( + "I${ITKM_${from}}${d}GI${ITKM_${to}}${d}${ITKM_${from}}${ITKM_${to}}CastImageFilter" + "itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Functor::GPUCast< ${ITKT_${from}}, ${ITKT_${to}} >, itk::CastImageFilter< itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >" + ) + itk_wrap_template( + "GI${ITKM_${from}}${d}I${ITKM_${to}}${d}${ITKM_${from}}${ITKM_${to}}CastImageFilter" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >, itk::Functor::GPUCast< ${ITKT_${from}}, ${ITKT_${to}} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} > >" + ) + itk_wrap_template( + "GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}${ITKM_${from}}${ITKM_${to}}CastImageFilter" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Functor::GPUCast< ${ITKT_${from}}, ${ITKT_${to}} >, itk::CastImageFilter< itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} > >" + ) + endif() endforeach() endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUCastImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - # Add from == to pixel type first for preference +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + # Add from == to pixel type first for preference + foreach(to ${to_types}) + itk_wrap_template("I${ITKM_${to}}${d}GI${ITKM_${to}}${d}" + "itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") + itk_wrap_template("GI${ITKM_${to}}${d}I${ITKM_${to}}${d}" + "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >") + itk_wrap_template("GI${ITKM_${to}}${d}GI${ITKM_${to}}${d}" + "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") + endforeach() + foreach(from ${from_types}) foreach(to ${to_types}) - itk_wrap_template("I${ITKM_${to}}${d}GI${ITKM_${to}}${d}" "itk::Image< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") - itk_wrap_template("GI${ITKM_${to}}${d}I${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >") - itk_wrap_template("GI${ITKM_${to}}${d}GI${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${to}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") - endforeach() - foreach(from ${from_types}) - foreach(to ${to_types}) - if(NOT ${from} STREQUAL ${to}) - itk_wrap_template("I${ITKM_${from}}${d}GI${ITKM_${to}}${d}" "itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") - itk_wrap_template("GI${ITKM_${from}}${d}I${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >") - itk_wrap_template("GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}" "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") - endif() - endforeach() + if(NOT + ${from} + STREQUAL + ${to}) + itk_wrap_template("I${ITKM_${from}}${d}GI${ITKM_${to}}${d}" + "itk::Image< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") + itk_wrap_template("GI${ITKM_${from}}${d}I${ITKM_${to}}${d}" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::Image< ${ITKT_${to}}, ${d} >") + itk_wrap_template("GI${ITKM_${from}}${d}GI${ITKM_${to}}${d}" + "itk::GPUImage< ${ITKT_${from}}, ${d} >, itk::GPUImage< ${ITKT_${to}}, ${d} >") + endif() endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/GPUImageFilterBase/wrapping/itkGPUNeighborhoodOperatorImageFilter.wrap b/Modules/Filtering/GPUImageFilterBase/wrapping/itkGPUNeighborhoodOperatorImageFilter.wrap index bcdc8151501..9737a1466d0 100644 --- a/Modules/Filtering/GPUImageFilterBase/wrapping/itkGPUNeighborhoodOperatorImageFilter.wrap +++ b/Modules/Filtering/GPUImageFilterBase/wrapping/itkGPUNeighborhoodOperatorImageFilter.wrap @@ -2,33 +2,39 @@ set(types "${WRAP_ITK_SCALAR}") itk_wrap_include("itkImageBoundaryCondition.h") itk_wrap_class("itk::ImageBoundaryCondition") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::NeighborhoodOperatorImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}${ITKM_${t}}" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, ${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}${ITKM_${t}}" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, ${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUImageToImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}NeighborhoodOperatorImageFilter" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::NeighborhoodOperatorImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, ${ITKT_${t}} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template( + "GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}NeighborhoodOperatorImageFilter" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::NeighborhoodOperatorImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, ${ITKT_${t}} >" + ) endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUNeighborhoodOperatorImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}${ITKM_${t}}" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, ${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}${ITKM_${t}}" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, ${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/GPUImageFilterBase/wrapping/test/CMakeLists.txt b/Modules/Filtering/GPUImageFilterBase/wrapping/test/CMakeLists.txt index 102741ca14e..0fcd9f93aa2 100644 --- a/Modules/Filtering/GPUImageFilterBase/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/GPUImageFilterBase/wrapping/test/CMakeLists.txt @@ -1,15 +1,21 @@ if(ITK_WRAP_PYTHON) - itk_python_add_test(NAME itkGPUNeighborhoodOperatorImageFilterPythonTest2D + itk_python_add_test( + NAME + itkGPUNeighborhoodOperatorImageFilterPythonTest2D TEST_DRIVER_ARGS - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkGPUNeighborhoodOperatorImageFilterTest.py - DATA{../../test/Input/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/gpuNeighborhoodOperatorImageFilterTest2DPython.mha 2 - ) + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkGPUNeighborhoodOperatorImageFilterTest.py + DATA{../../test/Input/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/gpuNeighborhoodOperatorImageFilterTest2DPython.mha + 2) - itk_python_add_test(NAME itkGPUNeighborhoodOperatorImageFilterPythonTest3D + itk_python_add_test( + NAME + itkGPUNeighborhoodOperatorImageFilterPythonTest3D TEST_DRIVER_ARGS - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkGPUNeighborhoodOperatorImageFilterTest.py - DATA{../../test/Input/HeadMRVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/gpuNeighborhoodOperatorImageFilterTest3DPython.mha 3 - ) + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkGPUNeighborhoodOperatorImageFilterTest.py + DATA{../../test/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/gpuNeighborhoodOperatorImageFilterTest3DPython.mha + 3) endif() diff --git a/Modules/Filtering/GPUSmoothing/CMakeLists.txt b/Modules/Filtering/GPUSmoothing/CMakeLists.txt index 8fedfe13044..7d1057c1c3d 100644 --- a/Modules/Filtering/GPUSmoothing/CMakeLists.txt +++ b/Modules/Filtering/GPUSmoothing/CMakeLists.txt @@ -4,11 +4,13 @@ project(ITKGPUSmoothing) if(NOT ITK_SOURCE_DIR) find_package(ITK REQUIRED) list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR}) - set(ITK_USE_GPU ON CACHE BOOL "Enable OpenCL GPU support." FORCE) + set(ITK_USE_GPU + ON + CACHE BOOL "Enable OpenCL GPU support." FORCE) include(itkOpenCL) endif() -if (ITK_USE_GPU) +if(ITK_USE_GPU) set(ITKGPUSmoothing_LIBRARIES ITKGPUSmoothing) set(ITKGPUSmoothing_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) set(ITKGPUSmoothing_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) diff --git a/Modules/Filtering/GPUSmoothing/itk-module.cmake b/Modules/Filtering/GPUSmoothing/itk-module.cmake index f2652c741e3..a44c7a3ac04 100644 --- a/Modules/Filtering/GPUSmoothing/itk-module.cmake +++ b/Modules/Filtering/GPUSmoothing/itk-module.cmake @@ -1,16 +1,17 @@ -set(DOCUMENTATION "This module contains the GPU implementation of the +set(DOCUMENTATION + "This module contains the GPU implementation of the most common image smoothing filters. For example, Gaussian and Median filters. You may also find it interesting to look at the \\\\ref ITKAnisotropicSmoothing group of filters.") -itk_module(ITKGPUSmoothing +itk_module( + ITKGPUSmoothing DEPENDS - ITKCommon - ITKGPUCommon - ITKGPUImageFilterBase - ITKSmoothing + ITKCommon + ITKGPUCommon + ITKGPUImageFilterBase + ITKSmoothing TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/GPUSmoothing/src/CMakeLists.txt b/Modules/Filtering/GPUSmoothing/src/CMakeLists.txt index d2120e84266..0570cb1098e 100644 --- a/Modules/Filtering/GPUSmoothing/src/CMakeLists.txt +++ b/Modules/Filtering/GPUSmoothing/src/CMakeLists.txt @@ -1,10 +1,7 @@ -if (ITK_USE_GPU) - set(ITKGPUSmoothing_SRCS - ) +if(ITK_USE_GPU) + set(ITKGPUSmoothing_SRCS) - set(ITKGPUSmoothing_Kernels - GPUMeanImageFilter.cl - ) + set(ITKGPUSmoothing_Kernels GPUMeanImageFilter.cl) write_gpu_kernels("${ITKGPUSmoothing_Kernels}" ITKGPUSmoothing_SRCS) diff --git a/Modules/Filtering/GPUSmoothing/test/CMakeLists.txt b/Modules/Filtering/GPUSmoothing/test/CMakeLists.txt index ac95f950e0c..e539987d2a4 100644 --- a/Modules/Filtering/GPUSmoothing/test/CMakeLists.txt +++ b/Modules/Filtering/GPUSmoothing/test/CMakeLists.txt @@ -1,38 +1,55 @@ -if (ITK_USE_GPU) - -itk_module_test() - -set(ITKGPUSmoothing-tests - itkGPUMeanImageFilterTest.cxx - itkGPUDiscreteGaussianImageFilterTest.cxx -) - -CreateTestDriver(ITKGPUSmoothing "${ITKGPUSmoothing-Test_LIBRARIES}" "${ITKGPUSmoothing-tests}") - -itk_add_test(NAME itkGPUMeanImageFilterTest2D - COMMAND ITKGPUSmoothingTestDriver - --compare DATA{Baseline/cpuMeanImageFilterTest2D.png} - ${ITK_TEST_OUTPUT_DIR}/gpuMeanImageFilterTest2D.png - itkGPUMeanImageFilterTest - DATA{Input/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/gpuMeanImageFilterTest2D.png 2) - -itk_add_test(NAME itkGPUMeanImageFilterTest3D - COMMAND ITKGPUSmoothingTestDriver - --compare DATA{Baseline/gpuMeanImageFilterTest3D.mha} - ${ITK_TEST_OUTPUT_DIR}/gpuMeanImageFilterTest3D.mha - itkGPUMeanImageFilterTest - DATA{Input/HeadMRVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/gpuMeanImageFilterTest3D.mha 3) - -itk_add_test(NAME itkGPUDiscreteGaussianImageFilterTest2D - COMMAND ITKGPUSmoothingTestDriver itkGPUDiscreteGaussianImageFilterTest - DATA{Input/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/gpuGradientDiscreteGaussianImageFilterTest2D.mha 2) - -itk_add_test(NAME itkGPUDiscreteGaussianImageFilterTest3D - COMMAND ITKGPUSmoothingTestDriver itkGPUDiscreteGaussianImageFilterTest - DATA{Input/HeadMRVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/gpuGradientDiscreteGaussianImageFilterTest3D.mha 3) +if(ITK_USE_GPU) + + itk_module_test() + + set(ITKGPUSmoothing-tests itkGPUMeanImageFilterTest.cxx itkGPUDiscreteGaussianImageFilterTest.cxx) + + createtestdriver(ITKGPUSmoothing "${ITKGPUSmoothing-Test_LIBRARIES}" "${ITKGPUSmoothing-tests}") + + itk_add_test( + NAME + itkGPUMeanImageFilterTest2D + COMMAND + ITKGPUSmoothingTestDriver + --compare + DATA{Baseline/cpuMeanImageFilterTest2D.png} + ${ITK_TEST_OUTPUT_DIR}/gpuMeanImageFilterTest2D.png + itkGPUMeanImageFilterTest + DATA{Input/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/gpuMeanImageFilterTest2D.png + 2) + + itk_add_test( + NAME + itkGPUMeanImageFilterTest3D + COMMAND + ITKGPUSmoothingTestDriver + --compare + DATA{Baseline/gpuMeanImageFilterTest3D.mha} + ${ITK_TEST_OUTPUT_DIR}/gpuMeanImageFilterTest3D.mha + itkGPUMeanImageFilterTest + DATA{Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/gpuMeanImageFilterTest3D.mha + 3) + + itk_add_test( + NAME + itkGPUDiscreteGaussianImageFilterTest2D + COMMAND + ITKGPUSmoothingTestDriver + itkGPUDiscreteGaussianImageFilterTest + DATA{Input/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/gpuGradientDiscreteGaussianImageFilterTest2D.mha + 2) + + itk_add_test( + NAME + itkGPUDiscreteGaussianImageFilterTest3D + COMMAND + ITKGPUSmoothingTestDriver + itkGPUDiscreteGaussianImageFilterTest + DATA{Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/gpuGradientDiscreteGaussianImageFilterTest3D.mha + 3) endif() diff --git a/Modules/Filtering/GPUSmoothing/wrapping/CMakeLists.txt b/Modules/Filtering/GPUSmoothing/wrapping/CMakeLists.txt index 4f0b91f3c4d..a288a2354bb 100644 --- a/Modules/Filtering/GPUSmoothing/wrapping/CMakeLists.txt +++ b/Modules/Filtering/GPUSmoothing/wrapping/CMakeLists.txt @@ -1,4 +1,4 @@ if(ITK_USE_GPU OR NOT ITK_SOURCE_DIR) -itk_wrap_module(ITKGPUSmoothing) -itk_auto_load_and_end_wrap_submodules() + itk_wrap_module(ITKGPUSmoothing) + itk_auto_load_and_end_wrap_submodules() endif() diff --git a/Modules/Filtering/GPUSmoothing/wrapping/itkGPUDiscreteGaussianImageFilter.wrap b/Modules/Filtering/GPUSmoothing/wrapping/itkGPUDiscreteGaussianImageFilter.wrap index 72ca06efb79..2477c7876f0 100644 --- a/Modules/Filtering/GPUSmoothing/wrapping/itkGPUDiscreteGaussianImageFilter.wrap +++ b/Modules/Filtering/GPUSmoothing/wrapping/itkGPUDiscreteGaussianImageFilter.wrap @@ -1,23 +1,28 @@ itk_wrap_class("itk::DiscreteGaussianImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUImageToImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}DiscreteGaussianImageFilter" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::DiscreteGaussianImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template( + "GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}DiscreteGaussianImageFilter" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::DiscreteGaussianImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >" + ) endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUDiscreteGaussianImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/GPUSmoothing/wrapping/itkGPUMeanImageFilter.wrap b/Modules/Filtering/GPUSmoothing/wrapping/itkGPUMeanImageFilter.wrap index 3c5f5fdbf2e..e4c1ced1642 100644 --- a/Modules/Filtering/GPUSmoothing/wrapping/itkGPUMeanImageFilter.wrap +++ b/Modules/Filtering/GPUSmoothing/wrapping/itkGPUMeanImageFilter.wrap @@ -2,33 +2,41 @@ set(types "${WRAP_ITK_SCALAR}") itk_wrap_include("itkGPUImage.h") itk_wrap_class("itk::MeanImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUImageToImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}MeanImageFilter" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::MeanImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template( + "GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}MeanImageFilter" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::MeanImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >" + ) endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUBoxImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}MeanImageFilter" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::MeanImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template( + "GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}MeanImageFilter" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::MeanImageFilter< itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} > >" + ) endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::GPUMeanImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("GI${ITKM_${t}}${d}GI${ITKM_${t}}${d}" + "itk::GPUImage< ${ITKT_${t}}, ${d} >, itk::GPUImage< ${ITKT_${t}}, ${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/GPUSmoothing/wrapping/test/CMakeLists.txt b/Modules/Filtering/GPUSmoothing/wrapping/test/CMakeLists.txt index ab311bc1af5..aa8b15e8757 100644 --- a/Modules/Filtering/GPUSmoothing/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/GPUSmoothing/wrapping/test/CMakeLists.txt @@ -1,10 +1,18 @@ # some tests will fail if dim=2 and unsigned short are not wrapped -list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) -if(ITK_WRAP_PYTHON AND ITK_WRAP_unsigned_char AND wrap_2_index GREATER -1) - itk_python_add_test(NAME itkGPUMeanImageFilterPythonTest2D - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkGPUMeanImageFilterTest.py - DATA{../../test/Input/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/itkGPUMeanImageFilterPythonTest2D.mha - 2 - ) +list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) +if(ITK_WRAP_PYTHON + AND ITK_WRAP_unsigned_char + AND wrap_2_index GREATER -1) + itk_python_add_test( + NAME + itkGPUMeanImageFilterPythonTest2D + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkGPUMeanImageFilterTest.py + DATA{../../test/Input/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/itkGPUMeanImageFilterPythonTest2D.mha + 2) endif() diff --git a/Modules/Filtering/GPUThresholding/CMakeLists.txt b/Modules/Filtering/GPUThresholding/CMakeLists.txt index 4390785f564..b68d95e778f 100644 --- a/Modules/Filtering/GPUThresholding/CMakeLists.txt +++ b/Modules/Filtering/GPUThresholding/CMakeLists.txt @@ -1,6 +1,6 @@ project(ITKGPUThresholding) -if (ITK_USE_GPU) +if(ITK_USE_GPU) set(ITKGPUThresholding_LIBRARIES ITKGPUThresholding) set(ITKGPUThresholding_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) set(ITKGPUThresholding_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) diff --git a/Modules/Filtering/GPUThresholding/itk-module.cmake b/Modules/Filtering/GPUThresholding/itk-module.cmake index 26400bd17a9..b893fd30713 100644 --- a/Modules/Filtering/GPUThresholding/itk-module.cmake +++ b/Modules/Filtering/GPUThresholding/itk-module.cmake @@ -1,15 +1,15 @@ set(DOCUMENTATION "This module contains the GPU implementation for image thresholding filters such as the classical binary thresholding.") -itk_module(ITKGPUThresholding +itk_module( + ITKGPUThresholding DEPENDS - ITKCommon - ITKGPUCommon + ITKCommon + ITKGPUCommon COMPILE_DEPENDS - ITKThresholding + ITKThresholding TEST_DEPENDS - ITKTestKernel - ITKGPUSmoothing + ITKTestKernel + ITKGPUSmoothing DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/GPUThresholding/src/CMakeLists.txt b/Modules/Filtering/GPUThresholding/src/CMakeLists.txt index 326c868593f..1b4605322f8 100644 --- a/Modules/Filtering/GPUThresholding/src/CMakeLists.txt +++ b/Modules/Filtering/GPUThresholding/src/CMakeLists.txt @@ -1,10 +1,7 @@ -if (ITK_USE_GPU) - set(ITKGPUThresholding_SRCS - ) +if(ITK_USE_GPU) + set(ITKGPUThresholding_SRCS) - set(ITKGPUThresholding_Kernels - GPUBinaryThresholdImageFilter.cl - ) + set(ITKGPUThresholding_Kernels GPUBinaryThresholdImageFilter.cl) write_gpu_kernels("${ITKGPUThresholding_Kernels}" ITKGPUThresholding_SRCS) diff --git a/Modules/Filtering/GPUThresholding/test/CMakeLists.txt b/Modules/Filtering/GPUThresholding/test/CMakeLists.txt index 817e9894229..4b1b966dcc0 100644 --- a/Modules/Filtering/GPUThresholding/test/CMakeLists.txt +++ b/Modules/Filtering/GPUThresholding/test/CMakeLists.txt @@ -1,39 +1,58 @@ -if (ITK_USE_GPU) - -itk_module_test() - -set(ITKGPUThresholding-tests - itkGPUImageFilterTest.cxx - #itkGPUImageFilterTestTemp.cxx - itkGPUBinaryThresholdImageFilterTest.cxx - ) - -CreateTestDriver(ITKGPUThresholding "${ITKGPUThresholding-Test_LIBRARIES}" "${ITKGPUThresholding-tests}") - -itk_add_test(NAME itkGPUImageFilterTest2D - COMMAND ITKGPUThresholdingTestDriver itkGPUImageFilterTest - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${ITK_TEST_OUTPUT_DIR}/gpuImageFilterTest2D.png 2) -itk_add_test(NAME itkGPUImageFilterTest3D - COMMAND ITKGPUThresholdingTestDriver itkGPUImageFilterTest - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${ITK_TEST_OUTPUT_DIR}/gpuImageFilterTest3D.png 3) - -# -#temporary test -#itk_add_test(NAME itkGPUImageFilterTestTemp -# COMMAND ITKGPUThresholdingTestDriver itkGPUImageFilterTestTemp -# ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png -# ${ITK_TEST_OUTPUT_DIR}/gpuImageFilterTest.png) - -itk_add_test(NAME itkGPUBinaryThresholdImageFilterTest2D - COMMAND ITKGPUThresholdingTestDriver itkGPUBinaryThresholdImageFilterTest - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${ITK_TEST_OUTPUT_DIR}/gpuBinaryThresholdImageFilterTest2D.mha 2) - -itk_add_test(NAME itkGPUBinaryThresholdImageFilterTest3D - COMMAND ITKGPUThresholdingTestDriver itkGPUBinaryThresholdImageFilterTest - ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png - ${ITK_TEST_OUTPUT_DIR}/gpuBinaryThresholdImageFilterTest3D.mha 3) +if(ITK_USE_GPU) + + itk_module_test() + + set(ITKGPUThresholding-tests + itkGPUImageFilterTest.cxx + #itkGPUImageFilterTestTemp.cxx + itkGPUBinaryThresholdImageFilterTest.cxx) + + createtestdriver(ITKGPUThresholding "${ITKGPUThresholding-Test_LIBRARIES}" "${ITKGPUThresholding-tests}") + + itk_add_test( + NAME + itkGPUImageFilterTest2D + COMMAND + ITKGPUThresholdingTestDriver + itkGPUImageFilterTest + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${ITK_TEST_OUTPUT_DIR}/gpuImageFilterTest2D.png + 2) + itk_add_test( + NAME + itkGPUImageFilterTest3D + COMMAND + ITKGPUThresholdingTestDriver + itkGPUImageFilterTest + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${ITK_TEST_OUTPUT_DIR}/gpuImageFilterTest3D.png + 3) + + # + #temporary test + #itk_add_test(NAME itkGPUImageFilterTestTemp + # COMMAND ITKGPUThresholdingTestDriver itkGPUImageFilterTestTemp + # ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + # ${ITK_TEST_OUTPUT_DIR}/gpuImageFilterTest.png) + + itk_add_test( + NAME + itkGPUBinaryThresholdImageFilterTest2D + COMMAND + ITKGPUThresholdingTestDriver + itkGPUBinaryThresholdImageFilterTest + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${ITK_TEST_OUTPUT_DIR}/gpuBinaryThresholdImageFilterTest2D.mha + 2) + + itk_add_test( + NAME + itkGPUBinaryThresholdImageFilterTest3D + COMMAND + ITKGPUThresholdingTestDriver + itkGPUBinaryThresholdImageFilterTest + ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySlice.png + ${ITK_TEST_OUTPUT_DIR}/gpuBinaryThresholdImageFilterTest3D.mha + 3) endif() diff --git a/Modules/Filtering/ImageCompare/itk-module.cmake b/Modules/Filtering/ImageCompare/itk-module.cmake index f547a0575f2..c388e775f4e 100644 --- a/Modules/Filtering/ImageCompare/itk-module.cmake +++ b/Modules/Filtering/ImageCompare/itk-module.cmake @@ -1,16 +1,17 @@ -set(DOCUMENTATION "This modules provides classes for comparing images. They are +set(DOCUMENTATION + "This modules provides classes for comparing images. They are typically used for comparing two images before and after registration, to perform regression testing or to compare the outcome of segmentations. In particular you will find here: checkerboard filter, absolute value differences, similarity index and STAPLE.") -itk_module(ITKImageCompare +itk_module( + ITKImageCompare DEPENDS - ITKImageIntensity + ITKImageIntensity COMPILE_DEPENDS - ITKImageFilterBase + ITKImageFilterBase TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/ImageCompare/test/CMakeLists.txt b/Modules/Filtering/ImageCompare/test/CMakeLists.txt index cde3d1b00b5..e89ae01a2e3 100644 --- a/Modules/Filtering/ImageCompare/test/CMakeLists.txt +++ b/Modules/Filtering/ImageCompare/test/CMakeLists.txt @@ -1,55 +1,97 @@ itk_module_test() set(ITKImageCompareTests -itkAbsoluteValueDifferenceImageFilterTest.cxx -itkSquaredDifferenceImageFilterTest.cxx -itkCheckerBoardImageFilterTest.cxx -itkConstrainedValueDifferenceImageFilterTest.cxx -itkSimilarityIndexImageFilterTest.cxx -itkSTAPLEImageFilterTest.cxx -itkTestingComparisonImageFilterTest.cxx -itkImageFileReaderIOToRequestedRegionMismatchTest.cxx -) + itkAbsoluteValueDifferenceImageFilterTest.cxx + itkSquaredDifferenceImageFilterTest.cxx + itkCheckerBoardImageFilterTest.cxx + itkConstrainedValueDifferenceImageFilterTest.cxx + itkSimilarityIndexImageFilterTest.cxx + itkSTAPLEImageFilterTest.cxx + itkTestingComparisonImageFilterTest.cxx + itkImageFileReaderIOToRequestedRegionMismatchTest.cxx) -CreateTestDriver(ITKImageCompare "${ITKImageCompare-Test_LIBRARIES}" "${ITKImageCompareTests}") +createtestdriver(ITKImageCompare "${ITKImageCompare-Test_LIBRARIES}" "${ITKImageCompareTests}") -itk_add_test(NAME itkAbsoluteValueDifferenceImageFilterTest - COMMAND ITKImageCompareTestDriver itkAbsoluteValueDifferenceImageFilterTest) -itk_add_test(NAME itkSquaredDifferenceImageFilterTest - COMMAND ITKImageCompareTestDriver itkSquaredDifferenceImageFilterTest) -itk_add_test(NAME itkCheckerBoardImageFilterTest - COMMAND ITKImageCompareTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkCheckerBoardImageFilterTest.png - 277faa96444775070dcc8f6be2d71eb2 - itkCheckerBoardImageFilterTest ${ITK_TEST_OUTPUT_DIR}/itkCheckerBoardImageFilterTest.png) -itk_add_test(NAME itkConstrainedValueDifferenceImageFilterTest - COMMAND ITKImageCompareTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkConstrainedValueDifferenceImageFilterTest.png - 87028680dd2bbc12f57b141f7272d295 - itkConstrainedValueDifferenceImageFilterTest ${ITK_TEST_OUTPUT_DIR}/itkConstrainedValueDifferenceImageFilterTest.png) -itk_add_test(NAME itkSimilarityIndexImageFilterTest - COMMAND ITKImageCompareTestDriver itkSimilarityIndexImageFilterTest) -itk_add_test(NAME itkSTAPLEImageFilterTest - COMMAND ITKImageCompareTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/STAPLEImageFilterTest.mha} - ${ITK_TEST_OUTPUT_DIR}/STAPLEImageFilterTest.mha - itkSTAPLEImageFilterTest - 2 ${ITK_TEST_OUTPUT_DIR}/STAPLEImageFilterTest.mha 255 100 0.5 - DATA{${ITK_DATA_ROOT}/Input/STAPLE1.png} - DATA{${ITK_DATA_ROOT}/Input/STAPLE2.png} - DATA{${ITK_DATA_ROOT}/Input/STAPLE3.png} - DATA{${ITK_DATA_ROOT}/Input/STAPLE4.png} -) -itk_add_test(NAME itkTestingComparisonImageFilterTest - COMMAND ITKImageCompareTestDriver - --compare DATA{Input/itkTestingComparisonImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkTestingComparisonImageFilterTest.png - itkTestingComparisonImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} - DATA{${ITK_DATA_ROOT}/Input/cake_hard.png} - ${ITK_TEST_OUTPUT_DIR}/itkTestingComparisonImageFilterTest.png 0 10 1 1647 11 66 16.2999 26846 -) -itk_add_test(NAME itkImageFileReaderIOToRequestedRegionMismatchTest - COMMAND ITKImageCompareTestDriver - itkImageFileReaderIOToRequestedRegionMismatchTest - DATA{${ITK_DATA_ROOT}/Input/STAPLE1.png} DATA{${ITK_DATA_ROOT}/Input/BinaryImageWithVariousShapes01.png} -) +itk_add_test( + NAME + itkAbsoluteValueDifferenceImageFilterTest + COMMAND + ITKImageCompareTestDriver + itkAbsoluteValueDifferenceImageFilterTest) +itk_add_test( + NAME + itkSquaredDifferenceImageFilterTest + COMMAND + ITKImageCompareTestDriver + itkSquaredDifferenceImageFilterTest) +itk_add_test( + NAME + itkCheckerBoardImageFilterTest + COMMAND + ITKImageCompareTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkCheckerBoardImageFilterTest.png + 277faa96444775070dcc8f6be2d71eb2 + itkCheckerBoardImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkCheckerBoardImageFilterTest.png) +itk_add_test( + NAME + itkConstrainedValueDifferenceImageFilterTest + COMMAND + ITKImageCompareTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkConstrainedValueDifferenceImageFilterTest.png + 87028680dd2bbc12f57b141f7272d295 + itkConstrainedValueDifferenceImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkConstrainedValueDifferenceImageFilterTest.png) +itk_add_test( + NAME + itkSimilarityIndexImageFilterTest + COMMAND + ITKImageCompareTestDriver + itkSimilarityIndexImageFilterTest) +itk_add_test( + NAME + itkSTAPLEImageFilterTest + COMMAND + ITKImageCompareTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/STAPLEImageFilterTest.mha} + ${ITK_TEST_OUTPUT_DIR}/STAPLEImageFilterTest.mha + itkSTAPLEImageFilterTest + 2 + ${ITK_TEST_OUTPUT_DIR}/STAPLEImageFilterTest.mha + 255 + 100 + 0.5 + DATA{${ITK_DATA_ROOT}/Input/STAPLE1.png} + DATA{${ITK_DATA_ROOT}/Input/STAPLE2.png} + DATA{${ITK_DATA_ROOT}/Input/STAPLE3.png} + DATA{${ITK_DATA_ROOT}/Input/STAPLE4.png}) +itk_add_test( + NAME + itkTestingComparisonImageFilterTest + COMMAND + ITKImageCompareTestDriver + --compare + DATA{Input/itkTestingComparisonImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkTestingComparisonImageFilterTest.png + itkTestingComparisonImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} + DATA{${ITK_DATA_ROOT}/Input/cake_hard.png} + ${ITK_TEST_OUTPUT_DIR}/itkTestingComparisonImageFilterTest.png + 0 + 10 + 1 + 1647 + 11 + 66 + 16.2999 + 26846) +itk_add_test( + NAME + itkImageFileReaderIOToRequestedRegionMismatchTest + COMMAND + ITKImageCompareTestDriver + itkImageFileReaderIOToRequestedRegionMismatchTest + DATA{${ITK_DATA_ROOT}/Input/STAPLE1.png} + DATA{${ITK_DATA_ROOT}/Input/BinaryImageWithVariousShapes01.png}) diff --git a/Modules/Filtering/ImageCompare/wrapping/itkAbsoluteValueDifferenceImageFilter.wrap b/Modules/Filtering/ImageCompare/wrapping/itkAbsoluteValueDifferenceImageFilter.wrap index 109c1483588..2718efc220e 100644 --- a/Modules/Filtering/ImageCompare/wrapping/itkAbsoluteValueDifferenceImageFilter.wrap +++ b/Modules/Filtering/ImageCompare/wrapping/itkAbsoluteValueDifferenceImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::AbsoluteValueDifferenceImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageCompare/wrapping/itkCheckerBoardImageFilter.wrap b/Modules/Filtering/ImageCompare/wrapping/itkCheckerBoardImageFilter.wrap index 8e83695e6c5..5753ea23c9f 100644 --- a/Modules/Filtering/ImageCompare/wrapping/itkCheckerBoardImageFilter.wrap +++ b/Modules/Filtering/ImageCompare/wrapping/itkCheckerBoardImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::CheckerBoardImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageCompare/wrapping/itkSTAPLEImageFilter.wrap b/Modules/Filtering/ImageCompare/wrapping/itkSTAPLEImageFilter.wrap index 3bcea3963fe..9cdf8b1b0e7 100644 --- a/Modules/Filtering/ImageCompare/wrapping/itkSTAPLEImageFilter.wrap +++ b/Modules/Filtering/ImageCompare/wrapping/itkSTAPLEImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::STAPLEImageFilter" POINTER) - # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +# itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +# itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageCompare/wrapping/itkSimilarityIndexImageFilter.wrap b/Modules/Filtering/ImageCompare/wrapping/itkSimilarityIndexImageFilter.wrap index 41ad4f75f81..600570d4a36 100644 --- a/Modules/Filtering/ImageCompare/wrapping/itkSimilarityIndexImageFilter.wrap +++ b/Modules/Filtering/ImageCompare/wrapping/itkSimilarityIndexImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::SimilarityIndexImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageCompare/wrapping/itkSquaredDifferenceImageFilter.wrap b/Modules/Filtering/ImageCompare/wrapping/itkSquaredDifferenceImageFilter.wrap index c1b365f8767..6b2bd62b391 100644 --- a/Modules/Filtering/ImageCompare/wrapping/itkSquaredDifferenceImageFilter.wrap +++ b/Modules/Filtering/ImageCompare/wrapping/itkSquaredDifferenceImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::SquaredDifferenceImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageCompose/itk-module.cmake b/Modules/Filtering/ImageCompose/itk-module.cmake index bcda7b04545..e0f1ff995bc 100644 --- a/Modules/Filtering/ImageCompose/itk-module.cmake +++ b/Modules/Filtering/ImageCompose/itk-module.cmake @@ -1,12 +1,13 @@ -set(DOCUMENTATION "This module contains filters that combine several images +set(DOCUMENTATION + "This module contains filters that combine several images into a single output image. For example, take several input scalar images and package them into an output image of multiple components.") -itk_module(ITKImageCompose +itk_module( + ITKImageCompose COMPILE_DEPENDS - ITKImageFilterBase + ITKImageFilterBase TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/ImageCompose/test/CMakeLists.txt b/Modules/Filtering/ImageCompose/test/CMakeLists.txt index 8f9c47f77e2..5807afcd1a0 100644 --- a/Modules/Filtering/ImageCompose/test/CMakeLists.txt +++ b/Modules/Filtering/ImageCompose/test/CMakeLists.txt @@ -1,47 +1,102 @@ itk_module_test() set(ITKImageComposeTests -itkCompose2DCovariantVectorImageFilterTest.cxx -itkCompose3DVectorImageFilterTest.cxx -itkCompose3DCovariantVectorImageFilterTest.cxx -itkCompose2DVectorImageFilterTest.cxx -itkComposeRGBImageFilterTest.cxx -itkImageToVectorImageFilterTest.cxx -itkImageReadRealAndImaginaryWriteComplexTest.cxx -itkComposeRGBAImageFilterTest.cxx -itkJoinSeriesImageFilterTest.cxx -itkJoinSeriesImageFilterStreamingTest.cxx -itkJoinImageFilterTest.cxx -) + itkCompose2DCovariantVectorImageFilterTest.cxx + itkCompose3DVectorImageFilterTest.cxx + itkCompose3DCovariantVectorImageFilterTest.cxx + itkCompose2DVectorImageFilterTest.cxx + itkComposeRGBImageFilterTest.cxx + itkImageToVectorImageFilterTest.cxx + itkImageReadRealAndImaginaryWriteComplexTest.cxx + itkComposeRGBAImageFilterTest.cxx + itkJoinSeriesImageFilterTest.cxx + itkJoinSeriesImageFilterStreamingTest.cxx + itkJoinImageFilterTest.cxx) -CreateTestDriver(ITKImageCompose "${ITKImageCompose-Test_LIBRARIES}" "${ITKImageComposeTests}") +createtestdriver(ITKImageCompose "${ITKImageCompose-Test_LIBRARIES}" "${ITKImageComposeTests}") -itk_add_test(NAME itkCompose2DCovariantVectorImageFilterTest - COMMAND ITKImageComposeTestDriver itkCompose2DCovariantVectorImageFilterTest) -itk_add_test(NAME itkCompose3DVectorImageFilterTest - COMMAND ITKImageComposeTestDriver itkCompose3DVectorImageFilterTest) -itk_add_test(NAME itkCompose3DCovariantVectorImageFilterTest - COMMAND ITKImageComposeTestDriver itkCompose3DCovariantVectorImageFilterTest) -itk_add_test(NAME itkCompose2DVectorImageFilterTest - COMMAND ITKImageComposeTestDriver itkCompose2DVectorImageFilterTest) -itk_add_test(NAME itkComposeRGBImageFilterTest - COMMAND ITKImageComposeTestDriver itkComposeRGBImageFilterTest) -itk_add_test(NAME itkImageToVectorImageFilterTest - COMMAND ITKImageComposeTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ImageToVectorImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/ImageToVectorImageFilterTest.png - itkImageToVectorImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Spots.png} DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} ${ITK_TEST_OUTPUT_DIR}/ImageToVectorImageFilterTest.png) -itk_add_test(NAME itkImageReadRealAndImaginaryWriteComplexTest - COMMAND ITKImageComposeTestDriver itkImageReadRealAndImaginaryWriteComplexTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png ${ITK_EXAMPLE_DATA_ROOT}/BrainT1Slice.png ${ITK_TEST_OUTPUT_DIR}/itkBrainSliceComplex.mha) -itk_add_test(NAME itkComposeRGBAImageFilterTest - COMMAND ITKImageComposeTestDriver itkComposeRGBAImageFilterTest - ${ITK_TEST_OUTPUT_DIR}/itkComposeRGBAImageFilterTestOutput.png DATA{${ITK_DATA_ROOT}/Input/Number1inText.png} DATA{${ITK_DATA_ROOT}/Input/Number2inText.png} DATA{${ITK_DATA_ROOT}/Input/Number3inText.png} DATA{${ITK_DATA_ROOT}/Input/IntensityRamp64.png}) -itk_add_test(NAME itkJoinSeriesImageFilterTest - COMMAND ITKImageComposeTestDriver itkJoinSeriesImageFilterTest) -itk_add_test(NAME itkJoinSeriesImageFilterStreamingTest - COMMAND ITKImageComposeTestDriver - --compare DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/itkJoinSeriesImageFilterStreamingTest.mha - itkJoinSeriesImageFilterStreamingTest DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/itkJoinSeriesImageFilterStreamingTest.mha) -itk_add_test(NAME itkJoinImageFilterTest - COMMAND ITKImageComposeTestDriver itkJoinImageFilterTest) +itk_add_test( + NAME + itkCompose2DCovariantVectorImageFilterTest + COMMAND + ITKImageComposeTestDriver + itkCompose2DCovariantVectorImageFilterTest) +itk_add_test( + NAME + itkCompose3DVectorImageFilterTest + COMMAND + ITKImageComposeTestDriver + itkCompose3DVectorImageFilterTest) +itk_add_test( + NAME + itkCompose3DCovariantVectorImageFilterTest + COMMAND + ITKImageComposeTestDriver + itkCompose3DCovariantVectorImageFilterTest) +itk_add_test( + NAME + itkCompose2DVectorImageFilterTest + COMMAND + ITKImageComposeTestDriver + itkCompose2DVectorImageFilterTest) +itk_add_test( + NAME + itkComposeRGBImageFilterTest + COMMAND + ITKImageComposeTestDriver + itkComposeRGBImageFilterTest) +itk_add_test( + NAME + itkImageToVectorImageFilterTest + COMMAND + ITKImageComposeTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ImageToVectorImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/ImageToVectorImageFilterTest.png + itkImageToVectorImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Spots.png} + DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} + DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} + ${ITK_TEST_OUTPUT_DIR}/ImageToVectorImageFilterTest.png) +itk_add_test( + NAME + itkImageReadRealAndImaginaryWriteComplexTest + COMMAND + ITKImageComposeTestDriver + itkImageReadRealAndImaginaryWriteComplexTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainT1Slice.png + ${ITK_TEST_OUTPUT_DIR}/itkBrainSliceComplex.mha) +itk_add_test( + NAME + itkComposeRGBAImageFilterTest + COMMAND + ITKImageComposeTestDriver + itkComposeRGBAImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkComposeRGBAImageFilterTestOutput.png + DATA{${ITK_DATA_ROOT}/Input/Number1inText.png} + DATA{${ITK_DATA_ROOT}/Input/Number2inText.png} + DATA{${ITK_DATA_ROOT}/Input/Number3inText.png} + DATA{${ITK_DATA_ROOT}/Input/IntensityRamp64.png}) +itk_add_test( + NAME + itkJoinSeriesImageFilterTest + COMMAND + ITKImageComposeTestDriver + itkJoinSeriesImageFilterTest) +itk_add_test( + NAME + itkJoinSeriesImageFilterStreamingTest + COMMAND + ITKImageComposeTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkJoinSeriesImageFilterStreamingTest.mha + itkJoinSeriesImageFilterStreamingTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkJoinSeriesImageFilterStreamingTest.mha) +itk_add_test( + NAME + itkJoinImageFilterTest + COMMAND + ITKImageComposeTestDriver + itkJoinImageFilterTest) diff --git a/Modules/Filtering/ImageCompose/wrapping/itkComposeImageFilter.wrap b/Modules/Filtering/ImageCompose/wrapping/itkComposeImageFilter.wrap index b9b997e7767..d365bb42d2e 100644 --- a/Modules/Filtering/ImageCompose/wrapping/itkComposeImageFilter.wrap +++ b/Modules/Filtering/ImageCompose/wrapping/itkComposeImageFilter.wrap @@ -1,57 +1,57 @@ itk_wrap_class("itk::ComposeImageFilter" POINTER) - # VectorImage types - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_VI${t}${d}}" "${ITKT_I${t}${d}}, ${ITKT_VI${t}${d}}") - endforeach() +# VectorImage types +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_VI${t}${d}}" "${ITKT_I${t}${d}}, ${ITKT_VI${t}${d}}") endforeach() - - # Note: we do not wrap more input types here, this filter should - # not be used to cast types, use the castimagefilter for this. - # This allows to reduce the number of wrapped classes. - if(ITK_WRAP_float AND ITK_WRAP_covariant_vector_float) - itk_wrap_image_filter_types(F CVF 2) - itk_wrap_image_filter_types(F CVF 3) - endif() - - if(ITK_WRAP_double AND ITK_WRAP_covariant_vector_double) - itk_wrap_image_filter_types(D CVD 2) - itk_wrap_image_filter_types(D CVD 3) - endif() - - if(ITK_WRAP_float AND ITK_WRAP_vector_float) - itk_wrap_image_filter_types(F VF 2) - itk_wrap_image_filter_types(F VF 3) - endif() - - if(ITK_WRAP_double AND ITK_WRAP_vector_double) - itk_wrap_image_filter_types(D VD 2) - itk_wrap_image_filter_types(D VD 3) - endif() - - if(ITK_WRAP_rgba_unsigned_char AND ITK_WRAP_unsigned_char) - itk_wrap_image_filter_types(UC RGBAUC) - endif() - - if(ITK_WRAP_rgba_unsigned_short AND ITK_WRAP_unsigned_short) - itk_wrap_image_filter_types(US RGBAUS) - endif() - - if(ITK_WRAP_rgb_unsigned_char AND ITK_WRAP_unsigned_char) - itk_wrap_image_filter_types(UC RGBUC) - endif() - - if(ITK_WRAP_rgb_unsigned_short AND ITK_WRAP_unsigned_short) - itk_wrap_image_filter_types(US RGBUS) - endif() - - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_image_filter_types(F CF) - endif() - - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_image_filter_types(D CD) - endif() +endforeach() + +# Note: we do not wrap more input types here, this filter should +# not be used to cast types, use the castimagefilter for this. +# This allows to reduce the number of wrapped classes. +if(ITK_WRAP_float AND ITK_WRAP_covariant_vector_float) + itk_wrap_image_filter_types(F CVF 2) + itk_wrap_image_filter_types(F CVF 3) +endif() + +if(ITK_WRAP_double AND ITK_WRAP_covariant_vector_double) + itk_wrap_image_filter_types(D CVD 2) + itk_wrap_image_filter_types(D CVD 3) +endif() + +if(ITK_WRAP_float AND ITK_WRAP_vector_float) + itk_wrap_image_filter_types(F VF 2) + itk_wrap_image_filter_types(F VF 3) +endif() + +if(ITK_WRAP_double AND ITK_WRAP_vector_double) + itk_wrap_image_filter_types(D VD 2) + itk_wrap_image_filter_types(D VD 3) +endif() + +if(ITK_WRAP_rgba_unsigned_char AND ITK_WRAP_unsigned_char) + itk_wrap_image_filter_types(UC RGBAUC) +endif() + +if(ITK_WRAP_rgba_unsigned_short AND ITK_WRAP_unsigned_short) + itk_wrap_image_filter_types(US RGBAUS) +endif() + +if(ITK_WRAP_rgb_unsigned_char AND ITK_WRAP_unsigned_char) + itk_wrap_image_filter_types(UC RGBUC) +endif() + +if(ITK_WRAP_rgb_unsigned_short AND ITK_WRAP_unsigned_short) + itk_wrap_image_filter_types(US RGBUS) +endif() + +if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_image_filter_types(F CF) +endif() + +if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_image_filter_types(D CD) +endif() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageCompose/wrapping/itkJoinSeriesImageFilter.wrap b/Modules/Filtering/ImageCompose/wrapping/itkJoinSeriesImageFilter.wrap index 6e200ff5872..6a60eab5518 100644 --- a/Modules/Filtering/ImageCompose/wrapping/itkJoinSeriesImageFilter.wrap +++ b/Modules/Filtering/ImageCompose/wrapping/itkJoinSeriesImageFilter.wrap @@ -10,15 +10,14 @@ endforeach() # Wrap if allowed if(wrappable) itk_wrap_class("itk::JoinSeriesImageFilter" POINTER) - foreach(d1 ${ITK_WRAP_IMAGE_DIMS}) - foreach(d2 ${ITK_WRAP_IMAGE_DIMS}) - if("${d1}" LESS "${d2}") - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d1}}${ITKM_I${t}${d2}}" - "${ITKT_I${t}${d1}},${ITKT_I${t}${d2}}") - endforeach() - endif() - endforeach() + foreach(d1 ${ITK_WRAP_IMAGE_DIMS}) + foreach(d2 ${ITK_WRAP_IMAGE_DIMS}) + if("${d1}" LESS "${d2}") + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d1}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d1}},${ITKT_I${t}${d2}}") + endforeach() + endif() endforeach() + endforeach() itk_end_wrap_class() endif() diff --git a/Modules/Filtering/ImageFeature/itk-module.cmake b/Modules/Filtering/ImageFeature/itk-module.cmake index 97d34b4d3d4..78a6c70aaf3 100644 --- a/Modules/Filtering/ImageFeature/itk-module.cmake +++ b/Modules/Filtering/ImageFeature/itk-module.cmake @@ -1,22 +1,23 @@ -set(DOCUMENTATION "This module contains classes that compute image features. In +set(DOCUMENTATION + "This module contains classes that compute image features. In particular you will find here: Canny edge detection, Sobel, ZeroCrossings, Hough transform for lines and circles, Hessian filters, Vesselness, and Fractional anisotropy for tensor images.") -itk_module(ITKImageFeature +itk_module( + ITKImageFeature ENABLE_SHARED DEPENDS - ITKSmoothing - ITKSpatialObjects + ITKSmoothing + ITKSpatialObjects COMPILE_DEPENDS - ITKImageGradient - ITKImageSources - ITKMesh - ITKImageStatistics + ITKImageGradient + ITKImageSources + ITKMesh + ITKImageStatistics TEST_DEPENDS - ITKTestKernel - ITKThresholding + ITKTestKernel + ITKThresholding DESCRIPTION - "${DOCUMENTATION}" - ) + "${DOCUMENTATION}") # Extra test dependency on ITKThresholding is introduced by itkHoughTransform2DCirclesImageTest. diff --git a/Modules/Filtering/ImageFeature/src/CMakeLists.txt b/Modules/Filtering/ImageFeature/src/CMakeLists.txt index 6ec1386a01f..4d70af9c9ec 100644 --- a/Modules/Filtering/ImageFeature/src/CMakeLists.txt +++ b/Modules/Filtering/ImageFeature/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKImageFeature_SRCS - itkMultiScaleHessianBasedMeasureImageFilter.cxx - ) +set(ITKImageFeature_SRCS itkMultiScaleHessianBasedMeasureImageFilter.cxx) itk_module_add_library(ITKImageFeature ${ITKImageFeature_SRCS}) diff --git a/Modules/Filtering/ImageFeature/test/CMakeLists.txt b/Modules/Filtering/ImageFeature/test/CMakeLists.txt index 70dbc10c8d0..5469a0f9c08 100644 --- a/Modules/Filtering/ImageFeature/test/CMakeLists.txt +++ b/Modules/Filtering/ImageFeature/test/CMakeLists.txt @@ -1,253 +1,549 @@ itk_module_test() set(ITKImageFeatureTests -itkZeroCrossingBasedEdgeDetectionImageFilterTest.cxx -itkLaplacianImageFilterTest.cxx -itkSobelEdgeDetectionImageFilterTest.cxx -itkHessian3DToVesselnessMeasureImageFilterTest.cxx -itkHessianToObjectnessMeasureImageFilterTest.cxx -itkHessianRecursiveGaussianFilterScaleSpaceTest.cxx -itkHessianRecursiveGaussianFilterTest.cxx -itkHoughTransform2DCirclesImageTest.cxx -itkHoughTransform2DLinesImageTest.cxx -itkCannyEdgeDetectionImageFilterTest.cxx -itkBilateralImageFilterTest.cxx -itkBilateralImageFilterTest2.cxx -itkBilateralImageFilterTest3.cxx -itkGradientVectorFlowImageFilterTest.cxx -itkSimpleContourExtractorImageFilterTest.cxx -itkZeroCrossingImageFilterTest.cxx -itkCannyEdgeDetectionImageFilterTest2.cxx -itkDerivativeImageFilterTest.cxx -itkLaplacianRecursiveGaussianImageFilterTest.cxx -itkLaplacianSharpeningImageFilterTest.cxx -itkMaskFeaturePointSelectionFilterTest.cxx -itkUnsharpMaskImageFilterTestSimple.cxx -itkUnsharpMaskImageFilterTest.cxx -itkDiscreteGaussianDerivativeImageFilterScaleSpaceTest.cxx -itkDiscreteGaussianDerivativeImageFilterTest.cxx -itkMultiScaleHessianBasedMeasureImageFilterTest.cxx -) + itkZeroCrossingBasedEdgeDetectionImageFilterTest.cxx + itkLaplacianImageFilterTest.cxx + itkSobelEdgeDetectionImageFilterTest.cxx + itkHessian3DToVesselnessMeasureImageFilterTest.cxx + itkHessianToObjectnessMeasureImageFilterTest.cxx + itkHessianRecursiveGaussianFilterScaleSpaceTest.cxx + itkHessianRecursiveGaussianFilterTest.cxx + itkHoughTransform2DCirclesImageTest.cxx + itkHoughTransform2DLinesImageTest.cxx + itkCannyEdgeDetectionImageFilterTest.cxx + itkBilateralImageFilterTest.cxx + itkBilateralImageFilterTest2.cxx + itkBilateralImageFilterTest3.cxx + itkGradientVectorFlowImageFilterTest.cxx + itkSimpleContourExtractorImageFilterTest.cxx + itkZeroCrossingImageFilterTest.cxx + itkCannyEdgeDetectionImageFilterTest2.cxx + itkDerivativeImageFilterTest.cxx + itkLaplacianRecursiveGaussianImageFilterTest.cxx + itkLaplacianSharpeningImageFilterTest.cxx + itkMaskFeaturePointSelectionFilterTest.cxx + itkUnsharpMaskImageFilterTestSimple.cxx + itkUnsharpMaskImageFilterTest.cxx + itkDiscreteGaussianDerivativeImageFilterScaleSpaceTest.cxx + itkDiscreteGaussianDerivativeImageFilterTest.cxx + itkMultiScaleHessianBasedMeasureImageFilterTest.cxx) -CreateTestDriver(ITKImageFeature "${ITKImageFeature-Test_LIBRARIES}" "${ITKImageFeatureTests}") +createtestdriver(ITKImageFeature "${ITKImageFeature-Test_LIBRARIES}" "${ITKImageFeatureTests}") set(TEMP ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkZeroCrossingBasedEdgeDetectionImageFilterTest - COMMAND ITKImageFeatureTestDriver itkZeroCrossingBasedEdgeDetectionImageFilterTest 1.0 0.01 0 1) -itk_add_test(NAME itkLaplacianImageFilterTest - COMMAND ITKImageFeatureTestDriver - --compare DATA{Baseline/itkLaplacianImageFilterTestBaseline.png} - ${ITK_TEST_OUTPUT_DIR}/itkLaplacianImageFilterTest.png - itkLaplacianImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLaplacianImageFilterTest.png - 0) -itk_add_test(NAME itkLaplacianImageFilterWithSpacingTest - COMMAND ITKImageFeatureTestDriver - --compare DATA{Baseline/itkLaplacianImageFilterWithSpacingTestBaseline.png} - ${ITK_TEST_OUTPUT_DIR}/itkLaplacianImageFilterWithSpacingTest.png - itkLaplacianImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLaplacianImageFilterWithSpacingTest.png - 1) -itk_add_test(NAME itkSobelEdgeDetectionImageFilterTest - COMMAND ITKImageFeatureTestDriver - --compare DATA{Baseline/itkSobelEdgeDetectionImageFilterTestBaseline.png} - ${ITK_TEST_OUTPUT_DIR}/itkSobelEdgeDetectionImageFilterTest.png - itkSobelEdgeDetectionImageFilterTest - DATA{Input/Swirled.png} ${ITK_TEST_OUTPUT_DIR}/itkSobelEdgeDetectionImageFilterTest.png) -itk_add_test(NAME itkUnsharpMaskImageFilterTestSimple - COMMAND ITKImageFeatureTestDriver itkUnsharpMaskImageFilterTestSimple) -itk_add_test(NAME itkUnsharpMaskImageFilterTest_DefaultsUChar - COMMAND ITKImageFeatureTestDriver - --compare DATA{Baseline/SwirledUSM_Defaults.png} - ${TEMP}/SwirledUSM_Defaults.png - --compareIntensityTolerance .001 +itk_add_test( + NAME + itkZeroCrossingBasedEdgeDetectionImageFilterTest + COMMAND + ITKImageFeatureTestDriver + itkZeroCrossingBasedEdgeDetectionImageFilterTest + 1.0 + 0.01 + 0 + 1) +itk_add_test( + NAME + itkLaplacianImageFilterTest + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{Baseline/itkLaplacianImageFilterTestBaseline.png} + ${ITK_TEST_OUTPUT_DIR}/itkLaplacianImageFilterTest.png + itkLaplacianImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLaplacianImageFilterTest.png + 0) +itk_add_test( + NAME + itkLaplacianImageFilterWithSpacingTest + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{Baseline/itkLaplacianImageFilterWithSpacingTestBaseline.png} + ${ITK_TEST_OUTPUT_DIR}/itkLaplacianImageFilterWithSpacingTest.png + itkLaplacianImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLaplacianImageFilterWithSpacingTest.png + 1) +itk_add_test( + NAME + itkSobelEdgeDetectionImageFilterTest + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{Baseline/itkSobelEdgeDetectionImageFilterTestBaseline.png} + ${ITK_TEST_OUTPUT_DIR}/itkSobelEdgeDetectionImageFilterTest.png + itkSobelEdgeDetectionImageFilterTest + DATA{Input/Swirled.png} + ${ITK_TEST_OUTPUT_DIR}/itkSobelEdgeDetectionImageFilterTest.png) +itk_add_test( + NAME + itkUnsharpMaskImageFilterTestSimple + COMMAND + ITKImageFeatureTestDriver + itkUnsharpMaskImageFilterTestSimple) +itk_add_test( + NAME + itkUnsharpMaskImageFilterTest_DefaultsUChar + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{Baseline/SwirledUSM_Defaults.png} + ${TEMP}/SwirledUSM_Defaults.png + --compareIntensityTolerance + .001 itkUnsharpMaskImageFilterTest uchar DATA{Input/Swirled.png} - ${TEMP}/SwirledUSM_Defaults.png - ) -itk_add_test(NAME itkUnsharpMaskImageFilterTest_DefaultsFloat - COMMAND ITKImageFeatureTestDriver - --compare DATA{Baseline/SwirledUSM_Defaults.nrrd} - ${TEMP}/SwirledUSM_Defaults.nrrd - --compareIntensityTolerance .001 + ${TEMP}/SwirledUSM_Defaults.png) +itk_add_test( + NAME + itkUnsharpMaskImageFilterTest_DefaultsFloat + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{Baseline/SwirledUSM_Defaults.nrrd} + ${TEMP}/SwirledUSM_Defaults.nrrd + --compareIntensityTolerance + .001 itkUnsharpMaskImageFilterTest float DATA{Input/Swirled.png} - ${TEMP}/SwirledUSM_Defaults.nrrd - ) -itk_add_test(NAME itkUnsharpMaskImageFilterTest_3_3_15 - COMMAND ITKImageFeatureTestDriver - --compare DATA{Baseline/SwirledUSM_3-3-15.nrrd} - ${TEMP}/SwirledUSM_3-3-15.nrrd.nrrd - --compareIntensityTolerance .001 + ${TEMP}/SwirledUSM_Defaults.nrrd) +itk_add_test( + NAME + itkUnsharpMaskImageFilterTest_3_3_15 + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{Baseline/SwirledUSM_3-3-15.nrrd} + ${TEMP}/SwirledUSM_3-3-15.nrrd.nrrd + --compareIntensityTolerance + .001 itkUnsharpMaskImageFilterTest float DATA{Input/Swirled.png} ${TEMP}/SwirledUSM_3-3-15.nrrd.nrrd - 3.0 3.0 15) -itk_add_test(NAME itkHessian3DToVesselnessMeasureImageFilterTest - COMMAND ITKImageFeatureTestDriver itkHessian3DToVesselnessMeasureImageFilterTest 0.5 0.5 2.0) -itk_add_test(NAME itkHessianToObjectnessMeasureImageFilterTest - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkHessianToObjectnessMeasureImageFilterTest.mha} - ${TEMP}/itkHessianToObjectnessMeasureImageFilterTestOutput.mha - --compareIntensityTolerance .01 + 3.0 + 3.0 + 15) +itk_add_test( + NAME + itkHessian3DToVesselnessMeasureImageFilterTest + COMMAND + ITKImageFeatureTestDriver + itkHessian3DToVesselnessMeasureImageFilterTest + 0.5 + 0.5 + 2.0) +itk_add_test( + NAME + itkHessianToObjectnessMeasureImageFilterTest + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkHessianToObjectnessMeasureImageFilterTest.mha} + ${TEMP}/itkHessianToObjectnessMeasureImageFilterTestOutput.mha + --compareIntensityTolerance + .01 itkHessianToObjectnessMeasureImageFilterTest DATA{${ITK_DATA_ROOT}/Input/DSA.png} ${TEMP}/itkHessianToObjectnessMeasureImageFilterTestOutput.mha - 1 0) -itk_add_test(NAME itkHessianToObjectnessMeasureImageFilterTest2 - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkHessianToObjectnessMeasureImageFilterTest2.mha} - ${TEMP}/itkHessianToObjectnessMeasureImageFilterTestOutput2.mha - --compareIntensityTolerance .01 + 1 + 0) +itk_add_test( + NAME + itkHessianToObjectnessMeasureImageFilterTest2 + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkHessianToObjectnessMeasureImageFilterTest2.mha} + ${TEMP}/itkHessianToObjectnessMeasureImageFilterTestOutput2.mha + --compareIntensityTolerance + .01 itkHessianToObjectnessMeasureImageFilterTest DATA{${ITK_DATA_ROOT}/Input/DSA.png} ${TEMP}/itkHessianToObjectnessMeasureImageFilterTestOutput2.mha - 0 0) -itk_add_test(NAME itkHessianRecursiveGaussianFilterScaleSpaceTest - COMMAND ITKImageFeatureTestDriver itkHessianRecursiveGaussianFilterScaleSpaceTest) + 0 + 0) +itk_add_test( + NAME + itkHessianRecursiveGaussianFilterScaleSpaceTest + COMMAND + ITKImageFeatureTestDriver + itkHessianRecursiveGaussianFilterScaleSpaceTest) -itk_add_test(NAME itkHessianRecursiveGaussianFilterTest - COMMAND ITKImageFeatureTestDriver --redirectOutput ${TEMP}/itkHessianRecursiveGaussianFilterTest.txt - itkHessianRecursiveGaussianFilterTest 2.5 0) -set_tests_properties(itkHessianRecursiveGaussianFilterTest PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkHessianRecursiveGaussianFilterTest.txt) +itk_add_test( + NAME + itkHessianRecursiveGaussianFilterTest + COMMAND + ITKImageFeatureTestDriver + --redirectOutput + ${TEMP}/itkHessianRecursiveGaussianFilterTest.txt + itkHessianRecursiveGaussianFilterTest + 2.5 + 0) +set_tests_properties(itkHessianRecursiveGaussianFilterTest PROPERTIES ATTACHED_FILES_ON_FAIL + ${TEMP}/itkHessianRecursiveGaussianFilterTest.txt) -itk_add_test(NAME itkHoughTransform2DCirclesImageTest - COMMAND ITKImageFeatureTestDriver itkHoughTransform2DCirclesImageTest) -itk_add_test(NAME itkHoughTransform2DLinesImageTest - COMMAND ITKImageFeatureTestDriver itkHoughTransform2DLinesImageTest) -itk_add_test(NAME itkCannyEdgeDetectionImageFilterTest - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkCannyEdgeDetectionImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkCannyEdgeDetectionImageFilterTest.png - itkCannyEdgeDetectionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkCannyEdgeDetectionImageFilterTest.png) -itk_add_test(NAME itkBilateralImageFilterTest - COMMAND ITKImageFeatureTestDriver itkBilateralImageFilterTest) -itk_add_test(NAME itkBilateralImageFilterTest2 - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/BilateralImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/BilateralImageFilterTest2.png - itkBilateralImageFilterTest2 DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} ${ITK_TEST_OUTPUT_DIR}/BilateralImageFilterTest2.png) -itk_add_test(NAME itkBilateralImageFilterTest3 - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/BilateralImageFilterTest3.png} - ${ITK_TEST_OUTPUT_DIR}/BilateralImageFilterTest3.png - itkBilateralImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} ${ITK_TEST_OUTPUT_DIR}/BilateralImageFilterTest3.png) -itk_add_test(NAME itkGradientVectorFlowImageFilterTest - COMMAND ITKImageFeatureTestDriver itkGradientVectorFlowImageFilterTest) -itk_add_test(NAME itkSimpleContourExtractorImageFilterTest - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/SimpleContourExtractorImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/SimpleContourExtractorImageFilterTest.png - itkSimpleContourExtractorImageFilterTest DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/BinaryThresholdImageFilterTest2.png} ${ITK_TEST_OUTPUT_DIR}/SimpleContourExtractorImageFilterTest.png) -itk_add_test(NAME itkZeroCrossingImageFilterTest - COMMAND ITKImageFeatureTestDriver itkZeroCrossingImageFilterTest) -itk_add_test(NAME itkCannyEdgeDetectionImageFilterTest2 - COMMAND ITKImageFeatureTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/itkCannyEdgeDetectionImageFilterTest2_A.png - ${ITK_TEST_OUTPUT_DIR}/itkCannyEdgeDetectionImageFilterTest2_B.png - itkCannyEdgeDetectionImageFilterTest2 DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkCannyEdgeDetectionImageFilterTest2_A.png ${ITK_TEST_OUTPUT_DIR}/itkCannyEdgeDetectionImageFilterTest2_B.png) -itk_add_test(NAME itkDerivativeImageFilterTest1x - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkDerivativeImageFilterTest1x.png} - ${ITK_TEST_OUTPUT_DIR}/itkDerivativeImageFilterTest1x.png - itkDerivativeImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkDerivativeImageFilterTest1x.png 1 0 1) -itk_add_test(NAME itkDerivativeImageFilterTest1y - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkDerivativeImageFilterTest1y.png} - ${ITK_TEST_OUTPUT_DIR}/itkDerivativeImageFilterTest1y.png - itkDerivativeImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkDerivativeImageFilterTest1y.png 1 1 1) -itk_add_test(NAME itkDerivativeImageFilterTest2x - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkDerivativeImageFilterTest2x.png} - ${ITK_TEST_OUTPUT_DIR}/itkDerivativeImageFilterTest2x.png - itkDerivativeImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkDerivativeImageFilterTest2x.png 2 0 1) -itk_add_test(NAME itkDerivativeImageFilterTest2y - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkDerivativeImageFilterTest2y.png} - ${ITK_TEST_OUTPUT_DIR}/itkDerivativeImageFilterTest2y.png - itkDerivativeImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkDerivativeImageFilterTest2y.png 2 1 1) -itk_add_test(NAME itkLaplacianRecursiveGaussianImageFilterTest - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/LaplacianRecursiveGaussianImageFilterTest.png,:} - ${ITK_TEST_OUTPUT_DIR}/LaplacianRecursiveGaussianImageFilterTest.png - itkLaplacianRecursiveGaussianImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/LaplacianRecursiveGaussianImageFilterTest.png) -itk_add_test(NAME itkLaplacianSharpeningImageFilterTest - COMMAND ITKImageFeatureTestDriver - --compare DATA{Baseline/itkLaplacianSharpeningImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkLaplacianSharpeningImageFilterTest.png - itkLaplacianSharpeningImageFilterTest DATA{${ITK_DATA_ROOT}/Input/sf4.png} ${ITK_TEST_OUTPUT_DIR}/itkLaplacianSharpeningImageFilterTest.png 1) -itk_add_test(NAME itkMaskFeaturePointSelectionFilterTest - COMMAND ITKImageFeatureTestDriver - --compare DATA{Baseline/itkMaskFeaturePointSelectionFilterTest.mha} - ${ITK_TEST_OUTPUT_DIR}/itkMaskFeaturePointSelectionFilterTest.mha - itkMaskFeaturePointSelectionFilterTest -DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} ${ITK_TEST_OUTPUT_DIR}/itkMaskFeaturePointSelectionFilterTest.mha 0 2 0 0.01) -itk_add_test(NAME itkMaskFeaturePointSelectionFilterTestTensors - COMMAND ITKImageFeatureTestDriver - --compare DATA{Baseline/itkMaskFeaturePointSelectionFilterTestTensors.mha} - ${ITK_TEST_OUTPUT_DIR}/itkMaskFeaturePointSelectionFilterTestTensors.mha - itkMaskFeaturePointSelectionFilterTest -DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} ${ITK_TEST_OUTPUT_DIR}/itkMaskFeaturePointSelectionFilterTestTensors.mha 0 2 1 0.01) -itk_add_test(NAME itkMaskFeaturePointSelectionFilterTestMask - COMMAND ITKImageFeatureTestDriver - --compare DATA{Baseline/itkMaskFeaturePointSelectionFilterTestMask.mha} - ${ITK_TEST_OUTPUT_DIR}/itkMaskFeaturePointSelectionFilterTestMask.mha - itkMaskFeaturePointSelectionFilterTest -DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} ${ITK_TEST_OUTPUT_DIR}/itkMaskFeaturePointSelectionFilterTestMask.mha 0 2 1 0.01 DATA{Input/HeadMRVolumeMaskImage.mha}) -itk_add_test(NAME itkDiscreteGaussianDerivativeImageFilterScaleSpaceTest - COMMAND ITKImageFeatureTestDriver itkDiscreteGaussianDerivativeImageFilterScaleSpaceTest) -itk_add_test(NAME itkDiscreteGaussianDerivativeImageFilterTest01 - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest01.png} - ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest01.png - itkDiscreteGaussianDerivativeImageFilterTest DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest01.png 0 1 3.0) -itk_add_test(NAME itkDiscreteGaussianDerivativeImageFilterTest10 - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest10.png} - ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest10.png - itkDiscreteGaussianDerivativeImageFilterTest DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest10.png 1 0 3.0) -itk_add_test(NAME itkDiscreteGaussianDerivativeImageFilterTest11 - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest11.png} - ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest11.png - itkDiscreteGaussianDerivativeImageFilterTest DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest11.png 1 1 3.0) -itk_add_test(NAME itkDiscreteGaussianDerivativeImageFilterTest20 - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest20.png} - ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest20.png - itkDiscreteGaussianDerivativeImageFilterTest DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest20.png 2 0 3.0) -itk_add_test(NAME itkDiscreteGaussianDerivativeImageFilterTest02 - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest02.png} - ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest02.png - itkDiscreteGaussianDerivativeImageFilterTest DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest02.png 0 2 3.0) -itk_add_test(NAME itkDiscreteGaussianDerivativeImageFilterTest21 - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest21.png} - ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest21.png - itkDiscreteGaussianDerivativeImageFilterTest DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest21.png 2 1 3.0) -itk_add_test(NAME itkDiscreteGaussianDerivativeImageFilterTest12 - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest12.png} - ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest12.png - itkDiscreteGaussianDerivativeImageFilterTest DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest12.png 1 2 3.0) -itk_add_test(NAME itkDiscreteGaussianDerivativeImageFilterTest30 - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest30.png} - ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest30.png - itkDiscreteGaussianDerivativeImageFilterTest DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest30.png 3 0 3.0) -itk_add_test(NAME itkDiscreteGaussianDerivativeImageFilterTest03 - COMMAND ITKImageFeatureTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest03.png} - ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest03.png - itkDiscreteGaussianDerivativeImageFilterTest DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest03.png 0 3 3.0) -itk_add_test(NAME itkMultiScaleHessianBasedMeasureImageFilterTest - COMMAND ITKImageFeatureTestDriver - --compare DATA{Baseline/itkMultiScaleHessianBasedMeasureImageFilterTestEnhancedOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/itkMultiScaleHessianBasedMeasureImageFilterTestEnhancedOutput.mha - itkMultiScaleHessianBasedMeasureImageFilterTest DATA{${ITK_DATA_ROOT}/Input/DSA.png} ${ITK_TEST_OUTPUT_DIR}/itkMultiScaleHessianBasedMeasureImageFilterTestEnhancedOutput.mha ${ITK_TEST_OUTPUT_DIR}/itkMultiScaleHessianBasedMeasureImageFilterTestScalesOutput.mha 5 10 10 1 0 ${ITK_TEST_OUTPUT_DIR}/itkMultiScaleHessianBasedMeasureImageFilterTestEnhancedOutput2.mha) +itk_add_test( + NAME + itkHoughTransform2DCirclesImageTest + COMMAND + ITKImageFeatureTestDriver + itkHoughTransform2DCirclesImageTest) +itk_add_test( + NAME + itkHoughTransform2DLinesImageTest + COMMAND + ITKImageFeatureTestDriver + itkHoughTransform2DLinesImageTest) +itk_add_test( + NAME + itkCannyEdgeDetectionImageFilterTest + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkCannyEdgeDetectionImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkCannyEdgeDetectionImageFilterTest.png + itkCannyEdgeDetectionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkCannyEdgeDetectionImageFilterTest.png) +itk_add_test( + NAME + itkBilateralImageFilterTest + COMMAND + ITKImageFeatureTestDriver + itkBilateralImageFilterTest) +itk_add_test( + NAME + itkBilateralImageFilterTest2 + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/BilateralImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/BilateralImageFilterTest2.png + itkBilateralImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} + ${ITK_TEST_OUTPUT_DIR}/BilateralImageFilterTest2.png) +itk_add_test( + NAME + itkBilateralImageFilterTest3 + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/BilateralImageFilterTest3.png} + ${ITK_TEST_OUTPUT_DIR}/BilateralImageFilterTest3.png + itkBilateralImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} + ${ITK_TEST_OUTPUT_DIR}/BilateralImageFilterTest3.png) +itk_add_test( + NAME + itkGradientVectorFlowImageFilterTest + COMMAND + ITKImageFeatureTestDriver + itkGradientVectorFlowImageFilterTest) +itk_add_test( + NAME + itkSimpleContourExtractorImageFilterTest + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/SimpleContourExtractorImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/SimpleContourExtractorImageFilterTest.png + itkSimpleContourExtractorImageFilterTest + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/BinaryThresholdImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/SimpleContourExtractorImageFilterTest.png) +itk_add_test( + NAME + itkZeroCrossingImageFilterTest + COMMAND + ITKImageFeatureTestDriver + itkZeroCrossingImageFilterTest) +itk_add_test( + NAME + itkCannyEdgeDetectionImageFilterTest2 + COMMAND + ITKImageFeatureTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/itkCannyEdgeDetectionImageFilterTest2_A.png + ${ITK_TEST_OUTPUT_DIR}/itkCannyEdgeDetectionImageFilterTest2_B.png + itkCannyEdgeDetectionImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkCannyEdgeDetectionImageFilterTest2_A.png + ${ITK_TEST_OUTPUT_DIR}/itkCannyEdgeDetectionImageFilterTest2_B.png) +itk_add_test( + NAME + itkDerivativeImageFilterTest1x + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkDerivativeImageFilterTest1x.png} + ${ITK_TEST_OUTPUT_DIR}/itkDerivativeImageFilterTest1x.png + itkDerivativeImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkDerivativeImageFilterTest1x.png + 1 + 0 + 1) +itk_add_test( + NAME + itkDerivativeImageFilterTest1y + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkDerivativeImageFilterTest1y.png} + ${ITK_TEST_OUTPUT_DIR}/itkDerivativeImageFilterTest1y.png + itkDerivativeImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkDerivativeImageFilterTest1y.png + 1 + 1 + 1) +itk_add_test( + NAME + itkDerivativeImageFilterTest2x + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkDerivativeImageFilterTest2x.png} + ${ITK_TEST_OUTPUT_DIR}/itkDerivativeImageFilterTest2x.png + itkDerivativeImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkDerivativeImageFilterTest2x.png + 2 + 0 + 1) +itk_add_test( + NAME + itkDerivativeImageFilterTest2y + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkDerivativeImageFilterTest2y.png} + ${ITK_TEST_OUTPUT_DIR}/itkDerivativeImageFilterTest2y.png + itkDerivativeImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkDerivativeImageFilterTest2y.png + 2 + 1 + 1) +itk_add_test( + NAME + itkLaplacianRecursiveGaussianImageFilterTest + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/LaplacianRecursiveGaussianImageFilterTest.png,:} + ${ITK_TEST_OUTPUT_DIR}/LaplacianRecursiveGaussianImageFilterTest.png + itkLaplacianRecursiveGaussianImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/LaplacianRecursiveGaussianImageFilterTest.png) +itk_add_test( + NAME + itkLaplacianSharpeningImageFilterTest + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{Baseline/itkLaplacianSharpeningImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkLaplacianSharpeningImageFilterTest.png + itkLaplacianSharpeningImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/sf4.png} + ${ITK_TEST_OUTPUT_DIR}/itkLaplacianSharpeningImageFilterTest.png + 1) +itk_add_test( + NAME + itkMaskFeaturePointSelectionFilterTest + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{Baseline/itkMaskFeaturePointSelectionFilterTest.mha} + ${ITK_TEST_OUTPUT_DIR}/itkMaskFeaturePointSelectionFilterTest.mha + itkMaskFeaturePointSelectionFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/itkMaskFeaturePointSelectionFilterTest.mha + 0 + 2 + 0 + 0.01) +itk_add_test( + NAME + itkMaskFeaturePointSelectionFilterTestTensors + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{Baseline/itkMaskFeaturePointSelectionFilterTestTensors.mha} + ${ITK_TEST_OUTPUT_DIR}/itkMaskFeaturePointSelectionFilterTestTensors.mha + itkMaskFeaturePointSelectionFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/itkMaskFeaturePointSelectionFilterTestTensors.mha + 0 + 2 + 1 + 0.01) +itk_add_test( + NAME + itkMaskFeaturePointSelectionFilterTestMask + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{Baseline/itkMaskFeaturePointSelectionFilterTestMask.mha} + ${ITK_TEST_OUTPUT_DIR}/itkMaskFeaturePointSelectionFilterTestMask.mha + itkMaskFeaturePointSelectionFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/itkMaskFeaturePointSelectionFilterTestMask.mha + 0 + 2 + 1 + 0.01 + DATA{Input/HeadMRVolumeMaskImage.mha}) +itk_add_test( + NAME + itkDiscreteGaussianDerivativeImageFilterScaleSpaceTest + COMMAND + ITKImageFeatureTestDriver + itkDiscreteGaussianDerivativeImageFilterScaleSpaceTest) +itk_add_test( + NAME + itkDiscreteGaussianDerivativeImageFilterTest01 + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest01.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest01.png + itkDiscreteGaussianDerivativeImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest01.png + 0 + 1 + 3.0) +itk_add_test( + NAME + itkDiscreteGaussianDerivativeImageFilterTest10 + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest10.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest10.png + itkDiscreteGaussianDerivativeImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest10.png + 1 + 0 + 3.0) +itk_add_test( + NAME + itkDiscreteGaussianDerivativeImageFilterTest11 + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest11.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest11.png + itkDiscreteGaussianDerivativeImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest11.png + 1 + 1 + 3.0) +itk_add_test( + NAME + itkDiscreteGaussianDerivativeImageFilterTest20 + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest20.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest20.png + itkDiscreteGaussianDerivativeImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest20.png + 2 + 0 + 3.0) +itk_add_test( + NAME + itkDiscreteGaussianDerivativeImageFilterTest02 + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest02.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest02.png + itkDiscreteGaussianDerivativeImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest02.png + 0 + 2 + 3.0) +itk_add_test( + NAME + itkDiscreteGaussianDerivativeImageFilterTest21 + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest21.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest21.png + itkDiscreteGaussianDerivativeImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest21.png + 2 + 1 + 3.0) +itk_add_test( + NAME + itkDiscreteGaussianDerivativeImageFilterTest12 + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest12.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest12.png + itkDiscreteGaussianDerivativeImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest12.png + 1 + 2 + 3.0) +itk_add_test( + NAME + itkDiscreteGaussianDerivativeImageFilterTest30 + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest30.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest30.png + itkDiscreteGaussianDerivativeImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest30.png + 3 + 0 + 3.0) +itk_add_test( + NAME + itkDiscreteGaussianDerivativeImageFilterTest03 + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFilterTest03.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest03.png + itkDiscreteGaussianDerivativeImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFilterTest03.png + 0 + 3 + 3.0) +itk_add_test( + NAME + itkMultiScaleHessianBasedMeasureImageFilterTest + COMMAND + ITKImageFeatureTestDriver + --compare + DATA{Baseline/itkMultiScaleHessianBasedMeasureImageFilterTestEnhancedOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/itkMultiScaleHessianBasedMeasureImageFilterTestEnhancedOutput.mha + itkMultiScaleHessianBasedMeasureImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/DSA.png} + ${ITK_TEST_OUTPUT_DIR}/itkMultiScaleHessianBasedMeasureImageFilterTestEnhancedOutput.mha + ${ITK_TEST_OUTPUT_DIR}/itkMultiScaleHessianBasedMeasureImageFilterTestScalesOutput.mha + 5 + 10 + 10 + 1 + 0 + ${ITK_TEST_OUTPUT_DIR}/itkMultiScaleHessianBasedMeasureImageFilterTestEnhancedOutput2.mha) diff --git a/Modules/Filtering/ImageFeature/wrapping/CMakeLists.txt b/Modules/Filtering/ImageFeature/wrapping/CMakeLists.txt index 00faeba47a7..bb35d7ccc7a 100644 --- a/Modules/Filtering/ImageFeature/wrapping/CMakeLists.txt +++ b/Modules/Filtering/ImageFeature/wrapping/CMakeLists.txt @@ -1,6 +1,4 @@ itk_wrap_module(ITKImageFeature) -set(WRAPPER_SUBMODULE_ORDER - itkHessianRecursiveGaussianImageFilter -) +set(WRAPPER_SUBMODULE_ORDER itkHessianRecursiveGaussianImageFilter) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkBilateralImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkBilateralImageFilter.wrap index e4310ade8ad..c22abcf10f9 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkBilateralImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkBilateralImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BilateralImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkCannyEdgeDetectionImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkCannyEdgeDetectionImageFilter.wrap index c20d3ae21d7..3a00c38d578 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkCannyEdgeDetectionImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkCannyEdgeDetectionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::CannyEdgeDetectionImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkDerivativeImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkDerivativeImageFilter.wrap index ea4e1e61db1..016a93aa8a2 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkDerivativeImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkDerivativeImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::DerivativeImageFilter" POINTER) - #itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +#itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkDiscreteGaussianDerivativeImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkDiscreteGaussianDerivativeImageFilter.wrap index d147f979b59..b79c39a13c0 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkDiscreteGaussianDerivativeImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkDiscreteGaussianDerivativeImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::DiscreteGaussianDerivativeImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkGradientVectorFlowImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkGradientVectorFlowImageFilter.wrap index 1c1680acd7d..79cecd1f17a 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkGradientVectorFlowImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkGradientVectorFlowImageFilter.wrap @@ -1,11 +1,15 @@ itk_wrap_class("itk::GradientVectorFlowImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions - foreach(t ${WRAP_ITK_VECTOR_REAL} ${WRAP_ITK_COV_VECTOR_REAL}) - string(REGEX REPLACE "(V|CV)" "" t2 "${t}") - itk_wrap_template( - "${ITKM_I${t}${vector_dim}${d}}${ITKM_I${t}${vector_dim}${d}}${ITKM_${t2}}" - "${ITKT_I${t}${vector_dim}${d}}, ${ITKT_I${t}${vector_dim}${d}}, ${ITKT_${t2}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions + foreach(t ${WRAP_ITK_VECTOR_REAL} ${WRAP_ITK_COV_VECTOR_REAL}) + string( + REGEX + REPLACE "(V|CV)" + "" + t2 + "${t}") + itk_wrap_template("${ITKM_I${t}${vector_dim}${d}}${ITKM_I${t}${vector_dim}${d}}${ITKM_${t2}}" + "${ITKT_I${t}${vector_dim}${d}}, ${ITKT_I${t}${vector_dim}${d}}, ${ITKT_${t2}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkHessian3DToVesselnessMeasureImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkHessian3DToVesselnessMeasureImageFilter.wrap index 5b890da7139..e8dd5e89dfb 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkHessian3DToVesselnessMeasureImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkHessian3DToVesselnessMeasureImageFilter.wrap @@ -2,8 +2,8 @@ itk_wrap_filter_dims(has_d_3 3) if(has_d_3) itk_wrap_class("itk::Hessian3DToVesselnessMeasureImageFilter" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") + endforeach() itk_end_wrap_class() endif() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkHessianRecursiveGaussianImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkHessianRecursiveGaussianImageFilter.wrap index b9e2f445790..860af9c83b3 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkHessianRecursiveGaussianImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkHessianRecursiveGaussianImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::HessianRecursiveGaussianImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkHessianToObjectnessMeasureImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkHessianToObjectnessMeasureImageFilter.wrap index 68dba918f6f..7f28050c22f 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkHessianToObjectnessMeasureImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkHessianToObjectnessMeasureImageFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::HessianToObjectnessMeasureImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_ISSRTD${d}${d}}${ITKM_I${t}${d}}" "${ITKT_ISSRTD${d}${d}}, ${ITKT_I${t}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_ISSRTD${d}${d}}${ITKM_I${t}${d}}" "${ITKT_ISSRTD${d}${d}}, ${ITKT_I${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkHoughTransform2DCirclesImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkHoughTransform2DCirclesImageFilter.wrap index 666f60fea68..d6be18e6fa1 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkHoughTransform2DCirclesImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkHoughTransform2DCirclesImageFilter.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::HoughTransform2DCirclesImageFilter" POINTER) - itk_wrap_filter_dims(d2 2) - if(d2) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_${t}}${ITKM_UL}${ITKM_F}" "${ITKT_${t}}, ${ITKT_UL}, ${ITKT_F}") - endforeach() - endif() +itk_wrap_filter_dims(d2 2) +if(d2) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_${t}}${ITKM_UL}${ITKM_F}" "${ITKT_${t}}, ${ITKT_UL}, ${ITKT_F}") + endforeach() +endif() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkHoughTransform2DLinesImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkHoughTransform2DLinesImageFilter.wrap index 60ee428c8dd..d4c48b94193 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkHoughTransform2DLinesImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkHoughTransform2DLinesImageFilter.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::HoughTransform2DLinesImageFilter" POINTER) - itk_wrap_filter_dims(d2 2) - if(d2) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_${t}}${ITKM_${t}}" "${ITKT_${t}}, ${ITKT_${t}}") - endforeach() - endif() +itk_wrap_filter_dims(d2 2) +if(d2) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_${t}}${ITKM_${t}}" "${ITKT_${t}}, ${ITKT_${t}}") + endforeach() +endif() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkLaplacianImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkLaplacianImageFilter.wrap index b9c549d2665..01733e49908 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkLaplacianImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkLaplacianImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::LaplacianImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkLaplacianRecursiveGaussianImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkLaplacianRecursiveGaussianImageFilter.wrap index d01d6deedb2..54b53cbee1c 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkLaplacianRecursiveGaussianImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkLaplacianRecursiveGaussianImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::LaplacianRecursiveGaussianImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkLaplacianSharpeningImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkLaplacianSharpeningImageFilter.wrap index 68f19ffff3f..40dabb47f58 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkLaplacianSharpeningImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkLaplacianSharpeningImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::LaplacianSharpeningImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkMaskFeaturePointSelectionFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkMaskFeaturePointSelectionFilter.wrap index 24c31b4e5eb..02d5983e843 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkMaskFeaturePointSelectionFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkMaskFeaturePointSelectionFilter.wrap @@ -2,6 +2,6 @@ itk_wrap_filter_dims(has_d_3 3) if(has_d_3) itk_wrap_class("itk::MaskFeaturePointSelectionFilter" POINTER_WITH_2_SUPERCLASSES) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 3) + itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 3) itk_end_wrap_class() endif() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkMultiScaleHessianBasedMeasureImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkMultiScaleHessianBasedMeasureImageFilter.wrap index 33a8363cbc7..94e7532f91a 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkMultiScaleHessianBasedMeasureImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkMultiScaleHessianBasedMeasureImageFilter.wrap @@ -2,10 +2,11 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkMultiScaleHessianBasedMeasureImageFilter.h") itk_wrap_simple_class("itk::MultiScaleHessianBasedMeasureImageFilterEnums") itk_wrap_class("itk::MultiScaleHessianBasedMeasureImageFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(d ${restricted_dims}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_ISSRTD${d}${d}}${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}, ${ITKT_ISSRTD${d}${d}}, ${ITKT_I${t}${d}}") - endforeach() +itk_wrap_filter_dims(restricted_dims 2+) +foreach(d ${restricted_dims}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_ISSRTD${d}${d}}${ITKM_I${t}${d}}" + "${ITKT_I${t}${d}}, ${ITKT_ISSRTD${d}${d}}, ${ITKT_I${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkSimpleContourExtractorImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkSimpleContourExtractorImageFilter.wrap index b851502675a..3b83ae31281 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkSimpleContourExtractorImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkSimpleContourExtractorImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::SimpleContourExtractorImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkSobelEdgeDetectionImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkSobelEdgeDetectionImageFilter.wrap index 7286ab7e716..aec00a6e965 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkSobelEdgeDetectionImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkSobelEdgeDetectionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::SobelEdgeDetectionImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkUnsharpMaskImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkUnsharpMaskImageFilter.wrap index c3a894f54bb..35eac71052a 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkUnsharpMaskImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkUnsharpMaskImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::UnsharpMaskImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkZeroCrossingBasedEdgeDetectionImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkZeroCrossingBasedEdgeDetectionImageFilter.wrap index 36abb4750cc..ce373189b62 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkZeroCrossingBasedEdgeDetectionImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkZeroCrossingBasedEdgeDetectionImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ZeroCrossingBasedEdgeDetectionImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/itkZeroCrossingImageFilter.wrap b/Modules/Filtering/ImageFeature/wrapping/itkZeroCrossingImageFilter.wrap index 2b68e217f02..f6bcff58f0a 100644 --- a/Modules/Filtering/ImageFeature/wrapping/itkZeroCrossingImageFilter.wrap +++ b/Modules/Filtering/ImageFeature/wrapping/itkZeroCrossingImageFilter.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::ZeroCrossingImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFeature/wrapping/test/CMakeLists.txt b/Modules/Filtering/ImageFeature/wrapping/test/CMakeLists.txt index 8e4905f8742..6602c096c81 100644 --- a/Modules/Filtering/ImageFeature/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/ImageFeature/wrapping/test/CMakeLists.txt @@ -2,39 +2,58 @@ if(ITK_WRAP_PYTHON) set(test_input_dir ${itk-module_SOURCE_DIR}/test/Input) set(test_baseline_dir ${itk-module_SOURCE_DIR}/test/Baseline) - itk_python_add_test(NAME itkGradientVectorFlowImageFilterPythonTest - TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/itkGradientVectorFlowImageFilterPythonTestX.png - DATA{${test_baseline_dir}/itkGradientVectorFlowImageFilterPythonTestX.png} - --compare ${ITK_TEST_OUTPUT_DIR}/itkGradientVectorFlowImageFilterPythonTestY.png - DATA{${test_baseline_dir}/itkGradientVectorFlowImageFilterPythonTestY.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkGradientVectorFlowImageFilterTest.py - DATA{${test_input_dir}/Contours.png} - ${ITK_TEST_OUTPUT_DIR}/itkGradientVectorFlowImageFilterPythonTestX.png - ${ITK_TEST_OUTPUT_DIR}/itkGradientVectorFlowImageFilterPythonTestY.png - 50 50000.0 0.001) + itk_python_add_test( + NAME + itkGradientVectorFlowImageFilterPythonTest + TEST_DRIVER_ARGS + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGradientVectorFlowImageFilterPythonTestX.png + DATA{${test_baseline_dir}/itkGradientVectorFlowImageFilterPythonTestX.png} + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGradientVectorFlowImageFilterPythonTestY.png + DATA{${test_baseline_dir}/itkGradientVectorFlowImageFilterPythonTestY.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkGradientVectorFlowImageFilterTest.py + DATA{${test_input_dir}/Contours.png} + ${ITK_TEST_OUTPUT_DIR}/itkGradientVectorFlowImageFilterPythonTestX.png + ${ITK_TEST_OUTPUT_DIR}/itkGradientVectorFlowImageFilterPythonTestY.png + 50 + 50000.0 + 0.001) - list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) + list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) if(ITK_WRAP_float AND wrap_2_index GREATER -1) - itk_python_add_test(NAME PythonLaplacianImageFilterTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/LaplacianImageFilterTest.py + itk_python_add_test( + NAME + PythonLaplacianImageFilterTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/LaplacianImageFilterTest.py DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/LaplacianImageFilterTest.png - ) - itk_python_add_test(NAME PythonCannyEdgeDetectionImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/LaplacianImageFilterTest.png) + itk_python_add_test( + NAME + PythonCannyEdgeDetectionImageFilterTest TEST_DRIVER_ARGS - --compareNumberOfPixelsTolerance 1 - --compare ${ITK_TEST_OUTPUT_DIR}/PythonCannyEdgeDetectionImageFilterTest.png - DATA{Baseline/PythonCannyEdgeDetectionImageFilterTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/CannyEdgeDetectionImageFilterTest.py - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/PythonCannyEdgeDetectionImageFilterTest.png - 9 - ) - itk_python_add_test(NAME PythonHoughTransform2DLinesImageFilterTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/HoughTransform2DLinesImageFilterTest.py - DATA{Baseline/itkHoughTransform2DLinesImageFilterTest.png} - ) + --compareNumberOfPixelsTolerance + 1 + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonCannyEdgeDetectionImageFilterTest.png + DATA{Baseline/PythonCannyEdgeDetectionImageFilterTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/CannyEdgeDetectionImageFilterTest.py + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/PythonCannyEdgeDetectionImageFilterTest.png + 9) + itk_python_add_test( + NAME + PythonHoughTransform2DLinesImageFilterTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/HoughTransform2DLinesImageFilterTest.py + DATA{Baseline/itkHoughTransform2DLinesImageFilterTest.png}) endif() endif() diff --git a/Modules/Filtering/ImageFilterBase/itk-module.cmake b/Modules/Filtering/ImageFilterBase/itk-module.cmake index 62c44ae0200..1d0bd1798e8 100644 --- a/Modules/Filtering/ImageFilterBase/itk-module.cmake +++ b/Modules/Filtering/ImageFilterBase/itk-module.cmake @@ -1,18 +1,19 @@ -set(DOCUMENTATION "This module contains the base classes that support image +set(DOCUMENTATION + "This module contains the base classes that support image filters. For the most part, these are classes that developers will use to create new image filters (and that are the base classes of existing image filters). You will find here: Unary, Binary and Ternary Functor filters, Noise sources, recursive separable filters and the base classes for neighborhood filters.") -itk_module(ITKImageFilterBase +itk_module( + ITKImageFilterBase COMPILE_DEPENDS - ITKCommon + ITKCommon TEST_DEPENDS - ITKTestKernel - ITKImageIntensity + ITKTestKernel + ITKImageIntensity DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") # Extra test dependency is introduced by itkMaskNeighborhoodOperatorImageFilterTest. diff --git a/Modules/Filtering/ImageFilterBase/test/CMakeLists.txt b/Modules/Filtering/ImageFilterBase/test/CMakeLists.txt index aa7e7729004..fbba6159ff3 100644 --- a/Modules/Filtering/ImageFilterBase/test/CMakeLists.txt +++ b/Modules/Filtering/ImageFilterBase/test/CMakeLists.txt @@ -1,42 +1,57 @@ itk_module_test() set(ITKImageFilterBaseTests -itkNeighborhoodOperatorImageFilterTest.cxx -itkImageToImageFilterTest.cxx -itkVectorNeighborhoodOperatorImageFilterTest.cxx -itkMaskNeighborhoodOperatorImageFilterTest.cxx -itkCastImageFilterTest.cxx -) + itkNeighborhoodOperatorImageFilterTest.cxx + itkImageToImageFilterTest.cxx + itkVectorNeighborhoodOperatorImageFilterTest.cxx + itkMaskNeighborhoodOperatorImageFilterTest.cxx + itkCastImageFilterTest.cxx) # Disable optimization on the tests below to avoid possible # optimization bugs in some compilers. This option will appear on the # command line after any other optimization flag (including those from # CMAKE_CXX_FLAGS) which means that on gcc, MSVC, and the Intel # compiler, it will override any other optimization flag. -if (DEFINED ITK_CXX_DISABLE_OPTIMIZATION_FLAG) - set_source_files_properties( - itkCastImageFilterTest.cxx - PROPERTIES COMPILE_FLAGS ${ITK_CXX_DISABLE_OPTIMIZATION_FLAG} - ) +if(DEFINED ITK_CXX_DISABLE_OPTIMIZATION_FLAG) + set_source_files_properties(itkCastImageFilterTest.cxx PROPERTIES COMPILE_FLAGS ${ITK_CXX_DISABLE_OPTIMIZATION_FLAG}) endif() +createtestdriver(ITKImageFilterBase "${ITKImageFilterBase-Test_LIBRARIES}" "${ITKImageFilterBaseTests}") -CreateTestDriver(ITKImageFilterBase "${ITKImageFilterBase-Test_LIBRARIES}" "${ITKImageFilterBaseTests}") +itk_add_test( + NAME + itkNeighborhoodOperatorImageFilterTest + COMMAND + ITKImageFilterBaseTestDriver + itkNeighborhoodOperatorImageFilterTest) +itk_add_test( + NAME + itkImageToImageFilterTest + COMMAND + ITKImageFilterBaseTestDriver + itkImageToImageFilterTest) +itk_add_test( + NAME + itkVectorNeighborhoodOperatorImageFilterTest + COMMAND + ITKImageFilterBaseTestDriver + itkVectorNeighborhoodOperatorImageFilterTest) +itk_add_test( + NAME + itkMaskNeighborhoodOperatorImageFilterTest + COMMAND + ITKImageFilterBaseTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/MaskNeighborhoodOperatorImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/MaskNeighborhoodOperatorImageFilterTest.png + itkMaskNeighborhoodOperatorImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/MaskNeighborhoodOperatorImageFilterTest.png) +itk_add_test( + NAME + itkCastImageFilterTest + COMMAND + ITKImageFilterBaseTestDriver + itkCastImageFilterTest) -itk_add_test(NAME itkNeighborhoodOperatorImageFilterTest - COMMAND ITKImageFilterBaseTestDriver itkNeighborhoodOperatorImageFilterTest) -itk_add_test(NAME itkImageToImageFilterTest - COMMAND ITKImageFilterBaseTestDriver itkImageToImageFilterTest) -itk_add_test(NAME itkVectorNeighborhoodOperatorImageFilterTest - COMMAND ITKImageFilterBaseTestDriver itkVectorNeighborhoodOperatorImageFilterTest) -itk_add_test(NAME itkMaskNeighborhoodOperatorImageFilterTest - COMMAND ITKImageFilterBaseTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/MaskNeighborhoodOperatorImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/MaskNeighborhoodOperatorImageFilterTest.png - itkMaskNeighborhoodOperatorImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/MaskNeighborhoodOperatorImageFilterTest.png) -itk_add_test(NAME itkCastImageFilterTest - COMMAND ITKImageFilterBaseTestDriver itkCastImageFilterTest) - -set(ITKImageFilterBaseGTests - itkGeneratorImageFilterGTest.cxx -) -CreateGoogleTestDriver(ITKImageFilterBase "${ITKImageFilterBase-Test_LIBRARIES}" "${ITKImageFilterBaseGTests}") +set(ITKImageFilterBaseGTests itkGeneratorImageFilterGTest.cxx) +creategoogletestdriver(ITKImageFilterBase "${ITKImageFilterBase-Test_LIBRARIES}" "${ITKImageFilterBaseGTests}") diff --git a/Modules/Filtering/ImageFilterBase/wrapping/itkBinaryGeneratorImageFilter.wrap b/Modules/Filtering/ImageFilterBase/wrapping/itkBinaryGeneratorImageFilter.wrap index e8f6a1f006a..eabaf86ef21 100644 --- a/Modules/Filtering/ImageFilterBase/wrapping/itkBinaryGeneratorImageFilter.wrap +++ b/Modules/Filtering/ImageFilterBase/wrapping/itkBinaryGeneratorImageFilter.wrap @@ -1,29 +1,35 @@ itk_wrap_class("itk::BinaryGeneratorImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_SCALAR}" "${WRAP_ITK_SCALAR}") - foreach(type ${WRAP_ITK_VECTOR} ${WRAP_ITK_RGB} ${WRAP_ITK_RGBA} ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_image_filter_combinations("${type}" "${WRAP_ITK_INT}" "${type}") - endforeach() - +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_SCALAR}" "${WRAP_ITK_SCALAR}") +foreach( + type + ${WRAP_ITK_VECTOR} + ${WRAP_ITK_RGB} + ${WRAP_ITK_RGBA} + ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_image_filter_combinations("${type}" "${WRAP_ITK_INT}" "${type}") +endforeach() - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - foreach(c ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_I${c}${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_I${c}${d}}") - itk_wrap_template("${ITKM_I${c}${d}}${ITKM_I${t}${d}}${ITKM_I${c}${d}}" "${ITKT_I${c}${d}},${ITKT_I${t}${d}},${ITKT_I${c}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + foreach(c ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_I${c}${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_I${c}${d}}") + itk_wrap_template("${ITKM_I${c}${d}}${ITKM_I${t}${d}}${ITKM_I${c}${d}}" + "${ITKT_I${c}${d}},${ITKT_I${t}${d}},${ITKT_I${c}${d}}") endforeach() endforeach() - itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 3) +endforeach() +itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 3) - UNIQUE(label_types "${WRAP_ITK_INT};UL") +unique(label_types "${WRAP_ITK_INT};UL") - if(ITK_WRAP_rgb_unsigned_short AND ITK_WRAP_unsigned_short) - itk_wrap_image_filter_combinations(US "${label_types}" RGBUS) - endif() +if(ITK_WRAP_rgb_unsigned_short AND ITK_WRAP_unsigned_short) + itk_wrap_image_filter_combinations(US "${label_types}" RGBUS) +endif() - if(ITK_WRAP_rgb_unsigned_char AND ITK_WRAP_unsigned_char) - itk_wrap_image_filter_combinations(UC "${label_types}" RGBUC) - endif() +if(ITK_WRAP_rgb_unsigned_char AND ITK_WRAP_unsigned_char) + itk_wrap_image_filter_combinations(UC "${label_types}" RGBUC) +endif() - itk_wrap_image_filter("${WRAP_ITK_COLOR}" 3) +itk_wrap_image_filter("${WRAP_ITK_COLOR}" 3) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFilterBase/wrapping/itkBoxImageFilter.wrap b/Modules/Filtering/ImageFilterBase/wrapping/itkBoxImageFilter.wrap index aa4b53ec82d..f95df9f3a1d 100644 --- a/Modules/Filtering/ImageFilterBase/wrapping/itkBoxImageFilter.wrap +++ b/Modules/Filtering/ImageFilterBase/wrapping/itkBoxImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BoxImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFilterBase/wrapping/itkCastImageFilter.wrap b/Modules/Filtering/ImageFilterBase/wrapping/itkCastImageFilter.wrap index fbfd3ac07f4..7275aab7180 100644 --- a/Modules/Filtering/ImageFilterBase/wrapping/itkCastImageFilter.wrap +++ b/Modules/Filtering/ImageFilterBase/wrapping/itkCastImageFilter.wrap @@ -1,94 +1,141 @@ itk_wrap_include("itkPhasedArray3DSpecialCoordinatesImage.h") itk_wrap_class("itk::CastImageFilter" POINTER_WITH_SUPERCLASS) - # Create cast filters between all scalar types. Also force that cast-to-uchar - # filters are created for all scalar types, and unsigned long for - # segmentation output casting. - UNIQUE(types "${WRAP_ITK_SCALAR};UC;UI;SI;UL") - itk_wrap_image_filter_combinations("${types}" "${types}") +# Create cast filters between all scalar types. Also force that cast-to-uchar +# filters are created for all scalar types, and unsigned long for +# segmentation output casting. +unique(types "${WRAP_ITK_SCALAR};UC;UI;SI;UL") +itk_wrap_image_filter_combinations("${types}" "${types}") - # vector <-> vector - itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_VECTOR}") +# vector <-> vector +itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_VECTOR}") - foreach(image_dim ${ITK_WRAP_IMAGE_DIMS}) - if(ITK_WRAP_vector_float AND ITK_WRAP_vector_double) - if(ITKM_VIF${image_dim} AND ITKM_VID${image_dim} AND ITKT_VIF${image_dim} AND ITKT_VID${image_dim}) - # VectorImage(double, float) <-> VectorImage(double, float) - itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_VID${image_dim}}" "${ITKT_VID${image_dim}},${ITKT_VID${image_dim}}") - itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_VID${image_dim}}" "${ITKT_VIF${image_dim}},${ITKT_VID${image_dim}}") - itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_VIF${image_dim}}" "${ITKT_VID${image_dim}},${ITKT_VIF${image_dim}}") - itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_VIF${image_dim}}" "${ITKT_VIF${image_dim}},${ITKT_VIF${image_dim}}") - endif() - foreach(pixel_type "${WRAP_ITK_RGB};${WRAP_ITK_RGBA}") - if(ITKM_VIF${image_dim} AND ITKM_I${ITKM_${pixel_type}}${image_dim} AND ITKT_VIF${image_dim} AND ITKT_I${ITKM_${pixel_type}}${image_dim}) - # VectorImage(float) <-> (RGBPixel, RGBAPixel) - itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_I${ITKM_${pixel_type}}${image_dim}}" "${ITKT_VIF${image_dim}},${ITKT_I${ITKM_${pixel_type}}${image_dim}}") - itk_wrap_template("${ITKM_I${ITKM_${pixel_type}}${image_dim}}${ITKM_VIF${image_dim}}" "${ITKT_I${ITKM_${pixel_type}}${image_dim}},${ITKT_VIF${image_dim}}") - # Vector(float, 3) <-> (RGBPixel, RGBAPixel) - itk_wrap_template("${ITKM_IVF3${image_dim}}${ITKM_I${ITKM_${pixel_type}}${image_dim}}" "${ITKT_IVF3${image_dim}},${ITKT_I${ITKM_${pixel_type}}${image_dim}}") - itk_wrap_template("${ITKM_I${ITKM_${pixel_type}}${image_dim}}${ITKM_IVF3${image_dim}}" "${ITKT_I${ITKM_${pixel_type}}${image_dim}},${ITKT_IVF3${image_dim}}") - endif() - if(ITKM_VID${image_dim} AND ITKM_I${ITKM_${pixel_type}}${image_dim} AND ITKT_VID${image_dim} AND ITKT_I${ITKM_${pixel_type}}${image_dim}) - # VectorImage(double) <-> (RGBPixel, RGBAPixel) - itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_I${ITKM_${pixel_type}}${image_dim}}" "${ITKT_VID${image_dim}},${ITKT_I${ITKM_${pixel_type}}${image_dim}}") - itk_wrap_template("${ITKM_I${ITKM_${pixel_type}}${image_dim}}${ITKM_VID${image_dim}}" "${ITKT_I${ITKM_${pixel_type}}${image_dim}},${ITKT_VID${image_dim}}") - # Vector(double, 3) <-> (RGBPixel, RGBAPixel) - itk_wrap_template("${ITKM_IVD3${image_dim}}${ITKM_I${ITKM_${pixel_type}}${image_dim}}" "${ITKT_IVD3${image_dim}},${ITKT_I${ITKM_${pixel_type}}${image_dim}}") - itk_wrap_template("${ITKM_I${ITKM_${pixel_type}}${image_dim}}${ITKM_IVD3${image_dim}}" "${ITKT_I${ITKM_${pixel_type}}${image_dim}},${ITKT_IVD3${image_dim}}") - endif() - endforeach() +foreach(image_dim ${ITK_WRAP_IMAGE_DIMS}) + if(ITK_WRAP_vector_float AND ITK_WRAP_vector_double) + if(ITKM_VIF${image_dim} + AND ITKM_VID${image_dim} + AND ITKT_VIF${image_dim} + AND ITKT_VID${image_dim}) + # VectorImage(double, float) <-> VectorImage(double, float) + itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_VID${image_dim}}" + "${ITKT_VID${image_dim}},${ITKT_VID${image_dim}}") + itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_VID${image_dim}}" + "${ITKT_VIF${image_dim}},${ITKT_VID${image_dim}}") + itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_VIF${image_dim}}" + "${ITKT_VID${image_dim}},${ITKT_VIF${image_dim}}") + itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_VIF${image_dim}}" + "${ITKT_VIF${image_dim}},${ITKT_VIF${image_dim}}") endif() - foreach(vector_components ${ITK_WRAP_VECTOR_COMPONENTS}) - if(ITK_WRAP_vector_float) - if(ITKM_IVF${vector_components}${image_dim} AND ITKM_VIF${image_dim} AND ITKT_IVF${vector_components}${image_dim} AND ITKT_VIF${image_dim}) - # VectorImage(float) <-> Vector(float) - itk_wrap_template("${ITKM_IVF${vector_components}${image_dim}}${ITKM_VIF${image_dim}}" "${ITKT_IVF${vector_components}${image_dim}},${ITKT_VIF${image_dim}}") - itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_IVF${vector_components}${image_dim}}" "${ITKT_VIF${image_dim}},${ITKT_IVF${vector_components}${image_dim}}") - endif() + foreach(pixel_type "${WRAP_ITK_RGB};${WRAP_ITK_RGBA}") + if(ITKM_VIF${image_dim} + AND ITKM_I${ITKM_${pixel_type}}${image_dim} + AND ITKT_VIF${image_dim} + AND ITKT_I${ITKM_${pixel_type}}${image_dim}) + # VectorImage(float) <-> (RGBPixel, RGBAPixel) + itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_I${ITKM_${pixel_type}}${image_dim}}" + "${ITKT_VIF${image_dim}},${ITKT_I${ITKM_${pixel_type}}${image_dim}}") + itk_wrap_template("${ITKM_I${ITKM_${pixel_type}}${image_dim}}${ITKM_VIF${image_dim}}" + "${ITKT_I${ITKM_${pixel_type}}${image_dim}},${ITKT_VIF${image_dim}}") + # Vector(float, 3) <-> (RGBPixel, RGBAPixel) + itk_wrap_template("${ITKM_IVF3${image_dim}}${ITKM_I${ITKM_${pixel_type}}${image_dim}}" + "${ITKT_IVF3${image_dim}},${ITKT_I${ITKM_${pixel_type}}${image_dim}}") + itk_wrap_template("${ITKM_I${ITKM_${pixel_type}}${image_dim}}${ITKM_IVF3${image_dim}}" + "${ITKT_I${ITKM_${pixel_type}}${image_dim}},${ITKT_IVF3${image_dim}}") endif() - if(ITK_WRAP_covariant_vector_float) - if(ITKM_ICVF${vector_components}${image_dim} AND ITKM_VIF${image_dim} AND ITKT_ICVF${vector_components}${image_dim} AND ITKT_VIF${image_dim}) - # VectorImage(float) <-> CovariantVector(float) - itk_wrap_template("${ITKM_ICVF${vector_components}${image_dim}}${ITKM_VIF${image_dim}}" "${ITKT_ICVF${vector_components}${image_dim}},${ITKT_VIF${image_dim}}") - itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_ICVF${vector_components}${image_dim}}" "${ITKT_VIF${image_dim}},${ITKT_ICVF${vector_components}${image_dim}}") - endif() + if(ITKM_VID${image_dim} + AND ITKM_I${ITKM_${pixel_type}}${image_dim} + AND ITKT_VID${image_dim} + AND ITKT_I${ITKM_${pixel_type}}${image_dim}) + # VectorImage(double) <-> (RGBPixel, RGBAPixel) + itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_I${ITKM_${pixel_type}}${image_dim}}" + "${ITKT_VID${image_dim}},${ITKT_I${ITKM_${pixel_type}}${image_dim}}") + itk_wrap_template("${ITKM_I${ITKM_${pixel_type}}${image_dim}}${ITKM_VID${image_dim}}" + "${ITKT_I${ITKM_${pixel_type}}${image_dim}},${ITKT_VID${image_dim}}") + # Vector(double, 3) <-> (RGBPixel, RGBAPixel) + itk_wrap_template("${ITKM_IVD3${image_dim}}${ITKM_I${ITKM_${pixel_type}}${image_dim}}" + "${ITKT_IVD3${image_dim}},${ITKT_I${ITKM_${pixel_type}}${image_dim}}") + itk_wrap_template("${ITKM_I${ITKM_${pixel_type}}${image_dim}}${ITKM_IVD3${image_dim}}" + "${ITKT_I${ITKM_${pixel_type}}${image_dim}},${ITKT_IVD3${image_dim}}") endif() - if(ITK_WRAP_vector_double) - if(ITKM_IVD${vector_components}${image_dim} AND ITKM_VID${image_dim} AND ITKT_IVD${vector_components}${image_dim} AND ITKT_VID${image_dim}) - # VectorImage(double) <-> Vector(double) - itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_IVD${vector_components}${image_dim}}" "${ITKT_VID${image_dim}},${ITKT_IVD${vector_components}${image_dim}}") - itk_wrap_template("${ITKM_IVD${vector_components}${image_dim}}${ITKM_VID${image_dim}}" "${ITKT_IVD${vector_components}${image_dim}},${ITKT_VID${image_dim}}") - endif() + endforeach() + endif() + foreach(vector_components ${ITK_WRAP_VECTOR_COMPONENTS}) + if(ITK_WRAP_vector_float) + if(ITKM_IVF${vector_components}${image_dim} + AND ITKM_VIF${image_dim} + AND ITKT_IVF${vector_components}${image_dim} + AND ITKT_VIF${image_dim}) + # VectorImage(float) <-> Vector(float) + itk_wrap_template("${ITKM_IVF${vector_components}${image_dim}}${ITKM_VIF${image_dim}}" + "${ITKT_IVF${vector_components}${image_dim}},${ITKT_VIF${image_dim}}") + itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_IVF${vector_components}${image_dim}}" + "${ITKT_VIF${image_dim}},${ITKT_IVF${vector_components}${image_dim}}") endif() - if(ITK_WRAP_covariant_vector_double) - if(ITKM_ICVD${vector_components}${image_dim} AND ITKM_VID${image_dim} AND ITKT_ICVD${vector_components}${image_dim} AND ITKT_VID${image_dim}) - # VectorImage(double) <-> CovariantVector(double) - itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_ICVD${vector_components}${image_dim}}" "${ITKT_VID${image_dim}},${ITKT_ICVD${vector_components}${image_dim}}") - itk_wrap_template("${ITKM_ICVD${vector_components}${image_dim}}${ITKM_VID${image_dim}}" "${ITKT_ICVD${vector_components}${image_dim}},${ITKT_VID${image_dim}}") - endif() + endif() + if(ITK_WRAP_covariant_vector_float) + if(ITKM_ICVF${vector_components}${image_dim} + AND ITKM_VIF${image_dim} + AND ITKT_ICVF${vector_components}${image_dim} + AND ITKT_VIF${image_dim}) + # VectorImage(float) <-> CovariantVector(float) + itk_wrap_template("${ITKM_ICVF${vector_components}${image_dim}}${ITKM_VIF${image_dim}}" + "${ITKT_ICVF${vector_components}${image_dim}},${ITKT_VIF${image_dim}}") + itk_wrap_template("${ITKM_VIF${image_dim}}${ITKM_ICVF${vector_components}${image_dim}}" + "${ITKT_VIF${image_dim}},${ITKT_ICVF${vector_components}${image_dim}}") endif() - endforeach() + endif() + if(ITK_WRAP_vector_double) + if(ITKM_IVD${vector_components}${image_dim} + AND ITKM_VID${image_dim} + AND ITKT_IVD${vector_components}${image_dim} + AND ITKT_VID${image_dim}) + # VectorImage(double) <-> Vector(double) + itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_IVD${vector_components}${image_dim}}" + "${ITKT_VID${image_dim}},${ITKT_IVD${vector_components}${image_dim}}") + itk_wrap_template("${ITKM_IVD${vector_components}${image_dim}}${ITKM_VID${image_dim}}" + "${ITKT_IVD${vector_components}${image_dim}},${ITKT_VID${image_dim}}") + endif() + endif() + if(ITK_WRAP_covariant_vector_double) + if(ITKM_ICVD${vector_components}${image_dim} + AND ITKM_VID${image_dim} + AND ITKT_ICVD${vector_components}${image_dim} + AND ITKT_VID${image_dim}) + # VectorImage(double) <-> CovariantVector(double) + itk_wrap_template("${ITKM_VID${image_dim}}${ITKM_ICVD${vector_components}${image_dim}}" + "${ITKT_VID${image_dim}},${ITKT_ICVD${vector_components}${image_dim}}") + itk_wrap_template("${ITKM_ICVD${vector_components}${image_dim}}${ITKM_VID${image_dim}}" + "${ITKT_ICVD${vector_components}${image_dim}},${ITKT_VID${image_dim}}") + endif() + endif() endforeach() +endforeach() - # RGB <-> RGB - UNIQUE(rgb "RGBUC;${WRAP_ITK_RGB}") - itk_wrap_image_filter_combinations("${rgb}" "${rgb}") +# RGB <-> RGB +unique(rgb "RGBUC;${WRAP_ITK_RGB}") +itk_wrap_image_filter_combinations("${rgb}" "${rgb}") - # vector <-> RGB - # itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_RGB}") - # itk_wrap_image_filter_combinations("${WRAP_ITK_RGB}" "${WRAP_ITK_VECTOR}") +# vector <-> RGB +# itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_RGB}") +# itk_wrap_image_filter_combinations("${WRAP_ITK_RGB}" "${WRAP_ITK_VECTOR}") - # Enable casting 64 bit unsigned int to smaller integer types if we haven't done so already - if(NOT ITK_WRAP_unsigned_long_long AND NOT ${ITKM_IT} STREQUAL "ULL") - itk_wrap_image_filter_combinations("ULL" "${WRAP_ITK_INT}") - endif() +# Enable casting 64 bit unsigned int to smaller integer types if we haven't done so already +if(NOT ITK_WRAP_unsigned_long_long + AND NOT + ${ITKM_IT} + STREQUAL + "ULL") + itk_wrap_image_filter_combinations("ULL" "${WRAP_ITK_INT}") +endif() - # PhasedArray3DSpecialCoordinatesImage - foreach(t1 ${WRAP_ITK_SCALAR}) - foreach(t2 ${WRAP_ITK_SCALAR}) - itk_wrap_template("PA3DSCI${ITKM_${t1}}PA3DSCI${ITKM_${t2}}" - "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t1}} >, itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t2}} >") - itk_wrap_template("PA3DSCI${ITKM_${t1}}I${ITKM_${t2}}3" - "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t1}} >, itk::Image< ${ITKT_${t2}}, 3 >") - endforeach() +# PhasedArray3DSpecialCoordinatesImage +foreach(t1 ${WRAP_ITK_SCALAR}) + foreach(t2 ${WRAP_ITK_SCALAR}) + itk_wrap_template( + "PA3DSCI${ITKM_${t1}}PA3DSCI${ITKM_${t2}}" + "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t1}} >, itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t2}} >" + ) + itk_wrap_template("PA3DSCI${ITKM_${t1}}I${ITKM_${t2}}3" + "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t1}} >, itk::Image< ${ITKT_${t2}}, 3 >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFilterBase/wrapping/itkNeighborhoodOperatorImageFilter.wrap b/Modules/Filtering/ImageFilterBase/wrapping/itkNeighborhoodOperatorImageFilter.wrap index 75806bfb063..25c76a33b21 100644 --- a/Modules/Filtering/ImageFilterBase/wrapping/itkNeighborhoodOperatorImageFilter.wrap +++ b/Modules/Filtering/ImageFilterBase/wrapping/itkNeighborhoodOperatorImageFilter.wrap @@ -2,17 +2,19 @@ set(types "${WRAP_ITK_SCALAR}") itk_wrap_include("itkImageBoundaryCondition.h") itk_wrap_class("itk::ImageBoundaryCondition") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}${ITKM_${t}}${d}" "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}${ITKM_${t}}${d}" + "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >") endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::NeighborhoodOperatorImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}${d}${ITKM_${t}}${d}${ITKM_${t}}" "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, ${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}${d}${ITKM_${t}}${d}${ITKM_${t}}" + "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, ${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFilterBase/wrapping/itkNoiseImageFilter.wrap b/Modules/Filtering/ImageFilterBase/wrapping/itkNoiseImageFilter.wrap index 8c45a79d658..3dee2c0dcb2 100644 --- a/Modules/Filtering/ImageFilterBase/wrapping/itkNoiseImageFilter.wrap +++ b/Modules/Filtering/ImageFilterBase/wrapping/itkNoiseImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::NoiseImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFilterBase/wrapping/itkRecursiveSeparableImageFilter.wrap b/Modules/Filtering/ImageFilterBase/wrapping/itkRecursiveSeparableImageFilter.wrap index 9e85fe99242..c00d78420f5 100644 --- a/Modules/Filtering/ImageFilterBase/wrapping/itkRecursiveSeparableImageFilter.wrap +++ b/Modules/Filtering/ImageFilterBase/wrapping/itkRecursiveSeparableImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::RecursiveSeparableImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFilterBase/wrapping/itkTernaryGeneratorImageFilter.wrap b/Modules/Filtering/ImageFilterBase/wrapping/itkTernaryGeneratorImageFilter.wrap index 73632255270..70586504913 100644 --- a/Modules/Filtering/ImageFilterBase/wrapping/itkTernaryGeneratorImageFilter.wrap +++ b/Modules/Filtering/ImageFilterBase/wrapping/itkTernaryGeneratorImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::TernaryGeneratorImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 4) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 4) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFilterBase/wrapping/itkUnaryGeneratorImageFilter.wrap b/Modules/Filtering/ImageFilterBase/wrapping/itkUnaryGeneratorImageFilter.wrap index 38948b9f6f4..dde6e4cbd81 100644 --- a/Modules/Filtering/ImageFilterBase/wrapping/itkUnaryGeneratorImageFilter.wrap +++ b/Modules/Filtering/ImageFilterBase/wrapping/itkUnaryGeneratorImageFilter.wrap @@ -1,19 +1,19 @@ itk_wrap_class("itk::UnaryGeneratorImageFilter" POINTER) - UNIQUE(types "${WRAP_ITK_SCALAR};${WRAP_ITK_COMPLEX_REAL}") - itk_wrap_image_filter_combinations("${types}" "${types}") - if(ITK_WRAP_rgb_unsigned_char AND ITK_WRAP_unsigned_char) - itk_wrap_image_filter_types(RGBUC UC) - endif() +unique(types "${WRAP_ITK_SCALAR};${WRAP_ITK_COMPLEX_REAL}") +itk_wrap_image_filter_combinations("${types}" "${types}") +if(ITK_WRAP_rgb_unsigned_char AND ITK_WRAP_unsigned_char) + itk_wrap_image_filter_types(RGBUC UC) +endif() - if(ITK_WRAP_rgb_unsigned_short AND ITK_WRAP_unsigned_short) - itk_wrap_image_filter_types(RGBUS US) - endif() +if(ITK_WRAP_rgb_unsigned_short AND ITK_WRAP_unsigned_short) + itk_wrap_image_filter_types(RGBUS US) +endif() - if(ITK_WRAP_rgba_unsigned_char AND ITK_WRAP_unsigned_char) - itk_wrap_image_filter_types(RGBAUC UC) - endif() +if(ITK_WRAP_rgba_unsigned_char AND ITK_WRAP_unsigned_char) + itk_wrap_image_filter_types(RGBAUC UC) +endif() - if(ITK_WRAP_rgba_unsigned_short AND ITK_WRAP_unsigned_short) - itk_wrap_image_filter_types(RGBAUS US) - endif() +if(ITK_WRAP_rgba_unsigned_short AND ITK_WRAP_unsigned_short) + itk_wrap_image_filter_types(RGBAUS US) +endif() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFilterBase/wrapping/test/CMakeLists.txt b/Modules/Filtering/ImageFilterBase/wrapping/test/CMakeLists.txt index 015295c9e7f..3df89eef216 100644 --- a/Modules/Filtering/ImageFilterBase/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/ImageFilterBase/wrapping/test/CMakeLists.txt @@ -1,11 +1,21 @@ # some tests will fail if dim=2 and unsigned short are not wrapped -list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) -if(ITK_WRAP_PYTHON AND ITK_WRAP_unsigned_char AND wrap_2_index GREATER -1) - itk_python_add_test(NAME PythonCastImageFilterTest +list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) +if(ITK_WRAP_PYTHON + AND ITK_WRAP_unsigned_char + AND wrap_2_index GREATER -1) + itk_python_add_test( + NAME + PythonCastImageFilterTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonCastImageFilterTest.png DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/CastImageFilterTest.py - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/PythonCastImageFilterTest.png - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonCastImageFilterTest.png + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/CastImageFilterTest.py + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/PythonCastImageFilterTest.png) endif() diff --git a/Modules/Filtering/ImageFrequency/itk-module.cmake b/Modules/Filtering/ImageFrequency/itk-module.cmake index 4cac1c8d39e..2d1b66dce34 100644 --- a/Modules/Filtering/ImageFrequency/itk-module.cmake +++ b/Modules/Filtering/ImageFrequency/itk-module.cmake @@ -1,4 +1,5 @@ -set(DOCUMENTATION "This module contains classes to iterate over images in the frequency domain, +set(DOCUMENTATION + "This module contains classes to iterate over images in the frequency domain, and filters to apply band pass filters based on frequency. A more detailed description can be found in the Insight Journal article:: @@ -8,13 +9,13 @@ Cerdan, P.H. \"ITK Wavelet Module\". September, 2016. ") -itk_module(ITKImageFrequency +itk_module( + ITKImageFrequency DEPENDS - ITKCommon + ITKCommon TEST_DEPENDS - ITKTestKernel - ITKImageIntensity - ITKFFT + ITKTestKernel + ITKImageIntensity + ITKFFT DESCRIPTION - "${DOCUMENTATION}" - ) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/ImageFrequency/test/CMakeLists.txt b/Modules/Filtering/ImageFrequency/test/CMakeLists.txt index 64991de3783..a608a7feb75 100644 --- a/Modules/Filtering/ImageFrequency/test/CMakeLists.txt +++ b/Modules/Filtering/ImageFrequency/test/CMakeLists.txt @@ -4,22 +4,33 @@ set(ITKImageFrequencyTests # Iterator with Index. itkFrequencyFFTLayoutImageRegionIteratorWithIndexTest.cxx # BandPass Filter - itkFrequencyBandImageFilterTest.cxx - ) + itkFrequencyBandImageFilterTest.cxx) -CreateTestDriver(ITKImageFrequency "${ITKImageFrequency-Test_LIBRARIES}" "${ITKImageFrequencyTests}") +createtestdriver(ITKImageFrequency "${ITKImageFrequency-Test_LIBRARIES}" "${ITKImageFrequencyTests}") # FrequencyIterator -itk_add_test(NAME itkFrequencyFFTLayoutImageRegionIteratorWithIndexTest - COMMAND ITKImageFrequencyTestDriver itkFrequencyFFTLayoutImageRegionIteratorWithIndexTest) +itk_add_test( + NAME + itkFrequencyFFTLayoutImageRegionIteratorWithIndexTest + COMMAND + ITKImageFrequencyTestDriver + itkFrequencyFFTLayoutImageRegionIteratorWithIndexTest) ## BandPass -itk_add_test(NAME itkFrequencyBandImageFilterEvenTest - COMMAND ITKImageFrequencyTestDriver itkFrequencyBandImageFilterTest "Even") -itk_add_test(NAME itkFrequencyBandImageFilterOddTest - COMMAND ITKImageFrequencyTestDriver itkFrequencyBandImageFilterTest "Odd") +itk_add_test( + NAME + itkFrequencyBandImageFilterEvenTest + COMMAND + ITKImageFrequencyTestDriver + itkFrequencyBandImageFilterTest + "Even") +itk_add_test( + NAME + itkFrequencyBandImageFilterOddTest + COMMAND + ITKImageFrequencyTestDriver + itkFrequencyBandImageFilterTest + "Odd") -set(${itk-module}GTests - itkFrequencyIteratorsGTest.cxx - ) +set(${itk-module}GTests itkFrequencyIteratorsGTest.cxx) -CreateGoogleTestDriver(${itk-module} "${${itk-module}-Test_LIBRARIES}" "${${itk-module}GTests}") +creategoogletestdriver(${itk-module} "${${itk-module}-Test_LIBRARIES}" "${${itk-module}GTests}") diff --git a/Modules/Filtering/ImageFrequency/wrapping/itkFrequencyBandImageFilter.wrap b/Modules/Filtering/ImageFrequency/wrapping/itkFrequencyBandImageFilter.wrap index 235ef06a0b6..f11d5efe7e9 100644 --- a/Modules/Filtering/ImageFrequency/wrapping/itkFrequencyBandImageFilter.wrap +++ b/Modules/Filtering/ImageFrequency/wrapping/itkFrequencyBandImageFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::FrequencyBandImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFrequency/wrapping/itkUnaryFrequencyDomainFilter.wrap b/Modules/Filtering/ImageFrequency/wrapping/itkUnaryFrequencyDomainFilter.wrap index c0f54449602..da5ea2b9d17 100644 --- a/Modules/Filtering/ImageFrequency/wrapping/itkUnaryFrequencyDomainFilter.wrap +++ b/Modules/Filtering/ImageFrequency/wrapping/itkUnaryFrequencyDomainFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::UnaryFrequencyDomainFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFrequency/wrapping/test/CMakeLists.txt b/Modules/Filtering/ImageFrequency/wrapping/test/CMakeLists.txt index 20900515ceb..87912d094ce 100644 --- a/Modules/Filtering/ImageFrequency/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/ImageFrequency/wrapping/test/CMakeLists.txt @@ -1,7 +1,13 @@ if(ITK_WRAP_PYTHON) - itk_python_expression_add_test(NAME itkUnaryFrequencyDomainFilterPythonTest - EXPRESSION "instance = itk.UnaryFrequencyDomainFilter.New()") + itk_python_expression_add_test( + NAME + itkUnaryFrequencyDomainFilterPythonTest + EXPRESSION + "instance = itk.UnaryFrequencyDomainFilter.New()") - itk_python_expression_add_test(NAME itkFrequencyBandImageFilterPythonTest - EXPRESSION "instance = itk.FrequencyBandImageFilter.New()") + itk_python_expression_add_test( + NAME + itkFrequencyBandImageFilterPythonTest + EXPRESSION + "instance = itk.FrequencyBandImageFilter.New()") endif() diff --git a/Modules/Filtering/ImageFusion/itk-module.cmake b/Modules/Filtering/ImageFusion/itk-module.cmake index d84f76309f3..31b32358db7 100644 --- a/Modules/Filtering/ImageFusion/itk-module.cmake +++ b/Modules/Filtering/ImageFusion/itk-module.cmake @@ -1,12 +1,12 @@ set(DOCUMENTATION "This module contains classes made to visually enhance the images, mostly by adding them artificial colors") -itk_module(ITKImageFusion +itk_module( + ITKImageFusion COMPILE_DEPENDS - ITKBinaryMathematicalMorphology - ITKImageLabel + ITKBinaryMathematicalMorphology + ITKImageLabel TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/ImageFusion/test/CMakeLists.txt b/Modules/Filtering/ImageFusion/test/CMakeLists.txt index b73cafa5c14..50165e1bb6a 100644 --- a/Modules/Filtering/ImageFusion/test/CMakeLists.txt +++ b/Modules/Filtering/ImageFusion/test/CMakeLists.txt @@ -1,137 +1,326 @@ itk_module_test() set(ITKImageFusionTests -itkScalarToRGBPixelFunctorTest.cxx -itkLabelOverlayImageFilterTest.cxx -itkLabelToRGBImageFilterTest.cxx -itkLabelMapToRGBImageFilterTest1.cxx -itkLabelMapToRGBImageFilterTest2.cxx -itkLabelMapContourOverlayImageFilterTest1.cxx -itkLabelMapContourOverlayImageFilterTest2.cxx -itkLabelMapContourOverlayImageFilterTest3.cxx -itkLabelMapOverlayImageFilterTest1.cxx -itkLabelMapOverlayImageFilterTest2.cxx -itkLabelMapOverlayImageFilterTest3.cxx -) + itkScalarToRGBPixelFunctorTest.cxx + itkLabelOverlayImageFilterTest.cxx + itkLabelToRGBImageFilterTest.cxx + itkLabelMapToRGBImageFilterTest1.cxx + itkLabelMapToRGBImageFilterTest2.cxx + itkLabelMapContourOverlayImageFilterTest1.cxx + itkLabelMapContourOverlayImageFilterTest2.cxx + itkLabelMapContourOverlayImageFilterTest3.cxx + itkLabelMapOverlayImageFilterTest1.cxx + itkLabelMapOverlayImageFilterTest2.cxx + itkLabelMapOverlayImageFilterTest3.cxx) -CreateTestDriver(ITKImageFusion "${ITKImageFusion-Test_LIBRARIES}" "${ITKImageFusionTests}") +createtestdriver(ITKImageFusion "${ITKImageFusion-Test_LIBRARIES}" "${ITKImageFusionTests}") -itk_add_test(NAME itkScalarToRGBPixelFunctorTest - COMMAND ITKImageFusionTestDriver itkScalarToRGBPixelFunctorTest) -itk_add_test(NAME itkLabelOverlayImageFilterTest-Opacity-0_0 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/cthead1-0_0Overlay.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1-0_0Overlay.png - itkLabelOverlayImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} 0.0 ${ITK_TEST_OUTPUT_DIR}/cthead1-0_0Overlay.png) -itk_add_test(NAME itkLabelOverlayImageFilterTest-Opacity-0_1 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/cthead1-0_1Overlay.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1-0_1Overlay.png - itkLabelOverlayImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} 0.1 ${ITK_TEST_OUTPUT_DIR}/cthead1-0_1Overlay.png) -itk_add_test(NAME itkLabelOverlayImageFilterTest-Opacity-0_2 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/cthead1-0_2Overlay.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1-0_2Overlay.png - itkLabelOverlayImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} 0.2 ${ITK_TEST_OUTPUT_DIR}/cthead1-0_2Overlay.png) -itk_add_test(NAME itkLabelOverlayImageFilterTest-Opacity-0_3 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/cthead1-0_3Overlay.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1-0_3Overlay.png - itkLabelOverlayImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} 0.3 ${ITK_TEST_OUTPUT_DIR}/cthead1-0_3Overlay.png) -itk_add_test(NAME itkLabelOverlayImageFilterTest-Opacity-0_4 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/cthead1-0_4Overlay.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1-0_4Overlay.png - itkLabelOverlayImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} 0.4 ${ITK_TEST_OUTPUT_DIR}/cthead1-0_4Overlay.png) -itk_add_test(NAME itkLabelOverlayImageFilterTest-Opacity-0_5 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/cthead1-0_5Overlay.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1-0_5Overlay.png - itkLabelOverlayImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} 0.5 ${ITK_TEST_OUTPUT_DIR}/cthead1-0_5Overlay.png) -itk_add_test(NAME itkLabelOverlayImageFilterTest-Opacity-0_6 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/cthead1-0_6Overlay.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1-0_6Overlay.png - itkLabelOverlayImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} 0.6 ${ITK_TEST_OUTPUT_DIR}/cthead1-0_6Overlay.png) -itk_add_test(NAME itkLabelOverlayImageFilterTest-Opacity-0_7 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/cthead1-0_7Overlay.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1-0_7Overlay.png - itkLabelOverlayImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} 0.7 ${ITK_TEST_OUTPUT_DIR}/cthead1-0_7Overlay.png) -itk_add_test(NAME itkLabelOverlayImageFilterTest-Opacity-0_8 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/cthead1-0_8Overlay.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1-0_8Overlay.png - itkLabelOverlayImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} 0.8 ${ITK_TEST_OUTPUT_DIR}/cthead1-0_8Overlay.png) -itk_add_test(NAME itkLabelOverlayImageFilterTest-Opacity-0_9 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/cthead1-0_9Overlay.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1-0_9Overlay.png - itkLabelOverlayImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} 0.9 ${ITK_TEST_OUTPUT_DIR}/cthead1-0_9Overlay.png) -itk_add_test(NAME itkLabelOverlayImageFilterTest-Opacity-1_0 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/cthead1-1_0Overlay.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1-1_0Overlay.png - itkLabelOverlayImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} 1.0 ${ITK_TEST_OUTPUT_DIR}/cthead1-1_0Overlay.png) -itk_add_test(NAME itkLabelToRGBImageFilterTest - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/cthead1Label-color.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1Label-color.png - itkLabelToRGBImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1Label-color.png) -itk_add_test(NAME itkLabelMapToRGBImageFilterTest1 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/itkLabelMapToRGBImageFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapToRGBImageFilterTest1.png - itkLabelMapToRGBImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapToRGBImageFilterTest1.png) -itk_add_test(NAME itkLabelMapToRGBImageFilterTest2 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/itkLabelMapToRGBImageFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapToRGBImageFilterTest2.png - itkLabelMapToRGBImageFilterTest2 DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} +itk_add_test( + NAME + itkScalarToRGBPixelFunctorTest + COMMAND + ITKImageFusionTestDriver + itkScalarToRGBPixelFunctorTest) +itk_add_test( + NAME + itkLabelOverlayImageFilterTest-Opacity-0_0 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/cthead1-0_0Overlay.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_0Overlay.png + itkLabelOverlayImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + 0.0 + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_0Overlay.png) +itk_add_test( + NAME + itkLabelOverlayImageFilterTest-Opacity-0_1 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/cthead1-0_1Overlay.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_1Overlay.png + itkLabelOverlayImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + 0.1 + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_1Overlay.png) +itk_add_test( + NAME + itkLabelOverlayImageFilterTest-Opacity-0_2 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/cthead1-0_2Overlay.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_2Overlay.png + itkLabelOverlayImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + 0.2 + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_2Overlay.png) +itk_add_test( + NAME + itkLabelOverlayImageFilterTest-Opacity-0_3 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/cthead1-0_3Overlay.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_3Overlay.png + itkLabelOverlayImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + 0.3 + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_3Overlay.png) +itk_add_test( + NAME + itkLabelOverlayImageFilterTest-Opacity-0_4 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/cthead1-0_4Overlay.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_4Overlay.png + itkLabelOverlayImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + 0.4 + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_4Overlay.png) +itk_add_test( + NAME + itkLabelOverlayImageFilterTest-Opacity-0_5 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/cthead1-0_5Overlay.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_5Overlay.png + itkLabelOverlayImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + 0.5 + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_5Overlay.png) +itk_add_test( + NAME + itkLabelOverlayImageFilterTest-Opacity-0_6 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/cthead1-0_6Overlay.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_6Overlay.png + itkLabelOverlayImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + 0.6 + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_6Overlay.png) +itk_add_test( + NAME + itkLabelOverlayImageFilterTest-Opacity-0_7 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/cthead1-0_7Overlay.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_7Overlay.png + itkLabelOverlayImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + 0.7 + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_7Overlay.png) +itk_add_test( + NAME + itkLabelOverlayImageFilterTest-Opacity-0_8 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/cthead1-0_8Overlay.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_8Overlay.png + itkLabelOverlayImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + 0.8 + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_8Overlay.png) +itk_add_test( + NAME + itkLabelOverlayImageFilterTest-Opacity-0_9 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/cthead1-0_9Overlay.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_9Overlay.png + itkLabelOverlayImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + 0.9 + ${ITK_TEST_OUTPUT_DIR}/cthead1-0_9Overlay.png) +itk_add_test( + NAME + itkLabelOverlayImageFilterTest-Opacity-1_0 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/cthead1-1_0Overlay.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-1_0Overlay.png + itkLabelOverlayImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + 1.0 + ${ITK_TEST_OUTPUT_DIR}/cthead1-1_0Overlay.png) +itk_add_test( + NAME + itkLabelToRGBImageFilterTest + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/cthead1Label-color.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1Label-color.png + itkLabelToRGBImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1Label-color.png) +itk_add_test( + NAME + itkLabelMapToRGBImageFilterTest1 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/itkLabelMapToRGBImageFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapToRGBImageFilterTest1.png + itkLabelMapToRGBImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapToRGBImageFilterTest1.png) +itk_add_test( + NAME + itkLabelMapToRGBImageFilterTest2 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/itkLabelMapToRGBImageFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapToRGBImageFilterTest2.png + itkLabelMapToRGBImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapToRGBImageFilterTest2.png) -itk_add_test(NAME itkLabelMapContourOverlayImageFilterTest0 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/itkLabelMapContourOverlayImageFilterTest0.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest0.png - itkLabelMapContourOverlayImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest0.png 0.6 0 0 10 1 1) -itk_add_test(NAME itkLabelMapContourOverlayImageFilterTest1 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/itkLabelMapContourOverlayImageFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest1.png - itkLabelMapContourOverlayImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest1.png 0.7 1 2 15 0 1) -itk_add_test(NAME itkLabelMapContourOverlayImageFilterTest2 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/itkLabelMapContourOverlayImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest2.png - itkLabelMapContourOverlayImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest2.png 0.8 2 3 12 1 1) -itk_add_test(NAME itkLabelMapContourOverlayImageFilterTest3 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/itkLabelMapContourOverlayImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest3.png - itkLabelMapContourOverlayImageFilterTest2 DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest3.png 0.8 2 3 12 1) -itk_add_test(NAME itkLabelMapContourOverlayImageFilterTest4 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/itkLabelMapContourOverlayImageFilterTest4.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest4.png - itkLabelMapContourOverlayImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest4.png 0.7 1 2 15 0) +itk_add_test( + NAME + itkLabelMapContourOverlayImageFilterTest0 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/itkLabelMapContourOverlayImageFilterTest0.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest0.png + itkLabelMapContourOverlayImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest0.png + 0.6 + 0 + 0 + 10 + 1 + 1) +itk_add_test( + NAME + itkLabelMapContourOverlayImageFilterTest1 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/itkLabelMapContourOverlayImageFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest1.png + itkLabelMapContourOverlayImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest1.png + 0.7 + 1 + 2 + 15 + 0 + 1) +itk_add_test( + NAME + itkLabelMapContourOverlayImageFilterTest2 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/itkLabelMapContourOverlayImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest2.png + itkLabelMapContourOverlayImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest2.png + 0.8 + 2 + 3 + 12 + 1 + 1) +itk_add_test( + NAME + itkLabelMapContourOverlayImageFilterTest3 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/itkLabelMapContourOverlayImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest3.png + itkLabelMapContourOverlayImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest3.png + 0.8 + 2 + 3 + 12 + 1) +itk_add_test( + NAME + itkLabelMapContourOverlayImageFilterTest4 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/itkLabelMapContourOverlayImageFilterTest4.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest4.png + itkLabelMapContourOverlayImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapContourOverlayImageFilterTest4.png + 0.7 + 1 + 2 + 15 + 0) -itk_add_test(NAME itkLabelMapOverlayImageFilterTest1 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/itkLabelMapOverlayImageFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapOverlayImageFilterTest1.png - itkLabelMapOverlayImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapOverlayImageFilterTest1.png 0.3) -itk_add_test(NAME itkLabelMapOverlayImageFilterTest2 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/itkLabelMapOverlayImageFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapOverlayImageFilterTest2.png +itk_add_test( + NAME + itkLabelMapOverlayImageFilterTest1 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/itkLabelMapOverlayImageFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapOverlayImageFilterTest1.png + itkLabelMapOverlayImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapOverlayImageFilterTest1.png + 0.3) +itk_add_test( + NAME + itkLabelMapOverlayImageFilterTest2 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/itkLabelMapOverlayImageFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapOverlayImageFilterTest2.png itkLabelMapOverlayImageFilterTest2 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapOverlayImageFilterTest2.png 0.3) -itk_add_test(NAME itkLabelMapOverlayImageFilterTest3 - COMMAND ITKImageFusionTestDriver - --compare DATA{Baseline/itkLabelMapOverlayImageFilterTest3.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapOverlayImageFilterTest3.png + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapOverlayImageFilterTest2.png + 0.3) +itk_add_test( + NAME + itkLabelMapOverlayImageFilterTest3 + COMMAND + ITKImageFusionTestDriver + --compare + DATA{Baseline/itkLabelMapOverlayImageFilterTest3.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapOverlayImageFilterTest3.png itkLabelMapOverlayImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapOverlayImageFilterTest3.png 0.3) + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapOverlayImageFilterTest3.png + 0.3) diff --git a/Modules/Filtering/ImageFusion/wrapping/itkLabelMapContourOverlayImageFilter.wrap b/Modules/Filtering/ImageFusion/wrapping/itkLabelMapContourOverlayImageFilter.wrap index 2a66ca6fbc4..646c9022536 100644 --- a/Modules/Filtering/ImageFusion/wrapping/itkLabelMapContourOverlayImageFilter.wrap +++ b/Modules/Filtering/ImageFusion/wrapping/itkLabelMapContourOverlayImageFilter.wrap @@ -1,16 +1,18 @@ itk_wrap_class("itk::LabelMapContourOverlayImageFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(d ${restricted_dims}) +itk_wrap_filter_dims(restricted_dims 2+) +foreach(d ${restricted_dims}) - if(ITK_WRAP_rgb_unsigned_char AND ITK_WRAP_unsigned_char) - itk_wrap_template("${ITKM_LM${d}}${ITKM_IUC${d}}${ITKM_IRGBUC${d}}" "${ITKT_LM${d}}, ${ITKT_IUC${d}}, ${ITKT_IRGBUC${d}}") - endif() + if(ITK_WRAP_rgb_unsigned_char AND ITK_WRAP_unsigned_char) + itk_wrap_template("${ITKM_LM${d}}${ITKM_IUC${d}}${ITKM_IRGBUC${d}}" + "${ITKT_LM${d}}, ${ITKT_IUC${d}}, ${ITKT_IRGBUC${d}}") + endif() - if(ITK_WRAP_rgb_unsigned_short AND ITK_WRAP_unsigned_short) - itk_wrap_template("${ITKM_LM${d}}${ITKM_IUS${d}}${ITKM_IRGBUS${d}}" "${ITKT_LM${d}}, ${ITKT_IUS${d}}, ${ITKT_IRGBUS${d}}") - endif() + if(ITK_WRAP_rgb_unsigned_short AND ITK_WRAP_unsigned_short) + itk_wrap_template("${ITKM_LM${d}}${ITKM_IUS${d}}${ITKM_IRGBUS${d}}" + "${ITKT_LM${d}}, ${ITKT_IUS${d}}, ${ITKT_IRGBUS${d}}") + endif() - endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFusion/wrapping/itkLabelMapOverlayImageFilter.wrap b/Modules/Filtering/ImageFusion/wrapping/itkLabelMapOverlayImageFilter.wrap index be41095494a..692100a8d49 100644 --- a/Modules/Filtering/ImageFusion/wrapping/itkLabelMapOverlayImageFilter.wrap +++ b/Modules/Filtering/ImageFusion/wrapping/itkLabelMapOverlayImageFilter.wrap @@ -1,15 +1,17 @@ itk_wrap_class("itk::LabelMapOverlayImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) +foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(ITK_WRAP_rgb_unsigned_char AND ITK_WRAP_unsigned_char) - itk_wrap_template("${ITKM_LM${d}}${ITKM_IUC${d}}${ITKM_IRGBUC${d}}" "${ITKT_LM${d}}, ${ITKT_IUC${d}}, ${ITKT_IRGBUC${d}}") - endif() + if(ITK_WRAP_rgb_unsigned_char AND ITK_WRAP_unsigned_char) + itk_wrap_template("${ITKM_LM${d}}${ITKM_IUC${d}}${ITKM_IRGBUC${d}}" + "${ITKT_LM${d}}, ${ITKT_IUC${d}}, ${ITKT_IRGBUC${d}}") + endif() - if(ITK_WRAP_rgb_unsigned_short AND ITK_WRAP_unsigned_short) - itk_wrap_template("${ITKM_LM${d}}${ITKM_IUS${d}}${ITKM_IRGBUS${d}}" "${ITKT_LM${d}}, ${ITKT_IUS${d}}, ${ITKT_IRGBUS${d}}") - endif() + if(ITK_WRAP_rgb_unsigned_short AND ITK_WRAP_unsigned_short) + itk_wrap_template("${ITKM_LM${d}}${ITKM_IUS${d}}${ITKM_IRGBUS${d}}" + "${ITKT_LM${d}}, ${ITKT_IUS${d}}, ${ITKT_IRGBUS${d}}") + endif() - endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFusion/wrapping/itkLabelMapToRGBImageFilter.wrap b/Modules/Filtering/ImageFusion/wrapping/itkLabelMapToRGBImageFilter.wrap index 4083aefc6dd..02d412df336 100644 --- a/Modules/Filtering/ImageFusion/wrapping/itkLabelMapToRGBImageFilter.wrap +++ b/Modules/Filtering/ImageFusion/wrapping/itkLabelMapToRGBImageFilter.wrap @@ -1,15 +1,15 @@ itk_wrap_class("itk::LabelMapToRGBImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) +foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(ITK_WRAP_rgb_unsigned_char) - itk_wrap_template("${ITKM_LM${d}}${ITKM_IRGBUC${d}}" "${ITKT_LM${d}}, ${ITKT_IRGBUC${d}}") - endif() + if(ITK_WRAP_rgb_unsigned_char) + itk_wrap_template("${ITKM_LM${d}}${ITKM_IRGBUC${d}}" "${ITKT_LM${d}}, ${ITKT_IRGBUC${d}}") + endif() - if(ITK_WRAP_rgb_unsigned_short) - itk_wrap_template("${ITKM_LM${d}}${ITKM_IRGBUS${d}}" "${ITKT_LM${d}}, ${ITKT_IRGBUS${d}}") - endif() + if(ITK_WRAP_rgb_unsigned_short) + itk_wrap_template("${ITKM_LM${d}}${ITKM_IRGBUS${d}}" "${ITKT_LM${d}}, ${ITKT_IRGBUS${d}}") + endif() - endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFusion/wrapping/itkLabelOverlayImageFilter.wrap b/Modules/Filtering/ImageFusion/wrapping/itkLabelOverlayImageFilter.wrap index da26c2702eb..b645a16f502 100644 --- a/Modules/Filtering/ImageFusion/wrapping/itkLabelOverlayImageFilter.wrap +++ b/Modules/Filtering/ImageFusion/wrapping/itkLabelOverlayImageFilter.wrap @@ -1,12 +1,12 @@ itk_wrap_class("itk::LabelOverlayImageFilter" POINTER) - UNIQUE(label_types "${WRAP_ITK_INT};UL") +unique(label_types "${WRAP_ITK_INT};UL") - if(ITK_WRAP_rgb_unsigned_short AND ITK_WRAP_unsigned_short) - itk_wrap_image_filter_combinations(US "${label_types}" RGBUS) - endif() +if(ITK_WRAP_rgb_unsigned_short AND ITK_WRAP_unsigned_short) + itk_wrap_image_filter_combinations(US "${label_types}" RGBUS) +endif() - if(ITK_WRAP_rgb_unsigned_char AND ITK_WRAP_unsigned_char) - itk_wrap_image_filter_combinations(UC "${label_types}" RGBUC) - endif() +if(ITK_WRAP_rgb_unsigned_char AND ITK_WRAP_unsigned_char) + itk_wrap_image_filter_combinations(UC "${label_types}" RGBUC) +endif() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageFusion/wrapping/itkLabelToRGBImageFilter.wrap b/Modules/Filtering/ImageFusion/wrapping/itkLabelToRGBImageFilter.wrap index d678c39f024..943e4b1a9c6 100644 --- a/Modules/Filtering/ImageFusion/wrapping/itkLabelToRGBImageFilter.wrap +++ b/Modules/Filtering/ImageFusion/wrapping/itkLabelToRGBImageFilter.wrap @@ -1,12 +1,12 @@ itk_wrap_class("itk::LabelToRGBImageFilter" POINTER_WITH_SUPERCLASS) - UNIQUE(label_types "${WRAP_ITK_INT};UL") +unique(label_types "${WRAP_ITK_INT};UL") - if(ITK_WRAP_rgb_unsigned_short) - itk_wrap_image_filter_combinations("${label_types}" RGBUS) - endif() +if(ITK_WRAP_rgb_unsigned_short) + itk_wrap_image_filter_combinations("${label_types}" RGBUS) +endif() - if(ITK_WRAP_rgb_unsigned_char) - itk_wrap_image_filter_combinations("${label_types}" RGBUC) - endif() +if(ITK_WRAP_rgb_unsigned_char) + itk_wrap_image_filter_combinations("${label_types}" RGBUC) +endif() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGradient/itk-module.cmake b/Modules/Filtering/ImageGradient/itk-module.cmake index 6df670bf6aa..94dbefb6f07 100644 --- a/Modules/Filtering/ImageGradient/itk-module.cmake +++ b/Modules/Filtering/ImageGradient/itk-module.cmake @@ -1,15 +1,16 @@ -set(DOCUMENTATION "This module contains filters that compute differential +set(DOCUMENTATION + "This module contains filters that compute differential operations in images. In particular, image gradients, gradient magnitude and difference of Gaussians.") -itk_module(ITKImageGradient +itk_module( + ITKImageGradient DEPENDS - ITKSmoothing - ITKImageIntensity + ITKSmoothing + ITKImageIntensity COMPILE_DEPENDS - ITKImageAdaptors + ITKImageAdaptors TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/ImageGradient/test/CMakeLists.txt b/Modules/Filtering/ImageGradient/test/CMakeLists.txt index e1ca9f937d1..6c07c60e315 100644 --- a/Modules/Filtering/ImageGradient/test/CMakeLists.txt +++ b/Modules/Filtering/ImageGradient/test/CMakeLists.txt @@ -1,94 +1,187 @@ itk_module_test() set(ITKImageGradientTests -itkGradientImageFilterTest.cxx -itkGradientImageFilterTest2.cxx -itkVectorGradientMagnitudeImageFilterTest1.cxx -itkVectorGradientMagnitudeImageFilterTest2.cxx -itkVectorGradientMagnitudeImageFilterTest3.cxx -itkGradientMagnitudeImageFilterTest.cxx -itkGradientMagnitudeRecursiveGaussianFilterTest.cxx -itkGradientRecursiveGaussianFilterTest.cxx -itkGradientRecursiveGaussianFilterTest2.cxx -itkGradientRecursiveGaussianFilterTest3.cxx -itkGradientRecursiveGaussianFilterTest4.cxx -itkDifferenceOfGaussiansGradientTest.cxx -itkGradientRecursiveGaussianFilterSpeedTest.cxx -) + itkGradientImageFilterTest.cxx + itkGradientImageFilterTest2.cxx + itkVectorGradientMagnitudeImageFilterTest1.cxx + itkVectorGradientMagnitudeImageFilterTest2.cxx + itkVectorGradientMagnitudeImageFilterTest3.cxx + itkGradientMagnitudeImageFilterTest.cxx + itkGradientMagnitudeRecursiveGaussianFilterTest.cxx + itkGradientRecursiveGaussianFilterTest.cxx + itkGradientRecursiveGaussianFilterTest2.cxx + itkGradientRecursiveGaussianFilterTest3.cxx + itkGradientRecursiveGaussianFilterTest4.cxx + itkDifferenceOfGaussiansGradientTest.cxx + itkGradientRecursiveGaussianFilterSpeedTest.cxx) -CreateTestDriver(ITKImageGradient "${ITKImageGradient-Test_LIBRARIES}" "${ITKImageGradientTests}") +createtestdriver(ITKImageGradient "${ITKImageGradient-Test_LIBRARIES}" "${ITKImageGradientTests}") -itk_add_test(NAME itkGradientImageFilterTest - COMMAND ITKImageGradientTestDriver itkGradientImageFilterTest 1 1) -itk_add_test(NAME itkGradientImageFilterTest2 - COMMAND ITKImageGradientTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/GradientMagnitudeImageFilterTest2.mha} - ${ITK_TEST_OUTPUT_DIR}/GradientMagnitudeImageFilterTest2.mha - itkGradientImageFilterTest2 - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/GradientMagnitudeImageFilterTest2.mha) +itk_add_test( + NAME + itkGradientImageFilterTest + COMMAND + ITKImageGradientTestDriver + itkGradientImageFilterTest + 1 + 1) +itk_add_test( + NAME + itkGradientImageFilterTest2 + COMMAND + ITKImageGradientTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/GradientMagnitudeImageFilterTest2.mha} + ${ITK_TEST_OUTPUT_DIR}/GradientMagnitudeImageFilterTest2.mha + itkGradientImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/GradientMagnitudeImageFilterTest2.mha) -itk_add_test(NAME itkVectorGradientMagnitudeImageFilterTest1a - COMMAND ITKImageGradientTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/VectorGradientMagnitudeImageFilterTest1a.png} - ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest1a.png - itkVectorGradientMagnitudeImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest1a.png 1 1.0 1.0 0) -itk_add_test(NAME itkVectorGradientMagnitudeImageFilterTest1b - COMMAND ITKImageGradientTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/VectorGradientMagnitudeImageFilterTest1b.png} - ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest1b.png - itkVectorGradientMagnitudeImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest1b.png 1 1.0 1.0 1) -itk_add_test(NAME itkVectorGradientMagnitudeImageFilterTest2 - COMMAND ITKImageGradientTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/VectorGradientMagnitudeImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest2.png - itkVectorGradientMagnitudeImageFilterTest2 DATA{${ITK_DATA_ROOT}/Input/VHFColor.mhd,VHFColor.raw} ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest2.png 0 5) -itk_add_test(NAME itkVectorGradientMagnitudeImageFilterTest2b - COMMAND ITKImageGradientTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/VectorGradientMagnitudeImageFilterTest2b.png} - ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest2b.png - itkVectorGradientMagnitudeImageFilterTest2 DATA{${ITK_DATA_ROOT}/Input/VHFColor.mhd,VHFColor.raw} ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest2b.png 1 5) -itk_add_test(NAME itkGradientMagnitudeImageFilterTest1 - COMMAND ITKImageGradientTestDriver itkGradientMagnitudeImageFilterTest 1) -itk_add_test(NAME itkGradientMagnitudeImageFilterTest2 - COMMAND ITKImageGradientTestDriver itkGradientMagnitudeImageFilterTest 0) -itk_add_test(NAME itkVectorGradientMagnitudeImageFilterTest3 - COMMAND ITKImageGradientTestDriver itkVectorGradientMagnitudeImageFilterTest3 - DATA{${ITK_DATA_ROOT}/Input/VHFColor.mhd,VHFColor.raw} ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest3.mha 1) -itk_add_test(NAME itkGradientMagnitudeRecursiveGaussianFilterTest - COMMAND ITKImageGradientTestDriver itkGradientMagnitudeRecursiveGaussianFilterTest 2.5 0) -itk_add_test(NAME itkGradientRecursiveGaussianFilterTest - COMMAND ITKImageGradientTestDriver itkGradientRecursiveGaussianFilterTest 0 1) -itk_add_test(NAME itkGradientRecursiveGaussianFilterTest2 - COMMAND ITKImageGradientTestDriver itkGradientRecursiveGaussianFilterTest2) +itk_add_test( + NAME + itkVectorGradientMagnitudeImageFilterTest1a + COMMAND + ITKImageGradientTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/VectorGradientMagnitudeImageFilterTest1a.png} + ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest1a.png + itkVectorGradientMagnitudeImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} + ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest1a.png + 1 + 1.0 + 1.0 + 0) +itk_add_test( + NAME + itkVectorGradientMagnitudeImageFilterTest1b + COMMAND + ITKImageGradientTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/VectorGradientMagnitudeImageFilterTest1b.png} + ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest1b.png + itkVectorGradientMagnitudeImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} + ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest1b.png + 1 + 1.0 + 1.0 + 1) +itk_add_test( + NAME + itkVectorGradientMagnitudeImageFilterTest2 + COMMAND + ITKImageGradientTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/VectorGradientMagnitudeImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest2.png + itkVectorGradientMagnitudeImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/VHFColor.mhd,VHFColor.raw} + ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest2.png + 0 + 5) +itk_add_test( + NAME + itkVectorGradientMagnitudeImageFilterTest2b + COMMAND + ITKImageGradientTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/VectorGradientMagnitudeImageFilterTest2b.png} + ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest2b.png + itkVectorGradientMagnitudeImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/VHFColor.mhd,VHFColor.raw} + ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest2b.png + 1 + 5) +itk_add_test( + NAME + itkGradientMagnitudeImageFilterTest1 + COMMAND + ITKImageGradientTestDriver + itkGradientMagnitudeImageFilterTest + 1) +itk_add_test( + NAME + itkGradientMagnitudeImageFilterTest2 + COMMAND + ITKImageGradientTestDriver + itkGradientMagnitudeImageFilterTest + 0) +itk_add_test( + NAME + itkVectorGradientMagnitudeImageFilterTest3 + COMMAND + ITKImageGradientTestDriver + itkVectorGradientMagnitudeImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/VHFColor.mhd,VHFColor.raw} + ${ITK_TEST_OUTPUT_DIR}/VectorGradientMagnitudeImageFilterTest3.mha + 1) +itk_add_test( + NAME + itkGradientMagnitudeRecursiveGaussianFilterTest + COMMAND + ITKImageGradientTestDriver + itkGradientMagnitudeRecursiveGaussianFilterTest + 2.5 + 0) +itk_add_test( + NAME + itkGradientRecursiveGaussianFilterTest + COMMAND + ITKImageGradientTestDriver + itkGradientRecursiveGaussianFilterTest + 0 + 1) +itk_add_test( + NAME + itkGradientRecursiveGaussianFilterTest2 + COMMAND + ITKImageGradientTestDriver + itkGradientRecursiveGaussianFilterTest2) -itk_add_test(NAME itkGradientRecursiveGaussianFilterTest3 - COMMAND ITKImageGradientTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3a.nii.gz - ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3b.nii.gz - --compare ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3c.nii.gz - ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3d.nii.gz - --compare ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3c.nii.gz - ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3e.nii.gz - --compare DATA{Baseline/itkGradientRecursiveGaussianFilterTest3c.nii.gz} - ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3c.nii.gz - --compare ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3f.nii.gz - ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3g.nii.gz - itkGradientRecursiveGaussianFilterTest3 - ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3a.nii.gz - ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3b.nii.gz - ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3c.nii.gz - ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3d.nii.gz - ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3e.nii.gz - ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3f.nii.gz - ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3g.nii.gz) +itk_add_test( + NAME + itkGradientRecursiveGaussianFilterTest3 + COMMAND + ITKImageGradientTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3a.nii.gz + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3b.nii.gz + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3c.nii.gz + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3d.nii.gz + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3c.nii.gz + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3e.nii.gz + --compare + DATA{Baseline/itkGradientRecursiveGaussianFilterTest3c.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3c.nii.gz + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3f.nii.gz + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3g.nii.gz + itkGradientRecursiveGaussianFilterTest3 + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3a.nii.gz + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3b.nii.gz + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3c.nii.gz + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3d.nii.gz + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3e.nii.gz + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3f.nii.gz + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest3g.nii.gz) -itk_add_test(NAME itkGradientRecursiveGaussianFilterTest4 - COMMAND ITKImageGradientTestDriver - --compare DATA{Baseline/itkGradientRecursiveGaussianFilterTest4.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest4.mha - itkGradientRecursiveGaussianFilterTest4 - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest4.mha) +itk_add_test( + NAME + itkGradientRecursiveGaussianFilterTest4 + COMMAND + ITKImageGradientTestDriver + --compare + DATA{Baseline/itkGradientRecursiveGaussianFilterTest4.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest4.mha + itkGradientRecursiveGaussianFilterTest4 + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkGradientRecursiveGaussianFilterTest4.mha) -itk_add_test(NAME itkDifferenceOfGaussiansGradientTest - - COMMAND ITKImageGradientTestDriver itkDifferenceOfGaussiansGradientTest) +itk_add_test( + NAME + itkDifferenceOfGaussiansGradientTest + COMMAND + ITKImageGradientTestDriver + itkDifferenceOfGaussiansGradientTest) diff --git a/Modules/Filtering/ImageGradient/wrapping/itkDifferenceOfGaussiansGradientImageFilter.wrap b/Modules/Filtering/ImageGradient/wrapping/itkDifferenceOfGaussiansGradientImageFilter.wrap index 030c50f3cae..e0d727073d9 100644 --- a/Modules/Filtering/ImageGradient/wrapping/itkDifferenceOfGaussiansGradientImageFilter.wrap +++ b/Modules/Filtering/ImageGradient/wrapping/itkDifferenceOfGaussiansGradientImageFilter.wrap @@ -1,17 +1,13 @@ itk_wrap_class("itk::DifferenceOfGaussiansGradientImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions - foreach(t ${WRAP_ITK_SCALAR}) - if(ITK_WRAP_covariant_vector_double) - itk_wrap_template( - "${ITKM_I${t}${vector_dim}}${ITKM_D}" - "${ITKT_I${t}${vector_dim}}, ${ITKT_D}") - endif() - if(ITK_WRAP_covariant_vector_float) - itk_wrap_template( - "${ITKM_I${t}${vector_dim}}${ITKM_F}" - "${ITKT_I${t}${vector_dim}}, ${ITKT_F}") - endif() - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions + foreach(t ${WRAP_ITK_SCALAR}) + if(ITK_WRAP_covariant_vector_double) + itk_wrap_template("${ITKM_I${t}${vector_dim}}${ITKM_D}" "${ITKT_I${t}${vector_dim}}, ${ITKT_D}") + endif() + if(ITK_WRAP_covariant_vector_float) + itk_wrap_template("${ITKM_I${t}${vector_dim}}${ITKM_F}" "${ITKT_I${t}${vector_dim}}, ${ITKT_F}") + endif() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGradient/wrapping/itkGradientImageFilter.wrap b/Modules/Filtering/ImageGradient/wrapping/itkGradientImageFilter.wrap index 323e15870f8..be96554cf79 100644 --- a/Modules/Filtering/ImageGradient/wrapping/itkGradientImageFilter.wrap +++ b/Modules/Filtering/ImageGradient/wrapping/itkGradientImageFilter.wrap @@ -1,21 +1,17 @@ itk_wrap_class("itk::GradientImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) +foreach(d ${ITK_WRAP_IMAGE_DIMS}) - set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions - foreach(t ${WRAP_ITK_SCALAR}) + set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions + foreach(t ${WRAP_ITK_SCALAR}) - if(ITK_WRAP_covariant_vector_float) - itk_wrap_template( - "${ITKM_I${t}${vector_dim}}${ITKM_F}${ITKM_F}" - "${ITKT_I${t}${vector_dim}},${ITKT_F},${ITKT_F}") - endif() + if(ITK_WRAP_covariant_vector_float) + itk_wrap_template("${ITKM_I${t}${vector_dim}}${ITKM_F}${ITKM_F}" "${ITKT_I${t}${vector_dim}},${ITKT_F},${ITKT_F}") + endif() - if(ITK_WRAP_covariant_vector_double) - itk_wrap_template( - "${ITKM_I${t}${vector_dim}}${ITKM_D}${ITKM_D}" - "${ITKT_I${t}${vector_dim}},${ITKT_D},${ITKT_D}") - endif() + if(ITK_WRAP_covariant_vector_double) + itk_wrap_template("${ITKM_I${t}${vector_dim}}${ITKM_D}${ITKM_D}" "${ITKT_I${t}${vector_dim}},${ITKT_D},${ITKT_D}") + endif() - endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGradient/wrapping/itkGradientMagnitudeImageFilter.wrap b/Modules/Filtering/ImageGradient/wrapping/itkGradientMagnitudeImageFilter.wrap index 52c571a38f8..056d88edd3f 100644 --- a/Modules/Filtering/ImageGradient/wrapping/itkGradientMagnitudeImageFilter.wrap +++ b/Modules/Filtering/ImageGradient/wrapping/itkGradientMagnitudeImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::GradientMagnitudeImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGradient/wrapping/itkGradientMagnitudeRecursiveGaussianImageFilter.wrap b/Modules/Filtering/ImageGradient/wrapping/itkGradientMagnitudeRecursiveGaussianImageFilter.wrap index 9ad06e731ac..d1709fbeb91 100644 --- a/Modules/Filtering/ImageGradient/wrapping/itkGradientMagnitudeRecursiveGaussianImageFilter.wrap +++ b/Modules/Filtering/ImageGradient/wrapping/itkGradientMagnitudeRecursiveGaussianImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::GradientMagnitudeRecursiveGaussianImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGradient/wrapping/itkGradientRecursiveGaussianImageFilter.wrap b/Modules/Filtering/ImageGradient/wrapping/itkGradientRecursiveGaussianImageFilter.wrap index 93de5690a42..14fd6a4077e 100644 --- a/Modules/Filtering/ImageGradient/wrapping/itkGradientRecursiveGaussianImageFilter.wrap +++ b/Modules/Filtering/ImageGradient/wrapping/itkGradientRecursiveGaussianImageFilter.wrap @@ -1,35 +1,38 @@ itk_wrap_class("itk::GradientRecursiveGaussianImageFilter" POINTER) - # Input can be a scalar image or a vector image - # The output is a covector image, with: - # number of components = 2 * number of components of the input +# Input can be a scalar image or a vector image +# The output is a covector image, with: +# number of components = 2 * number of components of the input - foreach(image_dim ${ITK_WRAP_IMAGE_DIMS}) +foreach(image_dim ${ITK_WRAP_IMAGE_DIMS}) - # Input type: scalar image - foreach(t ${WRAP_ITK_SCALAR}) - foreach(cv ${WRAP_ITK_COV_VECTOR_REAL}) - itk_wrap_template( - "${ITKM_I${t}${image_dim}}${ITKM_I${cv}2${image_dim}}" - "${ITKT_I${t}${image_dim}},${ITKT_I${cv}2${image_dim}}") - endforeach() + # Input type: scalar image + foreach(t ${WRAP_ITK_SCALAR}) + foreach(cv ${WRAP_ITK_COV_VECTOR_REAL}) + itk_wrap_template("${ITKM_I${t}${image_dim}}${ITKM_I${cv}2${image_dim}}" + "${ITKT_I${t}${image_dim}},${ITKT_I${cv}2${image_dim}}") endforeach() + endforeach() - # Input type: vectorial image - foreach(input_vector_dim ${ITK_WRAP_VECTOR_COMPONENTS}) - math(EXPR output_vector_dim ${input_vector_dim}*2) - list(FIND ITK_WRAP_VECTOR_COMPONENTS "${output_vector_dim}" index) - if(index GREATER -1) - foreach(t ${WRAP_ITK_VECTOR_REAL}) - foreach(cv ${WRAP_ITK_COV_VECTOR_REAL}) - itk_wrap_template( - "${ITKM_I${t}${input_vector_dim}${image_dim}}${ITKM_I${cv}${output_vector_dim}${image_dim}}" - "${ITKT_I${t}${input_vector_dim}${image_dim}},${ITKT_I${cv}${output_vector_dim}${image_dim}}") - endforeach() + # Input type: vectorial image + foreach(input_vector_dim ${ITK_WRAP_VECTOR_COMPONENTS}) + math(EXPR output_vector_dim ${input_vector_dim}*2) + list( + FIND + ITK_WRAP_VECTOR_COMPONENTS + "${output_vector_dim}" + index) + if(index GREATER -1) + foreach(t ${WRAP_ITK_VECTOR_REAL}) + foreach(cv ${WRAP_ITK_COV_VECTOR_REAL}) + itk_wrap_template( + "${ITKM_I${t}${input_vector_dim}${image_dim}}${ITKM_I${cv}${output_vector_dim}${image_dim}}" + "${ITKT_I${t}${input_vector_dim}${image_dim}},${ITKT_I${cv}${output_vector_dim}${image_dim}}") endforeach() - endif() - endforeach() - + endforeach() + endif() endforeach() +endforeach() + itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGradient/wrapping/itkVectorGradientMagnitudeImageFilter.wrap b/Modules/Filtering/ImageGradient/wrapping/itkVectorGradientMagnitudeImageFilter.wrap index effb5e8df15..c3c47f92f11 100644 --- a/Modules/Filtering/ImageGradient/wrapping/itkVectorGradientMagnitudeImageFilter.wrap +++ b/Modules/Filtering/ImageGradient/wrapping/itkVectorGradientMagnitudeImageFilter.wrap @@ -1,12 +1,10 @@ itk_wrap_class("itk::VectorGradientMagnitudeImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions - foreach(t ${WRAP_ITK_VECTOR_REAL}) - foreach(t2 ${WRAP_ITK_REAL}) - itk_wrap_template( - "${ITKM_I${t}${vector_dim}${d}}${ITKM_${t2}}" - "${ITKT_I${t}${vector_dim}${d}}, ${ITKT_${t2}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions + foreach(t ${WRAP_ITK_VECTOR_REAL}) + foreach(t2 ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}${vector_dim}${d}}${ITKM_${t2}}" "${ITKT_I${t}${vector_dim}${d}}, ${ITKT_${t2}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGradient/wrapping/test/CMakeLists.txt b/Modules/Filtering/ImageGradient/wrapping/test/CMakeLists.txt index 923e1aff40b..ff6f12f4c98 100644 --- a/Modules/Filtering/ImageGradient/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/ImageGradient/wrapping/test/CMakeLists.txt @@ -1,14 +1,23 @@ set(test_input_dir ${itk-module_SOURCE_DIR}/test/Input) -list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) -if(ITK_WRAP_PYTHON AND ITK_WRAP_float AND wrap_2_index GREATER -1) - itk_python_add_test(NAME PythonGradientMagnitudeRecursiveGaussianImageFilterTest +list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) +if(ITK_WRAP_PYTHON + AND ITK_WRAP_float + AND wrap_2_index GREATER -1) + itk_python_add_test( + NAME + PythonGradientMagnitudeRecursiveGaussianImageFilterTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/GradientMagnitudeRecursiveGaussianImageFilterTest.png - DATA{Baseline/PythonGradientMagnitudeRecursiveGaussianImageFilterTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/GradientMagnitudeRecursiveGaussianImageFilterTest.py - DATA{${test_input_dir}/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/GradientMagnitudeRecursiveGaussianImageFilterTest.png - 5 - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/GradientMagnitudeRecursiveGaussianImageFilterTest.png + DATA{Baseline/PythonGradientMagnitudeRecursiveGaussianImageFilterTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/GradientMagnitudeRecursiveGaussianImageFilterTest.py + DATA{${test_input_dir}/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/GradientMagnitudeRecursiveGaussianImageFilterTest.png + 5) endif() diff --git a/Modules/Filtering/ImageGrid/itk-module.cmake b/Modules/Filtering/ImageGrid/itk-module.cmake index d68c4794fbb..af92df92f89 100644 --- a/Modules/Filtering/ImageGrid/itk-module.cmake +++ b/Modules/Filtering/ImageGrid/itk-module.cmake @@ -1,19 +1,20 @@ -set(DOCUMENTATION "This module groups image filters whose operations are +set(DOCUMENTATION + "This module groups image filters whose operations are related to manipulations of the underlying image grid. For example, flipping an image, permuting axis, padding, cropping, pasting, tiling, resampling, shrinking, and changing its origin or spacing or orientation.") -itk_module(ITKImageGrid +itk_module( + ITKImageGrid COMPILE_DEPENDS - ITKImageFunction + ITKImageFunction TEST_DEPENDS - ITKTestKernel - ITKSmoothing - ITKImageSources - ITKImageIntensity + ITKTestKernel + ITKSmoothing + ITKImageSources + ITKImageIntensity DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") # ITKImageIntensity dependency introduced by itkBSplineScatteredDataPointSetToImageFilterTest4 # ITKSmoothing dependency introduced by itkSliceBySliceImageFilterTest. diff --git a/Modules/Filtering/ImageGrid/test/CMakeLists.txt b/Modules/Filtering/ImageGrid/test/CMakeLists.txt index 2ee09e88cee..aa14d2efee8 100644 --- a/Modules/Filtering/ImageGrid/test/CMakeLists.txt +++ b/Modules/Filtering/ImageGrid/test/CMakeLists.txt @@ -1,339 +1,754 @@ itk_module_test() set(ITKImageGridTests -itkBasicArchitectureTest.cxx -itkBinShrinkImageFilterTest1.cxx -itkBinShrinkImageFilterTest2.cxx -itkBSplineScatteredDataPointSetToImageFilterTest.cxx -itkBSplineScatteredDataPointSetToImageFilterTest2.cxx -itkBSplineScatteredDataPointSetToImageFilterTest3.cxx -itkBSplineScatteredDataPointSetToImageFilterTest4.cxx -itkBSplineScatteredDataPointSetToImageFilterTest5.cxx -itkBSplineControlPointImageFilterTest.cxx -itkBSplineControlPointImageFunctionTest.cxx -itkChangeInformationImageFilterTest.cxx -itkConstantPadImageTest.cxx -itkCoxDeBoorBSplineKernelFunctionTest.cxx -itkCoxDeBoorBSplineKernelFunctionTest2.cxx -itkCyclicReferences.cxx -itkCyclicShiftImageFilterTest.cxx -itkInterpolateImagePointsFilterTest.cxx -itkCropImageFilterTest.cxx -itkCropImageFilter3DTest.cxx -itkFlipImageFilterTest.cxx -itkExpandImageFilterTest.cxx -itkExpandImageFilterTest2.cxx -itkRegionOfInterestImageFilterTest.cxx -itkBSplineUpsampleImageFilterTest.cxx -itkBSplineResampleImageFilterTest.cxx -itkBSplineDownsampleImageFilterTest.cxx -itkTileImageFilterTest.cxx -itkInterpolateImageFilterTest.cxx -itkPasteImageFilterTest.cxx -itkPermuteAxesImageFilterTest.cxx -itkOrientedImage2DTest.cxx -itkOrientedImage3DTest.cxx -itkOrientedImageAdaptorTest.cxx -itkOrientedImageProfileTest1.cxx -itkOrientedImageProfileTest2.cxx -itkOrientedImageProfileTest3.cxx -itkOrientImageFilterTest.cxx -itkOrientImageFilterTest2.cxx -itkWarpImageFilterTest.cxx -itkWarpImageFilterTest2.cxx -itkWarpVectorImageFilterTest.cxx -itkWrapPadImageTest.cxx -itkMirrorPadImageTest.cxx -itkMirrorPadImageFilterTest.cxx -itkResampleImageTest.cxx -itkResampleImageTest2.cxx -itkResampleImageTest2Streaming.cxx -itkResampleImageTest3.cxx -itkResampleImageTest4.cxx -itkResampleImageTest5.cxx -itkResampleImageTest6.cxx -itkResampleImageTest7.cxx -itkResampleImageTest8.cxx -itkResamplePhasedArray3DSpecialCoordinatesImageTest.cxx -itkPushPopTileImageFilterTest.cxx -itkShrinkImageStreamingTest.cxx -itkShrinkImageTest.cxx -itkZeroFluxNeumannPadImageFilterTest.cxx -itkSliceBySliceImageFilterTest.cxx -itkPadImageFilterTest.cxx -) + itkBasicArchitectureTest.cxx + itkBinShrinkImageFilterTest1.cxx + itkBinShrinkImageFilterTest2.cxx + itkBSplineScatteredDataPointSetToImageFilterTest.cxx + itkBSplineScatteredDataPointSetToImageFilterTest2.cxx + itkBSplineScatteredDataPointSetToImageFilterTest3.cxx + itkBSplineScatteredDataPointSetToImageFilterTest4.cxx + itkBSplineScatteredDataPointSetToImageFilterTest5.cxx + itkBSplineControlPointImageFilterTest.cxx + itkBSplineControlPointImageFunctionTest.cxx + itkChangeInformationImageFilterTest.cxx + itkConstantPadImageTest.cxx + itkCoxDeBoorBSplineKernelFunctionTest.cxx + itkCoxDeBoorBSplineKernelFunctionTest2.cxx + itkCyclicReferences.cxx + itkCyclicShiftImageFilterTest.cxx + itkInterpolateImagePointsFilterTest.cxx + itkCropImageFilterTest.cxx + itkCropImageFilter3DTest.cxx + itkFlipImageFilterTest.cxx + itkExpandImageFilterTest.cxx + itkExpandImageFilterTest2.cxx + itkRegionOfInterestImageFilterTest.cxx + itkBSplineUpsampleImageFilterTest.cxx + itkBSplineResampleImageFilterTest.cxx + itkBSplineDownsampleImageFilterTest.cxx + itkTileImageFilterTest.cxx + itkInterpolateImageFilterTest.cxx + itkPasteImageFilterTest.cxx + itkPermuteAxesImageFilterTest.cxx + itkOrientedImage2DTest.cxx + itkOrientedImage3DTest.cxx + itkOrientedImageAdaptorTest.cxx + itkOrientedImageProfileTest1.cxx + itkOrientedImageProfileTest2.cxx + itkOrientedImageProfileTest3.cxx + itkOrientImageFilterTest.cxx + itkOrientImageFilterTest2.cxx + itkWarpImageFilterTest.cxx + itkWarpImageFilterTest2.cxx + itkWarpVectorImageFilterTest.cxx + itkWrapPadImageTest.cxx + itkMirrorPadImageTest.cxx + itkMirrorPadImageFilterTest.cxx + itkResampleImageTest.cxx + itkResampleImageTest2.cxx + itkResampleImageTest2Streaming.cxx + itkResampleImageTest3.cxx + itkResampleImageTest4.cxx + itkResampleImageTest5.cxx + itkResampleImageTest6.cxx + itkResampleImageTest7.cxx + itkResampleImageTest8.cxx + itkResamplePhasedArray3DSpecialCoordinatesImageTest.cxx + itkPushPopTileImageFilterTest.cxx + itkShrinkImageStreamingTest.cxx + itkShrinkImageTest.cxx + itkZeroFluxNeumannPadImageFilterTest.cxx + itkSliceBySliceImageFilterTest.cxx + itkPadImageFilterTest.cxx) -CreateTestDriver(ITKImageGrid "${ITKImageGrid-Test_LIBRARIES}" "${ITKImageGridTests}") +createtestdriver(ITKImageGrid "${ITKImageGrid-Test_LIBRARIES}" "${ITKImageGridTests}") -itk_add_test(NAME itkBasicArchitectureTest - COMMAND ITKImageGridTestDriver itkBasicArchitectureTest) -itk_add_test(NAME itkBinShrinkImageFilterTest1 - COMMAND ${itk-module}TestDriver itkBinShrinkImageFilterTest1) -itk_add_test(NAME itkBinShrinkImageFilterTest2 - COMMAND ${itk-module}TestDriver itkBinShrinkImageFilterTest2) -itk_add_test(NAME itkBSplineScatteredDataPointSetToImageFilterTest01 - COMMAND ITKImageGridTestDriver - --compare DATA{Baseline/itkBSplineScatteredDataPointSetToImageFilterTest01.mha} - ${ITK_TEST_OUTPUT_DIR}/itkBSplineScatteredDataPointSetToImageFilterTest01.mha - itkBSplineScatteredDataPointSetToImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} ${ITK_TEST_OUTPUT_DIR}/itkBSplineScatteredDataPointSetToImageFilterTest01.mha) -itk_add_test(NAME itkBSplineScatteredDataPointSetToImageFilterTest02 - COMMAND ITKImageGridTestDriver - --compare DATA{Baseline/itkBSplineScatteredDataPointSetToImageFilterTest02.mha} - ${ITK_TEST_OUTPUT_DIR}/itkBSplineScatteredDataPointSetToImageFilterTest02.mha - itkBSplineScatteredDataPointSetToImageFilterTest2 ${ITK_TEST_OUTPUT_DIR}/itkBSplineScatteredDataPointSetToImageFilterTest02.mha) -itk_add_test(NAME itkBSplineScatteredDataPointSetToImageFilterTest03 - COMMAND ITKImageGridTestDriver - --compare DATA{Baseline/itkBSplineScatteredDataPointSetToImageFilterTest03.mha} - ${ITK_TEST_OUTPUT_DIR}/itkBSplineScatteredDataPointSetToImageFilterTest03.mha - itkBSplineScatteredDataPointSetToImageFilterTest3 DATA{${ITK_DATA_ROOT}/Input/BSplineScatteredApproximationDataPointsInput.txt} ${ITK_TEST_OUTPUT_DIR}/itkBSplineScatteredDataPointSetToImageFilterTest03.mha) -itk_add_test(NAME itkBSplineScatteredDataPointSetToImageFilterTest04 - COMMAND ITKImageGridTestDriver itkBSplineScatteredDataPointSetToImageFilterTest4) -itk_add_test(NAME itkBSplineScatteredDataPointSetToImageFilterTest05 - COMMAND ITKImageGridTestDriver - --compare DATA{Baseline/itkBSplineScatteredDataPointSetToImageFilterTest05_magnitude.png} - ${ITK_TEST_OUTPUT_DIR}/itkBSplineScatteredDataPointSetToImageFilterTest05_magnitude.png - itkBSplineScatteredDataPointSetToImageFilterTest5 ${ITK_TEST_OUTPUT_DIR}/itkBSplineScatteredDataPointSetToImageFilterTest05_magnitude.png) -itk_add_test(NAME itkBSplineControlPointImageFilterTest1 - COMMAND ITKImageGridTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_2D_output.nii.gz - ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_2D_outputRefined.nii.gz - itkBSplineControlPointImageFilterTest 2 DATA{Baseline/N4ControlPoints_2D.nii.gz} ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_2D_output.nii.gz ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_2D_outputRefined.nii.gz) -itk_add_test(NAME itkBSplineControlPointImageFilterTest2 - COMMAND ITKImageGridTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_3D_output.nii.gz - ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_3D_outputRefined.nii.gz - itkBSplineControlPointImageFilterTest 3 DATA{Baseline/N4ControlPoints_3D.nii.gz} ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_3D_output.nii.gz ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_3D_outputRefined.nii.gz) -itk_add_test(NAME itkBSplineControlPointImageFunctionTest - COMMAND ITKImageGridTestDriver itkBSplineControlPointImageFunctionTest) -itk_add_test(NAME itkChangeInformationImageFilterTest - COMMAND ITKImageGridTestDriver itkChangeInformationImageFilterTest) -itk_add_test(NAME itkConstantPadImageTest - COMMAND ITKImageGridTestDriver itkConstantPadImageTest) -itk_add_test(NAME itkCoxDeBoorBSplineKernelFunctionTest01 - COMMAND ITKImageGridTestDriver itkCoxDeBoorBSplineKernelFunctionTest) -itk_add_test(NAME itkCoxDeBoorBSplineKernelFunctionTest02 - COMMAND ITKImageGridTestDriver itkCoxDeBoorBSplineKernelFunctionTest2) -itk_add_test(NAME itkCyclicReferences - COMMAND ITKImageGridTestDriver itkCyclicReferences) -itk_add_test(NAME itkCyclicShiftImageFilterTest0 - COMMAND ITKImageGridTestDriver - itkCyclicShiftImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} 0 0) -itk_add_test(NAME itkCyclicShiftImageFilterTest1 - COMMAND ITKImageGridTestDriver - itkCyclicShiftImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} 256 256) -itk_add_test(NAME itkCyclicShiftImageFilterTest2 - COMMAND ITKImageGridTestDriver - itkCyclicShiftImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} 40 0) -itk_add_test(NAME itkCyclicShiftImageFilterTest3 - COMMAND ITKImageGridTestDriver - itkCyclicShiftImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} 0 40) -itk_add_test(NAME itkCyclicShiftImageFilterTest4 - COMMAND ITKImageGridTestDriver - itkCyclicShiftImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} 40 40) -itk_add_test(NAME itkCyclicShiftImageFilterTest5 - COMMAND ITKImageGridTestDriver - itkCyclicShiftImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} 128 128) -itk_add_test(NAME itkCyclicShiftImageFilterTest6 - COMMAND ITKImageGridTestDriver - itkCyclicShiftImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} -51 40) -itk_add_test(NAME itkInterpolateImagePointsFilterTest - COMMAND ITKImageGridTestDriver itkInterpolateImagePointsFilterTest) -itk_add_test(NAME itkCropImageFilterTest - COMMAND ITKImageGridTestDriver itkCropImageFilterTest) -itk_add_test(NAME itkCropImageFilter3DTest - COMMAND ITKImageGridTestDriver itkCropImageFilter3DTest) -itk_add_test(NAME itkFlipImageFilterTest1 - COMMAND ITKImageGridTestDriver itkFlipImageFilterTest 0) -itk_add_test(NAME itkFlipImageFilterTest2 - COMMAND ITKImageGridTestDriver itkFlipImageFilterTest 1) -itk_add_test(NAME itkExpandImageFilterTest - COMMAND ITKImageGridTestDriver itkExpandImageFilterTest) -itk_add_test(NAME itkExpandImageFilterTest2 - COMMAND ITKImageGridTestDriver itkExpandImageFilterTest2) -itk_add_test(NAME itkRegionOfInterestImageFilterTest - COMMAND ITKImageGridTestDriver itkRegionOfInterestImageFilterTest) -itk_add_test(NAME itkBSplineUpsampleImageFilterTest - COMMAND ITKImageGridTestDriver itkBSplineUpsampleImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/itkBSplineUpsampleImageFilterTest1.mha 3) +itk_add_test( + NAME + itkBasicArchitectureTest + COMMAND + ITKImageGridTestDriver + itkBasicArchitectureTest) +itk_add_test( + NAME + itkBinShrinkImageFilterTest1 + COMMAND + ${itk-module}TestDriver + itkBinShrinkImageFilterTest1) +itk_add_test( + NAME + itkBinShrinkImageFilterTest2 + COMMAND + ${itk-module}TestDriver + itkBinShrinkImageFilterTest2) +itk_add_test( + NAME + itkBSplineScatteredDataPointSetToImageFilterTest01 + COMMAND + ITKImageGridTestDriver + --compare + DATA{Baseline/itkBSplineScatteredDataPointSetToImageFilterTest01.mha} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineScatteredDataPointSetToImageFilterTest01.mha + itkBSplineScatteredDataPointSetToImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineScatteredDataPointSetToImageFilterTest01.mha) +itk_add_test( + NAME + itkBSplineScatteredDataPointSetToImageFilterTest02 + COMMAND + ITKImageGridTestDriver + --compare + DATA{Baseline/itkBSplineScatteredDataPointSetToImageFilterTest02.mha} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineScatteredDataPointSetToImageFilterTest02.mha + itkBSplineScatteredDataPointSetToImageFilterTest2 + ${ITK_TEST_OUTPUT_DIR}/itkBSplineScatteredDataPointSetToImageFilterTest02.mha) +itk_add_test( + NAME + itkBSplineScatteredDataPointSetToImageFilterTest03 + COMMAND + ITKImageGridTestDriver + --compare + DATA{Baseline/itkBSplineScatteredDataPointSetToImageFilterTest03.mha} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineScatteredDataPointSetToImageFilterTest03.mha + itkBSplineScatteredDataPointSetToImageFilterTest3 + DATA{${ITK_DATA_ROOT}/Input/BSplineScatteredApproximationDataPointsInput.txt} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineScatteredDataPointSetToImageFilterTest03.mha) +itk_add_test( + NAME + itkBSplineScatteredDataPointSetToImageFilterTest04 + COMMAND + ITKImageGridTestDriver + itkBSplineScatteredDataPointSetToImageFilterTest4) +itk_add_test( + NAME + itkBSplineScatteredDataPointSetToImageFilterTest05 + COMMAND + ITKImageGridTestDriver + --compare + DATA{Baseline/itkBSplineScatteredDataPointSetToImageFilterTest05_magnitude.png} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineScatteredDataPointSetToImageFilterTest05_magnitude.png + itkBSplineScatteredDataPointSetToImageFilterTest5 + ${ITK_TEST_OUTPUT_DIR}/itkBSplineScatteredDataPointSetToImageFilterTest05_magnitude.png) +itk_add_test( + NAME + itkBSplineControlPointImageFilterTest1 + COMMAND + ITKImageGridTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_2D_output.nii.gz + ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_2D_outputRefined.nii.gz + itkBSplineControlPointImageFilterTest + 2 + DATA{Baseline/N4ControlPoints_2D.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_2D_output.nii.gz + ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_2D_outputRefined.nii.gz) +itk_add_test( + NAME + itkBSplineControlPointImageFilterTest2 + COMMAND + ITKImageGridTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_3D_output.nii.gz + ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_3D_outputRefined.nii.gz + itkBSplineControlPointImageFilterTest + 3 + DATA{Baseline/N4ControlPoints_3D.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_3D_output.nii.gz + ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_3D_outputRefined.nii.gz) +itk_add_test( + NAME + itkBSplineControlPointImageFunctionTest + COMMAND + ITKImageGridTestDriver + itkBSplineControlPointImageFunctionTest) +itk_add_test( + NAME + itkChangeInformationImageFilterTest + COMMAND + ITKImageGridTestDriver + itkChangeInformationImageFilterTest) +itk_add_test( + NAME + itkConstantPadImageTest + COMMAND + ITKImageGridTestDriver + itkConstantPadImageTest) +itk_add_test( + NAME + itkCoxDeBoorBSplineKernelFunctionTest01 + COMMAND + ITKImageGridTestDriver + itkCoxDeBoorBSplineKernelFunctionTest) +itk_add_test( + NAME + itkCoxDeBoorBSplineKernelFunctionTest02 + COMMAND + ITKImageGridTestDriver + itkCoxDeBoorBSplineKernelFunctionTest2) +itk_add_test( + NAME + itkCyclicReferences + COMMAND + ITKImageGridTestDriver + itkCyclicReferences) +itk_add_test( + NAME + itkCyclicShiftImageFilterTest0 + COMMAND + ITKImageGridTestDriver + itkCyclicShiftImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + 0 + 0) +itk_add_test( + NAME + itkCyclicShiftImageFilterTest1 + COMMAND + ITKImageGridTestDriver + itkCyclicShiftImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + 256 + 256) +itk_add_test( + NAME + itkCyclicShiftImageFilterTest2 + COMMAND + ITKImageGridTestDriver + itkCyclicShiftImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + 40 + 0) +itk_add_test( + NAME + itkCyclicShiftImageFilterTest3 + COMMAND + ITKImageGridTestDriver + itkCyclicShiftImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + 0 + 40) +itk_add_test( + NAME + itkCyclicShiftImageFilterTest4 + COMMAND + ITKImageGridTestDriver + itkCyclicShiftImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + 40 + 40) +itk_add_test( + NAME + itkCyclicShiftImageFilterTest5 + COMMAND + ITKImageGridTestDriver + itkCyclicShiftImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + 128 + 128) +itk_add_test( + NAME + itkCyclicShiftImageFilterTest6 + COMMAND + ITKImageGridTestDriver + itkCyclicShiftImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + -51 + 40) +itk_add_test( + NAME + itkInterpolateImagePointsFilterTest + COMMAND + ITKImageGridTestDriver + itkInterpolateImagePointsFilterTest) +itk_add_test( + NAME + itkCropImageFilterTest + COMMAND + ITKImageGridTestDriver + itkCropImageFilterTest) +itk_add_test( + NAME + itkCropImageFilter3DTest + COMMAND + ITKImageGridTestDriver + itkCropImageFilter3DTest) +itk_add_test( + NAME + itkFlipImageFilterTest1 + COMMAND + ITKImageGridTestDriver + itkFlipImageFilterTest + 0) +itk_add_test( + NAME + itkFlipImageFilterTest2 + COMMAND + ITKImageGridTestDriver + itkFlipImageFilterTest + 1) +itk_add_test( + NAME + itkExpandImageFilterTest + COMMAND + ITKImageGridTestDriver + itkExpandImageFilterTest) +itk_add_test( + NAME + itkExpandImageFilterTest2 + COMMAND + ITKImageGridTestDriver + itkExpandImageFilterTest2) +itk_add_test( + NAME + itkRegionOfInterestImageFilterTest + COMMAND + ITKImageGridTestDriver + itkRegionOfInterestImageFilterTest) +itk_add_test( + NAME + itkBSplineUpsampleImageFilterTest + COMMAND + ITKImageGridTestDriver + itkBSplineUpsampleImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineUpsampleImageFilterTest1.mha + 3) -itk_add_test(NAME itkBSplineResampleImageFilterTest - COMMAND ITKImageGridTestDriver - --redirectOutput ${ITK_TEST_OUTPUT_DIR}/itkBSplineResampleImageFilterTest - itkBSplineResampleImageFilterTest) -set_tests_properties(itkBSplineResampleImageFilterTest PROPERTIES ATTACHED_FILES_ON_FAIL ${ITK_TEST_OUTPUT_DIR}/itkBSplineResampleImageFilterTest.txt) +itk_add_test( + NAME + itkBSplineResampleImageFilterTest + COMMAND + ITKImageGridTestDriver + --redirectOutput + ${ITK_TEST_OUTPUT_DIR}/itkBSplineResampleImageFilterTest + itkBSplineResampleImageFilterTest) +set_tests_properties(itkBSplineResampleImageFilterTest + PROPERTIES ATTACHED_FILES_ON_FAIL ${ITK_TEST_OUTPUT_DIR}/itkBSplineResampleImageFilterTest.txt) -itk_add_test(NAME itkWarpImageFilterTest2 - COMMAND ITKImageGridTestDriver itkWarpImageFilterTest2) -itk_add_test(NAME itkBSplineDownsampleImageFilterTest - COMMAND ITKImageGridTestDriver itkBSplineDownsampleImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/itkBSplineDownsampleImageFilterTest1.mha 3) -itk_add_test(NAME itkTileImageFilterTest - COMMAND ITKImageGridTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/TileImageFilterTest4.png} - ${ITK_TEST_OUTPUT_DIR}/TileImageFilterTest4.png - itkTileImageFilterTest 1 2 0 DATA{${ITK_DATA_ROOT}/Input/STAPLE1.png} DATA{${ITK_DATA_ROOT}/Input/STAPLE2.png} DATA{${ITK_DATA_ROOT}/Input/STAPLE3.png} DATA{${ITK_DATA_ROOT}/Input/STAPLE4.png} DATA{${ITK_DATA_ROOT}/Input/Shapes.png} DATA{${ITK_DATA_ROOT}/Input/Spots.png} DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSliceInitialLevelSet.png} DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} DATA{${ITK_DATA_ROOT}/Input/cake_hard.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/sf4.png} DATA{${ITK_DATA_ROOT}/Input/smooth_circle.png} DATA{${ITK_DATA_ROOT}/Input/smooth_square.png} ${ITK_TEST_OUTPUT_DIR}/TileImageFilterTest%d.png) -itk_add_test(NAME itkInterpolateImageFilterTest - COMMAND ITKImageGridTestDriver itkInterpolateImageFilterTest) -itk_add_test(NAME itkPasteImageFilterTest - COMMAND ITKImageGridTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/PasteImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/PasteImageFilterTest.png - itkPasteImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} ${ITK_TEST_OUTPUT_DIR}/PasteImageFilterTest.png) -itk_add_test(NAME itkPermuteAxesImageFilterTest - COMMAND ITKImageGridTestDriver itkPermuteAxesImageFilterTest) -itk_add_test(NAME itkOrientedImage2DTest01 - COMMAND ITKImageGridTestDriver itkOrientedImage2DTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20DirectionPlus30.mhd 0.000 0.000 191.392 110.500 -128.500 222.569 4.000 -8.000 7.4641 -4.9282) -itk_add_test(NAME itkOrientedImage3DTest01 - COMMAND ITKImageGridTestDriver itkOrientedImage3DTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.mhd} 0.000 0.000 0.000 166.277 -96.000 0.000 124.000 214.774 0.000 0.000 0.000 168.000 0.125 -4.125 9.000 -1.95425 -3.63485 9.000) -itk_add_test(NAME itkOrientedImageAdaptorTest - COMMAND ITKImageGridTestDriver itkOrientedImageAdaptorTest) -itk_add_test(NAME itkOrientedImageProfileTest1 - COMMAND ITKImageGridTestDriver itkOrientedImageProfileTest1) -itk_add_test(NAME itkOrientedImageProfileTest2 - COMMAND ITKImageGridTestDriver itkOrientedImageProfileTest2) -itk_add_test(NAME itkOrientedImageProfileTest3 - COMMAND ITKImageGridTestDriver itkOrientedImageProfileTest3) -itk_add_test(NAME itkOrientImageFilterTest - COMMAND ITKImageGridTestDriver itkOrientImageFilterTest 0) -itk_add_test(NAME itkOrientImageFilterTest2 - COMMAND ITKImageGridTestDriver itkOrientImageFilterTest2) -itk_add_test(NAME itkWarpImageFilterTest - COMMAND ITKImageGridTestDriver itkWarpImageFilterTest) -itk_add_test(NAME itkWarpVectorImageFilterTest - COMMAND ITKImageGridTestDriver itkWarpVectorImageFilterTest) -itk_add_test(NAME itkWrapPadImageTest - COMMAND ITKImageGridTestDriver itkWrapPadImageTest) -itk_add_test(NAME itkMirrorPadImageTest - COMMAND ITKImageGridTestDriver itkMirrorPadImageTest) -itk_add_test(NAME itkMirrorPadImageFilterTest - COMMAND ITKImageGridTestDriver - --compare DATA{Baseline/SwirledMirrored_0-11-7.nrrd} - ${ITK_TEST_OUTPUT_DIR}/SwirledMirrored_0-11-7.nrrd - itkMirrorPadImageFilterTest float - DATA{Input/Swirled.png} - ${ITK_TEST_OUTPUT_DIR}/SwirledMirrored_0-11-7.nrrd - 1.0 11 7) -itk_add_test(NAME itkMirrorPadWithExponentialDecayTestFloat - COMMAND ITKImageGridTestDriver - --compare DATA{Baseline/SwirledMirroredFloat_0.75-11-7.nrrd} - ${ITK_TEST_OUTPUT_DIR}/SwirledMirroredFloat_0.75-11-7.nrrd - itkMirrorPadImageFilterTest float - DATA{Input/Swirled.png} - ${ITK_TEST_OUTPUT_DIR}/SwirledMirroredFloat_0.75-11-7.nrrd - 0.75 11 7) -itk_add_test(NAME itkMirrorPadWithExponentialDecayTestUChar - COMMAND ITKImageGridTestDriver - --compare DATA{Baseline/SwirledMirroredUChar_0.75-11-7.nrrd} - ${ITK_TEST_OUTPUT_DIR}/SwirledMirroredUChar_0.75-11-7.nrrd - itkMirrorPadImageFilterTest uchar - DATA{Input/Swirled.png} - ${ITK_TEST_OUTPUT_DIR}/SwirledMirroredUChar_0.75-11-7.nrrd - 0.75 11 7) -itk_add_test(NAME itkResampleImageTest - COMMAND ITKImageGridTestDriver itkResampleImageTest) -itk_add_test(NAME itkResampleImageTest2UseRefImageOff - COMMAND ITKImageGridTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ResampleImageTest2UseRefImageOff.png} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2aUseRefImageOff.png - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ResampleImageTest2UseRefImageOff.png} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2bUseRefImageOff.png - --compare DATA{Baseline/ResampleImageTest2NearestExtrapolateUseRefImageOff.png} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2cUseRefImageOff.png - --compare DATA{Baseline/ResampleImageTest2NearestExtrapolateUseRefImageOff.png} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2dUseRefImageOff.png - itkResampleImageTest2 DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - DATA{Input/circle.png} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2aUseRefImageOff.png - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2bUseRefImageOff.png - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2cUseRefImageOff.png - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2dUseRefImageOff.png - 0 0.8) -itk_add_test(NAME itkResampleImageTest2UseRefImageOn - COMMAND ITKImageGridTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ResampleImageTest2UseRefImageOn.png} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2aUseRefImageOn.png - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ResampleImageTest2UseRefImageOn.png} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2bUseRefImageOn.png - --compare DATA{Baseline/ResampleImageTest2NearestExtrapolateUseRefImageOn.png} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2cUseRefImageOn.png - --compare DATA{Baseline/ResampleImageTest2NearestExtrapolateUseRefImageOn.png} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2dUseRefImageOn.png - itkResampleImageTest2 DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - DATA{Input/circle.png} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2aUseRefImageOn.png - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2bUseRefImageOn.png - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2cUseRefImageOn.png - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2dUseRefImageOn.png - 1) -itk_add_test(NAME itkResampleImageTest2Streaming - COMMAND ITKImageGridTestDriver - --compare DATA{Baseline/ResampleImageTest2.mha} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2aStreaming.mha - --compare DATA{Baseline/ResampleImageTest2.mha} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2bStreaming.mha - --compare DATA{Baseline/ResampleImageTest2NearestExtrapolate.mha} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2cStreaming.mha - --compare DATA{Baseline/ResampleImageTest2NearestExtrapolate.mha} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2dStreaming.mha - itkResampleImageTest2Streaming DATA{Input/cthead1.mha} - DATA{Input/circle.png} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2aStreaming.mha - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2bStreaming.mha - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2cStreaming.mha - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2dStreaming.mha) -itk_add_test(NAME itkResampleImageTest3 - COMMAND ITKImageGridTestDriver - --compare DATA{Baseline/ResampleImageTest3.png} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest3.png - itkResampleImageTest3 DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest3.png) -itk_add_test(NAME itkResampleImageTest4 - COMMAND ITKImageGridTestDriver itkResampleImageTest4) -itk_add_test(NAME itkResampleImageTest5 - COMMAND ITKImageGridTestDriver - --compare DATA{Baseline/ResampleImageTest5.png} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest5.png - itkResampleImageTest5 10 ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest5.png) -itk_add_test(NAME itkResampleImageTest6 - COMMAND ITKImageGridTestDriver - --compare DATA{Baseline/ResampleImageTest6.png} - ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest6.png - itkResampleImageTest6 10 ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest6.png) -itk_add_test(NAME itkResampleImageTest7 - COMMAND ITKImageGridTestDriver itkResampleImageTest7) -itk_add_test(NAME itkResampleImageTest8 - COMMAND ITKImageGridTestDriver itkResampleImageTest8) -itk_add_test(NAME itkResamplePhasedArray3DSpecialCoordinatesImageTest - COMMAND ITKImageGridTestDriver itkResamplePhasedArray3DSpecialCoordinatesImageTest) -itk_add_test(NAME itkPushPopTileImageFilterTest - COMMAND ITKImageGridTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/PushPopTileImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/PushPopTileImageFilterTest.png - itkPushPopTileImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Shapes.png} DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/PushPopTileImageFilterTest.png) -itk_add_test(NAME itkShrinkImageStreamingTest - COMMAND ITKImageGridTestDriver itkShrinkImageStreamingTest) -itk_add_test(NAME itkShrinkImageTest - COMMAND ITKImageGridTestDriver itkShrinkImageTest) -itk_add_test(NAME itkZeroFluxNeumannPadImageFilterTest - COMMAND ITKImageGridTestDriver itkZeroFluxNeumannPadImageFilterTest) -itk_add_test(NAME itkSliceBySliceImageFilterDimension0Test - COMMAND ITKImageGridTestDriver itkSliceBySliceImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/itkSliceBySliceImageFilterDimension0Test.mha 0) -itk_add_test(NAME itkSliceBySliceImageFilterDimension1Test - COMMAND ITKImageGridTestDriver itkSliceBySliceImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/itkSliceBySliceImageFilterDimension1Test.mha 1) -itk_add_test(NAME itkSliceBySliceImageFilterDimension2Test - COMMAND ITKImageGridTestDriver itkSliceBySliceImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/itkSliceBySliceImageFilterDimension2Test.mha 2) -itk_add_test(NAME itkPadImageFilterTest - COMMAND ITKImageGridTestDriver itkPadImageFilterTest) +itk_add_test( + NAME + itkWarpImageFilterTest2 + COMMAND + ITKImageGridTestDriver + itkWarpImageFilterTest2) +itk_add_test( + NAME + itkBSplineDownsampleImageFilterTest + COMMAND + ITKImageGridTestDriver + itkBSplineDownsampleImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkBSplineDownsampleImageFilterTest1.mha + 3) +itk_add_test( + NAME + itkTileImageFilterTest + COMMAND + ITKImageGridTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/TileImageFilterTest4.png} + ${ITK_TEST_OUTPUT_DIR}/TileImageFilterTest4.png + itkTileImageFilterTest + 1 + 2 + 0 + DATA{${ITK_DATA_ROOT}/Input/STAPLE1.png} + DATA{${ITK_DATA_ROOT}/Input/STAPLE2.png} + DATA{${ITK_DATA_ROOT}/Input/STAPLE3.png} + DATA{${ITK_DATA_ROOT}/Input/STAPLE4.png} + DATA{${ITK_DATA_ROOT}/Input/Shapes.png} + DATA{${ITK_DATA_ROOT}/Input/Spots.png} + DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} + DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} + DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSliceInitialLevelSet.png} + DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} + DATA{${ITK_DATA_ROOT}/Input/cake_hard.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/sf4.png} + DATA{${ITK_DATA_ROOT}/Input/smooth_circle.png} + DATA{${ITK_DATA_ROOT}/Input/smooth_square.png} + ${ITK_TEST_OUTPUT_DIR}/TileImageFilterTest%d.png) +itk_add_test( + NAME + itkInterpolateImageFilterTest + COMMAND + ITKImageGridTestDriver + itkInterpolateImageFilterTest) +itk_add_test( + NAME + itkPasteImageFilterTest + COMMAND + ITKImageGridTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/PasteImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/PasteImageFilterTest.png + itkPasteImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} + ${ITK_TEST_OUTPUT_DIR}/PasteImageFilterTest.png) +itk_add_test( + NAME + itkPermuteAxesImageFilterTest + COMMAND + ITKImageGridTestDriver + itkPermuteAxesImageFilterTest) +itk_add_test( + NAME + itkOrientedImage2DTest01 + COMMAND + ITKImageGridTestDriver + itkOrientedImage2DTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20DirectionPlus30.mhd + 0.000 + 0.000 + 191.392 + 110.500 + -128.500 + 222.569 + 4.000 + -8.000 + 7.4641 + -4.9282) +itk_add_test( + NAME + itkOrientedImage3DTest01 + COMMAND + ITKImageGridTestDriver + itkOrientedImage3DTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.mhd} + 0.000 + 0.000 + 0.000 + 166.277 + -96.000 + 0.000 + 124.000 + 214.774 + 0.000 + 0.000 + 0.000 + 168.000 + 0.125 + -4.125 + 9.000 + -1.95425 + -3.63485 + 9.000) +itk_add_test( + NAME + itkOrientedImageAdaptorTest + COMMAND + ITKImageGridTestDriver + itkOrientedImageAdaptorTest) +itk_add_test( + NAME + itkOrientedImageProfileTest1 + COMMAND + ITKImageGridTestDriver + itkOrientedImageProfileTest1) +itk_add_test( + NAME + itkOrientedImageProfileTest2 + COMMAND + ITKImageGridTestDriver + itkOrientedImageProfileTest2) +itk_add_test( + NAME + itkOrientedImageProfileTest3 + COMMAND + ITKImageGridTestDriver + itkOrientedImageProfileTest3) +itk_add_test( + NAME + itkOrientImageFilterTest + COMMAND + ITKImageGridTestDriver + itkOrientImageFilterTest + 0) +itk_add_test( + NAME + itkOrientImageFilterTest2 + COMMAND + ITKImageGridTestDriver + itkOrientImageFilterTest2) +itk_add_test( + NAME + itkWarpImageFilterTest + COMMAND + ITKImageGridTestDriver + itkWarpImageFilterTest) +itk_add_test( + NAME + itkWarpVectorImageFilterTest + COMMAND + ITKImageGridTestDriver + itkWarpVectorImageFilterTest) +itk_add_test( + NAME + itkWrapPadImageTest + COMMAND + ITKImageGridTestDriver + itkWrapPadImageTest) +itk_add_test( + NAME + itkMirrorPadImageTest + COMMAND + ITKImageGridTestDriver + itkMirrorPadImageTest) +itk_add_test( + NAME + itkMirrorPadImageFilterTest + COMMAND + ITKImageGridTestDriver + --compare + DATA{Baseline/SwirledMirrored_0-11-7.nrrd} + ${ITK_TEST_OUTPUT_DIR}/SwirledMirrored_0-11-7.nrrd + itkMirrorPadImageFilterTest + float + DATA{Input/Swirled.png} + ${ITK_TEST_OUTPUT_DIR}/SwirledMirrored_0-11-7.nrrd + 1.0 + 11 + 7) +itk_add_test( + NAME + itkMirrorPadWithExponentialDecayTestFloat + COMMAND + ITKImageGridTestDriver + --compare + DATA{Baseline/SwirledMirroredFloat_0.75-11-7.nrrd} + ${ITK_TEST_OUTPUT_DIR}/SwirledMirroredFloat_0.75-11-7.nrrd + itkMirrorPadImageFilterTest + float + DATA{Input/Swirled.png} + ${ITK_TEST_OUTPUT_DIR}/SwirledMirroredFloat_0.75-11-7.nrrd + 0.75 + 11 + 7) +itk_add_test( + NAME + itkMirrorPadWithExponentialDecayTestUChar + COMMAND + ITKImageGridTestDriver + --compare + DATA{Baseline/SwirledMirroredUChar_0.75-11-7.nrrd} + ${ITK_TEST_OUTPUT_DIR}/SwirledMirroredUChar_0.75-11-7.nrrd + itkMirrorPadImageFilterTest + uchar + DATA{Input/Swirled.png} + ${ITK_TEST_OUTPUT_DIR}/SwirledMirroredUChar_0.75-11-7.nrrd + 0.75 + 11 + 7) +itk_add_test( + NAME + itkResampleImageTest + COMMAND + ITKImageGridTestDriver + itkResampleImageTest) +itk_add_test( + NAME + itkResampleImageTest2UseRefImageOff + COMMAND + ITKImageGridTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ResampleImageTest2UseRefImageOff.png} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2aUseRefImageOff.png + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ResampleImageTest2UseRefImageOff.png} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2bUseRefImageOff.png + --compare + DATA{Baseline/ResampleImageTest2NearestExtrapolateUseRefImageOff.png} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2cUseRefImageOff.png + --compare + DATA{Baseline/ResampleImageTest2NearestExtrapolateUseRefImageOff.png} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2dUseRefImageOff.png + itkResampleImageTest2 + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{Input/circle.png} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2aUseRefImageOff.png + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2bUseRefImageOff.png + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2cUseRefImageOff.png + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2dUseRefImageOff.png + 0 + 0.8) +itk_add_test( + NAME + itkResampleImageTest2UseRefImageOn + COMMAND + ITKImageGridTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ResampleImageTest2UseRefImageOn.png} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2aUseRefImageOn.png + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ResampleImageTest2UseRefImageOn.png} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2bUseRefImageOn.png + --compare + DATA{Baseline/ResampleImageTest2NearestExtrapolateUseRefImageOn.png} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2cUseRefImageOn.png + --compare + DATA{Baseline/ResampleImageTest2NearestExtrapolateUseRefImageOn.png} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2dUseRefImageOn.png + itkResampleImageTest2 + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{Input/circle.png} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2aUseRefImageOn.png + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2bUseRefImageOn.png + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2cUseRefImageOn.png + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2dUseRefImageOn.png + 1) +itk_add_test( + NAME + itkResampleImageTest2Streaming + COMMAND + ITKImageGridTestDriver + --compare + DATA{Baseline/ResampleImageTest2.mha} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2aStreaming.mha + --compare + DATA{Baseline/ResampleImageTest2.mha} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2bStreaming.mha + --compare + DATA{Baseline/ResampleImageTest2NearestExtrapolate.mha} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2cStreaming.mha + --compare + DATA{Baseline/ResampleImageTest2NearestExtrapolate.mha} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2dStreaming.mha + itkResampleImageTest2Streaming + DATA{Input/cthead1.mha} + DATA{Input/circle.png} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2aStreaming.mha + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2bStreaming.mha + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2cStreaming.mha + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest2dStreaming.mha) +itk_add_test( + NAME + itkResampleImageTest3 + COMMAND + ITKImageGridTestDriver + --compare + DATA{Baseline/ResampleImageTest3.png} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest3.png + itkResampleImageTest3 + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest3.png) +itk_add_test( + NAME + itkResampleImageTest4 + COMMAND + ITKImageGridTestDriver + itkResampleImageTest4) +itk_add_test( + NAME + itkResampleImageTest5 + COMMAND + ITKImageGridTestDriver + --compare + DATA{Baseline/ResampleImageTest5.png} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest5.png + itkResampleImageTest5 + 10 + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest5.png) +itk_add_test( + NAME + itkResampleImageTest6 + COMMAND + ITKImageGridTestDriver + --compare + DATA{Baseline/ResampleImageTest6.png} + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest6.png + itkResampleImageTest6 + 10 + ${ITK_TEST_OUTPUT_DIR}/ResampleImageTest6.png) +itk_add_test( + NAME + itkResampleImageTest7 + COMMAND + ITKImageGridTestDriver + itkResampleImageTest7) +itk_add_test( + NAME + itkResampleImageTest8 + COMMAND + ITKImageGridTestDriver + itkResampleImageTest8) +itk_add_test( + NAME + itkResamplePhasedArray3DSpecialCoordinatesImageTest + COMMAND + ITKImageGridTestDriver + itkResamplePhasedArray3DSpecialCoordinatesImageTest) +itk_add_test( + NAME + itkPushPopTileImageFilterTest + COMMAND + ITKImageGridTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/PushPopTileImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/PushPopTileImageFilterTest.png + itkPushPopTileImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Shapes.png} + DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} + DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/PushPopTileImageFilterTest.png) +itk_add_test( + NAME + itkShrinkImageStreamingTest + COMMAND + ITKImageGridTestDriver + itkShrinkImageStreamingTest) +itk_add_test( + NAME + itkShrinkImageTest + COMMAND + ITKImageGridTestDriver + itkShrinkImageTest) +itk_add_test( + NAME + itkZeroFluxNeumannPadImageFilterTest + COMMAND + ITKImageGridTestDriver + itkZeroFluxNeumannPadImageFilterTest) +itk_add_test( + NAME + itkSliceBySliceImageFilterDimension0Test + COMMAND + ITKImageGridTestDriver + itkSliceBySliceImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkSliceBySliceImageFilterDimension0Test.mha + 0) +itk_add_test( + NAME + itkSliceBySliceImageFilterDimension1Test + COMMAND + ITKImageGridTestDriver + itkSliceBySliceImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkSliceBySliceImageFilterDimension1Test.mha + 1) +itk_add_test( + NAME + itkSliceBySliceImageFilterDimension2Test + COMMAND + ITKImageGridTestDriver + itkSliceBySliceImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkSliceBySliceImageFilterDimension2Test.mha + 2) +itk_add_test( + NAME + itkPadImageFilterTest + COMMAND + ITKImageGridTestDriver + itkPadImageFilterTest) set(ITKImageGridGTests - itkChangeInformationImageFilterGTest.cxx - itkResampleImageFilterGTest.cxx - itkSliceImageFilterTest.cxx - itkTileImageFilterGTest.cxx - itkPasteImageFilterGTest.cxx) + itkChangeInformationImageFilterGTest.cxx + itkResampleImageFilterGTest.cxx + itkSliceImageFilterTest.cxx + itkTileImageFilterGTest.cxx + itkPasteImageFilterGTest.cxx) -CreateGoogleTestDriver(ITKImageGrid "${ITKImageGrid-Test_LIBRARIES}" "${ITKImageGridGTests}") +creategoogletestdriver(ITKImageGrid "${ITKImageGrid-Test_LIBRARIES}" "${ITKImageGridGTests}") diff --git a/Modules/Filtering/ImageGrid/wrapping/CMakeLists.txt b/Modules/Filtering/ImageGrid/wrapping/CMakeLists.txt index 085bbf463b7..daff10d110f 100644 --- a/Modules/Filtering/ImageGrid/wrapping/CMakeLists.txt +++ b/Modules/Filtering/ImageGrid/wrapping/CMakeLists.txt @@ -1,7 +1,4 @@ itk_wrap_module(ITKImageGrid) -set(WRAPPER_SUBMODULE_ORDER - itkPadImageFilterBase - itkPadImageFilter -) +set(WRAPPER_SUBMODULE_ORDER itkPadImageFilterBase itkPadImageFilter) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkBSplineDownsampleImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkBSplineDownsampleImageFilter.wrap index 5217831d0b6..59633c2bfd8 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkBSplineDownsampleImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkBSplineDownsampleImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BSplineDownsampleImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkBSplineUpsampleImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkBSplineUpsampleImageFilter.wrap index 862b76260b7..2a58f9a830d 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkBSplineUpsampleImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkBSplineUpsampleImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BSplineUpsampleImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkBinShrinkImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkBinShrinkImageFilter.wrap index b541e699649..99d6b0c7246 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkBinShrinkImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkBinShrinkImageFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::BinShrinkImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_RGB}" 2) - itk_wrap_image_filter("${WRAP_ITK_RGBA}" 2) - itk_wrap_image_filter("${WRAP_ITK_VECTOR}" 2) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) - itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_RGB}" 2) +itk_wrap_image_filter("${WRAP_ITK_RGBA}" 2) +itk_wrap_image_filter("${WRAP_ITK_VECTOR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkChangeInformationImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkChangeInformationImageFilter.wrap index 858a71d0d13..472066d8abd 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkChangeInformationImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkChangeInformationImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ChangeInformationImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkConstantPadImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkConstantPadImageFilter.wrap index 3c7d3726b3f..c460215a491 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkConstantPadImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkConstantPadImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ConstantPadImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkCropImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkCropImageFilter.wrap index ddd65f72c35..393d00075bc 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkCropImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkCropImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::CropImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkCyclicShiftImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkCyclicShiftImageFilter.wrap index 01d7040bace..9aedf4287ba 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkCyclicShiftImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkCyclicShiftImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::CyclicShiftImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkExpandImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkExpandImageFilter.wrap index 5711aae7858..6293a5083ec 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkExpandImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkExpandImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ExpandImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR};${WRAP_ITK_VECTOR_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR};${WRAP_ITK_VECTOR_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkFlipImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkFlipImageFilter.wrap index a04891bb073..0f443d2a621 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkFlipImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkFlipImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::FlipImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkInterpolateImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkInterpolateImageFilter.wrap index f2cd48753d0..7a2f4b1b077 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkInterpolateImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkInterpolateImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::InterpolateImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkMirrorPadImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkMirrorPadImageFilter.wrap index eb2a81f3b95..eb68c69287a 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkMirrorPadImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkMirrorPadImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MirrorPadImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkOrientImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkOrientImageFilter.wrap index 70aab95758b..08f9a1b0d05 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkOrientImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkOrientImageFilter.wrap @@ -2,6 +2,6 @@ itk_wrap_filter_dims(has_d_3 3) if(has_d_3) itk_wrap_class("itk::OrientImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2 3) + itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2 3) itk_end_wrap_class() endif() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkPadImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkPadImageFilter.wrap index c31d08be474..248fea252d7 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkPadImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkPadImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::PadImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkPadImageFilterBase.wrap b/Modules/Filtering/ImageGrid/wrapping/itkPadImageFilterBase.wrap index 8244746f689..c302230c5b2 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkPadImageFilterBase.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkPadImageFilterBase.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::PadImageFilterBase" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkPasteImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkPasteImageFilter.wrap index 8b5c745b416..7c1367181d9 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkPasteImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkPasteImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::PasteImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkPermuteAxesImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkPermuteAxesImageFilter.wrap index 7f0dff6ef83..f10e57ca259 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkPermuteAxesImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkPermuteAxesImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::PermuteAxesImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkRegionOfInterestImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkRegionOfInterestImageFilter.wrap index 4a877ee0877..00e7e7b86de 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkRegionOfInterestImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkRegionOfInterestImageFilter.wrap @@ -1,10 +1,10 @@ itk_wrap_class("itk::RegionOfInterestImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) - # VectorImage's - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_VI${t}${d}}${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}}, ${ITKT_VI${t}${d}}") - endforeach() +# VectorImage's +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_VI${t}${d}}${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}}, ${ITKT_VI${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkResampleImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkResampleImageFilter.wrap index 5cd9102a8f3..5513b84bc5a 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkResampleImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkResampleImageFilter.wrap @@ -1,24 +1,24 @@ itk_wrap_include("itkPhasedArray3DSpecialCoordinatesImage.h") itk_wrap_class("itk::ResampleImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) - itk_wrap_image_filter("${WRAP_ITK_VECTOR_REAL}" 2) - itk_wrap_image_filter("${WRAP_ITK_COLOR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_VECTOR_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_COLOR}" 2) - # VectorImages - UNIQUE(to_types "UC;${WRAP_ITK_SCALAR}") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${to_types}) - itk_wrap_template("${ITKM_VI${t}${d}}${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}},${ITKT_VI${t}${d}}") - endforeach() +# VectorImages +unique(to_types "UC;${WRAP_ITK_SCALAR}") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${to_types}) + itk_wrap_template("${ITKM_VI${t}${d}}${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}},${ITKT_VI${t}${d}}") endforeach() +endforeach() - set(PA3DSCI_types "F") - if(ITK_WRAP_unsigned_char) - list(APPEND PA3DSCI_types "UC") - endif() - foreach(t ${PA3DSCI_types}) - itk_wrap_template("PA3DSCI${ITKM_${t}}I${ITKM_${t}}3" - "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, itk::Image< ${ITKT_${t}}, 3 >") - endforeach() +set(PA3DSCI_types "F") +if(ITK_WRAP_unsigned_char) + list(APPEND PA3DSCI_types "UC") +endif() +foreach(t ${PA3DSCI_types}) + itk_wrap_template("PA3DSCI${ITKM_${t}}I${ITKM_${t}}3" + "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >, itk::Image< ${ITKT_${t}}, 3 >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkShrinkImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkShrinkImageFilter.wrap index 80ce3325570..fd0447e0f05 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkShrinkImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkShrinkImageFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::ShrinkImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_RGB}" 2) - itk_wrap_image_filter("${WRAP_ITK_RGBA}" 2) - itk_wrap_image_filter("${WRAP_ITK_VECTOR}" 2) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) - itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_RGB}" 2) +itk_wrap_image_filter("${WRAP_ITK_RGBA}" 2) +itk_wrap_image_filter("${WRAP_ITK_VECTOR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkSliceBySliceImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkSliceBySliceImageFilter.wrap index 38cd572ebdf..527b6baf30f 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkSliceBySliceImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkSliceBySliceImageFilter.wrap @@ -7,16 +7,16 @@ itk_wrap_filter_dims(has_d_1 ${d_1}) # Wrap if allowed if(has_d_1) itk_wrap_class("itk::SliceBySliceImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - math(EXPR d_1 "${d} - 1") - itk_wrap_filter_dims(has_d_1 ${d_1}) - if(has_d_1) - # avoid the vector and covariant vector types: the type - # Image< Vector< T, N >, N-1 > is not wrapped - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 ${d}) - itk_wrap_image_filter("${WRAP_ITK_RGB}" 2 ${d}) - itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 2 ${d}) - endif() - endforeach() + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + math(EXPR d_1 "${d} - 1") + itk_wrap_filter_dims(has_d_1 ${d_1}) + if(has_d_1) + # avoid the vector and covariant vector types: the type + # Image< Vector< T, N >, N-1 > is not wrapped + itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 ${d}) + itk_wrap_image_filter("${WRAP_ITK_RGB}" 2 ${d}) + itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 2 ${d}) + endif() + endforeach() itk_end_wrap_class() endif() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkTileImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkTileImageFilter.wrap index a59d1e66e50..0e2910ea1a8 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkTileImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkTileImageFilter.wrap @@ -1,14 +1,13 @@ itk_wrap_class("itk::TileImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) - foreach(d1 ${ITK_WRAP_IMAGE_DIMS}) - foreach(d2 ${ITK_WRAP_IMAGE_DIMS}) - if("${d1}" LESS "${d2}") - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d1}}${ITKM_I${t}${d2}}" - "${ITKT_I${t}${d1}},${ITKT_I${t}${d2}}") - endforeach() - endif() - endforeach() +foreach(d1 ${ITK_WRAP_IMAGE_DIMS}) + foreach(d2 ${ITK_WRAP_IMAGE_DIMS}) + if("${d1}" LESS "${d2}") + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d1}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d1}},${ITKT_I${t}${d2}}") + endforeach() + endif() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkWarpImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkWarpImageFilter.wrap index b57104a9a56..c3b0fc93d9f 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkWarpImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkWarpImageFilter.wrap @@ -1,16 +1,20 @@ itk_wrap_class("itk::WarpImageFilter" POINTER) - foreach(curr_dim ${ITK_WRAP_IMAGE_DIMS}) - if(${curr_dim} LESS 1) - continue() - endif() - # Vector components dimension must match image dimension. Temporarily change the global vector dims list. - set(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_WARP_IMAGE_FILTER "${ITK_WRAP_VECTOR_COMPONENTS}") - set(ITK_WRAP_VECTOR_COMPONENTS ${curr_dim}) - foreach(s ${WRAP_ITK_SCALAR}) - itk_wrap_image_filter_combinations("${s}" "${s}" "${WRAP_ITK_VECTOR_REAL}" ${curr_dim}) - endforeach() - # Restore the global vector dims list. - set(ITK_WRAP_VECTOR_COMPONENTS "${SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_WARP_IMAGE_FILTER}") - unset(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_WARP_IMAGE_FILTER) +foreach(curr_dim ${ITK_WRAP_IMAGE_DIMS}) + if(${curr_dim} LESS 1) + continue() + endif() + # Vector components dimension must match image dimension. Temporarily change the global vector dims list. + set(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_WARP_IMAGE_FILTER "${ITK_WRAP_VECTOR_COMPONENTS}") + set(ITK_WRAP_VECTOR_COMPONENTS ${curr_dim}) + foreach(s ${WRAP_ITK_SCALAR}) + itk_wrap_image_filter_combinations( + "${s}" + "${s}" + "${WRAP_ITK_VECTOR_REAL}" + ${curr_dim}) endforeach() + # Restore the global vector dims list. + set(ITK_WRAP_VECTOR_COMPONENTS "${SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_WARP_IMAGE_FILTER}") + unset(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_WARP_IMAGE_FILTER) +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkWrapPadImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkWrapPadImageFilter.wrap index ccb9842be25..aafac716b4b 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkWrapPadImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkWrapPadImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::WrapPadImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/itkZeroFluxNeumannPadImageFilter.wrap b/Modules/Filtering/ImageGrid/wrapping/itkZeroFluxNeumannPadImageFilter.wrap index eb9cbb80a35..7a1c22d6c60 100644 --- a/Modules/Filtering/ImageGrid/wrapping/itkZeroFluxNeumannPadImageFilter.wrap +++ b/Modules/Filtering/ImageGrid/wrapping/itkZeroFluxNeumannPadImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ZeroFluxNeumannPadImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageGrid/wrapping/test/CMakeLists.txt b/Modules/Filtering/ImageGrid/wrapping/test/CMakeLists.txt index d8f0f2882b1..724edf3976c 100644 --- a/Modules/Filtering/ImageGrid/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/ImageGrid/wrapping/test/CMakeLists.txt @@ -1,110 +1,169 @@ set(test_input_dir ${itk-module_SOURCE_DIR}/test/Input) # some tests will fail if dim=2 and unsigned short are not wrapped -list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) -if(ITK_WRAP_PYTHON AND ITK_WRAP_unsigned_char AND wrap_2_index GREATER -1) - itk_python_add_test(NAME PythonResampleImageFilterTest1 +list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) +if(ITK_WRAP_PYTHON + AND ITK_WRAP_unsigned_char + AND wrap_2_index GREATER -1) + itk_python_add_test( + NAME + PythonResampleImageFilterTest1 TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonResampleImageFilterTest1.png - DATA{Baseline/PythonResampleImageFilterTest1.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ResampleImageFilterTest.py - DATA{${test_input_dir}/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/PythonResampleImageFilterTest1.png - 0 - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonResampleImageFilterTest1.png + DATA{Baseline/PythonResampleImageFilterTest1.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/ResampleImageFilterTest.py + DATA{${test_input_dir}/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/PythonResampleImageFilterTest1.png + 0) - itk_python_add_test(NAME PythonResampleImageFilterTest2 + itk_python_add_test( + NAME + PythonResampleImageFilterTest2 TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonResampleImageFilterTest2.png - DATA{Baseline/PythonResampleImageFilterTest2.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ResampleImageFilterTest.py - DATA{${test_input_dir}/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/PythonResampleImageFilterTest2.png - 1 - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonResampleImageFilterTest2.png + DATA{Baseline/PythonResampleImageFilterTest2.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/ResampleImageFilterTest.py + DATA{${test_input_dir}/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/PythonResampleImageFilterTest2.png + 1) - itk_python_add_test(NAME PythonResampleImageFilterTest3 + itk_python_add_test( + NAME + PythonResampleImageFilterTest3 TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonResampleImageFilterTest3.png - DATA{Baseline/PythonResampleImageFilterTest3.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ResampleImageFilterTest.py - DATA{${test_input_dir}/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/PythonResampleImageFilterTest3.png - 2 - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonResampleImageFilterTest3.png + DATA{Baseline/PythonResampleImageFilterTest3.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/ResampleImageFilterTest.py + DATA{${test_input_dir}/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/PythonResampleImageFilterTest3.png + 2) - itk_python_add_test(NAME PythonResampleImageFilterTest4 + itk_python_add_test( + NAME + PythonResampleImageFilterTest4 TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonResampleImageFilterTest4.png - DATA{Baseline/PythonResampleImageFilterTest4.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ResampleImageFilterTest.py - DATA{${test_input_dir}/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/PythonResampleImageFilterTest4.png - 3 - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonResampleImageFilterTest4.png + DATA{Baseline/PythonResampleImageFilterTest4.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/ResampleImageFilterTest.py + DATA{${test_input_dir}/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/PythonResampleImageFilterTest4.png + 3) endif() # let's make sure 3D uchar images are wrapped -list(FIND ITK_WRAP_IMAGE_DIMS 3 wrap_3_index) -if(ITK_WRAP_PYTHON AND ITK_WRAP_unsigned_char AND wrap_3_index GREATER -1) - itk_python_add_test(NAME OrientImageFilterTest +list( + FIND + ITK_WRAP_IMAGE_DIMS + 3 + wrap_3_index) +if(ITK_WRAP_PYTHON + AND ITK_WRAP_unsigned_char + AND wrap_3_index GREATER -1) + itk_python_add_test( + NAME + OrientImageFilterTest TEST_DRIVER_ARGS - --compare DATA{Baseline/OrientImageFilterTest.mha} - ${ITK_TEST_OUTPUT_DIR}/OrientImageFilterTest.mha - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/OrientImageFilterTest.py - DATA{${ITK_DATA_ROOT}/Baseline/Filtering/SubsampleVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/OrientImageFilterTest.mha - ) + --compare + DATA{Baseline/OrientImageFilterTest.mha} + ${ITK_TEST_OUTPUT_DIR}/OrientImageFilterTest.mha + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/OrientImageFilterTest.py + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/SubsampleVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/OrientImageFilterTest.mha) - itk_python_expression_add_test(NAME PythonInstantiateGaussianInterpolateImageFunctionPA3DSCI - EXPRESSION "iFunc = itk.GaussianInterpolateImageFunction[itk.PhasedArray3DSpecialCoordinatesImage[itk.F], itk.D].New()" - ) + itk_python_expression_add_test( + NAME + PythonInstantiateGaussianInterpolateImageFunctionPA3DSCI + EXPRESSION + "iFunc = itk.GaussianInterpolateImageFunction[itk.PhasedArray3DSpecialCoordinatesImage[itk.F], itk.D].New()") - itk_python_add_test(NAME PythonPhasedArray3DResampleNearestTest + itk_python_add_test( + NAME + PythonPhasedArray3DResampleNearestTest TEST_DRIVER_ARGS - --compareIntensityTolerance 1 + --compareIntensityTolerance + 1 --compare - DATA{Baseline/ScanConvertPhasedArray3DITKNearestNeighborTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/ScanConvertPhasedArray3DITKNearestNeighborTestOutput.mha - COMMAND PhasedArray3DResampleTest.py - -i DATA{${test_input_dir}/ScanConvertPhasedArray3DTestInput.mha} - -o ${ITK_TEST_OUTPUT_DIR}/ScanConvertPhasedArray3DITKNearestNeighborTestOutput.mha - --azimuth-angular-separation 0.0872665 - --elevation-angular-separation 0.0174533 - --radius-sample-size 0.2 - --first-sample-distance 8.0 - --interpolation-type nearest - ) + DATA{Baseline/ScanConvertPhasedArray3DITKNearestNeighborTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/ScanConvertPhasedArray3DITKNearestNeighborTestOutput.mha + COMMAND + PhasedArray3DResampleTest.py + -i + DATA{${test_input_dir}/ScanConvertPhasedArray3DTestInput.mha} + -o + ${ITK_TEST_OUTPUT_DIR}/ScanConvertPhasedArray3DITKNearestNeighborTestOutput.mha + --azimuth-angular-separation + 0.0872665 + --elevation-angular-separation + 0.0174533 + --radius-sample-size + 0.2 + --first-sample-distance + 8.0 + --interpolation-type + nearest) - itk_python_add_test(NAME PythonPhasedArray3DResampleLinearTest + itk_python_add_test( + NAME + PythonPhasedArray3DResampleLinearTest TEST_DRIVER_ARGS - --compareIntensityTolerance 1 + --compareIntensityTolerance + 1 --compare - DATA{Baseline/ScanConvertPhasedArray3DTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/ScanConvertPhasedArray3DTestOutput.mha - COMMAND PhasedArray3DResampleTest.py - -i DATA{${test_input_dir}/ScanConvertPhasedArray3DTestInput.mha} - -o ${ITK_TEST_OUTPUT_DIR}/ScanConvertPhasedArray3DTestOutput.mha - --azimuth-angular-separation 0.0872665 - --elevation-angular-separation 0.0174533 - --radius-sample-size 0.2 - --first-sample-distance 8.0 - # --interpolation-type linear # linear is the default - ) + DATA{Baseline/ScanConvertPhasedArray3DTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/ScanConvertPhasedArray3DTestOutput.mha + COMMAND + PhasedArray3DResampleTest.py + -i + DATA{${test_input_dir}/ScanConvertPhasedArray3DTestInput.mha} + -o + ${ITK_TEST_OUTPUT_DIR}/ScanConvertPhasedArray3DTestOutput.mha + --azimuth-angular-separation + 0.0872665 + --elevation-angular-separation + 0.0174533 + --radius-sample-size + 0.2 + --first-sample-distance + 8.0 + # --interpolation-type linear # linear is the default + ) - itk_python_add_test(NAME PythonPhasedArray3DResampleSincTest + itk_python_add_test( + NAME + PythonPhasedArray3DResampleSincTest TEST_DRIVER_ARGS - --compareIntensityTolerance 1 + --compareIntensityTolerance + 1 --compare - DATA{Baseline/ScanConvertPhasedArray3DITKWindowedSincTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/ScanConvertPhasedArray3DITKWindowedSincTestOutput.mha - COMMAND PhasedArray3DResampleTest.py - -i DATA{${test_input_dir}/ScanConvertPhasedArray3DTestInput.mha} - -o ${ITK_TEST_OUTPUT_DIR}/ScanConvertPhasedArray3DITKWindowedSincTestOutput.mha - --azimuth-angular-separation 0.0872665 - --elevation-angular-separation 0.0174533 - --radius-sample-size 0.2 - --first-sample-distance 8.0 - --interpolation-type sinc - ) + DATA{Baseline/ScanConvertPhasedArray3DITKWindowedSincTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/ScanConvertPhasedArray3DITKWindowedSincTestOutput.mha + COMMAND + PhasedArray3DResampleTest.py + -i + DATA{${test_input_dir}/ScanConvertPhasedArray3DTestInput.mha} + -o + ${ITK_TEST_OUTPUT_DIR}/ScanConvertPhasedArray3DITKWindowedSincTestOutput.mha + --azimuth-angular-separation + 0.0872665 + --elevation-angular-separation + 0.0174533 + --radius-sample-size + 0.2 + --first-sample-distance + 8.0 + --interpolation-type + sinc) endif() diff --git a/Modules/Filtering/ImageIntensity/itk-module.cmake b/Modules/Filtering/ImageIntensity/itk-module.cmake index c340fcb9ea3..e244bdfd3ee 100644 --- a/Modules/Filtering/ImageIntensity/itk-module.cmake +++ b/Modules/Filtering/ImageIntensity/itk-module.cmake @@ -1,24 +1,25 @@ -set(DOCUMENTATION "This module contains filters that perform pixel-wise +set(DOCUMENTATION + "This module contains filters that perform pixel-wise operations on the intensities of images. In particular you will find here filters that compute trigonometric operations on pixel values, intensity rescaling, exponentials, conversions between complex and reals, and filters that combine multiple images into images of multiple components, as well as filters that compute single scalar images from images of multiple components.") -itk_module(ITKImageIntensity +itk_module( + ITKImageIntensity ENABLE_SHARED COMPILE_DEPENDS - ITKImageAdaptors - ITKImageStatistics - ITKImageGrid - ITKPath + ITKImageAdaptors + ITKImageStatistics + ITKImageGrid + ITKPath TEST_DEPENDS - ITKTestKernel - ITKDistanceMap - ITKGoogleTest + ITKTestKernel + ITKDistanceMap + ITKGoogleTest DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") # Extra dependency of ITKSpatialObjects is introduced by itkPolylineMaskImageFilterTest. # Extra dependency of ITKSpatialObjects is introduced by itkModulusImageFilterTest. diff --git a/Modules/Filtering/ImageIntensity/src/CMakeLists.txt b/Modules/Filtering/ImageIntensity/src/CMakeLists.txt index ce5457abb74..1e049e5b751 100644 --- a/Modules/Filtering/ImageIntensity/src/CMakeLists.txt +++ b/Modules/Filtering/ImageIntensity/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKImageIntensity_SRCS - itkSymmetricEigenAnalysisImageFilter.cxx - ) +set(ITKImageIntensity_SRCS itkSymmetricEigenAnalysisImageFilter.cxx) ### generating libraries itk_module_add_library(ITKImageIntensity ${ITKImageIntensity_SRCS}) diff --git a/Modules/Filtering/ImageIntensity/test/CMakeLists.txt b/Modules/Filtering/ImageIntensity/test/CMakeLists.txt index f011ede5c1d..7040b1eee96 100644 --- a/Modules/Filtering/ImageIntensity/test/CMakeLists.txt +++ b/Modules/Filtering/ImageIntensity/test/CMakeLists.txt @@ -1,87 +1,86 @@ itk_module_test() set(ITKImageIntensityTests -itkBoundedReciprocalImageFilterTest.cxx -itkCosImageFilterAndAdaptorTest.cxx -itkExpImageFilterAndAdaptorTest.cxx -itkVectorRescaleIntensityImageFilterTest.cxx -itkTernaryMagnitudeSquaredImageFilterTest.cxx -itkTernaryOperatorImageFilterTest.cxx -itkMinimumImageFilterTest.cxx -itkLog10ImageFilterAndAdaptorTest.cxx -itkVectorIndexSelectionCastImageFilterTest.cxx -itkInvertIntensityImageFilterTest.cxx -itkSymmetricEigenAnalysisImageFilterTest.cxx -itkEdgePotentialImageFilterTest.cxx -itkComplexToModulusFilterAndAdaptorTest.cxx -itkAddImageAdaptorTest.cxx -itkAndImageFilterTest.cxx -itkAdaptImageFilterTest2.cxx -itkLogImageFilterAndAdaptorTest.cxx -itkNotImageFilterTest.cxx -itkImageAdaptorNthElementTest.cxx -itkConstrainedValueAdditionImageFilterTest.cxx -itkAtanImageFilterAndAdaptorTest.cxx -itkMaskNegatedImageFilterTest.cxx -itkAddImageFilterTest.cxx -itkAddImageFilterTest2.cxx -itkAddImageFilterFrameTest.cxx -itkPowImageFilterTest.cxx -itkMultiplyImageFilterTest.cxx -itkWeightedAddImageFilterTest.cxx -itkRescaleIntensityImageFilterTest.cxx -itkNormalizeImageFilterTest.cxx -itkNaryAddImageFilterTest.cxx -itkShiftScaleImageFilterTest.cxx -itkComplexToPhaseFilterAndAdaptorTest.cxx -itkIntensityWindowingImageFilterTest.cxx -itkTernaryMagnitudeImageFilterTest.cxx -itkAbsImageFilterAndAdaptorTest.cxx -itkMaximumImageFilterTest.cxx -itkBinaryMagnitudeImageFilterTest.cxx -itkMatrixIndexSelectionImageFilterTest.cxx -itkSquareImageFilterTest.cxx -itkRGBToVectorAdaptImageFilterTest.cxx -itkComplexToRealFilterAndAdaptorTest.cxx -itkNaryMaximumImageFilterTest.cxx -itkAtan2ImageFilterTest.cxx -itkSqrtImageFilterAndAdaptorTest.cxx -itkAsinImageFilterAndAdaptorTest.cxx -itkMaskImageFilterTest.cxx -itkHistogramMatchingImageFilterTest.cxx -itkAcosImageFilterAndAdaptorTest.cxx -itkExpNegativeImageFilterAndAdaptorTest.cxx -itkTanImageFilterAndAdaptorTest.cxx -itkSigmoidImageFilterTest.cxx -itkDivideImageFilterTest.cxx -itkDivideImageFilterTest2.cxx -itkDivideOrZeroOutImageFilterTest.cxx -itkAdaptImageFilterTest.cxx -itkOrImageFilterTest.cxx -itkRGBToLuminanceImageFilterAndAdaptorTest.cxx -itkXorImageFilterTest.cxx -itkSubtractImageFilterTest.cxx -itkComplexToImaginaryFilterAndAdaptorTest.cxx -itkVectorToRGBImageAdaptorTest.cxx -itkSinImageFilterAndAdaptorTest.cxx -itkPolylineMask2DImageFilterTest.cxx -itkPolylineMaskImageFilterTest.cxx -itkPromoteDimensionImageTest.cxx -itkModulusImageFilterTest.cxx -itkVectorMagnitudeImageFilterTest.cxx -itkNormalizeToConstantImageFilterTest.cxx -itkEqualTest.cxx -itkNotEqualTest.cxx -itkGreaterEqualTest.cxx -itkGreaterTest.cxx -itkLessEqualTest.cxx -itkLessTest.cxx -itkClampImageFilterTest.cxx -itkNthElementPixelAccessorTest2.cxx -itkMagnitudeAndPhaseToComplexImageFilterTest.cxx -itkRoundImageFilterTest.cxx -) + itkBoundedReciprocalImageFilterTest.cxx + itkCosImageFilterAndAdaptorTest.cxx + itkExpImageFilterAndAdaptorTest.cxx + itkVectorRescaleIntensityImageFilterTest.cxx + itkTernaryMagnitudeSquaredImageFilterTest.cxx + itkTernaryOperatorImageFilterTest.cxx + itkMinimumImageFilterTest.cxx + itkLog10ImageFilterAndAdaptorTest.cxx + itkVectorIndexSelectionCastImageFilterTest.cxx + itkInvertIntensityImageFilterTest.cxx + itkSymmetricEigenAnalysisImageFilterTest.cxx + itkEdgePotentialImageFilterTest.cxx + itkComplexToModulusFilterAndAdaptorTest.cxx + itkAddImageAdaptorTest.cxx + itkAndImageFilterTest.cxx + itkAdaptImageFilterTest2.cxx + itkLogImageFilterAndAdaptorTest.cxx + itkNotImageFilterTest.cxx + itkImageAdaptorNthElementTest.cxx + itkConstrainedValueAdditionImageFilterTest.cxx + itkAtanImageFilterAndAdaptorTest.cxx + itkMaskNegatedImageFilterTest.cxx + itkAddImageFilterTest.cxx + itkAddImageFilterTest2.cxx + itkAddImageFilterFrameTest.cxx + itkPowImageFilterTest.cxx + itkMultiplyImageFilterTest.cxx + itkWeightedAddImageFilterTest.cxx + itkRescaleIntensityImageFilterTest.cxx + itkNormalizeImageFilterTest.cxx + itkNaryAddImageFilterTest.cxx + itkShiftScaleImageFilterTest.cxx + itkComplexToPhaseFilterAndAdaptorTest.cxx + itkIntensityWindowingImageFilterTest.cxx + itkTernaryMagnitudeImageFilterTest.cxx + itkAbsImageFilterAndAdaptorTest.cxx + itkMaximumImageFilterTest.cxx + itkBinaryMagnitudeImageFilterTest.cxx + itkMatrixIndexSelectionImageFilterTest.cxx + itkSquareImageFilterTest.cxx + itkRGBToVectorAdaptImageFilterTest.cxx + itkComplexToRealFilterAndAdaptorTest.cxx + itkNaryMaximumImageFilterTest.cxx + itkAtan2ImageFilterTest.cxx + itkSqrtImageFilterAndAdaptorTest.cxx + itkAsinImageFilterAndAdaptorTest.cxx + itkMaskImageFilterTest.cxx + itkHistogramMatchingImageFilterTest.cxx + itkAcosImageFilterAndAdaptorTest.cxx + itkExpNegativeImageFilterAndAdaptorTest.cxx + itkTanImageFilterAndAdaptorTest.cxx + itkSigmoidImageFilterTest.cxx + itkDivideImageFilterTest.cxx + itkDivideImageFilterTest2.cxx + itkDivideOrZeroOutImageFilterTest.cxx + itkAdaptImageFilterTest.cxx + itkOrImageFilterTest.cxx + itkRGBToLuminanceImageFilterAndAdaptorTest.cxx + itkXorImageFilterTest.cxx + itkSubtractImageFilterTest.cxx + itkComplexToImaginaryFilterAndAdaptorTest.cxx + itkVectorToRGBImageAdaptorTest.cxx + itkSinImageFilterAndAdaptorTest.cxx + itkPolylineMask2DImageFilterTest.cxx + itkPolylineMaskImageFilterTest.cxx + itkPromoteDimensionImageTest.cxx + itkModulusImageFilterTest.cxx + itkVectorMagnitudeImageFilterTest.cxx + itkNormalizeToConstantImageFilterTest.cxx + itkEqualTest.cxx + itkNotEqualTest.cxx + itkGreaterEqualTest.cxx + itkGreaterTest.cxx + itkLessEqualTest.cxx + itkLessTest.cxx + itkClampImageFilterTest.cxx + itkNthElementPixelAccessorTest2.cxx + itkMagnitudeAndPhaseToComplexImageFilterTest.cxx + itkRoundImageFilterTest.cxx) -if (NOT ITK_LEGACY_REMOVE) +if(NOT ITK_LEGACY_REMOVE) list(APPEND ITKImageIntensityTests itkVectorExpandImageFilterTest.cxx) endif() @@ -90,278 +89,634 @@ endif() # command line after any other optimization flag (including those from # CMAKE_CXX_FLAGS) which means that on gcc, MSVC, and the Intel # compiler, it will override any other optimization flag. -if (DEFINED ITK_CXX_DISABLE_OPTIMIZATION_FLAG) - set_source_files_properties( - itkClampImageFilterTest.cxx - PROPERTIES COMPILE_FLAGS ${ITK_CXX_DISABLE_OPTIMIZATION_FLAG} - ) +if(DEFINED ITK_CXX_DISABLE_OPTIMIZATION_FLAG) + set_source_files_properties(itkClampImageFilterTest.cxx PROPERTIES COMPILE_FLAGS ${ITK_CXX_DISABLE_OPTIMIZATION_FLAG}) endif() -CreateTestDriver(ITKImageIntensity "${ITKImageIntensity-Test_LIBRARIES}" "${ITKImageIntensityTests}") +createtestdriver(ITKImageIntensity "${ITKImageIntensity-Test_LIBRARIES}" "${ITKImageIntensityTests}") set(TEMP ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkBoundedReciprocalImageFilterTest - COMMAND ITKImageIntensityTestDriver itkBoundedReciprocalImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Gourds.png}) -itk_add_test(NAME itkCosImageFilterAndAdaptorTest - COMMAND ITKImageIntensityTestDriver itkCosImageFilterAndAdaptorTest) -itk_add_test(NAME itkVectorRescaleIntensityImageFilterTest - COMMAND ITKImageIntensityTestDriver itkVectorRescaleIntensityImageFilterTest) -itk_add_test(NAME itkTernaryMagnitudeSquaredImageFilterTest - COMMAND ITKImageIntensityTestDriver itkTernaryMagnitudeSquaredImageFilterTest) -itk_add_test(NAME itkTernaryOperatorImageFilterTest - COMMAND ITKImageIntensityTestDriver itkTernaryOperatorImageFilterTest) -itk_add_test(NAME itkMinimumImageFilterTest - COMMAND ITKImageIntensityTestDriver itkMinimumImageFilterTest) -itk_add_test(NAME itkLog10ImageFilterAndAdaptorTest - COMMAND ITKImageIntensityTestDriver itkLog10ImageFilterAndAdaptorTest) -itk_add_test(NAME itkVectorIndexSelectionCastImageFilterTest1 - COMMAND ITKImageIntensityTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkVectorIndexSelectionCastImageFilterTest1.mha} - ${ITK_TEST_OUTPUT_DIR}/itkVectorIndexSelectionCastImageFilterTest1.mha - itkVectorIndexSelectionCastImageFilterTest DATA{${ITK_DATA_ROOT}/Input/RGBTestImage.tif} ${ITK_TEST_OUTPUT_DIR}/itkVectorIndexSelectionCastImageFilterTest1.mha 0) -itk_add_test(NAME itkVectorIndexSelectionCastImageFilterTest2 - COMMAND ITKImageIntensityTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkVectorIndexSelectionCastImageFilterTest2.mha} - ${ITK_TEST_OUTPUT_DIR}/itkVectorIndexSelectionCastImageFilterTest2.mha - itkVectorIndexSelectionCastImageFilterTest DATA{${ITK_DATA_ROOT}/Input/RGBTestImage.tif} ${ITK_TEST_OUTPUT_DIR}/itkVectorIndexSelectionCastImageFilterTest2.mha 1) -itk_add_test(NAME itkVectorIndexSelectionCastImageFilterTest3 - COMMAND ITKImageIntensityTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkVectorIndexSelectionCastImageFilterTest3.mha} - ${ITK_TEST_OUTPUT_DIR}/itkVectorIndexSelectionCastImageFilterTest3.mha - itkVectorIndexSelectionCastImageFilterTest DATA{${ITK_DATA_ROOT}/Input/RGBTestImage.tif} ${ITK_TEST_OUTPUT_DIR}/itkVectorIndexSelectionCastImageFilterTest3.mha 2) -itk_add_test(NAME itkInvertIntensityImageFilterTest - COMMAND ITKImageIntensityTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/InvertIntensityImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/InvertIntensityImageFilterTest.png - itkInvertIntensityImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/InvertIntensityImageFilterTest.png) -itk_add_test(NAME itkSymmetricEigenAnalysisImageFilterTestOrderByValue - COMMAND ITKImageIntensityTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisImageFilterTestOrderByValue.png - 8e3e4221d36144133d2f6692b2ad980b - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisFixedDimensionImageFilterTestOrderByValue.png - 8e3e4221d36144133d2f6692b2ad980b - itkSymmetricEigenAnalysisImageFilterTest - ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisImageFilterTestOrderByValue.png - 1 - ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisFixedDimensionImageFilterTestOrderByValue.png) -itk_add_test(NAME itkSymmetricEigenAnalysisImageFilterTestOrderByMagnitude - COMMAND ITKImageIntensityTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisImageFilterTestOrderByMagnitude.png - 8e3e4221d36144133d2f6692b2ad980b - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisFixedDimensionImageFilterTestOrderByMagnitude.png - 8e3e4221d36144133d2f6692b2ad980b - itkSymmetricEigenAnalysisImageFilterTest - ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisImageFilterTestOrderByMagnitude.png - 2 - ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisFixedDimensionImageFilterTestOrderByMagnitude.png - ) - # FixedDimension (with Eigen3) orders by value by default. -itk_add_test(NAME itkSymmetricEigenAnalysisImageFilterTestDoNotOrder - COMMAND ITKImageIntensityTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisImageFilterTestDoNotOrder.png - 8e3e4221d36144133d2f6692b2ad980b - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisFixedDimensionImageFilterTestDoNotOrder.png - 8e3e4221d36144133d2f6692b2ad980b - itkSymmetricEigenAnalysisImageFilterTest - ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisImageFilterTestDoNotOrder.png - 3 - ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisFixedDimensionImageFilterTestDoNotOrder.png - ) -itk_add_test(NAME itkEdgePotentialImageFilterTest - COMMAND ITKImageIntensityTestDriver itkEdgePotentialImageFilterTest) -itk_add_test(NAME itkComplexToModulusFilterAndAdaptorTest - COMMAND ITKImageIntensityTestDriver itkComplexToModulusFilterAndAdaptorTest) -itk_add_test(NAME itkAddImageAdaptorTest - COMMAND ITKImageIntensityTestDriver itkAddImageAdaptorTest) -itk_add_test(NAME itkAndImageFilterTest - COMMAND ITKImageIntensityTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkAndImageFilterTest.png - 93d46ee3d5e0c157e2b2d27977ae4d0f - itkAndImageFilterTest ${ITK_TEST_OUTPUT_DIR}/itkAndImageFilterTest.png) -itk_add_test(NAME itkAdaptImageFilterTest2 - COMMAND ITKImageIntensityTestDriver itkAdaptImageFilterTest2) -itk_add_test(NAME itkLogImageFilterAndAdaptorTest - COMMAND ITKImageIntensityTestDriver itkLogImageFilterAndAdaptorTest) -itk_add_test(NAME itkNotImageFilterTest - COMMAND ITKImageIntensityTestDriver itkNotImageFilterTest) -itk_add_test(NAME itkImageAdaptorNthElementTest - COMMAND ITKImageIntensityTestDriver itkImageAdaptorNthElementTest) -itk_add_test(NAME itkConstrainedValueAdditionImageFilterTest - COMMAND ITKImageIntensityTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkConstrainedValueAdditionImageFilterTest.png - 6ef609d089e93e2eed8f089f75bc67fb - itkConstrainedValueAdditionImageFilterTest ${ITK_TEST_OUTPUT_DIR}/itkConstrainedValueAdditionImageFilterTest.png) -itk_add_test(NAME itkAtanImageFilterAndAdaptorTest - COMMAND ITKImageIntensityTestDriver itkAtanImageFilterAndAdaptorTest) -itk_add_test(NAME itkMaskNegatedImageFilterTest - COMMAND ITKImageIntensityTestDriver itkMaskNegatedImageFilterTest) -itk_add_test(NAME itkAddImageFilterTest - COMMAND ITKImageIntensityTestDriver itkAddImageFilterTest) -itk_add_test(NAME itkAddImageFilterTest2 - COMMAND ITKImageIntensityTestDriver itkAddImageFilterTest2 - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} ${TEMP}/itkAddImageFilterTest2.mha) -itk_add_test(NAME itkAddImageFilterFrameTest - COMMAND ITKImageIntensityTestDriver itkAddImageFilterFrameTest) -itk_add_test(NAME itkPowImageFilterTest - COMMAND ITKImageIntensityTestDriver itkPowImageFilterTest) -itk_add_test(NAME itkMultiplyImageFilterTest - COMMAND ITKImageIntensityTestDriver itkMultiplyImageFilterTest) -itk_add_test(NAME itkWeightedAddImageFilterTest - COMMAND ITKImageIntensityTestDriver itkWeightedAddImageFilterTest 0.4) -itk_add_test(NAME itkRescaleIntensityImageFilterTest - COMMAND ITKImageIntensityTestDriver itkRescaleIntensityImageFilterTest) +itk_add_test( + NAME + itkBoundedReciprocalImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkBoundedReciprocalImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Gourds.png}) +itk_add_test( + NAME + itkCosImageFilterAndAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkCosImageFilterAndAdaptorTest) +itk_add_test( + NAME + itkVectorRescaleIntensityImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkVectorRescaleIntensityImageFilterTest) +itk_add_test( + NAME + itkTernaryMagnitudeSquaredImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkTernaryMagnitudeSquaredImageFilterTest) +itk_add_test( + NAME + itkTernaryOperatorImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkTernaryOperatorImageFilterTest) +itk_add_test( + NAME + itkMinimumImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkMinimumImageFilterTest) +itk_add_test( + NAME + itkLog10ImageFilterAndAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkLog10ImageFilterAndAdaptorTest) +itk_add_test( + NAME + itkVectorIndexSelectionCastImageFilterTest1 + COMMAND + ITKImageIntensityTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkVectorIndexSelectionCastImageFilterTest1.mha} + ${ITK_TEST_OUTPUT_DIR}/itkVectorIndexSelectionCastImageFilterTest1.mha + itkVectorIndexSelectionCastImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/RGBTestImage.tif} + ${ITK_TEST_OUTPUT_DIR}/itkVectorIndexSelectionCastImageFilterTest1.mha + 0) +itk_add_test( + NAME + itkVectorIndexSelectionCastImageFilterTest2 + COMMAND + ITKImageIntensityTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkVectorIndexSelectionCastImageFilterTest2.mha} + ${ITK_TEST_OUTPUT_DIR}/itkVectorIndexSelectionCastImageFilterTest2.mha + itkVectorIndexSelectionCastImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/RGBTestImage.tif} + ${ITK_TEST_OUTPUT_DIR}/itkVectorIndexSelectionCastImageFilterTest2.mha + 1) +itk_add_test( + NAME + itkVectorIndexSelectionCastImageFilterTest3 + COMMAND + ITKImageIntensityTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkVectorIndexSelectionCastImageFilterTest3.mha} + ${ITK_TEST_OUTPUT_DIR}/itkVectorIndexSelectionCastImageFilterTest3.mha + itkVectorIndexSelectionCastImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/RGBTestImage.tif} + ${ITK_TEST_OUTPUT_DIR}/itkVectorIndexSelectionCastImageFilterTest3.mha + 2) +itk_add_test( + NAME + itkInvertIntensityImageFilterTest + COMMAND + ITKImageIntensityTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/InvertIntensityImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/InvertIntensityImageFilterTest.png + itkInvertIntensityImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/InvertIntensityImageFilterTest.png) +itk_add_test( + NAME + itkSymmetricEigenAnalysisImageFilterTestOrderByValue + COMMAND + ITKImageIntensityTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisImageFilterTestOrderByValue.png + 8e3e4221d36144133d2f6692b2ad980b + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisFixedDimensionImageFilterTestOrderByValue.png + 8e3e4221d36144133d2f6692b2ad980b + itkSymmetricEigenAnalysisImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisImageFilterTestOrderByValue.png + 1 + ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisFixedDimensionImageFilterTestOrderByValue.png) +itk_add_test( + NAME + itkSymmetricEigenAnalysisImageFilterTestOrderByMagnitude + COMMAND + ITKImageIntensityTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisImageFilterTestOrderByMagnitude.png + 8e3e4221d36144133d2f6692b2ad980b + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisFixedDimensionImageFilterTestOrderByMagnitude.png + 8e3e4221d36144133d2f6692b2ad980b + itkSymmetricEigenAnalysisImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisImageFilterTestOrderByMagnitude.png + 2 + ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisFixedDimensionImageFilterTestOrderByMagnitude.png) +# FixedDimension (with Eigen3) orders by value by default. +itk_add_test( + NAME + itkSymmetricEigenAnalysisImageFilterTestDoNotOrder + COMMAND + ITKImageIntensityTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisImageFilterTestDoNotOrder.png + 8e3e4221d36144133d2f6692b2ad980b + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisFixedDimensionImageFilterTestDoNotOrder.png + 8e3e4221d36144133d2f6692b2ad980b + itkSymmetricEigenAnalysisImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisImageFilterTestDoNotOrder.png + 3 + ${ITK_TEST_OUTPUT_DIR}/itkSymmetricEigenAnalysisFixedDimensionImageFilterTestDoNotOrder.png) +itk_add_test( + NAME + itkEdgePotentialImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkEdgePotentialImageFilterTest) +itk_add_test( + NAME + itkComplexToModulusFilterAndAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkComplexToModulusFilterAndAdaptorTest) +itk_add_test( + NAME + itkAddImageAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkAddImageAdaptorTest) +itk_add_test( + NAME + itkAndImageFilterTest + COMMAND + ITKImageIntensityTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkAndImageFilterTest.png + 93d46ee3d5e0c157e2b2d27977ae4d0f + itkAndImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkAndImageFilterTest.png) +itk_add_test( + NAME + itkAdaptImageFilterTest2 + COMMAND + ITKImageIntensityTestDriver + itkAdaptImageFilterTest2) +itk_add_test( + NAME + itkLogImageFilterAndAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkLogImageFilterAndAdaptorTest) +itk_add_test( + NAME + itkNotImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkNotImageFilterTest) +itk_add_test( + NAME + itkImageAdaptorNthElementTest + COMMAND + ITKImageIntensityTestDriver + itkImageAdaptorNthElementTest) +itk_add_test( + NAME + itkConstrainedValueAdditionImageFilterTest + COMMAND + ITKImageIntensityTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkConstrainedValueAdditionImageFilterTest.png + 6ef609d089e93e2eed8f089f75bc67fb + itkConstrainedValueAdditionImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkConstrainedValueAdditionImageFilterTest.png) +itk_add_test( + NAME + itkAtanImageFilterAndAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkAtanImageFilterAndAdaptorTest) +itk_add_test( + NAME + itkMaskNegatedImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkMaskNegatedImageFilterTest) +itk_add_test( + NAME + itkAddImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkAddImageFilterTest) +itk_add_test( + NAME + itkAddImageFilterTest2 + COMMAND + ITKImageIntensityTestDriver + itkAddImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${TEMP}/itkAddImageFilterTest2.mha) +itk_add_test( + NAME + itkAddImageFilterFrameTest + COMMAND + ITKImageIntensityTestDriver + itkAddImageFilterFrameTest) +itk_add_test( + NAME + itkPowImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkPowImageFilterTest) +itk_add_test( + NAME + itkMultiplyImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkMultiplyImageFilterTest) +itk_add_test( + NAME + itkWeightedAddImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkWeightedAddImageFilterTest + 0.4) +itk_add_test( + NAME + itkRescaleIntensityImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkRescaleIntensityImageFilterTest) -itk_add_test(NAME itkNormalizeImageFilterTest - COMMAND ITKImageIntensityTestDriver --redirectOutput ${TEMP}/itkNormalizeImageFilterTest.txt - itkNormalizeImageFilterTest) -set_tests_properties(itkNormalizeImageFilterTest PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkNormalizeImageFilterTest.txt) +itk_add_test( + NAME + itkNormalizeImageFilterTest + COMMAND + ITKImageIntensityTestDriver + --redirectOutput + ${TEMP}/itkNormalizeImageFilterTest.txt + itkNormalizeImageFilterTest) +set_tests_properties(itkNormalizeImageFilterTest PROPERTIES ATTACHED_FILES_ON_FAIL + ${TEMP}/itkNormalizeImageFilterTest.txt) -itk_add_test(NAME itkNaryAddImageFilterTest - COMMAND ITKImageIntensityTestDriver itkNaryAddImageFilterTest) -itk_add_test(NAME itkShiftScaleImageFilterTest - COMMAND ITKImageIntensityTestDriver itkShiftScaleImageFilterTest) -itk_add_test(NAME itkComplexToPhaseFilterAndAdaptorTest - COMMAND ITKImageIntensityTestDriver itkComplexToPhaseFilterAndAdaptorTest) -itk_add_test(NAME itkIntensityWindowingImageFilterTest - COMMAND ITKImageIntensityTestDriver itkIntensityWindowingImageFilterTest) -itk_add_test(NAME itkTernaryMagnitudeImageFilterTest - COMMAND ITKImageIntensityTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkTernaryMagnitudeImageFilterTest.png - 7f199e1363c4b754eb03cf4d0ba8d343 - itkTernaryMagnitudeImageFilterTest ${ITK_TEST_OUTPUT_DIR}/itkTernaryMagnitudeImageFilterTest.png) -itk_add_test(NAME itkAbsImageFilterAndAdaptorTest - COMMAND ITKImageIntensityTestDriver itkAbsImageFilterAndAdaptorTest) -itk_add_test(NAME itkMaximumImageFilterTest - COMMAND ITKImageIntensityTestDriver itkMaximumImageFilterTest) -itk_add_test(NAME itkBinaryMagnitudeImageFilterTest - COMMAND ITKImageIntensityTestDriver itkBinaryMagnitudeImageFilterTest) -itk_add_test(NAME itkMatrixIndexSelectionImageFilterTest - COMMAND ITKImageIntensityTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/MatrixIndexSelectionImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/MatrixIndexSelectionImageFilterTest.png - itkMatrixIndexSelectionImageFilterTest ${ITK_TEST_OUTPUT_DIR}/MatrixIndexSelectionImageFilterTest.png) -itk_add_test(NAME itkSquareImageFilterTest - COMMAND ITKImageIntensityTestDriver itkSquareImageFilterTest) -itk_add_test(NAME itkRGBToVectorAdaptImageFilterTest.cxx - COMMAND ITKImageIntensityTestDriver itkRGBToVectorAdaptImageFilterTest) -itk_add_test(NAME itkComplexToRealFilterAndAdaptorTest - COMMAND ITKImageIntensityTestDriver itkComplexToRealFilterAndAdaptorTest) -itk_add_test(NAME itkNaryMaximumImageFilterTest - COMMAND ITKImageIntensityTestDriver itkNaryMaximumImageFilterTest) -itk_add_test(NAME itkAtan2ImageFilterTest - COMMAND ITKImageIntensityTestDriver itkAtan2ImageFilterTest) -itk_add_test(NAME itkSqrtImageFilterAndAdaptorTest - COMMAND ITKImageIntensityTestDriver itkSqrtImageFilterAndAdaptorTest) -itk_add_test(NAME itkAsinImageFilterAndAdaptorTest - COMMAND ITKImageIntensityTestDriver itkAsinImageFilterAndAdaptorTest) -itk_add_test(NAME itkMaskImageFilterTest - COMMAND ITKImageIntensityTestDriver itkMaskImageFilterTest) -itk_add_test(NAME itkHistogramMatchingImageFilterTest - COMMAND ITKImageIntensityTestDriver itkHistogramMatchingImageFilterTest) -itk_add_test(NAME itkAcosImageFilterAndAdaptorTest - COMMAND ITKImageIntensityTestDriver itkAcosImageFilterAndAdaptorTest) -itk_add_test(NAME itkExpNegativeImageFilterAndAdaptorTest - COMMAND ITKImageIntensityTestDriver itkExpNegativeImageFilterAndAdaptorTest) -itk_add_test(NAME itkExpImageFilterAndAdaptorTest - COMMAND ITKImageIntensityTestDriver itkExpImageFilterAndAdaptorTest) -itk_add_test(NAME itkTanImageFilterAndAdaptorTest - COMMAND ITKImageIntensityTestDriver itkTanImageFilterAndAdaptorTest) -itk_add_test(NAME itkSigmoidImageFilterTest - COMMAND ITKImageIntensityTestDriver itkSigmoidImageFilterTest) -itk_add_test(NAME itkDivideImageFilterTest - COMMAND ITKImageIntensityTestDriver itkDivideImageFilterTest) -itk_add_test(NAME itkDivideImageFilterTest2 - COMMAND ITKImageIntensityTestDriver itkDivideImageFilterTest2) -itk_add_test(NAME itkDivideOrZeroOutImageFilterTest - COMMAND ITKImageIntensityTestDriver itkDivideOrZeroOutImageFilterTest) -if (NOT ITK_LEGACY_REMOVE) - itk_add_test(NAME itkVectorExpandImageFilterTest - COMMAND ITKImageIntensityTestDriver itkVectorExpandImageFilterTest) +itk_add_test( + NAME + itkNaryAddImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkNaryAddImageFilterTest) +itk_add_test( + NAME + itkShiftScaleImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkShiftScaleImageFilterTest) +itk_add_test( + NAME + itkComplexToPhaseFilterAndAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkComplexToPhaseFilterAndAdaptorTest) +itk_add_test( + NAME + itkIntensityWindowingImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkIntensityWindowingImageFilterTest) +itk_add_test( + NAME + itkTernaryMagnitudeImageFilterTest + COMMAND + ITKImageIntensityTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkTernaryMagnitudeImageFilterTest.png + 7f199e1363c4b754eb03cf4d0ba8d343 + itkTernaryMagnitudeImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkTernaryMagnitudeImageFilterTest.png) +itk_add_test( + NAME + itkAbsImageFilterAndAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkAbsImageFilterAndAdaptorTest) +itk_add_test( + NAME + itkMaximumImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkMaximumImageFilterTest) +itk_add_test( + NAME + itkBinaryMagnitudeImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkBinaryMagnitudeImageFilterTest) +itk_add_test( + NAME + itkMatrixIndexSelectionImageFilterTest + COMMAND + ITKImageIntensityTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/MatrixIndexSelectionImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/MatrixIndexSelectionImageFilterTest.png + itkMatrixIndexSelectionImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/MatrixIndexSelectionImageFilterTest.png) +itk_add_test( + NAME + itkSquareImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkSquareImageFilterTest) +itk_add_test( + NAME + itkRGBToVectorAdaptImageFilterTest.cxx + COMMAND + ITKImageIntensityTestDriver + itkRGBToVectorAdaptImageFilterTest) +itk_add_test( + NAME + itkComplexToRealFilterAndAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkComplexToRealFilterAndAdaptorTest) +itk_add_test( + NAME + itkNaryMaximumImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkNaryMaximumImageFilterTest) +itk_add_test( + NAME + itkAtan2ImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkAtan2ImageFilterTest) +itk_add_test( + NAME + itkSqrtImageFilterAndAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkSqrtImageFilterAndAdaptorTest) +itk_add_test( + NAME + itkAsinImageFilterAndAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkAsinImageFilterAndAdaptorTest) +itk_add_test( + NAME + itkMaskImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkMaskImageFilterTest) +itk_add_test( + NAME + itkHistogramMatchingImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkHistogramMatchingImageFilterTest) +itk_add_test( + NAME + itkAcosImageFilterAndAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkAcosImageFilterAndAdaptorTest) +itk_add_test( + NAME + itkExpNegativeImageFilterAndAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkExpNegativeImageFilterAndAdaptorTest) +itk_add_test( + NAME + itkExpImageFilterAndAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkExpImageFilterAndAdaptorTest) +itk_add_test( + NAME + itkTanImageFilterAndAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkTanImageFilterAndAdaptorTest) +itk_add_test( + NAME + itkSigmoidImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkSigmoidImageFilterTest) +itk_add_test( + NAME + itkDivideImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkDivideImageFilterTest) +itk_add_test( + NAME + itkDivideImageFilterTest2 + COMMAND + ITKImageIntensityTestDriver + itkDivideImageFilterTest2) +itk_add_test( + NAME + itkDivideOrZeroOutImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkDivideOrZeroOutImageFilterTest) +if(NOT ITK_LEGACY_REMOVE) + itk_add_test( + NAME + itkVectorExpandImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkVectorExpandImageFilterTest) endif() -itk_add_test(NAME itkAdaptImageFilterTest - COMMAND ITKImageIntensityTestDriver itkAdaptImageFilterTest) -itk_add_test(NAME itkOrImageFilterTest - COMMAND ITKImageIntensityTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkOrImageFilterTest.png - 817d6d96c1c07cb12bfc200134aa57ba - itkOrImageFilterTest ${ITK_TEST_OUTPUT_DIR}/itkOrImageFilterTest.png) -itk_add_test(NAME itkRGBToLuminanceImageFilterAndAdaptorTest.cxx - COMMAND ITKImageIntensityTestDriver itkRGBToLuminanceImageFilterAndAdaptorTest) -itk_add_test(NAME itkXorImageFilterTest - COMMAND ITKImageIntensityTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkXorImageFilterTest.png - 3b5b9852567ef7618aac7f5f2d74ef74 - itkXorImageFilterTest ${ITK_TEST_OUTPUT_DIR}/itkXorImageFilterTest.png) -itk_add_test(NAME itkSubtractImageFilterTest - COMMAND ITKImageIntensityTestDriver itkSubtractImageFilterTest) -itk_add_test(NAME itkComplexToImaginaryFilterAndAdaptorTest - COMMAND ITKImageIntensityTestDriver itkComplexToImaginaryFilterAndAdaptorTest) -itk_add_test(NAME itkVectorToRGBImageAdaptorTest - COMMAND ITKImageIntensityTestDriver itkVectorToRGBImageAdaptorTest) -itk_add_test(NAME itkSinImageFilterAndAdaptorTest - COMMAND ITKImageIntensityTestDriver itkSinImageFilterAndAdaptorTest) -itk_add_test(NAME itkPolylineMask2DImageFilterTest - COMMAND ITKImageIntensityTestDriver itkPolylineMask2DImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkPolylineMask2DImageFilterTest.png) -itk_add_test(NAME itkPolylineMaskImageFilterTest - COMMAND ITKImageIntensityTestDriver - --compare DATA{Baseline/PolylineMaskImageFilterTest.mha} - ${ITK_TEST_OUTPUT_DIR}/PolylineMaskImageFilterTest.mha - itkPolylineMaskImageFilterTest ${ITK_TEST_OUTPUT_DIR}/PolylineMaskImageFilterTest.mha) -itk_add_test(NAME itkPromoteDimensionImageTest - COMMAND ITKImageIntensityTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/PromoteDimensionImageTest.mhd,PromoteDimensionImageTest.raw} - ${ITK_TEST_OUTPUT_DIR}/PromoteDimensionImageTest.mhd - itkPromoteDimensionImageTest DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} ${ITK_TEST_OUTPUT_DIR}/PromoteDimensionImageTest.mhd) -itk_add_test(NAME itkModulusImageFilterTest - COMMAND ITKImageIntensityTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ModulusImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/ModulusImageFilterTest.png - itkModulusImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Spots.png} ${ITK_TEST_OUTPUT_DIR}/ModulusImageFilterTest.png) -itk_add_test(NAME itkVectorMagnitudeImageFilterTest - COMMAND ITKImageIntensityTestDriver itkVectorMagnitudeImageFilterTest) -itk_add_test(NAME itkNormalizeToConstantImageFilterTest - COMMAND ITKImageIntensityTestDriver itkNormalizeToConstantImageFilterTest) -itk_add_test(NAME itkEqualTest - COMMAND ITKImageIntensityTestDriver itkEqualTest) -itk_add_test(NAME itkNotEqualTest - COMMAND ITKImageIntensityTestDriver itkNotEqualTest) -itk_add_test(NAME itkGreaterEqualTest - COMMAND ITKImageIntensityTestDriver itkGreaterEqualTest) -itk_add_test(NAME itkGreaterTest - COMMAND ITKImageIntensityTestDriver itkGreaterTest) -itk_add_test(NAME itkLessEqualTest - COMMAND ITKImageIntensityTestDriver itkLessEqualTest) -itk_add_test(NAME itkLessTest - COMMAND ITKImageIntensityTestDriver itkLessTest) -itk_add_test(NAME itkClampImageFilterTest - COMMAND ITKImageIntensityTestDriver itkClampImageFilterTest) -itk_add_test(NAME itkNthElementPixelAccessorTest2 - COMMAND ITKImageIntensityTestDriver itkNthElementPixelAccessorTest2) -itk_add_test(NAME itkMagnitudeAndPhaseToComplexImageFilterTest - COMMAND ITKImageIntensityTestDriver - --compare - DATA{Baseline/itkMagnitudeAndPhaseToComplexImageFilterTestBaseline.mha} - ${ITK_TEST_OUTPUT_DIR}/itkMagnitudeAndPhaseToComplexImageFilterTest.mha - itkMagnitudeAndPhaseToComplexImageFilterTest - DATA{Input/itkBrainSliceComplexMagnitude.mha} - DATA{Input/itkBrainSliceComplexPhase.mha} - ${ITK_TEST_OUTPUT_DIR}/itkMagnitudeAndPhaseToComplexImageFilterTest.mha) -itk_add_test(NAME itkRoundImageFilterTest - COMMAND ITKImageIntensityTestDriver itkRoundImageFilterTest) +itk_add_test( + NAME + itkAdaptImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkAdaptImageFilterTest) +itk_add_test( + NAME + itkOrImageFilterTest + COMMAND + ITKImageIntensityTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkOrImageFilterTest.png + 817d6d96c1c07cb12bfc200134aa57ba + itkOrImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkOrImageFilterTest.png) +itk_add_test( + NAME + itkRGBToLuminanceImageFilterAndAdaptorTest.cxx + COMMAND + ITKImageIntensityTestDriver + itkRGBToLuminanceImageFilterAndAdaptorTest) +itk_add_test( + NAME + itkXorImageFilterTest + COMMAND + ITKImageIntensityTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkXorImageFilterTest.png + 3b5b9852567ef7618aac7f5f2d74ef74 + itkXorImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkXorImageFilterTest.png) +itk_add_test( + NAME + itkSubtractImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkSubtractImageFilterTest) +itk_add_test( + NAME + itkComplexToImaginaryFilterAndAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkComplexToImaginaryFilterAndAdaptorTest) +itk_add_test( + NAME + itkVectorToRGBImageAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkVectorToRGBImageAdaptorTest) +itk_add_test( + NAME + itkSinImageFilterAndAdaptorTest + COMMAND + ITKImageIntensityTestDriver + itkSinImageFilterAndAdaptorTest) +itk_add_test( + NAME + itkPolylineMask2DImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkPolylineMask2DImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkPolylineMask2DImageFilterTest.png) +itk_add_test( + NAME + itkPolylineMaskImageFilterTest + COMMAND + ITKImageIntensityTestDriver + --compare + DATA{Baseline/PolylineMaskImageFilterTest.mha} + ${ITK_TEST_OUTPUT_DIR}/PolylineMaskImageFilterTest.mha + itkPolylineMaskImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/PolylineMaskImageFilterTest.mha) +itk_add_test( + NAME + itkPromoteDimensionImageTest + COMMAND + ITKImageIntensityTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/PromoteDimensionImageTest.mhd,PromoteDimensionImageTest.raw} + ${ITK_TEST_OUTPUT_DIR}/PromoteDimensionImageTest.mhd + itkPromoteDimensionImageTest + DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} + ${ITK_TEST_OUTPUT_DIR}/PromoteDimensionImageTest.mhd) +itk_add_test( + NAME + itkModulusImageFilterTest + COMMAND + ITKImageIntensityTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ModulusImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/ModulusImageFilterTest.png + itkModulusImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Spots.png} + ${ITK_TEST_OUTPUT_DIR}/ModulusImageFilterTest.png) +itk_add_test( + NAME + itkVectorMagnitudeImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkVectorMagnitudeImageFilterTest) +itk_add_test( + NAME + itkNormalizeToConstantImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkNormalizeToConstantImageFilterTest) +itk_add_test( + NAME + itkEqualTest + COMMAND + ITKImageIntensityTestDriver + itkEqualTest) +itk_add_test( + NAME + itkNotEqualTest + COMMAND + ITKImageIntensityTestDriver + itkNotEqualTest) +itk_add_test( + NAME + itkGreaterEqualTest + COMMAND + ITKImageIntensityTestDriver + itkGreaterEqualTest) +itk_add_test( + NAME + itkGreaterTest + COMMAND + ITKImageIntensityTestDriver + itkGreaterTest) +itk_add_test( + NAME + itkLessEqualTest + COMMAND + ITKImageIntensityTestDriver + itkLessEqualTest) +itk_add_test( + NAME + itkLessTest + COMMAND + ITKImageIntensityTestDriver + itkLessTest) +itk_add_test( + NAME + itkClampImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkClampImageFilterTest) +itk_add_test( + NAME + itkNthElementPixelAccessorTest2 + COMMAND + ITKImageIntensityTestDriver + itkNthElementPixelAccessorTest2) +itk_add_test( + NAME + itkMagnitudeAndPhaseToComplexImageFilterTest + COMMAND + ITKImageIntensityTestDriver + --compare + DATA{Baseline/itkMagnitudeAndPhaseToComplexImageFilterTestBaseline.mha} + ${ITK_TEST_OUTPUT_DIR}/itkMagnitudeAndPhaseToComplexImageFilterTest.mha + itkMagnitudeAndPhaseToComplexImageFilterTest + DATA{Input/itkBrainSliceComplexMagnitude.mha} + DATA{Input/itkBrainSliceComplexPhase.mha} + ${ITK_TEST_OUTPUT_DIR}/itkMagnitudeAndPhaseToComplexImageFilterTest.mha) +itk_add_test( + NAME + itkRoundImageFilterTest + COMMAND + ITKImageIntensityTestDriver + itkRoundImageFilterTest) -set(ITKImageIntensityGTests - itkBitwiseOpsFunctorsTest.cxx - itkArithmeticOpsFunctorsTest.cxx -) +set(ITKImageIntensityGTests itkBitwiseOpsFunctorsTest.cxx itkArithmeticOpsFunctorsTest.cxx) if(MSVC) # disable false warning about floating division by zero # Floating division by zero is defined unlike integer division - set_source_files_properties( - itkArithmeticOpsFunctorsTest.cxx - PROPERTIES COMPILE_FLAGS -wd4723) + set_source_files_properties(itkArithmeticOpsFunctorsTest.cxx PROPERTIES COMPILE_FLAGS -wd4723) endif() -CreateGoogleTestDriver(ITKImageIntensity "${ITKImageIntensity-Test_LIBRARIES}" "${ITKImageIntensityGTests}") +creategoogletestdriver(ITKImageIntensity "${ITKImageIntensity-Test_LIBRARIES}" "${ITKImageIntensityGTests}") diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkAbsImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkAbsImageFilter.wrap index 7b671b63a70..73979a2a099 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkAbsImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkAbsImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::AbsImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkAcosImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkAcosImageFilter.wrap index 94a5ee95e08..1acc4fae140 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkAcosImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkAcosImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::AcosImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkAddImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkAddImageFilter.wrap index 2ea2f607be6..12a330c8bb0 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkAddImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkAddImageFilter.wrap @@ -1,4 +1,4 @@ itk_wrap_class("itk::AddImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) - itk_wrap_image_filter("${WRAP_ITK_COLOR}" 3) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) +itk_wrap_image_filter("${WRAP_ITK_COLOR}" 3) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkAndImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkAndImageFilter.wrap index 6486689af02..cfbe469a514 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkAndImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkAndImageFilter.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::AndImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 3) - itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 3) +itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 3) +itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 3) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkAsinImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkAsinImageFilter.wrap index 6857aa77cb6..d71f81751d9 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkAsinImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkAsinImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::AsinImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkAtan2ImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkAtan2ImageFilter.wrap index e51aefcc7d4..beb7766df8d 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkAtan2ImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkAtan2ImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::Atan2ImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 3) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 3) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkAtanImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkAtanImageFilter.wrap index e765df3df40..74c647ec262 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkAtanImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkAtanImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::AtanImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkBinaryMagnitudeImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkBinaryMagnitudeImageFilter.wrap index c2de6fa7919..5b3ca18c9d2 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkBinaryMagnitudeImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkBinaryMagnitudeImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BinaryMagnitudeImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkBoundedReciprocalImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkBoundedReciprocalImageFilter.wrap index 93067bbd853..f9606351cd5 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkBoundedReciprocalImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkBoundedReciprocalImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BoundedReciprocalImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkClampImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkClampImageFilter.wrap index 356e766ec31..57637231292 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkClampImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkClampImageFilter.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::ClampImageFilter" POINTER_WITH_SUPERCLASS) - # Create cast filters between all scalar types. Also force that cast-to-uchar - # filters are created for all scalar types. - UNIQUE(types "${WRAP_ITK_SCALAR};UC") - itk_wrap_image_filter_combinations("${types}" "${types}") +# Create cast filters between all scalar types. Also force that cast-to-uchar +# filters are created for all scalar types. +unique(types "${WRAP_ITK_SCALAR};UC") +itk_wrap_image_filter_combinations("${types}" "${types}") itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkComplexToImaginaryImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkComplexToImaginaryImageFilter.wrap index 754989d30e0..d6b34c7e641 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkComplexToImaginaryImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkComplexToImaginaryImageFilter.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::ComplexToImaginaryImageFilter" POINTER) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_image_filter_types(CF F) - endif() +if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_image_filter_types(CF F) +endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_image_filter_types(CD D) - endif() +if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_image_filter_types(CD D) +endif() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkComplexToModulusImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkComplexToModulusImageFilter.wrap index 974b88e74ce..1838f22caa6 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkComplexToModulusImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkComplexToModulusImageFilter.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::ComplexToModulusImageFilter" POINTER) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_image_filter_types(CF F) - endif() +if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_image_filter_types(CF F) +endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_image_filter_types(CD D) - endif() +if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_image_filter_types(CD D) +endif() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkComplexToPhaseImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkComplexToPhaseImageFilter.wrap index 832fda9181e..0a0e61b7a30 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkComplexToPhaseImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkComplexToPhaseImageFilter.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::ComplexToPhaseImageFilter" POINTER) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_image_filter_types(CF F) - endif() +if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_image_filter_types(CF F) +endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_image_filter_types(CD D) - endif() +if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_image_filter_types(CD D) +endif() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkComplexToRealImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkComplexToRealImageFilter.wrap index 82ae7eebd79..10bf589bdc5 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkComplexToRealImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkComplexToRealImageFilter.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::ComplexToRealImageFilter" POINTER) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_image_filter_types(CF F) - endif() +if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_image_filter_types(CF F) +endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_image_filter_types(CD D) - endif() +if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_image_filter_types(CD D) +endif() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkConstrainedValueAdditionImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkConstrainedValueAdditionImageFilter.wrap index cd0574fd4e2..f014e37576f 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkConstrainedValueAdditionImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkConstrainedValueAdditionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ConstrainedValueAdditionImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkConstrainedValueDifferenceImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkConstrainedValueDifferenceImageFilter.wrap index 30eacd39852..4dc68763444 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkConstrainedValueDifferenceImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkConstrainedValueDifferenceImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ConstrainedValueDifferenceImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkCosImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkCosImageFilter.wrap index 177df8be935..68b160270e0 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkCosImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkCosImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::CosImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkDivideImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkDivideImageFilter.wrap index 945950af955..c5caa7f2253 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkDivideImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkDivideImageFilter.wrap @@ -1,15 +1,15 @@ itk_wrap_class("itk::DivideImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) - itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 3) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) +itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 3) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_ICF${d}}${ITKM_IF${d}}${ITKM_ICF${d}}" "${ITKT_ICF${d}},${ITKT_IF${d}},${ITKT_ICF${d}}") - endif() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_template("${ITKM_ICF${d}}${ITKM_IF${d}}${ITKM_ICF${d}}" "${ITKT_ICF${d}},${ITKT_IF${d}},${ITKT_ICF${d}}") + endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ICD${d}}${ITKM_ID${d}}${ITKM_ICD${d}}" "${ITKT_ICD${d}},${ITKT_ID${d}},${ITKT_ICD${d}}") - endif() - endforeach() + if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ICD${d}}${ITKM_ID${d}}${ITKM_ICD${d}}" "${ITKT_ICD${d}},${ITKT_ID${d}},${ITKT_ICD${d}}") + endif() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkEdgePotentialImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkEdgePotentialImageFilter.wrap index 40e56241e53..533c5e6d770 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkEdgePotentialImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkEdgePotentialImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::EdgePotentialImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_COV_VECTOR_REAL}" "${WRAP_ITK_REAL}") +itk_wrap_image_filter_combinations("${WRAP_ITK_COV_VECTOR_REAL}" "${WRAP_ITK_REAL}") itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkExpImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkExpImageFilter.wrap index 891cc01a1d6..234c6a18af8 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkExpImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkExpImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ExpImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkExpNegativeImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkExpNegativeImageFilter.wrap index 651b933c547..b1cc69704c9 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkExpNegativeImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkExpNegativeImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ExpNegativeImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkHistogramMatchingImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkHistogramMatchingImageFilter.wrap index 382c1fb09a5..8d85a0b0118 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkHistogramMatchingImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkHistogramMatchingImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::HistogramMatchingImageFilter" POINTER) - # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +# itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +# itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkIntensityWindowingImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkIntensityWindowingImageFilter.wrap index ac3f30bb43d..8a2ae6e1082 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkIntensityWindowingImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkIntensityWindowingImageFilter.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::IntensityWindowingImageFilter" POINTER_WITH_SUPERCLASS) - # Create rescale filters from every scalar type to every scalar type. Also force - # filters from every scalar to uchar, to allow for saving as 8-bit images. - UNIQUE(to_types "UC;${WRAP_ITK_SCALAR}") - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${to_types}") +# Create rescale filters from every scalar type to every scalar type. Also force +# filters from every scalar to uchar, to allow for saving as 8-bit images. +unique(to_types "UC;${WRAP_ITK_SCALAR}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${to_types}") itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkInvertIntensityImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkInvertIntensityImageFilter.wrap index c540c0fc5f6..ee636f8f4a8 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkInvertIntensityImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkInvertIntensityImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::InvertIntensityImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkLog10ImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkLog10ImageFilter.wrap index 4d764055f44..622e5b36f42 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkLog10ImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkLog10ImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::Log10ImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkLogImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkLogImageFilter.wrap index b03cde945a3..ab845a248b0 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkLogImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkLogImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::LogImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkMagnitudeAndPhaseToComplexImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkMagnitudeAndPhaseToComplexImageFilter.wrap index 8bb0fe7f7da..6f17d406c29 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkMagnitudeAndPhaseToComplexImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkMagnitudeAndPhaseToComplexImageFilter.wrap @@ -1,9 +1,10 @@ itk_wrap_class("itk::MagnitudeAndPhaseToComplexImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - foreach(c ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_I${c}${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_I${c}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + foreach(c ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_I${c}${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_I${c}${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkMaskImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkMaskImageFilter.wrap index 96d151d6830..a6e74d10347 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkMaskImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkMaskImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::MaskImageFilter" POINTER) - foreach(t ${WRAP_ITK_ALL_TYPES}) - itk_wrap_image_filter_combinations("${t}" "${WRAP_ITK_INT}" "${t}") - endforeach() +foreach(t ${WRAP_ITK_ALL_TYPES}) + itk_wrap_image_filter_combinations("${t}" "${WRAP_ITK_INT}" "${t}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkMaskNegatedImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkMaskNegatedImageFilter.wrap index 154db537fc3..e5d03ab2f5b 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkMaskNegatedImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkMaskNegatedImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::MaskNegatedImageFilter" POINTER) - foreach(t ${WRAP_ITK_ALL_TYPES}) - itk_wrap_image_filter_combinations("${t}" "${WRAP_ITK_INT}" "${t}") - endforeach() +foreach(t ${WRAP_ITK_ALL_TYPES}) + itk_wrap_image_filter_combinations("${t}" "${WRAP_ITK_INT}" "${t}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkMaximumImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkMaximumImageFilter.wrap index e26805927a6..7a09c86f1da 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkMaximumImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkMaximumImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MaximumImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkMinimumImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkMinimumImageFilter.wrap index 434e9bd60f2..7b026c9bfda 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkMinimumImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkMinimumImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MinimumImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkModulusImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkModulusImageFilter.wrap index 65600a7f236..e20d62a4db7 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkModulusImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkModulusImageFilter.wrap @@ -1,4 +1,4 @@ itk_wrap_class("itk::ModulusImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkMultiplyImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkMultiplyImageFilter.wrap index e179f191725..7f32e1bbca4 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkMultiplyImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkMultiplyImageFilter.wrap @@ -1,15 +1,15 @@ itk_wrap_class("itk::MultiplyImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) - itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 3) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) +itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 3) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - if(ITK_WRAP_complex_float AND ITK_WRAP_float) - itk_wrap_template("${ITKM_ICF${d}}${ITKM_IF${d}}${ITKM_ICF${d}}" "${ITKT_ICF${d}},${ITKT_IF${d}},${ITKT_ICF${d}}") - endif() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + if(ITK_WRAP_complex_float AND ITK_WRAP_float) + itk_wrap_template("${ITKM_ICF${d}}${ITKM_IF${d}}${ITKM_ICF${d}}" "${ITKT_ICF${d}},${ITKT_IF${d}},${ITKT_ICF${d}}") + endif() - if(ITK_WRAP_complex_double AND ITK_WRAP_double) - itk_wrap_template("${ITKM_ICD${d}}${ITKM_ID${d}}${ITKM_ICD${d}}" "${ITKT_ICD${d}},${ITKT_ID${d}},${ITKT_ICD${d}}") - endif() - endforeach() + if(ITK_WRAP_complex_double AND ITK_WRAP_double) + itk_wrap_template("${ITKM_ICD${d}}${ITKM_ID${d}}${ITKM_ICD${d}}" "${ITKT_ICD${d}},${ITKT_ID${d}},${ITKT_ICD${d}}") + endif() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkNaryAddImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkNaryAddImageFilter.wrap index 3e8a689fe50..5d76e8d07b7 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkNaryAddImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkNaryAddImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::NaryAddImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkNaryMaximumImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkNaryMaximumImageFilter.wrap index 8ec854ca5dc..aad41b46d2b 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkNaryMaximumImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkNaryMaximumImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::NaryMaximumImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkNormalizeImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkNormalizeImageFilter.wrap index 1a8a92b6d4b..f0769789b45 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkNormalizeImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkNormalizeImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::NormalizeImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkNormalizeToConstantImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkNormalizeToConstantImageFilter.wrap index 65e6cc83652..ae693af64b4 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkNormalizeToConstantImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkNormalizeToConstantImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::NormalizeToConstantImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkNotImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkNotImageFilter.wrap index ad76fe697a9..907f9b0c4c7 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkNotImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkNotImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::NotImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkOrImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkOrImageFilter.wrap index a0536c67008..89082be0ef6 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkOrImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkOrImageFilter.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::OrImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 3) - itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 3) +itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 3) +itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 3) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkPowImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkPowImageFilter.wrap index 83776f949ad..541379bacdd 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkPowImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkPowImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::PowImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkRGBToLuminanceImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkRGBToLuminanceImageFilter.wrap index 70f4f2d6e10..62e5e5184c6 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkRGBToLuminanceImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkRGBToLuminanceImageFilter.wrap @@ -1,17 +1,17 @@ itk_wrap_class("itk::RGBToLuminanceImageFilter" POINTER) - if(ITK_WRAP_rgb_unsigned_char AND ITK_WRAP_unsigned_char) - itk_wrap_image_filter_types(RGBUC UC) - endif() +if(ITK_WRAP_rgb_unsigned_char AND ITK_WRAP_unsigned_char) + itk_wrap_image_filter_types(RGBUC UC) +endif() - if(ITK_WRAP_rgb_unsigned_short AND ITK_WRAP_unsigned_short) - itk_wrap_image_filter_types(RGBUS US) - endif() +if(ITK_WRAP_rgb_unsigned_short AND ITK_WRAP_unsigned_short) + itk_wrap_image_filter_types(RGBUS US) +endif() - if(ITK_WRAP_rgba_unsigned_char AND ITK_WRAP_unsigned_char) - itk_wrap_image_filter_types(RGBAUC UC) - endif() +if(ITK_WRAP_rgba_unsigned_char AND ITK_WRAP_unsigned_char) + itk_wrap_image_filter_types(RGBAUC UC) +endif() - if(ITK_WRAP_rgba_unsigned_short AND ITK_WRAP_unsigned_short) - itk_wrap_image_filter_types(RGBAUS US) - endif() +if(ITK_WRAP_rgba_unsigned_short AND ITK_WRAP_unsigned_short) + itk_wrap_image_filter_types(RGBAUS US) +endif() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkRescaleIntensityImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkRescaleIntensityImageFilter.wrap index d759ac3a974..c7a062de544 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkRescaleIntensityImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkRescaleIntensityImageFilter.wrap @@ -1,15 +1,15 @@ itk_wrap_include("itkPhasedArray3DSpecialCoordinatesImage.h") itk_wrap_class("itk::RescaleIntensityImageFilter" POINTER_WITH_SUPERCLASS) - # Create rescale filters from every scalar type to every scalar type. Also force - # filters from every scalar to uchar, to allow for saving as 8-bit images. - UNIQUE(to_types "UC;${WRAP_ITK_SCALAR}") - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${to_types}") +# Create rescale filters from every scalar type to every scalar type. Also force +# filters from every scalar to uchar, to allow for saving as 8-bit images. +unique(to_types "UC;${WRAP_ITK_SCALAR}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${to_types}") - # PhasedArray3DSpecialCoordinatesImage - foreach(t ${WRAP_ITK_SCALAR}) - foreach(ut ${WRAP_ITK_INT}) - itk_wrap_template("I${ITKM_${t}}3PA3DSCI${ITKM_${ut}}" - "itk::Image< ${ITKT_${t}}, 3 >, itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${ut}} >") - endforeach() +# PhasedArray3DSpecialCoordinatesImage +foreach(t ${WRAP_ITK_SCALAR}) + foreach(ut ${WRAP_ITK_INT}) + itk_wrap_template("I${ITKM_${t}}3PA3DSCI${ITKM_${ut}}" + "itk::Image< ${ITKT_${t}}, 3 >, itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${ut}} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkRoundImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkRoundImageFilter.wrap index 8154df7a946..be78a7c3cd1 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkRoundImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkRoundImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::RoundImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkShiftScaleImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkShiftScaleImageFilter.wrap index 6e5f934a6d7..fdc98ba18be 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkShiftScaleImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkShiftScaleImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ShiftScaleImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkSigmoidImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkSigmoidImageFilter.wrap index 5cbafdc8141..2c5e8ae1f95 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkSigmoidImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkSigmoidImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::SigmoidImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkSinImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkSinImageFilter.wrap index f4a98700265..624d5240845 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkSinImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkSinImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::SinImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkSqrtImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkSqrtImageFilter.wrap index c2471ecb097..11b98e24e64 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkSqrtImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkSqrtImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::SqrtImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkSquareImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkSquareImageFilter.wrap index 2abd22d1f92..28eb6b221ad 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkSquareImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkSquareImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::SquareImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkSubtractImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkSubtractImageFilter.wrap index af09984a2eb..fdaf44cabe9 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkSubtractImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkSubtractImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::SubtractImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkSymmetricEigenAnalysisImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkSymmetricEigenAnalysisImageFilter.wrap index 4c2c2202f91..3ac510ec25f 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkSymmetricEigenAnalysisImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkSymmetricEigenAnalysisImageFilter.wrap @@ -5,7 +5,7 @@ itk_wrap_include("itkSymmetricSecondRankTensor.h") itk_wrap_simple_class("itk::SymmetricEigenAnalysisEnums") itk_wrap_class("itk::SymmetricEigenAnalysisImageFilter" POINTER_WITH_2_SUPERCLASSES) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_ISSRT${ITKM_D}${d}${d}}" "${ITKT_ISSRT${ITKM_D}${d}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_ISSRT${ITKM_D}${d}${d}}" "${ITKT_ISSRT${ITKM_D}${d}${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkTanImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkTanImageFilter.wrap index bb5bc141736..0b4370d6fd5 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkTanImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkTanImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::TanImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkTernaryAddImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkTernaryAddImageFilter.wrap index d4911a30a4e..65d3064d469 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkTernaryAddImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkTernaryAddImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::TernaryAddImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 4) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 4) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkTernaryMagnitudeImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkTernaryMagnitudeImageFilter.wrap index 99390cd996a..65567dc62b1 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkTernaryMagnitudeImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkTernaryMagnitudeImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::TernaryMagnitudeImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 4) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 4) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkTernaryMagnitudeSquaredImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkTernaryMagnitudeSquaredImageFilter.wrap index 25eb5856d96..bfc154fd61f 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkTernaryMagnitudeSquaredImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkTernaryMagnitudeSquaredImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::TernaryMagnitudeSquaredImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 4) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 4) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkVectorIndexSelectionCastImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkVectorIndexSelectionCastImageFilter.wrap index 502a374037d..064319f7ba4 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkVectorIndexSelectionCastImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkVectorIndexSelectionCastImageFilter.wrap @@ -1,47 +1,47 @@ itk_wrap_class("itk::VectorIndexSelectionCastImageFilter" POINTER_WITH_SUPERCLASS) - # Begin with VectorImages - UNIQUE(to_types "UC;${WRAP_ITK_SCALAR}") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${to_types}) - itk_wrap_template("${ITKM_VI${t}${d}}${ITKM_I${t}${d}}" "${ITKT_VI${t}${d}},${ITKT_I${t}${d}}") - endforeach() +# Begin with VectorImages +unique(to_types "UC;${WRAP_ITK_SCALAR}") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${to_types}) + itk_wrap_template("${ITKM_VI${t}${d}}${ITKM_I${t}${d}}" "${ITKT_VI${t}${d}},${ITKT_I${t}${d}}") endforeach() - - # RGB - if(ITK_WRAP_rgb_unsigned_short AND ITK_WRAP_unsigned_short) - itk_wrap_image_filter_types(RGBUS US) - endif() - - if(ITK_WRAP_rgb_unsigned_char AND ITK_WRAP_unsigned_char) - itk_wrap_image_filter_types(RGBUC UC) - endif() - - # RGBA - if(ITK_WRAP_rgba_unsigned_short AND ITK_WRAP_unsigned_short) - itk_wrap_image_filter_types(RGBAUS US) - endif() - - if(ITK_WRAP_rgba_unsigned_char AND ITK_WRAP_unsigned_char) - itk_wrap_image_filter_types(RGBAUC UC) - endif() - - # Vector - if(ITK_WRAP_vector_double AND ITK_WRAP_double) - itk_wrap_image_filter_types(VD D) - endif() - - if(ITK_WRAP_vector_float AND ITK_WRAP_float) - itk_wrap_image_filter_types(VF F) - endif() - - # Covariant vector - if(ITK_WRAP_covariant_vector_double AND ITK_WRAP_double) - itk_wrap_image_filter_types(CVD D) - endif() - - if(ITK_WRAP_covariant_vector_float AND ITK_WRAP_float) - itk_wrap_image_filter_types(CVF F) - endif() +endforeach() + +# RGB +if(ITK_WRAP_rgb_unsigned_short AND ITK_WRAP_unsigned_short) + itk_wrap_image_filter_types(RGBUS US) +endif() + +if(ITK_WRAP_rgb_unsigned_char AND ITK_WRAP_unsigned_char) + itk_wrap_image_filter_types(RGBUC UC) +endif() + +# RGBA +if(ITK_WRAP_rgba_unsigned_short AND ITK_WRAP_unsigned_short) + itk_wrap_image_filter_types(RGBAUS US) +endif() + +if(ITK_WRAP_rgba_unsigned_char AND ITK_WRAP_unsigned_char) + itk_wrap_image_filter_types(RGBAUC UC) +endif() + +# Vector +if(ITK_WRAP_vector_double AND ITK_WRAP_double) + itk_wrap_image_filter_types(VD D) +endif() + +if(ITK_WRAP_vector_float AND ITK_WRAP_float) + itk_wrap_image_filter_types(VF F) +endif() + +# Covariant vector +if(ITK_WRAP_covariant_vector_double AND ITK_WRAP_double) + itk_wrap_image_filter_types(CVD D) +endif() + +if(ITK_WRAP_covariant_vector_float AND ITK_WRAP_float) + itk_wrap_image_filter_types(CVF F) +endif() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkVectorMagnitudeImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkVectorMagnitudeImageFilter.wrap index e20070a50b8..1f067b5b53c 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkVectorMagnitudeImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkVectorMagnitudeImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::VectorMagnitudeImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter_combinations("${WRAP_ITK_COV_VECTOR_REAL}" "${WRAP_ITK_SCALAR}") +itk_wrap_image_filter_combinations("${WRAP_ITK_COV_VECTOR_REAL}" "${WRAP_ITK_SCALAR}") itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkVectorRescaleIntensityImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkVectorRescaleIntensityImageFilter.wrap index daacd4ddc2a..a3d9272118a 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkVectorRescaleIntensityImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkVectorRescaleIntensityImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::VectorRescaleIntensityImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_VECTOR_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_VECTOR_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkWeightedAddImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkWeightedAddImageFilter.wrap index 9b05269e304..59ecf165e30 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkWeightedAddImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkWeightedAddImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::WeightedAddImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 3) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/itkXorImageFilter.wrap b/Modules/Filtering/ImageIntensity/wrapping/itkXorImageFilter.wrap index fb12f795233..8acd869ee49 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/itkXorImageFilter.wrap +++ b/Modules/Filtering/ImageIntensity/wrapping/itkXorImageFilter.wrap @@ -1,4 +1,4 @@ itk_wrap_class("itk::XorImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 3) - itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 3) +itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 3) +itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 3) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageIntensity/wrapping/test/CMakeLists.txt b/Modules/Filtering/ImageIntensity/wrapping/test/CMakeLists.txt index c07750ed44d..71dbbd8e718 100644 --- a/Modules/Filtering/ImageIntensity/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/ImageIntensity/wrapping/test/CMakeLists.txt @@ -1,23 +1,41 @@ # some tests will fail if dim=2 and unsigned short are not wrapped if(ITK_WRAP_PYTHON) - list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) + list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) if(ITK_WRAP_unsigned_char AND wrap_2_index GREATER -1) - itk_python_add_test(NAME PythonSigmoidImageFilterTest + itk_python_add_test( + NAME + PythonSigmoidImageFilterTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonSigmoidImageFilterTest.png - DATA{Baseline/PythonSigmoidImageFilterTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/SigmoidImageFilterTest.py - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/PythonSigmoidImageFilterTest.png - 10 240 10 170 - ) - itk_python_add_test(NAME PythonIntensityWindowingImageFilterTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkIntensityWindowingImageFilterTest.py - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonSigmoidImageFilterTest.png + DATA{Baseline/PythonSigmoidImageFilterTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/SigmoidImageFilterTest.py + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/PythonSigmoidImageFilterTest.png + 10 + 240 + 10 + 170) + itk_python_add_test( + NAME + PythonIntensityWindowingImageFilterTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkIntensityWindowingImageFilterTest.py + DATA{${ITK_DATA_ROOT}/Input/cthead1.png}) endif() - itk_python_expression_add_test(NAME itkSymmetricEigenAnalysisImageFilterPythonTest - EXPRESSION "filt = itk.SymmetricEigenAnalysisImageFilter.New()") - itk_python_add_test(NAME itkImageFilterNumPyInputsTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkImageFilterNumPyInputsTest.py) + itk_python_expression_add_test( + NAME + itkSymmetricEigenAnalysisImageFilterPythonTest + EXPRESSION + "filt = itk.SymmetricEigenAnalysisImageFilter.New()") + itk_python_add_test( + NAME + itkImageFilterNumPyInputsTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkImageFilterNumPyInputsTest.py) endif() diff --git a/Modules/Filtering/ImageLabel/itk-module.cmake b/Modules/Filtering/ImageLabel/itk-module.cmake index 87a68055759..b78b37b7d12 100644 --- a/Modules/Filtering/ImageLabel/itk-module.cmake +++ b/Modules/Filtering/ImageLabel/itk-module.cmake @@ -1,14 +1,15 @@ -set(DOCUMENTATION "This module contains filters intended to operate on images +set(DOCUMENTATION + "This module contains filters intended to operate on images of labels. Such images are typically the output of segmentation and classification filters, such as watersheds or statistical classifiers. The filters in this module compute label statistics and perform operations between labels.") -itk_module(ITKImageLabel +itk_module( + ITKImageLabel DEPENDS - ITKImageIntensity + ITKImageIntensity TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/ImageLabel/test/CMakeLists.txt b/Modules/Filtering/ImageLabel/test/CMakeLists.txt index 76b3e8d2dd2..f680b392077 100644 --- a/Modules/Filtering/ImageLabel/test/CMakeLists.txt +++ b/Modules/Filtering/ImageLabel/test/CMakeLists.txt @@ -1,37 +1,66 @@ itk_module_test() -set(ITKImageLabelTests -itkChangeLabelImageFilterTest.cxx -itkLabelContourImageFilterTest.cxx -itkBinaryContourImageFilterTest.cxx -) +set(ITKImageLabelTests itkChangeLabelImageFilterTest.cxx itkLabelContourImageFilterTest.cxx + itkBinaryContourImageFilterTest.cxx) -CreateTestDriver(ITKImageLabel "${ITKImageLabel-Test_LIBRARIES}" "${ITKImageLabelTests}") +createtestdriver(ITKImageLabel "${ITKImageLabel-Test_LIBRARIES}" "${ITKImageLabelTests}") -itk_add_test(NAME itkChangeLabelImageFilterTest - COMMAND ITKImageLabelTestDriver itkChangeLabelImageFilterTest) -itk_add_test(NAME itkLabelContourImageFilterTest0 - COMMAND ITKImageLabelTestDriver - --compare DATA{Baseline/itkLabelContourImageFilterTest0.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelContourImageFilterTest0.png - itkLabelContourImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelContourImageFilterTest0.png - 0 0) -itk_add_test(NAME itkLabelContourImageFilterTest1 - COMMAND ITKImageLabelTestDriver - --compare DATA{Baseline/itkLabelContourImageFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelContourImageFilterTest1.png - itkLabelContourImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelContourImageFilterTest1.png - 1 0) -itk_add_test(NAME itkBinaryContourImageFilterTest0 - COMMAND ITKImageLabelTestDriver - --compare DATA{Baseline/itkBinaryContourImageFilterTest0.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryContourImageFilterTest0.png - itkBinaryContourImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryContourImageFilterTest0.png 0 200 0) -itk_add_test(NAME itkBinaryContourImageFilterTest1 - COMMAND ITKImageLabelTestDriver - --compare DATA{Baseline/itkBinaryContourImageFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryContourImageFilterTest1.png - itkBinaryContourImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryContourImageFilterTest1.png 1 200 0) +itk_add_test( + NAME + itkChangeLabelImageFilterTest + COMMAND + ITKImageLabelTestDriver + itkChangeLabelImageFilterTest) +itk_add_test( + NAME + itkLabelContourImageFilterTest0 + COMMAND + ITKImageLabelTestDriver + --compare + DATA{Baseline/itkLabelContourImageFilterTest0.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelContourImageFilterTest0.png + itkLabelContourImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelContourImageFilterTest0.png + 0 + 0) +itk_add_test( + NAME + itkLabelContourImageFilterTest1 + COMMAND + ITKImageLabelTestDriver + --compare + DATA{Baseline/itkLabelContourImageFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelContourImageFilterTest1.png + itkLabelContourImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelContourImageFilterTest1.png + 1 + 0) +itk_add_test( + NAME + itkBinaryContourImageFilterTest0 + COMMAND + ITKImageLabelTestDriver + --compare + DATA{Baseline/itkBinaryContourImageFilterTest0.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryContourImageFilterTest0.png + itkBinaryContourImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryContourImageFilterTest0.png + 0 + 200 + 0) +itk_add_test( + NAME + itkBinaryContourImageFilterTest1 + COMMAND + ITKImageLabelTestDriver + --compare + DATA{Baseline/itkBinaryContourImageFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryContourImageFilterTest1.png + itkBinaryContourImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryContourImageFilterTest1.png + 1 + 200 + 0) diff --git a/Modules/Filtering/ImageLabel/wrapping/itkBinaryContourImageFilter.wrap b/Modules/Filtering/ImageLabel/wrapping/itkBinaryContourImageFilter.wrap index add8df21878..f491f455984 100644 --- a/Modules/Filtering/ImageLabel/wrapping/itkBinaryContourImageFilter.wrap +++ b/Modules/Filtering/ImageLabel/wrapping/itkBinaryContourImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BinaryContourImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageLabel/wrapping/itkChangeLabelImageFilter.wrap b/Modules/Filtering/ImageLabel/wrapping/itkChangeLabelImageFilter.wrap index 1de63882ee4..db6849fb322 100644 --- a/Modules/Filtering/ImageLabel/wrapping/itkChangeLabelImageFilter.wrap +++ b/Modules/Filtering/ImageLabel/wrapping/itkChangeLabelImageFilter.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::ChangeLabelImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) # itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) # itk_wrap_image_filter("${WRAP_ITK_VECTOR_REAL}" 2) # itk_wrap_image_filter("${WRAP_ITK_COV_VECTOR_REAL}" 2) diff --git a/Modules/Filtering/ImageLabel/wrapping/itkLabelContourImageFilter.wrap b/Modules/Filtering/ImageLabel/wrapping/itkLabelContourImageFilter.wrap index 704156478cc..22e2bbee8ce 100644 --- a/Modules/Filtering/ImageLabel/wrapping/itkLabelContourImageFilter.wrap +++ b/Modules/Filtering/ImageLabel/wrapping/itkLabelContourImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::LabelContourImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageLabel/wrapping/itkScanlineFilterCommon.wrap b/Modules/Filtering/ImageLabel/wrapping/itkScanlineFilterCommon.wrap index e1e747e0e81..bbe2157971e 100644 --- a/Modules/Filtering/ImageLabel/wrapping/itkScanlineFilterCommon.wrap +++ b/Modules/Filtering/ImageLabel/wrapping/itkScanlineFilterCommon.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::ScanlineFilterCommon" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) - UNIQUE(to_types "UL;${WRAP_ITK_INT}") - itk_wrap_image_filter_combinations("${WRAP_ITK_INT}" "${to_types}" 2+) - # wrap vector to int combinations because ConnectedComponentImageFilter uses them - itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_INT}" 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) +unique(to_types "UL;${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_INT}" "${to_types}" 2+) +# wrap vector to int combinations because ConnectedComponentImageFilter uses them +itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_INT}" 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageNoise/itk-module.cmake b/Modules/Filtering/ImageNoise/itk-module.cmake index 04b2759f774..a34aa0fcee3 100644 --- a/Modules/Filtering/ImageNoise/itk-module.cmake +++ b/Modules/Filtering/ImageNoise/itk-module.cmake @@ -1,12 +1,13 @@ -set(DOCUMENTATION "This module contains classes to simulate and +set(DOCUMENTATION + "This module contains classes to simulate and evaluate noise. These classes were originally contributed via the Insight Journal (https://www.insight-journal.org/browse/publication/721).") -itk_module(ITKImageNoise +itk_module( + ITKImageNoise COMPILE_DEPENDS - ITKStatistics + ITKStatistics TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/ImageNoise/test/CMakeLists.txt b/Modules/Filtering/ImageNoise/test/CMakeLists.txt index 22312ff6747..e0c7855e7f2 100644 --- a/Modules/Filtering/ImageNoise/test/CMakeLists.txt +++ b/Modules/Filtering/ImageNoise/test/CMakeLists.txt @@ -1,76 +1,111 @@ itk_module_test() set(ITKImageNoiseTests - itkAdditiveGaussianNoiseImageFilterTest.cxx - itkShotNoiseImageFilterTest.cxx - itkSpeckleNoiseImageFilterTest.cxx - itkSaltAndPepperNoiseImageFilterTest.cxx - itkPeakSignalToNoiseRatioCalculatorTest.cxx -) + itkAdditiveGaussianNoiseImageFilterTest.cxx + itkShotNoiseImageFilterTest.cxx + itkSpeckleNoiseImageFilterTest.cxx + itkSaltAndPepperNoiseImageFilterTest.cxx + itkPeakSignalToNoiseRatioCalculatorTest.cxx) +createtestdriver(ITKImageNoise "${ITKImageNoise-Test_LIBRARIES}" "${ITKImageNoiseTests}") -CreateTestDriver(ITKImageNoise "${ITKImageNoise-Test_LIBRARIES}" "${ITKImageNoiseTests}") - -itk_add_test(NAME itkAdditiveGaussianNoiseImageFilterTest - COMMAND ITKImageNoiseTestDriver +itk_add_test( + NAME + itkAdditiveGaussianNoiseImageFilterTest + COMMAND + ITKImageNoiseTestDriver itkAdditiveGaussianNoiseImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkAdditiveGaussianNoiseImageFilterTest.png - 29.85 0) -itk_add_test(NAME itkAdditiveGaussianNoiseImageFilterTestPSNR - COMMAND ITKImageNoiseTestDriver + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkAdditiveGaussianNoiseImageFilterTest.png + 29.85 + 0) +itk_add_test( + NAME + itkAdditiveGaussianNoiseImageFilterTestPSNR + COMMAND + ITKImageNoiseTestDriver itkPeakSignalToNoiseRatioCalculatorTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkAdditiveGaussianNoiseImageFilterTest.png - 20 1) -set_tests_properties(itkAdditiveGaussianNoiseImageFilterTestPSNR - PROPERTIES - DEPENDS itkAdditiveGaussianNoiseImageFilterTest - REQUIRED_FILES ${ITK_TEST_OUTPUT_DIR}/itkAdditiveGaussianNoiseImageFilterTest.png) -itk_add_test(NAME itkShotNoiseImageFilterTest - COMMAND ITKImageNoiseTestDriver + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkAdditiveGaussianNoiseImageFilterTest.png + 20 + 1) +set_tests_properties( + itkAdditiveGaussianNoiseImageFilterTestPSNR + PROPERTIES DEPENDS + itkAdditiveGaussianNoiseImageFilterTest + REQUIRED_FILES + ${ITK_TEST_OUTPUT_DIR}/itkAdditiveGaussianNoiseImageFilterTest.png) +itk_add_test( + NAME + itkShotNoiseImageFilterTest + COMMAND + ITKImageNoiseTestDriver itkShotNoiseImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkShotNoiseImageFilterTest.png - 0.105) -itk_add_test(NAME itkShotNoiseImageFilterTestPSNR - COMMAND ITKImageNoiseTestDriver + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkShotNoiseImageFilterTest.png + 0.105) +itk_add_test( + NAME + itkShotNoiseImageFilterTestPSNR + COMMAND + ITKImageNoiseTestDriver itkPeakSignalToNoiseRatioCalculatorTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkShotNoiseImageFilterTest.png - 20 1) -set_tests_properties(itkShotNoiseImageFilterTestPSNR - PROPERTIES - DEPENDS itkShotNoiseImageFilterTest - REQUIRED_FILES ${ITK_TEST_OUTPUT_DIR}/itkShotNoiseImageFilterTest.png) -itk_add_test(NAME itkSpeckleNoiseImageFilterTest - COMMAND ITKImageNoiseTestDriver + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkShotNoiseImageFilterTest.png + 20 + 1) +set_tests_properties( + itkShotNoiseImageFilterTestPSNR + PROPERTIES DEPENDS + itkShotNoiseImageFilterTest + REQUIRED_FILES + ${ITK_TEST_OUTPUT_DIR}/itkShotNoiseImageFilterTest.png) +itk_add_test( + NAME itkSpeckleNoiseImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkSpeckleNoiseImageFilterTest.png - 0.261) -itk_add_test(NAME itkSpeckleNoiseImageFilterTestPSNR - COMMAND ITKImageNoiseTestDriver + COMMAND + ITKImageNoiseTestDriver + itkSpeckleNoiseImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkSpeckleNoiseImageFilterTest.png + 0.261) +itk_add_test( + NAME + itkSpeckleNoiseImageFilterTestPSNR + COMMAND + ITKImageNoiseTestDriver itkPeakSignalToNoiseRatioCalculatorTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkSpeckleNoiseImageFilterTest.png - 20 1) -set_tests_properties(itkSpeckleNoiseImageFilterTestPSNR - PROPERTIES - DEPENDS itkSpeckleNoiseImageFilterTest - REQUIRED_FILES ${ITK_TEST_OUTPUT_DIR}/itkSpeckleNoiseImageFilterTest.png) -itk_add_test(NAME itkSaltAndPepperNoiseImageFilterTest - COMMAND ITKImageNoiseTestDriver + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkSpeckleNoiseImageFilterTest.png + 20 + 1) +set_tests_properties( + itkSpeckleNoiseImageFilterTestPSNR + PROPERTIES DEPENDS + itkSpeckleNoiseImageFilterTest + REQUIRED_FILES + ${ITK_TEST_OUTPUT_DIR}/itkSpeckleNoiseImageFilterTest.png) +itk_add_test( + NAME + itkSaltAndPepperNoiseImageFilterTest + COMMAND + ITKImageNoiseTestDriver itkSaltAndPepperNoiseImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkSaltAndPepperNoiseImageFilterTest.png - 0.0257) -itk_add_test(NAME itkSaltAndPepperNoiseImageFilterTestPSNR - COMMAND ITKImageNoiseTestDriver + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkSaltAndPepperNoiseImageFilterTest.png + 0.0257) +itk_add_test( + NAME + itkSaltAndPepperNoiseImageFilterTestPSNR + COMMAND + ITKImageNoiseTestDriver itkPeakSignalToNoiseRatioCalculatorTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkSaltAndPepperNoiseImageFilterTest.png - 20 1) -set_tests_properties(itkSaltAndPepperNoiseImageFilterTestPSNR - PROPERTIES - DEPENDS itkSaltAndPepperNoiseImageFilterTest - REQUIRED_FILES ${ITK_TEST_OUTPUT_DIR}/itkSaltAndPepperNoiseImageFilterTest.png) + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkSaltAndPepperNoiseImageFilterTest.png + 20 + 1) +set_tests_properties( + itkSaltAndPepperNoiseImageFilterTestPSNR + PROPERTIES DEPENDS + itkSaltAndPepperNoiseImageFilterTest + REQUIRED_FILES + ${ITK_TEST_OUTPUT_DIR}/itkSaltAndPepperNoiseImageFilterTest.png) diff --git a/Modules/Filtering/ImageNoise/wrapping/itkAdditiveGaussianNoiseImageFilter.wrap b/Modules/Filtering/ImageNoise/wrapping/itkAdditiveGaussianNoiseImageFilter.wrap index 5b6594ec173..0321f7193d2 100644 --- a/Modules/Filtering/ImageNoise/wrapping/itkAdditiveGaussianNoiseImageFilter.wrap +++ b/Modules/Filtering/ImageNoise/wrapping/itkAdditiveGaussianNoiseImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::AdditiveGaussianNoiseImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageNoise/wrapping/itkNoiseBaseImageFilter.wrap b/Modules/Filtering/ImageNoise/wrapping/itkNoiseBaseImageFilter.wrap index 513c57b49b3..1a87ba096b0 100644 --- a/Modules/Filtering/ImageNoise/wrapping/itkNoiseBaseImageFilter.wrap +++ b/Modules/Filtering/ImageNoise/wrapping/itkNoiseBaseImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::NoiseBaseImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageNoise/wrapping/itkSaltAndPepperNoiseImageFilter.wrap b/Modules/Filtering/ImageNoise/wrapping/itkSaltAndPepperNoiseImageFilter.wrap index 059a7cf847c..73fc72058a2 100644 --- a/Modules/Filtering/ImageNoise/wrapping/itkSaltAndPepperNoiseImageFilter.wrap +++ b/Modules/Filtering/ImageNoise/wrapping/itkSaltAndPepperNoiseImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::SaltAndPepperNoiseImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageNoise/wrapping/itkShotNoiseImageFilter.wrap b/Modules/Filtering/ImageNoise/wrapping/itkShotNoiseImageFilter.wrap index 7f50d35ce99..d976011fa56 100644 --- a/Modules/Filtering/ImageNoise/wrapping/itkShotNoiseImageFilter.wrap +++ b/Modules/Filtering/ImageNoise/wrapping/itkShotNoiseImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ShotNoiseImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageNoise/wrapping/itkSpeckleNoiseImageFilter.wrap b/Modules/Filtering/ImageNoise/wrapping/itkSpeckleNoiseImageFilter.wrap index 8e8bda7e07a..852bc08c11f 100644 --- a/Modules/Filtering/ImageNoise/wrapping/itkSpeckleNoiseImageFilter.wrap +++ b/Modules/Filtering/ImageNoise/wrapping/itkSpeckleNoiseImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::SpeckleNoiseImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageSources/itk-module.cmake b/Modules/Filtering/ImageSources/itk-module.cmake index 77ae2357a74..71257ce3357 100644 --- a/Modules/Filtering/ImageSources/itk-module.cmake +++ b/Modules/Filtering/ImageSources/itk-module.cmake @@ -1,14 +1,14 @@ set(DOCUMENTATION "This module groups image sources which generate an image") -itk_module(ITKImageSources +itk_module( + ITKImageSources COMPILE_DEPENDS - ITKCommon + ITKCommon TEST_DEPENDS - ITKTestKernel - ITKImageIntensity + ITKTestKernel + ITKImageIntensity DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") # the ITKIntensity is only needed for the # VectorIndexSelectionCastImageFilter for the PhysicalPointImageSourceTest diff --git a/Modules/Filtering/ImageSources/test/CMakeLists.txt b/Modules/Filtering/ImageSources/test/CMakeLists.txt index c7a2adb5f61..ac072f8bc43 100644 --- a/Modules/Filtering/ImageSources/test/CMakeLists.txt +++ b/Modules/Filtering/ImageSources/test/CMakeLists.txt @@ -1,80 +1,200 @@ itk_module_test() set(ITKImageSourcesTests - itkGaborKernelFunctionTest.cxx - itkGaborImageSourceTest.cxx - itkGaussianImageSourceTest.cxx - itkGridImageSourceTest.cxx - itkPhysicalPointImageSourceTest.cxx -) + itkGaborKernelFunctionTest.cxx + itkGaborImageSourceTest.cxx + itkGaussianImageSourceTest.cxx + itkGridImageSourceTest.cxx + itkPhysicalPointImageSourceTest.cxx) -CreateTestDriver(ITKImageSources "${ITKImageSources-Test_LIBRARIES}" "${ITKImageSourcesTests}") +createtestdriver(ITKImageSources "${ITKImageSources-Test_LIBRARIES}" "${ITKImageSourcesTests}") -itk_add_test(NAME itkGaborKernelFunctionTest - COMMAND ITKImageSourcesTestDriver itkGaborKernelFunctionTest) -itk_add_test(NAME itkGaborImageSourceTest0 - COMMAND ITKImageSourcesTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/GaborImageSourceTest0.mha} - ${ITK_TEST_OUTPUT_DIR}/GaborImageSourceTest0.mha - itkGaborImageSourceTest ${ITK_TEST_OUTPUT_DIR}/GaborImageSourceTest0.mha 0) -itk_add_test(NAME itkGaborImageSourceTest1 - COMMAND ITKImageSourcesTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/GaborImageSourceTest1.mha} - ${ITK_TEST_OUTPUT_DIR}/GaborImageSourceTest1.mha - itkGaborImageSourceTest ${ITK_TEST_OUTPUT_DIR}/GaborImageSourceTest1.mha 1) -itk_add_test(NAME itkGaussianImageSourceTest1 - COMMAND ITKImageSourcesTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkGaussianImageSourceTest1.nrrd - 551a41aa2478ba271e3e1820ddffa03d - itkGaussianImageSourceTest ${ITK_TEST_OUTPUT_DIR}/itkGaussianImageSourceTest1.nrrd 0) -itk_add_test(NAME itkGaussianImageSourceTest2 - COMMAND ITKImageSourcesTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkGaussianImageSourceTest2.nrrd - 5bf79f0539922f9c654dafd2601330b1 - itkGaussianImageSourceTest ${ITK_TEST_OUTPUT_DIR}/itkGaussianImageSourceTest2.nrrd 1) -itk_add_test(NAME itkGridImageSourceTest1 - COMMAND ITKImageSourcesTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkGridImageSourceTest1.nhdr,itkGridImageSourceTest1.raw.gz} - ${ITK_TEST_OUTPUT_DIR}/itkGridImageSourceTest1.nhdr - itkGridImageSourceTest ${ITK_TEST_OUTPUT_DIR}/itkGridImageSourceTest1.nhdr 64 3 0 8.0 0 0.0 1 0 1 0) -itk_add_test(NAME itkGridImageSourceTest2 - COMMAND ITKImageSourcesTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkGridImageSourceTest2.nhdr,itkGridImageSourceTest2.raw.gz} - ${ITK_TEST_OUTPUT_DIR}/itkGridImageSourceTest2.nhdr - itkGridImageSourceTest ${ITK_TEST_OUTPUT_DIR}/itkGridImageSourceTest2.nhdr 64 3 0 16.0 0 0.0 1 0 1 3) -itk_add_test(NAME itkGridImageSourceTest3 - COMMAND ITKImageSourcesTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkGridImageSourceTest3.nhdr,itkGridImageSourceTest3.raw.gz} - ${ITK_TEST_OUTPUT_DIR}/itkGridImageSourceTest3.nhdr - itkGridImageSourceTest ${ITK_TEST_OUTPUT_DIR}/itkGridImageSourceTest3.nhdr 32 3 0 4.0 0 0.0 1 1 0 0) -itk_add_test(NAME itkGridImageSourceTest4 - COMMAND ITKImageSourcesTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkGridImageSourceTest4.nhdr,itkGridImageSourceTest4.raw.gz} - ${ITK_TEST_OUTPUT_DIR}/itkGridImageSourceTest4.nhdr - itkGridImageSourceTest ${ITK_TEST_OUTPUT_DIR}/itkGridImageSourceTest4.nhdr 64 1.0 1 32.0 1 0.0 1 0 0 0) -itk_add_test(NAME itkPhysicalPointImageSourceTest0 - COMMAND ITKImageSourcesTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkPhysicalPointImageSourceTest0.mha} - ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest0.mha - itkPhysicalPointImageSourceTest ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest0.mha 0) -itk_add_test(NAME itkPhysicalPointImageSourceTest1 - COMMAND ITKImageSourcesTestDriver - # this should be the same baseline as test 0 - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkPhysicalPointImageSourceTest0.mha} - ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest1.mha - itkPhysicalPointImageSourceTest ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest1.mha 1) -itk_add_test(NAME itkPhysicalPointImageSourceTest2 - COMMAND ITKImageSourcesTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkPhysicalPointImageSourceTest2.mha} - ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest2.mha - itkPhysicalPointImageSourceTest ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest2.mha 2) -itk_add_test(NAME itkPhysicalPointImageSourceTest3 - COMMAND ITKImageSourcesTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkPhysicalPointImageSourceTest0.mha} - ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest3.mha - itkPhysicalPointImageSourceTest ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest3.mha 3 0.0) -itk_add_test(NAME itkPhysicalPointImageSourceTest4 - COMMAND ITKImageSourcesTestDriver - --compareIntensityTolerance .0001 - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkPhysicalPointImageSourceTest4.nrrd} - ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest4.nrrd - itkPhysicalPointImageSourceTest ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest4.nrrd 3 0.785398163) +itk_add_test( + NAME + itkGaborKernelFunctionTest + COMMAND + ITKImageSourcesTestDriver + itkGaborKernelFunctionTest) +itk_add_test( + NAME + itkGaborImageSourceTest0 + COMMAND + ITKImageSourcesTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/GaborImageSourceTest0.mha} + ${ITK_TEST_OUTPUT_DIR}/GaborImageSourceTest0.mha + itkGaborImageSourceTest + ${ITK_TEST_OUTPUT_DIR}/GaborImageSourceTest0.mha + 0) +itk_add_test( + NAME + itkGaborImageSourceTest1 + COMMAND + ITKImageSourcesTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/GaborImageSourceTest1.mha} + ${ITK_TEST_OUTPUT_DIR}/GaborImageSourceTest1.mha + itkGaborImageSourceTest + ${ITK_TEST_OUTPUT_DIR}/GaborImageSourceTest1.mha + 1) +itk_add_test( + NAME + itkGaussianImageSourceTest1 + COMMAND + ITKImageSourcesTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkGaussianImageSourceTest1.nrrd + 551a41aa2478ba271e3e1820ddffa03d + itkGaussianImageSourceTest + ${ITK_TEST_OUTPUT_DIR}/itkGaussianImageSourceTest1.nrrd + 0) +itk_add_test( + NAME + itkGaussianImageSourceTest2 + COMMAND + ITKImageSourcesTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkGaussianImageSourceTest2.nrrd + 5bf79f0539922f9c654dafd2601330b1 + itkGaussianImageSourceTest + ${ITK_TEST_OUTPUT_DIR}/itkGaussianImageSourceTest2.nrrd + 1) +itk_add_test( + NAME + itkGridImageSourceTest1 + COMMAND + ITKImageSourcesTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkGridImageSourceTest1.nhdr,itkGridImageSourceTest1.raw.gz} + ${ITK_TEST_OUTPUT_DIR}/itkGridImageSourceTest1.nhdr + itkGridImageSourceTest + ${ITK_TEST_OUTPUT_DIR}/itkGridImageSourceTest1.nhdr + 64 + 3 + 0 + 8.0 + 0 + 0.0 + 1 + 0 + 1 + 0) +itk_add_test( + NAME + itkGridImageSourceTest2 + COMMAND + ITKImageSourcesTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkGridImageSourceTest2.nhdr,itkGridImageSourceTest2.raw.gz} + ${ITK_TEST_OUTPUT_DIR}/itkGridImageSourceTest2.nhdr + itkGridImageSourceTest + ${ITK_TEST_OUTPUT_DIR}/itkGridImageSourceTest2.nhdr + 64 + 3 + 0 + 16.0 + 0 + 0.0 + 1 + 0 + 1 + 3) +itk_add_test( + NAME + itkGridImageSourceTest3 + COMMAND + ITKImageSourcesTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkGridImageSourceTest3.nhdr,itkGridImageSourceTest3.raw.gz} + ${ITK_TEST_OUTPUT_DIR}/itkGridImageSourceTest3.nhdr + itkGridImageSourceTest + ${ITK_TEST_OUTPUT_DIR}/itkGridImageSourceTest3.nhdr + 32 + 3 + 0 + 4.0 + 0 + 0.0 + 1 + 1 + 0 + 0) +itk_add_test( + NAME + itkGridImageSourceTest4 + COMMAND + ITKImageSourcesTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkGridImageSourceTest4.nhdr,itkGridImageSourceTest4.raw.gz} + ${ITK_TEST_OUTPUT_DIR}/itkGridImageSourceTest4.nhdr + itkGridImageSourceTest + ${ITK_TEST_OUTPUT_DIR}/itkGridImageSourceTest4.nhdr + 64 + 1.0 + 1 + 32.0 + 1 + 0.0 + 1 + 0 + 0 + 0) +itk_add_test( + NAME + itkPhysicalPointImageSourceTest0 + COMMAND + ITKImageSourcesTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkPhysicalPointImageSourceTest0.mha} + ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest0.mha + itkPhysicalPointImageSourceTest + ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest0.mha + 0) +itk_add_test( + NAME + itkPhysicalPointImageSourceTest1 + COMMAND + ITKImageSourcesTestDriver + # this should be the same baseline as test 0 + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkPhysicalPointImageSourceTest0.mha} + ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest1.mha + itkPhysicalPointImageSourceTest + ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest1.mha + 1) +itk_add_test( + NAME + itkPhysicalPointImageSourceTest2 + COMMAND + ITKImageSourcesTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkPhysicalPointImageSourceTest2.mha} + ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest2.mha + itkPhysicalPointImageSourceTest + ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest2.mha + 2) +itk_add_test( + NAME + itkPhysicalPointImageSourceTest3 + COMMAND + ITKImageSourcesTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkPhysicalPointImageSourceTest0.mha} + ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest3.mha + itkPhysicalPointImageSourceTest + ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest3.mha + 3 + 0.0) +itk_add_test( + NAME + itkPhysicalPointImageSourceTest4 + COMMAND + ITKImageSourcesTestDriver + --compareIntensityTolerance + .0001 + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkPhysicalPointImageSourceTest4.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest4.nrrd + itkPhysicalPointImageSourceTest + ${ITK_TEST_OUTPUT_DIR}/itkPhysicalPointImageSourceTest4.nrrd + 3 + 0.785398163) diff --git a/Modules/Filtering/ImageSources/wrapping/itkGaborImageSource.wrap b/Modules/Filtering/ImageSources/wrapping/itkGaborImageSource.wrap index 385fd080992..d9ea6533884 100644 --- a/Modules/Filtering/ImageSources/wrapping/itkGaborImageSource.wrap +++ b/Modules/Filtering/ImageSources/wrapping/itkGaborImageSource.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::GaborImageSource" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageSources/wrapping/itkGaussianImageSource.wrap b/Modules/Filtering/ImageSources/wrapping/itkGaussianImageSource.wrap index d621856e1bb..8399908b6de 100644 --- a/Modules/Filtering/ImageSources/wrapping/itkGaussianImageSource.wrap +++ b/Modules/Filtering/ImageSources/wrapping/itkGaussianImageSource.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::GaussianImageSource" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageSources/wrapping/itkGenerateImageSource.wrap b/Modules/Filtering/ImageSources/wrapping/itkGenerateImageSource.wrap index e792802e1cf..87da7e3fccf 100644 --- a/Modules/Filtering/ImageSources/wrapping/itkGenerateImageSource.wrap +++ b/Modules/Filtering/ImageSources/wrapping/itkGenerateImageSource.wrap @@ -1,20 +1,20 @@ itk_wrap_class("itk::GenerateImageSource" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) - # VectorImages - UNIQUE(to_types "UC;${WRAP_ITK_SCALAR}") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${to_types}) - itk_wrap_template("${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}}") - endforeach() +# VectorImages +unique(to_types "UC;${WRAP_ITK_SCALAR}") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${to_types}) + itk_wrap_template("${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}}") endforeach() +endforeach() - # SymmetricSecondRankTensor Images - UNIQUE(ssrt_types "${WRAP_ITK_REAL};D") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${ssrt_types}) - itk_wrap_template("${ITKM_ISSRT${ITKM_${t}}${d}${d}}" "${ITKT_ISSRT${ITKM_${t}}${d}${d}}") - endforeach() +# SymmetricSecondRankTensor Images +unique(ssrt_types "${WRAP_ITK_REAL};D") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${ssrt_types}) + itk_wrap_template("${ITKM_ISSRT${ITKM_${t}}${d}${d}}" "${ITKT_ISSRT${ITKM_${t}}${d}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageSources/wrapping/itkGridImageSource.wrap b/Modules/Filtering/ImageSources/wrapping/itkGridImageSource.wrap index eb0242f3ec0..4087ca84002 100644 --- a/Modules/Filtering/ImageSources/wrapping/itkGridImageSource.wrap +++ b/Modules/Filtering/ImageSources/wrapping/itkGridImageSource.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::GridImageSource" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageSources/wrapping/itkParametricImageSource.wrap b/Modules/Filtering/ImageSources/wrapping/itkParametricImageSource.wrap index 1977295c744..af0ccded052 100644 --- a/Modules/Filtering/ImageSources/wrapping/itkParametricImageSource.wrap +++ b/Modules/Filtering/ImageSources/wrapping/itkParametricImageSource.wrap @@ -1,12 +1,12 @@ itk_wrap_class("itk::ParametricImageSource" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) - # VectorImages - UNIQUE(to_types "UC;${WRAP_ITK_SCALAR}") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${to_types}) - itk_wrap_template("${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}}") - endforeach() +# VectorImages +unique(to_types "UC;${WRAP_ITK_SCALAR}") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${to_types}) + itk_wrap_template("${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}}") endforeach() - unset(to_types) +endforeach() +unset(to_types) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageSources/wrapping/itkPhysicalPointImageSource.wrap b/Modules/Filtering/ImageSources/wrapping/itkPhysicalPointImageSource.wrap index e699782eb8b..406840aa1cf 100644 --- a/Modules/Filtering/ImageSources/wrapping/itkPhysicalPointImageSource.wrap +++ b/Modules/Filtering/ImageSources/wrapping/itkPhysicalPointImageSource.wrap @@ -1,12 +1,12 @@ itk_wrap_class("itk::PhysicalPointImageSource" POINTER) - itk_wrap_image_filter("${WRAP_ITK_VECTOR}" 1) +itk_wrap_image_filter("${WRAP_ITK_VECTOR}" 1) - # VectorImages - UNIQUE(to_types "UC;${WRAP_ITK_SCALAR}") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${to_types}) - itk_wrap_template("${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}}") - endforeach() +# VectorImages +unique(to_types "UC;${WRAP_ITK_SCALAR}") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${to_types}) + itk_wrap_template("${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageStatistics/itk-module.cmake b/Modules/Filtering/ImageStatistics/itk-module.cmake index e62c5b439ef..9ebf0dbe16e 100644 --- a/Modules/Filtering/ImageStatistics/itk-module.cmake +++ b/Modules/Filtering/ImageStatistics/itk-module.cmake @@ -1,24 +1,25 @@ -set(DOCUMENTATION "This module contains classes that compute statistics on +set(DOCUMENTATION + "This module contains classes that compute statistics on images, or use those statistics to perform image operations. In particular you will find here: how to calculate image moments, minimum maximum values, projections, principal components analysis (PCA) for shape modeling, computation of label statistics and image accumulation.") -itk_module(ITKImageStatistics +itk_module( + ITKImageStatistics COMPILE_DEPENDS - ITKImageFilterBase - ITKTransform - ITKSpatialObjects - ITKImageCompose + ITKImageFilterBase + ITKTransform + ITKSpatialObjects + ITKImageCompose TEST_DEPENDS - ITKTestKernel - ITKIOGDCM - ITKIOMeta - ITKImageIntensity - ITKThresholding - ITKImageLabel + ITKTestKernel + ITKIOGDCM + ITKIOMeta + ITKImageIntensity + ITKThresholding + ITKImageLabel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") # Extra test dependency on ImageLabel is introduced by itkBinaryProjectionImageFilterTest. diff --git a/Modules/Filtering/ImageStatistics/test/CMakeLists.txt b/Modules/Filtering/ImageStatistics/test/CMakeLists.txt index bb07190348f..37058a70a48 100644 --- a/Modules/Filtering/ImageStatistics/test/CMakeLists.txt +++ b/Modules/Filtering/ImageStatistics/test/CMakeLists.txt @@ -1,187 +1,402 @@ itk_module_test() set(ITKImageStatisticsTests -itkStatisticsImageFilterTest.cxx -itkLabelStatisticsImageFilterTest.cxx -itkSumProjectionImageFilterTest.cxx -itkStandardDeviationProjectionImageFilterTest.cxx -itkImageMomentsTest.cxx -itkMinimumMaximumImageFilterTest.cxx -itkImagePCAShapeModelEstimatorTest.cxx -itkMaximumProjectionImageFilterTest2.cxx -itkMaximumProjectionImageFilterTest3.cxx -itkMinimumProjectionImageFilterTest.cxx -itkMeanProjectionImageFilterTest.cxx -itkImagePCADecompositionCalculatorTest.cxx -itkMaximumProjectionImageFilterTest.cxx -itkMedianProjectionImageFilterTest.cxx -itkHistogramToEntropyImageFilterTest1.cxx -itkHistogramToEntropyImageFilterTest2.cxx -itkHistogramToIntensityImageFilterTest1.cxx -itkHistogramToIntensityImageFilterTest2.cxx -itkHistogramToLogProbabilityImageFilterTest1.cxx -itkHistogramToLogProbabilityImageFilterTest2.cxx -itkHistogramToProbabilityImageFilterTest1.cxx -itkHistogramToProbabilityImageFilterTest2.cxx -itkAccumulateImageFilterTest.cxx -itkAdaptiveHistogramEqualizationImageFilterTest.cxx -itkGetAverageSliceImageFilterTest.cxx -itkBinaryProjectionImageFilterTest.cxx -itkProjectionImageFilterTest.cxx + itkStatisticsImageFilterTest.cxx + itkLabelStatisticsImageFilterTest.cxx + itkSumProjectionImageFilterTest.cxx + itkStandardDeviationProjectionImageFilterTest.cxx + itkImageMomentsTest.cxx + itkMinimumMaximumImageFilterTest.cxx + itkImagePCAShapeModelEstimatorTest.cxx + itkMaximumProjectionImageFilterTest2.cxx + itkMaximumProjectionImageFilterTest3.cxx + itkMinimumProjectionImageFilterTest.cxx + itkMeanProjectionImageFilterTest.cxx + itkImagePCADecompositionCalculatorTest.cxx + itkMaximumProjectionImageFilterTest.cxx + itkMedianProjectionImageFilterTest.cxx + itkHistogramToEntropyImageFilterTest1.cxx + itkHistogramToEntropyImageFilterTest2.cxx + itkHistogramToIntensityImageFilterTest1.cxx + itkHistogramToIntensityImageFilterTest2.cxx + itkHistogramToLogProbabilityImageFilterTest1.cxx + itkHistogramToLogProbabilityImageFilterTest2.cxx + itkHistogramToProbabilityImageFilterTest1.cxx + itkHistogramToProbabilityImageFilterTest2.cxx + itkAccumulateImageFilterTest.cxx + itkAdaptiveHistogramEqualizationImageFilterTest.cxx + itkGetAverageSliceImageFilterTest.cxx + itkBinaryProjectionImageFilterTest.cxx + itkProjectionImageFilterTest.cxx + itkLabelOverlapMeasuresImageFilterTest.cxx) -itkLabelOverlapMeasuresImageFilterTest.cxx -) +createtestdriver(ITKImageStatistics "${ITKImageStatistics-Test_LIBRARIES}" "${ITKImageStatisticsTests}") -CreateTestDriver(ITKImageStatistics "${ITKImageStatistics-Test_LIBRARIES}" "${ITKImageStatisticsTests}") +itk_add_test( + NAME + itkStatisticsImageFilterTest_1 + COMMAND + ITKImageStatisticsTestDriver + itkStatisticsImageFilterTest) +itk_add_test( + NAME + itkStatisticsImageFilterTest_2 + COMMAND + ITKImageStatisticsTestDriver + itkStatisticsImageFilterTest + 1) +itk_add_test( + NAME + itkStatisticsImageFilterTest_3 + COMMAND + ITKImageStatisticsTestDriver + itkStatisticsImageFilterTest + 63) +itk_add_test( + NAME + itkLabelStatisticsImageFilterTest_1 + COMMAND + ITKImageStatisticsTestDriver + itkLabelStatisticsImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/peppers.png} + DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/OtsuMultipleThresholdsImageFilterTest.png} + 1) +itk_add_test( + NAME + itkLabelStatisticsImageFilterTest_2 + COMMAND + ITKImageStatisticsTestDriver + itkLabelStatisticsImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/peppers.png} + DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/OtsuMultipleThresholdsImageFilterTest.png} + 1 + 10) +itk_add_test( + NAME + itkLabelStatisticsImageFilterTest_3 + COMMAND + ITKImageStatisticsTestDriver + itkLabelStatisticsImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/peppers.png} + DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/OtsuMultipleThresholdsImageFilterTest.png} + 1 + 20) +itk_add_test( + NAME + itkSumProjectionImageFilterTest + COMMAND + ITKImageStatisticsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeSumProjection.tif} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeSumProjection.tif + itkSumProjectionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeSumProjection.tif) +itk_add_test( + NAME + itkStandardDeviationProjectionImageFilterTest + COMMAND + ITKImageStatisticsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeStandardDeviationProjection.tif} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeStandardDeviationProjection.tif + itkStandardDeviationProjectionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeStandardDeviationProjection.tif) +itk_add_test( + NAME + itkImageMomentsNoMaskTest + COMMAND + ITKImageStatisticsTestDriver + itkImageMomentsTest + nomask) +itk_add_test( + NAME + itkImageMomentsWithMaskTest + COMMAND + ITKImageStatisticsTestDriver + itkImageMomentsTest + mask) +itk_add_test( + NAME + itkMinimumMaximumImageFilterTest + COMMAND + ITKImageStatisticsTestDriver + itkMinimumMaximumImageFilterTest + 1) +itk_add_test( + NAME + itkImagePCAShapeModelEstimatorTest + COMMAND + ITKImageStatisticsTestDriver + itkImagePCAShapeModelEstimatorTest) +itk_add_test( + NAME + itkMaximumProjectionImageFilterTest2_1 + COMMAND + ITKImageStatisticsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeMaximumProjection0.mha} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection0.mha + itkMaximumProjectionImageFilterTest2 + 0 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection0.mha) +itk_add_test( + NAME + itkMaximumProjectionImageFilterTest2_2 + COMMAND + ITKImageStatisticsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeMaximumProjection1.mha} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection1.mha + itkMaximumProjectionImageFilterTest2 + 1 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection1.mha) +itk_add_test( + NAME + itkMaximumProjectionImageFilterTest3_1 + COMMAND + ITKImageStatisticsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeMaximumProjection2D0.mha} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection2D0.mha + itkMaximumProjectionImageFilterTest3 + 0 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection2D0.mha) +itk_add_test( + NAME + itkMaximumProjectionImageFilterTest3_2 + COMMAND + ITKImageStatisticsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeMaximumProjection2D1.tif} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection2D1.tif + itkMaximumProjectionImageFilterTest3 + 1 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection2D1.tif) +itk_add_test( + NAME + itkMinimumProjectionImageFilterTest + COMMAND + ITKImageStatisticsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeMinimumProjection.tif} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMinimumProjection.tif + itkMinimumProjectionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMinimumProjection.tif) +itk_add_test( + NAME + itkMeanProjectionImageFilterTest + COMMAND + ITKImageStatisticsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeMeanProjection.tif} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMeanProjection.tif + itkMeanProjectionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMeanProjection.tif) +itk_add_test( + NAME + itkImagePCADecompositionCalculatorTest + COMMAND + ITKImageStatisticsTestDriver + itkImagePCADecompositionCalculatorTest) +itk_add_test( + NAME + itkMaximumProjectionImageFilterTest + COMMAND + ITKImageStatisticsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeMaximumProjection.tif} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection.tif + itkMaximumProjectionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection.tif) +itk_add_test( + NAME + itkMedianProjectionImageFilterTest + COMMAND + ITKImageStatisticsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeMedianProjection.tif} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMedianProjection.tif + itkMedianProjectionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMedianProjection.tif) +itk_add_test( + NAME + itkHistogramToEntropyImageFilterTest1 + COMMAND + ITKImageStatisticsTestDriver + itkHistogramToEntropyImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkHistogramToEntropyImageFilterTest1.mhd) +itk_add_test( + NAME + itkHistogramToEntropyImageFilterTest2 + COMMAND + ITKImageStatisticsTestDriver + itkHistogramToEntropyImageFilterTest2 + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainT1Slice.png + ${ITK_TEST_OUTPUT_DIR}/itkHistogramToEntropyImageFilterTest2.mhd) +itk_add_test( + NAME + itkHistogramToIntensityImageFilterTest1 + COMMAND + ITKImageStatisticsTestDriver + itkHistogramToIntensityImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkHistogramToIntensityImageFilterTest1.mhd) +itk_add_test( + NAME + itkHistogramToIntensityImageFilterTest2 + COMMAND + ITKImageStatisticsTestDriver + itkHistogramToIntensityImageFilterTest2 + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainT1Slice.png + ${ITK_TEST_OUTPUT_DIR}/itkHistogramToIntensityImageFilterTest2.mhd) +itk_add_test( + NAME + itkHistogramToLogProbabilityImageFilterTest1 + COMMAND + ITKImageStatisticsTestDriver + itkHistogramToLogProbabilityImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkHistogramToLogProbabilityImageFilterTest1.mhd) +itk_add_test( + NAME + itkHistogramToLogProbabilityImageFilterTest2 + COMMAND + ITKImageStatisticsTestDriver + itkHistogramToLogProbabilityImageFilterTest2 + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainT1Slice.png + ${ITK_TEST_OUTPUT_DIR}/itkHistogramToLogProbabilityImageFilterTest2.mhd) +itk_add_test( + NAME + itkHistogramToProbabilityImageFilterTest1 + COMMAND + ITKImageStatisticsTestDriver + itkHistogramToProbabilityImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkHistogramToProbabilityImageFilterTest1.mhd) +itk_add_test( + NAME + itkHistogramToProbabilityImageFilterTest2 + COMMAND + ITKImageStatisticsTestDriver + itkHistogramToProbabilityImageFilterTest2 + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainT1Slice.png + ${ITK_TEST_OUTPUT_DIR}/itkHistogramToProbabilityImageFilterTest2.mhd) -itk_add_test(NAME itkStatisticsImageFilterTest_1 - COMMAND ITKImageStatisticsTestDriver itkStatisticsImageFilterTest) -itk_add_test(NAME itkStatisticsImageFilterTest_2 - COMMAND ITKImageStatisticsTestDriver itkStatisticsImageFilterTest 1) -itk_add_test(NAME itkStatisticsImageFilterTest_3 - COMMAND ITKImageStatisticsTestDriver itkStatisticsImageFilterTest 63) -itk_add_test(NAME itkLabelStatisticsImageFilterTest_1 - COMMAND ITKImageStatisticsTestDriver itkLabelStatisticsImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/peppers.png} - DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/OtsuMultipleThresholdsImageFilterTest.png} 1) -itk_add_test(NAME itkLabelStatisticsImageFilterTest_2 - COMMAND ITKImageStatisticsTestDriver itkLabelStatisticsImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/peppers.png} - DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/OtsuMultipleThresholdsImageFilterTest.png} - 1 10) -itk_add_test(NAME itkLabelStatisticsImageFilterTest_3 - COMMAND ITKImageStatisticsTestDriver itkLabelStatisticsImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/peppers.png} - DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/OtsuMultipleThresholdsImageFilterTest.png} - 1 20) -itk_add_test(NAME itkSumProjectionImageFilterTest - COMMAND ITKImageStatisticsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeSumProjection.tif} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeSumProjection.tif - itkSumProjectionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeSumProjection.tif) -itk_add_test(NAME itkStandardDeviationProjectionImageFilterTest - COMMAND ITKImageStatisticsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeStandardDeviationProjection.tif} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeStandardDeviationProjection.tif - itkStandardDeviationProjectionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeStandardDeviationProjection.tif) -itk_add_test(NAME itkImageMomentsNoMaskTest - COMMAND ITKImageStatisticsTestDriver itkImageMomentsTest nomask) -itk_add_test(NAME itkImageMomentsWithMaskTest - COMMAND ITKImageStatisticsTestDriver itkImageMomentsTest mask) -itk_add_test(NAME itkMinimumMaximumImageFilterTest - COMMAND ITKImageStatisticsTestDriver itkMinimumMaximumImageFilterTest 1) -itk_add_test(NAME itkImagePCAShapeModelEstimatorTest - COMMAND ITKImageStatisticsTestDriver itkImagePCAShapeModelEstimatorTest) -itk_add_test(NAME itkMaximumProjectionImageFilterTest2_1 - COMMAND ITKImageStatisticsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeMaximumProjection0.mha} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection0.mha - itkMaximumProjectionImageFilterTest2 0 DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection0.mha) -itk_add_test(NAME itkMaximumProjectionImageFilterTest2_2 - COMMAND ITKImageStatisticsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeMaximumProjection1.mha} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection1.mha - itkMaximumProjectionImageFilterTest2 1 DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection1.mha) -itk_add_test(NAME itkMaximumProjectionImageFilterTest3_1 - COMMAND ITKImageStatisticsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeMaximumProjection2D0.mha} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection2D0.mha - itkMaximumProjectionImageFilterTest3 0 DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection2D0.mha) -itk_add_test(NAME itkMaximumProjectionImageFilterTest3_2 - COMMAND ITKImageStatisticsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeMaximumProjection2D1.tif} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection2D1.tif - itkMaximumProjectionImageFilterTest3 1 DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection2D1.tif) -itk_add_test(NAME itkMinimumProjectionImageFilterTest - COMMAND ITKImageStatisticsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeMinimumProjection.tif} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMinimumProjection.tif - itkMinimumProjectionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMinimumProjection.tif) -itk_add_test(NAME itkMeanProjectionImageFilterTest - COMMAND ITKImageStatisticsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeMeanProjection.tif} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMeanProjection.tif - itkMeanProjectionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMeanProjection.tif) -itk_add_test(NAME itkImagePCADecompositionCalculatorTest - COMMAND ITKImageStatisticsTestDriver itkImagePCADecompositionCalculatorTest) -itk_add_test(NAME itkMaximumProjectionImageFilterTest - COMMAND ITKImageStatisticsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeMaximumProjection.tif} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection.tif - itkMaximumProjectionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMaximumProjection.tif) -itk_add_test(NAME itkMedianProjectionImageFilterTest - COMMAND ITKImageStatisticsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeMedianProjection.tif} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMedianProjection.tif - itkMedianProjectionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeMedianProjection.tif) -itk_add_test(NAME itkHistogramToEntropyImageFilterTest1 - COMMAND ITKImageStatisticsTestDriver itkHistogramToEntropyImageFilterTest1 - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkHistogramToEntropyImageFilterTest1.mhd) -itk_add_test(NAME itkHistogramToEntropyImageFilterTest2 - COMMAND ITKImageStatisticsTestDriver itkHistogramToEntropyImageFilterTest2 - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png ${ITK_EXAMPLE_DATA_ROOT}/BrainT1Slice.png ${ITK_TEST_OUTPUT_DIR}/itkHistogramToEntropyImageFilterTest2.mhd) -itk_add_test(NAME itkHistogramToIntensityImageFilterTest1 - COMMAND ITKImageStatisticsTestDriver itkHistogramToIntensityImageFilterTest1 - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkHistogramToIntensityImageFilterTest1.mhd) -itk_add_test(NAME itkHistogramToIntensityImageFilterTest2 - COMMAND ITKImageStatisticsTestDriver itkHistogramToIntensityImageFilterTest2 - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png ${ITK_EXAMPLE_DATA_ROOT}/BrainT1Slice.png ${ITK_TEST_OUTPUT_DIR}/itkHistogramToIntensityImageFilterTest2.mhd) -itk_add_test(NAME itkHistogramToLogProbabilityImageFilterTest1 - COMMAND ITKImageStatisticsTestDriver itkHistogramToLogProbabilityImageFilterTest1 - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkHistogramToLogProbabilityImageFilterTest1.mhd) -itk_add_test(NAME itkHistogramToLogProbabilityImageFilterTest2 - COMMAND ITKImageStatisticsTestDriver itkHistogramToLogProbabilityImageFilterTest2 - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png ${ITK_EXAMPLE_DATA_ROOT}/BrainT1Slice.png ${ITK_TEST_OUTPUT_DIR}/itkHistogramToLogProbabilityImageFilterTest2.mhd) -itk_add_test(NAME itkHistogramToProbabilityImageFilterTest1 - COMMAND ITKImageStatisticsTestDriver itkHistogramToProbabilityImageFilterTest1 - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkHistogramToProbabilityImageFilterTest1.mhd) -itk_add_test(NAME itkHistogramToProbabilityImageFilterTest2 - COMMAND ITKImageStatisticsTestDriver itkHistogramToProbabilityImageFilterTest2 - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png ${ITK_EXAMPLE_DATA_ROOT}/BrainT1Slice.png ${ITK_TEST_OUTPUT_DIR}/itkHistogramToProbabilityImageFilterTest2.mhd) +itk_add_test( + NAME + itkAccumulateImageFilterTest + COMMAND + ITKImageStatisticsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/AccumulateImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/AccumulateImageFilterTest.png + itkAccumulateImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} + ${ITK_TEST_OUTPUT_DIR}/AccumulateImageFilterTest.png) +itk_add_test( + NAME + itkAdaptiveHistogramEqualizationImageFilterTest + COMMAND + ITKImageStatisticsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/AdaptiveHistogramEqualizationImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/AdaptiveHistogramEqualizationImageFilterTest.png + itkAdaptiveHistogramEqualizationImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/sf4.png} + ${ITK_TEST_OUTPUT_DIR}/AdaptiveHistogramEqualizationImageFilterTest.png + 10 + 0.5 + 0.5) +itk_add_test( + NAME + itkAdaptiveHistogramEqualizationImageFilterTest2 + COMMAND + ITKImageStatisticsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/AdaptiveHistogramEqualizationImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/AdaptiveHistogramEqualizationImageFilterTest2.png + itkAdaptiveHistogramEqualizationImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/sf4.png} + ${ITK_TEST_OUTPUT_DIR}/AdaptiveHistogramEqualizationImageFilterTest2.png + 10 + 1.0 + 0.25) +itk_add_test( + NAME + itkGetAverageSliceImageFilterTest + COMMAND + ITKImageStatisticsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/AccumulateImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/GetAverageSliceImageFilterTest.png + itkGetAverageSliceImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} + ${ITK_TEST_OUTPUT_DIR}/GetAverageSliceImageFilterTest.png + 2) +itk_add_test( + NAME + itkBinaryProjectionImageFilterTest1 + COMMAND + ITKImageStatisticsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeBinaryProjection100.tif} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeBinaryProjection100.tif + itkBinaryProjectionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeBinaryProjection100.tif + 100 + 0) +itk_add_test( + NAME + itkBinaryProjectionImageFilterTest2 + COMMAND + ITKImageStatisticsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeBinaryProjection200.tif} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeBinaryProjection200.tif + itkBinaryProjectionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeBinaryProjection200.tif + 200 + 0) +itk_add_test( + NAME + itkProjectionImageFilterTest1 + COMMAND + ITKImageStatisticsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeBinaryProjection100.tif} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeProjection100.tif + itkProjectionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeProjection100.tif + 100 + 0) -itk_add_test(NAME itkAccumulateImageFilterTest - COMMAND ITKImageStatisticsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/AccumulateImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/AccumulateImageFilterTest.png - itkAccumulateImageFilterTest DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} ${ITK_TEST_OUTPUT_DIR}/AccumulateImageFilterTest.png) -itk_add_test(NAME itkAdaptiveHistogramEqualizationImageFilterTest - COMMAND ITKImageStatisticsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/AdaptiveHistogramEqualizationImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/AdaptiveHistogramEqualizationImageFilterTest.png - itkAdaptiveHistogramEqualizationImageFilterTest DATA{${ITK_DATA_ROOT}/Input/sf4.png} ${ITK_TEST_OUTPUT_DIR}/AdaptiveHistogramEqualizationImageFilterTest.png 10 0.5 0.5) -itk_add_test(NAME itkAdaptiveHistogramEqualizationImageFilterTest2 - COMMAND ITKImageStatisticsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/AdaptiveHistogramEqualizationImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/AdaptiveHistogramEqualizationImageFilterTest2.png - itkAdaptiveHistogramEqualizationImageFilterTest DATA{${ITK_DATA_ROOT}/Input/sf4.png} ${ITK_TEST_OUTPUT_DIR}/AdaptiveHistogramEqualizationImageFilterTest2.png 10 1.0 0.25) -itk_add_test(NAME itkGetAverageSliceImageFilterTest - COMMAND ITKImageStatisticsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/AccumulateImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/GetAverageSliceImageFilterTest.png - itkGetAverageSliceImageFilterTest DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} ${ITK_TEST_OUTPUT_DIR}/GetAverageSliceImageFilterTest.png 2) -itk_add_test(NAME itkBinaryProjectionImageFilterTest1 - COMMAND ITKImageStatisticsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeBinaryProjection100.tif} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeBinaryProjection100.tif - itkBinaryProjectionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeBinaryProjection100.tif 100 0) -itk_add_test(NAME itkBinaryProjectionImageFilterTest2 - COMMAND ITKImageStatisticsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeBinaryProjection200.tif} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeBinaryProjection200.tif - itkBinaryProjectionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeBinaryProjection200.tif 200 0) -itk_add_test(NAME itkProjectionImageFilterTest1 - COMMAND ITKImageStatisticsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeBinaryProjection100.tif} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeProjection100.tif - itkProjectionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeProjection100.tif 100 0) +itk_add_test( + NAME + itkLabelOverlapMeasuresImageFilterTest + COMMAND + ITKImageStatisticsTestDriver + itkLabelOverlapMeasuresImageFilterTest + 2 + DATA{Input/sourceImage.nii.gz} + DATA{Input/targetImage.nii.gz}) -itk_add_test(NAME itkLabelOverlapMeasuresImageFilterTest - COMMAND ITKImageStatisticsTestDriver - itkLabelOverlapMeasuresImageFilterTest 2 - DATA{Input/sourceImage.nii.gz} - DATA{Input/targetImage.nii.gz}) +set(ITKImageStatisticsGTests itkLabelOverlapMeasuresImageFilterGTest.cxx itkMinimumMaximumImageFilterGTest.cxx) -set(ITKImageStatisticsGTests - itkLabelOverlapMeasuresImageFilterGTest.cxx - itkMinimumMaximumImageFilterGTest.cxx) - -CreateGoogleTestDriver(ITKImageStatistics "${ITKImageStatistics-Test_LIBRARIES}" "${ITKImageStatisticsGTests}") +creategoogletestdriver(ITKImageStatistics "${ITKImageStatistics-Test_LIBRARIES}" "${ITKImageStatisticsGTests}") diff --git a/Modules/Filtering/ImageStatistics/wrapping/itkAccumulateImageFilter.wrap b/Modules/Filtering/ImageStatistics/wrapping/itkAccumulateImageFilter.wrap index d58b79913eb..b2318192676 100644 --- a/Modules/Filtering/ImageStatistics/wrapping/itkAccumulateImageFilter.wrap +++ b/Modules/Filtering/ImageStatistics/wrapping/itkAccumulateImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::AccumulateImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageStatistics/wrapping/itkAdaptiveHistogramEqualizationImageFilter.wrap b/Modules/Filtering/ImageStatistics/wrapping/itkAdaptiveHistogramEqualizationImageFilter.wrap index 02a935890a4..b26d664b607 100644 --- a/Modules/Filtering/ImageStatistics/wrapping/itkAdaptiveHistogramEqualizationImageFilter.wrap +++ b/Modules/Filtering/ImageStatistics/wrapping/itkAdaptiveHistogramEqualizationImageFilter.wrap @@ -1,36 +1,41 @@ itk_wrap_class("itk::KernelImageFilter" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}Neighborhood" "${ITKT_I${t}${d}}, ${ITKT_I${t}${d}}, itk::Neighborhood< bool, ${d} >") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}Neighborhood" + "${ITKT_I${t}${d}}, ${ITKT_I${t}${d}}, itk::Neighborhood< bool, ${d} >") endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::MovingHistogramImageFilterBase" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}Neighborhood" "${ITKT_I${t}${d}}, ${ITKT_I${t}${d}}, itk::Neighborhood< bool, ${d} >") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}Neighborhood" + "${ITKT_I${t}${d}}, ${ITKT_I${t}${d}}, itk::Neighborhood< bool, ${d} >") endforeach() +endforeach() itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkAdaptiveEqualizationHistogram.h") itk_wrap_class("itk::Function::AdaptiveEqualizationHistogram") - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_${t}}${ITKM_${t}}" "${ITKT_${t}}, ${ITKT_${t}}") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_${t}}${ITKM_${t}}" "${ITKT_${t}}, ${ITKT_${t}}") +endforeach() itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS ON) itk_wrap_class("itk::MovingHistogramImageFilter" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}NeighborhoodAHE" "${ITKT_I${t}${d}}, ${ITKT_I${t}${d}}, itk::Neighborhood< bool, ${d} >, itk::Function::AdaptiveEqualizationHistogram< ${ITKT_${t}}, ${ITKT_${t}} >") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template( + "${ITKM_I${t}${d}}${ITKM_I${t}${d}}NeighborhoodAHE" + "${ITKT_I${t}${d}}, ${ITKT_I${t}${d}}, itk::Neighborhood< bool, ${d} >, itk::Function::AdaptiveEqualizationHistogram< ${ITKT_${t}}, ${ITKT_${t}} >" + ) endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::AdaptiveHistogramEqualizationImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageStatistics/wrapping/itkBinaryProjectionImageFilter.wrap b/Modules/Filtering/ImageStatistics/wrapping/itkBinaryProjectionImageFilter.wrap index 7cc77ef464a..c52a2ee8cc1 100644 --- a/Modules/Filtering/ImageStatistics/wrapping/itkBinaryProjectionImageFilter.wrap +++ b/Modules/Filtering/ImageStatistics/wrapping/itkBinaryProjectionImageFilter.wrap @@ -1,14 +1,14 @@ itk_wrap_class("itk::BinaryProjectionImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) - # reduce the output dimension by 1, if possible - foreach(t ${WRAP_ITK_INT}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - DECREMENT(d1 ${d}) - itk_wrap_filter_dims(d2 "${d1}") - if(d2) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") - endif() - endforeach() +# reduce the output dimension by 1, if possible +foreach(t ${WRAP_ITK_INT}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + decrement(d1 ${d}) + itk_wrap_filter_dims(d2 "${d1}") + if(d2) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") + endif() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageStatistics/wrapping/itkImageMomentsCalculator.wrap b/Modules/Filtering/ImageStatistics/wrapping/itkImageMomentsCalculator.wrap index eedba408390..2ee9d9df47d 100644 --- a/Modules/Filtering/ImageStatistics/wrapping/itkImageMomentsCalculator.wrap +++ b/Modules/Filtering/ImageStatistics/wrapping/itkImageMomentsCalculator.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ImageMomentsCalculator" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageStatistics/wrapping/itkImagePCAShapeModelEstimator.wrap b/Modules/Filtering/ImageStatistics/wrapping/itkImagePCAShapeModelEstimator.wrap index 22a9a1e45f1..8074a9c8485 100644 --- a/Modules/Filtering/ImageStatistics/wrapping/itkImagePCAShapeModelEstimator.wrap +++ b/Modules/Filtering/ImageStatistics/wrapping/itkImagePCAShapeModelEstimator.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::ImagePCAShapeModelEstimator" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t1 ${WRAP_ITK_SCALAR}) - foreach(t2 ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t1}${d}}${ITKM_I${t2}${d}}" "${ITKT_I${t1}${d}}, ${ITKT_I${t2}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t1 ${WRAP_ITK_SCALAR}) + foreach(t2 ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t1}${d}}${ITKM_I${t2}${d}}" "${ITKT_I${t1}${d}}, ${ITKT_I${t2}${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageStatistics/wrapping/itkImageShapeModelEstimatorBase.wrap b/Modules/Filtering/ImageStatistics/wrapping/itkImageShapeModelEstimatorBase.wrap index c2b2e9bd1b5..65eb5d9e09f 100644 --- a/Modules/Filtering/ImageStatistics/wrapping/itkImageShapeModelEstimatorBase.wrap +++ b/Modules/Filtering/ImageStatistics/wrapping/itkImageShapeModelEstimatorBase.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::ImageShapeModelEstimatorBase" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t1 ${WRAP_ITK_SCALAR}) - foreach(t2 ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t1}${d}}${ITKM_I${t2}${d}}" "${ITKT_I${t1}${d}}, ${ITKT_I${t2}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t1 ${WRAP_ITK_SCALAR}) + foreach(t2 ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t1}${d}}${ITKM_I${t2}${d}}" "${ITKT_I${t1}${d}}, ${ITKT_I${t2}${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageStatistics/wrapping/itkLabelOverlapMeasuresImageFilter.wrap b/Modules/Filtering/ImageStatistics/wrapping/itkLabelOverlapMeasuresImageFilter.wrap index a097389d8aa..d126af4cb9a 100644 --- a/Modules/Filtering/ImageStatistics/wrapping/itkLabelOverlapMeasuresImageFilter.wrap +++ b/Modules/Filtering/ImageStatistics/wrapping/itkLabelOverlapMeasuresImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::LabelOverlapMeasuresImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_INT}" 1) +itk_wrap_image_filter("${WRAP_ITK_INT}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageStatistics/wrapping/itkLabelStatisticsImageFilter.wrap b/Modules/Filtering/ImageStatistics/wrapping/itkLabelStatisticsImageFilter.wrap index 8bcaf814839..9f0e3562007 100644 --- a/Modules/Filtering/ImageStatistics/wrapping/itkLabelStatisticsImageFilter.wrap +++ b/Modules/Filtering/ImageStatistics/wrapping/itkLabelStatisticsImageFilter.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::LabelStatisticsImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t1 ${WRAP_ITK_SCALAR}) - foreach(t2 ${WRAP_ITK_USIGN_INT} ${WRAP_ITK_SIGN_INT}) - itk_wrap_template("${ITKM_I${t1}${d}}${ITKM_I${t2}${d}}" "${ITKT_I${t1}${d}},${ITKT_I${t2}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t1 ${WRAP_ITK_SCALAR}) + foreach(t2 ${WRAP_ITK_USIGN_INT} ${WRAP_ITK_SIGN_INT}) + itk_wrap_template("${ITKM_I${t1}${d}}${ITKM_I${t2}${d}}" "${ITKT_I${t1}${d}},${ITKT_I${t2}${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageStatistics/wrapping/itkMaximumProjectionImageFilter.wrap b/Modules/Filtering/ImageStatistics/wrapping/itkMaximumProjectionImageFilter.wrap index c1afb6ac195..fe2c535bf10 100644 --- a/Modules/Filtering/ImageStatistics/wrapping/itkMaximumProjectionImageFilter.wrap +++ b/Modules/Filtering/ImageStatistics/wrapping/itkMaximumProjectionImageFilter.wrap @@ -1,14 +1,14 @@ itk_wrap_class("itk::MaximumProjectionImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) - # reduce the output dimension by 1, if possible - foreach(t ${WRAP_ITK_SCALAR}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - DECREMENT(d1 ${d}) - itk_wrap_filter_dims(d2 "${d1}") - if(d2) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") - endif() - endforeach() +# reduce the output dimension by 1, if possible +foreach(t ${WRAP_ITK_SCALAR}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + decrement(d1 ${d}) + itk_wrap_filter_dims(d2 "${d1}") + if(d2) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") + endif() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageStatistics/wrapping/itkMeanProjectionImageFilter.wrap b/Modules/Filtering/ImageStatistics/wrapping/itkMeanProjectionImageFilter.wrap index 76a126ee920..c12a42b55c1 100644 --- a/Modules/Filtering/ImageStatistics/wrapping/itkMeanProjectionImageFilter.wrap +++ b/Modules/Filtering/ImageStatistics/wrapping/itkMeanProjectionImageFilter.wrap @@ -1,14 +1,14 @@ itk_wrap_class("itk::MeanProjectionImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) - # reduce the output dimension by 1, if possible - foreach(t ${WRAP_ITK_SCALAR}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - DECREMENT(d1 ${d}) - itk_wrap_filter_dims(d2 "${d1}") - if(d2) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") - endif() - endforeach() +# reduce the output dimension by 1, if possible +foreach(t ${WRAP_ITK_SCALAR}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + decrement(d1 ${d}) + itk_wrap_filter_dims(d2 "${d1}") + if(d2) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") + endif() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageStatistics/wrapping/itkMedianProjectionImageFilter.wrap b/Modules/Filtering/ImageStatistics/wrapping/itkMedianProjectionImageFilter.wrap index b1dd9fe0f2f..0777c5c16e1 100644 --- a/Modules/Filtering/ImageStatistics/wrapping/itkMedianProjectionImageFilter.wrap +++ b/Modules/Filtering/ImageStatistics/wrapping/itkMedianProjectionImageFilter.wrap @@ -1,14 +1,14 @@ itk_wrap_class("itk::MedianProjectionImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) - # reduce the output dimension by 1, if possible - foreach(t ${WRAP_ITK_SCALAR}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - DECREMENT(d1 ${d}) - itk_wrap_filter_dims(d2 "${d1}") - if(d2) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") - endif() - endforeach() +# reduce the output dimension by 1, if possible +foreach(t ${WRAP_ITK_SCALAR}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + decrement(d1 ${d}) + itk_wrap_filter_dims(d2 "${d1}") + if(d2) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") + endif() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageStatistics/wrapping/itkMinimumMaximumImageFilter.wrap b/Modules/Filtering/ImageStatistics/wrapping/itkMinimumMaximumImageFilter.wrap index 5ecf91e417d..7a5b348bc53 100644 --- a/Modules/Filtering/ImageStatistics/wrapping/itkMinimumMaximumImageFilter.wrap +++ b/Modules/Filtering/ImageStatistics/wrapping/itkMinimumMaximumImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MinimumMaximumImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageStatistics/wrapping/itkMinimumProjectionImageFilter.wrap b/Modules/Filtering/ImageStatistics/wrapping/itkMinimumProjectionImageFilter.wrap index 23fdffe7b6b..fe197a5ef15 100644 --- a/Modules/Filtering/ImageStatistics/wrapping/itkMinimumProjectionImageFilter.wrap +++ b/Modules/Filtering/ImageStatistics/wrapping/itkMinimumProjectionImageFilter.wrap @@ -1,14 +1,14 @@ itk_wrap_class("itk::MinimumProjectionImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) - # reduce the output dimension by 1, if possible - foreach(t ${WRAP_ITK_SCALAR}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - DECREMENT(d1 ${d}) - itk_wrap_filter_dims(d2 "${d1}") - if(d2) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") - endif() - endforeach() +# reduce the output dimension by 1, if possible +foreach(t ${WRAP_ITK_SCALAR}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + decrement(d1 ${d}) + itk_wrap_filter_dims(d2 "${d1}") + if(d2) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") + endif() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageStatistics/wrapping/itkStandardDeviationProjectionImageFilter.wrap b/Modules/Filtering/ImageStatistics/wrapping/itkStandardDeviationProjectionImageFilter.wrap index 0e47c70d8fb..fa91a354ea2 100644 --- a/Modules/Filtering/ImageStatistics/wrapping/itkStandardDeviationProjectionImageFilter.wrap +++ b/Modules/Filtering/ImageStatistics/wrapping/itkStandardDeviationProjectionImageFilter.wrap @@ -1,14 +1,14 @@ itk_wrap_class("itk::StandardDeviationProjectionImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) - # reduce the output dimension by 1, if possible - foreach(t ${WRAP_ITK_SCALAR}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - DECREMENT(d1 ${d}) - itk_wrap_filter_dims(d2 "${d1}") - if(d2) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") - endif() - endforeach() +# reduce the output dimension by 1, if possible +foreach(t ${WRAP_ITK_SCALAR}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + decrement(d1 ${d}) + itk_wrap_filter_dims(d2 "${d1}") + if(d2) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") + endif() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/ImageStatistics/wrapping/itkStatisticsImageFilter.wrap b/Modules/Filtering/ImageStatistics/wrapping/itkStatisticsImageFilter.wrap index 3094c695c90..83d77e2072f 100644 --- a/Modules/Filtering/ImageStatistics/wrapping/itkStatisticsImageFilter.wrap +++ b/Modules/Filtering/ImageStatistics/wrapping/itkStatisticsImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::StatisticsImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/ImageStatistics/wrapping/itkSumProjectionImageFilter.wrap b/Modules/Filtering/ImageStatistics/wrapping/itkSumProjectionImageFilter.wrap index 7b4b703cdac..36d7d76658e 100644 --- a/Modules/Filtering/ImageStatistics/wrapping/itkSumProjectionImageFilter.wrap +++ b/Modules/Filtering/ImageStatistics/wrapping/itkSumProjectionImageFilter.wrap @@ -1,14 +1,14 @@ itk_wrap_class("itk::SumProjectionImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) - # reduce the output dimension by 1, if possible - foreach(t ${WRAP_ITK_SCALAR}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - DECREMENT(d1 ${d}) - itk_wrap_filter_dims(d2 "${d1}") - if(d2) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") - endif() - endforeach() +# reduce the output dimension by 1, if possible +foreach(t ${WRAP_ITK_SCALAR}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + decrement(d1 ${d}) + itk_wrap_filter_dims(d2 "${d1}") + if(d2) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") + endif() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/itk-module.cmake b/Modules/Filtering/LabelMap/itk-module.cmake index e73dbc6d6d7..e7bb3064c72 100644 --- a/Modules/Filtering/LabelMap/itk-module.cmake +++ b/Modules/Filtering/LabelMap/itk-module.cmake @@ -1,24 +1,24 @@ -set(DOCUMENTATION "This module contains the infrastructure to store the label images +set(DOCUMENTATION + "This module contains the infrastructure to store the label images in an efficient and convenient way, including label images with overlapping objects. All the objects contained in the LabelMap can be associated to values called attributes. Some filters are available to compute the usual attributes values related to the shape of the objects or the pixels values in the objects and to manipulate the objects based on these values.") - -itk_module(ITKLabelMap +itk_module( + ITKLabelMap ENABLE_SHARED DEPENDS - ITKImageLabel + ITKImageLabel PRIVATE_DEPENDS - ITKStatistics + ITKStatistics COMPILE_DEPENDS - ITKTransform + ITKTransform TEST_DEPENDS - ITKTestKernel - ITKBinaryMathematicalMorphology - ITKStatistics - ITKGoogleTest + ITKTestKernel + ITKBinaryMathematicalMorphology + ITKStatistics + ITKGoogleTest DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/LabelMap/src/CMakeLists.txt b/Modules/Filtering/LabelMap/src/CMakeLists.txt index e3a4fa776ac..1875ab19b9e 100644 --- a/Modules/Filtering/LabelMap/src/CMakeLists.txt +++ b/Modules/Filtering/LabelMap/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKLabelMap_SRCS - itkGeometryUtilities.cxx - itkMergeLabelMapFilter.cxx - ) +set(ITKLabelMap_SRCS itkGeometryUtilities.cxx itkMergeLabelMapFilter.cxx) ### generating libraries itk_module_add_library(ITKLabelMap ${ITKLabelMap_SRCS}) diff --git a/Modules/Filtering/LabelMap/test/CMakeLists.txt b/Modules/Filtering/LabelMap/test/CMakeLists.txt index 0b24bf24061..3f936437c6f 100644 --- a/Modules/Filtering/LabelMap/test/CMakeLists.txt +++ b/Modules/Filtering/LabelMap/test/CMakeLists.txt @@ -1,604 +1,1579 @@ itk_module_test() set(ITKLabelMapTests -itkAggregateLabelMapFilterTest.cxx -itkAttributeKeepNObjectsLabelMapFilterTest1.cxx -itkAttributeLabelObjectAccessorsTest1.cxx -itkAttributeOpeningLabelMapFilterTest1.cxx -itkAttributePositionLabelMapFilterTest1.cxx -itkAttributeRelabelLabelMapFilterTest1.cxx -itkAttributeUniqueLabelMapFilterTest1.cxx -itkAutoCropLabelMapFilterTest1.cxx -itkAutoCropLabelMapFilterTest2.cxx -itkBinaryFillholeImageFilterTest1.cxx -itkBinaryGrindPeakImageFilterTest1.cxx -itkBinaryImageToLabelMapFilterTest.cxx -itkBinaryImageToLabelMapFilterTest2.cxx -itkBinaryImageToShapeLabelMapFilterTest1.cxx -itkBinaryImageToStatisticsLabelMapFilterTest1.cxx -itkBinaryNotImageFilterTest.cxx -itkBinaryReconstructionByDilationImageFilterTest.cxx -itkBinaryReconstructionByErosionImageFilterTest.cxx -itkBinaryReconstructionLabelMapFilterTest.cxx -itkBinaryShapeKeepNObjectsImageFilterTest1.cxx -itkBinaryShapeOpeningImageFilterTest1.cxx -itkBinaryStatisticsKeepNObjectsImageFilterTest1.cxx -itkBinaryStatisticsOpeningImageFilterTest1.cxx -itkChangeLabelLabelMapFilterTest.cxx -itkChangeRegionLabelMapFilterTest1.cxx -itkConvertLabelMapFilterTest1.cxx -itkConvertLabelMapFilterTest2.cxx -itkCropLabelMapFilterTest1.cxx -itkLabelImageToLabelMapFilterTest.cxx -itkLabelImageToShapeLabelMapFilterTest1.cxx -itkLabelImageToStatisticsLabelMapFilterTest1.cxx -itkLabelMapFilterTest.cxx -itkLabelMapMaskImageFilterTest.cxx -itkLabelMapTest.cxx -itkLabelMapTest2.cxx -itkLabelMapToAttributeImageFilterTest1.cxx -itkLabelMapToBinaryImageFilterTest.cxx -itkLabelMapToLabelImageFilterTest.cxx -itkLabelObjectLineComparatorTest.cxx -itkLabelObjectLineTest.cxx -itkLabelObjectTest.cxx -itkLabelSelectionLabelMapFilterTest.cxx -itkLabelShapeKeepNObjectsImageFilterTest1.cxx -itkLabelShapeOpeningImageFilterTest1.cxx -itkLabelStatisticsKeepNObjectsImageFilterTest1.cxx -itkLabelStatisticsOpeningImageFilterTest1.cxx -itkLabelUniqueLabelMapFilterTest1.cxx -itkMergeLabelMapFilterTest1.cxx -itkObjectByObjectLabelMapFilterTest.cxx -itkPadLabelMapFilterTest1.cxx -itkRegionFromReferenceLabelMapFilterTest1.cxx -itkRelabelLabelMapFilterTest1.cxx -itkShapeKeepNObjectsLabelMapFilterTest1.cxx -itkShapeLabelObjectAccessorsTest1.cxx -itkShapeOpeningLabelMapFilterTest1.cxx -itkShapePositionLabelMapFilterTest1.cxx -itkShapeRelabelImageFilterTest1.cxx -itkShapeRelabelLabelMapFilterTest1.cxx -itkShapeUniqueLabelMapFilterTest1.cxx -itkShiftLabelObjectTest.cxx -itkShiftScaleLabelMapFilterTest1.cxx -itkStatisticsKeepNObjectsLabelMapFilterTest1.cxx -itkStatisticsOpeningLabelMapFilterTest1.cxx -itkStatisticsPositionLabelMapFilterTest1.cxx -itkStatisticsRelabelImageFilterTest1.cxx -itkStatisticsRelabelLabelMapFilterTest1.cxx -itkStatisticsUniqueLabelMapFilterTest1.cxx -) + itkAggregateLabelMapFilterTest.cxx + itkAttributeKeepNObjectsLabelMapFilterTest1.cxx + itkAttributeLabelObjectAccessorsTest1.cxx + itkAttributeOpeningLabelMapFilterTest1.cxx + itkAttributePositionLabelMapFilterTest1.cxx + itkAttributeRelabelLabelMapFilterTest1.cxx + itkAttributeUniqueLabelMapFilterTest1.cxx + itkAutoCropLabelMapFilterTest1.cxx + itkAutoCropLabelMapFilterTest2.cxx + itkBinaryFillholeImageFilterTest1.cxx + itkBinaryGrindPeakImageFilterTest1.cxx + itkBinaryImageToLabelMapFilterTest.cxx + itkBinaryImageToLabelMapFilterTest2.cxx + itkBinaryImageToShapeLabelMapFilterTest1.cxx + itkBinaryImageToStatisticsLabelMapFilterTest1.cxx + itkBinaryNotImageFilterTest.cxx + itkBinaryReconstructionByDilationImageFilterTest.cxx + itkBinaryReconstructionByErosionImageFilterTest.cxx + itkBinaryReconstructionLabelMapFilterTest.cxx + itkBinaryShapeKeepNObjectsImageFilterTest1.cxx + itkBinaryShapeOpeningImageFilterTest1.cxx + itkBinaryStatisticsKeepNObjectsImageFilterTest1.cxx + itkBinaryStatisticsOpeningImageFilterTest1.cxx + itkChangeLabelLabelMapFilterTest.cxx + itkChangeRegionLabelMapFilterTest1.cxx + itkConvertLabelMapFilterTest1.cxx + itkConvertLabelMapFilterTest2.cxx + itkCropLabelMapFilterTest1.cxx + itkLabelImageToLabelMapFilterTest.cxx + itkLabelImageToShapeLabelMapFilterTest1.cxx + itkLabelImageToStatisticsLabelMapFilterTest1.cxx + itkLabelMapFilterTest.cxx + itkLabelMapMaskImageFilterTest.cxx + itkLabelMapTest.cxx + itkLabelMapTest2.cxx + itkLabelMapToAttributeImageFilterTest1.cxx + itkLabelMapToBinaryImageFilterTest.cxx + itkLabelMapToLabelImageFilterTest.cxx + itkLabelObjectLineComparatorTest.cxx + itkLabelObjectLineTest.cxx + itkLabelObjectTest.cxx + itkLabelSelectionLabelMapFilterTest.cxx + itkLabelShapeKeepNObjectsImageFilterTest1.cxx + itkLabelShapeOpeningImageFilterTest1.cxx + itkLabelStatisticsKeepNObjectsImageFilterTest1.cxx + itkLabelStatisticsOpeningImageFilterTest1.cxx + itkLabelUniqueLabelMapFilterTest1.cxx + itkMergeLabelMapFilterTest1.cxx + itkObjectByObjectLabelMapFilterTest.cxx + itkPadLabelMapFilterTest1.cxx + itkRegionFromReferenceLabelMapFilterTest1.cxx + itkRelabelLabelMapFilterTest1.cxx + itkShapeKeepNObjectsLabelMapFilterTest1.cxx + itkShapeLabelObjectAccessorsTest1.cxx + itkShapeOpeningLabelMapFilterTest1.cxx + itkShapePositionLabelMapFilterTest1.cxx + itkShapeRelabelImageFilterTest1.cxx + itkShapeRelabelLabelMapFilterTest1.cxx + itkShapeUniqueLabelMapFilterTest1.cxx + itkShiftLabelObjectTest.cxx + itkShiftScaleLabelMapFilterTest1.cxx + itkStatisticsKeepNObjectsLabelMapFilterTest1.cxx + itkStatisticsOpeningLabelMapFilterTest1.cxx + itkStatisticsPositionLabelMapFilterTest1.cxx + itkStatisticsRelabelImageFilterTest1.cxx + itkStatisticsRelabelLabelMapFilterTest1.cxx + itkStatisticsUniqueLabelMapFilterTest1.cxx) -CreateTestDriver(ITKLabelMap "${ITKLabelMap-Test_LIBRARIES}" "${ITKLabelMapTests}") +createtestdriver(ITKLabelMap "${ITKLabelMap-Test_LIBRARIES}" "${ITKLabelMapTests}") -itk_add_test(NAME itkShiftLabelObjectTest - COMMAND ITKLabelMapTestDriver itkShiftLabelObjectTest) -itk_add_test(NAME itkAggregateLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-labelAggregate.mha} - ${ITK_TEST_OUTPUT_DIR}/cthead1-labelAggregate.mha - itkAggregateLabelMapFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-labelAggregate.mha) -itk_add_test(NAME itkAttributeKeepNObjectsLabelMapFilterTest0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkAttributeKeepNObjectsLabelMapFilterTest0.png} - ${ITK_TEST_OUTPUT_DIR}/itkAttributeKeepNObjectsLabelMapFilterTest0.png - itkAttributeKeepNObjectsLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/itkAttributeKeepNObjectsLabelMapFilterTest0.png 2 0) -itk_add_test(NAME itkAttributeKeepNObjectsLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkAttributeKeepNObjectsLabelMapFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkAttributeKeepNObjectsLabelMapFilterTest1.png - itkAttributeKeepNObjectsLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/itkAttributeKeepNObjectsLabelMapFilterTest1.png 2 1) -itk_add_test(NAME itkAttributeLabelObjectAccessorsTest1 - COMMAND ITKLabelMapTestDriver itkAttributeLabelObjectAccessorsTest1 - DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png}) -itk_add_test(NAME itkAttributeOpeningLabelMapFilterTest0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkAttributeOpeningLabelMapFilterTest0.png} - ${ITK_TEST_OUTPUT_DIR}/itkAttributeOpeningLabelMapFilterTest0.png - itkAttributeOpeningLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/itkAttributeOpeningLabelMapFilterTest0.png 2 0) -itk_add_test(NAME itkAttributeOpeningLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkAttributeOpeningLabelMapFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkAttributeOpeningLabelMapFilterTest1.png - itkAttributeOpeningLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/itkAttributeOpeningLabelMapFilterTest1.png 2 1) -itk_add_test(NAME itkAttributePositionLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkAttributePositionLabelMapFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkAttributePositionLabelMapFilterTest1.png - itkAttributePositionLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} ${ITK_TEST_OUTPUT_DIR}/itkAttributePositionLabelMapFilterTest1.png) -itk_add_test(NAME itkAttributeRelabelLabelMapFilterTest0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkAttributeRelabelLabelMapFilterTest0.png} - ${ITK_TEST_OUTPUT_DIR}/itkAttributeRelabelLabelMapFilterTest0.png - itkAttributeRelabelLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/itkAttributeRelabelLabelMapFilterTest0.png 0) -itk_add_test(NAME itkAttributeRelabelLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkAttributeRelabelLabelMapFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkAttributeRelabelLabelMapFilterTest1.png - itkAttributeRelabelLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/itkAttributeRelabelLabelMapFilterTest1.png 1) -itk_add_test(NAME itkAttributeUniqueLabelMapFilterTest0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkAttributeUniqueLabelMapFilterTest0.png} - ${ITK_TEST_OUTPUT_DIR}/itkAttributeUniqueLabelMapFilterTest0.png - itkAttributeUniqueLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} ${ITK_TEST_OUTPUT_DIR}/itkAttributeUniqueLabelMapFilterTest0.png 0) -itk_add_test(NAME itkAttributeUniqueLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkAttributeUniqueLabelMapFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkAttributeUniqueLabelMapFilterTest1.png - itkAttributeUniqueLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} ${ITK_TEST_OUTPUT_DIR}/itkAttributeUniqueLabelMapFilterTest1.png 1) -itk_add_test(NAME itkAutoCropLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-label-autocrop.mha} - ${ITK_TEST_OUTPUT_DIR}/cthead1-label-autocrop.mha - itkAutoCropLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-label-autocrop.mha 176 4 4) -itk_add_test(NAME itkBinaryFillholeImageFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkBinaryFillholeImageFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryFillholeImageFilterTest1.png - itkBinaryFillholeImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/Spots.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryFillholeImageFilterTest1.png 1 255) -itk_add_test(NAME itkBinaryGrindPeakImageFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkBinaryGrindPeakImageFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryGrindPeakImageFilterTest1.png - itkBinaryGrindPeakImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryGrindPeakImageFilterTest1.png 1 255 0) -itk_add_test(NAME itkBinaryGrindPeakImageFilterTest2 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkBinaryGrindPeakImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryGrindPeakImageFilterTest2.png - itkBinaryGrindPeakImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryGrindPeakImageFilterTest2.png 0 255 0) -itk_add_test(NAME itkBinaryImageToLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-labeled.mha} - ${ITK_TEST_OUTPUT_DIR}/cthead1-labeled.mha - itkBinaryImageToLabelMapFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1-mask.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-labeled.mha 1 255 0 0) -itk_add_test(NAME itkBinaryImageToLabelMapFilterTest2 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/connected0lines-0.png} - ${ITK_TEST_OUTPUT_DIR}/connected0lines-0.png - itkBinaryImageToLabelMapFilterTest DATA{${ITK_DATA_ROOT}/Input/connected0lines.png} ${ITK_TEST_OUTPUT_DIR}/connected0lines-0.png 0 255 0 0) -itk_add_test(NAME itkBinaryImageToLabelMapFilterTest3 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/connected0lines-1.png} - ${ITK_TEST_OUTPUT_DIR}/connected0lines-1.png - itkBinaryImageToLabelMapFilterTest DATA{${ITK_DATA_ROOT}/Input/connected0lines.png} ${ITK_TEST_OUTPUT_DIR}/connected0lines-1.png 1 255 0 0) -itk_add_test(NAME itkBinaryImageToLabelMapFilterTest4 - COMMAND ITKLabelMapTestDriver itkBinaryImageToLabelMapFilterTest - DATA{${ITK_DATA_ROOT}/Input/289.png} ${ITK_TEST_OUTPUT_DIR}/tooManyObjects.png 0 255 0 1) -itk_add_test(NAME itkBinaryImageToLabelMapFilterTest5 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/nonConnected3DLines-0.tif} - ${ITK_TEST_OUTPUT_DIR}/nonConnected3DLines-0.tif - itkBinaryImageToLabelMapFilterTest DATA{${ITK_DATA_ROOT}/Input/nonConnected3DLines.tif} ${ITK_TEST_OUTPUT_DIR}/nonConnected3DLines-0.tif 0 255 0 0) -itk_add_test(NAME itkBinaryImageToLabelMapFilterTest6 - COMMAND ITKLabelMapTestDriver itkBinaryImageToLabelMapFilterTest2 - DATA{${ITK_DATA_ROOT}/Input/BinaryImage1Row.bmp} ${ITK_TEST_OUTPUT_DIR}/LabelImage1Row.bmp 255 0 2) -itk_add_test(NAME itkBinaryImageToLabelMapFilterTest7 - COMMAND ITKLabelMapTestDriver itkBinaryImageToLabelMapFilterTest2 - DATA{${ITK_DATA_ROOT}/Input/BinaryImage1Row.bmp} ${ITK_TEST_OUTPUT_DIR}/LabelImage1Row.bmp 255 0 1) -itk_add_test(NAME itkBinaryImageToShapeLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/Spots-binaryimage-to-shapelabel.mha} - ${ITK_TEST_OUTPUT_DIR}/Spots-binaryimage-to-shapelabel.mha - itkBinaryImageToShapeLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/Spots.png} ${ITK_TEST_OUTPUT_DIR}/Spots-binaryimage-to-shapelabel.mha 1 255 0 1 1 1) -itk_add_test(NAME itkBinaryImageToStatisticsLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/Spots-binaryimage-to-statisticslabel.mha} - ${ITK_TEST_OUTPUT_DIR}/Spots-binaryimage-to-statisticslabel.mha - itkBinaryImageToStatisticsLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/Spots.png} DATA{${ITK_DATA_ROOT}/Input/Spots.png} ${ITK_TEST_OUTPUT_DIR}/Spots-binaryimage-to-statisticslabel.mha 1 0 0 1 1 1 128) -itk_add_test(NAME itkBinaryNotImageFilterTest - COMMAND ITKLabelMapTestDriver - itkBinaryNotImageFilterTest DATA{${ITK_DATA_ROOT}/Input/STAPLE2.png} DATA{${ITK_DATA_ROOT}/Input/STAPLE4.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryNotImageFilterTest.png 255 0) -itk_add_test(NAME itkBinaryReconstructionByDilationImageFilterTest - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkBinaryReconstructionByDilationImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryReconstructionByDilationImageFilterTest.png - itkBinaryReconstructionByDilationImageFilterTest DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} DATA{${ITK_DATA_ROOT}/Input/Spots-markers.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryReconstructionByDilationImageFilterTest.png 255 100 0) -itk_add_test(NAME itkBinaryReconstructionByErosionImageFilterTest - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkBinaryReconstructionByErosionImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryReconstructionByErosionImageFilterTest.png - itkBinaryReconstructionByErosionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} DATA{${ITK_DATA_ROOT}/Input/Spots-markers.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryReconstructionByErosionImageFilterTest.png 0 255 0) -itk_add_test(NAME itkBinaryReconstructionLabelMapFilterTest - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkBinaryReconstructionLabelMapFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryReconstructionLabelMapFilterTest.png - itkBinaryReconstructionLabelMapFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-markers.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryReconstructionLabelMapFilterTest.png 94) -itk_add_test(NAME itkBinaryShapeKeepNObjectsImageFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/binary-image-various-shapes01-binary-shape-keep-n-objects.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryShapeKeepNObjectsImageFilterTest1.png - itkBinaryShapeKeepNObjectsImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/BinaryImageWithVariousShapes01.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryShapeKeepNObjectsImageFilterTest1.png 255 0 2 0 1 Label) -itk_add_test(NAME itkBinaryShapeOpeningImageFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-binary-shape-opening.mha} - ${ITK_TEST_OUTPUT_DIR}/cthead1-binary-shape-opening.mha - itkBinaryShapeOpeningImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-binary-shape-opening.mha 255 0 140 1 1 100) -itk_add_test(NAME itkBinaryStatisticsKeepNObjectsImageFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkBinaryStatisticsKeepNObjectsImageFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryStatisticsKeepNObjectsImageFilterTest1.png - itkBinaryStatisticsKeepNObjectsImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1-bin.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryStatisticsKeepNObjectsImageFilterTest1.png 255 0 7 0 0 200) -itk_add_test(NAME itkBinaryStatisticsOpeningImageFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-statistics-object-removed-baseline.png} - ${ITK_TEST_OUTPUT_DIR}/itkBinaryStatisticsOpeningImageFilterTest1.png - itkBinaryStatisticsOpeningImageFilterTest1 DATA{Input/cthead1-bin.png} DATA{Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBinaryStatisticsOpeningImageFilterTest1.png 1 0 1 0 0 202) -itk_add_test(NAME itkChangeLabelLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-label-changed.mha} - ${ITK_TEST_OUTPUT_DIR}/cthead1-label-changed.mha - itkChangeLabelLabelMapFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-label-changed.mha 94 150 92 163 176 176) -itk_add_test(NAME itkChangeLabelLabelMapFilterTest2 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-label-changed2.mha} - ${ITK_TEST_OUTPUT_DIR}/cthead1-label-changed2.mha - itkChangeLabelLabelMapFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-label-changed2.mha 94 100 0 50 92 0) -itk_add_test(NAME itkChangeLabelLabelMapFilterTest3 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-label-changed3.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1-label-changed3.png - itkChangeLabelLabelMapFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-label-changed3.png 0 94) -itk_add_test(NAME itkChangeRegionLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-label-changeregion.mha} - ${ITK_TEST_OUTPUT_DIR}/cthead1-label-changeregion.mha - itkChangeRegionLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-label-changeregion.mha 50 100 120 150) -itk_add_test(NAME itkConvertLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1-convert.png - itkConvertLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} +itk_add_test( + NAME + itkShiftLabelObjectTest + COMMAND + ITKLabelMapTestDriver + itkShiftLabelObjectTest) +itk_add_test( + NAME + itkAggregateLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-labelAggregate.mha} + ${ITK_TEST_OUTPUT_DIR}/cthead1-labelAggregate.mha + itkAggregateLabelMapFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-labelAggregate.mha) +itk_add_test( + NAME + itkAttributeKeepNObjectsLabelMapFilterTest0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkAttributeKeepNObjectsLabelMapFilterTest0.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributeKeepNObjectsLabelMapFilterTest0.png + itkAttributeKeepNObjectsLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributeKeepNObjectsLabelMapFilterTest0.png + 2 + 0) +itk_add_test( + NAME + itkAttributeKeepNObjectsLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkAttributeKeepNObjectsLabelMapFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributeKeepNObjectsLabelMapFilterTest1.png + itkAttributeKeepNObjectsLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributeKeepNObjectsLabelMapFilterTest1.png + 2 + 1) +itk_add_test( + NAME + itkAttributeLabelObjectAccessorsTest1 + COMMAND + ITKLabelMapTestDriver + itkAttributeLabelObjectAccessorsTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png}) +itk_add_test( + NAME + itkAttributeOpeningLabelMapFilterTest0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkAttributeOpeningLabelMapFilterTest0.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributeOpeningLabelMapFilterTest0.png + itkAttributeOpeningLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributeOpeningLabelMapFilterTest0.png + 2 + 0) +itk_add_test( + NAME + itkAttributeOpeningLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkAttributeOpeningLabelMapFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributeOpeningLabelMapFilterTest1.png + itkAttributeOpeningLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributeOpeningLabelMapFilterTest1.png + 2 + 1) +itk_add_test( + NAME + itkAttributePositionLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkAttributePositionLabelMapFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributePositionLabelMapFilterTest1.png + itkAttributePositionLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributePositionLabelMapFilterTest1.png) +itk_add_test( + NAME + itkAttributeRelabelLabelMapFilterTest0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkAttributeRelabelLabelMapFilterTest0.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributeRelabelLabelMapFilterTest0.png + itkAttributeRelabelLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributeRelabelLabelMapFilterTest0.png + 0) +itk_add_test( + NAME + itkAttributeRelabelLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkAttributeRelabelLabelMapFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributeRelabelLabelMapFilterTest1.png + itkAttributeRelabelLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributeRelabelLabelMapFilterTest1.png + 1) +itk_add_test( + NAME + itkAttributeUniqueLabelMapFilterTest0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkAttributeUniqueLabelMapFilterTest0.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributeUniqueLabelMapFilterTest0.png + itkAttributeUniqueLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributeUniqueLabelMapFilterTest0.png + 0) +itk_add_test( + NAME + itkAttributeUniqueLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkAttributeUniqueLabelMapFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributeUniqueLabelMapFilterTest1.png + itkAttributeUniqueLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + ${ITK_TEST_OUTPUT_DIR}/itkAttributeUniqueLabelMapFilterTest1.png + 1) +itk_add_test( + NAME + itkAutoCropLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-label-autocrop.mha} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-autocrop.mha + itkAutoCropLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-autocrop.mha + 176 + 4 + 4) +itk_add_test( + NAME + itkBinaryFillholeImageFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkBinaryFillholeImageFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryFillholeImageFilterTest1.png + itkBinaryFillholeImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/Spots.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryFillholeImageFilterTest1.png + 1 + 255) +itk_add_test( + NAME + itkBinaryGrindPeakImageFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkBinaryGrindPeakImageFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryGrindPeakImageFilterTest1.png + itkBinaryGrindPeakImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryGrindPeakImageFilterTest1.png + 1 + 255 + 0) +itk_add_test( + NAME + itkBinaryGrindPeakImageFilterTest2 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkBinaryGrindPeakImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryGrindPeakImageFilterTest2.png + itkBinaryGrindPeakImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryGrindPeakImageFilterTest2.png + 0 + 255 + 0) +itk_add_test( + NAME + itkBinaryImageToLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-labeled.mha} + ${ITK_TEST_OUTPUT_DIR}/cthead1-labeled.mha + itkBinaryImageToLabelMapFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1-mask.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-labeled.mha + 1 + 255 + 0 + 0) +itk_add_test( + NAME + itkBinaryImageToLabelMapFilterTest2 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/connected0lines-0.png} + ${ITK_TEST_OUTPUT_DIR}/connected0lines-0.png + itkBinaryImageToLabelMapFilterTest + DATA{${ITK_DATA_ROOT}/Input/connected0lines.png} + ${ITK_TEST_OUTPUT_DIR}/connected0lines-0.png + 0 + 255 + 0 + 0) +itk_add_test( + NAME + itkBinaryImageToLabelMapFilterTest3 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/connected0lines-1.png} + ${ITK_TEST_OUTPUT_DIR}/connected0lines-1.png + itkBinaryImageToLabelMapFilterTest + DATA{${ITK_DATA_ROOT}/Input/connected0lines.png} + ${ITK_TEST_OUTPUT_DIR}/connected0lines-1.png + 1 + 255 + 0 + 0) +itk_add_test( + NAME + itkBinaryImageToLabelMapFilterTest4 + COMMAND + ITKLabelMapTestDriver + itkBinaryImageToLabelMapFilterTest + DATA{${ITK_DATA_ROOT}/Input/289.png} + ${ITK_TEST_OUTPUT_DIR}/tooManyObjects.png + 0 + 255 + 0 + 1) +itk_add_test( + NAME + itkBinaryImageToLabelMapFilterTest5 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/nonConnected3DLines-0.tif} + ${ITK_TEST_OUTPUT_DIR}/nonConnected3DLines-0.tif + itkBinaryImageToLabelMapFilterTest + DATA{${ITK_DATA_ROOT}/Input/nonConnected3DLines.tif} + ${ITK_TEST_OUTPUT_DIR}/nonConnected3DLines-0.tif + 0 + 255 + 0 + 0) +itk_add_test( + NAME + itkBinaryImageToLabelMapFilterTest6 + COMMAND + ITKLabelMapTestDriver + itkBinaryImageToLabelMapFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/BinaryImage1Row.bmp} + ${ITK_TEST_OUTPUT_DIR}/LabelImage1Row.bmp + 255 + 0 + 2) +itk_add_test( + NAME + itkBinaryImageToLabelMapFilterTest7 + COMMAND + ITKLabelMapTestDriver + itkBinaryImageToLabelMapFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/BinaryImage1Row.bmp} + ${ITK_TEST_OUTPUT_DIR}/LabelImage1Row.bmp + 255 + 0 + 1) +itk_add_test( + NAME + itkBinaryImageToShapeLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/Spots-binaryimage-to-shapelabel.mha} + ${ITK_TEST_OUTPUT_DIR}/Spots-binaryimage-to-shapelabel.mha + itkBinaryImageToShapeLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/Spots.png} + ${ITK_TEST_OUTPUT_DIR}/Spots-binaryimage-to-shapelabel.mha + 1 + 255 + 0 + 1 + 1 + 1) +itk_add_test( + NAME + itkBinaryImageToStatisticsLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/Spots-binaryimage-to-statisticslabel.mha} + ${ITK_TEST_OUTPUT_DIR}/Spots-binaryimage-to-statisticslabel.mha + itkBinaryImageToStatisticsLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/Spots.png} + DATA{${ITK_DATA_ROOT}/Input/Spots.png} + ${ITK_TEST_OUTPUT_DIR}/Spots-binaryimage-to-statisticslabel.mha + 1 + 0 + 0 + 1 + 1 + 1 + 128) +itk_add_test( + NAME + itkBinaryNotImageFilterTest + COMMAND + ITKLabelMapTestDriver + itkBinaryNotImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/STAPLE2.png} + DATA{${ITK_DATA_ROOT}/Input/STAPLE4.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryNotImageFilterTest.png + 255 + 0) +itk_add_test( + NAME + itkBinaryReconstructionByDilationImageFilterTest + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkBinaryReconstructionByDilationImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryReconstructionByDilationImageFilterTest.png + itkBinaryReconstructionByDilationImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} + DATA{${ITK_DATA_ROOT}/Input/Spots-markers.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryReconstructionByDilationImageFilterTest.png + 255 + 100 + 0) +itk_add_test( + NAME + itkBinaryReconstructionByErosionImageFilterTest + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkBinaryReconstructionByErosionImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryReconstructionByErosionImageFilterTest.png + itkBinaryReconstructionByErosionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + DATA{${ITK_DATA_ROOT}/Input/Spots-markers.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryReconstructionByErosionImageFilterTest.png + 0 + 255 + 0) +itk_add_test( + NAME + itkBinaryReconstructionLabelMapFilterTest + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkBinaryReconstructionLabelMapFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryReconstructionLabelMapFilterTest.png + itkBinaryReconstructionLabelMapFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-markers.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryReconstructionLabelMapFilterTest.png + 94) +itk_add_test( + NAME + itkBinaryShapeKeepNObjectsImageFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/binary-image-various-shapes01-binary-shape-keep-n-objects.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryShapeKeepNObjectsImageFilterTest1.png + itkBinaryShapeKeepNObjectsImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/BinaryImageWithVariousShapes01.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryShapeKeepNObjectsImageFilterTest1.png + 255 + 0 + 2 + 0 + 1 + Label) +itk_add_test( + NAME + itkBinaryShapeOpeningImageFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-binary-shape-opening.mha} + ${ITK_TEST_OUTPUT_DIR}/cthead1-binary-shape-opening.mha + itkBinaryShapeOpeningImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-binary-shape-opening.mha + 255 + 0 + 140 + 1 + 1 + 100) +itk_add_test( + NAME + itkBinaryStatisticsKeepNObjectsImageFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkBinaryStatisticsKeepNObjectsImageFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryStatisticsKeepNObjectsImageFilterTest1.png + itkBinaryStatisticsKeepNObjectsImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1-bin.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryStatisticsKeepNObjectsImageFilterTest1.png + 255 + 0 + 7 + 0 + 0 + 200) +itk_add_test( + NAME + itkBinaryStatisticsOpeningImageFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-statistics-object-removed-baseline.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryStatisticsOpeningImageFilterTest1.png + itkBinaryStatisticsOpeningImageFilterTest1 + DATA{Input/cthead1-bin.png} + DATA{Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBinaryStatisticsOpeningImageFilterTest1.png + 1 + 0 + 1 + 0 + 0 + 202) +itk_add_test( + NAME + itkChangeLabelLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-label-changed.mha} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-changed.mha + itkChangeLabelLabelMapFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-changed.mha + 94 + 150 + 92 + 163 + 176 + 176) +itk_add_test( + NAME + itkChangeLabelLabelMapFilterTest2 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-label-changed2.mha} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-changed2.mha + itkChangeLabelLabelMapFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-changed2.mha + 94 + 100 + 0 + 50 + 92 + 0) +itk_add_test( + NAME + itkChangeLabelLabelMapFilterTest3 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-label-changed3.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-changed3.png + itkChangeLabelLabelMapFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-changed3.png + 0 + 94) +itk_add_test( + NAME + itkChangeRegionLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-label-changeregion.mha} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-changeregion.mha + itkChangeRegionLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-changeregion.mha + 50 + 100 + 120 + 150) +itk_add_test( + NAME + itkConvertLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-convert.png - ) -itk_add_test(NAME itkConvertLabelMapFilterTest2 - COMMAND ITKLabelMapTestDriver - --compare DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1-convert-short.png - itkConvertLabelMapFilterTest2 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + itkConvertLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-convert.png) +itk_add_test( + NAME + itkConvertLabelMapFilterTest2 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-convert-short.png - ) -itk_add_test(NAME itkCropLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-label-crop.mha} - ${ITK_TEST_OUTPUT_DIR}/cthead1-label-crop.mha - itkCropLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-label-crop.mha 40 50) -itk_add_test(NAME itkLabelImageToLabelMapFilterTest - COMMAND ITKLabelMapTestDriver itkLabelImageToLabelMapFilterTest) -itk_add_test(NAME itkLabelImageToShapeLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/simple-label-to-shapelabelmap.mha} - ${ITK_TEST_OUTPUT_DIR}/simple-label-to-shapelabelmap.mha - itkLabelImageToShapeLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/simple-label-b.png} ${ITK_TEST_OUTPUT_DIR}/simple-label-to-shapelabelmap.mha 90 1 1) -itk_add_test(NAME itkLabelImageToStatisticsLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{${ITK_DATA_ROOT}/Input/Spots.png} - ${ITK_TEST_OUTPUT_DIR}/Spots-labelimage-to-statisticslabel.png - itkLabelImageToStatisticsLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/Spots.png} DATA{${ITK_DATA_ROOT}/Input/Spots.png} ${ITK_TEST_OUTPUT_DIR}/Spots-labelimage-to-statisticslabel.png 0 1 1 1 256) -itk_add_test(NAME itkLabelMapFilterTest - COMMAND ITKLabelMapTestDriver itkLabelMapFilterTest) -itk_add_test(NAME itkLabelMapMaskImageFilterTest-0-0-0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTest-0-0-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-0-0-0.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-0-0-0.png 0 0 0 0 0) -itk_add_test(NAME itkLabelMapMaskImageFilterTestCrop-0-0-0-0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-0-0-0-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-0-0-0.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-0-0-0.png 0 0 0 1 0) -itk_add_test(NAME itkLabelMapMaskImageFilterTestCrop-0-0-0-10 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-0-0-0-10.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-0-0-10.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-0-0-10.png 0 0 0 1 10) -itk_add_test(NAME itkLabelMapMaskImageFilterTest-0-0-1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTest-0-0-1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-0-0-1.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-0-0-1.png 0 0 1 0 0) -itk_add_test(NAME itkLabelMapMaskImageFilterTestCrop-0-0-1-0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-0-0-1-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-0-1-0.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-0-1-0.png 0 0 1 1 0) -itk_add_test(NAME itkLabelMapMaskImageFilterTestCrop-0-0-1-10 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-0-0-1-10.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-0-1-10.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-0-1-10.png 0 0 1 1 10) -itk_add_test(NAME itkLabelMapMaskImageFilterTest-0-1-0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTest-0-1-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-0-1-0.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-0-1-0.png 0 1 0 0 0) -itk_add_test(NAME itkLabelMapMaskImageFilterTestCrop-0-1-0-0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-0-1-0-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-1-0-0.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-1-0-0.png 0 1 0 1 0) -itk_add_test(NAME itkLabelMapMaskImageFilterTestCrop-0-1-0-10 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-0-1-0-10.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-1-0-10.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-1-0-10.png 0 1 0 1 10) -itk_add_test(NAME itkLabelMapMaskImageFilterTest-0-1-1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTest-0-1-1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-0-1-1.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-0-1-1.png 0 1 1 0 0) -itk_add_test(NAME itkLabelMapMaskImageFilterTestCrop-0-1-1-0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-0-1-1-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-1-1-0.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-1-1-0.png 0 1 1 1 0) -itk_add_test(NAME itkLabelMapMaskImageFilterTestCrop-0-1-1-10 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-0-1-1-10.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-1-1-10.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-1-1-10.png 0 1 1 1 10) -itk_add_test(NAME itkLabelMapMaskImageFilterTest-100-0-0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTest-100-0-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-100-0-0.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-100-0-0.png 100 0 0 0 0) -itk_add_test(NAME itkLabelMapMaskImageFilterTestCrop-100-0-0-0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-100-0-0-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-0-0-0.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-0-0-0.png 100 0 0 1 0) -itk_add_test(NAME itkLabelMapMaskImageFilterTestCrop-100-0-0-10 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-100-0-0-10.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-0-0-10.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-0-0-10.png 100 0 0 1 10) -itk_add_test(NAME itkLabelMapMaskImageFilterTest-100-0-1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTest-100-0-1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-100-0-1.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-100-0-1.png 100 0 1 0 0) -itk_add_test(NAME itkLabelMapMaskImageFilterTestCrop-100-0-1-0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-100-0-1-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-0-1-0.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-0-1-0.png 100 0 1 1 0) -itk_add_test(NAME itkLabelMapMaskImageFilterTestCrop-100-0-1-10 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-100-0-1-10.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-0-1-10.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-0-1-10.png 100 0 1 1 10) -itk_add_test(NAME itkLabelMapMaskImageFilterTest-100-1-0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTest-100-1-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-100-1-0.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-100-1-0.png 100 1 0 0 0) -itk_add_test(NAME itkLabelMapMaskImageFilterTestCrop-100-1-0-0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-100-1-0-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-1-0-0.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-1-0-0.png 100 1 0 1 0) -itk_add_test(NAME itkLabelMapMaskImageFilterTestCrop-100-1-0-10 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-100-1-0-10.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-1-0-10.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-1-0-10.png 100 1 0 1 10) -itk_add_test(NAME itkLabelMapMaskImageFilterTest-100-1-1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTest-100-1-1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-100-1-1.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-100-1-1.png 100 1 1 0 0) -itk_add_test(NAME itkLabelMapMaskImageFilterTestCrop-100-1-1-0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-100-1-1-0.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-1-1-0.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-1-1-0.png 100 1 1 1 0) -itk_add_test(NAME itkLabelMapMaskImageFilterTestCrop-100-1-1-10 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-100-1-1-10.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-1-1-10.png - itkLabelMapMaskImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-1-1-10.png 100 1 1 1 10) -itk_add_test(NAME itkLabelMapTest - COMMAND ITKLabelMapTestDriver itkLabelMapTest) -itk_add_test(NAME itkLabelMapTest2 - COMMAND ITKLabelMapTestDriver itkLabelMapTest2) -itk_add_test(NAME itkLabelMapToAttributeImageFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelMapToAttributeImageFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelMapToAttributeImageFilterTest1.png - itkLabelMapToAttributeImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelMapToAttributeImageFilterTest1.png) -itk_add_test(NAME itkLabelMapToBinaryImageFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-label-binary.mha} - ${ITK_TEST_OUTPUT_DIR}/cthead1-label-binary.mha - itkLabelMapToBinaryImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-label-binary.mha 255 0) -itk_add_test(NAME itkLabelMapToLabelImageFilterTest - COMMAND ITKLabelMapTestDriver itkLabelMapToLabelImageFilterTest) -itk_add_test(NAME itkLabelObjectLineComparatorTest - COMMAND ITKLabelMapTestDriver itkLabelObjectLineComparatorTest) -itk_add_test(NAME itkLabelObjectLineTest - COMMAND ITKLabelMapTestDriver itkLabelObjectLineTest) -itk_add_test(NAME itkLabelObjectTest - COMMAND ITKLabelMapTestDriver itkLabelObjectTest) -itk_add_test(NAME itkLabelSelectionLabelMapFilterTest0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelSelectionLabelMapFilterTest0.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelSelectionLabelMapFilterTest0.png - itkLabelSelectionLabelMapFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelSelectionLabelMapFilterTest0.png 0 94) -itk_add_test(NAME itkLabelSelectionLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelSelectionLabelMapFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelSelectionLabelMapFilterTest1.png - itkLabelSelectionLabelMapFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelSelectionLabelMapFilterTest1.png 1 94) -itk_add_test(NAME itkLabelShapeKeepNObjectsImageFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelShapeKeepNObjectsImageFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelShapeKeepNObjectsImageFilterTest1.png - itkLabelShapeKeepNObjectsImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelShapeKeepNObjectsImageFilterTest1.png 0 1 0 Label) -itk_add_test(NAME itkLabelShapeOpeningImageFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1Label-shape-open-baseline.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelShapeOpeningImageFilterTest1.png - itkLabelShapeOpeningImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelShapeOpeningImageFilterTest1.png 0 4000 0 100) -itk_add_test(NAME itkLabelStatisticsKeepNObjectsImageFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1Label-statistics-keep-NObjects-baseline.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelStatisticsKeepNObjectsImageFilterTest1.png - itkLabelStatisticsKeepNObjectsImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelStatisticsKeepNObjectsImageFilterTest1.png 0 7 0 203) -itk_add_test(NAME itkLabelStatisticsOpeningImageFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1Label-label-statistics-opening-baseline.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelStatisticsOpeningImageFilterTest1.png - itkLabelStatisticsOpeningImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelStatisticsOpeningImageFilterTest1.png 0 98 0 Label) -itk_add_test(NAME itkLabelUniqueLabelMapFilterTest0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelUniqueLabelMapFilterTest0.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelUniqueLabelMapFilterTest0.png - itkLabelUniqueLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelUniqueLabelMapFilterTest0.png 0) -itk_add_test(NAME itkLabelUniqueLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkLabelUniqueLabelMapFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelUniqueLabelMapFilterTest1.png - itkLabelUniqueLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelUniqueLabelMapFilterTest1.png 1) -itk_add_test(NAME itkMergeLabelMapFilterTest1a - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/simple-label-merge-keep.mha} - ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-keep.mha - itkMergeLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/simple-label-c.png} DATA{${ITK_DATA_ROOT}/Input/simple-label-d.png} ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-keep.mha 50 50 0 0) -itk_add_test(NAME itkMergeLabelMapFilterTest1b - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/simple-label-merge-aggregate.mha} - ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-aggregate.mha - itkMergeLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/simple-label-c.png} DATA{${ITK_DATA_ROOT}/Input/simple-label-d.png} ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-aggregate.mha 50 50 1 0) -itk_add_test(NAME itkMergeLabelMapFilterTest1c - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/simple-label-merge-pack.mha} - ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-pack.mha - itkMergeLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/simple-label-c.png} DATA{${ITK_DATA_ROOT}/Input/simple-label-d.png} ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-pack.mha 50 50 2 0) -itk_add_test(NAME itkMergeLabelMapFilterTest1d - COMMAND ITKLabelMapTestDriver itkMergeLabelMapFilterTest1 - DATA{${ITK_DATA_ROOT}/Input/simple-label-c.png} DATA{${ITK_DATA_ROOT}/Input/simple-label-d.png} ${ITK_TEST_OUTPUT_DIR}/thisFileShouldNotExist.mha 50 50 3 1) -itk_add_test(NAME itkMergeLabelMapFilterTest1e - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/simple-label-merge-strict.mha} - ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-strict.mha - itkMergeLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/simple-label-e.png} DATA{${ITK_DATA_ROOT}/Input/simple-label-d.png} ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-strict.mha 50 50 3 0) -itk_add_test(NAME itkMergeLabelMapFilterTest1f - COMMAND ITKLabelMapTestDriver itkMergeLabelMapFilterTest1 - DATA{${ITK_DATA_ROOT}/Input/simple-label-e.png} DATA{${ITK_DATA_ROOT}/Input/simple-label-d.png} ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-wrong.mha 50 50 10 1) -itk_add_test(NAME itkObjectByObjectLabelMapFilterTest0 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkObjectByObjectLabelMapFilterTest0.png} - ${ITK_TEST_OUTPUT_DIR}/itkObjectByObjectLabelMapFilterTest0.png - itkObjectByObjectLabelMapFilterTest DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} ${ITK_TEST_OUTPUT_DIR}/itkObjectByObjectLabelMapFilterTest0.png 0 0 1) -itk_add_test(NAME itkObjectByObjectLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkObjectByObjectLabelMapFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkObjectByObjectLabelMapFilterTest1.png - itkObjectByObjectLabelMapFilterTest DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} ${ITK_TEST_OUTPUT_DIR}/itkObjectByObjectLabelMapFilterTest1.png 1 0 1) -itk_add_test(NAME itkPadLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-label-pad.mha} - ${ITK_TEST_OUTPUT_DIR}/cthead1-label-pad.mha - itkPadLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-label-pad.mha 40 50) -itk_add_test(NAME itkRegionFromReferenceLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-label-regionreference.mha} - ${ITK_TEST_OUTPUT_DIR}/cthead1-label-regionreference.mha - itkRegionFromReferenceLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} DATA{${ITK_DATA_ROOT}/Input/circle.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-label-regionreference.mha) -itk_add_test(NAME itkRelabelLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-label-relabeled.mha} - ${ITK_TEST_OUTPUT_DIR}/cthead1-label-relabeled.mha - itkRelabelLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-label-relabeled.mha) -itk_add_test(NAME itkShapeKeepNObjectsLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-keep-n-objects.mha} - ${ITK_TEST_OUTPUT_DIR}/cthead1-shape-keep-n-objects.mha - itkShapeKeepNObjectsLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-shape-keep-n-objects.mha 0 0 2) -itk_add_test(NAME itkShapeLabelObjectAccessorsTest1 - COMMAND ITKLabelMapTestDriver itkShapeLabelObjectAccessorsTest1 - DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png}) -itk_add_test(NAME itkShapeOpeningLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-shape-opening.mha} - ${ITK_TEST_OUTPUT_DIR}/cthead1-shape-opening.mha - itkShapeOpeningLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-shape-opening.mha 140 1 0) -itk_add_test(NAME itkShapePositionLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkShapePositionLabelMapFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkShapePositionLabelMapFilterTest1.png - itkShapePositionLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} ${ITK_TEST_OUTPUT_DIR}/itkShapePositionLabelMapFilterTest1.png Centroid) -itk_add_test(NAME itkShapeRelabelLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-shape-relabel-labelmap.mha} - ${ITK_TEST_OUTPUT_DIR}/cthead1-shape-relabel-labelmap.mha - itkShapeRelabelLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-shape-relabel-labelmap.mha 1 0) -itk_add_test(NAME itkShapeUniqueLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-shape-unique-labelmap.mha} - ${ITK_TEST_OUTPUT_DIR}/cthead1-shape-unique-labelmap.mha - itkShapeUniqueLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-shape-unique-labelmap.mha 1 0) -itk_add_test(NAME itkShiftScaleLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-label-shiftscaled.mha} - ${ITK_TEST_OUTPUT_DIR}/cthead1-label-shiftscaled.mha - itkShiftScaleLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/cthead1-label-shiftscaled.mha 10 0.5 true) -itk_add_test(NAME itkStatisticsPositionLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkShapePositionLabelMapFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkStatisticsPositionLabelMapFilterTest1.png - itkStatisticsPositionLabelMapFilterTest1 DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} ${ITK_TEST_OUTPUT_DIR}/itkStatisticsPositionLabelMapFilterTest1.png CenterOfGravity) -itk_add_test(NAME itkShapeRelabelImageFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1Label-shape-relabel-baseline.png} - ${ITK_TEST_OUTPUT_DIR}/itkShapeRelabelImageFilterTest1.png - itkShapeRelabelImageFilterTest1 DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} ${ITK_TEST_OUTPUT_DIR}/itkShapeRelabelImageFilterTest1.png 255 0 Label - ) -itk_add_test(NAME itkStatisticsRelabelImageFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1-statistics-relabel_image-baseline.png} - ${ITK_TEST_OUTPUT_DIR}/itkStatisticsRelabelImageFilterTest1.png - itkStatisticsRelabelImageFilterTest1 DATA{Input/cthead1Label.png} DATA{Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkStatisticsRelabelImageFilterTest1.png 0 0 202) -itk_add_test(NAME itkAutoCropLabelMapFilterTest2 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/itkAutoCropLabelMapFilterTest2-92.png} - ${ITK_TEST_OUTPUT_DIR}/itkAutoCropLabelMapFilterTest2-92.png - --compare DATA{Baseline/itkAutoCropLabelMapFilterTest2-163.png} - ${ITK_TEST_OUTPUT_DIR}/itkAutoCropLabelMapFilterTest2-163.png - itkAutoCropLabelMapFilterTest2 - DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} - ${ITK_TEST_OUTPUT_DIR}/itkAutoCropLabelMapFilterTest2-92.png - ${ITK_TEST_OUTPUT_DIR}/itkAutoCropLabelMapFilterTest2-163.png - 92 - 163 - ) -itk_add_test(NAME itkStatisticsUniqueLabelMapFilterTest1 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1Label-label-statistics-unique-labelmap-baseline1.png} - ${ITK_TEST_OUTPUT_DIR}/itkStatisticsUniqueLabelMapFilterTest1.png - --compare DATA{Baseline/cthead1Label-label-statistics-unique-labelmap-dilate-baseline1.png} - ${ITK_TEST_OUTPUT_DIR}/itkStatisticsUniqueLabelMapFilterDilationStability1.png - itkStatisticsUniqueLabelMapFilterTest1 - DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkStatisticsUniqueLabelMapFilterTest1.png - ${ITK_TEST_OUTPUT_DIR}/itkStatisticsUniqueLabelMapFilterDilationStability1.png - 0 100) -itk_add_test(NAME itkStatisticsUniqueLabelMapFilterTest2 - COMMAND ITKLabelMapTestDriver - --compare DATA{Baseline/cthead1Label-label-statistics-unique-labelmap-baseline2.png} - ${ITK_TEST_OUTPUT_DIR}/itkStatisticsUniqueLabelMapFilterTest2.png - --compare DATA{Baseline/cthead1Label-label-statistics-unique-labelmap-dilate-baseline2.png} - ${ITK_TEST_OUTPUT_DIR}/itkStatisticsUniqueLabelMapFilterDilationStability2.png - --compareNumberOfPixelsTolerance 35 - itkStatisticsUniqueLabelMapFilterTest1 - DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkStatisticsUniqueLabelMapFilterTest2.png - ${ITK_TEST_OUTPUT_DIR}/itkStatisticsUniqueLabelMapFilterDilationStability2.png - 1 100) + itkConvertLabelMapFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-convert-short.png) +itk_add_test( + NAME + itkCropLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-label-crop.mha} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-crop.mha + itkCropLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-crop.mha + 40 + 50) +itk_add_test( + NAME + itkLabelImageToLabelMapFilterTest + COMMAND + ITKLabelMapTestDriver + itkLabelImageToLabelMapFilterTest) +itk_add_test( + NAME + itkLabelImageToShapeLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/simple-label-to-shapelabelmap.mha} + ${ITK_TEST_OUTPUT_DIR}/simple-label-to-shapelabelmap.mha + itkLabelImageToShapeLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/simple-label-b.png} + ${ITK_TEST_OUTPUT_DIR}/simple-label-to-shapelabelmap.mha + 90 + 1 + 1) +itk_add_test( + NAME + itkLabelImageToStatisticsLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/Spots.png} + ${ITK_TEST_OUTPUT_DIR}/Spots-labelimage-to-statisticslabel.png + itkLabelImageToStatisticsLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/Spots.png} + DATA{${ITK_DATA_ROOT}/Input/Spots.png} + ${ITK_TEST_OUTPUT_DIR}/Spots-labelimage-to-statisticslabel.png + 0 + 1 + 1 + 1 + 256) +itk_add_test( + NAME + itkLabelMapFilterTest + COMMAND + ITKLabelMapTestDriver + itkLabelMapFilterTest) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTest-0-0-0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTest-0-0-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-0-0-0.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-0-0-0.png + 0 + 0 + 0 + 0 + 0) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTestCrop-0-0-0-0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-0-0-0-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-0-0-0.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-0-0-0.png + 0 + 0 + 0 + 1 + 0) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTestCrop-0-0-0-10 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-0-0-0-10.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-0-0-10.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-0-0-10.png + 0 + 0 + 0 + 1 + 10) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTest-0-0-1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTest-0-0-1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-0-0-1.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-0-0-1.png + 0 + 0 + 1 + 0 + 0) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTestCrop-0-0-1-0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-0-0-1-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-0-1-0.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-0-1-0.png + 0 + 0 + 1 + 1 + 0) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTestCrop-0-0-1-10 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-0-0-1-10.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-0-1-10.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-0-1-10.png + 0 + 0 + 1 + 1 + 10) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTest-0-1-0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTest-0-1-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-0-1-0.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-0-1-0.png + 0 + 1 + 0 + 0 + 0) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTestCrop-0-1-0-0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-0-1-0-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-1-0-0.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-1-0-0.png + 0 + 1 + 0 + 1 + 0) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTestCrop-0-1-0-10 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-0-1-0-10.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-1-0-10.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-1-0-10.png + 0 + 1 + 0 + 1 + 10) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTest-0-1-1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTest-0-1-1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-0-1-1.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-0-1-1.png + 0 + 1 + 1 + 0 + 0) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTestCrop-0-1-1-0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-0-1-1-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-1-1-0.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-1-1-0.png + 0 + 1 + 1 + 1 + 0) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTestCrop-0-1-1-10 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-0-1-1-10.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-1-1-10.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-0-1-1-10.png + 0 + 1 + 1 + 1 + 10) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTest-100-0-0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTest-100-0-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-100-0-0.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-100-0-0.png + 100 + 0 + 0 + 0 + 0) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTestCrop-100-0-0-0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-100-0-0-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-0-0-0.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-0-0-0.png + 100 + 0 + 0 + 1 + 0) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTestCrop-100-0-0-10 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-100-0-0-10.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-0-0-10.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-0-0-10.png + 100 + 0 + 0 + 1 + 10) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTest-100-0-1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTest-100-0-1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-100-0-1.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-100-0-1.png + 100 + 0 + 1 + 0 + 0) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTestCrop-100-0-1-0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-100-0-1-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-0-1-0.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-0-1-0.png + 100 + 0 + 1 + 1 + 0) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTestCrop-100-0-1-10 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-100-0-1-10.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-0-1-10.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-0-1-10.png + 100 + 0 + 1 + 1 + 10) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTest-100-1-0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTest-100-1-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-100-1-0.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-100-1-0.png + 100 + 1 + 0 + 0 + 0) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTestCrop-100-1-0-0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-100-1-0-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-1-0-0.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-1-0-0.png + 100 + 1 + 0 + 1 + 0) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTestCrop-100-1-0-10 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-100-1-0-10.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-1-0-10.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-1-0-10.png + 100 + 1 + 0 + 1 + 10) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTest-100-1-1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTest-100-1-1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-100-1-1.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTest-100-1-1.png + 100 + 1 + 1 + 0 + 0) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTestCrop-100-1-1-0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-100-1-1-0.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-1-1-0.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-1-1-0.png + 100 + 1 + 1 + 1 + 0) +itk_add_test( + NAME + itkLabelMapMaskImageFilterTestCrop-100-1-1-10 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapMaskImageFilterTestCrop-100-1-1-10.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-1-1-10.png + itkLabelMapMaskImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapMaskImageFilterTestCrop-100-1-1-10.png + 100 + 1 + 1 + 1 + 10) +itk_add_test( + NAME + itkLabelMapTest + COMMAND + ITKLabelMapTestDriver + itkLabelMapTest) +itk_add_test( + NAME + itkLabelMapTest2 + COMMAND + ITKLabelMapTestDriver + itkLabelMapTest2) +itk_add_test( + NAME + itkLabelMapToAttributeImageFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelMapToAttributeImageFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapToAttributeImageFilterTest1.png + itkLabelMapToAttributeImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelMapToAttributeImageFilterTest1.png) +itk_add_test( + NAME + itkLabelMapToBinaryImageFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-label-binary.mha} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-binary.mha + itkLabelMapToBinaryImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-binary.mha + 255 + 0) +itk_add_test( + NAME + itkLabelMapToLabelImageFilterTest + COMMAND + ITKLabelMapTestDriver + itkLabelMapToLabelImageFilterTest) +itk_add_test( + NAME + itkLabelObjectLineComparatorTest + COMMAND + ITKLabelMapTestDriver + itkLabelObjectLineComparatorTest) +itk_add_test( + NAME + itkLabelObjectLineTest + COMMAND + ITKLabelMapTestDriver + itkLabelObjectLineTest) +itk_add_test( + NAME + itkLabelObjectTest + COMMAND + ITKLabelMapTestDriver + itkLabelObjectTest) +itk_add_test( + NAME + itkLabelSelectionLabelMapFilterTest0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelSelectionLabelMapFilterTest0.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelSelectionLabelMapFilterTest0.png + itkLabelSelectionLabelMapFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelSelectionLabelMapFilterTest0.png + 0 + 94) +itk_add_test( + NAME + itkLabelSelectionLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelSelectionLabelMapFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelSelectionLabelMapFilterTest1.png + itkLabelSelectionLabelMapFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelSelectionLabelMapFilterTest1.png + 1 + 94) +itk_add_test( + NAME + itkLabelShapeKeepNObjectsImageFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelShapeKeepNObjectsImageFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelShapeKeepNObjectsImageFilterTest1.png + itkLabelShapeKeepNObjectsImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelShapeKeepNObjectsImageFilterTest1.png + 0 + 1 + 0 + Label) +itk_add_test( + NAME + itkLabelShapeOpeningImageFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1Label-shape-open-baseline.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelShapeOpeningImageFilterTest1.png + itkLabelShapeOpeningImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelShapeOpeningImageFilterTest1.png + 0 + 4000 + 0 + 100) +itk_add_test( + NAME + itkLabelStatisticsKeepNObjectsImageFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1Label-statistics-keep-NObjects-baseline.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelStatisticsKeepNObjectsImageFilterTest1.png + itkLabelStatisticsKeepNObjectsImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelStatisticsKeepNObjectsImageFilterTest1.png + 0 + 7 + 0 + 203) +itk_add_test( + NAME + itkLabelStatisticsOpeningImageFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1Label-label-statistics-opening-baseline.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelStatisticsOpeningImageFilterTest1.png + itkLabelStatisticsOpeningImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelStatisticsOpeningImageFilterTest1.png + 0 + 98 + 0 + Label) +itk_add_test( + NAME + itkLabelUniqueLabelMapFilterTest0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelUniqueLabelMapFilterTest0.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelUniqueLabelMapFilterTest0.png + itkLabelUniqueLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelUniqueLabelMapFilterTest0.png + 0) +itk_add_test( + NAME + itkLabelUniqueLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkLabelUniqueLabelMapFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelUniqueLabelMapFilterTest1.png + itkLabelUniqueLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelUniqueLabelMapFilterTest1.png + 1) +itk_add_test( + NAME + itkMergeLabelMapFilterTest1a + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/simple-label-merge-keep.mha} + ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-keep.mha + itkMergeLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/simple-label-c.png} + DATA{${ITK_DATA_ROOT}/Input/simple-label-d.png} + ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-keep.mha + 50 + 50 + 0 + 0) +itk_add_test( + NAME + itkMergeLabelMapFilterTest1b + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/simple-label-merge-aggregate.mha} + ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-aggregate.mha + itkMergeLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/simple-label-c.png} + DATA{${ITK_DATA_ROOT}/Input/simple-label-d.png} + ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-aggregate.mha + 50 + 50 + 1 + 0) +itk_add_test( + NAME + itkMergeLabelMapFilterTest1c + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/simple-label-merge-pack.mha} + ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-pack.mha + itkMergeLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/simple-label-c.png} + DATA{${ITK_DATA_ROOT}/Input/simple-label-d.png} + ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-pack.mha + 50 + 50 + 2 + 0) +itk_add_test( + NAME + itkMergeLabelMapFilterTest1d + COMMAND + ITKLabelMapTestDriver + itkMergeLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/simple-label-c.png} + DATA{${ITK_DATA_ROOT}/Input/simple-label-d.png} + ${ITK_TEST_OUTPUT_DIR}/thisFileShouldNotExist.mha + 50 + 50 + 3 + 1) +itk_add_test( + NAME + itkMergeLabelMapFilterTest1e + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/simple-label-merge-strict.mha} + ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-strict.mha + itkMergeLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/simple-label-e.png} + DATA{${ITK_DATA_ROOT}/Input/simple-label-d.png} + ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-strict.mha + 50 + 50 + 3 + 0) +itk_add_test( + NAME + itkMergeLabelMapFilterTest1f + COMMAND + ITKLabelMapTestDriver + itkMergeLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/simple-label-e.png} + DATA{${ITK_DATA_ROOT}/Input/simple-label-d.png} + ${ITK_TEST_OUTPUT_DIR}/simple-label-merge-wrong.mha + 50 + 50 + 10 + 1) +itk_add_test( + NAME + itkObjectByObjectLabelMapFilterTest0 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkObjectByObjectLabelMapFilterTest0.png} + ${ITK_TEST_OUTPUT_DIR}/itkObjectByObjectLabelMapFilterTest0.png + itkObjectByObjectLabelMapFilterTest + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + ${ITK_TEST_OUTPUT_DIR}/itkObjectByObjectLabelMapFilterTest0.png + 0 + 0 + 1) +itk_add_test( + NAME + itkObjectByObjectLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkObjectByObjectLabelMapFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkObjectByObjectLabelMapFilterTest1.png + itkObjectByObjectLabelMapFilterTest + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + ${ITK_TEST_OUTPUT_DIR}/itkObjectByObjectLabelMapFilterTest1.png + 1 + 0 + 1) +itk_add_test( + NAME + itkPadLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-label-pad.mha} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-pad.mha + itkPadLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-pad.mha + 40 + 50) +itk_add_test( + NAME + itkRegionFromReferenceLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-label-regionreference.mha} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-regionreference.mha + itkRegionFromReferenceLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + DATA{${ITK_DATA_ROOT}/Input/circle.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-regionreference.mha) +itk_add_test( + NAME + itkRelabelLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-label-relabeled.mha} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-relabeled.mha + itkRelabelLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-relabeled.mha) +itk_add_test( + NAME + itkShapeKeepNObjectsLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-keep-n-objects.mha} + ${ITK_TEST_OUTPUT_DIR}/cthead1-shape-keep-n-objects.mha + itkShapeKeepNObjectsLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-shape-keep-n-objects.mha + 0 + 0 + 2) +itk_add_test( + NAME + itkShapeLabelObjectAccessorsTest1 + COMMAND + ITKLabelMapTestDriver + itkShapeLabelObjectAccessorsTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png}) +itk_add_test( + NAME + itkShapeOpeningLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-shape-opening.mha} + ${ITK_TEST_OUTPUT_DIR}/cthead1-shape-opening.mha + itkShapeOpeningLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-shape-opening.mha + 140 + 1 + 0) +itk_add_test( + NAME + itkShapePositionLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkShapePositionLabelMapFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkShapePositionLabelMapFilterTest1.png + itkShapePositionLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + ${ITK_TEST_OUTPUT_DIR}/itkShapePositionLabelMapFilterTest1.png + Centroid) +itk_add_test( + NAME + itkShapeRelabelLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-shape-relabel-labelmap.mha} + ${ITK_TEST_OUTPUT_DIR}/cthead1-shape-relabel-labelmap.mha + itkShapeRelabelLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-shape-relabel-labelmap.mha + 1 + 0) +itk_add_test( + NAME + itkShapeUniqueLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-shape-unique-labelmap.mha} + ${ITK_TEST_OUTPUT_DIR}/cthead1-shape-unique-labelmap.mha + itkShapeUniqueLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-shape-unique-labelmap.mha + 1 + 0) +itk_add_test( + NAME + itkShiftScaleLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-label-shiftscaled.mha} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-shiftscaled.mha + itkShiftScaleLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1-label-shiftscaled.mha + 10 + 0.5 + true) +itk_add_test( + NAME + itkStatisticsPositionLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkShapePositionLabelMapFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkStatisticsPositionLabelMapFilterTest1.png + itkStatisticsPositionLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + DATA{${ITK_DATA_ROOT}/Input/SpotsLabeled.png} + ${ITK_TEST_OUTPUT_DIR}/itkStatisticsPositionLabelMapFilterTest1.png + CenterOfGravity) +itk_add_test( + NAME + itkShapeRelabelImageFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1Label-shape-relabel-baseline.png} + ${ITK_TEST_OUTPUT_DIR}/itkShapeRelabelImageFilterTest1.png + itkShapeRelabelImageFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/itkShapeRelabelImageFilterTest1.png + 255 + 0 + Label) +itk_add_test( + NAME + itkStatisticsRelabelImageFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1-statistics-relabel_image-baseline.png} + ${ITK_TEST_OUTPUT_DIR}/itkStatisticsRelabelImageFilterTest1.png + itkStatisticsRelabelImageFilterTest1 + DATA{Input/cthead1Label.png} + DATA{Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkStatisticsRelabelImageFilterTest1.png + 0 + 0 + 202) +itk_add_test( + NAME + itkAutoCropLabelMapFilterTest2 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/itkAutoCropLabelMapFilterTest2-92.png} + ${ITK_TEST_OUTPUT_DIR}/itkAutoCropLabelMapFilterTest2-92.png + --compare + DATA{Baseline/itkAutoCropLabelMapFilterTest2-163.png} + ${ITK_TEST_OUTPUT_DIR}/itkAutoCropLabelMapFilterTest2-163.png + itkAutoCropLabelMapFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + ${ITK_TEST_OUTPUT_DIR}/itkAutoCropLabelMapFilterTest2-92.png + ${ITK_TEST_OUTPUT_DIR}/itkAutoCropLabelMapFilterTest2-163.png + 92 + 163) +itk_add_test( + NAME + itkStatisticsUniqueLabelMapFilterTest1 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1Label-label-statistics-unique-labelmap-baseline1.png} + ${ITK_TEST_OUTPUT_DIR}/itkStatisticsUniqueLabelMapFilterTest1.png + --compare + DATA{Baseline/cthead1Label-label-statistics-unique-labelmap-dilate-baseline1.png} + ${ITK_TEST_OUTPUT_DIR}/itkStatisticsUniqueLabelMapFilterDilationStability1.png + itkStatisticsUniqueLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkStatisticsUniqueLabelMapFilterTest1.png + ${ITK_TEST_OUTPUT_DIR}/itkStatisticsUniqueLabelMapFilterDilationStability1.png + 0 + 100) +itk_add_test( + NAME + itkStatisticsUniqueLabelMapFilterTest2 + COMMAND + ITKLabelMapTestDriver + --compare + DATA{Baseline/cthead1Label-label-statistics-unique-labelmap-baseline2.png} + ${ITK_TEST_OUTPUT_DIR}/itkStatisticsUniqueLabelMapFilterTest2.png + --compare + DATA{Baseline/cthead1Label-label-statistics-unique-labelmap-dilate-baseline2.png} + ${ITK_TEST_OUTPUT_DIR}/itkStatisticsUniqueLabelMapFilterDilationStability2.png + --compareNumberOfPixelsTolerance + 35 + itkStatisticsUniqueLabelMapFilterTest1 + DATA{${ITK_DATA_ROOT}/Input/cthead1Label.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkStatisticsUniqueLabelMapFilterTest2.png + ${ITK_TEST_OUTPUT_DIR}/itkStatisticsUniqueLabelMapFilterDilationStability2.png + 1 + 100) -set(ITKLabelMapGTests - itkShapeLabelMapFilterGTest.cxx - itkStatisticsLabelMapFilterGTest.cxx) +set(ITKLabelMapGTests itkShapeLabelMapFilterGTest.cxx itkStatisticsLabelMapFilterGTest.cxx) -CreateGoogleTestDriver(ITKLabelMap "${ITKLabelMap-Test_LIBRARIES}" "${ITKLabelMapGTests}") +creategoogletestdriver(ITKLabelMap "${ITKLabelMap-Test_LIBRARIES}" "${ITKLabelMapGTests}") diff --git a/Modules/Filtering/LabelMap/wrapping/CMakeLists.txt b/Modules/Filtering/LabelMap/wrapping/CMakeLists.txt index 6a9d4614eb8..2dfe2a59d35 100644 --- a/Modules/Filtering/LabelMap/wrapping/CMakeLists.txt +++ b/Modules/Filtering/LabelMap/wrapping/CMakeLists.txt @@ -1,15 +1,14 @@ itk_wrap_module(ITKLabelMap) set(WRAPPER_SUBMODULE_ORDER - itkLabelObjectLine - itkLabelObject - itkShapeLabelObject - itkStatisticsLabelObject - ITKLabelMapBase - itkLabelMapFilter - itkInPlaceLabelMapFilter - itkChangeRegionLabelMapFilter -) + itkLabelObjectLine + itkLabelObject + itkShapeLabelObject + itkStatisticsLabelObject + ITKLabelMapBase + itkLabelMapFilter + itkInPlaceLabelMapFilter + itkChangeRegionLabelMapFilter) # Save default includes so they can be reset afterwards set(tmp_default_includes ${WRAPPER_DEFAULT_INCLUDE}) diff --git a/Modules/Filtering/LabelMap/wrapping/ITKLabelMapBase.wrap b/Modules/Filtering/LabelMap/wrapping/ITKLabelMapBase.wrap index 2dac7c007d3..b68f372e900 100644 --- a/Modules/Filtering/LabelMap/wrapping/ITKLabelMapBase.wrap +++ b/Modules/Filtering/LabelMap/wrapping/ITKLabelMapBase.wrap @@ -1,33 +1,33 @@ itk_wrap_class("itk::LabelMap" POINTER) - set(WRAPPER_TEMPLATES "${itk_Wrap_LabelMap}") +set(WRAPPER_TEMPLATES "${itk_Wrap_LabelMap}") itk_end_wrap_class() itk_wrap_class("itk::ImageSource" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::ImageToImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - # label collection -> label collection - itk_wrap_template("${ITKM_LM${d}}${ITKM_LM${d}}" "${ITKT_LM${d}}, ${ITKT_LM${d}}") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + # label collection -> label collection + itk_wrap_template("${ITKM_LM${d}}${ITKM_LM${d}}" "${ITKT_LM${d}}, ${ITKT_LM${d}}") - foreach(t ${WRAP_ITK_SCALAR}) - # image -> label collection image - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_LM${d}}" "${ITKT_I${t}${d}}, ${ITKT_LM${d}}") - # label collection -> image - itk_wrap_template("${ITKM_LM${d}}${ITKM_I${t}${d}}" "${ITKT_LM${d}}, ${ITKT_I${t}${d}}") - endforeach() + foreach(t ${WRAP_ITK_SCALAR}) + # image -> label collection image + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_LM${d}}" "${ITKT_I${t}${d}}, ${ITKT_LM${d}}") + # label collection -> image + itk_wrap_template("${ITKM_LM${d}}${ITKM_I${t}${d}}" "${ITKT_LM${d}}, ${ITKT_I${t}${d}}") + endforeach() - # label map -> rgb image - if(ITK_WRAP_rgb_unsigned_char) - itk_wrap_template("${ITKM_LM${d}}${ITKM_IRGBUC${d}}" "${ITKT_LM${d}}, ${ITKT_IRGBUC${d}}") - endif() + # label map -> rgb image + if(ITK_WRAP_rgb_unsigned_char) + itk_wrap_template("${ITKM_LM${d}}${ITKM_IRGBUC${d}}" "${ITKT_LM${d}}, ${ITKT_IRGBUC${d}}") + endif() - if(ITK_WRAP_rgb_unsigned_short) - itk_wrap_template("${ITKM_LM${d}}${ITKM_IRGBUS${d}}" "${ITKT_LM${d}}, ${ITKT_IRGBUS${d}}") - endif() + if(ITK_WRAP_rgb_unsigned_short) + itk_wrap_template("${ITKM_LM${d}}${ITKM_IRGBUS${d}}" "${ITKT_LM${d}}, ${ITKT_IRGBUS${d}}") + endif() - endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkAggregateLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkAggregateLabelMapFilter.wrap index 529aa07ecca..a2347963487 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkAggregateLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkAggregateLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::AggregateLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkAutoCropLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkAutoCropLabelMapFilter.wrap index 15b73824172..26d1aee9647 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkAutoCropLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkAutoCropLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::AutoCropLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkBinaryFillholeImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkBinaryFillholeImageFilter.wrap index 4710dbea755..30ecd4047d9 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkBinaryFillholeImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkBinaryFillholeImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BinaryFillholeImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) +itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkBinaryGrindPeakImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkBinaryGrindPeakImageFilter.wrap index 378b9734517..76b8c871575 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkBinaryGrindPeakImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkBinaryGrindPeakImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BinaryGrindPeakImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) +itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkBinaryImageToLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkBinaryImageToLabelMapFilter.wrap index 1d3e853f610..107301fe829 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkBinaryImageToLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkBinaryImageToLabelMapFilter.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::BinaryImageToLabelMapFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(t ${WRAP_ITK_USIGN_INT}) - foreach(d ${restricted_dims}) - # image -> label collection image - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_LM${d}}" "${ITKT_I${t}${d}}, ${ITKT_LM${d}}") - endforeach() +itk_wrap_filter_dims(restricted_dims 2+) +foreach(t ${WRAP_ITK_USIGN_INT}) + foreach(d ${restricted_dims}) + # image -> label collection image + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_LM${d}}" "${ITKT_I${t}${d}}, ${ITKT_LM${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkBinaryImageToShapeLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkBinaryImageToShapeLabelMapFilter.wrap index b019502544d..d030097f4dd 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkBinaryImageToShapeLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkBinaryImageToShapeLabelMapFilter.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::BinaryImageToShapeLabelMapFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(t ${WRAP_ITK_USIGN_INT}) - foreach(d ${restricted_dims}) - # image -> label collection image - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_LM${d}}" "${ITKT_I${t}${d}}, ${ITKT_LM${d}}") - endforeach() +itk_wrap_filter_dims(restricted_dims 2+) +foreach(t ${WRAP_ITK_USIGN_INT}) + foreach(d ${restricted_dims}) + # image -> label collection image + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_LM${d}}" "${ITKT_I${t}${d}}, ${ITKT_LM${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkBinaryImageToStatisticsLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkBinaryImageToStatisticsLabelMapFilter.wrap index f3a8dfe4eec..98663e8d69e 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkBinaryImageToStatisticsLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkBinaryImageToStatisticsLabelMapFilter.wrap @@ -1,11 +1,12 @@ itk_wrap_class("itk::BinaryImageToStatisticsLabelMapFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(t ${WRAP_ITK_USIGN_INT}) - foreach(t2 ${WRAP_ITK_SCALAR}) - foreach(d ${restricted_dims}) - # image -> label collection image - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t2}${d}}${ITKM_LM${d}}" "${ITKT_I${t}${d}}, ${ITKT_I${t2}${d}}, ${ITKT_LM${d}}") - endforeach() +itk_wrap_filter_dims(restricted_dims 2+) +foreach(t ${WRAP_ITK_USIGN_INT}) + foreach(t2 ${WRAP_ITK_SCALAR}) + foreach(d ${restricted_dims}) + # image -> label collection image + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t2}${d}}${ITKM_LM${d}}" + "${ITKT_I${t}${d}}, ${ITKT_I${t2}${d}}, ${ITKT_LM${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkBinaryNotImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkBinaryNotImageFilter.wrap index 4217d27ac89..a97439b3316 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkBinaryNotImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkBinaryNotImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BinaryNotImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_INT}" 1) +itk_wrap_image_filter("${WRAP_ITK_INT}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkBinaryReconstructionByDilationImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkBinaryReconstructionByDilationImageFilter.wrap index 2ff81185f6f..8091e8dc3f2 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkBinaryReconstructionByDilationImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkBinaryReconstructionByDilationImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BinaryReconstructionByDilationImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) +itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkBinaryReconstructionByErosionImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkBinaryReconstructionByErosionImageFilter.wrap index ae2d70f17c0..1424cd634c5 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkBinaryReconstructionByErosionImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkBinaryReconstructionByErosionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BinaryReconstructionByErosionImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) +itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkBinaryShapeKeepNObjectsImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkBinaryShapeKeepNObjectsImageFilter.wrap index 4ff1f9ce75f..327110723fc 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkBinaryShapeKeepNObjectsImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkBinaryShapeKeepNObjectsImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BinaryShapeKeepNObjectsImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) +itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkBinaryShapeOpeningImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkBinaryShapeOpeningImageFilter.wrap index 354cbf0e000..53ee0210d11 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkBinaryShapeOpeningImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkBinaryShapeOpeningImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BinaryShapeOpeningImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) +itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkBinaryStatisticsKeepNObjectsImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkBinaryStatisticsKeepNObjectsImageFilter.wrap index bd3361c10a9..4cb6e5e4fa4 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkBinaryStatisticsKeepNObjectsImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkBinaryStatisticsKeepNObjectsImageFilter.wrap @@ -1,10 +1,10 @@ itk_wrap_class("itk::BinaryStatisticsKeepNObjectsImageFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(d ${restricted_dims}) - foreach(t2 ${WRAP_ITK_SCALAR}) - foreach(t1 ${WRAP_ITK_USIGN_INT}) - itk_wrap_template("${ITKM_I${t1}${d}}${ITKM_I${t2}${d}}" "${ITKT_I${t1}${d}},${ITKT_I${t2}${d}}") - endforeach() +itk_wrap_filter_dims(restricted_dims 2+) +foreach(d ${restricted_dims}) + foreach(t2 ${WRAP_ITK_SCALAR}) + foreach(t1 ${WRAP_ITK_USIGN_INT}) + itk_wrap_template("${ITKM_I${t1}${d}}${ITKM_I${t2}${d}}" "${ITKT_I${t1}${d}},${ITKT_I${t2}${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkBinaryStatisticsOpeningImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkBinaryStatisticsOpeningImageFilter.wrap index 78325603631..ea2b59b2ef7 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkBinaryStatisticsOpeningImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkBinaryStatisticsOpeningImageFilter.wrap @@ -1,10 +1,10 @@ itk_wrap_class("itk::BinaryStatisticsOpeningImageFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(d ${restricted_dims}) - foreach(t2 ${WRAP_ITK_SCALAR}) - foreach(t1 ${WRAP_ITK_USIGN_INT}) - itk_wrap_template("${ITKM_I${t1}${d}}${ITKM_I${t2}${d}}" "${ITKT_I${t1}${d}},${ITKT_I${t2}${d}}") - endforeach() +itk_wrap_filter_dims(restricted_dims 2+) +foreach(d ${restricted_dims}) + foreach(t2 ${WRAP_ITK_SCALAR}) + foreach(t1 ${WRAP_ITK_USIGN_INT}) + itk_wrap_template("${ITKM_I${t1}${d}}${ITKM_I${t2}${d}}" "${ITKT_I${t1}${d}},${ITKT_I${t2}${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkChangeLabelLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkChangeLabelLabelMapFilter.wrap index 5b55948cc97..67d5feec52b 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkChangeLabelLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkChangeLabelLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ChangeLabelLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkChangeRegionLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkChangeRegionLabelMapFilter.wrap index d04d5df5d00..d3a879f4269 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkChangeRegionLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkChangeRegionLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ChangeRegionLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkCropLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkCropLabelMapFilter.wrap index a31fc8996e5..c4489be2410 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkCropLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkCropLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::CropLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkInPlaceLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkInPlaceLabelMapFilter.wrap index cb7d9c48017..d061925c03a 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkInPlaceLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkInPlaceLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::InPlaceLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkLabelImageToLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkLabelImageToLabelMapFilter.wrap index ff91b1ebc93..bbce1ab9ebb 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkLabelImageToLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkLabelImageToLabelMapFilter.wrap @@ -1,17 +1,17 @@ itk_wrap_class("itk::ScanlineFilterCommon" POINTER) - foreach(t ${WRAP_ITK_USIGN_INT}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - # image -> label collection image - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_LM${d}}" "${ITKT_I${t}${d}}, ${ITKT_LM${d}}") - endforeach() +foreach(t ${WRAP_ITK_USIGN_INT}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + # image -> label collection image + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_LM${d}}" "${ITKT_I${t}${d}}, ${ITKT_LM${d}}") endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::LabelImageToLabelMapFilter" POINTER) - foreach(t ${WRAP_ITK_USIGN_INT}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - # image -> label collection image - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_LM${d}}" "${ITKT_I${t}${d}}, ${ITKT_LM${d}}") - endforeach() +foreach(t ${WRAP_ITK_USIGN_INT}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + # image -> label collection image + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_LM${d}}" "${ITKT_I${t}${d}}, ${ITKT_LM${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkLabelImageToShapeLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkLabelImageToShapeLabelMapFilter.wrap index 84662c38295..d9321c7b954 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkLabelImageToShapeLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkLabelImageToShapeLabelMapFilter.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::LabelImageToShapeLabelMapFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(t ${WRAP_ITK_USIGN_INT}) - foreach(d ${restricted_dims}) - # image -> label collection image - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_LM${d}}" "${ITKT_I${t}${d}}, ${ITKT_LM${d}}") - endforeach() +itk_wrap_filter_dims(restricted_dims 2+) +foreach(t ${WRAP_ITK_USIGN_INT}) + foreach(d ${restricted_dims}) + # image -> label collection image + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_LM${d}}" "${ITKT_I${t}${d}}, ${ITKT_LM${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkLabelImageToStatisticsLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkLabelImageToStatisticsLabelMapFilter.wrap index f11907104b8..f1e4a416ffc 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkLabelImageToStatisticsLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkLabelImageToStatisticsLabelMapFilter.wrap @@ -1,11 +1,12 @@ itk_wrap_class("itk::LabelImageToStatisticsLabelMapFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(t ${WRAP_ITK_USIGN_INT}) - foreach(t2 ${WRAP_ITK_SCALAR}) - foreach(d ${restricted_dims}) - # image -> label collection image - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t2}${d}}${ITKM_LM${d}}" "${ITKT_I${t}${d}}, ${ITKT_I${t2}${d}}, ${ITKT_LM${d}}") - endforeach() +itk_wrap_filter_dims(restricted_dims 2+) +foreach(t ${WRAP_ITK_USIGN_INT}) + foreach(t2 ${WRAP_ITK_SCALAR}) + foreach(d ${restricted_dims}) + # image -> label collection image + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t2}${d}}${ITKM_LM${d}}" + "${ITKT_I${t}${d}}, ${ITKT_I${t2}${d}}, ${ITKT_LM${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkLabelMapFilter.wrap index 16aa9728730..c32d58f12dc 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkLabelMapFilter.wrap @@ -1,21 +1,21 @@ itk_wrap_class("itk::LabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - # label collection -> label collection - itk_wrap_template("${ITKM_LM${d}}${ITKM_LM${d}}" "${ITKT_LM${d}}, ${ITKT_LM${d}}") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + # label collection -> label collection + itk_wrap_template("${ITKM_LM${d}}${ITKM_LM${d}}" "${ITKT_LM${d}}, ${ITKT_LM${d}}") - foreach(t ${WRAP_ITK_SCALAR}) - # label collection -> image - itk_wrap_template("${ITKM_LM${d}}${ITKM_I${t}${d}}" "${ITKT_LM${d}}, ${ITKT_I${t}${d}}") - endforeach() + foreach(t ${WRAP_ITK_SCALAR}) + # label collection -> image + itk_wrap_template("${ITKM_LM${d}}${ITKM_I${t}${d}}" "${ITKT_LM${d}}, ${ITKT_I${t}${d}}") + endforeach() - # label map -> rgb image - if(ITK_WRAP_rgb_unsigned_char) - itk_wrap_template("${ITKM_LM${d}}${ITKM_IRGBUC${d}}" "${ITKT_LM${d}}, ${ITKT_IRGBUC${d}}") - endif() + # label map -> rgb image + if(ITK_WRAP_rgb_unsigned_char) + itk_wrap_template("${ITKM_LM${d}}${ITKM_IRGBUC${d}}" "${ITKT_LM${d}}, ${ITKT_IRGBUC${d}}") + endif() - if(ITK_WRAP_rgb_unsigned_short) - itk_wrap_template("${ITKM_LM${d}}${ITKM_IRGBUS${d}}" "${ITKT_LM${d}}, ${ITKT_IRGBUS${d}}") - endif() + if(ITK_WRAP_rgb_unsigned_short) + itk_wrap_template("${ITKM_LM${d}}${ITKM_IRGBUS${d}}" "${ITKT_LM${d}}, ${ITKT_IRGBUS${d}}") + endif() - endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkLabelMapMaskImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkLabelMapMaskImageFilter.wrap index 003b4bdf4da..d4fee248d93 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkLabelMapMaskImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkLabelMapMaskImageFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::LabelMapMaskImageFilter" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}${ITKM_I${t}${d}}" "${ITKT_LM${d}}, ${ITKT_I${t}${d}}") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}${ITKM_I${t}${d}}" "${ITKT_LM${d}}, ${ITKT_I${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkLabelMapToBinaryImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkLabelMapToBinaryImageFilter.wrap index 7adfd7ccfb9..7d84e340550 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkLabelMapToBinaryImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkLabelMapToBinaryImageFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::LabelMapToBinaryImageFilter" POINTER) - foreach(t ${WRAP_ITK_USIGN_INT}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}${ITKM_I${t}${d}}" "${ITKT_LM${d}}, ${ITKT_I${t}${d}}") - endforeach() +foreach(t ${WRAP_ITK_USIGN_INT}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}${ITKM_I${t}${d}}" "${ITKT_LM${d}}, ${ITKT_I${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkLabelMapToLabelImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkLabelMapToLabelImageFilter.wrap index 7e7b7588415..130f9024041 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkLabelMapToLabelImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkLabelMapToLabelImageFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::LabelMapToLabelImageFilter" POINTER) - foreach(t ${WRAP_ITK_USIGN_INT}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}${ITKM_I${t}${d}}" "${ITKT_LM${d}}, ${ITKT_I${t}${d}}") - endforeach() +foreach(t ${WRAP_ITK_USIGN_INT}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}${ITKM_I${t}${d}}" "${ITKT_LM${d}}, ${ITKT_I${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkLabelObject.wrap b/Modules/Filtering/LabelMap/wrapping/itkLabelObject.wrap index 04f28f09341..1d32bf2cfc7 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkLabelObject.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkLabelObject.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::LabelObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_UL}${d}" "${ITKT_UL},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_UL}${d}" "${ITKT_UL},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkLabelObjectLine.wrap b/Modules/Filtering/LabelMap/wrapping/itkLabelObjectLine.wrap index ba29bec0f8f..3611733dcb5 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkLabelObjectLine.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkLabelObjectLine.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::LabelObjectLine") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${d}" "${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${d}" "${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkLabelSelectionLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkLabelSelectionLabelMapFilter.wrap index 442675b893e..2999dd91076 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkLabelSelectionLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkLabelSelectionLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::LabelSelectionLabelMapFilter" POINTER_WITH_SUPERCLASS) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkLabelShapeKeepNObjectsImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkLabelShapeKeepNObjectsImageFilter.wrap index 8a9fbf176a3..6652a58d414 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkLabelShapeKeepNObjectsImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkLabelShapeKeepNObjectsImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::LabelShapeKeepNObjectsImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) +itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkLabelShapeOpeningImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkLabelShapeOpeningImageFilter.wrap index 0b9d8b3171c..004ac1d3e3b 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkLabelShapeOpeningImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkLabelShapeOpeningImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::LabelShapeOpeningImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) +itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkLabelStatisticsKeepNObjectsImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkLabelStatisticsKeepNObjectsImageFilter.wrap index 08076d3a86c..c4d18ef9b66 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkLabelStatisticsKeepNObjectsImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkLabelStatisticsKeepNObjectsImageFilter.wrap @@ -1,10 +1,10 @@ itk_wrap_class("itk::LabelStatisticsKeepNObjectsImageFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(d ${restricted_dims}) - foreach(t2 ${WRAP_ITK_SCALAR}) - foreach(t1 ${WRAP_ITK_USIGN_INT}) - itk_wrap_template("${ITKM_I${t1}${d}}${ITKM_I${t2}${d}}" "${ITKT_I${t1}${d}},${ITKT_I${t2}${d}}") - endforeach() +itk_wrap_filter_dims(restricted_dims 2+) +foreach(d ${restricted_dims}) + foreach(t2 ${WRAP_ITK_SCALAR}) + foreach(t1 ${WRAP_ITK_USIGN_INT}) + itk_wrap_template("${ITKM_I${t1}${d}}${ITKM_I${t2}${d}}" "${ITKT_I${t1}${d}},${ITKT_I${t2}${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkLabelStatisticsOpeningImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkLabelStatisticsOpeningImageFilter.wrap index 641d40f7913..fb47fc3f94e 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkLabelStatisticsOpeningImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkLabelStatisticsOpeningImageFilter.wrap @@ -1,10 +1,10 @@ itk_wrap_class("itk::LabelStatisticsOpeningImageFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(d ${restricted_dims}) - foreach(t2 ${WRAP_ITK_SCALAR}) - foreach(t1 ${WRAP_ITK_USIGN_INT}) - itk_wrap_template("${ITKM_I${t1}${d}}${ITKM_I${t2}${d}}" "${ITKT_I${t1}${d}},${ITKT_I${t2}${d}}") - endforeach() +itk_wrap_filter_dims(restricted_dims 2+) +foreach(d ${restricted_dims}) + foreach(t2 ${WRAP_ITK_SCALAR}) + foreach(t1 ${WRAP_ITK_USIGN_INT}) + itk_wrap_template("${ITKM_I${t1}${d}}${ITKM_I${t2}${d}}" "${ITKT_I${t1}${d}},${ITKT_I${t2}${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkLabelUniqueLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkLabelUniqueLabelMapFilter.wrap index 45d53bb0dc9..c9f35276c06 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkLabelUniqueLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkLabelUniqueLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::LabelUniqueLabelMapFilter" POINTER_WITH_SUPERCLASS) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkMergeLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkMergeLabelMapFilter.wrap index 986a34897c5..e7ef5e72092 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkMergeLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkMergeLabelMapFilter.wrap @@ -4,7 +4,7 @@ itk_wrap_include("itkMergeLabelMapFilter.h") itk_wrap_simple_class("itk::MergeLabelMapFilterEnums") itk_wrap_class("itk::MergeLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkObjectByObjectLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkObjectByObjectLabelMapFilter.wrap index f7e007fc45c..918553b95e2 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkObjectByObjectLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkObjectByObjectLabelMapFilter.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::ObjectByObjectLabelMapFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(d ${restricted_dims}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +itk_wrap_filter_dims(restricted_dims 2+) +foreach(d ${restricted_dims}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkPadLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkPadLabelMapFilter.wrap index 8936c2012bc..bf5e2b69e27 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkPadLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkPadLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::PadLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkRegionFromReferenceLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkRegionFromReferenceLabelMapFilter.wrap index 9e878c12e81..8ef01a8f3e5 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkRegionFromReferenceLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkRegionFromReferenceLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::RegionFromReferenceLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkRelabelLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkRelabelLabelMapFilter.wrap index b7857d12832..4cce413702b 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkRelabelLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkRelabelLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::RelabelLabelMapFilter" POINTER_WITH_SUPERCLASS) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkShapeKeepNObjectsLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkShapeKeepNObjectsLabelMapFilter.wrap index a7eca334e02..469093cb6af 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkShapeKeepNObjectsLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkShapeKeepNObjectsLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ShapeKeepNObjectsLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkShapeLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkShapeLabelMapFilter.wrap index 2ea0911abf5..4af9f6ddbc5 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkShapeLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkShapeLabelMapFilter.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::ShapeLabelMapFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(d ${restricted_dims}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +itk_wrap_filter_dims(restricted_dims 2+) +foreach(d ${restricted_dims}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkShapeLabelObject.wrap b/Modules/Filtering/LabelMap/wrapping/itkShapeLabelObject.wrap index 1b60fabb334..dc2d0b90ec5 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkShapeLabelObject.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkShapeLabelObject.wrap @@ -1,12 +1,12 @@ itk_wrap_class("itk::FixedArray") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - math(EXPR IntegerPow "1 << ${d}") - itk_wrap_template("P${ITKM_${ITKM_D}}${d}${IntegerPow}" "itk::Point, ${IntegerPow}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + math(EXPR IntegerPow "1 << ${d}") + itk_wrap_template("P${ITKM_${ITKM_D}}${d}${IntegerPow}" "itk::Point, ${IntegerPow}") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::ShapeLabelObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_UL}${d}" "${ITKT_UL},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_UL}${d}" "${ITKT_UL},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkShapeOpeningLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkShapeOpeningLabelMapFilter.wrap index dc996771932..cea8ca873f3 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkShapeOpeningLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkShapeOpeningLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ShapeOpeningLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkShapePositionLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkShapePositionLabelMapFilter.wrap index aee6ccae218..0d15802d7c6 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkShapePositionLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkShapePositionLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ShapePositionLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkShapeRelabelImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkShapeRelabelImageFilter.wrap index e1f476dcd48..d8891186470 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkShapeRelabelImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkShapeRelabelImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ShapeRelabelImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) +itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkShapeRelabelLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkShapeRelabelLabelMapFilter.wrap index 2c9525737aa..6e8e48c0254 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkShapeRelabelLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkShapeRelabelLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ShapeRelabelLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkShapeUniqueLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkShapeUniqueLabelMapFilter.wrap index 45d44bdfd50..3f11cf8e16b 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkShapeUniqueLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkShapeUniqueLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ShapeUniqueLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkShiftScaleLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkShiftScaleLabelMapFilter.wrap index 8d15e8156c1..668226f5ef2 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkShiftScaleLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkShiftScaleLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ShiftScaleLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkStatisticsKeepNObjectsLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkStatisticsKeepNObjectsLabelMapFilter.wrap index cf74b278b7f..fd7384386e1 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkStatisticsKeepNObjectsLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkStatisticsKeepNObjectsLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::StatisticsKeepNObjectsLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkStatisticsLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkStatisticsLabelMapFilter.wrap index 986d717a277..ff4106e6f92 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkStatisticsLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkStatisticsLabelMapFilter.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::StatisticsLabelMapFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(d ${restricted_dims}) - foreach(t2 ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_LM${d}}${ITKM_I${t2}${d}}" "${ITKT_LM${d}}, ${ITKT_I${t2}${d}}") - endforeach() +itk_wrap_filter_dims(restricted_dims 2+) +foreach(d ${restricted_dims}) + foreach(t2 ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_LM${d}}${ITKM_I${t2}${d}}" "${ITKT_LM${d}}, ${ITKT_I${t2}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkStatisticsLabelObject.wrap b/Modules/Filtering/LabelMap/wrapping/itkStatisticsLabelObject.wrap index 0973a38e098..207f26c2773 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkStatisticsLabelObject.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkStatisticsLabelObject.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::StatisticsLabelObject" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_UL}${d}" "${ITKT_UL},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_UL}${d}" "${ITKT_UL},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkStatisticsOpeningLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkStatisticsOpeningLabelMapFilter.wrap index a8f52449301..fd1db42a3b9 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkStatisticsOpeningLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkStatisticsOpeningLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::StatisticsOpeningLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkStatisticsPositionLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkStatisticsPositionLabelMapFilter.wrap index d0f3088d3c1..fb78afd33e3 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkStatisticsPositionLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkStatisticsPositionLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::StatisticsPositionLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkStatisticsRelabelImageFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkStatisticsRelabelImageFilter.wrap index 27825525b95..5e30bfd74e7 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkStatisticsRelabelImageFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkStatisticsRelabelImageFilter.wrap @@ -1,10 +1,10 @@ itk_wrap_class("itk::StatisticsRelabelImageFilter" POINTER) - itk_wrap_filter_dims(restricted_dims 2+) - foreach(d ${restricted_dims}) - foreach(t2 ${WRAP_ITK_SCALAR}) - foreach(t1 ${WRAP_ITK_USIGN_INT}) - itk_wrap_template("${ITKM_I${t1}${d}}${ITKM_I${t2}${d}}" "${ITKT_I${t1}${d}},${ITKT_I${t2}${d}}") - endforeach() +itk_wrap_filter_dims(restricted_dims 2+) +foreach(d ${restricted_dims}) + foreach(t2 ${WRAP_ITK_SCALAR}) + foreach(t1 ${WRAP_ITK_USIGN_INT}) + itk_wrap_template("${ITKM_I${t1}${d}}${ITKM_I${t2}${d}}" "${ITKT_I${t1}${d}},${ITKT_I${t2}${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkStatisticsRelabelLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkStatisticsRelabelLabelMapFilter.wrap index b0230f8a497..5a5e4401304 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkStatisticsRelabelLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkStatisticsRelabelLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::StatisticsRelabelLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/LabelMap/wrapping/itkStatisticsUniqueLabelMapFilter.wrap b/Modules/Filtering/LabelMap/wrapping/itkStatisticsUniqueLabelMapFilter.wrap index 6be52ab315d..a84f57ff397 100644 --- a/Modules/Filtering/LabelMap/wrapping/itkStatisticsUniqueLabelMapFilter.wrap +++ b/Modules/Filtering/LabelMap/wrapping/itkStatisticsUniqueLabelMapFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::StatisticsUniqueLabelMapFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/itk-module.cmake b/Modules/Filtering/MathematicalMorphology/itk-module.cmake index 3a4cccf6f5b..a42ebdc05d6 100644 --- a/Modules/Filtering/MathematicalMorphology/itk-module.cmake +++ b/Modules/Filtering/MathematicalMorphology/itk-module.cmake @@ -1,19 +1,20 @@ -set(DOCUMENTATION "This module contains classes that implement variations of +set(DOCUMENTATION + "This module contains classes that implement variations of mathematical morphology techniques for grayscale images. In addition to the classical erosion, dilation, opening and closing filters, you will find here geodesic operations, maxima and minima filters, and reconstruction filters.") -itk_module(ITKMathematicalMorphology +itk_module( + ITKMathematicalMorphology ENABLE_SHARED DEPENDS - ITKImageIntensity + ITKImageIntensity COMPILE_DEPENDS - ITKImageFilterBase - ITKImageGrid - ITKThresholding - ITKConnectedComponents + ITKImageFilterBase + ITKImageGrid + ITKThresholding + ITKConnectedComponents TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/MathematicalMorphology/src/CMakeLists.txt b/Modules/Filtering/MathematicalMorphology/src/CMakeLists.txt index a78ee950a4f..64ef7c293fe 100644 --- a/Modules/Filtering/MathematicalMorphology/src/CMakeLists.txt +++ b/Modules/Filtering/MathematicalMorphology/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKMathematicalMorphology_SRCS - itkMathematicalMorphologyEnums.cxx -) +set(ITKMathematicalMorphology_SRCS itkMathematicalMorphologyEnums.cxx) itk_module_add_library(ITKMathematicalMorphology ${ITKMathematicalMorphology_SRCS}) diff --git a/Modules/Filtering/MathematicalMorphology/test/CMakeLists.txt b/Modules/Filtering/MathematicalMorphology/test/CMakeLists.txt index 92666d9ddf7..bd45fb816c7 100644 --- a/Modules/Filtering/MathematicalMorphology/test/CMakeLists.txt +++ b/Modules/Filtering/MathematicalMorphology/test/CMakeLists.txt @@ -1,566 +1,1134 @@ itk_module_test() set(ITKMathematicalMorphologyTests -itkAnchorErodeDilateImageFilterTest.cxx -itkAnchorOpenCloseImageFilterTest.cxx -itkClosingByReconstructionImageFilterTest.cxx -itkFlatStructuringElementTest.cxx -itkFlatStructuringElementTest2.cxx -itkFlatStructuringElementTest3.cxx -itkGrayscaleConnectedClosingImageFilterTest.cxx -itkGrayscaleConnectedOpeningImageFilterTest.cxx -itkGrayscaleFillholeImageFilterTest.cxx -itkGrayscaleFunctionDilateImageFilterTest.cxx -itkGrayscaleFunctionErodeImageFilterTest.cxx -itkGrayscaleMorphologicalClosingImageFilterTest.cxx -itkGrayscaleMorphologicalOpeningImageFilterTest.cxx -itkGrayscaleGeodesicErodeDilateImageFilterTest.cxx -itkGrayscaleGrindPeakImageFilterTest.cxx -itkHConcaveImageFilterTest.cxx -itkHConvexImageFilterTest.cxx -itkHConvexConcaveImageFilterTest.cxx -itkHMaximaImageFilterTest.cxx -itkHMinimaImageFilterTest.cxx -itkHMaximaMinimaImageFilterTest.cxx -itkMorphologicalGradientImageFilterTest.cxx -itkMovingHistogramMorphologyImageFilterTest.cxx -itkOpeningByReconstructionImageFilterTest.cxx -itkOpeningByReconstructionImageFilterTest2.cxx -itkDoubleThresholdImageFilterTest.cxx -itkRemoveBoundaryObjectsTest.cxx -itkRemoveBoundaryObjectsTest2.cxx -itkShapedIteratorFromStructuringElementTest.cxx -itkTopHatImageFilterTest.cxx -itkMapGrayscaleDilateImageFilterTest.cxx -itkMapGrayscaleErodeImageFilterTest.cxx -itkMapGrayscaleMorphologicalClosingImageFilterTest.cxx -itkMapGrayscaleMorphologicalOpeningImageFilterTest.cxx -itkMathematicalMorphologyEnumsTest.cxx -itkGrayscaleDilateImageFilterTest.cxx -itkGrayscaleErodeImageFilterTest.cxx -itkGrayscaleMorphologicalClosingImageFilterTest2.cxx -itkGrayscaleMorphologicalOpeningImageFilterTest2.cxx -itkMorphologicalGradientImageFilterTest2.cxx -itkRegionalMaximaImageFilterTest.cxx -itkRegionalMinimaImageFilterTest.cxx -itkValuedRegionalMaximaImageFilterTest.cxx -itkValuedRegionalMinimaImageFilterTest.cxx -itkMaskedRankImageFilterTest.cxx -itkRankImageFilterTest.cxx -itkMapMaskedRankImageFilterTest.cxx -itkMapRankImageFilterTest.cxx -itkVanHerkGilWermanErodeDilateImageFilterTest.cxx -) + itkAnchorErodeDilateImageFilterTest.cxx + itkAnchorOpenCloseImageFilterTest.cxx + itkClosingByReconstructionImageFilterTest.cxx + itkFlatStructuringElementTest.cxx + itkFlatStructuringElementTest2.cxx + itkFlatStructuringElementTest3.cxx + itkGrayscaleConnectedClosingImageFilterTest.cxx + itkGrayscaleConnectedOpeningImageFilterTest.cxx + itkGrayscaleFillholeImageFilterTest.cxx + itkGrayscaleFunctionDilateImageFilterTest.cxx + itkGrayscaleFunctionErodeImageFilterTest.cxx + itkGrayscaleMorphologicalClosingImageFilterTest.cxx + itkGrayscaleMorphologicalOpeningImageFilterTest.cxx + itkGrayscaleGeodesicErodeDilateImageFilterTest.cxx + itkGrayscaleGrindPeakImageFilterTest.cxx + itkHConcaveImageFilterTest.cxx + itkHConvexImageFilterTest.cxx + itkHConvexConcaveImageFilterTest.cxx + itkHMaximaImageFilterTest.cxx + itkHMinimaImageFilterTest.cxx + itkHMaximaMinimaImageFilterTest.cxx + itkMorphologicalGradientImageFilterTest.cxx + itkMovingHistogramMorphologyImageFilterTest.cxx + itkOpeningByReconstructionImageFilterTest.cxx + itkOpeningByReconstructionImageFilterTest2.cxx + itkDoubleThresholdImageFilterTest.cxx + itkRemoveBoundaryObjectsTest.cxx + itkRemoveBoundaryObjectsTest2.cxx + itkShapedIteratorFromStructuringElementTest.cxx + itkTopHatImageFilterTest.cxx + itkMapGrayscaleDilateImageFilterTest.cxx + itkMapGrayscaleErodeImageFilterTest.cxx + itkMapGrayscaleMorphologicalClosingImageFilterTest.cxx + itkMapGrayscaleMorphologicalOpeningImageFilterTest.cxx + itkMathematicalMorphologyEnumsTest.cxx + itkGrayscaleDilateImageFilterTest.cxx + itkGrayscaleErodeImageFilterTest.cxx + itkGrayscaleMorphologicalClosingImageFilterTest2.cxx + itkGrayscaleMorphologicalOpeningImageFilterTest2.cxx + itkMorphologicalGradientImageFilterTest2.cxx + itkRegionalMaximaImageFilterTest.cxx + itkRegionalMinimaImageFilterTest.cxx + itkValuedRegionalMaximaImageFilterTest.cxx + itkValuedRegionalMinimaImageFilterTest.cxx + itkMaskedRankImageFilterTest.cxx + itkRankImageFilterTest.cxx + itkMapMaskedRankImageFilterTest.cxx + itkMapRankImageFilterTest.cxx + itkVanHerkGilWermanErodeDilateImageFilterTest.cxx) -CreateTestDriver(ITKMathematicalMorphology "${ITKMathematicalMorphology-Test_LIBRARIES}" "${ITKMathematicalMorphologyTests}") +createtestdriver(ITKMathematicalMorphology "${ITKMathematicalMorphology-Test_LIBRARIES}" + "${ITKMathematicalMorphologyTests}") +itk_add_test( + NAME + itkAnchorErodeDilateImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + itkAnchorErodeDilateImageFilterTest) +itk_add_test( + NAME + itkAnchorOpenCloseImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + itkAnchorOpenCloseImageFilterTest) +itk_add_test( + NAME + itkClosingByReconstructionImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ClosingByReconstructionImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTest.png + itkClosingByReconstructionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/closerec1.jpg} + ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTest.png + 4 + 0 + 0 + ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTestSubtract.png) +itk_add_test( + NAME + itkClosingByReconstructionImageFilterTest2 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ClosingByReconstructionImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTest2.png + itkClosingByReconstructionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/closerec1.jpg} + ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTest2.png + 4 + 1 + 0 + ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTestSubtract2.png) +itk_add_test( + NAME + itkClosingByReconstructionImageFilterTestFullyConnected + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/ClosingByReconstructionImageFilterTestFullyConnected.png} + ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTestFullyConnected.png + itkClosingByReconstructionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/closerec1.jpg} + ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTestFullyConnected.png + 4 + 1 + 1 + ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTestSubtractFullyConnected.png) +itk_add_test( + NAME + itkFlatStructuringElementTest + COMMAND + ITKMathematicalMorphologyTestDriver + --redirectOutput + ${ITK_TEST_OUTPUT_DIR}/itkFlatStructuringElementTest.txt + itkFlatStructuringElementTest) +set_tests_properties(itkFlatStructuringElementTest PROPERTIES ATTACHED_FILES_ON_FAIL + ${ITK_TEST_OUTPUT_DIR}/itkFlatStructuringElementTest.txt) -itk_add_test(NAME itkAnchorErodeDilateImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - itkAnchorErodeDilateImageFilterTest) -itk_add_test(NAME itkAnchorOpenCloseImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - itkAnchorOpenCloseImageFilterTest) -itk_add_test(NAME itkClosingByReconstructionImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ClosingByReconstructionImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTest.png - itkClosingByReconstructionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/closerec1.jpg} ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTest.png 4 0 0 ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTestSubtract.png) -itk_add_test(NAME itkClosingByReconstructionImageFilterTest2 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ClosingByReconstructionImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTest2.png - itkClosingByReconstructionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/closerec1.jpg} ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTest2.png 4 1 0 ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTestSubtract2.png) -itk_add_test(NAME itkClosingByReconstructionImageFilterTestFullyConnected - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/ClosingByReconstructionImageFilterTestFullyConnected.png} - ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTestFullyConnected.png - itkClosingByReconstructionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/closerec1.jpg} ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTestFullyConnected.png 4 1 1 ${ITK_TEST_OUTPUT_DIR}/ClosingByReconstructionImageFilterTestSubtractFullyConnected.png) -itk_add_test(NAME itkFlatStructuringElementTest - COMMAND ITKMathematicalMorphologyTestDriver - --redirectOutput ${ITK_TEST_OUTPUT_DIR}/itkFlatStructuringElementTest.txt - itkFlatStructuringElementTest) -set_tests_properties(itkFlatStructuringElementTest PROPERTIES ATTACHED_FILES_ON_FAIL ${ITK_TEST_OUTPUT_DIR}/itkFlatStructuringElementTest.txt) - -itk_add_test(NAME itkFlatStructuringElementTest2 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/FlatStructuringElementImageTest.png} - ${ITK_TEST_OUTPUT_DIR}/FlatStructuringElementImageTest.png - itkFlatStructuringElementTest2 DATA{Baseline/FlatStructuringElementImageTest.png} ${ITK_TEST_OUTPUT_DIR}/FlatStructuringElementImageTest.png - ) +itk_add_test( + NAME + itkFlatStructuringElementTest2 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/FlatStructuringElementImageTest.png} + ${ITK_TEST_OUTPUT_DIR}/FlatStructuringElementImageTest.png + itkFlatStructuringElementTest2 + DATA{Baseline/FlatStructuringElementImageTest.png} + ${ITK_TEST_OUTPUT_DIR}/FlatStructuringElementImageTest.png) -itk_add_test(NAME itkFlatStructuringElementTest3_1 - COMMAND ITKMathematicalMorphologyTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/FlatStructuringPoly4.png "c91b17423272830b10faebb438b67621" - itkFlatStructuringElementTest3 - ${ITK_TEST_OUTPUT_DIR}/FlatStructuringPoly4.png 10 4 2) -itk_add_test(NAME itkFlatStructuringElementTest3_2 - COMMAND ITKMathematicalMorphologyTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/FlatStructuringPoly6.png "c332474ae094a8270b62e655a7c6b6ed" - itkFlatStructuringElementTest3 - ${ITK_TEST_OUTPUT_DIR}/FlatStructuringPoly6.png 10 6 2) +itk_add_test( + NAME + itkFlatStructuringElementTest3_1 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/FlatStructuringPoly4.png + "c91b17423272830b10faebb438b67621" + itkFlatStructuringElementTest3 + ${ITK_TEST_OUTPUT_DIR}/FlatStructuringPoly4.png + 10 + 4 + 2) +itk_add_test( + NAME + itkFlatStructuringElementTest3_2 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/FlatStructuringPoly6.png + "c332474ae094a8270b62e655a7c6b6ed" + itkFlatStructuringElementTest3 + ${ITK_TEST_OUTPUT_DIR}/FlatStructuringPoly6.png + 10 + 6 + 2) -itk_add_test(NAME itkGrayscaleConnectedClosingImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/GrayscaleConnectedClosingImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/GrayscaleConnectedClosingImageFilterTest.png - itkGrayscaleConnectedClosingImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/GrayscaleConnectedClosingImageFilterTest.png 174 214 0) -itk_add_test(NAME itkGrayscaleConnectedClosingImageFilterTest2 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/GrayscaleConnectedClosingImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/GrayscaleConnectedClosingImageFilterTest2.png - itkGrayscaleConnectedClosingImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/GrayscaleConnectedClosingImageFilterTest2.png 150 169 0) -itk_add_test(NAME itkGrayscaleConnectedOpeningImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/GrayscaleConnectedOpeningImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/GrayscaleConnectedOpeningImageFilterTest.png - itkGrayscaleConnectedOpeningImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/GrayscaleConnectedOpeningImageFilterTest.png 174 214 0) -itk_add_test(NAME itkGrayscaleConnectedOpeningImageFilterTest2 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/GrayscaleConnectedOpeningImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/GrayscaleConnectedOpeningImageFilterTest2.png - itkGrayscaleConnectedOpeningImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/GrayscaleConnectedOpeningImageFilterTest2.png 150 169 0) -itk_add_test(NAME itkGrayscaleFillholeImageFilterTestFullyConnectedOff - COMMAND ITKMathematicalMorphologyTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleFillholeImageFilterTestFullyConnectedOff.png - 5824569f359baf1160c0e0a1ed7b8d9e - itkGrayscaleFillholeImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleFillholeImageFilterTestFullyConnectedOff.png 0) -itk_add_test(NAME itkGrayscaleFillholeImageFilterTestFullyConnectedOn - COMMAND ITKMathematicalMorphologyTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleFillholeImageFilterTestFullyConnectedOn.png - ec13ea7eb39ef73f441ff59a690e8ba0 - itkGrayscaleFillholeImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleFillholeImageFilterTestFullyConnectedOn.png 1) -itk_add_test(NAME itkGrayscaleFunctionDilateImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkGrayscaleFunctionDilateImageFilterTest.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleFunctionDilateImageFilterTest.mha - itkGrayscaleFunctionDilateImageFilterTest ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleFunctionDilateImageFilterTest.mha) -itk_add_test(NAME itkGrayscaleFunctionErodeImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkGrayscaleFunctionErodeImageFilterTest.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleFunctionErodeImageFilterTest.mha - itkGrayscaleFunctionErodeImageFilterTest ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleFunctionErodeImageFilterTest.mha) -itk_add_test(NAME itkGrayscaleMorphologicalClosingImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/GrayscaleMorphologicalClosingImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/GrayscaleMorphologicalClosingImageFilterTest.png - itkGrayscaleMorphologicalClosingImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/GrayscaleMorphologicalClosingImageFilterTest.png 1) -itk_add_test(NAME itkGrayscaleMorphologicalOpeningImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/GrayscaleMorphologicalOpeningImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/GrayscaleMorphologicalOpeningImageFilterTest.png - itkGrayscaleMorphologicalOpeningImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/GrayscaleMorphologicalOpeningImageFilterTest.png 1) -itk_add_test(NAME itkGrayscaleGeodesicErodeDilateImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HMaximaMinimaImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleGeodesicErodeDilateImageFilterTest.png - itkGrayscaleGeodesicErodeDilateImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleGeodesicErodeDilateImageFilterTest.png 35 1 0) -itk_add_test(NAME itkGrayscaleGrindPeakImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/itkGrayscaleGrindPeakImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleGrindPeakImageFilterTest.png - itkGrayscaleGrindPeakImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleGrindPeakImageFilterTest.png 0) -itk_add_test(NAME itkHConcaveImageFilterTestFullyConnectedOff - COMMAND ITKMathematicalMorphologyTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkHConcaveImageFilterTestFullyConnectedOff.png - bd1b5ab47f54cd97b5c6b454bee130e2 - itkHConcaveImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkHConcaveImageFilterTestFullyConnectedOff.png 2000 0) -itk_add_test(NAME itkHConcaveImageFilterTestFullyConnectedOn - COMMAND ITKMathematicalMorphologyTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkHConcaveImageFilterTestFullyConnectedOn.png - c7116406ded975955965226f6a69e28d - itkHConcaveImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkHConcaveImageFilterTestFullyConnectedOn.png 2000 1) -itk_add_test(NAME itkHConvexImageFilterTestFullyConnectedOff - COMMAND ITKMathematicalMorphologyTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkHConvexImageFilterTestFullyConnectedOff.png - d77fb8b2aeac6f302cc2582e12831eb4 - itkHConvexImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkHConvexImageFilterTestFullyConnectedOff.png 2000 0) -itk_add_test(NAME itkHConvexImageFilterTestFullyConnectedOn - COMMAND ITKMathematicalMorphologyTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkHConvexImageFilterTestFullyConnectedOn.png - d8b22af69787337021748e00f82bc100 - itkHConvexImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkHConvexImageFilterTestFullyConnectedOn.png 2000 1) -itk_add_test(NAME itkHConvexConcaveImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HConvexConcaveImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/HConvexConcaveImageFilterTest.png - itkHConvexConcaveImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/HConvexConcaveImageFilterTest.png 50) -itk_add_test(NAME itkHMaximaImageFilterTestFullyConnectedOff - COMMAND ITKMathematicalMorphologyTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkHMaximaImageFilterTestFullyConnectedOff.png - 9e2e9272501fa665b0622329dc70b121 - itkHMaximaImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkHMaximaImageFilterTestFullyConnectedOff.png 2000 0) -itk_add_test(NAME itkHMaximaImageFilterTestFullyConnectedOn - COMMAND ITKMathematicalMorphologyTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkHMaximaImageFilterTestFullyConnectedOn.png - 934b9aec16da6cc9171a3074cbf9f242 - itkHMaximaImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkHMaximaImageFilterTestFullyConnectedOn.png 2000 1) -itk_add_test(NAME itkHMinimaImageFilterTestFullyConnectedOff - COMMAND ITKMathematicalMorphologyTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkHMinimaImageFilterTestFullyConnectedOff.png - 9e2e9272501fa665b0622329dc70b121 - itkHMaximaImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkHMinimaImageFilterTestFullyConnectedOff.png 2000 0) -itk_add_test(NAME itkHMinimaImageFilterTestFullyConnectedOn - COMMAND ITKMathematicalMorphologyTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkHMinimaImageFilterTestFullyConnectedOn.png - 69e285fb1db3f8f83a0b6469b4f24f7f - itkHMinimaImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkHMinimaImageFilterTestFullyConnectedOn.png 2000 1) -itk_add_test(NAME itkHMaximaMinimaImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HMaximaMinimaImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/HMaximaMinimaImageFilterTest.png - itkHMaximaMinimaImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} ${ITK_TEST_OUTPUT_DIR}/HMaximaMinimaImageFilterTest.png 35) -itk_add_test(NAME itkHMaximaMinimaImageFilterTest2 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HMaximaMinimaImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/HMaximaMinimaImageFilterTest2.png - itkHMaximaMinimaImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cake_hard.png} ${ITK_TEST_OUTPUT_DIR}/HMaximaMinimaImageFilterTest2.png 35) -itk_add_test(NAME itkMorphologicalGradientImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/MorphologicalGradientImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/MorphologicalGradientImageFilterTest.png - itkMorphologicalGradientImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/MorphologicalGradientImageFilterTest.png) -itk_add_test(NAME itkMorphologicalGradientImageFilterTest2 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/MorphologicalGradientImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/MorphologicalGradientImageFilterTest2.png - itkMorphologicalGradientImageFilterTest2 DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/MorphologicalGradientImageFilterTest2.png) -itk_add_test(NAME itkMovingHistogramMorphologyImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - itkMovingHistogramMorphologyImageFilterTest) -itk_add_test(NAME itkOpeningByReconstructionImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/OpeningByReconstructionImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTest.png - itkOpeningByReconstructionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/chondt.png} ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTest.png 4 0 0 ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestSubtract.png) -itk_add_test(NAME itkOpeningByReconstructionImageFilterTest2 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/OpeningByReconstructionImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTest2.png - itkOpeningByReconstructionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/chondt.png} ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTest2.png 4 1 0 ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestSubtract2.png) -itk_add_test(NAME itkOpeningByReconstructionImageFilterTestFullyConnected - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/OpeningByReconstructionImageFilterTestFullyConnected.png} - ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestFullyConnected.png - itkOpeningByReconstructionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/chondt.png} ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestFullyConnected.png 4 1 1 ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestSubtractFullyConnected.png) -itk_add_test(NAME itkOpeningByReconstructionImageFilterTestNoInput - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/OpeningByReconstructionImageFilterTestNoInput.png} - ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestNoInput.png - itkOpeningByReconstructionImageFilterTest2 ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestNoInput.png 4 0 0 0 0 0.5 0.5 ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestSubtractNoInput.png) -itk_add_test(NAME itkOpeningByReconstructionImageFilterTestNoInput2 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/OpeningByReconstructionImageFilterTestNoInput2.png} - ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestNoInput2.png - itkOpeningByReconstructionImageFilterTest2 ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestNoInput2.png 4 1 0 0 0 0.5 0.5 ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestSubtractNoInput2.png) -itk_add_test(NAME itkDoubleThresholdImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/DoubleThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/DoubleThresholdImageFilterTest.png itkDoubleThresholdImageFilterTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png - ${ITK_TEST_OUTPUT_DIR}/DoubleThresholdImageFilterTest.png 217 246 255 255 0) -itk_add_test(NAME itkDoubleThresholdImageFilterTest2 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/DoubleThresholdImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/DoubleThresholdImageFilterTest2.png itkDoubleThresholdImageFilterTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png - ${ITK_TEST_OUTPUT_DIR}/DoubleThresholdImageFilterTest2.png 150 164 164 180 0) -itk_add_test(NAME itkRemoveBoundaryObjectsTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/RemoveBoundaryObjectsTest.png} - ${ITK_TEST_OUTPUT_DIR}/RemoveBoundaryObjectsTest.png - itkRemoveBoundaryObjectsTest DATA{${ITK_DATA_ROOT}/Input/Spots.png} ${ITK_TEST_OUTPUT_DIR}/RemoveBoundaryObjectsTest.png) -itk_add_test(NAME itkRemoveBoundaryObjectsTest2 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/RemoveBoundaryObjectsTest2.png} - ${ITK_TEST_OUTPUT_DIR}/RemoveBoundaryObjectsTest2.png - itkRemoveBoundaryObjectsTest2 DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} ${ITK_TEST_OUTPUT_DIR}/RemoveBoundaryObjectsTest2.png) -itk_add_test(NAME itkShapedIteratorFromStructuringElementTest - COMMAND ITKMathematicalMorphologyTestDriver itkShapedIteratorFromStructuringElementTest) -itk_add_test(NAME itkBlackTopHatImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBlackTopHatImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkBlackTopHatImageFilterTest.png - itkTopHatImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBlackTopHatImageFilterTest.png 0 3 1 1 0) -itk_add_test(NAME itkWhiteTopHatImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkWhiteTopHatImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkWhiteTopHatImageFilterTest.png - itkTopHatImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkWhiteTopHatImageFilterTest.png 1 3 1 1 0) -itk_add_test(NAME itkGrayscaleMorphologicalClosingImageFilterTest2 - COMMAND ITKMathematicalMorphologyTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2Basic.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2Histo.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2Basic.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2VHGW.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2Basic.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2Anchor.png - itkGrayscaleMorphologicalClosingImageFilterTest2 - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - 20 - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2Basic.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2Histo.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2VHGW.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2Anchor.png - 0) -itk_add_test(NAME itkGrayscaleMorphologicalClosingImageFilterTest2SafeBorder - COMMAND ITKMathematicalMorphologyTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2BasicSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2HistoSafeBorder.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2BasicSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2VHGWSafeBorder.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2BasicSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2AnchorSafeBorder.png - itkGrayscaleMorphologicalClosingImageFilterTest2 - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - 20 - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2BasicSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2HistoSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2VHGWSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2AnchorSafeBorder.png - 1) -itk_add_test(NAME itkGrayscaleMorphologicalOpeningImageFilterTest2 - COMMAND ITKMathematicalMorphologyTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2Basic.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2Histo.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2Basic.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2VHGW.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2Basic.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2Anchor.png - itkGrayscaleMorphologicalOpeningImageFilterTest2 - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - 20 - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2Basic.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2Histo.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2VHGW.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2Anchor.png - 0) -itk_add_test(NAME itkGrayscaleMorphologicalOpeningImageFilterTest2SafeBorder - COMMAND ITKMathematicalMorphologyTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2BasicSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2HistoSafeBorder.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2BasicSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2VHGWSafeBorder.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2BasicSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2AnchorSafeBorder.png - itkGrayscaleMorphologicalOpeningImageFilterTest2 - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - 20 - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2BasicSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2HistoSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2VHGWSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2AnchorSafeBorder.png - 1) -itk_add_test(NAME itkGrayscaleDilateImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestHisto.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestVHGW.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestAnchor.png - itkGrayscaleDilateImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestHisto.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestVHGW.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestAnchor.png) -itk_add_test(NAME itkGrayscaleErodeImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestHisto.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestVHGW.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestAnchor.png - itkGrayscaleErodeImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestHisto.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestVHGW.png - ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestAnchor.png) +itk_add_test( + NAME + itkGrayscaleConnectedClosingImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/GrayscaleConnectedClosingImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/GrayscaleConnectedClosingImageFilterTest.png + itkGrayscaleConnectedClosingImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/GrayscaleConnectedClosingImageFilterTest.png + 174 + 214 + 0) +itk_add_test( + NAME + itkGrayscaleConnectedClosingImageFilterTest2 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/GrayscaleConnectedClosingImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/GrayscaleConnectedClosingImageFilterTest2.png + itkGrayscaleConnectedClosingImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/GrayscaleConnectedClosingImageFilterTest2.png + 150 + 169 + 0) +itk_add_test( + NAME + itkGrayscaleConnectedOpeningImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/GrayscaleConnectedOpeningImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/GrayscaleConnectedOpeningImageFilterTest.png + itkGrayscaleConnectedOpeningImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/GrayscaleConnectedOpeningImageFilterTest.png + 174 + 214 + 0) +itk_add_test( + NAME + itkGrayscaleConnectedOpeningImageFilterTest2 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/GrayscaleConnectedOpeningImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/GrayscaleConnectedOpeningImageFilterTest2.png + itkGrayscaleConnectedOpeningImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/GrayscaleConnectedOpeningImageFilterTest2.png + 150 + 169 + 0) +itk_add_test( + NAME + itkGrayscaleFillholeImageFilterTestFullyConnectedOff + COMMAND + ITKMathematicalMorphologyTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleFillholeImageFilterTestFullyConnectedOff.png + 5824569f359baf1160c0e0a1ed7b8d9e + itkGrayscaleFillholeImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleFillholeImageFilterTestFullyConnectedOff.png + 0) +itk_add_test( + NAME + itkGrayscaleFillholeImageFilterTestFullyConnectedOn + COMMAND + ITKMathematicalMorphologyTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleFillholeImageFilterTestFullyConnectedOn.png + ec13ea7eb39ef73f441ff59a690e8ba0 + itkGrayscaleFillholeImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleFillholeImageFilterTestFullyConnectedOn.png + 1) +itk_add_test( + NAME + itkGrayscaleFunctionDilateImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkGrayscaleFunctionDilateImageFilterTest.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleFunctionDilateImageFilterTest.mha + itkGrayscaleFunctionDilateImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleFunctionDilateImageFilterTest.mha) +itk_add_test( + NAME + itkGrayscaleFunctionErodeImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkGrayscaleFunctionErodeImageFilterTest.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleFunctionErodeImageFilterTest.mha + itkGrayscaleFunctionErodeImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleFunctionErodeImageFilterTest.mha) +itk_add_test( + NAME + itkGrayscaleMorphologicalClosingImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/GrayscaleMorphologicalClosingImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/GrayscaleMorphologicalClosingImageFilterTest.png + itkGrayscaleMorphologicalClosingImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/GrayscaleMorphologicalClosingImageFilterTest.png + 1) +itk_add_test( + NAME + itkGrayscaleMorphologicalOpeningImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/GrayscaleMorphologicalOpeningImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/GrayscaleMorphologicalOpeningImageFilterTest.png + itkGrayscaleMorphologicalOpeningImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/GrayscaleMorphologicalOpeningImageFilterTest.png + 1) +itk_add_test( + NAME + itkGrayscaleGeodesicErodeDilateImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HMaximaMinimaImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleGeodesicErodeDilateImageFilterTest.png + itkGrayscaleGeodesicErodeDilateImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleGeodesicErodeDilateImageFilterTest.png + 35 + 1 + 0) +itk_add_test( + NAME + itkGrayscaleGrindPeakImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/itkGrayscaleGrindPeakImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleGrindPeakImageFilterTest.png + itkGrayscaleGrindPeakImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleGrindPeakImageFilterTest.png + 0) +itk_add_test( + NAME + itkHConcaveImageFilterTestFullyConnectedOff + COMMAND + ITKMathematicalMorphologyTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkHConcaveImageFilterTestFullyConnectedOff.png + bd1b5ab47f54cd97b5c6b454bee130e2 + itkHConcaveImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkHConcaveImageFilterTestFullyConnectedOff.png + 2000 + 0) +itk_add_test( + NAME + itkHConcaveImageFilterTestFullyConnectedOn + COMMAND + ITKMathematicalMorphologyTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkHConcaveImageFilterTestFullyConnectedOn.png + c7116406ded975955965226f6a69e28d + itkHConcaveImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkHConcaveImageFilterTestFullyConnectedOn.png + 2000 + 1) +itk_add_test( + NAME + itkHConvexImageFilterTestFullyConnectedOff + COMMAND + ITKMathematicalMorphologyTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkHConvexImageFilterTestFullyConnectedOff.png + d77fb8b2aeac6f302cc2582e12831eb4 + itkHConvexImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkHConvexImageFilterTestFullyConnectedOff.png + 2000 + 0) +itk_add_test( + NAME + itkHConvexImageFilterTestFullyConnectedOn + COMMAND + ITKMathematicalMorphologyTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkHConvexImageFilterTestFullyConnectedOn.png + d8b22af69787337021748e00f82bc100 + itkHConvexImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkHConvexImageFilterTestFullyConnectedOn.png + 2000 + 1) +itk_add_test( + NAME + itkHConvexConcaveImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HConvexConcaveImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/HConvexConcaveImageFilterTest.png + itkHConvexConcaveImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/HConvexConcaveImageFilterTest.png + 50) +itk_add_test( + NAME + itkHMaximaImageFilterTestFullyConnectedOff + COMMAND + ITKMathematicalMorphologyTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkHMaximaImageFilterTestFullyConnectedOff.png + 9e2e9272501fa665b0622329dc70b121 + itkHMaximaImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkHMaximaImageFilterTestFullyConnectedOff.png + 2000 + 0) +itk_add_test( + NAME + itkHMaximaImageFilterTestFullyConnectedOn + COMMAND + ITKMathematicalMorphologyTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkHMaximaImageFilterTestFullyConnectedOn.png + 934b9aec16da6cc9171a3074cbf9f242 + itkHMaximaImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkHMaximaImageFilterTestFullyConnectedOn.png + 2000 + 1) +itk_add_test( + NAME + itkHMinimaImageFilterTestFullyConnectedOff + COMMAND + ITKMathematicalMorphologyTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkHMinimaImageFilterTestFullyConnectedOff.png + 9e2e9272501fa665b0622329dc70b121 + itkHMaximaImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkHMinimaImageFilterTestFullyConnectedOff.png + 2000 + 0) +itk_add_test( + NAME + itkHMinimaImageFilterTestFullyConnectedOn + COMMAND + ITKMathematicalMorphologyTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkHMinimaImageFilterTestFullyConnectedOn.png + 69e285fb1db3f8f83a0b6469b4f24f7f + itkHMinimaImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkHMinimaImageFilterTestFullyConnectedOn.png + 2000 + 1) +itk_add_test( + NAME + itkHMaximaMinimaImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HMaximaMinimaImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/HMaximaMinimaImageFilterTest.png + itkHMaximaMinimaImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cake_easy.png} + ${ITK_TEST_OUTPUT_DIR}/HMaximaMinimaImageFilterTest.png + 35) +itk_add_test( + NAME + itkHMaximaMinimaImageFilterTest2 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HMaximaMinimaImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/HMaximaMinimaImageFilterTest2.png + itkHMaximaMinimaImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cake_hard.png} + ${ITK_TEST_OUTPUT_DIR}/HMaximaMinimaImageFilterTest2.png + 35) +itk_add_test( + NAME + itkMorphologicalGradientImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/MorphologicalGradientImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/MorphologicalGradientImageFilterTest.png + itkMorphologicalGradientImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/MorphologicalGradientImageFilterTest.png) +itk_add_test( + NAME + itkMorphologicalGradientImageFilterTest2 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/MorphologicalGradientImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/MorphologicalGradientImageFilterTest2.png + itkMorphologicalGradientImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/MorphologicalGradientImageFilterTest2.png) +itk_add_test( + NAME + itkMovingHistogramMorphologyImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + itkMovingHistogramMorphologyImageFilterTest) +itk_add_test( + NAME + itkOpeningByReconstructionImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/OpeningByReconstructionImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTest.png + itkOpeningByReconstructionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/chondt.png} + ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTest.png + 4 + 0 + 0 + ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestSubtract.png) +itk_add_test( + NAME + itkOpeningByReconstructionImageFilterTest2 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/OpeningByReconstructionImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTest2.png + itkOpeningByReconstructionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/chondt.png} + ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTest2.png + 4 + 1 + 0 + ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestSubtract2.png) +itk_add_test( + NAME + itkOpeningByReconstructionImageFilterTestFullyConnected + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/OpeningByReconstructionImageFilterTestFullyConnected.png} + ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestFullyConnected.png + itkOpeningByReconstructionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/chondt.png} + ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestFullyConnected.png + 4 + 1 + 1 + ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestSubtractFullyConnected.png) +itk_add_test( + NAME + itkOpeningByReconstructionImageFilterTestNoInput + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/OpeningByReconstructionImageFilterTestNoInput.png} + ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestNoInput.png + itkOpeningByReconstructionImageFilterTest2 + ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestNoInput.png + 4 + 0 + 0 + 0 + 0 + 0.5 + 0.5 + ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestSubtractNoInput.png) +itk_add_test( + NAME + itkOpeningByReconstructionImageFilterTestNoInput2 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/OpeningByReconstructionImageFilterTestNoInput2.png} + ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestNoInput2.png + itkOpeningByReconstructionImageFilterTest2 + ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestNoInput2.png + 4 + 1 + 0 + 0 + 0 + 0.5 + 0.5 + ${ITK_TEST_OUTPUT_DIR}/OpeningByReconstructionImageFilterTestSubtractNoInput2.png) +itk_add_test( + NAME + itkDoubleThresholdImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/DoubleThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/DoubleThresholdImageFilterTest.png + itkDoubleThresholdImageFilterTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png + ${ITK_TEST_OUTPUT_DIR}/DoubleThresholdImageFilterTest.png + 217 + 246 + 255 + 255 + 0) +itk_add_test( + NAME + itkDoubleThresholdImageFilterTest2 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/DoubleThresholdImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/DoubleThresholdImageFilterTest2.png + itkDoubleThresholdImageFilterTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png + ${ITK_TEST_OUTPUT_DIR}/DoubleThresholdImageFilterTest2.png + 150 + 164 + 164 + 180 + 0) +itk_add_test( + NAME + itkRemoveBoundaryObjectsTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/RemoveBoundaryObjectsTest.png} + ${ITK_TEST_OUTPUT_DIR}/RemoveBoundaryObjectsTest.png + itkRemoveBoundaryObjectsTest + DATA{${ITK_DATA_ROOT}/Input/Spots.png} + ${ITK_TEST_OUTPUT_DIR}/RemoveBoundaryObjectsTest.png) +itk_add_test( + NAME + itkRemoveBoundaryObjectsTest2 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/RemoveBoundaryObjectsTest2.png} + ${ITK_TEST_OUTPUT_DIR}/RemoveBoundaryObjectsTest2.png + itkRemoveBoundaryObjectsTest2 + DATA{${ITK_DATA_ROOT}/Input/SpotsInverted.png} + ${ITK_TEST_OUTPUT_DIR}/RemoveBoundaryObjectsTest2.png) +itk_add_test( + NAME + itkShapedIteratorFromStructuringElementTest + COMMAND + ITKMathematicalMorphologyTestDriver + itkShapedIteratorFromStructuringElementTest) +itk_add_test( + NAME + itkBlackTopHatImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkBlackTopHatImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkBlackTopHatImageFilterTest.png + itkTopHatImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBlackTopHatImageFilterTest.png + 0 + 3 + 1 + 1 + 0) +itk_add_test( + NAME + itkWhiteTopHatImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkWhiteTopHatImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkWhiteTopHatImageFilterTest.png + itkTopHatImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkWhiteTopHatImageFilterTest.png + 1 + 3 + 1 + 1 + 0) +itk_add_test( + NAME + itkGrayscaleMorphologicalClosingImageFilterTest2 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2Basic.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2Histo.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2Basic.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2VHGW.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2Basic.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2Anchor.png + itkGrayscaleMorphologicalClosingImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + 20 + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2Basic.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2Histo.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2VHGW.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2Anchor.png + 0) +itk_add_test( + NAME + itkGrayscaleMorphologicalClosingImageFilterTest2SafeBorder + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2BasicSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2HistoSafeBorder.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2BasicSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2VHGWSafeBorder.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2BasicSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2AnchorSafeBorder.png + itkGrayscaleMorphologicalClosingImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + 20 + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2BasicSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2HistoSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2VHGWSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalClosingImageFilterTest2AnchorSafeBorder.png + 1) +itk_add_test( + NAME + itkGrayscaleMorphologicalOpeningImageFilterTest2 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2Basic.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2Histo.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2Basic.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2VHGW.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2Basic.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2Anchor.png + itkGrayscaleMorphologicalOpeningImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + 20 + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2Basic.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2Histo.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2VHGW.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2Anchor.png + 0) +itk_add_test( + NAME + itkGrayscaleMorphologicalOpeningImageFilterTest2SafeBorder + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2BasicSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2HistoSafeBorder.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2BasicSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2VHGWSafeBorder.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2BasicSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2AnchorSafeBorder.png + itkGrayscaleMorphologicalOpeningImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + 20 + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2BasicSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2HistoSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2VHGWSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleMorphologicalOpeningImageFilterTest2AnchorSafeBorder.png + 1) +itk_add_test( + NAME + itkGrayscaleDilateImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestBasic.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestHisto.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestBasic.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestVHGW.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestBasic.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestAnchor.png + itkGrayscaleDilateImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestBasic.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestHisto.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestVHGW.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleDilateImageFilterTestAnchor.png) +itk_add_test( + NAME + itkGrayscaleErodeImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestBasic.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestHisto.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestBasic.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestVHGW.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestBasic.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestAnchor.png + itkGrayscaleErodeImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestBasic.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestHisto.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestVHGW.png + ${ITK_TEST_OUTPUT_DIR}/itkGrayscaleErodeImageFilterTestAnchor.png) -itk_add_test(NAME itkMapGrayscaleMorphologicalClosingImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestHisto.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestVHGW.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestAnchor.png +itk_add_test( + NAME + itkMapGrayscaleMorphologicalClosingImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestBasic.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestHisto.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestBasic.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestVHGW.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestBasic.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestAnchor.png itkMapGrayscaleMorphologicalClosingImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestBasic.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestHisto.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestVHGW.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestAnchor.png - 0 -) -itk_add_test(NAME itkMapGrayscaleMorphologicalClosingImageFilterTestSafeBorder - COMMAND ITKMathematicalMorphologyTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestBasicSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestHistoSafeBorder.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestBasicSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestVHGWSafeBorder.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestBasicSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestAnchorSafeBorder.png + 0) +itk_add_test( + NAME + itkMapGrayscaleMorphologicalClosingImageFilterTestSafeBorder + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestBasicSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestHistoSafeBorder.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestBasicSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestVHGWSafeBorder.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestBasicSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestAnchorSafeBorder.png itkMapGrayscaleMorphologicalClosingImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestBasicSafeBorder.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestHistoSafeBorder.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestVHGWSafeBorder.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalClosingImageFilterTestAnchorSafeBorder.png - 1 -) -itk_add_test(NAME itkMapGrayscaleMorphologicalOpeningImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestHisto.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestVHGW.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestAnchor.png + 1) +itk_add_test( + NAME + itkMapGrayscaleMorphologicalOpeningImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestBasic.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestHisto.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestBasic.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestVHGW.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestBasic.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestAnchor.png itkMapGrayscaleMorphologicalOpeningImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestBasic.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestHisto.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestVHGW.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestAnchor.png - 0 -) -itk_add_test(NAME itkMapGrayscaleMorphologicalOpeningImageFilterTestSafeBorder - COMMAND ITKMathematicalMorphologyTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestBasicSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestHistoSafeBorder.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestBasicSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestVHGWSafeBorder.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestBasicSafeBorder.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestAnchorSafeBorder.png + 0) +itk_add_test( + NAME + itkMapGrayscaleMorphologicalOpeningImageFilterTestSafeBorder + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestBasicSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestHistoSafeBorder.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestBasicSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestVHGWSafeBorder.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestBasicSafeBorder.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestAnchorSafeBorder.png itkMapGrayscaleMorphologicalOpeningImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestBasicSafeBorder.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestHistoSafeBorder.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestVHGWSafeBorder.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleMorphologicalOpeningImageFilterTestAnchorSafeBorder.png - 1 -) + 1) -itk_add_test(NAME itkMathematicalMorphologyEnumsTest - COMMAND ITKMathematicalMorphologyTestDriver +itk_add_test( + NAME itkMathematicalMorphologyEnumsTest -) + COMMAND + ITKMathematicalMorphologyTestDriver + itkMathematicalMorphologyEnumsTest) -itk_add_test(NAME itkMapGrayscaleDilateImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleDilateImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleDilateImageFilterTestHisto.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleDilateImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleDilateImageFilterTestVHGW.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleDilateImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleDilateImageFilterTestAnchor.png +itk_add_test( + NAME itkMapGrayscaleDilateImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + COMMAND + ITKMathematicalMorphologyTestDriver + --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleDilateImageFilterTestBasic.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleDilateImageFilterTestHisto.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleDilateImageFilterTestBasic.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleDilateImageFilterTestVHGW.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleDilateImageFilterTestBasic.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleDilateImageFilterTestAnchor.png -) -itk_add_test(NAME itkMapGrayscaleErodeImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleErodeImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleErodeImageFilterTestHisto.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleErodeImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleErodeImageFilterTestVHGW.png - --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleErodeImageFilterTestBasic.png - ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleErodeImageFilterTestAnchor.png - itkMapGrayscaleErodeImageFilterTest + itkMapGrayscaleDilateImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleDilateImageFilterTestBasic.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleDilateImageFilterTestHisto.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleDilateImageFilterTestVHGW.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleDilateImageFilterTestAnchor.png) +itk_add_test( + NAME + itkMapGrayscaleErodeImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleErodeImageFilterTestBasic.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleErodeImageFilterTestHisto.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleErodeImageFilterTestBasic.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleErodeImageFilterTestVHGW.png + --compare + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleErodeImageFilterTestBasic.png ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleErodeImageFilterTestAnchor.png -) -itk_add_test(NAME itkRegionalMinimaImageFilterTest1 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/cthead1RegionalMinimal-ref1.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMinimal1.png - itkRegionalMinimaImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMinimal1.png ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMinimal-ref1.png 2 1 1) -itk_add_test(NAME itkRegionalMinimaImageFilterTest2 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/cthead1RegionalMinimal-ref2.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMinimal2.png - itkRegionalMinimaImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMinimal2.png ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMinimal-ref2.png 2 0 1) + itkMapGrayscaleErodeImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleErodeImageFilterTestBasic.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleErodeImageFilterTestHisto.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleErodeImageFilterTestVHGW.png + ${ITK_TEST_OUTPUT_DIR}/itkMapGrayscaleErodeImageFilterTestAnchor.png) +itk_add_test( + NAME + itkRegionalMinimaImageFilterTest1 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/cthead1RegionalMinimal-ref1.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMinimal1.png + itkRegionalMinimaImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMinimal1.png + ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMinimal-ref1.png + 2 + 1 + 1) +itk_add_test( + NAME + itkRegionalMinimaImageFilterTest2 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/cthead1RegionalMinimal-ref2.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMinimal2.png + itkRegionalMinimaImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMinimal2.png + ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMinimal-ref2.png + 2 + 0 + 1) -itk_add_test(NAME itkRegionalMaximaImageFilterTest1 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/cthead1RegionalMaximal-ref1.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMaximal1.png - itkRegionalMaximaImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMaximal1.png ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMaximal-ref1.png 2 1 1) -itk_add_test(NAME itkRegionalMaximaImageFilterTest2 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/cthead1RegionalMaximal-ref2.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMaximal2.png - itkRegionalMaximaImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMaximal2.png ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMaximal-ref2.png 2 0 1) +itk_add_test( + NAME + itkRegionalMaximaImageFilterTest1 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/cthead1RegionalMaximal-ref1.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMaximal1.png + itkRegionalMaximaImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMaximal1.png + ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMaximal-ref1.png + 2 + 1 + 1) +itk_add_test( + NAME + itkRegionalMaximaImageFilterTest2 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/cthead1RegionalMaximal-ref2.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMaximal2.png + itkRegionalMaximaImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMaximal2.png + ${ITK_TEST_OUTPUT_DIR}/cthead1RegionalMaximal-ref2.png + 2 + 0 + 1) -itk_add_test(NAME itkValuedRegionalMaximaImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/cthead1ValuedRegionalMaximal-ref.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMaximal.png - itkValuedRegionalMaximaImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMaximal.png ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMaximal-ref.png 1) -itk_add_test(NAME itkValuedRegionalMaximaImageFilterTest2 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/cthead1ValuedRegionalMaximal-ref2.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMaximal2.png - itkValuedRegionalMaximaImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMaximal2.png ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMaximal-ref2.png 0) -itk_add_test(NAME itkValuedRegionalMinimaImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/cthead1ValuedRegionalMinimal-ref.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMinimal.png - itkValuedRegionalMinimaImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMinimal.png ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMinimal-ref.png 1) -itk_add_test(NAME itkValuedRegionalMinimaImageFilterTest2 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/cthead1ValuedRegionalMinimal-ref2.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMinimal2.png - itkValuedRegionalMinimaImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMinimal2.png ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMinimal-ref2.png 0) -itk_add_test(NAME itkMapMaskedRankImageFilterTest3 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/itkMaskedRankImageFilter3.png} - ${ITK_TEST_OUTPUT_DIR}/itkMapMaskedRankImageFilter3.png - itkMapMaskedRankImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-mask.png} ${ITK_TEST_OUTPUT_DIR}/itkMapMaskedRankImageFilter3.png 3) -itk_add_test(NAME itkMapMaskedRankImageFilterTest10 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/itkMaskedRankImageFilter10.png} - ${ITK_TEST_OUTPUT_DIR}/itkMapMaskedRankImageFilter10.png - itkMapMaskedRankImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-mask.png} ${ITK_TEST_OUTPUT_DIR}/itkMapMaskedRankImageFilter10.png 10) -itk_add_test(NAME itkMapRankImageFilterTest3 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/itkRankImageFilter3.png} - ${ITK_TEST_OUTPUT_DIR}/itkMapRankImageFilter3.png - itkMapRankImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkMapRankImageFilter3.png 3) -itk_add_test(NAME itkMapRankImageFilterTest10 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/itkRankImageFilter10.png} - ${ITK_TEST_OUTPUT_DIR}/itkMapRankImageFilter10.png - itkMapRankImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkMapRankImageFilter10.png 10) -itk_add_test(NAME itkMaskedRankImageFilterTest3 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/itkMaskedRankImageFilter3.png} - ${ITK_TEST_OUTPUT_DIR}/itkMaskedRankImageFilter3.png - itkMaskedRankImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-mask.png} ${ITK_TEST_OUTPUT_DIR}/itkMaskedRankImageFilter3.png 3) -itk_add_test(NAME itkMaskedRankImageFilterTest10 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/itkMaskedRankImageFilter10.png} - ${ITK_TEST_OUTPUT_DIR}/itkMaskedRankImageFilter10.png - itkMaskedRankImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-mask.png} ${ITK_TEST_OUTPUT_DIR}/itkMaskedRankImageFilter10.png 10) -itk_add_test(NAME itkRankImageFilterTest3 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/itkRankImageFilter3.png} - ${ITK_TEST_OUTPUT_DIR}/itkRankImageFilter3.png - itkRankImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkRankImageFilter3.png 3) -itk_add_test(NAME itkRankImageFilterTest10 - COMMAND ITKMathematicalMorphologyTestDriver - --compare DATA{Baseline/itkRankImageFilter10.png} - ${ITK_TEST_OUTPUT_DIR}/itkRankImageFilter10.png - itkRankImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkRankImageFilter10.png 10) -itk_add_test(NAME itkVanHerkGilWermanErodeDilateImageFilterTest - COMMAND ITKMathematicalMorphologyTestDriver - itkVanHerkGilWermanErodeDilateImageFilterTest) +itk_add_test( + NAME + itkValuedRegionalMaximaImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/cthead1ValuedRegionalMaximal-ref.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMaximal.png + itkValuedRegionalMaximaImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMaximal.png + ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMaximal-ref.png + 1) +itk_add_test( + NAME + itkValuedRegionalMaximaImageFilterTest2 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/cthead1ValuedRegionalMaximal-ref2.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMaximal2.png + itkValuedRegionalMaximaImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMaximal2.png + ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMaximal-ref2.png + 0) +itk_add_test( + NAME + itkValuedRegionalMinimaImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/cthead1ValuedRegionalMinimal-ref.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMinimal.png + itkValuedRegionalMinimaImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMinimal.png + ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMinimal-ref.png + 1) +itk_add_test( + NAME + itkValuedRegionalMinimaImageFilterTest2 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/cthead1ValuedRegionalMinimal-ref2.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMinimal2.png + itkValuedRegionalMinimaImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMinimal2.png + ${ITK_TEST_OUTPUT_DIR}/cthead1ValuedRegionalMinimal-ref2.png + 0) +itk_add_test( + NAME + itkMapMaskedRankImageFilterTest3 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/itkMaskedRankImageFilter3.png} + ${ITK_TEST_OUTPUT_DIR}/itkMapMaskedRankImageFilter3.png + itkMapMaskedRankImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-mask.png} + ${ITK_TEST_OUTPUT_DIR}/itkMapMaskedRankImageFilter3.png + 3) +itk_add_test( + NAME + itkMapMaskedRankImageFilterTest10 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/itkMaskedRankImageFilter10.png} + ${ITK_TEST_OUTPUT_DIR}/itkMapMaskedRankImageFilter10.png + itkMapMaskedRankImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-mask.png} + ${ITK_TEST_OUTPUT_DIR}/itkMapMaskedRankImageFilter10.png + 10) +itk_add_test( + NAME + itkMapRankImageFilterTest3 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/itkRankImageFilter3.png} + ${ITK_TEST_OUTPUT_DIR}/itkMapRankImageFilter3.png + itkMapRankImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMapRankImageFilter3.png + 3) +itk_add_test( + NAME + itkMapRankImageFilterTest10 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/itkRankImageFilter10.png} + ${ITK_TEST_OUTPUT_DIR}/itkMapRankImageFilter10.png + itkMapRankImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMapRankImageFilter10.png + 10) +itk_add_test( + NAME + itkMaskedRankImageFilterTest3 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/itkMaskedRankImageFilter3.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaskedRankImageFilter3.png + itkMaskedRankImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-mask.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaskedRankImageFilter3.png + 3) +itk_add_test( + NAME + itkMaskedRankImageFilterTest10 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/itkMaskedRankImageFilter10.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaskedRankImageFilter10.png + itkMaskedRankImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-mask.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaskedRankImageFilter10.png + 10) +itk_add_test( + NAME + itkRankImageFilterTest3 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/itkRankImageFilter3.png} + ${ITK_TEST_OUTPUT_DIR}/itkRankImageFilter3.png + itkRankImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkRankImageFilter3.png + 3) +itk_add_test( + NAME + itkRankImageFilterTest10 + COMMAND + ITKMathematicalMorphologyTestDriver + --compare + DATA{Baseline/itkRankImageFilter10.png} + ${ITK_TEST_OUTPUT_DIR}/itkRankImageFilter10.png + itkRankImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkRankImageFilter10.png + 10) +itk_add_test( + NAME + itkVanHerkGilWermanErodeDilateImageFilterTest + COMMAND + ITKMathematicalMorphologyTestDriver + itkVanHerkGilWermanErodeDilateImageFilterTest) diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/CMakeLists.txt b/Modules/Filtering/MathematicalMorphology/wrapping/CMakeLists.txt index 92ee96866bf..46ccaa2dd70 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/CMakeLists.txt +++ b/Modules/Filtering/MathematicalMorphology/wrapping/CMakeLists.txt @@ -1,6 +1,4 @@ itk_wrap_module(ITKMathematicalMorphology) -set(WRAPPER_SUBMODULE_ORDER - itkFlatStructuringElement - ) +set(WRAPPER_SUBMODULE_ORDER itkFlatStructuringElement) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkBlackTopHatImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkBlackTopHatImageFilter.wrap index 9ce82df389b..ee79f626640 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkBlackTopHatImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkBlackTopHatImageFilter.wrap @@ -1,8 +1,9 @@ itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::BlackTopHatImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkClosingByReconstructionImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkClosingByReconstructionImageFilter.wrap index 2260146d7d2..27c1d9fbfb7 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkClosingByReconstructionImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkClosingByReconstructionImageFilter.wrap @@ -1,8 +1,9 @@ itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::ClosingByReconstructionImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkDoubleThresholdImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkDoubleThresholdImageFilter.wrap index cd5778d7991..6c3d6afeba4 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkDoubleThresholdImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkDoubleThresholdImageFilter.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::DoubleThresholdImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) - # Wrap from all real types to all unsigned integral types - itk_wrap_image_filter_combinations("${WRAP_ITK_REAL}" "${WRAP_ITK_USIGN_INT}") +# Wrap from all real types to all unsigned integral types +itk_wrap_image_filter_combinations("${WRAP_ITK_REAL}" "${WRAP_ITK_USIGN_INT}") itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkFlatStructuringElement.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkFlatStructuringElement.wrap index af8a5478617..f09d6490856 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkFlatStructuringElement.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkFlatStructuringElement.wrap @@ -1,23 +1,23 @@ itk_wrap_class("itk::FlatStructuringElement") - set(WRAPPER_TEMPLATES "${itk_Wrap_StructuringElement}") +set(WRAPPER_TEMPLATES "${itk_Wrap_StructuringElement}") itk_end_wrap_class() itk_wrap_include("itkKernelImageFilter.h") itk_wrap_class("itk::KernelImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" - "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() itk_wrap_include("itkMovingHistogramImageFilterBase.h") itk_wrap_class("itk::MovingHistogramImageFilterBase" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" - "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleConnectedClosingImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleConnectedClosingImageFilter.wrap index d7afe72f46c..25f92139a63 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleConnectedClosingImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleConnectedClosingImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::GrayscaleConnectedClosingImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleConnectedOpeningImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleConnectedOpeningImageFilter.wrap index 496cbbb1d54..b5c67aef1c6 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleConnectedOpeningImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleConnectedOpeningImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::GrayscaleConnectedOpeningImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleDilateImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleDilateImageFilter.wrap index b953ba60664..b32d8f5a6c7 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleDilateImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleDilateImageFilter.wrap @@ -1,15 +1,16 @@ # class hierarchy is not the same with or without consolidated morphology #if(ITK_USE_CONSOLIDATED_MORPHOLOGY) - set(opts POINTER) +set(opts POINTER) #else() # set(opts POINTER_WITH_SUPERCLASS) #endif() itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::GrayscaleDilateImageFilter" ${opts}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleErodeImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleErodeImageFilter.wrap index 9622532ec29..cc7f6e8c8c1 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleErodeImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleErodeImageFilter.wrap @@ -1,8 +1,9 @@ itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::GrayscaleErodeImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleFillholeImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleFillholeImageFilter.wrap index 0b6da91ce6b..379382b401d 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleFillholeImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleFillholeImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::GrayscaleFillholeImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleFunctionDilateImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleFunctionDilateImageFilter.wrap index dafe317cbda..40c80ae4726 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleFunctionDilateImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleFunctionDilateImageFilter.wrap @@ -1,8 +1,9 @@ itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::GrayscaleFunctionDilateImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleFunctionErodeImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleFunctionErodeImageFilter.wrap index 0cf266e4b40..6f5178998e4 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleFunctionErodeImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleFunctionErodeImageFilter.wrap @@ -1,15 +1,16 @@ # class hierarchy is not the same with or without consolidated morphology #if(ITK_USE_CONSOLIDATED_MORPHOLOGY) - set(opts POINTER_WITH_SUPERCLASS) +set(opts POINTER_WITH_SUPERCLASS) #else() # set(opts POINTER) #endif() itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::GrayscaleFunctionErodeImageFilter" ${opts}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleGeodesicDilateImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleGeodesicDilateImageFilter.wrap index d156cd56498..4638356fed6 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleGeodesicDilateImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleGeodesicDilateImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::GrayscaleGeodesicDilateImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleGeodesicErodeImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleGeodesicErodeImageFilter.wrap index 93ebea74771..416fa9c6175 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleGeodesicErodeImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleGeodesicErodeImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::GrayscaleGeodesicErodeImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleGrindPeakImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleGrindPeakImageFilter.wrap index da09522a4a4..dea22ffb92c 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleGrindPeakImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleGrindPeakImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::GrayscaleGrindPeakImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleMorphologicalClosingImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleMorphologicalClosingImageFilter.wrap index e04dd01f380..e5b8db8b9b3 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleMorphologicalClosingImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleMorphologicalClosingImageFilter.wrap @@ -1,8 +1,9 @@ itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::GrayscaleMorphologicalClosingImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleMorphologicalOpeningImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleMorphologicalOpeningImageFilter.wrap index fcbcb5f9ea7..eb4645922b5 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleMorphologicalOpeningImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkGrayscaleMorphologicalOpeningImageFilter.wrap @@ -1,8 +1,9 @@ itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::GrayscaleMorphologicalOpeningImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkHConcaveImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkHConcaveImageFilter.wrap index 0d298e0966f..eed74203139 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkHConcaveImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkHConcaveImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::HConcaveImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkHConvexImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkHConvexImageFilter.wrap index d5801fda149..eac67af62a8 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkHConvexImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkHConvexImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::HConvexImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkHMaximaImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkHMaximaImageFilter.wrap index bfbaef17f0e..df4b8518b59 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkHMaximaImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkHMaximaImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::HMaximaImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkHMinimaImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkHMinimaImageFilter.wrap index 12d980a32b7..05f20fb89a9 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkHMinimaImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkHMinimaImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::HMinimaImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkMorphologicalGradientImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkMorphologicalGradientImageFilter.wrap index a2c3da454bf..7884930596b 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkMorphologicalGradientImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkMorphologicalGradientImageFilter.wrap @@ -1,8 +1,9 @@ itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::MorphologicalGradientImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkOpeningByReconstructionImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkOpeningByReconstructionImageFilter.wrap index 141cba911ee..57ee5a01eed 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkOpeningByReconstructionImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkOpeningByReconstructionImageFilter.wrap @@ -1,8 +1,9 @@ itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::OpeningByReconstructionImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkReconstructionByDilationImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkReconstructionByDilationImageFilter.wrap index e4ba63fc9e3..8e7b0b6cbcf 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkReconstructionByDilationImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkReconstructionByDilationImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ReconstructionByDilationImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkReconstructionByErosionImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkReconstructionByErosionImageFilter.wrap index acfab110c93..f72065f652f 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkReconstructionByErosionImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkReconstructionByErosionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ReconstructionByErosionImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkRegionalMaximaImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkRegionalMaximaImageFilter.wrap index 64ffd9d111f..0d47a725765 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkRegionalMaximaImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkRegionalMaximaImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::RegionalMaximaImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkRegionalMinimaImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkRegionalMinimaImageFilter.wrap index 6bb22a58786..528977f2086 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkRegionalMinimaImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkRegionalMinimaImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::RegionalMinimaImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkValuedRegionalMaximaImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkValuedRegionalMaximaImageFilter.wrap index 0867428295f..8cb1cf9d750 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkValuedRegionalMaximaImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkValuedRegionalMaximaImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ValuedRegionalMaximaImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkValuedRegionalMinimaImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkValuedRegionalMinimaImageFilter.wrap index 2141f065c6c..b8bacd3e8fd 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkValuedRegionalMinimaImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkValuedRegionalMinimaImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ValuedRegionalMinimaImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/itkWhiteTopHatImageFilter.wrap b/Modules/Filtering/MathematicalMorphology/wrapping/itkWhiteTopHatImageFilter.wrap index 485964ca7e6..42b00257567 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/itkWhiteTopHatImageFilter.wrap +++ b/Modules/Filtering/MathematicalMorphology/wrapping/itkWhiteTopHatImageFilter.wrap @@ -1,8 +1,9 @@ itk_wrap_include("itkFlatStructuringElement.h") itk_wrap_class("itk::WhiteTopHatImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/MathematicalMorphology/wrapping/test/CMakeLists.txt b/Modules/Filtering/MathematicalMorphology/wrapping/test/CMakeLists.txt index 8b534a6601e..4a592336ec5 100644 --- a/Modules/Filtering/MathematicalMorphology/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/MathematicalMorphology/wrapping/test/CMakeLists.txt @@ -1,43 +1,61 @@ # some tests will fail if dim=2 and unsigned short are not wrapped -list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) -if(ITK_WRAP_PYTHON AND ITK_WRAP_unsigned_char AND wrap_2_index GREATER -1) - itk_python_add_test(NAME PythonFlatStructuringElementBall +list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) +if(ITK_WRAP_PYTHON + AND ITK_WRAP_unsigned_char + AND wrap_2_index GREATER -1) + itk_python_add_test( + NAME + PythonFlatStructuringElementBall TEST_DRIVER_ARGS - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/FlatStructuringElementTest.py - Ball - 5 - ) - itk_python_add_test(NAME PythonFlatStructuringElementBox + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/FlatStructuringElementTest.py + Ball + 5) + itk_python_add_test( + NAME + PythonFlatStructuringElementBox TEST_DRIVER_ARGS - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/FlatStructuringElementTest.py - Box - 5 - ) - itk_python_add_test(NAME PythonGrayscaleDilateImageFilterTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/FlatStructuringElementTest.py + Box + 5) + itk_python_add_test( + NAME + PythonGrayscaleDilateImageFilterTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonGrayscaleDilateImageFilterTest.png - DATA{Baseline/PythonGrayscaleDilateImageFilterTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/GrayscaleDilateImageFilterTest.py - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/PythonGrayscaleDilateImageFilterTest.png - 5 - ) - itk_python_add_test(NAME PythonGrayscaleErodeImageFilterTest + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonGrayscaleDilateImageFilterTest.png + DATA{Baseline/PythonGrayscaleDilateImageFilterTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/GrayscaleDilateImageFilterTest.py + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/PythonGrayscaleDilateImageFilterTest.png + 5) + itk_python_add_test( + NAME + PythonGrayscaleErodeImageFilterTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonGrayscaleErodeImageFilterTest.png - DATA{Baseline/PythonGrayscaleErodeImageFilterTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/GrayscaleErodeImageFilterTest.py - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/PythonGrayscaleErodeImageFilterTest.png - 5 - ) - itk_python_add_test(NAME PythonBoxGrayscaleDilateImageFilterTest + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonGrayscaleErodeImageFilterTest.png + DATA{Baseline/PythonGrayscaleErodeImageFilterTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/GrayscaleErodeImageFilterTest.py + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/PythonGrayscaleErodeImageFilterTest.png + 5) + itk_python_add_test( + NAME + PythonBoxGrayscaleDilateImageFilterTest TEST_DRIVER_ARGS - --compare - ${ITK_TEST_OUTPUT_DIR}/PythonBoxGrayscaleDilateImageFilterTest.png - DATA{Baseline/PythonBoxGrayscaleDilateImageFilterTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/BoxGrayscaleDilateImageFilterTest.py - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/PythonBoxGrayscaleDilateImageFilterTest.png - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonBoxGrayscaleDilateImageFilterTest.png + DATA{Baseline/PythonBoxGrayscaleDilateImageFilterTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/BoxGrayscaleDilateImageFilterTest.py + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/PythonBoxGrayscaleDilateImageFilterTest.png) endif() diff --git a/Modules/Filtering/Path/itk-module.cmake b/Modules/Filtering/Path/itk-module.cmake index 4fd6b0569e5..d4f542de3e3 100644 --- a/Modules/Filtering/Path/itk-module.cmake +++ b/Modules/Filtering/Path/itk-module.cmake @@ -1,20 +1,21 @@ -set(DOCUMENTATION "The classes in this module are intended to describe the +set(DOCUMENTATION + "The classes in this module are intended to describe the concept of a linear path in N-Dimensional space. They can be used to represent contours in 2D images, or curves in 3D space. These classes also include the concept of iterators, polylines, and smooth approximations to paths.") -itk_module(ITKPath +itk_module( + ITKPath PRIVATE_DEPENDS - ITKCommon + ITKCommon COMPILE_DEPENDS - ITKImageFunction + ITKImageFunction TEST_DEPENDS - ITKTestKernel - ITKImageIntensity - ITKSmoothing - ITKImageFeature + ITKTestKernel + ITKImageIntensity + ITKSmoothing + ITKImageFeature DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") # Extra test dependencies on ITKImageIntensity, ITKSmoothing, and ITKImageFeature are introduced by itkOrthogonalSwath2DPathFilterTest. diff --git a/Modules/Filtering/Path/src/CMakeLists.txt b/Modules/Filtering/Path/src/CMakeLists.txt index ccc8a7b5e80..f09776407e4 100644 --- a/Modules/Filtering/Path/src/CMakeLists.txt +++ b/Modules/Filtering/Path/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKPath_SRCS - itkChainCodePath2D.cxx - itkOrthogonallyCorrected2DParametricPath.cxx - ) +set(ITKPath_SRCS itkChainCodePath2D.cxx itkOrthogonallyCorrected2DParametricPath.cxx) itk_module_add_library(ITKPath ${ITKPath_SRCS}) diff --git a/Modules/Filtering/Path/test/CMakeLists.txt b/Modules/Filtering/Path/test/CMakeLists.txt index 51f4012fcc5..f4d0ee00cb0 100644 --- a/Modules/Filtering/Path/test/CMakeLists.txt +++ b/Modules/Filtering/Path/test/CMakeLists.txt @@ -1,52 +1,108 @@ itk_module_test() set(ITKPathTests -itkPathIteratorTest.cxx -itkChainCodePathTest.cxx -itkChainCodePath2DTest.cxx -itkHilbertPathTest.cxx -itkOrthogonallyCorrected2DParametricPathTest.cxx -itkPathToImageFilterTest.cxx -itkPathToChainCodePathFilterTest.cxx -itkFourierSeriesPathTest.cxx -itkPathFunctionsTest.cxx -itkPolyLineParametricPathTest.cxx -itkChainCodeToFourierSeriesPathFilterTest.cxx -itkExtractOrthogonalSwath2DImageFilterTest.cxx -itkOrthogonalSwath2DPathFilterTest.cxx -itkContourExtractor2DImageFilterTest.cxx -) + itkPathIteratorTest.cxx + itkChainCodePathTest.cxx + itkChainCodePath2DTest.cxx + itkHilbertPathTest.cxx + itkOrthogonallyCorrected2DParametricPathTest.cxx + itkPathToImageFilterTest.cxx + itkPathToChainCodePathFilterTest.cxx + itkFourierSeriesPathTest.cxx + itkPathFunctionsTest.cxx + itkPolyLineParametricPathTest.cxx + itkChainCodeToFourierSeriesPathFilterTest.cxx + itkExtractOrthogonalSwath2DImageFilterTest.cxx + itkOrthogonalSwath2DPathFilterTest.cxx + itkContourExtractor2DImageFilterTest.cxx) -CreateTestDriver(ITKPath "${ITKPath-Test_LIBRARIES}" "${ITKPathTests}") +createtestdriver(ITKPath "${ITKPath-Test_LIBRARIES}" "${ITKPathTests}") -itk_add_test(NAME itkPathIteratorTest - COMMAND ITKPathTestDriver itkPathIteratorTest) -itk_add_test(NAME itkChainCodePathTest - COMMAND ITKPathTestDriver itkChainCodePathTest) -itk_add_test(NAME itkChainCodePath2DTest - COMMAND ITKPathTestDriver itkChainCodePath2DTest) -itk_add_test(NAME itkHilbertPathTest - COMMAND ITKPathTestDriver itkHilbertPathTest) -itk_add_test(NAME itkOrthogonallyCorrected2DParametricPathTest - COMMAND ITKPathTestDriver itkOrthogonallyCorrected2DParametricPathTest) -itk_add_test(NAME itkPathToImageFilterTest - COMMAND ITKPathTestDriver itkPathToImageFilterTest) -itk_add_test(NAME itkPathToChainCodePathFilterTest - COMMAND ITKPathTestDriver itkPathToChainCodePathFilterTest) -itk_add_test(NAME itkFourierSeriesPathTest - COMMAND ITKPathTestDriver itkFourierSeriesPathTest) -itk_add_test(NAME itkPathFunctionsTest - COMMAND ITKPathTestDriver itkPathFunctionsTest) -itk_add_test(NAME itkPolyLineParametricPathTest - COMMAND ITKPathTestDriver itkPolyLineParametricPathTest) -itk_add_test(NAME itkChainCodeToFourierSeriesPathFilterTest - COMMAND ITKPathTestDriver itkChainCodeToFourierSeriesPathFilterTest) -itk_add_test(NAME itkExtractOrthogonalSwath2DImageFilterTest - COMMAND ITKPathTestDriver - --compare DATA{Baseline/ExtractOrthogonalSwath2DImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/ExtractOrthogonalSwath2DImageFilterTest.png - itkExtractOrthogonalSwath2DImageFilterTest ${ITK_TEST_OUTPUT_DIR}/ExtractOrthogonalSwath2DImageFilterTest.png) -itk_add_test(NAME itkOrthogonalSwath2DPathFilterTest - COMMAND ITKPathTestDriver itkOrthogonalSwath2DPathFilterTest) -itk_add_test(NAME itkContourExtractor2DImageFilterTest - COMMAND ITKPathTestDriver itkContourExtractor2DImageFilterTest - DATA{Input/ContourExtractor2DTest.tif}) +itk_add_test( + NAME + itkPathIteratorTest + COMMAND + ITKPathTestDriver + itkPathIteratorTest) +itk_add_test( + NAME + itkChainCodePathTest + COMMAND + ITKPathTestDriver + itkChainCodePathTest) +itk_add_test( + NAME + itkChainCodePath2DTest + COMMAND + ITKPathTestDriver + itkChainCodePath2DTest) +itk_add_test( + NAME + itkHilbertPathTest + COMMAND + ITKPathTestDriver + itkHilbertPathTest) +itk_add_test( + NAME + itkOrthogonallyCorrected2DParametricPathTest + COMMAND + ITKPathTestDriver + itkOrthogonallyCorrected2DParametricPathTest) +itk_add_test( + NAME + itkPathToImageFilterTest + COMMAND + ITKPathTestDriver + itkPathToImageFilterTest) +itk_add_test( + NAME + itkPathToChainCodePathFilterTest + COMMAND + ITKPathTestDriver + itkPathToChainCodePathFilterTest) +itk_add_test( + NAME + itkFourierSeriesPathTest + COMMAND + ITKPathTestDriver + itkFourierSeriesPathTest) +itk_add_test( + NAME + itkPathFunctionsTest + COMMAND + ITKPathTestDriver + itkPathFunctionsTest) +itk_add_test( + NAME + itkPolyLineParametricPathTest + COMMAND + ITKPathTestDriver + itkPolyLineParametricPathTest) +itk_add_test( + NAME + itkChainCodeToFourierSeriesPathFilterTest + COMMAND + ITKPathTestDriver + itkChainCodeToFourierSeriesPathFilterTest) +itk_add_test( + NAME + itkExtractOrthogonalSwath2DImageFilterTest + COMMAND + ITKPathTestDriver + --compare + DATA{Baseline/ExtractOrthogonalSwath2DImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/ExtractOrthogonalSwath2DImageFilterTest.png + itkExtractOrthogonalSwath2DImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/ExtractOrthogonalSwath2DImageFilterTest.png) +itk_add_test( + NAME + itkOrthogonalSwath2DPathFilterTest + COMMAND + ITKPathTestDriver + itkOrthogonalSwath2DPathFilterTest) +itk_add_test( + NAME + itkContourExtractor2DImageFilterTest + COMMAND + ITKPathTestDriver + itkContourExtractor2DImageFilterTest + DATA{Input/ContourExtractor2DTest.tif}) diff --git a/Modules/Filtering/Path/wrapping/CMakeLists.txt b/Modules/Filtering/Path/wrapping/CMakeLists.txt index f91f9cac72e..2ea4614d92d 100644 --- a/Modules/Filtering/Path/wrapping/CMakeLists.txt +++ b/Modules/Filtering/Path/wrapping/CMakeLists.txt @@ -1,10 +1,9 @@ itk_wrap_module(ITKPath) set(WRAPPER_SUBMODULE_ORDER - itkPathBase - itkPolyLineParametricPath - itkPathToImageFilter - itkParametricPath - itkImageToPathFilter -) + itkPathBase + itkPolyLineParametricPath + itkPathToImageFilter + itkParametricPath + itkImageToPathFilter) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Filtering/Path/wrapping/itkContourExtractor2DImageFilter.wrap b/Modules/Filtering/Path/wrapping/itkContourExtractor2DImageFilter.wrap index fde105d8127..bd7ce2f88ad 100644 --- a/Modules/Filtering/Path/wrapping/itkContourExtractor2DImageFilter.wrap +++ b/Modules/Filtering/Path/wrapping/itkContourExtractor2DImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ContourExtractor2DImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1 2) itk_end_wrap_class() diff --git a/Modules/Filtering/Path/wrapping/itkImageToPathFilter.wrap b/Modules/Filtering/Path/wrapping/itkImageToPathFilter.wrap index 328a1608ea7..4aa389b68d0 100644 --- a/Modules/Filtering/Path/wrapping/itkImageToPathFilter.wrap +++ b/Modules/Filtering/Path/wrapping/itkImageToPathFilter.wrap @@ -1,8 +1,8 @@ itk_wrap_include("itkPolyLineParametricPath.h" POINTER) itk_wrap_class("itk::ImageToPathFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}PLPP${d}" "${ITKT_I${t}${d}}, itk::PolyLineParametricPath< ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}PLPP${d}" "${ITKT_I${t}${d}}, itk::PolyLineParametricPath< ${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Path/wrapping/itkParametricPath.wrap b/Modules/Filtering/Path/wrapping/itkParametricPath.wrap index 425a39de317..e5801934ed2 100644 --- a/Modules/Filtering/Path/wrapping/itkParametricPath.wrap +++ b/Modules/Filtering/Path/wrapping/itkParametricPath.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ParametricPath" POINTER_WITH_EXPLICIT_SPECIALIZATION) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${d}" "${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${d}" "${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Path/wrapping/itkPathBase.wrap b/Modules/Filtering/Path/wrapping/itkPathBase.wrap index d978f6d0010..e00250153e2 100644 --- a/Modules/Filtering/Path/wrapping/itkPathBase.wrap +++ b/Modules/Filtering/Path/wrapping/itkPathBase.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::Path" POINTER_WITH_EXPLICIT_SPECIALIZATION) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${ITKM_CID${d}}${d}" "${ITKT_D}, ${ITKT_CID${d}}, ${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${ITKM_CID${d}}${d}" "${ITKT_D}, ${ITKT_CID${d}}, ${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Path/wrapping/itkPathSource.wrap b/Modules/Filtering/Path/wrapping/itkPathSource.wrap index 9b7d1fb5584..117112c44fe 100644 --- a/Modules/Filtering/Path/wrapping/itkPathSource.wrap +++ b/Modules/Filtering/Path/wrapping/itkPathSource.wrap @@ -1,6 +1,6 @@ itk_wrap_include("itkPolyLineParametricPath.h" POINTER) itk_wrap_class("itk::PathSource" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("PLPP${d}" "itk::PolyLineParametricPath< ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("PLPP${d}" "itk::PolyLineParametricPath< ${d} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Path/wrapping/itkPathToImageFilter.wrap b/Modules/Filtering/Path/wrapping/itkPathToImageFilter.wrap index f67879d2c26..fdfdf253d36 100644 --- a/Modules/Filtering/Path/wrapping/itkPathToImageFilter.wrap +++ b/Modules/Filtering/Path/wrapping/itkPathToImageFilter.wrap @@ -1,8 +1,8 @@ itk_wrap_include("itkPolyLineParametricPath.h" POINTER) itk_wrap_class("itk::PathToImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("PLPP${d}${ITKM_I${t}${d}}" "itk::PolyLineParametricPath< ${d} >, ${ITKT_I${t}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("PLPP${d}${ITKM_I${t}${d}}" "itk::PolyLineParametricPath< ${d} >, ${ITKT_I${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Path/wrapping/itkPolyLineParametricPath.wrap b/Modules/Filtering/Path/wrapping/itkPolyLineParametricPath.wrap index 82a9b6c86fc..5fe5254b5ee 100644 --- a/Modules/Filtering/Path/wrapping/itkPolyLineParametricPath.wrap +++ b/Modules/Filtering/Path/wrapping/itkPolyLineParametricPath.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::PolyLineParametricPath" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${d}" "${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${d}" "${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Path/wrapping/test/CMakeLists.txt b/Modules/Filtering/Path/wrapping/test/CMakeLists.txt index 05537320dbf..31db3f5cde0 100644 --- a/Modules/Filtering/Path/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/Path/wrapping/test/CMakeLists.txt @@ -1,14 +1,26 @@ if(ITK_WRAP_PYTHON) - itk_python_expression_add_test(NAME itkParametricPathPythonTest - EXPRESSION "path = itk.ParametricPath[2].New()") - itk_python_expression_add_test(NAME itkPolyLineParametricPathPythonTest - EXPRESSION "path = itk.PolyLineParametricPath[2].New()") - itk_python_expression_add_test(NAME itkImageToPathPythonTest - EXPRESSION "PathType = itk.PolyLineParametricPath[2]; + itk_python_expression_add_test( + NAME + itkParametricPathPythonTest + EXPRESSION + "path = itk.ParametricPath[2].New()") + itk_python_expression_add_test( + NAME + itkPolyLineParametricPathPythonTest + EXPRESSION + "path = itk.PolyLineParametricPath[2].New()") + itk_python_expression_add_test( + NAME + itkImageToPathPythonTest + EXPRESSION + "PathType = itk.PolyLineParametricPath[2]; ImageType = itk.Image[itk.UC][2]; filter = itk.ImageToPathFilter[ImageType, PathType].New();") - itk_python_expression_add_test(NAME itkPathToImageFilterPythonTest - EXPRESSION "PathType = itk.PolyLineParametricPath[2]; + itk_python_expression_add_test( + NAME + itkPathToImageFilterPythonTest + EXPRESSION + "PathType = itk.PolyLineParametricPath[2]; ImageType = itk.Image[itk.UC][2]; filter = itk.PathToImageFilter[PathType, ImageType].New();") endif() diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/itk-module.cmake b/Modules/Filtering/QuadEdgeMeshFiltering/itk-module.cmake index 03b711a59cf..599a802d283 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/itk-module.cmake +++ b/Modules/Filtering/QuadEdgeMeshFiltering/itk-module.cmake @@ -1,4 +1,5 @@ -set(DOCUMENTATION "This module contains classes that perform operations on the +set(DOCUMENTATION + "This module contains classes that perform operations on the itk::QuadEdgeMesh. This is a data structure designed to represent a 2-dimensional manifold embedded in a 3-dimensional space. That's typically the case of an iso-surface extracted from a 3D image data set. The itk::QuadEdgeMesh @@ -6,16 +7,16 @@ ensures the proper topological orientation of the surface. Filters in this module include: smoothing, decimation, curvature computation (mean, gaussian, min, max, principal), and normal computation, among others.") -itk_module(ITKQuadEdgeMeshFiltering +itk_module( + ITKQuadEdgeMeshFiltering ENABLE_SHARED DEPENDS - ITKMesh + ITKMesh COMPILE_DEPENDS - ITKQuadEdgeMesh + ITKQuadEdgeMesh TEST_DEPENDS - ITKTestKernel - ITKIOMesh - ITKStatistics + ITKTestKernel + ITKIOMesh + ITKStatistics DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/src/CMakeLists.txt b/Modules/Filtering/QuadEdgeMeshFiltering/src/CMakeLists.txt index b2ea18134a9..ae00dc3173e 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/src/CMakeLists.txt +++ b/Modules/Filtering/QuadEdgeMeshFiltering/src/CMakeLists.txt @@ -1,7 +1,4 @@ -set(ITKQuadEdgeMeshFiltering_SRCS - itkNormalQuadEdgeMeshFilter.cxx - itkBorderQuadEdgeMeshFilter.cxx - itkLaplacianDeformationQuadEdgeMeshFilter.cxx - ) +set(ITKQuadEdgeMeshFiltering_SRCS itkNormalQuadEdgeMeshFilter.cxx itkBorderQuadEdgeMeshFilter.cxx + itkLaplacianDeformationQuadEdgeMeshFilter.cxx) itk_module_add_library(ITKQuadEdgeMeshFiltering ${ITKQuadEdgeMeshFiltering_SRCS}) diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/test/CMakeLists.txt b/Modules/Filtering/QuadEdgeMeshFiltering/test/CMakeLists.txt index d83ad7d8985..a59780c8815 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/test/CMakeLists.txt +++ b/Modules/Filtering/QuadEdgeMeshFiltering/test/CMakeLists.txt @@ -1,135 +1,258 @@ itk_module_test() set(ITKQuadEdgeMeshFilteringTests -itkAutomaticTopologyQuadEdgeMeshSourceTest.cxx -itkBorderQuadEdgeMeshFilterTest.cxx -itkBorderQuadEdgeMeshFilterTest2.cxx -itkBinaryMask3DQuadEdgeMeshSourceTest.cxx -itkCleanQuadEdgeMeshFilterTest.cxx -itkDelaunayConformingQuadEdgeMeshFilterTest.cxx -itkDiscreteGaussianCurvatureQuadEdgeMeshFilterTest.cxx -itkDiscreteMaximumCurvatureQuadEdgeMeshFilterTest.cxx -itkDiscreteMeanCurvatureQuadEdgeMeshFilterTest.cxx -itkDiscreteMinimumCurvatureQuadEdgeMeshFilterTest.cxx -itkNormalQuadEdgeMeshFilterTest.cxx -itkParameterizationQuadEdgeMeshFilterTest.cxx -itkQuadricDecimationQuadEdgeMeshFilterTest.cxx -itkRegularSphereQuadEdgeMeshSourceTest.cxx -itkSmoothingQuadEdgeMeshFilterTest.cxx -itkSquaredEdgeLengthDecimationQuadEdgeMeshFilterTest.cxx -itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsTest.cxx -itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsTest.cxx -) + itkAutomaticTopologyQuadEdgeMeshSourceTest.cxx + itkBorderQuadEdgeMeshFilterTest.cxx + itkBorderQuadEdgeMeshFilterTest2.cxx + itkBinaryMask3DQuadEdgeMeshSourceTest.cxx + itkCleanQuadEdgeMeshFilterTest.cxx + itkDelaunayConformingQuadEdgeMeshFilterTest.cxx + itkDiscreteGaussianCurvatureQuadEdgeMeshFilterTest.cxx + itkDiscreteMaximumCurvatureQuadEdgeMeshFilterTest.cxx + itkDiscreteMeanCurvatureQuadEdgeMeshFilterTest.cxx + itkDiscreteMinimumCurvatureQuadEdgeMeshFilterTest.cxx + itkNormalQuadEdgeMeshFilterTest.cxx + itkParameterizationQuadEdgeMeshFilterTest.cxx + itkQuadricDecimationQuadEdgeMeshFilterTest.cxx + itkRegularSphereQuadEdgeMeshSourceTest.cxx + itkSmoothingQuadEdgeMeshFilterTest.cxx + itkSquaredEdgeLengthDecimationQuadEdgeMeshFilterTest.cxx + itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsTest.cxx + itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsTest.cxx) -CreateTestDriver(ITKQuadEdgeMeshFiltering "${ITKQuadEdgeMeshFiltering-Test_LIBRARIES}" "${ITKQuadEdgeMeshFilteringTests}") +createtestdriver(ITKQuadEdgeMeshFiltering "${ITKQuadEdgeMeshFiltering-Test_LIBRARIES}" + "${ITKQuadEdgeMeshFilteringTests}") set(INPUTDATA ${ITK_DATA_ROOT}/Input) set(TEMP ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkBorderQuadEdgeMeshFilterTest_0_0 - COMMAND ITKQuadEdgeMeshFilteringTestDriver - itkBorderQuadEdgeMeshFilterTest - DATA{${INPUTDATA}/mushroom.vtk} 0 0 ${TEMP}/border00.vtk -) +itk_add_test( + NAME + itkBorderQuadEdgeMeshFilterTest_0_0 + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkBorderQuadEdgeMeshFilterTest + DATA{${INPUTDATA}/mushroom.vtk} + 0 + 0 + ${TEMP}/border00.vtk) -itk_add_test(NAME itkBorderQuadEdgeMeshFilterTest_0_1 - COMMAND ITKQuadEdgeMeshFilteringTestDriver - itkBorderQuadEdgeMeshFilterTest - DATA{${INPUTDATA}/mushroom.vtk} 0 1 ${TEMP}/border01.vtk -) +itk_add_test( + NAME + itkBorderQuadEdgeMeshFilterTest_0_1 + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkBorderQuadEdgeMeshFilterTest + DATA{${INPUTDATA}/mushroom.vtk} + 0 + 1 + ${TEMP}/border01.vtk) -itk_add_test(NAME itkBorderQuadEdgeMeshFilterTest_1_0 - COMMAND ITKQuadEdgeMeshFilteringTestDriver - itkBorderQuadEdgeMeshFilterTest - DATA{${INPUTDATA}/mushroom.vtk} 1 0 ${TEMP}/border10.vtk -) +itk_add_test( + NAME + itkBorderQuadEdgeMeshFilterTest_1_0 + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkBorderQuadEdgeMeshFilterTest + DATA{${INPUTDATA}/mushroom.vtk} + 1 + 0 + ${TEMP}/border10.vtk) -itk_add_test(NAME itkBorderQuadEdgeMeshFilterTest_1_1 - COMMAND ITKQuadEdgeMeshFilteringTestDriver - itkBorderQuadEdgeMeshFilterTest - DATA{${INPUTDATA}/mushroom.vtk} 1 1 ${TEMP}/border11.vtk -) +itk_add_test( + NAME + itkBorderQuadEdgeMeshFilterTest_1_1 + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkBorderQuadEdgeMeshFilterTest + DATA{${INPUTDATA}/mushroom.vtk} + 1 + 1 + ${TEMP}/border11.vtk) -itk_add_test(NAME itkBorderQuadEdgeMeshFilterTest2_0 - COMMAND ITKQuadEdgeMeshFilteringTestDriver - itkBorderQuadEdgeMeshFilterTest2 0 -) +itk_add_test( + NAME + itkBorderQuadEdgeMeshFilterTest2_0 + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkBorderQuadEdgeMeshFilterTest2 + 0) -itk_add_test(NAME itkBorderQuadEdgeMeshFilterTest2_1 - COMMAND ITKQuadEdgeMeshFilteringTestDriver - itkBorderQuadEdgeMeshFilterTest2 1 -) -itk_add_test(NAME itkSquaredEdgeLengthDecimationQuadEdgeMeshFilterTest - COMMAND ITKQuadEdgeMeshFilteringTestDriver - itkSquaredEdgeLengthDecimationQuadEdgeMeshFilterTest - DATA{${INPUTDATA}/mushroom.vtk} 20 ${TEMP}/temp_SquaredEdgeLengthDecimationResult1.vtk) +itk_add_test( + NAME + itkBorderQuadEdgeMeshFilterTest2_1 + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkBorderQuadEdgeMeshFilterTest2 + 1) +itk_add_test( + NAME + itkSquaredEdgeLengthDecimationQuadEdgeMeshFilterTest + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkSquaredEdgeLengthDecimationQuadEdgeMeshFilterTest + DATA{${INPUTDATA}/mushroom.vtk} + 20 + ${TEMP}/temp_SquaredEdgeLengthDecimationResult1.vtk) -itk_add_test(NAME itkSmoothingQuadEdgeMeshFilterTest0 - COMMAND ITKQuadEdgeMeshFilteringTestDriver - itkSmoothingQuadEdgeMeshFilterTest - DATA{${INPUTDATA}/genusZeroSurface01.vtk} 10 0.1 0 ${TEMP}/temp_SmoothResult0.vtk) +itk_add_test( + NAME + itkSmoothingQuadEdgeMeshFilterTest0 + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkSmoothingQuadEdgeMeshFilterTest + DATA{${INPUTDATA}/genusZeroSurface01.vtk} + 10 + 0.1 + 0 + ${TEMP}/temp_SmoothResult0.vtk) -itk_add_test(NAME itkSmoothingQuadEdgeMeshFilterTest1 - COMMAND ITKQuadEdgeMeshFilteringTestDriver - itkSmoothingQuadEdgeMeshFilterTest - DATA{${INPUTDATA}/genusZeroSurface01.vtk} 10 0.1 1 ${TEMP}/temp_SmoothResult1.vtk) +itk_add_test( + NAME + itkSmoothingQuadEdgeMeshFilterTest1 + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkSmoothingQuadEdgeMeshFilterTest + DATA{${INPUTDATA}/genusZeroSurface01.vtk} + 10 + 0.1 + 1 + ${TEMP}/temp_SmoothResult1.vtk) -set(CURV_TESTS Gaussian Maximum Mean Minimum) +set(CURV_TESTS + Gaussian + Maximum + Mean + Minimum) foreach(loop_var ${CURV_TESTS}) - itk_add_test(NAME itkDiscrete${loop_var}CurvatureQuadEdgeMeshFilterTest - COMMAND ITKQuadEdgeMeshFilteringTestDriver - itkDiscrete${loop_var}CurvatureQuadEdgeMeshFilterTest - DATA{${INPUTDATA}/mushroom.vtk}) + itk_add_test( + NAME + itkDiscrete${loop_var}CurvatureQuadEdgeMeshFilterTest + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkDiscrete${loop_var}CurvatureQuadEdgeMeshFilterTest + DATA{${INPUTDATA}/mushroom.vtk}) endforeach() -itk_add_test(NAME itkDelaunayConformingQuadEdgeMeshFilterTest - COMMAND ITKQuadEdgeMeshFilteringTestDriver - itkDelaunayConformingQuadEdgeMeshFilterTest DATA{${INPUTDATA}/mushroom.vtk} ${TEMP}/mushroom_delaunay.vtk) -itk_add_test(NAME itkCleanQuadEdgeMeshFilterTest - COMMAND ITKQuadEdgeMeshFilteringTestDriver - itkCleanQuadEdgeMeshFilterTest - DATA{${INPUTDATA}/mushroom.vtk} 0.1 ${TEMP}/temp_CleanResult1.vtk) - itk_add_test(NAME itkQuadricDecimationQuadEdgeMeshFilterTest - COMMAND ITKQuadEdgeMeshFilteringTestDriver - itkQuadricDecimationQuadEdgeMeshFilterTest - DATA{${INPUTDATA}/mushroom.vtk} 100 ${TEMP}/temp_QuadricDecimationResult1.vtk) -itk_add_test(NAME itkQuadEdgeMeshQuadricDecimationTetrahedronTest - COMMAND ITKQuadEdgeMeshFilteringTestDriver - itkQuadricDecimationQuadEdgeMeshFilterTest - DATA{${INPUTDATA}/tetrahedron.vtk} 2 ${TEMP}/temp_QuadricDecimationTetrahedron.vtk) -itk_add_test(NAME itkAutomaticTopologyQuadEdgeMeshSourceTest - COMMAND ITKQuadEdgeMeshFilteringTestDriver itkAutomaticTopologyQuadEdgeMeshSourceTest) -itk_add_test(NAME itkBinaryMask3DQuadEdgeMeshSourceTest - COMMAND ITKQuadEdgeMeshFilteringTestDriver itkBinaryMask3DQuadEdgeMeshSourceTest) -itk_add_test(NAME itkRegularSphereQuadEdgeMeshSourceTest - COMMAND ITKQuadEdgeMeshFilteringTestDriver itkRegularSphereQuadEdgeMeshSourceTest - ${ITK_TEST_OUTPUT_DIR}/itkRegularSphereMeshQuadEdgeMeshSourceTest.vtk) -itk_add_test(NAME itkNormalQuadEdgeMeshFilterTest0 - COMMAND ITKQuadEdgeMeshFilteringTestDriver itkNormalQuadEdgeMeshFilterTest - DATA{${INPUTDATA}/mushroom.vtk} 0) -itk_add_test(NAME itkNormalQuadEdgeMeshFilterTest1 - COMMAND ITKQuadEdgeMeshFilteringTestDriver itkNormalQuadEdgeMeshFilterTest - DATA{${INPUTDATA}/mushroom.vtk} 1) -itk_add_test(NAME itkNormalQuadEdgeMeshFilterTest2 - COMMAND ITKQuadEdgeMeshFilteringTestDriver itkNormalQuadEdgeMeshFilterTest - DATA{${INPUTDATA}/mushroom.vtk} 2) +itk_add_test( + NAME + itkDelaunayConformingQuadEdgeMeshFilterTest + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkDelaunayConformingQuadEdgeMeshFilterTest + DATA{${INPUTDATA}/mushroom.vtk} + ${TEMP}/mushroom_delaunay.vtk) +itk_add_test( + NAME + itkCleanQuadEdgeMeshFilterTest + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkCleanQuadEdgeMeshFilterTest + DATA{${INPUTDATA}/mushroom.vtk} + 0.1 + ${TEMP}/temp_CleanResult1.vtk) +itk_add_test( + NAME + itkQuadricDecimationQuadEdgeMeshFilterTest + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkQuadricDecimationQuadEdgeMeshFilterTest + DATA{${INPUTDATA}/mushroom.vtk} + 100 + ${TEMP}/temp_QuadricDecimationResult1.vtk) +itk_add_test( + NAME + itkQuadEdgeMeshQuadricDecimationTetrahedronTest + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkQuadricDecimationQuadEdgeMeshFilterTest + DATA{${INPUTDATA}/tetrahedron.vtk} + 2 + ${TEMP}/temp_QuadricDecimationTetrahedron.vtk) +itk_add_test( + NAME + itkAutomaticTopologyQuadEdgeMeshSourceTest + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkAutomaticTopologyQuadEdgeMeshSourceTest) +itk_add_test( + NAME + itkBinaryMask3DQuadEdgeMeshSourceTest + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkBinaryMask3DQuadEdgeMeshSourceTest) +itk_add_test( + NAME + itkRegularSphereQuadEdgeMeshSourceTest + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkRegularSphereQuadEdgeMeshSourceTest + ${ITK_TEST_OUTPUT_DIR}/itkRegularSphereMeshQuadEdgeMeshSourceTest.vtk) +itk_add_test( + NAME + itkNormalQuadEdgeMeshFilterTest0 + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkNormalQuadEdgeMeshFilterTest + DATA{${INPUTDATA}/mushroom.vtk} + 0) +itk_add_test( + NAME + itkNormalQuadEdgeMeshFilterTest1 + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkNormalQuadEdgeMeshFilterTest + DATA{${INPUTDATA}/mushroom.vtk} + 1) +itk_add_test( + NAME + itkNormalQuadEdgeMeshFilterTest2 + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkNormalQuadEdgeMeshFilterTest + DATA{${INPUTDATA}/mushroom.vtk} + 2) foreach(area 0 1) - itk_add_test(NAME itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsArea${area}Test - COMMAND ITKQuadEdgeMeshFilteringTestDriver itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsTest - DATA{${INPUTDATA}/genusZeroSurface01.vtk} ${TEMP}/LaplacianDeformationSoftConstraintsOutput_area${area}.vtk ${area}) - itk_add_test(NAME itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsArea${area}Test - COMMAND ITKQuadEdgeMeshFilteringTestDriver itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsTest - DATA{${INPUTDATA}/genusZeroSurface01.vtk} ${TEMP}/LaplacianDeformationHardConstraintsOutput_area${area}.vtk ${area}) + itk_add_test( + NAME + itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsArea${area}Test + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraintsTest + DATA{${INPUTDATA}/genusZeroSurface01.vtk} + ${TEMP}/LaplacianDeformationSoftConstraintsOutput_area${area}.vtk + ${area}) + itk_add_test( + NAME + itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsArea${area}Test + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraintsTest + DATA{${INPUTDATA}/genusZeroSurface01.vtk} + ${TEMP}/LaplacianDeformationHardConstraintsOutput_area${area}.vtk + ${area}) endforeach() foreach(border 0 1) - foreach(coeff 0 1 2 3 4) + foreach( + coeff + 0 + 1 + 2 + 3 + 4) foreach(solver 0 1) - itk_add_test(NAME itkParameterizationQuadEdgeMeshFilterTestb${border}_c${coeff}_s${solver} - COMMAND ITKQuadEdgeMeshFilteringTestDriver - itkParameterizationQuadEdgeMeshFilterTest - DATA{${INPUTDATA}/mushroom.vtk} ${border} ${coeff} ${solver} - ${TEMP}/param_border${border}_coeff${coeff}_solver${solver}.vtk) + itk_add_test( + NAME + itkParameterizationQuadEdgeMeshFilterTestb${border}_c${coeff}_s${solver} + COMMAND + ITKQuadEdgeMeshFilteringTestDriver + itkParameterizationQuadEdgeMeshFilterTest + DATA{${INPUTDATA}/mushroom.vtk} + ${border} + ${coeff} + ${solver} + ${TEMP}/param_border${border}_coeff${coeff}_solver${solver}.vtk) endforeach() endforeach() endforeach() diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkBorderQuadEdgeMeshFilter.wrap b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkBorderQuadEdgeMeshFilter.wrap index d302617dc7e..81b1db472dc 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkBorderQuadEdgeMeshFilter.wrap +++ b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkBorderQuadEdgeMeshFilter.wrap @@ -1,9 +1,9 @@ itk_wrap_include("itkQuadEdgeMesh.h") itk_wrap_class("itk::BorderQuadEdgeMeshFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkCleanQuadEdgeMeshFilter.wrap b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkCleanQuadEdgeMeshFilter.wrap index 000a2e16f38..3297297146b 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkCleanQuadEdgeMeshFilter.wrap +++ b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkCleanQuadEdgeMeshFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkQuadEdgeMesh.h") itk_wrap_class("itk::CleanQuadEdgeMeshFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDelaunayConformingQuadEdgeMeshFilter.wrap b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDelaunayConformingQuadEdgeMeshFilter.wrap index 552d0e302a1..40bced16132 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDelaunayConformingQuadEdgeMeshFilter.wrap +++ b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDelaunayConformingQuadEdgeMeshFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkQuadEdgeMesh.h") itk_wrap_class("itk::DelaunayConformingQuadEdgeMeshFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteCurvatureQuadEdgeMeshFilter.wrap b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteCurvatureQuadEdgeMeshFilter.wrap index 9bf7d224236..ba83bbb9176 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteCurvatureQuadEdgeMeshFilter.wrap +++ b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteCurvatureQuadEdgeMeshFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkQuadEdgeMesh.h") itk_wrap_class("itk::DiscreteCurvatureQuadEdgeMeshFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteCurvatureTensorQuadEdgeMeshFilter.wrap b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteCurvatureTensorQuadEdgeMeshFilter.wrap index 9a2a5879d50..ac1bba2d641 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteCurvatureTensorQuadEdgeMeshFilter.wrap +++ b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteCurvatureTensorQuadEdgeMeshFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkQuadEdgeMesh.h") itk_wrap_class("itk::DiscreteCurvatureTensorQuadEdgeMeshFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteGaussianCurvatureQuadEdgeMeshFilter.wrap b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteGaussianCurvatureQuadEdgeMeshFilter.wrap index 05d45f008d7..85374ee6365 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteGaussianCurvatureQuadEdgeMeshFilter.wrap +++ b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteGaussianCurvatureQuadEdgeMeshFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkQuadEdgeMesh.h") itk_wrap_class("itk::DiscreteGaussianCurvatureQuadEdgeMeshFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteMaximumCurvatureQuadEdgeMeshFilter.wrap b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteMaximumCurvatureQuadEdgeMeshFilter.wrap index 0c21ce20dc4..091f6d22df5 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteMaximumCurvatureQuadEdgeMeshFilter.wrap +++ b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteMaximumCurvatureQuadEdgeMeshFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkQuadEdgeMesh.h") itk_wrap_class("itk::DiscreteMaximumCurvatureQuadEdgeMeshFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteMeanCurvatureQuadEdgeMeshFilter.wrap b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteMeanCurvatureQuadEdgeMeshFilter.wrap index af46c3139ad..3fcb39e101e 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteMeanCurvatureQuadEdgeMeshFilter.wrap +++ b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteMeanCurvatureQuadEdgeMeshFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkQuadEdgeMesh.h") itk_wrap_class("itk::DiscreteMeanCurvatureQuadEdgeMeshFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteMinimumCurvatureQuadEdgeMeshFilter.wrap b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteMinimumCurvatureQuadEdgeMeshFilter.wrap index f591eee449b..c25aaa1e2ba 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteMinimumCurvatureQuadEdgeMeshFilter.wrap +++ b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscreteMinimumCurvatureQuadEdgeMeshFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkQuadEdgeMesh.h") itk_wrap_class("itk::DiscreteMinimumCurvatureQuadEdgeMeshFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter.wrap b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter.wrap index b87f4453c7f..ef3cea75049 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter.wrap +++ b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkQuadEdgeMesh.h") itk_wrap_class("itk::DiscretePrincipalCurvaturesQuadEdgeMeshFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkMatrixCoefficients.wrap b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkMatrixCoefficients.wrap index a32c9564d31..130539ef8ff 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkMatrixCoefficients.wrap +++ b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkMatrixCoefficients.wrap @@ -4,43 +4,43 @@ itk_wrap_include("itkQuadEdgeMesh.h") itk_wrap_include("itkQuadEdgeMeshParamMatrixCoefficients.h") itk_wrap_class("itk::MatrixCoefficients") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::OnesMatrixCoefficients") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::InverseEuclideanDistanceMatrixCoefficients") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::ConformalMatrixCoefficients") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::AuthalicMatrixCoefficients") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::IntrinsicMatrixCoefficients") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::HarmonicMatrixCoefficients") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkSmoothingQuadEdgeMeshFilter.wrap b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkSmoothingQuadEdgeMeshFilter.wrap index 45fe3a70fca..6bce18cb113 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkSmoothingQuadEdgeMeshFilter.wrap +++ b/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkSmoothingQuadEdgeMeshFilter.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkQuadEdgeMesh.h") itk_wrap_class("itk::SmoothingQuadEdgeMeshFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("QEM${ITKM_D}${d}" "itk::QuadEdgeMesh< ${ITKT_D},${d} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Smoothing/itk-module.cmake b/Modules/Filtering/Smoothing/itk-module.cmake index 9508e769708..94b94c1ae65 100644 --- a/Modules/Filtering/Smoothing/itk-module.cmake +++ b/Modules/Filtering/Smoothing/itk-module.cmake @@ -1,17 +1,18 @@ -set(DOCUMENTATION "This module includes the most common image smoothing +set(DOCUMENTATION + "This module includes the most common image smoothing filters. For example, Gaussian and Median filters. You may also find it interesting to look at the \\\\ref ITKAnisotropicSmoothing group of filters.") -itk_module(ITKSmoothing +itk_module( + ITKSmoothing ENABLE_SHARED COMPILE_DEPENDS - ITKConvolution - ITKFFT - ITKImageFunction - ITKImageSources + ITKConvolution + ITKFFT + ITKImageFunction + ITKImageSources TEST_DEPENDS - ITKConvolution - ITKTestKernel + ITKConvolution + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/Smoothing/src/CMakeLists.txt b/Modules/Filtering/Smoothing/src/CMakeLists.txt index 07cda34113d..ec23bfca791 100644 --- a/Modules/Filtering/Smoothing/src/CMakeLists.txt +++ b/Modules/Filtering/Smoothing/src/CMakeLists.txt @@ -1,5 +1,2 @@ -set(ITKSmoothing_SRCS - itkFFTDiscreteGaussianImageFilter.cxx - itkRecursiveGaussianImageFilter.cxx - ) +set(ITKSmoothing_SRCS itkFFTDiscreteGaussianImageFilter.cxx itkRecursiveGaussianImageFilter.cxx) itk_module_add_library(ITKSmoothing ${ITKSmoothing_SRCS}) diff --git a/Modules/Filtering/Smoothing/test/CMakeLists.txt b/Modules/Filtering/Smoothing/test/CMakeLists.txt index 914bdbcb533..bcaea4f8d94 100644 --- a/Modules/Filtering/Smoothing/test/CMakeLists.txt +++ b/Modules/Filtering/Smoothing/test/CMakeLists.txt @@ -1,178 +1,362 @@ itk_module_test() set(ITKSmoothingTests -itkBoxMeanImageFilterTest.cxx -itkBoxSigmaImageFilterTest.cxx -itkDiscreteGaussianImageFilterTest2.cxx -itkFFTDiscreteGaussianImageFilterTest.cxx -itkFFTDiscreteGaussianImageFilterFactoryTest.cxx -itkSmoothingRecursiveGaussianImageFilterTest.cxx -itkSmoothingRecursiveGaussianImageFilterOnVectorImageTest.cxx -itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest.cxx -itkSmoothingRecursiveGaussianImageFilterOnImageAdaptorTest.cxx -itkMeanImageFilterTest.cxx -itkDiscreteGaussianImageFilterTest.cxx -itkMedianImageFilterTest.cxx -itkRecursiveGaussianImageFilterOnTensorsTest.cxx -itkRecursiveGaussianImageFilterOnVectorImageTest.cxx -itkRecursiveGaussianImageFilterTest.cxx -itkRecursiveGaussianScaleSpaceTest1.cxx -) + itkBoxMeanImageFilterTest.cxx + itkBoxSigmaImageFilterTest.cxx + itkDiscreteGaussianImageFilterTest2.cxx + itkFFTDiscreteGaussianImageFilterTest.cxx + itkFFTDiscreteGaussianImageFilterFactoryTest.cxx + itkSmoothingRecursiveGaussianImageFilterTest.cxx + itkSmoothingRecursiveGaussianImageFilterOnVectorImageTest.cxx + itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest.cxx + itkSmoothingRecursiveGaussianImageFilterOnImageAdaptorTest.cxx + itkMeanImageFilterTest.cxx + itkDiscreteGaussianImageFilterTest.cxx + itkMedianImageFilterTest.cxx + itkRecursiveGaussianImageFilterOnTensorsTest.cxx + itkRecursiveGaussianImageFilterOnVectorImageTest.cxx + itkRecursiveGaussianImageFilterTest.cxx + itkRecursiveGaussianScaleSpaceTest1.cxx) -CreateTestDriver(ITKSmoothing "${ITKSmoothing-Test_LIBRARIES}" "${ITKSmoothingTests}") -itk_add_test(NAME itkBoxMeanImageFilterTest3 - COMMAND ITKSmoothingTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkBoxMeanImageFilter3.png} - ${ITK_TEST_OUTPUT_DIR}/itkBoxMeanImageFilter3.png - itkBoxMeanImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBoxMeanImageFilter3.png 3) -itk_add_test(NAME itkBoxMeanImageFilterTest10 - COMMAND ITKSmoothingTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkBoxMeanImageFilter10.png} - ${ITK_TEST_OUTPUT_DIR}/itkBoxMeanImageFilter10.png - itkBoxMeanImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBoxMeanImageFilter10.png 10) -itk_add_test(NAME itkBoxSigmaImageFilterTest3 - COMMAND ITKSmoothingTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkBoxSigmaImageFilter3.png} - ${ITK_TEST_OUTPUT_DIR}/itkBoxSigmaImageFilter3.png - itkBoxSigmaImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBoxSigmaImageFilter3.png 3) -itk_add_test(NAME itkBoxSigmaImageFilterTest10 - COMMAND ITKSmoothingTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkBoxSigmaImageFilter10.png} - ${ITK_TEST_OUTPUT_DIR}/itkBoxSigmaImageFilter10.png - itkBoxSigmaImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkBoxSigmaImageFilter10.png 10) -itk_add_test(NAME itkDiscreteGaussianImageFilterTest2 - COMMAND ITKSmoothingTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/DiscreteGaussianImageFilterTest2_OutputA.mha} - ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilterTest2_OutputA.mha - itkDiscreteGaussianImageFilterTest2 2 3 - DATA{${ITK_DATA_ROOT}/Input/RGBTestImage.tif} - ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilterTest2_OutputA.mha - 1.870829) -itk_add_test(NAME itkSmoothingRecursiveGaussianImageFilterTestNormalizeScalesOn - COMMAND ITKSmoothingTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkSmoothingRecursiveGaussianImageFilterTestNormalizeScalesOn.png - 58ec36acf622fc9c4567f0edd89d2ffa - itkSmoothingRecursiveGaussianImageFilterTest DATA{${ITK_DATA_ROOT}/Input/sf4.png} ${ITK_TEST_OUTPUT_DIR}/itkSmoothingRecursiveGaussianImageFilterTestNormalizeScalesOn.png 1 2.5) -itk_add_test(NAME itkSmoothingRecursiveGaussianImageFilterOnVectorImageTest - COMMAND ITKSmoothingTestDriver itkSmoothingRecursiveGaussianImageFilterOnVectorImageTest) -itk_add_test(NAME itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest - COMMAND ITKSmoothingTestDriver itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest) -itk_add_test(NAME itkSmoothingRecursiveGaussianImageFilterOnImageAdaptorTest - COMMAND ITKSmoothingTestDriver itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest) -itk_add_test(NAME itkMeanImageFilterTest - COMMAND ITKSmoothingTestDriver itkMeanImageFilterTest) -itk_add_test(NAME itkDiscreteGaussianImageFilterTest1a - COMMAND ITKSmoothingTestDriver itkDiscreteGaussianImageFilterTest 1) -itk_add_test(NAME itkDiscreteGaussianImageFilterTest1b - COMMAND ITKSmoothingTestDriver itkDiscreteGaussianImageFilterTest 0) +createtestdriver(ITKSmoothing "${ITKSmoothing-Test_LIBRARIES}" "${ITKSmoothingTests}") +itk_add_test( + NAME + itkBoxMeanImageFilterTest3 + COMMAND + ITKSmoothingTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkBoxMeanImageFilter3.png} + ${ITK_TEST_OUTPUT_DIR}/itkBoxMeanImageFilter3.png + itkBoxMeanImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBoxMeanImageFilter3.png + 3) +itk_add_test( + NAME + itkBoxMeanImageFilterTest10 + COMMAND + ITKSmoothingTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkBoxMeanImageFilter10.png} + ${ITK_TEST_OUTPUT_DIR}/itkBoxMeanImageFilter10.png + itkBoxMeanImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBoxMeanImageFilter10.png + 10) +itk_add_test( + NAME + itkBoxSigmaImageFilterTest3 + COMMAND + ITKSmoothingTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkBoxSigmaImageFilter3.png} + ${ITK_TEST_OUTPUT_DIR}/itkBoxSigmaImageFilter3.png + itkBoxSigmaImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBoxSigmaImageFilter3.png + 3) +itk_add_test( + NAME + itkBoxSigmaImageFilterTest10 + COMMAND + ITKSmoothingTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Filtering/itkBoxSigmaImageFilter10.png} + ${ITK_TEST_OUTPUT_DIR}/itkBoxSigmaImageFilter10.png + itkBoxSigmaImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkBoxSigmaImageFilter10.png + 10) +itk_add_test( + NAME + itkDiscreteGaussianImageFilterTest2 + COMMAND + ITKSmoothingTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/DiscreteGaussianImageFilterTest2_OutputA.mha} + ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilterTest2_OutputA.mha + itkDiscreteGaussianImageFilterTest2 + 2 + 3 + DATA{${ITK_DATA_ROOT}/Input/RGBTestImage.tif} + ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilterTest2_OutputA.mha + 1.870829) +itk_add_test( + NAME + itkSmoothingRecursiveGaussianImageFilterTestNormalizeScalesOn + COMMAND + ITKSmoothingTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkSmoothingRecursiveGaussianImageFilterTestNormalizeScalesOn.png + 58ec36acf622fc9c4567f0edd89d2ffa + itkSmoothingRecursiveGaussianImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/sf4.png} + ${ITK_TEST_OUTPUT_DIR}/itkSmoothingRecursiveGaussianImageFilterTestNormalizeScalesOn.png + 1 + 2.5) +itk_add_test( + NAME + itkSmoothingRecursiveGaussianImageFilterOnVectorImageTest + COMMAND + ITKSmoothingTestDriver + itkSmoothingRecursiveGaussianImageFilterOnVectorImageTest) +itk_add_test( + NAME + itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest + COMMAND + ITKSmoothingTestDriver + itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest) +itk_add_test( + NAME + itkSmoothingRecursiveGaussianImageFilterOnImageAdaptorTest + COMMAND + ITKSmoothingTestDriver + itkSmoothingRecursiveGaussianImageFilterOnImageOfVectorTest) +itk_add_test( + NAME + itkMeanImageFilterTest + COMMAND + ITKSmoothingTestDriver + itkMeanImageFilterTest) +itk_add_test( + NAME + itkDiscreteGaussianImageFilterTest1a + COMMAND + ITKSmoothingTestDriver + itkDiscreteGaussianImageFilterTest + 1) +itk_add_test( + NAME + itkDiscreteGaussianImageFilterTest1b + COMMAND + ITKSmoothingTestDriver + itkDiscreteGaussianImageFilterTest + 0) # Use equivalent input parameters to compare standard and FFT # procedures to a common baseline for equivalent output -itk_add_test(NAME itkDiscreteGaussianImageFilter2DComparisonTest - COMMAND ITKSmoothingTestDriver - --compare DATA{Baseline/DiscreteGaussianImageFilterComparisonTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilterComparisonTestOutput.mha - itkDiscreteGaussianImageFilterTest2 2 1 - DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilterComparisonTestOutput.mha - 3.5 0.05 35) -itk_add_test(NAME itkFFTDiscreteGaussianImageFilter2DComparisonTest - COMMAND ITKSmoothingTestDriver - --compare DATA{Baseline/DiscreteGaussianImageFilterComparisonTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilterComparisonTestOutput.mha - itkFFTDiscreteGaussianImageFilterTest 2 - DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilterComparisonTestOutput.mha - 3.5 0.05 35 2 0) -itk_add_test(NAME itkDiscreteGaussianImageFilter3DComparisonTest - COMMAND ITKSmoothingTestDriver - --compare DATA{Baseline/DiscreteGaussianImageFilter3DComparisonTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilter3DComparisonTestOutput.mha - itkDiscreteGaussianImageFilterTest2 3 1 - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilter3DComparisonTestOutput.mha - 5.0 0.03 25) -itk_add_test(NAME itkFFTDiscreteGaussianImageFilter3DComparisonTest - COMMAND ITKSmoothingTestDriver - --compare DATA{Baseline/DiscreteGaussianImageFilter3DComparisonTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilter3DComparisonTestOutput.mha - itkFFTDiscreteGaussianImageFilterTest 3 - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilter3DComparisonTestOutput.mha - 5.0 0.03 25 3 0) +itk_add_test( + NAME + itkDiscreteGaussianImageFilter2DComparisonTest + COMMAND + ITKSmoothingTestDriver + --compare + DATA{Baseline/DiscreteGaussianImageFilterComparisonTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilterComparisonTestOutput.mha + itkDiscreteGaussianImageFilterTest2 + 2 + 1 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilterComparisonTestOutput.mha + 3.5 + 0.05 + 35) +itk_add_test( + NAME + itkFFTDiscreteGaussianImageFilter2DComparisonTest + COMMAND + ITKSmoothingTestDriver + --compare + DATA{Baseline/DiscreteGaussianImageFilterComparisonTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilterComparisonTestOutput.mha + itkFFTDiscreteGaussianImageFilterTest + 2 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilterComparisonTestOutput.mha + 3.5 + 0.05 + 35 + 2 + 0) +itk_add_test( + NAME + itkDiscreteGaussianImageFilter3DComparisonTest + COMMAND + ITKSmoothingTestDriver + --compare + DATA{Baseline/DiscreteGaussianImageFilter3DComparisonTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilter3DComparisonTestOutput.mha + itkDiscreteGaussianImageFilterTest2 + 3 + 1 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilter3DComparisonTestOutput.mha + 5.0 + 0.03 + 25) +itk_add_test( + NAME + itkFFTDiscreteGaussianImageFilter3DComparisonTest + COMMAND + ITKSmoothingTestDriver + --compare + DATA{Baseline/DiscreteGaussianImageFilter3DComparisonTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilter3DComparisonTestOutput.mha + itkFFTDiscreteGaussianImageFilterTest + 3 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilter3DComparisonTestOutput.mha + 5.0 + 0.03 + 25 + 3 + 0) # Compare results on images with adjusted origin and spacing -itk_add_test(NAME itkDiscreteGaussianImageFilterNonunitImageComparisonTest - COMMAND ITKSmoothingTestDriver - --compare DATA{Baseline/DiscreteGaussianImageFilterNonunitImageComparisonTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilterNonunitImageComparisonTestOutput.mha - itkDiscreteGaussianImageFilterTest2 2 1 - DATA{Input/itkDiscreteGaussianImageFilterTestNonNullOriginInput.mha} - ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilterNonunitImageComparisonTestOutput.mha - 10.0 0.03 31 2) -itk_add_test(NAME itkFFTDiscreteGaussianImageFilterNonunitImageComparisonTest - COMMAND ITKSmoothingTestDriver - --compare DATA{Baseline/DiscreteGaussianImageFilterNonunitImageComparisonTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilterNonunitImageComparisonTestOutput.mha - itkFFTDiscreteGaussianImageFilterTest 2 - DATA{Input/itkDiscreteGaussianImageFilterTestNonNullOriginInput.mha} - ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilterNonunitImageComparisonTestOutput.mha - 10.0 0.03 31 2 0) +itk_add_test( + NAME + itkDiscreteGaussianImageFilterNonunitImageComparisonTest + COMMAND + ITKSmoothingTestDriver + --compare + DATA{Baseline/DiscreteGaussianImageFilterNonunitImageComparisonTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilterNonunitImageComparisonTestOutput.mha + itkDiscreteGaussianImageFilterTest2 + 2 + 1 + DATA{Input/itkDiscreteGaussianImageFilterTestNonNullOriginInput.mha} + ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilterNonunitImageComparisonTestOutput.mha + 10.0 + 0.03 + 31 + 2) +itk_add_test( + NAME + itkFFTDiscreteGaussianImageFilterNonunitImageComparisonTest + COMMAND + ITKSmoothingTestDriver + --compare + DATA{Baseline/DiscreteGaussianImageFilterNonunitImageComparisonTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilterNonunitImageComparisonTestOutput.mha + itkFFTDiscreteGaussianImageFilterTest + 2 + DATA{Input/itkDiscreteGaussianImageFilterTestNonNullOriginInput.mha} + ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilterNonunitImageComparisonTestOutput.mha + 10.0 + 0.03 + 31 + 2 + 0) # Comparing results of lower-dimensionality smoothing -itk_add_test(NAME itkDiscreteGaussianImageFilter3DComparisonTest2 - COMMAND ITKSmoothingTestDriver - --compare DATA{Baseline/DiscreteGaussianImageFilter3DComparisonTestOutput2.mha} - ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilter3DComparisonTestOutput2.mha - itkDiscreteGaussianImageFilterTest2 3 1 - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilter3DComparisonTestOutput2.mha - 4.0 0.02 31 2) -itk_add_test(NAME itkFFTDiscreteGaussianImageFilter3DComparisonTest2 - COMMAND ITKSmoothingTestDriver - --compare DATA{Baseline/DiscreteGaussianImageFilter3DComparisonTestOutput2.mha} - ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilter3DComparisonTestOutput2.mha - itkFFTDiscreteGaussianImageFilterTest 3 - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilter3DComparisonTestOutput2.mha - 4.0 0.03 31 2 0) +itk_add_test( + NAME + itkDiscreteGaussianImageFilter3DComparisonTest2 + COMMAND + ITKSmoothingTestDriver + --compare + DATA{Baseline/DiscreteGaussianImageFilter3DComparisonTestOutput2.mha} + ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilter3DComparisonTestOutput2.mha + itkDiscreteGaussianImageFilterTest2 + 3 + 1 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/DiscreteGaussianImageFilter3DComparisonTestOutput2.mha + 4.0 + 0.02 + 31 + 2) +itk_add_test( + NAME + itkFFTDiscreteGaussianImageFilter3DComparisonTest2 + COMMAND + ITKSmoothingTestDriver + --compare + DATA{Baseline/DiscreteGaussianImageFilter3DComparisonTestOutput2.mha} + ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilter3DComparisonTestOutput2.mha + itkFFTDiscreteGaussianImageFilterTest + 3 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilter3DComparisonTestOutput2.mha + 4.0 + 0.03 + 31 + 2 + 0) # Test smoothing with GaussianImageSource -itk_add_test(NAME itkFFTDiscreteGaussianImageFilterImageSourceTest - COMMAND ITKSmoothingTestDriver - --compare DATA{Baseline/FFTDiscreteGaussianImageFilterTestImageSourceOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilterTestImageSourceOutput.mha - itkFFTDiscreteGaussianImageFilterTest 2 - DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilterTestImageSourceOutput.mha - 3.5 0.05 35 2 1) -itk_add_test(NAME itkFFTDiscreteGaussianImageFilterKernelDimensionalityTest - COMMAND ITKSmoothingTestDriver - --compare DATA{Baseline/FFTDiscreteGaussianImageFilterTestKernelDimensionalityOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilterTestKernelDimensionalityOutput.mha - itkFFTDiscreteGaussianImageFilterTest 2 - DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilterTestKernelDimensionalityOutput.mha - 1.2 0.25 11 1 1) -itk_add_test(NAME itkFFTDiscreteGaussianImageFilter3DImageSourceTest - COMMAND ITKSmoothingTestDriver - --compare DATA{Baseline/FFTDiscreteGaussianImageFilter3DImageSourceTestOutput.mha} - ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilter3DImageSourceTestOutput.mha - itkFFTDiscreteGaussianImageFilterTest 3 - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilter3DImageSourceTestOutput.mha - 6.0 0.10 25 3 1) -itk_add_test(NAME itkFFTDiscreteGaussianImageFilterFactoryTest - COMMAND ITKSmoothingTestDriver itkFFTDiscreteGaussianImageFilterFactoryTest) -itk_add_test(NAME itkMedianImageFilterTest - COMMAND ITKSmoothingTestDriver itkMedianImageFilterTest) -itk_add_test(NAME itkRecursiveGaussianImageFilterOnTensorsTest - COMMAND ITKSmoothingTestDriver itkRecursiveGaussianImageFilterOnTensorsTest) -itk_add_test(NAME itkRecursiveGaussianImageFilterOnVectorImageTest - COMMAND ITKSmoothingTestDriver itkRecursiveGaussianImageFilterOnVectorImageTest) -itk_add_test(NAME itkRecursiveGaussianImageFilterTest - COMMAND ITKSmoothingTestDriver itkRecursiveGaussianImageFilterTest) -itk_add_test(NAME itkRecursiveGaussianScaleSpaceTest1 - COMMAND ITKSmoothingTestDriver - itkRecursiveGaussianScaleSpaceTest1) +itk_add_test( + NAME + itkFFTDiscreteGaussianImageFilterImageSourceTest + COMMAND + ITKSmoothingTestDriver + --compare + DATA{Baseline/FFTDiscreteGaussianImageFilterTestImageSourceOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilterTestImageSourceOutput.mha + itkFFTDiscreteGaussianImageFilterTest + 2 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilterTestImageSourceOutput.mha + 3.5 + 0.05 + 35 + 2 + 1) +itk_add_test( + NAME + itkFFTDiscreteGaussianImageFilterKernelDimensionalityTest + COMMAND + ITKSmoothingTestDriver + --compare + DATA{Baseline/FFTDiscreteGaussianImageFilterTestKernelDimensionalityOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilterTestKernelDimensionalityOutput.mha + itkFFTDiscreteGaussianImageFilterTest + 2 + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilterTestKernelDimensionalityOutput.mha + 1.2 + 0.25 + 11 + 1 + 1) +itk_add_test( + NAME + itkFFTDiscreteGaussianImageFilter3DImageSourceTest + COMMAND + ITKSmoothingTestDriver + --compare + DATA{Baseline/FFTDiscreteGaussianImageFilter3DImageSourceTestOutput.mha} + ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilter3DImageSourceTestOutput.mha + itkFFTDiscreteGaussianImageFilterTest + 3 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/FFTDiscreteGaussianImageFilter3DImageSourceTestOutput.mha + 6.0 + 0.10 + 25 + 3 + 1) +itk_add_test( + NAME + itkFFTDiscreteGaussianImageFilterFactoryTest + COMMAND + ITKSmoothingTestDriver + itkFFTDiscreteGaussianImageFilterFactoryTest) +itk_add_test( + NAME + itkMedianImageFilterTest + COMMAND + ITKSmoothingTestDriver + itkMedianImageFilterTest) +itk_add_test( + NAME + itkRecursiveGaussianImageFilterOnTensorsTest + COMMAND + ITKSmoothingTestDriver + itkRecursiveGaussianImageFilterOnTensorsTest) +itk_add_test( + NAME + itkRecursiveGaussianImageFilterOnVectorImageTest + COMMAND + ITKSmoothingTestDriver + itkRecursiveGaussianImageFilterOnVectorImageTest) +itk_add_test( + NAME + itkRecursiveGaussianImageFilterTest + COMMAND + ITKSmoothingTestDriver + itkRecursiveGaussianImageFilterTest) +itk_add_test( + NAME + itkRecursiveGaussianScaleSpaceTest1 + COMMAND + ITKSmoothingTestDriver + itkRecursiveGaussianScaleSpaceTest1) -set(ITKSmoothingGTests - itkMeanImageFilterGTest.cxx - itkMedianImageFilterGTest.cxx -) -CreateGoogleTestDriver(ITKSmoothing "${ITKSmoothing-Test_LIBRARIES}" "${ITKSmoothingGTests}") +set(ITKSmoothingGTests itkMeanImageFilterGTest.cxx itkMedianImageFilterGTest.cxx) +creategoogletestdriver(ITKSmoothing "${ITKSmoothing-Test_LIBRARIES}" "${ITKSmoothingGTests}") diff --git a/Modules/Filtering/Smoothing/wrapping/itkBinomialBlurImageFilter.wrap b/Modules/Filtering/Smoothing/wrapping/itkBinomialBlurImageFilter.wrap index 83dec9a39a1..f1a1e994973 100644 --- a/Modules/Filtering/Smoothing/wrapping/itkBinomialBlurImageFilter.wrap +++ b/Modules/Filtering/Smoothing/wrapping/itkBinomialBlurImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BinomialBlurImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/Smoothing/wrapping/itkDiscreteGaussianImageFilter.wrap b/Modules/Filtering/Smoothing/wrapping/itkDiscreteGaussianImageFilter.wrap index 5b3eb75f43e..cb57dc70906 100644 --- a/Modules/Filtering/Smoothing/wrapping/itkDiscreteGaussianImageFilter.wrap +++ b/Modules/Filtering/Smoothing/wrapping/itkDiscreteGaussianImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::DiscreteGaussianImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/Smoothing/wrapping/itkFFTDiscreteGaussianImageFilter.wrap b/Modules/Filtering/Smoothing/wrapping/itkFFTDiscreteGaussianImageFilter.wrap index 7992fd06f48..c0e16696142 100644 --- a/Modules/Filtering/Smoothing/wrapping/itkFFTDiscreteGaussianImageFilter.wrap +++ b/Modules/Filtering/Smoothing/wrapping/itkFFTDiscreteGaussianImageFilter.wrap @@ -4,5 +4,5 @@ itk_wrap_include("itkFFTDiscreteGaussianImageFilter.h") itk_wrap_simple_class("itk::FFTDiscreteGaussianImageFilterEnums") itk_wrap_class("itk::FFTDiscreteGaussianImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/Smoothing/wrapping/itkMeanImageFilter.wrap b/Modules/Filtering/Smoothing/wrapping/itkMeanImageFilter.wrap index c197e122736..60a677510b7 100644 --- a/Modules/Filtering/Smoothing/wrapping/itkMeanImageFilter.wrap +++ b/Modules/Filtering/Smoothing/wrapping/itkMeanImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MeanImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/Smoothing/wrapping/itkMedianImageFilter.wrap b/Modules/Filtering/Smoothing/wrapping/itkMedianImageFilter.wrap index 8ff2cc4d6b0..bde523fbd20 100644 --- a/Modules/Filtering/Smoothing/wrapping/itkMedianImageFilter.wrap +++ b/Modules/Filtering/Smoothing/wrapping/itkMedianImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MedianImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/Smoothing/wrapping/itkRecursiveGaussianImageFilter.wrap b/Modules/Filtering/Smoothing/wrapping/itkRecursiveGaussianImageFilter.wrap index fe97a8deb52..b6eca23eefe 100644 --- a/Modules/Filtering/Smoothing/wrapping/itkRecursiveGaussianImageFilter.wrap +++ b/Modules/Filtering/Smoothing/wrapping/itkRecursiveGaussianImageFilter.wrap @@ -4,5 +4,5 @@ itk_wrap_include("itkRecursiveGaussianImageFilter.h") itk_wrap_simple_class("itk::RecursiveGaussianImageFilterEnums") itk_wrap_class("itk::RecursiveGaussianImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/Smoothing/wrapping/itkSmoothingRecursiveGaussianImageFilter.wrap b/Modules/Filtering/Smoothing/wrapping/itkSmoothingRecursiveGaussianImageFilter.wrap index 059014daa1e..1ec251c6110 100644 --- a/Modules/Filtering/Smoothing/wrapping/itkSmoothingRecursiveGaussianImageFilter.wrap +++ b/Modules/Filtering/Smoothing/wrapping/itkSmoothingRecursiveGaussianImageFilter.wrap @@ -2,5 +2,5 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkSmoothingRecursiveGaussianImageFilter.h") itk_wrap_class("itk::SmoothingRecursiveGaussianImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Filtering/Smoothing/wrapping/test/CMakeLists.txt b/Modules/Filtering/Smoothing/wrapping/test/CMakeLists.txt index f914e18f6fd..e59e9a1d5e3 100644 --- a/Modules/Filtering/Smoothing/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/Smoothing/wrapping/test/CMakeLists.txt @@ -1,50 +1,69 @@ set(test_input_dir ${itk-module_SOURCE_DIR}/test/Input) # some tests will fail if dim=2 and unsigned short are not wrapped -list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) -if(ITK_WRAP_PYTHON AND ITK_WRAP_unsigned_char AND wrap_2_index GREATER -1) - itk_python_add_test(NAME PythonMeanImageFilterTest +list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) +if(ITK_WRAP_PYTHON + AND ITK_WRAP_unsigned_char + AND wrap_2_index GREATER -1) + itk_python_add_test( + NAME + PythonMeanImageFilterTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonMeanImageFilterTest.png - DATA{Baseline/PythonMeanImageFilterTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/MeanImageFilterTest.py - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/PythonMeanImageFilterTest.png - 3 - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonMeanImageFilterTest.png + DATA{Baseline/PythonMeanImageFilterTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/MeanImageFilterTest.py + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/PythonMeanImageFilterTest.png + 3) - itk_python_add_test(NAME PythonMeanImageFilterFunctionCallTest + itk_python_add_test( + NAME + PythonMeanImageFilterFunctionCallTest TEST_DRIVER_ARGS - --compare - ${ITK_TEST_OUTPUT_DIR}/PythonMeanImageFilterFunctionCallTest.png - DATA{Baseline/PythonMeanImageFilterFunctionCallTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/MeanImageFilterFunctionCallTest.py - DATA{${test_input_dir}/cthead1UC.png} - ${ITK_TEST_OUTPUT_DIR}/PythonMeanImageFilterFunctionCallTest.png - 3 - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonMeanImageFilterFunctionCallTest.png + DATA{Baseline/PythonMeanImageFilterFunctionCallTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/MeanImageFilterFunctionCallTest.py + DATA{${test_input_dir}/cthead1UC.png} + ${ITK_TEST_OUTPUT_DIR}/PythonMeanImageFilterFunctionCallTest.png + 3) - itk_python_add_test(NAME PythonMedianImageFilterTest + itk_python_add_test( + NAME + PythonMedianImageFilterTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonMedianImageFilterTest.png - DATA{Baseline/PythonMedianImageFilterTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/MedianImageFilterTest.py + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonMedianImageFilterTest.png + DATA{Baseline/PythonMedianImageFilterTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/MedianImageFilterTest.py DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/PythonMedianImageFilterTest.png - 3 - ) + ${ITK_TEST_OUTPUT_DIR}/PythonMedianImageFilterTest.png + 3) if(ITK_WRAP_DOC) - itk_python_add_test(NAME PythonMedianImageFilterFunctionalDocumentationTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/MedianImageFilterFunctionalDocumentationTest.py - ) + itk_python_add_test( + NAME + PythonMedianImageFilterFunctionalDocumentationTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/MedianImageFilterFunctionalDocumentationTest.py) endif() - itk_python_add_test(NAME PythonAutoPipelineTest + itk_python_add_test( + NAME + PythonAutoPipelineTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonAutoPipelineTest.png - DATA{Baseline/PythonMedianImageFilterTest.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/PythonAutoPipelineTest.py + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonAutoPipelineTest.png + DATA{Baseline/PythonMedianImageFilterTest.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/PythonAutoPipelineTest.py DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/PythonAutoPipelineTest.png - 3 - ) + ${ITK_TEST_OUTPUT_DIR}/PythonAutoPipelineTest.png + 3) endif() diff --git a/Modules/Filtering/SpatialFunction/itk-module.cmake b/Modules/Filtering/SpatialFunction/itk-module.cmake index 374191e9440..1f8d9e3dfda 100644 --- a/Modules/Filtering/SpatialFunction/itk-module.cmake +++ b/Modules/Filtering/SpatialFunction/itk-module.cmake @@ -1,13 +1,14 @@ -set(DOCUMENTATION "This module contains filters related to the use of spatial +set(DOCUMENTATION + "This module contains filters related to the use of spatial functions. The spatial function classes implement the concept of defining regions of space, typically as masks. You will find here the filter that can take a spatial function, and rasterize it into the grid of an image.") -itk_module(ITKSpatialFunction +itk_module( + ITKSpatialFunction COMPILE_DEPENDS - ITKImageFunction + ITKImageFunction TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Filtering/SpatialFunction/test/CMakeLists.txt b/Modules/Filtering/SpatialFunction/test/CMakeLists.txt index 8156b3b3835..16347c0f7c4 100644 --- a/Modules/Filtering/SpatialFunction/test/CMakeLists.txt +++ b/Modules/Filtering/SpatialFunction/test/CMakeLists.txt @@ -1,9 +1,11 @@ itk_module_test() -set(ITKSpatialFunctionTests -itkSpatialFunctionImageEvaluatorFilterTest.cxx -) +set(ITKSpatialFunctionTests itkSpatialFunctionImageEvaluatorFilterTest.cxx) -CreateTestDriver(ITKSpatialFunction "${ITKSpatialFunction-Test_LIBRARIES}" "${ITKSpatialFunctionTests}") +createtestdriver(ITKSpatialFunction "${ITKSpatialFunction-Test_LIBRARIES}" "${ITKSpatialFunctionTests}") -itk_add_test(NAME itkSpatialFunctionImageEvaluatorFilterTest - COMMAND ITKSpatialFunctionTestDriver itkSpatialFunctionImageEvaluatorFilterTest) +itk_add_test( + NAME + itkSpatialFunctionImageEvaluatorFilterTest + COMMAND + ITKSpatialFunctionTestDriver + itkSpatialFunctionImageEvaluatorFilterTest) diff --git a/Modules/Filtering/Thresholding/itk-module.cmake b/Modules/Filtering/Thresholding/itk-module.cmake index 70711b6874b..893f99b1881 100644 --- a/Modules/Filtering/Thresholding/itk-module.cmake +++ b/Modules/Filtering/Thresholding/itk-module.cmake @@ -1,19 +1,20 @@ -set(DOCUMENTATION "This module contains multiple variations of image +set(DOCUMENTATION + "This module contains multiple variations of image thresholding filters. In addition to the classical binary thresholding, you will find here the thresholding filters based on the Otsu criterion, both for single and multiple thresholds.") -itk_module(ITKThresholding +itk_module( + ITKThresholding DEPENDS - ITKImageIntensity + ITKImageIntensity COMPILE_DEPENDS - ITKImageStatistics + ITKImageStatistics TEST_DEPENDS - ITKTestKernel - ITKSignedDistanceFunction + ITKTestKernel + ITKSignedDistanceFunction DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") # Extra test dependency on ITKSignedDistanceFunction is introduced by itkBinaryThresholdSpatialFunctionTest. # Extra test dependency on ITKSmoothing is introduced by itkBinaryThresholdProjectionImageFilterTest. diff --git a/Modules/Filtering/Thresholding/test/CMakeLists.txt b/Modules/Filtering/Thresholding/test/CMakeLists.txt index d6b5680178d..bce04f445c3 100644 --- a/Modules/Filtering/Thresholding/test/CMakeLists.txt +++ b/Modules/Filtering/Thresholding/test/CMakeLists.txt @@ -1,423 +1,1029 @@ itk_module_test() set(ITKThresholdingTests -itkBinaryThresholdImageFilterTest2.cxx -itkBinaryThresholdImageFilterTest.cxx -itkBinaryThresholdProjectionImageFilterTest.cxx -itkBinaryThresholdSpatialFunctionTest.cxx -itkHuangThresholdImageFilterTest.cxx -itkIntermodesThresholdImageFilterTest.cxx -itkIsoDataThresholdImageFilterTest.cxx -itkKittlerIllingworthThresholdImageFilterTest.cxx -itkLiThresholdImageFilterTest.cxx -itkMaximumEntropyThresholdImageFilterTest.cxx -itkMomentsThresholdImageFilterTest.cxx -itkOtsuMultipleThresholdsCalculatorTest.cxx -itkOtsuMultipleThresholdsCalculatorTest2.cxx -itkOtsuMultipleThresholdsImageFilterTest.cxx -#itkOtsuThresholdCalculatorVersusOtsuMultipleThresholdsCalculatorTest.cxx -itkOtsuThresholdCalculatorTest.cxx -itkOtsuThresholdImageFilterTest.cxx -itkRenyiEntropyThresholdImageFilterTest.cxx -itkShanbhagThresholdImageFilterTest.cxx -itkThresholdImageFilterTest.cxx -itkThresholdLabelerImageFilterTest.cxx -itkTriangleThresholdImageFilterTest.cxx -itkYenThresholdImageFilterTest.cxx -itkHuangMaskedThresholdImageFilterTest.cxx -itkIntermodesMaskedThresholdImageFilterTest.cxx -itkIsoDataMaskedThresholdImageFilterTest.cxx -itkKittlerIllingworthMaskedThresholdImageFilterTest.cxx -itkLiMaskedThresholdImageFilterTest.cxx -itkMaximumEntropyMaskedThresholdImageFilterTest.cxx -itkMomentsMaskedThresholdImageFilterTest.cxx -itkOtsuMaskedThresholdImageFilterTest.cxx -itkRenyiEntropyMaskedThresholdImageFilterTest.cxx -itkShanbhagMaskedThresholdImageFilterTest.cxx -itkTriangleMaskedThresholdImageFilterTest.cxx -itkYenMaskedThresholdImageFilterTest.cxx -itkKappaSigmaThresholdImageCalculatorTest.cxx -itkKappaSigmaThresholdImageFilterTest.cxx -) - -CreateTestDriver(ITKThresholding "${ITKThresholding-Test_LIBRARIES}" "${ITKThresholdingTests}") - -itk_add_test(NAME itkOtsuThresholdCalculatorTest - COMMAND ITKThresholdingTestDriver itkOtsuThresholdCalculatorTest) - -itk_add_test(NAME itkOtsuMultipleThresholdsImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkOtsuMultipleThresholdsImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest.png - itkOtsuMultipleThresholdsImageFilterTest DATA{${ITK_DATA_ROOT}/Input/peppers.png} ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest.png 64 3 2 0 1) - -itk_add_test(NAME itkThresholdLabelerImageFilterTest - COMMAND ITKThresholdingTestDriver itkThresholdLabelerImageFilterTest) -itk_add_test(NAME itkBinaryThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver itkBinaryThresholdImageFilterTest) -itk_add_test(NAME itkThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver itkThresholdImageFilterTest) -itk_add_test(NAME itkOtsuMultipleThresholdsCalculatorTest1 - COMMAND ITKThresholdingTestDriver itkOtsuMultipleThresholdsCalculatorTest 0 0) -itk_add_test(NAME itkOtsuMultipleThresholdsCalculatorTest2 - COMMAND ITKThresholdingTestDriver itkOtsuMultipleThresholdsCalculatorTest 1 0) -itk_add_test(NAME itkBinaryThresholdImageFilterTest2 - COMMAND ITKThresholdingTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/BinaryThresholdImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/BinaryThresholdImageFilterTest2.png - itkBinaryThresholdImageFilterTest2 DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0076.dcm} ${ITK_TEST_OUTPUT_DIR}/BinaryThresholdImageFilterTest2.png) -itk_add_test(NAME itkBinaryThresholdProjectionImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeBinaryThresholdProjection.png} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeBinaryThresholdProjection.png - itkBinaryThresholdProjectionImageFilterTest DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeBinaryThresholdProjection.png 100 255 0) -itk_add_test(NAME itkBinaryThresholdSpatialFunctionTest - COMMAND ITKThresholdingTestDriver itkBinaryThresholdSpatialFunctionTest) - -itk_add_test(NAME itkHuangThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkHuangThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkHuangThresholdImageFilterTest.png - itkHuangThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkHuangThresholdImageFilterTest.png 256 1 19) -itk_add_test(NAME itkHuangThresholdImageFilterTestNoAutoMinMax - COMMAND ITKThresholdingTestDriver - --compare-MD5 DATA{Baseline/itkHuangThresholdImageFilterTestNoAutoMinMax.png} - fdcefb74090f63114d811e92f0f5836b - itkHuangThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkHuangThresholdImageFilterTestNoAutoMinMax.png 32 0 -31744) - -itk_add_test(NAME itkHuangMaskedThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkHuangMaskedThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkHuangMaskedThresholdImageFilterTest.png - itkHuangMaskedThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} ${ITK_TEST_OUTPUT_DIR}/itkHuangMaskedThresholdImageFilterTest.png 1 255 239) - -itk_add_test(NAME itkIntermodesThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkIntermodesThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkIntermodesThresholdImageFilterTest.png - itkIntermodesThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkIntermodesThresholdImageFilterTest.png 256 1 1000 1 76) -itk_add_test(NAME itkIntermodesThresholdImageFilterTestNoInterMode - COMMAND ITKThresholdingTestDriver - --compare-MD5 DATA{Baseline/itkIntermodesThresholdImageFilterTestNoInterMode.png} - eed45f177050894e50ec1be5bc6bd4fa - itkIntermodesThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkIntermodesThresholdImageFilterTestNoInterMode.png 32 1 2000 0 75) + itkBinaryThresholdImageFilterTest2.cxx + itkBinaryThresholdImageFilterTest.cxx + itkBinaryThresholdProjectionImageFilterTest.cxx + itkBinaryThresholdSpatialFunctionTest.cxx + itkHuangThresholdImageFilterTest.cxx + itkIntermodesThresholdImageFilterTest.cxx + itkIsoDataThresholdImageFilterTest.cxx + itkKittlerIllingworthThresholdImageFilterTest.cxx + itkLiThresholdImageFilterTest.cxx + itkMaximumEntropyThresholdImageFilterTest.cxx + itkMomentsThresholdImageFilterTest.cxx + itkOtsuMultipleThresholdsCalculatorTest.cxx + itkOtsuMultipleThresholdsCalculatorTest2.cxx + itkOtsuMultipleThresholdsImageFilterTest.cxx + #itkOtsuThresholdCalculatorVersusOtsuMultipleThresholdsCalculatorTest.cxx + itkOtsuThresholdCalculatorTest.cxx + itkOtsuThresholdImageFilterTest.cxx + itkRenyiEntropyThresholdImageFilterTest.cxx + itkShanbhagThresholdImageFilterTest.cxx + itkThresholdImageFilterTest.cxx + itkThresholdLabelerImageFilterTest.cxx + itkTriangleThresholdImageFilterTest.cxx + itkYenThresholdImageFilterTest.cxx + itkHuangMaskedThresholdImageFilterTest.cxx + itkIntermodesMaskedThresholdImageFilterTest.cxx + itkIsoDataMaskedThresholdImageFilterTest.cxx + itkKittlerIllingworthMaskedThresholdImageFilterTest.cxx + itkLiMaskedThresholdImageFilterTest.cxx + itkMaximumEntropyMaskedThresholdImageFilterTest.cxx + itkMomentsMaskedThresholdImageFilterTest.cxx + itkOtsuMaskedThresholdImageFilterTest.cxx + itkRenyiEntropyMaskedThresholdImageFilterTest.cxx + itkShanbhagMaskedThresholdImageFilterTest.cxx + itkTriangleMaskedThresholdImageFilterTest.cxx + itkYenMaskedThresholdImageFilterTest.cxx + itkKappaSigmaThresholdImageCalculatorTest.cxx + itkKappaSigmaThresholdImageFilterTest.cxx) + +createtestdriver(ITKThresholding "${ITKThresholding-Test_LIBRARIES}" "${ITKThresholdingTests}") + +itk_add_test( + NAME + itkOtsuThresholdCalculatorTest + COMMAND + ITKThresholdingTestDriver + itkOtsuThresholdCalculatorTest) + +itk_add_test( + NAME + itkOtsuMultipleThresholdsImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkOtsuMultipleThresholdsImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest.png + itkOtsuMultipleThresholdsImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/peppers.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest.png + 64 + 3 + 2 + 0 + 1) + +itk_add_test( + NAME + itkThresholdLabelerImageFilterTest + COMMAND + ITKThresholdingTestDriver + itkThresholdLabelerImageFilterTest) +itk_add_test( + NAME + itkBinaryThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + itkBinaryThresholdImageFilterTest) +itk_add_test( + NAME + itkThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + itkThresholdImageFilterTest) +itk_add_test( + NAME + itkOtsuMultipleThresholdsCalculatorTest1 + COMMAND + ITKThresholdingTestDriver + itkOtsuMultipleThresholdsCalculatorTest + 0 + 0) +itk_add_test( + NAME + itkOtsuMultipleThresholdsCalculatorTest2 + COMMAND + ITKThresholdingTestDriver + itkOtsuMultipleThresholdsCalculatorTest + 1 + 0) +itk_add_test( + NAME + itkBinaryThresholdImageFilterTest2 + COMMAND + ITKThresholdingTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/BinaryThresholdImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/BinaryThresholdImageFilterTest2.png + itkBinaryThresholdImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0076.dcm} + ${ITK_TEST_OUTPUT_DIR}/BinaryThresholdImageFilterTest2.png) +itk_add_test( + NAME + itkBinaryThresholdProjectionImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/HeadMRVolumeBinaryThresholdProjection.png} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeBinaryThresholdProjection.png + itkBinaryThresholdProjectionImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeBinaryThresholdProjection.png + 100 + 255 + 0) +itk_add_test( + NAME + itkBinaryThresholdSpatialFunctionTest + COMMAND + ITKThresholdingTestDriver + itkBinaryThresholdSpatialFunctionTest) + +itk_add_test( + NAME + itkHuangThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkHuangThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkHuangThresholdImageFilterTest.png + itkHuangThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkHuangThresholdImageFilterTest.png + 256 + 1 + 19) +itk_add_test( + NAME + itkHuangThresholdImageFilterTestNoAutoMinMax + COMMAND + ITKThresholdingTestDriver + --compare-MD5 + DATA{Baseline/itkHuangThresholdImageFilterTestNoAutoMinMax.png} + fdcefb74090f63114d811e92f0f5836b + itkHuangThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkHuangThresholdImageFilterTestNoAutoMinMax.png + 32 + 0 + -31744) + +itk_add_test( + NAME + itkHuangMaskedThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkHuangMaskedThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkHuangMaskedThresholdImageFilterTest.png + itkHuangMaskedThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} + ${ITK_TEST_OUTPUT_DIR}/itkHuangMaskedThresholdImageFilterTest.png + 1 + 255 + 239) + +itk_add_test( + NAME + itkIntermodesThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkIntermodesThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkIntermodesThresholdImageFilterTest.png + itkIntermodesThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkIntermodesThresholdImageFilterTest.png + 256 + 1 + 1000 + 1 + 76) +itk_add_test( + NAME + itkIntermodesThresholdImageFilterTestNoInterMode + COMMAND + ITKThresholdingTestDriver + --compare-MD5 + DATA{Baseline/itkIntermodesThresholdImageFilterTestNoInterMode.png} + eed45f177050894e50ec1be5bc6bd4fa + itkIntermodesThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkIntermodesThresholdImageFilterTestNoInterMode.png + 32 + 1 + 2000 + 0 + 75) #itk_add_test(NAME itkIntermodesThresholdImageFilterTestNoAutoMinMax # COMMAND ITKThresholdingTestDriver # --compare-MD5 DATA{Baseline/itkIntermodesThresholdImageFilterTestNoAutoMinMax.png} # eed45f177050894e50ec1be5bc6bd4fa # itkIntermodesThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkIntermodesThresholdImageFilterTestNoAutoMinMax.png 32 0 400000 0 19) -itk_add_test(NAME itkIntermodesMaskedThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkIntermodesMaskedThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkIntermodesMaskedThresholdImageFilterTest.png - itkIntermodesMaskedThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} ${ITK_TEST_OUTPUT_DIR}/itkIntermodesMaskedThresholdImageFilterTest.png 1 255 1000 1 97) - -itk_add_test(NAME itkIsoDataThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkIsoDataThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkIsoDataThresholdImageFilterTest.png - itkIsoDataThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkIsoDataThresholdImageFilterTest.png 256 1 85) -itk_add_test(NAME itkIsoDataThresholdImageFilterTestNoAutoMinMax - COMMAND ITKThresholdingTestDriver - --compare-MD5 DATA{Baseline/itkIsoDataThresholdImageFilterTestNoAutoMinMax.png} - 9f844fd120ff49a7812e329a1b0216d8 - itkIsoDataThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkIsoDataThresholdImageFilterTestNoAutoMinMax.png 32 0 1023) - -itk_add_test(NAME itkIsoDataMaskedThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkIsoDataMaskedThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkIsoDataMaskedThresholdImageFilterTest.png - itkIsoDataMaskedThresholdImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} ${ITK_TEST_OUTPUT_DIR}/itkIsoDataMaskedThresholdImageFilterTest.png 1 255 114) - -itk_add_test(NAME itkKittlerIllingworthThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkKittlerIllingworthThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkKittlerIllingworthThresholdImageFilterTest.png - itkKittlerIllingworthThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkKittlerIllingworthThresholdImageFilterTest.png 256 1 32) -itk_add_test(NAME itkKittlerIllingworthThresholdImageFilterTestNoAutoMinMax - COMMAND ITKThresholdingTestDriver - --compare-MD5 DATA{Baseline/itkKittlerIllingworthThresholdImageFilterTestNoAutoMinMax.png} - ecb99e6ffea7be1e5419350f725da86b - itkKittlerIllingworthThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkKittlerIllingworthThresholdImageFilterTestNoAutoMinMax.png 32 0 1023) - -itk_add_test(NAME itkKittlerIllingworthMaskedThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkKittlerIllingworthMaskedThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkKittlerIllingworthMaskedThresholdImageFilterTest.png - itkKittlerIllingworthMaskedThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} ${ITK_TEST_OUTPUT_DIR}/itkKittlerIllingworthMaskedThresholdImageFilterTest.png 1 255 254) - -itk_add_test(NAME itkLiThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkLiThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkLiThresholdImageFilterTest.png - itkLiThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLiThresholdImageFilterTest.png 256 1 54) -itk_add_test(NAME itkLiThresholdImageFilterTestNoAutoMinMax - COMMAND ITKThresholdingTestDriver - --compare-MD5 DATA{Baseline/itkLiThresholdImageFilterTestNoAutoMinMax.png} - ecb99e6ffea7be1e5419350f725da86b - itkLiThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkLiThresholdImageFilterTestNoAutoMinMax.png 32 0 1023) - -itk_add_test(NAME itkLiMaskedThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkLiMaskedThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkLiMaskedThresholdImageFilterTest.png - itkLiMaskedThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} ${ITK_TEST_OUTPUT_DIR}/itkLiMaskedThresholdImageFilterTest.png 1 255 177) - -itk_add_test(NAME itkMaximumEntropyThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkMaximumEntropyThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkMaximumEntropyThresholdImageFilterTest.png - itkMaximumEntropyThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkMaximumEntropyThresholdImageFilterTest.png 256 1 140) -itk_add_test(NAME itkMaximumEntropyThresholdImageFilterTestNoAutoMinMax - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkMaximumEntropyThresholdImageFilterTestNoAutoMinMax.png} - ${ITK_TEST_OUTPUT_DIR}/itkMaximumEntropyThresholdImageFilterTestNoAutoMinMax.png - itkMaximumEntropyThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkMaximumEntropyThresholdImageFilterTestNoAutoMinMax.png 32 0 -31744) - -itk_add_test(NAME itkMaximumEntropyMaskedThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkMaximumEntropyMaskedThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkMaximumEntropyMaskedThresholdImageFilterTest.png - itkMaximumEntropyMaskedThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} ${ITK_TEST_OUTPUT_DIR}/itkMaximumEntropyMaskedThresholdImageFilterTest.png 1 255 118) - -itk_add_test(NAME itkMomentsThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkMomentsThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkMomentsThresholdImageFilterTest.png - itkMomentsThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkMomentsThresholdImageFilterTest.png 256 1 133) -itk_add_test(NAME itkMomentsThresholdImageFilterTestNoAutoMinMax - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkMomentsThresholdImageFilterTestNoAutoMinMax.png} - ${ITK_TEST_OUTPUT_DIR}/itkMomentsThresholdImageFilterTestNoAutoMinMax.png - itkMomentsThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkMomentsThresholdImageFilterTestNoAutoMinMax.png 32 0 -31744) - -itk_add_test(NAME itkMomentsMaskedThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkMomentsMaskedThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkMomentsMaskedThresholdImageFilterTest.png - itkMomentsMaskedThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} ${ITK_TEST_OUTPUT_DIR}/itkMomentsMaskedThresholdImageFilterTest.png 1 255 139) - -itk_add_test(NAME itkOtsuThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkOtsuThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkOtsuThresholdImageFilterTest.png - itkOtsuThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkOtsuThresholdImageFilterTest.png 256 1 84 0) -itk_add_test(NAME itkOtsuThresholdImageFilterTestFlipInsideOut - COMMAND ITKThresholdingTestDriver - --compare-MD5 DATA{Baseline/itkOtsuThresholdImageFilterTestFlipInsideOut.png} - 70f6b53f769782d0176c28b206d401d3 - itkOtsuThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkOtsuThresholdImageFilterTestFlipInsideOut.png 256 1 84 1) -itk_add_test(NAME itkOtsuThresholdImageFilterTestNoAutoMinMax - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkOtsuThresholdImageFilterTestNoAutoMinMax.png} - ${ITK_TEST_OUTPUT_DIR}/itkOtsuThresholdImageFilterTestNoAutoMinMax.png - itkOtsuThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkOtsuThresholdImageFilterTestNoAutoMinMax.png 32 0 -30720 0) +itk_add_test( + NAME + itkIntermodesMaskedThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkIntermodesMaskedThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkIntermodesMaskedThresholdImageFilterTest.png + itkIntermodesMaskedThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} + ${ITK_TEST_OUTPUT_DIR}/itkIntermodesMaskedThresholdImageFilterTest.png + 1 + 255 + 1000 + 1 + 97) + +itk_add_test( + NAME + itkIsoDataThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkIsoDataThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkIsoDataThresholdImageFilterTest.png + itkIsoDataThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkIsoDataThresholdImageFilterTest.png + 256 + 1 + 85) +itk_add_test( + NAME + itkIsoDataThresholdImageFilterTestNoAutoMinMax + COMMAND + ITKThresholdingTestDriver + --compare-MD5 + DATA{Baseline/itkIsoDataThresholdImageFilterTestNoAutoMinMax.png} + 9f844fd120ff49a7812e329a1b0216d8 + itkIsoDataThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkIsoDataThresholdImageFilterTestNoAutoMinMax.png + 32 + 0 + 1023) + +itk_add_test( + NAME + itkIsoDataMaskedThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkIsoDataMaskedThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkIsoDataMaskedThresholdImageFilterTest.png + itkIsoDataMaskedThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} + ${ITK_TEST_OUTPUT_DIR}/itkIsoDataMaskedThresholdImageFilterTest.png + 1 + 255 + 114) + +itk_add_test( + NAME + itkKittlerIllingworthThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkKittlerIllingworthThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkKittlerIllingworthThresholdImageFilterTest.png + itkKittlerIllingworthThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkKittlerIllingworthThresholdImageFilterTest.png + 256 + 1 + 32) +itk_add_test( + NAME + itkKittlerIllingworthThresholdImageFilterTestNoAutoMinMax + COMMAND + ITKThresholdingTestDriver + --compare-MD5 + DATA{Baseline/itkKittlerIllingworthThresholdImageFilterTestNoAutoMinMax.png} + ecb99e6ffea7be1e5419350f725da86b + itkKittlerIllingworthThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkKittlerIllingworthThresholdImageFilterTestNoAutoMinMax.png + 32 + 0 + 1023) + +itk_add_test( + NAME + itkKittlerIllingworthMaskedThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkKittlerIllingworthMaskedThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkKittlerIllingworthMaskedThresholdImageFilterTest.png + itkKittlerIllingworthMaskedThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} + ${ITK_TEST_OUTPUT_DIR}/itkKittlerIllingworthMaskedThresholdImageFilterTest.png + 1 + 255 + 254) + +itk_add_test( + NAME + itkLiThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkLiThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkLiThresholdImageFilterTest.png + itkLiThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLiThresholdImageFilterTest.png + 256 + 1 + 54) +itk_add_test( + NAME + itkLiThresholdImageFilterTestNoAutoMinMax + COMMAND + ITKThresholdingTestDriver + --compare-MD5 + DATA{Baseline/itkLiThresholdImageFilterTestNoAutoMinMax.png} + ecb99e6ffea7be1e5419350f725da86b + itkLiThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkLiThresholdImageFilterTestNoAutoMinMax.png + 32 + 0 + 1023) + +itk_add_test( + NAME + itkLiMaskedThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkLiMaskedThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkLiMaskedThresholdImageFilterTest.png + itkLiMaskedThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} + ${ITK_TEST_OUTPUT_DIR}/itkLiMaskedThresholdImageFilterTest.png + 1 + 255 + 177) + +itk_add_test( + NAME + itkMaximumEntropyThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkMaximumEntropyThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaximumEntropyThresholdImageFilterTest.png + itkMaximumEntropyThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaximumEntropyThresholdImageFilterTest.png + 256 + 1 + 140) +itk_add_test( + NAME + itkMaximumEntropyThresholdImageFilterTestNoAutoMinMax + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkMaximumEntropyThresholdImageFilterTestNoAutoMinMax.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaximumEntropyThresholdImageFilterTestNoAutoMinMax.png + itkMaximumEntropyThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaximumEntropyThresholdImageFilterTestNoAutoMinMax.png + 32 + 0 + -31744) + +itk_add_test( + NAME + itkMaximumEntropyMaskedThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkMaximumEntropyMaskedThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaximumEntropyMaskedThresholdImageFilterTest.png + itkMaximumEntropyMaskedThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaximumEntropyMaskedThresholdImageFilterTest.png + 1 + 255 + 118) + +itk_add_test( + NAME + itkMomentsThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkMomentsThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkMomentsThresholdImageFilterTest.png + itkMomentsThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMomentsThresholdImageFilterTest.png + 256 + 1 + 133) +itk_add_test( + NAME + itkMomentsThresholdImageFilterTestNoAutoMinMax + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkMomentsThresholdImageFilterTestNoAutoMinMax.png} + ${ITK_TEST_OUTPUT_DIR}/itkMomentsThresholdImageFilterTestNoAutoMinMax.png + itkMomentsThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMomentsThresholdImageFilterTestNoAutoMinMax.png + 32 + 0 + -31744) + +itk_add_test( + NAME + itkMomentsMaskedThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkMomentsMaskedThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkMomentsMaskedThresholdImageFilterTest.png + itkMomentsMaskedThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} + ${ITK_TEST_OUTPUT_DIR}/itkMomentsMaskedThresholdImageFilterTest.png + 1 + 255 + 139) + +itk_add_test( + NAME + itkOtsuThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkOtsuThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuThresholdImageFilterTest.png + itkOtsuThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuThresholdImageFilterTest.png + 256 + 1 + 84 + 0) +itk_add_test( + NAME + itkOtsuThresholdImageFilterTestFlipInsideOut + COMMAND + ITKThresholdingTestDriver + --compare-MD5 + DATA{Baseline/itkOtsuThresholdImageFilterTestFlipInsideOut.png} + 70f6b53f769782d0176c28b206d401d3 + itkOtsuThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuThresholdImageFilterTestFlipInsideOut.png + 256 + 1 + 84 + 1) +itk_add_test( + NAME + itkOtsuThresholdImageFilterTestNoAutoMinMax + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkOtsuThresholdImageFilterTestNoAutoMinMax.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuThresholdImageFilterTestNoAutoMinMax.png + itkOtsuThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuThresholdImageFilterTestNoAutoMinMax.png + 32 + 0 + -30720 + 0) # With one threshold, the OtsuMultipleThresholdsImageFilter should give the same result as the OtsuThresholdImageFilter. # Therefore, in this test, we compare the output to the output of the OtsuThresholdImageFilter. # We set the number of histogram bins to 256 because that is the default for the OtsuThresholdImageFilter. -itk_add_test(NAME itkOtsuMultipleThresholdsImageFilterTest2 - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkOtsuMultipleThresholdsImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest2.png - itkOtsuMultipleThresholdsImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest2.png 256 1 0) +itk_add_test( + NAME + itkOtsuMultipleThresholdsImageFilterTest2 + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkOtsuMultipleThresholdsImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest2.png + itkOtsuMultipleThresholdsImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest2.png + 256 + 1 + 0) # Test the algorithm on an image with a small dark region. -itk_add_test(NAME itkOtsuMultipleThresholdsImageFilterTest3 - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkOtsuMultipleThresholdsImageFilterTest3.png} - ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest3.png - itkOtsuMultipleThresholdsImageFilterTest DATA{${ITK_DATA_ROOT}/Input/DotOnVaryingBackground.png} ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest3.png 64 1 2 0 1) +itk_add_test( + NAME + itkOtsuMultipleThresholdsImageFilterTest3 + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkOtsuMultipleThresholdsImageFilterTest3.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest3.png + itkOtsuMultipleThresholdsImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/DotOnVaryingBackground.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest3.png + 64 + 1 + 2 + 0 + 1) # Test the valley emphasis algorithm on an image with a small dark region. -itk_add_test(NAME itkOtsuMultipleThresholdsImageFilterTest4 - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkOtsuMultipleThresholdsImageFilterTest4.png} - ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest4.png - itkOtsuMultipleThresholdsImageFilterTest DATA{${ITK_DATA_ROOT}/Input/DotOnVaryingBackground.png} ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest4.png 64 1 2 1) - -itk_add_test(NAME itkOtsuMultipleThresholdsImageFilterTest5 - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkOtsuMultipleThresholdsImageFilterTest5.png} - ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest5.png - itkOtsuMultipleThresholdsImageFilterTest DATA{Input/image_3modes.png} ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest5.png 128 2 0) - -itk_add_test(NAME itkOtsuMultipleThresholdsImageFilterTest6 - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkOtsuMultipleThresholdsImageFilterTest5.png} - ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest6.png - itkOtsuMultipleThresholdsImageFilterTest DATA{Input/image_3modes.png} ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest6.png 128 2 0 0 1) +itk_add_test( + NAME + itkOtsuMultipleThresholdsImageFilterTest4 + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkOtsuMultipleThresholdsImageFilterTest4.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest4.png + itkOtsuMultipleThresholdsImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/DotOnVaryingBackground.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest4.png + 64 + 1 + 2 + 1) + +itk_add_test( + NAME + itkOtsuMultipleThresholdsImageFilterTest5 + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkOtsuMultipleThresholdsImageFilterTest5.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest5.png + itkOtsuMultipleThresholdsImageFilterTest + DATA{Input/image_3modes.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest5.png + 128 + 2 + 0) + +itk_add_test( + NAME + itkOtsuMultipleThresholdsImageFilterTest6 + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkOtsuMultipleThresholdsImageFilterTest5.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest6.png + itkOtsuMultipleThresholdsImageFilterTest + DATA{Input/image_3modes.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuMultipleThresholdsImageFilterTest6.png + 128 + 2 + 0 + 0 + 1) set_tests_properties(itkOtsuMultipleThresholdsImageFilterTest6 PROPERTIES WILL_FAIL TRUE) #itk_add_test(NAME itkOtsuThresholdCalculatorVersusOtsuMultipleThresholdsCalculatorTest # COMMAND ITKThresholdingTestDriver # itkOtsuThresholdCalculatorVersusOtsuMultipleThresholdsCalculatorTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png}) -itk_add_test(NAME itkOtsuMaskedThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkOtsuMaskedThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkOtsuMaskedThresholdImageFilterTest.png - itkOtsuMaskedThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} ${ITK_TEST_OUTPUT_DIR}/itkOtsuMaskedThresholdImageFilterTest.png 1 255 184) - -itk_add_test(NAME itkRenyiEntropyThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkRenyiEntropyThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkRenyiEntropyThresholdImageFilterTest.png - itkRenyiEntropyThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkRenyiEntropyThresholdImageFilterTest.png 256 1 51) -itk_add_test(NAME itkRenyiEntropyThresholdImageFilterTestNoAutoMinMax - COMMAND ITKThresholdingTestDriver - --compare-MD5 DATA{Baseline/itkRenyiEntropyThresholdImageFilterTestNoAutoMinMax.png} - d5caadf6ba3cc5177eaa04e831fd0738 - itkRenyiEntropyThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkRenyiEntropyThresholdImageFilterTestNoAutoMinMax.png 32 0 -31744) - - -itk_add_test(NAME itkRenyiEntropyMaskedThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkRenyiEntropyMaskedThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkRenyiEntropyMaskedThresholdImageFilterTest.png - itkRenyiEntropyMaskedThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} ${ITK_TEST_OUTPUT_DIR}/itkRenyiEntropyMaskedThresholdImageFilterTest.png 1 255 118) - -itk_add_test(NAME itkShanbhagThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkShanbhagThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkShanbhagThresholdImageFilterTest.png - itkShanbhagThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkShanbhagThresholdImageFilterTest.png 256 1 133) -itk_add_test(NAME itkShanbhagThresholdImageFilterTestNoAutoMinMax - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkShanbhagThresholdImageFilterTestNoAutoMinMax.png} - ${ITK_TEST_OUTPUT_DIR}/itkShanbhagThresholdImageFilterTestNoAutoMinMax.png - itkShanbhagThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkShanbhagThresholdImageFilterTestNoAutoMinMax.png 32 0 -31744) - -itk_add_test(NAME itkShanbhagMaskedThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkShanbhagMaskedThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkShanbhagMaskedThresholdImageFilterTest.png - itkShanbhagMaskedThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} ${ITK_TEST_OUTPUT_DIR}/itkShanbhagMaskedThresholdImageFilterTest.png 1 255 55) - - -itk_add_test(NAME itkTriangleThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkTriangleThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkTriangleThresholdImageFilterTest.png - itkTriangleThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkTriangleThresholdImageFilterTest.png 256 1 2) -itk_add_test(NAME itkTriangleThresholdImageFilterTestNoAutoMinMax - COMMAND ITKThresholdingTestDriver - --compare-MD5 DATA{Baseline/itkTriangleThresholdImageFilterTestNoAutoMinMax.png} - ecb99e6ffea7be1e5419350f725da86b - itkTriangleThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkTriangleThresholdImageFilterTestNoAutoMinMax.png 32 0 3071) - -itk_add_test(NAME itkTriangleMaskedThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkTriangleMaskedThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkTriangleMaskedThresholdImageFilterTest.png - itkTriangleMaskedThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} ${ITK_TEST_OUTPUT_DIR}/itkTriangleMaskedThresholdImageFilterTest.png 1 255 254) - -itk_add_test(NAME itkYenThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkYenThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkYenThresholdImageFilterTest.png - itkYenThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkYenThresholdImageFilterTest.png 256 1 26) -itk_add_test(NAME itkYenThresholdImageFilterTestNoAutoMinMax - COMMAND ITKThresholdingTestDriver - --compare-MD5 DATA{Baseline/itkYenThresholdImageFilterTestNoAutoMinMax.png} - fcd6bcb56c1689fcef28b57c22475bad - itkYenThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkYenThresholdImageFilterTestNoAutoMinMax.png 32 0 -31744) - -itk_add_test(NAME itkYenMaskedThresholdImageFilterTest - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkYenMaskedThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkYenMaskedThresholdImageFilterTest.png - itkYenMaskedThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} ${ITK_TEST_OUTPUT_DIR}/itkYenMaskedThresholdImageFilterTest.png 1 255 118) - -itk_add_test(NAME itkHuangThresholdImageFilterTestShort - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkHuangThresholdImageFilterTestShort.png} - ${ITK_TEST_OUTPUT_DIR}/itkHuangThresholdImageFilterTestShort.png - itkHuangThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkHuangThresholdImageFilterTestShort.png 256 1 30771) - -itk_add_test(NAME itkIntermodesThresholdImageFilterTestShort - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkIntermodesThresholdImageFilterTestShort.png} - ${ITK_TEST_OUTPUT_DIR}/itkIntermodesThresholdImageFilterTestShort.png - itkIntermodesThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkIntermodesThresholdImageFilterTestShort.png 256 1 1000 1 14251) - -itk_add_test(NAME itkIsoDataThresholdImageFilterTestShort - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkIsoDataThresholdImageFilterTestShort.png} - ${ITK_TEST_OUTPUT_DIR}/itkIsoDataThresholdImageFilterTestShort.png - itkIsoDataThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkIsoDataThresholdImageFilterTestShort.png 256 1 15044) - -itk_add_test(NAME itkKittlerIllingworthThresholdImageFilterTestShort - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkKittlerIllingworthThresholdImageFilterTestShort.png} - ${ITK_TEST_OUTPUT_DIR}/itkKittlerIllingworthThresholdImageFilterTestShort.png - itkKittlerIllingworthThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkKittlerIllingworthThresholdImageFilterTestShort.png 256 1 31168) - -itk_add_test(NAME itkLiThresholdImageFilterTestShort - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkLiThresholdImageFilterTestShort.png} - ${ITK_TEST_OUTPUT_DIR}/itkLiThresholdImageFilterTestShort.png - itkLiThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkLiThresholdImageFilterTestShort.png 256 1 26939) - -itk_add_test(NAME itkMaximumEntropyThresholdImageFilterTestShort - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkMaximumEntropyThresholdImageFilterTestShort.png} - ${ITK_TEST_OUTPUT_DIR}/itkMaximumEntropyThresholdImageFilterTestShort.png - itkMaximumEntropyThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkMaximumEntropyThresholdImageFilterTestShort.png 256 1 22181) - -itk_add_test(NAME itkMomentsThresholdImageFilterTestShort - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkMomentsThresholdImageFilterTestShort.png} - ${ITK_TEST_OUTPUT_DIR}/itkMomentsThresholdImageFilterTestShort.png - itkMomentsThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkMomentsThresholdImageFilterTestShort.png 256 1 23238) - -itk_add_test(NAME itkOtsuThresholdImageFilterTestShort - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkOtsuThresholdImageFilterTestShort.png} - ${ITK_TEST_OUTPUT_DIR}/itkOtsuThresholdImageFilterTestShort.png - itkOtsuThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkOtsuThresholdImageFilterTestShort.png 256 1 14516 1) - -itk_add_test(NAME itkRenyiEntropyThresholdImageFilterTestShort - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkRenyiEntropyThresholdImageFilterTestShort.png} - ${ITK_TEST_OUTPUT_DIR}/itkRenyiEntropyThresholdImageFilterTestShort.png - itkRenyiEntropyThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkRenyiEntropyThresholdImageFilterTestShort.png 256 1 22181) - -itk_add_test(NAME itkShanbhagThresholdImageFilterTestShort - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkShanbhagThresholdImageFilterTestShort.png} - ${ITK_TEST_OUTPUT_DIR}/itkShanbhagThresholdImageFilterTestShort.png - itkShanbhagThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkShanbhagThresholdImageFilterTestShort.png 256 1 28921) - -itk_add_test(NAME itkTriangleThresholdImageFilterTestShort - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkTriangleThresholdImageFilterTestShort.png} - ${ITK_TEST_OUTPUT_DIR}/itkTriangleThresholdImageFilterTestShort.png - itkTriangleThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkTriangleThresholdImageFilterTestShort.png 256 1 22313) - -itk_add_test(NAME itkYenThresholdImageFilterTestShort - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkYenThresholdImageFilterTestShort.png} - ${ITK_TEST_OUTPUT_DIR}/itkYenThresholdImageFilterTestShort.png - itkYenThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkYenThresholdImageFilterTestShort.png 256 1 22181) - -itk_add_test(NAME itkKappaSigmaThresholdImageCalculatorTest01 - COMMAND ITKThresholdingTestDriver itkKappaSigmaThresholdImageCalculatorTest - DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence1.png} 255 3.5 10 229) - -itk_add_test(NAME itkKappaSigmaThresholdImageCalculatorTest02 - COMMAND ITKThresholdingTestDriver itkKappaSigmaThresholdImageCalculatorTest - DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence2.png} 255 3.0 10 361) - -itk_add_test(NAME itkKappaSigmaThresholdImageFilterTest01 - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkKappaSigmaThresholdImageFilterTest01.png} - ${ITK_TEST_OUTPUT_DIR}/itkKappaSigmaThresholdImageFilterTest01.png - itkKappaSigmaThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence1.png} ${ITK_TEST_OUTPUT_DIR}/itkKappaSigmaThresholdImageFilterTest01.png 255 3.5 2 69) - -itk_add_test(NAME itkKappaSigmaThresholdImageFilterTest02 - COMMAND ITKThresholdingTestDriver - --compare DATA{Baseline/itkKappaSigmaThresholdImageFilterTest02.png} - ${ITK_TEST_OUTPUT_DIR}/itkKappaSigmaThresholdImageFilterTest02.png - itkKappaSigmaThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence2.png} ${ITK_TEST_OUTPUT_DIR}/itkKappaSigmaThresholdImageFilterTest02.png 255 3.0 2 92) +itk_add_test( + NAME + itkOtsuMaskedThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkOtsuMaskedThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuMaskedThresholdImageFilterTest.png + itkOtsuMaskedThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuMaskedThresholdImageFilterTest.png + 1 + 255 + 184) + +itk_add_test( + NAME + itkRenyiEntropyThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkRenyiEntropyThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkRenyiEntropyThresholdImageFilterTest.png + itkRenyiEntropyThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkRenyiEntropyThresholdImageFilterTest.png + 256 + 1 + 51) +itk_add_test( + NAME + itkRenyiEntropyThresholdImageFilterTestNoAutoMinMax + COMMAND + ITKThresholdingTestDriver + --compare-MD5 + DATA{Baseline/itkRenyiEntropyThresholdImageFilterTestNoAutoMinMax.png} + d5caadf6ba3cc5177eaa04e831fd0738 + itkRenyiEntropyThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkRenyiEntropyThresholdImageFilterTestNoAutoMinMax.png + 32 + 0 + -31744) + +itk_add_test( + NAME + itkRenyiEntropyMaskedThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkRenyiEntropyMaskedThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkRenyiEntropyMaskedThresholdImageFilterTest.png + itkRenyiEntropyMaskedThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} + ${ITK_TEST_OUTPUT_DIR}/itkRenyiEntropyMaskedThresholdImageFilterTest.png + 1 + 255 + 118) + +itk_add_test( + NAME + itkShanbhagThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkShanbhagThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkShanbhagThresholdImageFilterTest.png + itkShanbhagThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkShanbhagThresholdImageFilterTest.png + 256 + 1 + 133) +itk_add_test( + NAME + itkShanbhagThresholdImageFilterTestNoAutoMinMax + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkShanbhagThresholdImageFilterTestNoAutoMinMax.png} + ${ITK_TEST_OUTPUT_DIR}/itkShanbhagThresholdImageFilterTestNoAutoMinMax.png + itkShanbhagThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkShanbhagThresholdImageFilterTestNoAutoMinMax.png + 32 + 0 + -31744) + +itk_add_test( + NAME + itkShanbhagMaskedThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkShanbhagMaskedThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkShanbhagMaskedThresholdImageFilterTest.png + itkShanbhagMaskedThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} + ${ITK_TEST_OUTPUT_DIR}/itkShanbhagMaskedThresholdImageFilterTest.png + 1 + 255 + 55) + +itk_add_test( + NAME + itkTriangleThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkTriangleThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkTriangleThresholdImageFilterTest.png + itkTriangleThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkTriangleThresholdImageFilterTest.png + 256 + 1 + 2) +itk_add_test( + NAME + itkTriangleThresholdImageFilterTestNoAutoMinMax + COMMAND + ITKThresholdingTestDriver + --compare-MD5 + DATA{Baseline/itkTriangleThresholdImageFilterTestNoAutoMinMax.png} + ecb99e6ffea7be1e5419350f725da86b + itkTriangleThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkTriangleThresholdImageFilterTestNoAutoMinMax.png + 32 + 0 + 3071) + +itk_add_test( + NAME + itkTriangleMaskedThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkTriangleMaskedThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkTriangleMaskedThresholdImageFilterTest.png + itkTriangleMaskedThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} + ${ITK_TEST_OUTPUT_DIR}/itkTriangleMaskedThresholdImageFilterTest.png + 1 + 255 + 254) + +itk_add_test( + NAME + itkYenThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkYenThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkYenThresholdImageFilterTest.png + itkYenThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkYenThresholdImageFilterTest.png + 256 + 1 + 26) +itk_add_test( + NAME + itkYenThresholdImageFilterTestNoAutoMinMax + COMMAND + ITKThresholdingTestDriver + --compare-MD5 + DATA{Baseline/itkYenThresholdImageFilterTestNoAutoMinMax.png} + fcd6bcb56c1689fcef28b57c22475bad + itkYenThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkYenThresholdImageFilterTestNoAutoMinMax.png + 32 + 0 + -31744) + +itk_add_test( + NAME + itkYenMaskedThresholdImageFilterTest + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkYenMaskedThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkYenMaskedThresholdImageFilterTest.png + itkYenMaskedThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-threshmask.png} + ${ITK_TEST_OUTPUT_DIR}/itkYenMaskedThresholdImageFilterTest.png + 1 + 255 + 118) + +itk_add_test( + NAME + itkHuangThresholdImageFilterTestShort + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkHuangThresholdImageFilterTestShort.png} + ${ITK_TEST_OUTPUT_DIR}/itkHuangThresholdImageFilterTestShort.png + itkHuangThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkHuangThresholdImageFilterTestShort.png + 256 + 1 + 30771) + +itk_add_test( + NAME + itkIntermodesThresholdImageFilterTestShort + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkIntermodesThresholdImageFilterTestShort.png} + ${ITK_TEST_OUTPUT_DIR}/itkIntermodesThresholdImageFilterTestShort.png + itkIntermodesThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkIntermodesThresholdImageFilterTestShort.png + 256 + 1 + 1000 + 1 + 14251) + +itk_add_test( + NAME + itkIsoDataThresholdImageFilterTestShort + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkIsoDataThresholdImageFilterTestShort.png} + ${ITK_TEST_OUTPUT_DIR}/itkIsoDataThresholdImageFilterTestShort.png + itkIsoDataThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkIsoDataThresholdImageFilterTestShort.png + 256 + 1 + 15044) + +itk_add_test( + NAME + itkKittlerIllingworthThresholdImageFilterTestShort + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkKittlerIllingworthThresholdImageFilterTestShort.png} + ${ITK_TEST_OUTPUT_DIR}/itkKittlerIllingworthThresholdImageFilterTestShort.png + itkKittlerIllingworthThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkKittlerIllingworthThresholdImageFilterTestShort.png + 256 + 1 + 31168) + +itk_add_test( + NAME + itkLiThresholdImageFilterTestShort + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkLiThresholdImageFilterTestShort.png} + ${ITK_TEST_OUTPUT_DIR}/itkLiThresholdImageFilterTestShort.png + itkLiThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkLiThresholdImageFilterTestShort.png + 256 + 1 + 26939) + +itk_add_test( + NAME + itkMaximumEntropyThresholdImageFilterTestShort + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkMaximumEntropyThresholdImageFilterTestShort.png} + ${ITK_TEST_OUTPUT_DIR}/itkMaximumEntropyThresholdImageFilterTestShort.png + itkMaximumEntropyThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkMaximumEntropyThresholdImageFilterTestShort.png + 256 + 1 + 22181) + +itk_add_test( + NAME + itkMomentsThresholdImageFilterTestShort + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkMomentsThresholdImageFilterTestShort.png} + ${ITK_TEST_OUTPUT_DIR}/itkMomentsThresholdImageFilterTestShort.png + itkMomentsThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkMomentsThresholdImageFilterTestShort.png + 256 + 1 + 23238) + +itk_add_test( + NAME + itkOtsuThresholdImageFilterTestShort + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkOtsuThresholdImageFilterTestShort.png} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuThresholdImageFilterTestShort.png + itkOtsuThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkOtsuThresholdImageFilterTestShort.png + 256 + 1 + 14516 + 1) + +itk_add_test( + NAME + itkRenyiEntropyThresholdImageFilterTestShort + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkRenyiEntropyThresholdImageFilterTestShort.png} + ${ITK_TEST_OUTPUT_DIR}/itkRenyiEntropyThresholdImageFilterTestShort.png + itkRenyiEntropyThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkRenyiEntropyThresholdImageFilterTestShort.png + 256 + 1 + 22181) + +itk_add_test( + NAME + itkShanbhagThresholdImageFilterTestShort + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkShanbhagThresholdImageFilterTestShort.png} + ${ITK_TEST_OUTPUT_DIR}/itkShanbhagThresholdImageFilterTestShort.png + itkShanbhagThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkShanbhagThresholdImageFilterTestShort.png + 256 + 1 + 28921) + +itk_add_test( + NAME + itkTriangleThresholdImageFilterTestShort + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkTriangleThresholdImageFilterTestShort.png} + ${ITK_TEST_OUTPUT_DIR}/itkTriangleThresholdImageFilterTestShort.png + itkTriangleThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkTriangleThresholdImageFilterTestShort.png + 256 + 1 + 22313) + +itk_add_test( + NAME + itkYenThresholdImageFilterTestShort + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkYenThresholdImageFilterTestShort.png} + ${ITK_TEST_OUTPUT_DIR}/itkYenThresholdImageFilterTestShort.png + itkYenThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Input-RA-Short.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkYenThresholdImageFilterTestShort.png + 256 + 1 + 22181) + +itk_add_test( + NAME + itkKappaSigmaThresholdImageCalculatorTest01 + COMMAND + ITKThresholdingTestDriver + itkKappaSigmaThresholdImageCalculatorTest + DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence1.png} + 255 + 3.5 + 10 + 229) + +itk_add_test( + NAME + itkKappaSigmaThresholdImageCalculatorTest02 + COMMAND + ITKThresholdingTestDriver + itkKappaSigmaThresholdImageCalculatorTest + DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence2.png} + 255 + 3.0 + 10 + 361) + +itk_add_test( + NAME + itkKappaSigmaThresholdImageFilterTest01 + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkKappaSigmaThresholdImageFilterTest01.png} + ${ITK_TEST_OUTPUT_DIR}/itkKappaSigmaThresholdImageFilterTest01.png + itkKappaSigmaThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence1.png} + ${ITK_TEST_OUTPUT_DIR}/itkKappaSigmaThresholdImageFilterTest01.png + 255 + 3.5 + 2 + 69) + +itk_add_test( + NAME + itkKappaSigmaThresholdImageFilterTest02 + COMMAND + ITKThresholdingTestDriver + --compare + DATA{Baseline/itkKappaSigmaThresholdImageFilterTest02.png} + ${ITK_TEST_OUTPUT_DIR}/itkKappaSigmaThresholdImageFilterTest02.png + itkKappaSigmaThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence2.png} + ${ITK_TEST_OUTPUT_DIR}/itkKappaSigmaThresholdImageFilterTest02.png + 255 + 3.0 + 2 + 92) diff --git a/Modules/Filtering/Thresholding/wrapping/CMakeLists.txt b/Modules/Filtering/Thresholding/wrapping/CMakeLists.txt index a29ed227295..1e8a6fd695d 100644 --- a/Modules/Filtering/Thresholding/wrapping/CMakeLists.txt +++ b/Modules/Filtering/Thresholding/wrapping/CMakeLists.txt @@ -1,7 +1,4 @@ itk_wrap_module(ITKThresholding) -set(WRAPPER_SUBMODULE_ORDER - itkHistogramThresholdCalculator - itkHistogramThresholdImageFilter -) +set(WRAPPER_SUBMODULE_ORDER itkHistogramThresholdCalculator itkHistogramThresholdImageFilter) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Filtering/Thresholding/wrapping/itkBinaryThresholdImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkBinaryThresholdImageFilter.wrap index 05e8a0e5dbc..7c4857989bf 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkBinaryThresholdImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkBinaryThresholdImageFilter.wrap @@ -1,14 +1,14 @@ itk_wrap_class("itk::BinaryThresholdImageFilter" POINTER_WITH_SUPERCLASS) - # For all the selected scalar types: - foreach(type ${WRAP_ITK_SCALAR}) +# For all the selected scalar types: +foreach(type ${WRAP_ITK_SCALAR}) - # Wrap from that type to itself - # And wrap from that type to all "smaller" types that are selected. - # The SMALLER_THAN lists are defined in WrapBasicTypes.cmake. If the list - # is empty/nonexistant (e.g. in the case of uchar, then itk_wrap_image_filter_combinations - # will just ignore that. - UNIQUE(st "${SMALLER_THAN_${type}};UC;${type}") - itk_wrap_image_filter_combinations("${type}" "${st}") + # Wrap from that type to itself + # And wrap from that type to all "smaller" types that are selected. + # The SMALLER_THAN lists are defined in WrapBasicTypes.cmake. If the list + # is empty/nonexistant (e.g. in the case of uchar, then itk_wrap_image_filter_combinations + # will just ignore that. + unique(st "${SMALLER_THAN_${type}};UC;${type}") + itk_wrap_image_filter_combinations("${type}" "${st}") - endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkBinaryThresholdProjectionImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkBinaryThresholdProjectionImageFilter.wrap index 27e1c92f0e8..46cd342b2b8 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkBinaryThresholdProjectionImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkBinaryThresholdProjectionImageFilter.wrap @@ -1,14 +1,14 @@ itk_wrap_class("itk::BinaryThresholdProjectionImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) - # reduce the output dimension by 1, if possible - foreach(t ${WRAP_ITK_SCALAR}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - DECREMENT(d1 ${d}) - itk_wrap_filter_dims(d2 "${d1}") - if(d2) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") - endif() - endforeach() +# reduce the output dimension by 1, if possible +foreach(t ${WRAP_ITK_SCALAR}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + decrement(d1 ${d}) + itk_wrap_filter_dims(d2 "${d1}") + if(d2) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d2}}") + endif() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkHistogramThresholdCalculator.wrap b/Modules/Filtering/Thresholding/wrapping/itkHistogramThresholdCalculator.wrap index 8d82d75b65a..c996d692285 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkHistogramThresholdCalculator.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkHistogramThresholdCalculator.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkHistogram.h") itk_wrap_class("itk::HistogramThresholdCalculator" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") - itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") + itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkHistogramThresholdImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkHistogramThresholdImageFilter.wrap index 326d98d0687..cfb2257dfc2 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkHistogramThresholdImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkHistogramThresholdImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::HistogramThresholdImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkHuangThresholdCalculator.wrap b/Modules/Filtering/Thresholding/wrapping/itkHuangThresholdCalculator.wrap index 53254a6df32..91421fc40cb 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkHuangThresholdCalculator.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkHuangThresholdCalculator.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkHistogram.h") itk_wrap_class("itk::HuangThresholdCalculator" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") - itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") + itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkHuangThresholdImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkHuangThresholdImageFilter.wrap index 05277003662..afc1eaa6d85 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkHuangThresholdImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkHuangThresholdImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::HuangThresholdImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkIntermodesThresholdCalculator.wrap b/Modules/Filtering/Thresholding/wrapping/itkIntermodesThresholdCalculator.wrap index 8b9c93aef73..827039187d0 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkIntermodesThresholdCalculator.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkIntermodesThresholdCalculator.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkHistogram.h") itk_wrap_class("itk::IntermodesThresholdCalculator" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") - itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") + itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkIntermodesThresholdImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkIntermodesThresholdImageFilter.wrap index c416b0e17e7..e25e2cf48d7 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkIntermodesThresholdImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkIntermodesThresholdImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::IntermodesThresholdImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkIsoDataThresholdCalculator.wrap b/Modules/Filtering/Thresholding/wrapping/itkIsoDataThresholdCalculator.wrap index 835342edda6..9d19ab97bfc 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkIsoDataThresholdCalculator.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkIsoDataThresholdCalculator.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkHistogram.h") itk_wrap_class("itk::IsoDataThresholdCalculator" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") - itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") + itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkIsoDataThresholdImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkIsoDataThresholdImageFilter.wrap index 1d03df324d2..753adbd529d 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkIsoDataThresholdImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkIsoDataThresholdImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::IsoDataThresholdImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkKappaSigmaThresholdImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkKappaSigmaThresholdImageFilter.wrap index 55c7a21df43..c17fba9f660 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkKappaSigmaThresholdImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkKappaSigmaThresholdImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::KappaSigmaThresholdImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkKittlerIllingworthThresholdCalculator.wrap b/Modules/Filtering/Thresholding/wrapping/itkKittlerIllingworthThresholdCalculator.wrap index bd631e4123c..6073c85388f 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkKittlerIllingworthThresholdCalculator.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkKittlerIllingworthThresholdCalculator.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkHistogram.h") itk_wrap_class("itk::KittlerIllingworthThresholdCalculator" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") - itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") + itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkKittlerIllingworthThresholdImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkKittlerIllingworthThresholdImageFilter.wrap index 8e45d4b8bf1..48d65b84ae0 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkKittlerIllingworthThresholdImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkKittlerIllingworthThresholdImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::KittlerIllingworthThresholdImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkLiThresholdCalculator.wrap b/Modules/Filtering/Thresholding/wrapping/itkLiThresholdCalculator.wrap index 9e9bd8f89e8..205c14a6216 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkLiThresholdCalculator.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkLiThresholdCalculator.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkHistogram.h") itk_wrap_class("itk::LiThresholdCalculator" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") - itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") + itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkLiThresholdImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkLiThresholdImageFilter.wrap index fc14d356cc8..5894ab87a78 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkLiThresholdImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkLiThresholdImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::LiThresholdImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkMaximumEntropyThresholdCalculator.wrap b/Modules/Filtering/Thresholding/wrapping/itkMaximumEntropyThresholdCalculator.wrap index 5dd1f8af51e..23e3675b01b 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkMaximumEntropyThresholdCalculator.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkMaximumEntropyThresholdCalculator.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkHistogram.h") itk_wrap_class("itk::MaximumEntropyThresholdCalculator" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") - itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") + itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkMaximumEntropyThresholdImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkMaximumEntropyThresholdImageFilter.wrap index 6953b44984f..09a2dbb0037 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkMaximumEntropyThresholdImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkMaximumEntropyThresholdImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MaximumEntropyThresholdImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkMomentsThresholdCalculator.wrap b/Modules/Filtering/Thresholding/wrapping/itkMomentsThresholdCalculator.wrap index 467d8061c27..b738ac1b763 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkMomentsThresholdCalculator.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkMomentsThresholdCalculator.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkHistogram.h") itk_wrap_class("itk::MomentsThresholdCalculator" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") - itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") + itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkMomentsThresholdImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkMomentsThresholdImageFilter.wrap index 45482379d97..a16496f51d2 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkMomentsThresholdImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkMomentsThresholdImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MomentsThresholdImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkOtsuMultipleThresholdsImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkOtsuMultipleThresholdsImageFilter.wrap index d88db64b760..8e3d5d4e8fd 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkOtsuMultipleThresholdsImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkOtsuMultipleThresholdsImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::OtsuMultipleThresholdsImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkOtsuThresholdCalculator.wrap b/Modules/Filtering/Thresholding/wrapping/itkOtsuThresholdCalculator.wrap index ea91615111a..d35bab1605f 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkOtsuThresholdCalculator.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkOtsuThresholdCalculator.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkHistogram.h") itk_wrap_class("itk::OtsuThresholdCalculator" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") - itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") + itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkOtsuThresholdImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkOtsuThresholdImageFilter.wrap index 07f17d5c409..c3fd660aa92 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkOtsuThresholdImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkOtsuThresholdImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::OtsuThresholdImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkRenyiEntropyThresholdCalculator.wrap b/Modules/Filtering/Thresholding/wrapping/itkRenyiEntropyThresholdCalculator.wrap index 1051cd2b1b9..20f97f45680 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkRenyiEntropyThresholdCalculator.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkRenyiEntropyThresholdCalculator.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkHistogram.h") itk_wrap_class("itk::RenyiEntropyThresholdCalculator" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") - itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") + itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkRenyiEntropyThresholdImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkRenyiEntropyThresholdImageFilter.wrap index 84a4a32ac1d..9aaa835743c 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkRenyiEntropyThresholdImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkRenyiEntropyThresholdImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::RenyiEntropyThresholdImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkShanbhagThresholdCalculator.wrap b/Modules/Filtering/Thresholding/wrapping/itkShanbhagThresholdCalculator.wrap index dad80653f1b..45f30617cd5 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkShanbhagThresholdCalculator.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkShanbhagThresholdCalculator.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkHistogram.h") itk_wrap_class("itk::ShanbhagThresholdCalculator" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") - itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") + itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkShanbhagThresholdImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkShanbhagThresholdImageFilter.wrap index 7510fb05e10..8f4561857f2 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkShanbhagThresholdImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkShanbhagThresholdImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ShanbhagThresholdImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkThresholdImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkThresholdImageFilter.wrap index 6ebe3ee3644..e3846849961 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkThresholdImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkThresholdImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ThresholdImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkThresholdLabelerImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkThresholdLabelerImageFilter.wrap index 9204f7cc1c8..c9ae4afdd2e 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkThresholdLabelerImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkThresholdLabelerImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ThresholdLabelerImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkTriangleThresholdCalculator.wrap b/Modules/Filtering/Thresholding/wrapping/itkTriangleThresholdCalculator.wrap index 1bb148653a9..0aa586d867e 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkTriangleThresholdCalculator.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkTriangleThresholdCalculator.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkHistogram.h") itk_wrap_class("itk::TriangleThresholdCalculator" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") - itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") + itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkTriangleThresholdImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkTriangleThresholdImageFilter.wrap index fe1680c27de..189ec1579a4 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkTriangleThresholdImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkTriangleThresholdImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::TriangleThresholdImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkYenThresholdCalculator.wrap b/Modules/Filtering/Thresholding/wrapping/itkYenThresholdCalculator.wrap index a4301312f48..3319a1276f4 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkYenThresholdCalculator.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkYenThresholdCalculator.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkHistogram.h") itk_wrap_class("itk::YenThresholdCalculator" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") - itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_HD}${ITKM_${t}}" "${ITKT_HD}, ${ITKT_${t}}") + itk_wrap_template("${ITKM_HF}${ITKM_${t}}" "${ITKT_HF}, ${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/itkYenThresholdImageFilter.wrap b/Modules/Filtering/Thresholding/wrapping/itkYenThresholdImageFilter.wrap index 4bd2ac8d4f5..4b4ed1536d1 100644 --- a/Modules/Filtering/Thresholding/wrapping/itkYenThresholdImageFilter.wrap +++ b/Modules/Filtering/Thresholding/wrapping/itkYenThresholdImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::YenThresholdImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Filtering/Thresholding/wrapping/test/CMakeLists.txt b/Modules/Filtering/Thresholding/wrapping/test/CMakeLists.txt index a65d4ee0f57..ef43fed5f31 100644 --- a/Modules/Filtering/Thresholding/wrapping/test/CMakeLists.txt +++ b/Modules/Filtering/Thresholding/wrapping/test/CMakeLists.txt @@ -1,23 +1,38 @@ # some tests will fail if dim=2 and unsigned short are not wrapped -list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) -if(ITK_WRAP_PYTHON AND ITK_WRAP_unsigned_char AND wrap_2_index GREATER -1) - itk_python_add_test(NAME PythonBinaryThresholdImageFilterTest +list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) +if(ITK_WRAP_PYTHON + AND ITK_WRAP_unsigned_char + AND wrap_2_index GREATER -1) + itk_python_add_test( + NAME + PythonBinaryThresholdImageFilterTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonBinaryThresholdImageFilterTest.png - DATA{Baseline/PythonBinaryThresholdImageFilterTest.png} - COMMAND BinaryThresholdImageFilterTest.py - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/PythonBinaryThresholdImageFilterTest.png - 50 150 - 0 255 - ) - itk_python_add_test(NAME PythonThresholdImageFilterTest + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonBinaryThresholdImageFilterTest.png + DATA{Baseline/PythonBinaryThresholdImageFilterTest.png} + COMMAND + BinaryThresholdImageFilterTest.py + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/PythonBinaryThresholdImageFilterTest.png + 50 + 150 + 0 + 255) + itk_python_add_test( + NAME + PythonThresholdImageFilterTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonThresholdImageFilterTest.png - DATA{Baseline/PythonThresholdImageFilterTest.png} - COMMAND ThresholdImageFilterTest.py - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/PythonThresholdImageFilterTest.png - 150 150 - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonThresholdImageFilterTest.png + DATA{Baseline/PythonThresholdImageFilterTest.png} + COMMAND + ThresholdImageFilterTest.py + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/PythonThresholdImageFilterTest.png + 150 + 150) endif() diff --git a/Modules/IO/BMP/itk-module.cmake b/Modules/IO/BMP/itk-module.cmake index 7a060ae68e5..7d0e0e62c9a 100644 --- a/Modules/IO/BMP/itk-module.cmake +++ b/Modules/IO/BMP/itk-module.cmake @@ -1,14 +1,14 @@ set(DOCUMENTATION "This module contains ImageIO classes for reading the Microsoft Bitmap File Format (BMP).") -itk_module(ITKIOBMP +itk_module( + ITKIOBMP ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase TEST_DEPENDS - ITKTestKernel + ITKTestKernel FACTORY_NAMES - ImageIO::BMP + ImageIO::BMP DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/BMP/src/CMakeLists.txt b/Modules/IO/BMP/src/CMakeLists.txt index 04dc5dab3a6..56ac72d4d20 100644 --- a/Modules/IO/BMP/src/CMakeLists.txt +++ b/Modules/IO/BMP/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOBMP_SRCS - itkBMPImageIO.cxx - itkBMPImageIOFactory.cxx - ) +set(ITKIOBMP_SRCS itkBMPImageIO.cxx itkBMPImageIOFactory.cxx) itk_module_add_library(ITKIOBMP ${ITKIOBMP_SRCS}) diff --git a/Modules/IO/BMP/test/CMakeLists.txt b/Modules/IO/BMP/test/CMakeLists.txt index c8324d40ff9..6b15ad9bcd9 100644 --- a/Modules/IO/BMP/test/CMakeLists.txt +++ b/Modules/IO/BMP/test/CMakeLists.txt @@ -1,76 +1,152 @@ itk_module_test() set(ITKIOBMPTests -itkBMPImageIOTest2.cxx -itkBMPImageIOTest.cxx -itkBMPImageIOTest3.cxx -itkBMPImageIOTest4.cxx -itkBMPImageIOTest5.cxx -itkBMPImageIOTestExtension.cxx -itkBMPImageIOTestPalette.cxx -) + itkBMPImageIOTest2.cxx + itkBMPImageIOTest.cxx + itkBMPImageIOTest3.cxx + itkBMPImageIOTest4.cxx + itkBMPImageIOTest5.cxx + itkBMPImageIOTestExtension.cxx + itkBMPImageIOTestPalette.cxx) -SET(TEMP ${ITK_BINARY_DIR}/Testing/Temporary) +set(TEMP ${ITK_BINARY_DIR}/Testing/Temporary) -CreateTestDriver(ITKIOBMP "${ITKIOBMP-Test_LIBRARIES}" "${ITKIOBMPTests}") +createtestdriver(ITKIOBMP "${ITKIOBMP-Test_LIBRARIES}" "${ITKIOBMPTests}") -itk_add_test(NAME itkBMPImageIOTest5 - COMMAND ITKIOBMPTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/smallRGBA.mha} - ${ITK_TEST_OUTPUT_DIR}/smallRGBA.mha - itkBMPImageIOTest2 DATA{${ITK_DATA_ROOT}/Input/smallRGBA.bmp} ${ITK_TEST_OUTPUT_DIR}/smallRGBA.mha) -itk_add_test(NAME itkBMPImageIOTest6 - COMMAND ITKIOBMPTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/smallRGBA.mha} - ${ITK_TEST_OUTPUT_DIR}/smallRGBA.bmp - itkBMPImageIOTest2 DATA{${ITK_DATA_ROOT}/Input/smallRGBA.bmp} ${ITK_TEST_OUTPUT_DIR}/smallRGBA.bmp) -itk_add_test(NAME itkBMPImageIOTest - COMMAND ITKIOBMPTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.bmp} - ${ITK_TEST_OUTPUT_DIR}/cthead1.bmp - itkBMPImageIOTest DATA{${ITK_DATA_ROOT}/Input/cthead1.bmp} ${ITK_TEST_OUTPUT_DIR}/cthead1.bmp) -itk_add_test(NAME itkBMPImageIOTest2 - COMMAND ITKIOBMPTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead254x254.bmp} - ${ITK_TEST_OUTPUT_DIR}/cthead254x254.bmp - itkBMPImageIOTest DATA{${ITK_DATA_ROOT}/Input/cthead254x254.bmp} ${ITK_TEST_OUTPUT_DIR}/cthead254x254.bmp) -itk_add_test(NAME itkBMPImageIOTest3 - COMMAND ITKIOBMPTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/image_grayscale.bmp} - ${ITK_TEST_OUTPUT_DIR}/image_grayscale.bmp - itkBMPImageIOTest DATA{${ITK_DATA_ROOT}/Input/image_grayscale.bmp} ${ITK_TEST_OUTPUT_DIR}/image_grayscale.bmp) -itk_add_test(NAME itkBMPImageIOTest4 - COMMAND ITKIOBMPTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/image_color.bmp} - ${ITK_TEST_OUTPUT_DIR}/image_color.bmp - itkBMPImageIOTest DATA{${ITK_DATA_ROOT}/Input/image_color.bmp} ${ITK_TEST_OUTPUT_DIR}/image_color.bmp) -itk_add_test(NAME itkBMPImageIOTest7 - COMMAND ITKIOBMPTestDriver - itkBMPImageIOTest3 DATA{${ITK_DATA_ROOT}/Input/grayscale_lowerleft.bmp} DATA{${ITK_DATA_ROOT}/Input/grayscale_upperleft.bmp}) -itk_add_test(NAME itkBMPImageIOTest8 - COMMAND ITKIOBMPTestDriver - itkBMPImageIOTest4 DATA{${ITK_DATA_ROOT}/Input/color_lowerleft.bmp} DATA{${ITK_DATA_ROOT}/Input/color_upperleft.bmp}) -itk_add_test(NAME itkBMPImageIOTest9 - COMMAND ITKIOBMPTestDriver - itkBMPImageIOTest5 DATA{${ITK_DATA_ROOT}/Input/grayscale_lowerleft_rle.bmp} DATA{${ITK_DATA_ROOT}/Input/grayscale_lowerleft.bmp}) +itk_add_test( + NAME + itkBMPImageIOTest5 + COMMAND + ITKIOBMPTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/smallRGBA.mha} + ${ITK_TEST_OUTPUT_DIR}/smallRGBA.mha + itkBMPImageIOTest2 + DATA{${ITK_DATA_ROOT}/Input/smallRGBA.bmp} + ${ITK_TEST_OUTPUT_DIR}/smallRGBA.mha) +itk_add_test( + NAME + itkBMPImageIOTest6 + COMMAND + ITKIOBMPTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/smallRGBA.mha} + ${ITK_TEST_OUTPUT_DIR}/smallRGBA.bmp + itkBMPImageIOTest2 + DATA{${ITK_DATA_ROOT}/Input/smallRGBA.bmp} + ${ITK_TEST_OUTPUT_DIR}/smallRGBA.bmp) +itk_add_test( + NAME + itkBMPImageIOTest + COMMAND + ITKIOBMPTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.bmp} + ${ITK_TEST_OUTPUT_DIR}/cthead1.bmp + itkBMPImageIOTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.bmp} + ${ITK_TEST_OUTPUT_DIR}/cthead1.bmp) +itk_add_test( + NAME + itkBMPImageIOTest2 + COMMAND + ITKIOBMPTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead254x254.bmp} + ${ITK_TEST_OUTPUT_DIR}/cthead254x254.bmp + itkBMPImageIOTest + DATA{${ITK_DATA_ROOT}/Input/cthead254x254.bmp} + ${ITK_TEST_OUTPUT_DIR}/cthead254x254.bmp) +itk_add_test( + NAME + itkBMPImageIOTest3 + COMMAND + ITKIOBMPTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/image_grayscale.bmp} + ${ITK_TEST_OUTPUT_DIR}/image_grayscale.bmp + itkBMPImageIOTest + DATA{${ITK_DATA_ROOT}/Input/image_grayscale.bmp} + ${ITK_TEST_OUTPUT_DIR}/image_grayscale.bmp) +itk_add_test( + NAME + itkBMPImageIOTest4 + COMMAND + ITKIOBMPTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/image_color.bmp} + ${ITK_TEST_OUTPUT_DIR}/image_color.bmp + itkBMPImageIOTest + DATA{${ITK_DATA_ROOT}/Input/image_color.bmp} + ${ITK_TEST_OUTPUT_DIR}/image_color.bmp) +itk_add_test( + NAME + itkBMPImageIOTest7 + COMMAND + ITKIOBMPTestDriver + itkBMPImageIOTest3 + DATA{${ITK_DATA_ROOT}/Input/grayscale_lowerleft.bmp} + DATA{${ITK_DATA_ROOT}/Input/grayscale_upperleft.bmp}) +itk_add_test( + NAME + itkBMPImageIOTest8 + COMMAND + ITKIOBMPTestDriver + itkBMPImageIOTest4 + DATA{${ITK_DATA_ROOT}/Input/color_lowerleft.bmp} + DATA{${ITK_DATA_ROOT}/Input/color_upperleft.bmp}) +itk_add_test( + NAME + itkBMPImageIOTest9 + COMMAND + ITKIOBMPTestDriver + itkBMPImageIOTest5 + DATA{${ITK_DATA_ROOT}/Input/grayscale_lowerleft_rle.bmp} + DATA{${ITK_DATA_ROOT}/Input/grayscale_lowerleft.bmp}) +itk_add_test( + NAME + itkBMPImageIOTestPaletteExpanded + COMMAND + ITKIOBMPTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkBMPImageIOTestPaletteExpanded.bmp + 8bb8e63723835db9d92690351a71783f + itkBMPImageIOTestPalette + DATA{Input/HeliconiusNumataPalette.bmp} + ${ITK_TEST_OUTPUT_DIR}/itkBMPImageIOTestPaletteExpanded.bmp + 1 + 0) +itk_add_test( + NAME + itkBMPImageIOTestPaletteNotExpanded + COMMAND + ITKIOBMPTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkBMPImageIOTestPaletteNotExpanded.bmp + 93a72ac86af5191d777707135c98999d + itkBMPImageIOTestPalette + DATA{Input/HeliconiusNumataPalette.bmp} + ${ITK_TEST_OUTPUT_DIR}/itkBMPImageIOTestPaletteNotExpanded.bmp + 0 + 1) +itk_add_test( + NAME + itkBMPImageIOTestPaletteNotExpandedGrey + COMMAND + ITKIOBMPTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkBMPImageIOTestPaletteNotExpandedGrey.bmp + 93a72ac86af5191d777707135c98999d + itkBMPImageIOTestPalette + DATA{Input/HeliconiusNumataPalette.bmp} + ${ITK_TEST_OUTPUT_DIR}/itkBMPImageIOTestPaletteNotExpandedGrey.bmp + 0 + 0) -itk_add_test(NAME itkBMPImageIOTestPaletteExpanded - COMMAND ITKIOBMPTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkBMPImageIOTestPaletteExpanded.bmp - 8bb8e63723835db9d92690351a71783f - itkBMPImageIOTestPalette DATA{Input/HeliconiusNumataPalette.bmp} ${ITK_TEST_OUTPUT_DIR}/itkBMPImageIOTestPaletteExpanded.bmp 1 0) -itk_add_test(NAME itkBMPImageIOTestPaletteNotExpanded - COMMAND ITKIOBMPTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkBMPImageIOTestPaletteNotExpanded.bmp - 93a72ac86af5191d777707135c98999d - itkBMPImageIOTestPalette DATA{Input/HeliconiusNumataPalette.bmp} ${ITK_TEST_OUTPUT_DIR}/itkBMPImageIOTestPaletteNotExpanded.bmp 0 1) -itk_add_test(NAME itkBMPImageIOTestPaletteNotExpandedGrey - COMMAND ITKIOBMPTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkBMPImageIOTestPaletteNotExpandedGrey.bmp - 93a72ac86af5191d777707135c98999d - itkBMPImageIOTestPalette DATA{Input/HeliconiusNumataPalette.bmp} ${ITK_TEST_OUTPUT_DIR}/itkBMPImageIOTestPaletteNotExpandedGrey.bmp 0 0) - -itk_add_test(NAME itkBMPImageIOTestExtensionNotRequired - COMMAND ITKIOBMPTestDriver - itkBMPImageIOTestExtension ${TEMP} - ) +itk_add_test( + NAME + itkBMPImageIOTestExtensionNotRequired + COMMAND + ITKIOBMPTestDriver + itkBMPImageIOTestExtension + ${TEMP}) diff --git a/Modules/IO/BioRad/itk-module.cmake b/Modules/IO/BioRad/itk-module.cmake index 021463b0b0f..3539a80ce0a 100644 --- a/Modules/IO/BioRad/itk-module.cmake +++ b/Modules/IO/BioRad/itk-module.cmake @@ -1,15 +1,16 @@ -set(DOCUMENTATION "This module contains ImageIO classes for reading Bio-Rad images. The Bio-Rad file format is used by confocal microscopes like MRC 1024 and MRC 600.") -itk_module(ITKIOBioRad +itk_module( + ITKIOBioRad ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase TEST_DEPENDS - ITKTestKernel + ITKTestKernel FACTORY_NAMES - ImageIO::BioRad + ImageIO::BioRad DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/BioRad/src/CMakeLists.txt b/Modules/IO/BioRad/src/CMakeLists.txt index b8ddb8b6e1d..98abebf47a9 100644 --- a/Modules/IO/BioRad/src/CMakeLists.txt +++ b/Modules/IO/BioRad/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOBioRad_SRCS - itkBioRadImageIOFactory.cxx - itkBioRadImageIO.cxx - ) +set(ITKIOBioRad_SRCS itkBioRadImageIOFactory.cxx itkBioRadImageIO.cxx) itk_module_add_library(ITKIOBioRad ${ITKIOBioRad_SRCS}) diff --git a/Modules/IO/BioRad/test/CMakeLists.txt b/Modules/IO/BioRad/test/CMakeLists.txt index 1184389e523..a4f04830dc4 100644 --- a/Modules/IO/BioRad/test/CMakeLists.txt +++ b/Modules/IO/BioRad/test/CMakeLists.txt @@ -1,11 +1,16 @@ itk_module_test() -set(ITKIOBioRadTests -itkBioRadImageIOTest.cxx -) +set(ITKIOBioRadTests itkBioRadImageIOTest.cxx) -CreateTestDriver(ITKIOBioRad "${ITKIOBioRad-Test_LIBRARIES}" "${ITKIOBioRadTests}") +createtestdriver(ITKIOBioRad "${ITKIOBioRad-Test_LIBRARIES}" "${ITKIOBioRadTests}") -itk_add_test(NAME ITKBioRadImageIOTest - COMMAND ITKIOBioRadTestDriver - --compare DATA{Input/biorad.pic} ${ITK_TEST_OUTPUT_DIR}/biorad_new.pic - itkBioRadImageIOTest DATA{Input/biorad.pic} ${ITK_TEST_OUTPUT_DIR}/biorad_new.pic) +itk_add_test( + NAME + ITKBioRadImageIOTest + COMMAND + ITKIOBioRadTestDriver + --compare + DATA{Input/biorad.pic} + ${ITK_TEST_OUTPUT_DIR}/biorad_new.pic + itkBioRadImageIOTest + DATA{Input/biorad.pic} + ${ITK_TEST_OUTPUT_DIR}/biorad_new.pic) diff --git a/Modules/IO/Bruker/itk-module.cmake b/Modules/IO/Bruker/itk-module.cmake index 2bcdbb26cdf..4dbea73be11 100644 --- a/Modules/IO/Bruker/itk-module.cmake +++ b/Modules/IO/Bruker/itk-module.cmake @@ -1,13 +1,14 @@ set(DOCUMENTATION "This module contains classes that read Bruker image files.") -itk_module(ITKIOBruker +itk_module( + ITKIOBruker ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase TEST_DEPENDS - ITKTestKernel - ITKIOMeta + ITKTestKernel + ITKIOMeta FACTORY_NAMES - ImageIO::Bruker2dseq + ImageIO::Bruker2dseq DESCRIPTION - "${DOCUMENTATION}") + "${DOCUMENTATION}") diff --git a/Modules/IO/Bruker/src/CMakeLists.txt b/Modules/IO/Bruker/src/CMakeLists.txt index 86fef417da0..1995e96c230 100644 --- a/Modules/IO/Bruker/src/CMakeLists.txt +++ b/Modules/IO/Bruker/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOBruker2dseq_SRCS - itkBruker2dseqImageIOFactory.cxx - itkBruker2dseqImageIO.cxx -) +set(ITKIOBruker2dseq_SRCS itkBruker2dseqImageIOFactory.cxx itkBruker2dseqImageIO.cxx) itk_module_add_library(ITKIOBruker ${ITKIOBruker2dseq_SRCS}) diff --git a/Modules/IO/Bruker/test/CMakeLists.txt b/Modules/IO/Bruker/test/CMakeLists.txt index ecf97f9aa84..4ea2d17b8d9 100644 --- a/Modules/IO/Bruker/test/CMakeLists.txt +++ b/Modules/IO/Bruker/test/CMakeLists.txt @@ -1,46 +1,55 @@ itk_module_test() -set(ITKIOBrukerTests - itkBrukerImageTest.cxx -) +set(ITKIOBrukerTests itkBrukerImageTest.cxx) -CreateTestDriver(ITKIOBruker "${ITKIOBruker-Test_LIBRARIES}" "${ITKIOBrukerTests}") +createtestdriver(ITKIOBruker "${ITKIOBruker-Test_LIBRARIES}" "${ITKIOBrukerTests}") -ExternalData_Expand_Arguments(ITKData - ExpandedData # Ignore output variable - DATA{Input/,RECURSE:,REGEX:.*}) +ExternalData_expand_arguments(ITKData ExpandedData # Ignore output variable + DATA{Input/,RECURSE:,REGEX:.*}) -itk_add_test(NAME itkBruker2dseq_PV6.0_INT16 - COMMAND ITKIOBrukerTestDriver +itk_add_test( + NAME + itkBruker2dseq_PV6.0_INT16 + COMMAND + ITKIOBrukerTestDriver --compare - ${ITK_TEST_OUTPUT_DIR}/PV6.0_FLASH_INT16.mha - DATA{Baseline/PV6.0_FLASH_INT16.mha} + ${ITK_TEST_OUTPUT_DIR}/PV6.0_FLASH_INT16.mha + DATA{Baseline/PV6.0_FLASH_INT16.mha} itkBrukerImageTest - DATA{Input/PV6.0_FLASH/pdata/1/2dseq} - ${ITK_TEST_OUTPUT_DIR}/PV6.0_FLASH_INT16.mha) + DATA{Input/PV6.0_FLASH/pdata/1/2dseq} + ${ITK_TEST_OUTPUT_DIR}/PV6.0_FLASH_INT16.mha) -itk_add_test(NAME itkBruker2dseq_PV6.0_UINT8 - COMMAND ITKIOBrukerTestDriver +itk_add_test( + NAME + itkBruker2dseq_PV6.0_UINT8 + COMMAND + ITKIOBrukerTestDriver --compare - ${ITK_TEST_OUTPUT_DIR}/PV6.0_FLASH_UINT8.mha - DATA{Baseline/PV6.0_FLASH_UINT8.mha} + ${ITK_TEST_OUTPUT_DIR}/PV6.0_FLASH_UINT8.mha + DATA{Baseline/PV6.0_FLASH_UINT8.mha} itkBrukerImageTest - DATA{Input/PV6.0_FLASH/pdata/2/2dseq} - ${ITK_TEST_OUTPUT_DIR}/PV6.0_FLASH_UINT8.mha) + DATA{Input/PV6.0_FLASH/pdata/2/2dseq} + ${ITK_TEST_OUTPUT_DIR}/PV6.0_FLASH_UINT8.mha) -itk_add_test(NAME itkBruker2dseq_PV6.0_FLOAT32 - COMMAND ITKIOBrukerTestDriver +itk_add_test( + NAME + itkBruker2dseq_PV6.0_FLOAT32 + COMMAND + ITKIOBrukerTestDriver --compare - ${ITK_TEST_OUTPUT_DIR}/PV6.0_FLASH_FLOAT32.mha - DATA{Baseline/PV6.0_FLASH_FLOAT32.mha} + ${ITK_TEST_OUTPUT_DIR}/PV6.0_FLASH_FLOAT32.mha + DATA{Baseline/PV6.0_FLASH_FLOAT32.mha} itkBrukerImageTest - DATA{Input/PV6.0_FLASH/pdata/2/2dseq} - ${ITK_TEST_OUTPUT_DIR}/PV6.0_FLASH_FLOAT32.mha) + DATA{Input/PV6.0_FLASH/pdata/2/2dseq} + ${ITK_TEST_OUTPUT_DIR}/PV6.0_FLASH_FLOAT32.mha) -itk_add_test(NAME itkBruker2dseq_PV5.1_FSE_INT16 - COMMAND ITKIOBrukerTestDriver +itk_add_test( + NAME + itkBruker2dseq_PV5.1_FSE_INT16 + COMMAND + ITKIOBrukerTestDriver --compare - ${ITK_TEST_OUTPUT_DIR}/PV5.1_FSE_INT16.mha - DATA{Baseline/PV5.1_FSE_INT16.mha} + ${ITK_TEST_OUTPUT_DIR}/PV5.1_FSE_INT16.mha + DATA{Baseline/PV5.1_FSE_INT16.mha} itkBrukerImageTest - DATA{Input/PV5.1_FSE/pdata/1/2dseq} - ${ITK_TEST_OUTPUT_DIR}/PV5.1_FSE_INT16.mha) + DATA{Input/PV5.1_FSE/pdata/1/2dseq} + ${ITK_TEST_OUTPUT_DIR}/PV5.1_FSE_INT16.mha) diff --git a/Modules/IO/CSV/itk-module.cmake b/Modules/IO/CSV/itk-module.cmake index 8c2ef355c76..1135cec7e1b 100644 --- a/Modules/IO/CSV/itk-module.cmake +++ b/Modules/IO/CSV/itk-module.cmake @@ -1,7 +1,7 @@ -itk_module(ITKIOCSV +itk_module( + ITKIOCSV ENABLE_SHARED PRIVATE_DEPENDS - ITKIOImageBase + ITKIOImageBase TEST_DEPENDS - ITKTestKernel -) + ITKTestKernel) diff --git a/Modules/IO/CSV/src/CMakeLists.txt b/Modules/IO/CSV/src/CMakeLists.txt index 1324f098dd8..5c831875116 100644 --- a/Modules/IO/CSV/src/CMakeLists.txt +++ b/Modules/IO/CSV/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKIOCSV_SRCS - itkCSVFileReaderBase.cxx - ) +set(ITKIOCSV_SRCS itkCSVFileReaderBase.cxx) itk_module_add_library(ITKIOCSV ${ITKIOCSV_SRCS}) diff --git a/Modules/IO/CSV/test/CMakeLists.txt b/Modules/IO/CSV/test/CMakeLists.txt index 64950620998..683a1719ad0 100644 --- a/Modules/IO/CSV/test/CMakeLists.txt +++ b/Modules/IO/CSV/test/CMakeLists.txt @@ -1,20 +1,29 @@ itk_module_test() -set(ITKIOCSVTests -itkCSVArray2DFileReaderTest.cxx -itkCSVArray2DFileReaderWriterTest.cxx -itkCSVNumericObjectFileWriterTest.cxx -) +set(ITKIOCSVTests itkCSVArray2DFileReaderTest.cxx itkCSVArray2DFileReaderWriterTest.cxx + itkCSVNumericObjectFileWriterTest.cxx) set(TEMP ${ITK_TEST_OUTPUT_DIR}) -CreateTestDriver(ITKIOCSV "${ITKIOCSV-Test_LIBRARIES}" "${ITKIOCSVTests}") +createtestdriver(ITKIOCSV "${ITKIOCSV-Test_LIBRARIES}" "${ITKIOCSVTests}") -itk_add_test(NAME itkCSVArray2DFileReaderTest - COMMAND ITKIOCSVTestDriver itkCSVArray2DFileReaderTest - DATA{Input/csvFileReaderTestInput.csv}) -itk_add_test(NAME itkCSVNumericObjectFileWriterTest - COMMAND ITKIOCSVTestDriver itkCSVNumericObjectFileWriterTest - ${TEMP}/NumericObjectToCSVFileWriterOutput.csv) -itk_add_test(NAME itkCSVArray2DFileReaderWriterTest - COMMAND ITKIOCSVTestDriver itkCSVArray2DFileReaderWriterTest - ${TEMP}/csvFileArray2DReaderWriterTestOutput.csv) +itk_add_test( + NAME + itkCSVArray2DFileReaderTest + COMMAND + ITKIOCSVTestDriver + itkCSVArray2DFileReaderTest + DATA{Input/csvFileReaderTestInput.csv}) +itk_add_test( + NAME + itkCSVNumericObjectFileWriterTest + COMMAND + ITKIOCSVTestDriver + itkCSVNumericObjectFileWriterTest + ${TEMP}/NumericObjectToCSVFileWriterOutput.csv) +itk_add_test( + NAME + itkCSVArray2DFileReaderWriterTest + COMMAND + ITKIOCSVTestDriver + itkCSVArray2DFileReaderWriterTest + ${TEMP}/csvFileArray2DReaderWriterTestOutput.csv) diff --git a/Modules/IO/DCMTK/itk-module.cmake b/Modules/IO/DCMTK/itk-module.cmake index f7bd2db8758..0cef19ddfb6 100644 --- a/Modules/IO/DCMTK/itk-module.cmake +++ b/Modules/IO/DCMTK/itk-module.cmake @@ -1,17 +1,19 @@ -set(DOCUMENTATION "This module contains the third party DCMTK DCMTK is a collection of libraries and applications implementing large parts the DICOM standard.") +set(DOCUMENTATION + "This module contains the third party DCMTK DCMTK is a collection of libraries and applications implementing large parts the DICOM standard." +) -itk_module(ITKIODCMTK +itk_module( + ITKIODCMTK ENABLE_SHARED PRIVATE_DEPENDS - ITKDCMTK - ITKIOImageBase + ITKDCMTK + ITKIOImageBase TEST_DEPENDS - ITKTestKernel - ITKImageIntensity + ITKTestKernel + ITKImageIntensity FACTORY_NAMES - ImageIO::DCMTK + ImageIO::DCMTK DESCRIPTION - "${DOCUMENTATION}" - EXCLUDE_FROM_DEFAULT -) + "${DOCUMENTATION}" + EXCLUDE_FROM_DEFAULT) diff --git a/Modules/IO/DCMTK/src/CMakeLists.txt b/Modules/IO/DCMTK/src/CMakeLists.txt index 4f27c6af683..e172a2bb7b3 100644 --- a/Modules/IO/DCMTK/src/CMakeLists.txt +++ b/Modules/IO/DCMTK/src/CMakeLists.txt @@ -1,9 +1,8 @@ set(ITKIODCMTK_SRC - itkDCMTKImageIO.cxx - itkDCMTKFileReader.cxx - itkDCMTKImageIOFactory.cxx - itkDCMTKSeriesFileNames.cxx -) + itkDCMTKImageIO.cxx + itkDCMTKFileReader.cxx + itkDCMTKImageIOFactory.cxx + itkDCMTKSeriesFileNames.cxx) add_library(ITKIODCMTK ${ITK_LIBRARY_BUILD_TYPE} ${ITKIODCMTK_SRC}) diff --git a/Modules/IO/DCMTK/test/CMakeLists.txt b/Modules/IO/DCMTK/test/CMakeLists.txt index 4669e507690..4636c00f0f7 100644 --- a/Modules/IO/DCMTK/test/CMakeLists.txt +++ b/Modules/IO/DCMTK/test/CMakeLists.txt @@ -1,86 +1,145 @@ itk_module_test() set(ITKIODCMTKTests - itkDCMTKImageIOTest.cxx - itkDCMTKRGBImageIOTest.cxx - itkDCMTKSeriesReadImageWrite.cxx - itkDCMTKSeriesStreamReadImageWrite.cxx - itkDCMTKImageIOOrthoDirTest.cxx - itkDCMTKMultiFrame4DTest.cxx - itkDCMTKLoggerTest.cxx - itkDCMTKImageIOSlopeInterceptTest.cxx - itkDCMTKImageIOMultiFrameImageTest.cxx - itkDCMTKImageIONoPreambleTest.cxx -) - -CreateTestDriver(ITKIODCMTK "${ITKIODCMTK-Test_LIBRARIES}" "${ITKIODCMTKTests}") - -itk_add_test(NAME itkDCMTKImageIOTest1 - COMMAND ITKIODCMTKTestDriver itkDCMTKImageIOTest + itkDCMTKImageIOTest.cxx + itkDCMTKRGBImageIOTest.cxx + itkDCMTKSeriesReadImageWrite.cxx + itkDCMTKSeriesStreamReadImageWrite.cxx + itkDCMTKImageIOOrthoDirTest.cxx + itkDCMTKMultiFrame4DTest.cxx + itkDCMTKLoggerTest.cxx + itkDCMTKImageIOSlopeInterceptTest.cxx + itkDCMTKImageIOMultiFrameImageTest.cxx + itkDCMTKImageIONoPreambleTest.cxx) + +createtestdriver(ITKIODCMTK "${ITKIODCMTK-Test_LIBRARIES}" "${ITKIODCMTKTests}") + +itk_add_test( + NAME + itkDCMTKImageIOTest1 + COMMAND + ITKIODCMTKTestDriver + itkDCMTKImageIOTest DATA{${ITK_DATA_ROOT}/Input/dicom-sc_cs-1.dcm} ${ITK_TEST_OUTPUT_DIR}/itkDCMTKImageIOTest.dcm ${ITK_TEST_OUTPUT_DIR}/itkDCMTKImageIOTest.png ${ITK_TEST_OUTPUT_DIR}/itkDCMTKRescaleImageIOTest.dcm) -itk_add_test(NAME itkDCMTKImageIOTest2 - COMMAND ITKIODCMTKTestDriver itkDCMTKImageIOTest +itk_add_test( + NAME + itkDCMTKImageIOTest2 + COMMAND + ITKIODCMTKTestDriver + itkDCMTKImageIOTest DATA{${ITK_DATA_ROOT}/Input/itkGDCMImageIOTest.dcm} ${ITK_TEST_OUTPUT_DIR}/itkDCMTKImageIOTest2.dcm ${ITK_TEST_OUTPUT_DIR}/itkDCMTKImageIOTest2.png ${ITK_TEST_OUTPUT_DIR}/itkDCMTKRescaleImageIOTest2.dcm) -itk_add_test(NAME itkDCMTKImageIOTest3 - COMMAND ITKIODCMTKTestDriver itkDCMTKImageIOTest +itk_add_test( + NAME + itkDCMTKImageIOTest3 + COMMAND + ITKIODCMTKTestDriver + itkDCMTKImageIOTest DATA{${ITK_DATA_ROOT}/Input/012345.002.050} ${ITK_TEST_OUTPUT_DIR}/itkDCMTKImageIOTest3.dcm ${ITK_TEST_OUTPUT_DIR}/itkDCMTKImageIOTest3.png ${ITK_TEST_OUTPUT_DIR}/itkDCMTKRescaleImageIOTest3.dcm) -itk_add_test(NAME itkDCMTKImageIOTest4 COMMAND ITKIODCMTKTestDriver +itk_add_test( + NAME + itkDCMTKImageIOTest4 + COMMAND + ITKIODCMTKTestDriver itkDCMTKImageIOTest DATA{${ITK_DATA_ROOT}/Input/itkGDCMImageIOTest3.dcm} ${ITK_TEST_OUTPUT_DIR}/itkDCMTKImageIOTest4.dcm ${ITK_TEST_OUTPUT_DIR}/itkDCMTKImageIOTest4.png ${ITK_TEST_OUTPUT_DIR}/itkDCMTKRescaleImageIOTest4.dcm) -itk_add_test(NAME itkDCMTKSeriesReadImageWrite - COMMAND ITKIODCMTKTestDriver itkDCMTKSeriesReadImageWrite +itk_add_test( + NAME + itkDCMTKSeriesReadImageWrite + COMMAND + ITKIODCMTKTestDriver + itkDCMTKSeriesReadImageWrite DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} - ${ITK_TEST_OUTPUT_DIR}/itkDCMTKSeriesReadImageWrite.vtk 0 0 0) - -itk_add_test(NAME itkDCMTKDirCosinesTest - COMMAND ITKIODCMTKTestDriver itkDCMTKSeriesReadImageWrite + ${ITK_TEST_OUTPUT_DIR}/itkDCMTKSeriesReadImageWrite.vtk + 0 + 0 + 0) + +itk_add_test( + NAME + itkDCMTKDirCosinesTest + COMMAND + ITKIODCMTKTestDriver + itkDCMTKSeriesReadImageWrite DATA{${ITK_DATA_ROOT}/Input/DicomDirectionsTest/,REGEX:1020_[0-9]+.dcm} - ${ITK_TEST_OUTPUT_DIR}/itkDCMTKSeriesReadImageWrite.vtk 0 0 0) - -set_property(TEST itkDCMTKSeriesReadImageWrite APPEND PROPERTY DEPENDS ITKData) - -itk_add_test(NAME itkDCMTKSeriesStreamReadImageWrite1 - COMMAND ITKIODCMTKTestDriver itkDCMTKSeriesStreamReadImageWrite + ${ITK_TEST_OUTPUT_DIR}/itkDCMTKSeriesReadImageWrite.vtk + 0 + 0 + 0) + +set_property( + TEST itkDCMTKSeriesReadImageWrite + APPEND + PROPERTY DEPENDS ITKData) + +itk_add_test( + NAME + itkDCMTKSeriesStreamReadImageWrite1 + COMMAND + ITKIODCMTKTestDriver + itkDCMTKSeriesStreamReadImageWrite DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} ${ITK_TEST_OUTPUT_DIR}/itkDCMTKSeriesStreamReadImageWrite1.mhd - 0.859375 0.85939 1.60016 0) - -itk_add_test(NAME itkDCMTKSeriesImageOrientationWrite1 - COMMAND ITKIODCMTKTestDriver - --compareCoordinateTolerance 1e-3 - --compare DATA{Baseline/itkDCMTKSeriesImageOrientationWrite1.mha} + 0.859375 + 0.85939 + 1.60016 + 0) + +itk_add_test( + NAME + itkDCMTKSeriesImageOrientationWrite1 + COMMAND + ITKIODCMTKTestDriver + --compareCoordinateTolerance + 1e-3 + --compare + DATA{Baseline/itkDCMTKSeriesImageOrientationWrite1.mha} ${ITK_TEST_OUTPUT_DIR}/itkDCMTKSeriesImageOrientationWrite1.mha itkDCMTKSeriesReadImageWrite DATA{${ITK_DATA_ROOT}/Input/DicomImageOrientationTest/,REGEX:ImageOrientation.[0-9]+.dcm} - ${ITK_TEST_OUTPUT_DIR}/itkDCMTKSeriesImageOrientationWrite1.mha 0 0 0) - -itk_add_test(NAME itkDCMTKImageIOOrthoDirTest - COMMAND ITKIODCMTKTestDriver itkDCMTKImageIOOrthoDirTest + ${ITK_TEST_OUTPUT_DIR}/itkDCMTKSeriesImageOrientationWrite1.mha + 0 + 0 + 0) + +itk_add_test( + NAME + itkDCMTKImageIOOrthoDirTest + COMMAND + ITKIODCMTKTestDriver + itkDCMTKImageIOOrthoDirTest DATA{${ITK_DATA_ROOT}/Input/OrthogonalDirectionsTest.dcm}) -itk_add_test(NAME itkDCMTKMultiFrame4DTest - COMMAND ITKIODCMTKTestDriver itkDCMTKMultiFrame4DTest +itk_add_test( + NAME + itkDCMTKMultiFrame4DTest + COMMAND + ITKIODCMTKTestDriver + itkDCMTKMultiFrame4DTest DATA{${ITK_DATA_ROOT}/Input/Philips_4D_DICOM.dcm} ${ITK_TEST_OUTPUT_DIR}/Philips_4D_DICOM.nrrd) -itk_add_test(NAME itkDCMTKImageIONonSquareTest - COMMAND ITKIODCMTKTestDriver - --compare DATA{Baseline/itkDCMTKNonSquare.nii.gz} +itk_add_test( + NAME + itkDCMTKImageIONonSquareTest + COMMAND + ITKIODCMTKTestDriver + --compare + DATA{Baseline/itkDCMTKNonSquare.nii.gz} ${ITK_TEST_OUTPUT_DIR}/itkDCMTKNonSquare.nii.gz itkDCMTKImageIOTest DATA{${ITK_DATA_ROOT}/Input/itkDCMTKNonSquare.dcm} @@ -88,23 +147,33 @@ itk_add_test(NAME itkDCMTKImageIONonSquareTest ${ITK_TEST_OUTPUT_DIR}/itkDCMTKNonSquare.nii.gz ${ITK_TEST_OUTPUT_DIR}/itkDCMTKNonSquareRescale.dcm) -itk_add_test(NAME itkDCMTKRGBImageIOColorImageTest - COMMAND ITKIODCMTKTestDriver - --compare DATA{Baseline/itkDCMTKColorImage.png} +itk_add_test( + NAME + itkDCMTKRGBImageIOColorImageTest + COMMAND + ITKIODCMTKTestDriver + --compare + DATA{Baseline/itkDCMTKColorImage.png} ${ITK_TEST_OUTPUT_DIR}/itkDCMTKColorImage.png itkDCMTKRGBImageIOTest DATA{${ITK_DATA_ROOT}/Input/RGBDicomTest.dcm} ${ITK_TEST_OUTPUT_DIR}/itkDCMTKColorImage.png) -itk_add_test(NAME ITKDCMTKLoggerTest - COMMAND ITKIODCMTKTestDriver itkDCMTKLoggerTest - ) - -itk_add_test(NAME itkDCMTKImageIOSlopeInterceptTest - COMMAND ITKIODCMTKTestDriver itkDCMTKImageIOSlopeInterceptTest +itk_add_test( + NAME + ITKDCMTKLoggerTest + COMMAND + ITKIODCMTKTestDriver + itkDCMTKLoggerTest) + +itk_add_test( + NAME + itkDCMTKImageIOSlopeInterceptTest + COMMAND + ITKIODCMTKTestDriver + itkDCMTKImageIOSlopeInterceptTest DATA{Input/slopeInterceptOrig.dcm} - DATA{Input/slopeIntercept.dcm} - ) + DATA{Input/slopeIntercept.dcm}) # Requires additional logic in DCMTKFileReader::GetSpacing #itk_add_test(NAME itkDCMTKImageIOMultiFrameImageTest @@ -112,7 +181,10 @@ itk_add_test(NAME itkDCMTKImageIOSlopeInterceptTest # DATA{Input/MultiFrameDicomTest.dcm} # ) -itk_add_test(NAME itkDCMTKImageIONoPreambleTest - COMMAND ITKIODCMTKTestDriver itkDCMTKImageIONoPreambleTest - DATA{Input/NoPreambleDicomTest.dcm} - ) +itk_add_test( + NAME + itkDCMTKImageIONoPreambleTest + COMMAND + ITKIODCMTKTestDriver + itkDCMTKImageIONoPreambleTest + DATA{Input/NoPreambleDicomTest.dcm}) diff --git a/Modules/IO/GDCM/itk-module.cmake b/Modules/IO/GDCM/itk-module.cmake index 55b97abe10a..3bb9748a0b8 100644 --- a/Modules/IO/GDCM/itk-module.cmake +++ b/Modules/IO/GDCM/itk-module.cmake @@ -1,20 +1,21 @@ -set(DOCUMENTATION "This module contains ITK ImageIO classes for the Grassroots DICOM (GDCM) based readers and writers of the medical imaging DICOM standard.") -itk_module(ITKIOGDCM +itk_module( + ITKIOGDCM ENABLE_SHARED DEPENDS - ITKCommon - ITKIOImageBase + ITKCommon + ITKIOImageBase PRIVATE_DEPENDS - ITKGDCM + ITKGDCM TEST_DEPENDS - ITKTestKernel - ITKGDCM - ITKImageIntensity + ITKTestKernel + ITKGDCM + ITKImageIntensity FACTORY_NAMES - ImageIO::GDCM + ImageIO::GDCM DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/GDCM/src/CMakeLists.txt b/Modules/IO/GDCM/src/CMakeLists.txt index 12782b8d912..bc9f8261d2b 100644 --- a/Modules/IO/GDCM/src/CMakeLists.txt +++ b/Modules/IO/GDCM/src/CMakeLists.txt @@ -1,7 +1,3 @@ -set(ITKIOGDCM_SRCS - itkGDCMImageIO.cxx - itkGDCMImageIOFactory.cxx - itkGDCMSeriesFileNames.cxx - ) +set(ITKIOGDCM_SRCS itkGDCMImageIO.cxx itkGDCMImageIOFactory.cxx itkGDCMSeriesFileNames.cxx) itk_module_add_library(ITKIOGDCM ${ITKIOGDCM_SRCS}) diff --git a/Modules/IO/GDCM/test/CMakeLists.txt b/Modules/IO/GDCM/test/CMakeLists.txt index 396dfb0f150..28be7f91c86 100644 --- a/Modules/IO/GDCM/test/CMakeLists.txt +++ b/Modules/IO/GDCM/test/CMakeLists.txt @@ -1,248 +1,367 @@ itk_module_test() set(ITKIOGDCMTests -itkGDCMImageIOTest.cxx -itkGDCMImageIOTest2.cxx -itkGDCMImageIONoCrashTest.cxx -itkGDCMImageReadSeriesWriteTest.cxx -itkGDCMImageReadWriteTest.cxx -itkGDCMSeriesReadImageWriteTest.cxx -itkGDCMSeriesMissingDicomTagTest.cxx -itkGDCMSeriesStreamReadImageWriteTest.cxx -itkGDCMImagePositionPatientTest.cxx -itkGDCMImageIOOrthoDirTest.cxx -itkGDCMImageOrientationPatientTest.cxx -itkGDCMLoadImageSpacingTest.cxx -itkGDCMLegacyMultiFrameTest.cxx -itkGDCMImageIONoPreambleTest.cxx -) - -CreateTestDriver(ITKIOGDCM "${ITKIOGDCM-Test_LIBRARIES}" "${ITKIOGDCMTests}") - -itk_add_test(NAME itkGDCMImageIOTest1 - COMMAND ITKIOGDCMTestDriver - --compare - DATA{Baseline/itkGDCMImageIOTestBaseline.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest.mha - --compare - DATA{Baseline/itkGDCMImageIOTestRescaledBaseline.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTestRescaled.mha + itkGDCMImageIOTest.cxx + itkGDCMImageIOTest2.cxx + itkGDCMImageIONoCrashTest.cxx + itkGDCMImageReadSeriesWriteTest.cxx + itkGDCMImageReadWriteTest.cxx + itkGDCMSeriesReadImageWriteTest.cxx + itkGDCMSeriesMissingDicomTagTest.cxx + itkGDCMSeriesStreamReadImageWriteTest.cxx + itkGDCMImagePositionPatientTest.cxx + itkGDCMImageIOOrthoDirTest.cxx + itkGDCMImageOrientationPatientTest.cxx + itkGDCMLoadImageSpacingTest.cxx + itkGDCMLegacyMultiFrameTest.cxx + itkGDCMImageIONoPreambleTest.cxx) + +createtestdriver(ITKIOGDCM "${ITKIOGDCM-Test_LIBRARIES}" "${ITKIOGDCMTests}") + +itk_add_test( + NAME + itkGDCMImageIOTest1 + COMMAND + ITKIOGDCMTestDriver + --compare + DATA{Baseline/itkGDCMImageIOTestBaseline.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest.mha + --compare + DATA{Baseline/itkGDCMImageIOTestRescaledBaseline.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTestRescaled.mha itkGDCMImageIOTest - DATA{${ITK_DATA_ROOT}/Input/dicom-sc_cs-1.dcm} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest.dcm - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest.mha - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTestRescaled.dcm - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTestRescaled.mha - ) -itk_add_test(NAME itkGDCMImageIOTest2 - COMMAND ITKIOGDCMTestDriver - --compare - DATA{Baseline/itkGDCMImageIOTest2Baseline.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest2.mha - --compare - DATA{Baseline/itkGDCMImageIOTest2RescaledBaseline.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest2Rescaled.mha + DATA{${ITK_DATA_ROOT}/Input/dicom-sc_cs-1.dcm} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest.dcm + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest.mha + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTestRescaled.dcm + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTestRescaled.mha) +itk_add_test( + NAME + itkGDCMImageIOTest2 + COMMAND + ITKIOGDCMTestDriver + --compare + DATA{Baseline/itkGDCMImageIOTest2Baseline.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest2.mha + --compare + DATA{Baseline/itkGDCMImageIOTest2RescaledBaseline.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest2Rescaled.mha itkGDCMImageIOTest - DATA{${ITK_DATA_ROOT}/Input/itkGDCMImageIOTest.dcm} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest2.dcm - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest2.mha - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest2Rescaled.dcm - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest2Rescaled.mha - ) -itk_add_test(NAME itkGDCMImageIOTest3 - COMMAND ITKIOGDCMTestDriver - --compare - DATA{Baseline/itkGDCMImageIOTest3Baseline.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3.mha - --compare - DATA{Baseline/itkGDCMImageIOTest3RescaledBaseline.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3Rescaled.mha + DATA{${ITK_DATA_ROOT}/Input/itkGDCMImageIOTest.dcm} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest2.dcm + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest2.mha + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest2Rescaled.dcm + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest2Rescaled.mha) +itk_add_test( + NAME + itkGDCMImageIOTest3 + COMMAND + ITKIOGDCMTestDriver + --compare + DATA{Baseline/itkGDCMImageIOTest3Baseline.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3.mha + --compare + DATA{Baseline/itkGDCMImageIOTest3RescaledBaseline.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3Rescaled.mha itkGDCMImageIOTest - DATA{${ITK_DATA_ROOT}/Input/itkGDCMImageIOTest3.dcm} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3.dcm - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3.mha - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3Rescaled.dcm - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3Rescaled.mha - ) -itk_add_test(NAME itkGDCMImageIOTest4 - COMMAND ITKIOGDCMTestDriver - --compare - DATA{Baseline/itkGDCMImageIOTest4Baseline.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest4.mha - --compare - DATA{Baseline/itkGDCMImageIOTest4RescaledBaseline.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest4Rescaled.mha + DATA{${ITK_DATA_ROOT}/Input/itkGDCMImageIOTest3.dcm} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3.dcm + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3.mha + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3Rescaled.dcm + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3Rescaled.mha) +itk_add_test( + NAME + itkGDCMImageIOTest4 + COMMAND + ITKIOGDCMTestDriver + --compare + DATA{Baseline/itkGDCMImageIOTest4Baseline.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest4.mha + --compare + DATA{Baseline/itkGDCMImageIOTest4RescaledBaseline.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest4Rescaled.mha itkGDCMImageIOTest - DATA{${ITK_DATA_ROOT}/Input/012345.002.050} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest4.dcm - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest4.mha - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest4Rescaled.dcm - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest4Rescaled.mha - ) -itk_add_test(NAME itkGDCMImageIOTest5 - COMMAND ITKIOGDCMTestDriver itkGDCMImageIOTest2 - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest5) - -itk_add_test(NAME itkGDCMSeriesReadImageWriteTest - COMMAND ITKIOGDCMTestDriver itkGDCMSeriesReadImageWriteTest - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMSeriesReadImageWriteTest.vtk ${ITK_TEST_OUTPUT_DIR}) - -set_property(TEST itkGDCMSeriesReadImageWriteTest APPEND PROPERTY DEPENDS ITKData) - -itk_add_test(NAME itkGDCMSeriesStreamReadImageWriteTest1 - COMMAND ITKIOGDCMTestDriver itkGDCMSeriesStreamReadImageWriteTest - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMSeriesStreamReadImageWriteTest1.mhd 0.859375 0.85939 1.60016 0 1 0 0 0) - -set_property(TEST itkGDCMSeriesStreamReadImageWriteTest1 APPEND PROPERTY DEPENDS ITKData) - -itk_add_test(NAME itkGDCMSeriesStreamReadImageWriteTest2 - COMMAND ITKIOGDCMTestDriver itkGDCMSeriesStreamReadImageWriteTest - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMSeriesStreamReadImageWriteTest2.mhd 0.859375 0.85939 1.60016 0 1 0 0 1) - -set_property(TEST itkGDCMSeriesStreamReadImageWriteTest2 APPEND PROPERTY DEPENDS ITKData) - -itk_add_test(NAME itkGDCMImagePositionPatientTest - COMMAND ITKIOGDCMTestDriver itkGDCMImagePositionPatientTest - ${ITK_TEST_OUTPUT_DIR}) - -itk_add_test(NAME itkGDCMImageReadSeriesWriteTest - COMMAND ITKIOGDCMTestDriver - --compare DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageReadSeriesWriteTest.mha - itkGDCMImageReadSeriesWriteTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageReadSeriesWriteTest - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageReadSeriesWriteTest.mha) - -itk_add_test(NAME itkGDCMSeriesMissingDicomTagTest - COMMAND ITKIOGDCMTestDriver itkGDCMSeriesMissingDicomTagTest + DATA{${ITK_DATA_ROOT}/Input/012345.002.050} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest4.dcm + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest4.mha + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest4Rescaled.dcm + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest4Rescaled.mha) +itk_add_test( + NAME + itkGDCMImageIOTest5 + COMMAND + ITKIOGDCMTestDriver + itkGDCMImageIOTest2 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest5) + +itk_add_test( + NAME + itkGDCMSeriesReadImageWriteTest + COMMAND + ITKIOGDCMTestDriver + itkGDCMSeriesReadImageWriteTest + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMSeriesReadImageWriteTest.vtk + ${ITK_TEST_OUTPUT_DIR}) + +set_property( + TEST itkGDCMSeriesReadImageWriteTest + APPEND + PROPERTY DEPENDS ITKData) + +itk_add_test( + NAME + itkGDCMSeriesStreamReadImageWriteTest1 + COMMAND + ITKIOGDCMTestDriver + itkGDCMSeriesStreamReadImageWriteTest + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMSeriesStreamReadImageWriteTest1.mhd + 0.859375 + 0.85939 + 1.60016 + 0 + 1 + 0 + 0 + 0) + +set_property( + TEST itkGDCMSeriesStreamReadImageWriteTest1 + APPEND + PROPERTY DEPENDS ITKData) + +itk_add_test( + NAME + itkGDCMSeriesStreamReadImageWriteTest2 + COMMAND + ITKIOGDCMTestDriver + itkGDCMSeriesStreamReadImageWriteTest + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMSeriesStreamReadImageWriteTest2.mhd + 0.859375 + 0.85939 + 1.60016 + 0 + 1 + 0 + 0 + 1) + +set_property( + TEST itkGDCMSeriesStreamReadImageWriteTest2 + APPEND + PROPERTY DEPENDS ITKData) + +itk_add_test( + NAME + itkGDCMImagePositionPatientTest + COMMAND + ITKIOGDCMTestDriver + itkGDCMImagePositionPatientTest + ${ITK_TEST_OUTPUT_DIR}) + +itk_add_test( + NAME + itkGDCMImageReadSeriesWriteTest + COMMAND + ITKIOGDCMTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageReadSeriesWriteTest.mha + itkGDCMImageReadSeriesWriteTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageReadSeriesWriteTest + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageReadSeriesWriteTest.mha) + +itk_add_test( + NAME + itkGDCMSeriesMissingDicomTagTest + COMMAND + ITKIOGDCMTestDriver + itkGDCMSeriesMissingDicomTagTest DATA{${ITK_DATA_ROOT}/Input/DicomSeries2/,Image0075.dcm,Image0076-missingTag.dcm}) -itk_add_test(NAME itkGDCMImageIOOrthoDirTest - COMMAND ITKIOGDCMTestDriver itkGDCMImageIOOrthoDirTest +itk_add_test( + NAME + itkGDCMImageIOOrthoDirTest + COMMAND + ITKIOGDCMTestDriver + itkGDCMImageIOOrthoDirTest DATA{${ITK_DATA_ROOT}/Input/OrthogonalDirectionsTest.dcm}) -itk_add_test(NAME itkGDCMImageOrientationPatientTest - COMMAND ITKIOGDCMTestDriver itkGDCMImageOrientationPatientTest - ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkGDCMImageOrientationPatientTest + COMMAND + ITKIOGDCMTestDriver + itkGDCMImageOrientationPatientTest + ${ITK_TEST_OUTPUT_DIR}) -set_property(TEST itkGDCMSeriesMissingDicomTagTest APPEND PROPERTY DEPENDS ITKData) +set_property( + TEST itkGDCMSeriesMissingDicomTagTest + APPEND + PROPERTY DEPENDS ITKData) -itk_add_test(NAME itkGDCMImageIONoCrashTest - COMMAND ITKIOGDCMTestDriver itkGDCMImageIONoCrashTest DATA{${ITK_DATA_ROOT}/Input/OT-PAL-8-face.dcm}) +itk_add_test( + NAME + itkGDCMImageIONoCrashTest + COMMAND + ITKIOGDCMTestDriver + itkGDCMImageIONoCrashTest + DATA{${ITK_DATA_ROOT}/Input/OT-PAL-8-face.dcm}) -itk_add_test(NAME itkGDCMLoadImageSpacingTest - COMMAND ITKIOGDCMTestDriver itkGDCMLoadImageSpacingTest - DATA{Input/gdcmSpacingTest.dcm} - 0.178038 - 0.174924 - ) +itk_add_test( + NAME + itkGDCMLoadImageSpacingTest + COMMAND + ITKIOGDCMTestDriver + itkGDCMLoadImageSpacingTest + DATA{Input/gdcmSpacingTest.dcm} + 0.178038 + 0.174924) -itk_add_test(NAME itkGDCMLoadImageNoSpacingTest - COMMAND ITKIOGDCMTestDriver itkGDCMLoadImageSpacingTest +itk_add_test( + NAME + itkGDCMLoadImageNoSpacingTest + COMMAND + ITKIOGDCMTestDriver + itkGDCMLoadImageSpacingTest DATA{Input/gdcmNoSpacingTest.dcm} - 1.0 - 1.0 - ) + 1.0 + 1.0) -itk_add_test(NAME itkGDCMLegacyMultiFrameTest - COMMAND ITKIOGDCMTestDriver - --compare - DATA{Baseline/itkGDCMLegacyMultiFrameTest.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMLegacyMultiFrameTest.mha - itkGDCMLegacyMultiFrameTest - # This dataset was derived from - # https://www.dropbox.com/s/8m7ugu4cmw83fvd/dicoms-anon.zip?dl=0 - # per the discussion here - # https://discourse.slicer.org/t/dicom-multiframe-support/4806/9 - DATA{Input/LegacyMultiFrame.dcm} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMLegacyMultiFrameTest.mha - ) - -itk_add_test(NAME itkGDCMImageIONoPreambleTest - COMMAND ITKIOGDCMTestDriver itkGDCMImageIONoPreambleTest - DATA{Input/NoPreambleDicomTest.dcm} - ) - -itk_add_test(NAME itkGDCMImageReadWriteTest_RGB - COMMAND ITKIOGDCMTestDriver - --compare - DATA{Baseline/itkGDCMImageReadWriteTest_RGB.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageReadWriteTest_RGB.mha - itkGDCMImageReadWriteTest - DATA{${ITK_DATA_ROOT}/Input/RGBDicomTest.dcm} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageReadWriteTest_RGB.mha - rgb) - -itk_add_test(NAME itkGDCM_ComplianceTestRGB_JPEG2000ICT - COMMAND ITKIOGDCMTestDriver - --compare DATA{Baseline/US1_J2KI.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGDCM_ComplianceTestRGB_JPEG2000ICT.mha - itkGDCMImageReadWriteTest - DATA{Input/US1_J2KI.dcm} - ${ITK_TEST_OUTPUT_DIR}/itkGDCM_ComplianceTestRGB_JPEG2000ICT.mha - rgb) - -itk_add_test(NAME itkGDCM_ComplianceTestRGB_JPEG2000RCT - COMMAND ITKIOGDCMTestDriver - --compare DATA{Baseline/US1_J2KR.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGDCM_ComplianceTestRGB_JPEG2000RCT.mha - itkGDCMImageReadWriteTest - DATA{Input/US1_J2KR.dcm} - ${ITK_TEST_OUTPUT_DIR}/itkGDCM_ComplianceTestRGB_JPEG2000RCT.mha - rgb) - -itk_add_test(NAME itkGDCMImageReadWriteTest_JPEGBaseline1 - COMMAND ITKIOGDCMTestDriver - --compareIntensityTolerance 5 - --compareNumberOfPixelsTolerance 71 - --compare DATA{Baseline/itkGDCMImageReadWriteTest_RGB.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageReadWriteTest_JPEGBaseline1.mha - itkGDCMImageReadWriteTest - DATA{Input/JPEGBaseline1DicomTest.dcm} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageReadWriteTest_JPEGBaseline1.mha - rgb) - -itk_add_test(NAME itkGDCMImageIOTest3_mono1 - COMMAND ITKIOGDCMTestDriver - --ignoreInputInformation - --compare DATA{Baseline/itkGDCMImageIOTest3Baseline.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3_mono1.mha - itkGDCMImageReadWriteTest - DATA{Input/itkGDCMImageIOTest3_mono1.dcm} - ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3_mono1.mha - scalar - ) - -itk_add_test(NAME itkGDCM_ComplianceTest_singlebit - COMMAND ITKIOGDCMTestDriver - --compare DATA{Baseline/single-bit.mha} - ${ITK_TEST_OUTPUT_DIR}/single-bit.mha - itkGDCMImageReadWriteTest - DATA{Input/single-bit.dcm} - ${ITK_TEST_OUTPUT_DIR}/single-bit.mha - scalar) +itk_add_test( + NAME + itkGDCMLegacyMultiFrameTest + COMMAND + ITKIOGDCMTestDriver + --compare + DATA{Baseline/itkGDCMLegacyMultiFrameTest.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMLegacyMultiFrameTest.mha + itkGDCMLegacyMultiFrameTest + # This dataset was derived from + # https://www.dropbox.com/s/8m7ugu4cmw83fvd/dicoms-anon.zip?dl=0 + # per the discussion here + # https://discourse.slicer.org/t/dicom-multiframe-support/4806/9 + DATA{Input/LegacyMultiFrame.dcm} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMLegacyMultiFrameTest.mha) + +itk_add_test( + NAME + itkGDCMImageIONoPreambleTest + COMMAND + ITKIOGDCMTestDriver + itkGDCMImageIONoPreambleTest + DATA{Input/NoPreambleDicomTest.dcm}) + +itk_add_test( + NAME + itkGDCMImageReadWriteTest_RGB + COMMAND + ITKIOGDCMTestDriver + --compare + DATA{Baseline/itkGDCMImageReadWriteTest_RGB.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageReadWriteTest_RGB.mha + itkGDCMImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/RGBDicomTest.dcm} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageReadWriteTest_RGB.mha + rgb) + +itk_add_test( + NAME + itkGDCM_ComplianceTestRGB_JPEG2000ICT + COMMAND + ITKIOGDCMTestDriver + --compare + DATA{Baseline/US1_J2KI.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGDCM_ComplianceTestRGB_JPEG2000ICT.mha + itkGDCMImageReadWriteTest + DATA{Input/US1_J2KI.dcm} + ${ITK_TEST_OUTPUT_DIR}/itkGDCM_ComplianceTestRGB_JPEG2000ICT.mha + rgb) + +itk_add_test( + NAME + itkGDCM_ComplianceTestRGB_JPEG2000RCT + COMMAND + ITKIOGDCMTestDriver + --compare + DATA{Baseline/US1_J2KR.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGDCM_ComplianceTestRGB_JPEG2000RCT.mha + itkGDCMImageReadWriteTest + DATA{Input/US1_J2KR.dcm} + ${ITK_TEST_OUTPUT_DIR}/itkGDCM_ComplianceTestRGB_JPEG2000RCT.mha + rgb) + +itk_add_test( + NAME + itkGDCMImageReadWriteTest_JPEGBaseline1 + COMMAND + ITKIOGDCMTestDriver + --compareIntensityTolerance + 5 + --compareNumberOfPixelsTolerance + 71 + --compare + DATA{Baseline/itkGDCMImageReadWriteTest_RGB.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageReadWriteTest_JPEGBaseline1.mha + itkGDCMImageReadWriteTest + DATA{Input/JPEGBaseline1DicomTest.dcm} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageReadWriteTest_JPEGBaseline1.mha + rgb) + +itk_add_test( + NAME + itkGDCMImageIOTest3_mono1 + COMMAND + ITKIOGDCMTestDriver + --ignoreInputInformation + --compare + DATA{Baseline/itkGDCMImageIOTest3Baseline.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3_mono1.mha + itkGDCMImageReadWriteTest + DATA{Input/itkGDCMImageIOTest3_mono1.dcm} + ${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTest3_mono1.mha + scalar) + +itk_add_test( + NAME + itkGDCM_ComplianceTest_singlebit + COMMAND + ITKIOGDCMTestDriver + --compare + DATA{Baseline/single-bit.mha} + ${ITK_TEST_OUTPUT_DIR}/single-bit.mha + itkGDCMImageReadWriteTest + DATA{Input/single-bit.dcm} + ${ITK_TEST_OUTPUT_DIR}/single-bit.mha + scalar) function(AddComplianceTest fileName) - itk_add_test(NAME itkGDCM_ComplianceTestRGB_${fileName} - COMMAND ITKIOGDCMTestDriver - --compareIntensityTolerance 3 - --compareCoordinateTolerance 0.001 - --compare DATA{Baseline/Lily.png} - ${ITK_TEST_OUTPUT_DIR}/itkGDCM_ComplianceTestRGB_${fileName}.mha - itkGDCMImageReadWriteTest - DATA{Input/Lily/${fileName}.dcm} - ${ITK_TEST_OUTPUT_DIR}/itkGDCM_ComplianceTestRGB_${fileName}.mha - rgb) + itk_add_test( + NAME + itkGDCM_ComplianceTestRGB_${fileName} + COMMAND + ITKIOGDCMTestDriver + --compareIntensityTolerance + 3 + --compareCoordinateTolerance + 0.001 + --compare + DATA{Baseline/Lily.png} + ${ITK_TEST_OUTPUT_DIR}/itkGDCM_ComplianceTestRGB_${fileName}.mha + itkGDCMImageReadWriteTest + DATA{Input/Lily/${fileName}.dcm} + ${ITK_TEST_OUTPUT_DIR}/itkGDCM_ComplianceTestRGB_${fileName}.mha + rgb) endfunction() -AddComplianceTest(JPEG2000-YBR_RCT) -AddComplianceTest(JPEGLS-RGB) -AddComplianceTest(losslessJPEG-RGB) -AddComplianceTest(lossyJPEG-YBR_FULL_422) -AddComplianceTest(raw-RGB) -AddComplianceTest(raw-YBR_FULL) -AddComplianceTest(raw-YBR_FULL_422) -AddComplianceTest(RLE-RGB) +addcompliancetest(JPEG2000-YBR_RCT) +addcompliancetest(JPEGLS-RGB) +addcompliancetest(losslessJPEG-RGB) +addcompliancetest(lossyJPEG-YBR_FULL_422) +addcompliancetest(raw-RGB) +addcompliancetest(raw-YBR_FULL) +addcompliancetest(raw-YBR_FULL_422) +addcompliancetest(RLE-RGB) diff --git a/Modules/IO/GDCM/wrapping/test/CMakeLists.txt b/Modules/IO/GDCM/wrapping/test/CMakeLists.txt index 1bc76fe96cd..7d598b862f6 100644 --- a/Modules/IO/GDCM/wrapping/test/CMakeLists.txt +++ b/Modules/IO/GDCM/wrapping/test/CMakeLists.txt @@ -1,7 +1,15 @@ -list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) -if(ITK_WRAP_PYTHON AND ITK_WRAP_float AND wrap_2_index GREATER -1) - itk_python_add_test(NAME PythonReadDicomAndReadTagTest - COMMAND ReadDicomAndReadTagTest.py - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} - ) +list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) +if(ITK_WRAP_PYTHON + AND ITK_WRAP_float + AND wrap_2_index GREATER -1) + itk_python_add_test( + NAME + PythonReadDicomAndReadTagTest + COMMAND + ReadDicomAndReadTagTest.py + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm}) endif() diff --git a/Modules/IO/GE/itk-module.cmake b/Modules/IO/GE/itk-module.cmake index 138a5631837..904598fb5a0 100644 --- a/Modules/IO/GE/itk-module.cmake +++ b/Modules/IO/GE/itk-module.cmake @@ -1,20 +1,21 @@ -set(DOCUMENTATION "This module contains ImageIO classes for reading medical +set(DOCUMENTATION + "This module contains ImageIO classes for reading medical images produced by General Electric (GE) scanners. In particular, it has classes for the GE4, GE5, and GEAdw scanners.") -itk_module(ITKIOGE +itk_module( + ITKIOGE ENABLE_SHARED DEPENDS - ITKIOIPL + ITKIOIPL PRIVATE_DEPENDS - ITKIOImageBase + ITKIOImageBase TEST_DEPENDS - ITKTestKernel - ITKIOIPL - ITKIOSiemens + ITKTestKernel + ITKIOIPL + ITKIOSiemens FACTORY_NAMES - ImageIO::GE4 - ImageIO::GE5 + ImageIO::GE4 + ImageIO::GE5 DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/GE/src/CMakeLists.txt b/Modules/IO/GE/src/CMakeLists.txt index 026e00a4e94..b24f4727378 100644 --- a/Modules/IO/GE/src/CMakeLists.txt +++ b/Modules/IO/GE/src/CMakeLists.txt @@ -1,10 +1,9 @@ set(ITKIOGE_SRCS - itkGE5ImageIOFactory.cxx - itkGEAdwImageIO.cxx - itkGE4ImageIO.cxx - itkGEAdwImageIOFactory.cxx - itkGE5ImageIO.cxx - itkGE4ImageIOFactory.cxx - ) + itkGE5ImageIOFactory.cxx + itkGEAdwImageIO.cxx + itkGE4ImageIO.cxx + itkGEAdwImageIOFactory.cxx + itkGE5ImageIO.cxx + itkGE4ImageIOFactory.cxx) itk_module_add_library(ITKIOGE ${ITKIOGE_SRCS}) diff --git a/Modules/IO/GE/test/CMakeLists.txt b/Modules/IO/GE/test/CMakeLists.txt index a162159b6e2..e16ed2144b6 100644 --- a/Modules/IO/GE/test/CMakeLists.txt +++ b/Modules/IO/GE/test/CMakeLists.txt @@ -1,61 +1,161 @@ itk_module_test() -set(ITKIOGETests -itkGEImageIOTest.cxx -) +set(ITKIOGETests itkGEImageIOTest.cxx) -CreateTestDriver(ITKIOGE "${ITKIOGE-Test_LIBRARIES}" "${ITKIOGETests}") +createtestdriver(ITKIOGE "${ITKIOGE-Test_LIBRARIES}" "${ITKIOGETests}") -itk_add_test(NAME itkGE4 - COMMAND ITKIOGETestDriver - --compareCoordinateTolerance 1e-5 # Fails on Windows otherwise - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/19771.002.001.mha} - ${ITK_TEST_OUTPUT_DIR}/19771.002.001.mha - itkGEImageIOTest ${ITK_TEST_OUTPUT_DIR} true GE4 DATA{${ITK_DATA_ROOT}/Input/test_ge4/19771.002.001,REGEX:19771\\.002\\.00[1-6]} ${ITK_TEST_OUTPUT_DIR}/19771.002.001.mha) -itk_add_test(NAME itkGE5 - COMMAND ITKIOGETestDriver - --compareCoordinateTolerance 1e-5 # Fails on Windows otherwise - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/113766.003.001.mha} - ${ITK_TEST_OUTPUT_DIR}/113766.003.001.mha - itkGEImageIOTest ${ITK_TEST_OUTPUT_DIR} true GE5 DATA{${ITK_DATA_ROOT}/Input/test_ge5/113766.003.001,REGEX:113766\\.003\\.00[1-6]} ${ITK_TEST_OUTPUT_DIR}/113766.003.001.mha) -itk_add_test(NAME itkGE5Test2 - COMMAND ITKIOGETestDriver - --compare DATA{Baseline/c_vf1122.fre.mha} - ${ITK_TEST_OUTPUT_DIR}/c_vf1122.fre.mha - itkGEImageIOTest ${ITK_TEST_OUTPUT_DIR} true GE5 DATA{Input/c_vf1122.fre} ${ITK_TEST_OUTPUT_DIR}/c_vf1122.fre.mha) -itk_add_test(NAME itkGE5Test3 - COMMAND ITKIOGETestDriver - --compare DATA{Baseline/c_vf1122.fre.mha} - ${ITK_TEST_OUTPUT_DIR}/c_vf1123.fre.mha - itkGEImageIOTest ${ITK_TEST_OUTPUT_DIR} true GE5 DATA{Input/c_vf1123.fre} ${ITK_TEST_OUTPUT_DIR}/c_vf1123.fre.mha) -itk_add_test(NAME itkGE5Test4 - COMMAND ITKIOGETestDriver - --compare DATA{Baseline/c_vf1210.fre.mha} - ${ITK_TEST_OUTPUT_DIR}/c_vf1210.fre.mha - itkGEImageIOTest ${ITK_TEST_OUTPUT_DIR} true GE5 DATA{Input/c_vf1210.fre} ${ITK_TEST_OUTPUT_DIR}/c_vf1210.fre.mha) -itk_add_test(NAME itkGE5Test5 - COMMAND ITKIOGETestDriver - --compare DATA{Baseline/c_vf1210.fre.mha} - ${ITK_TEST_OUTPUT_DIR}/c_vf1211.fre.mha - itkGEImageIOTest ${ITK_TEST_OUTPUT_DIR} true GE5 DATA{Input/c_vf1211.fre} ${ITK_TEST_OUTPUT_DIR}/c_vf1211.fre.mha) -itk_add_test(NAME itkGEAdw - COMMAND ITKIOGETestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/I.001.mha} - ${ITK_TEST_OUTPUT_DIR}/I.001.mha - itkGEImageIOTest ${ITK_TEST_OUTPUT_DIR} true GEAdw DATA{${ITK_DATA_ROOT}/Input/test_geadw/I.001,REGEX:I\\.00[1-6]} ${ITK_TEST_OUTPUT_DIR}/I.001.mha) -itk_add_test(NAME itkSiemens - COMMAND ITKIOGETestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/3868-2-100.mha} - ${ITK_TEST_OUTPUT_DIR}/3868-2-100.mha - itkGEImageIOTest ${ITK_TEST_OUTPUT_DIR} true Siemens DATA{${ITK_DATA_ROOT}/Input/test_siemens/3868-2-100.ima,REGEX:3868-2-10[0-5]\\.ima} ${ITK_TEST_OUTPUT_DIR}/3868-2-100.mha) -itk_add_test(NAME itkGE4Fail - COMMAND ITKIOGETestDriver itkGEImageIOTest - ${ITK_TEST_OUTPUT_DIR} false GE4 DATA{${ITK_DATA_ROOT}/Input/test_ge5/113766.003.001,REGEX:113766\\.003\\.00[1-6]}) -itk_add_test(NAME itkGE5Fail - COMMAND ITKIOGETestDriver itkGEImageIOTest - ${ITK_TEST_OUTPUT_DIR} false GE5 DATA{${ITK_DATA_ROOT}/Input/test_ge4/19771.002.001,REGEX:19771\\.002\\.00[1-6]}) -itk_add_test(NAME itkGEAdwFail - COMMAND ITKIOGETestDriver itkGEImageIOTest - ${ITK_TEST_OUTPUT_DIR} false GEAdw DATA{${ITK_DATA_ROOT}/Input/test_siemens/3868-2-100.ima,REGEX:3868-2-10[0-5]\\.ima}) -itk_add_test(NAME itkSiemensFail - COMMAND ITKIOGETestDriver itkGEImageIOTest - ${ITK_TEST_OUTPUT_DIR} false Siemens DATA{${ITK_DATA_ROOT}/Input/test_geadw/I.001,,REGEX:I\\.00[1-6]}) +itk_add_test( + NAME + itkGE4 + COMMAND + ITKIOGETestDriver + --compareCoordinateTolerance + 1e-5 # Fails on Windows otherwise + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/19771.002.001.mha} + ${ITK_TEST_OUTPUT_DIR}/19771.002.001.mha + itkGEImageIOTest + ${ITK_TEST_OUTPUT_DIR} + true + GE4 + DATA{${ITK_DATA_ROOT}/Input/test_ge4/19771.002.001,REGEX:19771\\.002\\.00[1-6]} + ${ITK_TEST_OUTPUT_DIR}/19771.002.001.mha) +itk_add_test( + NAME + itkGE5 + COMMAND + ITKIOGETestDriver + --compareCoordinateTolerance + 1e-5 # Fails on Windows otherwise + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/113766.003.001.mha} + ${ITK_TEST_OUTPUT_DIR}/113766.003.001.mha + itkGEImageIOTest + ${ITK_TEST_OUTPUT_DIR} + true + GE5 + DATA{${ITK_DATA_ROOT}/Input/test_ge5/113766.003.001,REGEX:113766\\.003\\.00[1-6]} + ${ITK_TEST_OUTPUT_DIR}/113766.003.001.mha) +itk_add_test( + NAME + itkGE5Test2 + COMMAND + ITKIOGETestDriver + --compare + DATA{Baseline/c_vf1122.fre.mha} + ${ITK_TEST_OUTPUT_DIR}/c_vf1122.fre.mha + itkGEImageIOTest + ${ITK_TEST_OUTPUT_DIR} + true + GE5 + DATA{Input/c_vf1122.fre} + ${ITK_TEST_OUTPUT_DIR}/c_vf1122.fre.mha) +itk_add_test( + NAME + itkGE5Test3 + COMMAND + ITKIOGETestDriver + --compare + DATA{Baseline/c_vf1122.fre.mha} + ${ITK_TEST_OUTPUT_DIR}/c_vf1123.fre.mha + itkGEImageIOTest + ${ITK_TEST_OUTPUT_DIR} + true + GE5 + DATA{Input/c_vf1123.fre} + ${ITK_TEST_OUTPUT_DIR}/c_vf1123.fre.mha) +itk_add_test( + NAME + itkGE5Test4 + COMMAND + ITKIOGETestDriver + --compare + DATA{Baseline/c_vf1210.fre.mha} + ${ITK_TEST_OUTPUT_DIR}/c_vf1210.fre.mha + itkGEImageIOTest + ${ITK_TEST_OUTPUT_DIR} + true + GE5 + DATA{Input/c_vf1210.fre} + ${ITK_TEST_OUTPUT_DIR}/c_vf1210.fre.mha) +itk_add_test( + NAME + itkGE5Test5 + COMMAND + ITKIOGETestDriver + --compare + DATA{Baseline/c_vf1210.fre.mha} + ${ITK_TEST_OUTPUT_DIR}/c_vf1211.fre.mha + itkGEImageIOTest + ${ITK_TEST_OUTPUT_DIR} + true + GE5 + DATA{Input/c_vf1211.fre} + ${ITK_TEST_OUTPUT_DIR}/c_vf1211.fre.mha) +itk_add_test( + NAME + itkGEAdw + COMMAND + ITKIOGETestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/I.001.mha} + ${ITK_TEST_OUTPUT_DIR}/I.001.mha + itkGEImageIOTest + ${ITK_TEST_OUTPUT_DIR} + true + GEAdw + DATA{${ITK_DATA_ROOT}/Input/test_geadw/I.001,REGEX:I\\.00[1-6]} + ${ITK_TEST_OUTPUT_DIR}/I.001.mha) +itk_add_test( + NAME + itkSiemens + COMMAND + ITKIOGETestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/3868-2-100.mha} + ${ITK_TEST_OUTPUT_DIR}/3868-2-100.mha + itkGEImageIOTest + ${ITK_TEST_OUTPUT_DIR} + true + Siemens + DATA{${ITK_DATA_ROOT}/Input/test_siemens/3868-2-100.ima,REGEX:3868-2-10[0-5]\\.ima} + ${ITK_TEST_OUTPUT_DIR}/3868-2-100.mha) +itk_add_test( + NAME + itkGE4Fail + COMMAND + ITKIOGETestDriver + itkGEImageIOTest + ${ITK_TEST_OUTPUT_DIR} + false + GE4 + DATA{${ITK_DATA_ROOT}/Input/test_ge5/113766.003.001,REGEX:113766\\.003\\.00[1-6]}) +itk_add_test( + NAME + itkGE5Fail + COMMAND + ITKIOGETestDriver + itkGEImageIOTest + ${ITK_TEST_OUTPUT_DIR} + false + GE5 + DATA{${ITK_DATA_ROOT}/Input/test_ge4/19771.002.001,REGEX:19771\\.002\\.00[1-6]}) +itk_add_test( + NAME + itkGEAdwFail + COMMAND + ITKIOGETestDriver + itkGEImageIOTest + ${ITK_TEST_OUTPUT_DIR} + false + GEAdw + DATA{${ITK_DATA_ROOT}/Input/test_siemens/3868-2-100.ima,REGEX:3868-2-10[0-5]\\.ima}) +itk_add_test( + NAME + itkSiemensFail + COMMAND + ITKIOGETestDriver + itkGEImageIOTest + ${ITK_TEST_OUTPUT_DIR} + false + Siemens + DATA{${ITK_DATA_ROOT}/Input/test_geadw/I.001,,REGEX:I\\.00[1-6]}) diff --git a/Modules/IO/GIPL/itk-module.cmake b/Modules/IO/GIPL/itk-module.cmake index ce93e99a03a..2cd2162a946 100644 --- a/Modules/IO/GIPL/itk-module.cmake +++ b/Modules/IO/GIPL/itk-module.cmake @@ -1,16 +1,16 @@ set(DOCUMENTATION "This module contains ImageIO classes for reading the Gipl (Guys Image Processing Lab) image format.") -itk_module(ITKIOGIPL +itk_module( + ITKIOGIPL ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase PRIVATE_DEPENDS - ITKZLIB + ITKZLIB TEST_DEPENDS - ITKTestKernel + ITKTestKernel FACTORY_NAMES - ImageIO::Gipl + ImageIO::Gipl DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/GIPL/src/CMakeLists.txt b/Modules/IO/GIPL/src/CMakeLists.txt index 9fa9bbf41eb..42cded2f7ba 100644 --- a/Modules/IO/GIPL/src/CMakeLists.txt +++ b/Modules/IO/GIPL/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOGIPL_SRCS - itkGiplImageIOFactory.cxx - itkGiplImageIO.cxx - ) +set(ITKIOGIPL_SRCS itkGiplImageIOFactory.cxx itkGiplImageIO.cxx) itk_module_add_library(ITKIOGIPL ${ITKIOGIPL_SRCS}) diff --git a/Modules/IO/GIPL/test/CMakeLists.txt b/Modules/IO/GIPL/test/CMakeLists.txt index bbf211e75d2..9064f0480e2 100644 --- a/Modules/IO/GIPL/test/CMakeLists.txt +++ b/Modules/IO/GIPL/test/CMakeLists.txt @@ -1,20 +1,35 @@ itk_module_test() -set(ITKIOGIPLTests -itkGiplImageIOTest.cxx -) +set(ITKIOGIPLTests itkGiplImageIOTest.cxx) -CreateTestDriver(ITKIOGIPL "${ITKIOGIPL-Test_LIBRARIES}" "${ITKIOGIPLTests}") +createtestdriver(ITKIOGIPL "${ITKIOGIPL-Test_LIBRARIES}" "${ITKIOGIPLTests}") -itk_add_test(NAME itkGiplImageIOTest - COMMAND ITKIOGIPLTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/ramp.mhd,ramp.raw} - ${ITK_TEST_OUTPUT_DIR}/ramp.mhd - itkGiplImageIOTest DATA{${ITK_DATA_ROOT}/Input/ramp.gipl} ${ITK_TEST_OUTPUT_DIR}/ramp.mhd) -itk_add_test(NAME itkGiplImageIOGzTest - COMMAND ITKIOGIPLTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/ramp.mhd,ramp.raw} - ${ITK_TEST_OUTPUT_DIR}/ramp-gz.mhd - itkGiplImageIOTest DATA{${ITK_DATA_ROOT}/Input/ramp.gipl.gz} ${ITK_TEST_OUTPUT_DIR}/ramp-gz.mhd) -itk_add_test(NAME itkGiplImageIOTest2 - COMMAND ITKIOGIPLTestDriver itkGiplImageIOTest - DATA{${ITK_DATA_ROOT}/Input/ramp.gipl} ${ITK_TEST_OUTPUT_DIR}/ramp.gipl) +itk_add_test( + NAME + itkGiplImageIOTest + COMMAND + ITKIOGIPLTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/ramp.mhd,ramp.raw} + ${ITK_TEST_OUTPUT_DIR}/ramp.mhd + itkGiplImageIOTest + DATA{${ITK_DATA_ROOT}/Input/ramp.gipl} + ${ITK_TEST_OUTPUT_DIR}/ramp.mhd) +itk_add_test( + NAME + itkGiplImageIOGzTest + COMMAND + ITKIOGIPLTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/ramp.mhd,ramp.raw} + ${ITK_TEST_OUTPUT_DIR}/ramp-gz.mhd + itkGiplImageIOTest + DATA{${ITK_DATA_ROOT}/Input/ramp.gipl.gz} + ${ITK_TEST_OUTPUT_DIR}/ramp-gz.mhd) +itk_add_test( + NAME + itkGiplImageIOTest2 + COMMAND + ITKIOGIPLTestDriver + itkGiplImageIOTest + DATA{${ITK_DATA_ROOT}/Input/ramp.gipl} + ${ITK_TEST_OUTPUT_DIR}/ramp.gipl) diff --git a/Modules/IO/HDF5/itk-module.cmake b/Modules/IO/HDF5/itk-module.cmake index 9d750a2deff..dca071e1323 100644 --- a/Modules/IO/HDF5/itk-module.cmake +++ b/Modules/IO/HDF5/itk-module.cmake @@ -1,18 +1,19 @@ -set(DOCUMENTATION "This module contains an ImageIO class for reading and writing +set(DOCUMENTATION + "This module contains an ImageIO class for reading and writing ITK Images stored in the HDF5 data model and file format.") -itk_module(ITKIOHDF5 +itk_module( + ITKIOHDF5 ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase PRIVATE_DEPENDS - ITKHDF5 + ITKHDF5 TEST_DEPENDS - ITKTestKernel - ITKImageSources + ITKTestKernel + ITKImageSources FACTORY_NAMES - ImageIO::HDF5 + ImageIO::HDF5 DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/HDF5/src/CMakeLists.txt b/Modules/IO/HDF5/src/CMakeLists.txt index 283df16f113..63ba64093d6 100644 --- a/Modules/IO/HDF5/src/CMakeLists.txt +++ b/Modules/IO/HDF5/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOHDF5_SRCS - itkHDF5ImageIOFactory.cxx - itkHDF5ImageIO.cxx - ) +set(ITKIOHDF5_SRCS itkHDF5ImageIOFactory.cxx itkHDF5ImageIO.cxx) itk_module_add_library(ITKIOHDF5 ${ITKIOHDF5_SRCS}) diff --git a/Modules/IO/HDF5/test/CMakeLists.txt b/Modules/IO/HDF5/test/CMakeLists.txt index c6615400593..0cd8e592e09 100644 --- a/Modules/IO/HDF5/test/CMakeLists.txt +++ b/Modules/IO/HDF5/test/CMakeLists.txt @@ -1,12 +1,19 @@ itk_module_test() -set(ITKIOHDF5Tests - itkHDF5ImageIOTest.cxx - itkHDF5ImageIOStreamingReadWriteTest.cxx -) +set(ITKIOHDF5Tests itkHDF5ImageIOTest.cxx itkHDF5ImageIOStreamingReadWriteTest.cxx) -CreateTestDriver(ITKIOHDF5 "${ITKIOHDF5-Test_LIBRARIES}" "${ITKIOHDF5Tests}") +createtestdriver(ITKIOHDF5 "${ITKIOHDF5-Test_LIBRARIES}" "${ITKIOHDF5Tests}") -itk_add_test(NAME itkHDF5ImageIOTest - COMMAND ITKIOHDF5TestDriver itkHDF5ImageIOTest ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkHDF5ImageIOStreamingReadWriteTest - COMMAND ITKIOHDF5TestDriver itkHDF5ImageIOStreamingReadWriteTest ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkHDF5ImageIOTest + COMMAND + ITKIOHDF5TestDriver + itkHDF5ImageIOTest + ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkHDF5ImageIOStreamingReadWriteTest + COMMAND + ITKIOHDF5TestDriver + itkHDF5ImageIOStreamingReadWriteTest + ${ITK_TEST_OUTPUT_DIR}) diff --git a/Modules/IO/IPL/itk-module.cmake b/Modules/IO/IPL/itk-module.cmake index 94493e8e736..1382a1aa60d 100644 --- a/Modules/IO/IPL/itk-module.cmake +++ b/Modules/IO/IPL/itk-module.cmake @@ -1,12 +1,12 @@ set(DOCUMENTATION "This module contains code common to both the GE and Siemens IO modules.") -itk_module(ITKIOIPL +itk_module( + ITKIOIPL ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/IPL/src/CMakeLists.txt b/Modules/IO/IPL/src/CMakeLists.txt index 2f737b83cbb..4d6c0ee4c0d 100644 --- a/Modules/IO/IPL/src/CMakeLists.txt +++ b/Modules/IO/IPL/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOIPL_SRCS - itkIPLCommonImageIO.cxx - itkIPLFileNameList.cxx - ) +set(ITKIOIPL_SRCS itkIPLCommonImageIO.cxx itkIPLFileNameList.cxx) itk_module_add_library(ITKIOIPL ${ITKIOIPL_SRCS}) diff --git a/Modules/IO/ImageBase/CMakeLists.txt b/Modules/IO/ImageBase/CMakeLists.txt index e1a8eeead87..b7852673865 100644 --- a/Modules/IO/ImageBase/CMakeLists.txt +++ b/Modules/IO/ImageBase/CMakeLists.txt @@ -1,14 +1,14 @@ project(ITKIOImageBase) # check if the platform has c style IO functions that uses wchar_t * filenames -try_compile(ITK_SUPPORTS_WCHAR_T_FILENAME_CSTYLEIO - ${CMAKE_CURRENT_BINARY_DIR} +try_compile( + ITK_SUPPORTS_WCHAR_T_FILENAME_CSTYLEIO ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkTestCStyleIOWCharFilename.cxx OUTPUT_VARIABLE ITK_SUPPORTS_WCHAR_T_FILENAME_CSTYLEIO_OUTPUT) # check if the platform has IO streams constructors that uses wchar_t * filenames -try_compile(ITK_SUPPORTS_WCHAR_T_FILENAME_IOSTREAMS_CONSTRUCTORS - ${CMAKE_CURRENT_BINARY_DIR} +try_compile( + ITK_SUPPORTS_WCHAR_T_FILENAME_IOSTREAMS_CONSTRUCTORS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkTestIOStreamsWCharFilenameConstructors.cxx OUTPUT_VARIABLE ITK_SUPPORTS_WCHAR_T_FILENAME_IOSTREAMS_CONSTRUCTORS_OUTPUT) @@ -16,8 +16,8 @@ try_compile(ITK_SUPPORTS_WCHAR_T_FILENAME_IOSTREAMS_CONSTRUCTORS if(HAVE_UNISTD_H) set(ITK_SUPPORTS_FDSTREAM_HPP_COMPILE_DEFINITIONS -DITK_HAVE_UNISTD_H=${HAVE_UNISTD_H}) endif() -try_compile(ITK_SUPPORTS_FDSTREAM_HPP - ${CMAKE_CURRENT_BINARY_DIR} +try_compile( + ITK_SUPPORTS_FDSTREAM_HPP ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/CMake/itkTestFDStream.cxx CMAKE_FLAGS -DINCLUDE_DIRECTORIES:STRING=${ITKIOImageBase_SOURCE_DIR}/include COMPILE_DEFINITIONS ${ITK_SUPPORTS_FDSTREAM_HPP_COMPILE_DEFINITIONS} @@ -29,8 +29,7 @@ set(ITKIOImageBase_INCLUDE_DIRS ${ITKIOImageBase_BINARY_DIR}) set(ITKIOImageBase_LIBRARIES ITKIOImageBase) itk_module_impl() -install(FILES - ${ITKIOImageBase_BINARY_DIR}/itkIOConfigure.h +install( + FILES ${ITKIOImageBase_BINARY_DIR}/itkIOConfigure.h DESTINATION ${ITKIOImageBase_INSTALL_INCLUDE_DIR} - COMPONENT Development - ) + COMPONENT Development) diff --git a/Modules/IO/ImageBase/itk-module.cmake b/Modules/IO/ImageBase/itk-module.cmake index a3f39325b2c..e7fa975d483 100644 --- a/Modules/IO/ImageBase/itk-module.cmake +++ b/Modules/IO/ImageBase/itk-module.cmake @@ -1,4 +1,5 @@ -set(DOCUMENTATION "This module contains base classes for IO, helper classes for +set(DOCUMENTATION + "This module contains base classes for IO, helper classes for IO, and classes that function as an ImageSource in an ITK pipeline. Classes for specific file formats, found in other modules in the IO group, should inherit from itk::ImageIOBase or itk::StreamingImageIOBase. For an image source or sink in the ITK @@ -7,15 +8,15 @@ itk::ImageFileWriter, itk::ImageSeriesReader, or itk::ImageSeriesWriter. Conveni for reading series of files include itk::ArchetypeSeriesFileNames, itk::NumericSeriesFileNames, and itk::RegularExpressionSeriesFileNames.") -itk_module(ITKIOImageBase +itk_module( + ITKIOImageBase ENABLE_SHARED DEPENDS - ITKCommon + ITKCommon TEST_DEPENDS - ITKTestKernel - ITKIOGDCM - ITKIOMeta - ITKImageIntensity + ITKTestKernel + ITKIOGDCM + ITKIOMeta + ITKImageIntensity DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/ImageBase/src/CMakeLists.txt b/Modules/IO/ImageBase/src/CMakeLists.txt index 9d7a06e46ca..798ef020001 100644 --- a/Modules/IO/ImageBase/src/CMakeLists.txt +++ b/Modules/IO/ImageBase/src/CMakeLists.txt @@ -1,16 +1,15 @@ set(ITKIOImageBase_SRCS - itkImageSeriesWriter.cxx - itkImageFileReaderException.cxx - itkImageFileWriter.cxx - itkArchetypeSeriesFileNames.cxx - itkImageIOFactory.cxx - itkIOCommon.cxx - itkNumericSeriesFileNames.cxx - itkImageIOBase.cxx - itkRegularExpressionSeriesFileNames.cxx - itkStreamingImageIOBase.cxx - # Two non-templated utility functions that are needed by templated RAWImageIO - itkRawImageIOUtilities.cxx - ) + itkImageSeriesWriter.cxx + itkImageFileReaderException.cxx + itkImageFileWriter.cxx + itkArchetypeSeriesFileNames.cxx + itkImageIOFactory.cxx + itkIOCommon.cxx + itkNumericSeriesFileNames.cxx + itkImageIOBase.cxx + itkRegularExpressionSeriesFileNames.cxx + itkStreamingImageIOBase.cxx + # Two non-templated utility functions that are needed by templated RAWImageIO + itkRawImageIOUtilities.cxx) itk_module_add_library(ITKIOImageBase ${ITKIOImageBase_SRCS}) diff --git a/Modules/IO/ImageBase/test/CMakeLists.txt b/Modules/IO/ImageBase/test/CMakeLists.txt index 8e63698d993..fe88b7a1953 100644 --- a/Modules/IO/ImageBase/test/CMakeLists.txt +++ b/Modules/IO/ImageBase/test/CMakeLists.txt @@ -1,148 +1,345 @@ itk_module_test() set(ITKIOImageBaseTests -itkConvertBufferTest.cxx -itkConvertBufferTest2.cxx -itkImageFileReaderTest1.cxx -itkImageFileWriterTest.cxx -itkIOCommonTest.cxx -itkIOCommonTest2.cxx -itkNumericSeriesFileNamesTest.cxx -itkRegularExpressionSeriesFileNamesTest.cxx -itkArchetypeSeriesFileNamesTest.cxx -itkLargeImageWriteConvertReadTest.cxx -itkLargeImageWriteReadTest.cxx -itkImageFileReaderDimensionsTest.cxx -itkImageFileReaderPositiveSpacingTest.cxx -itkImageFileReaderStreamingTest.cxx -itkImageFileReaderStreamingTest2.cxx -itkImageFileWriterPastingTest1.cxx -itkImageFileWriterPastingTest2.cxx -itkImageFileWriterPastingTest3.cxx -itkImageFileWriterStreamingPastingCompressingTest1.cxx -itkImageFileWriterStreamingTest1.cxx -itkImageFileWriterStreamingTest2.cxx -itkImageFileWriterTest2.cxx -itkImageFileWriterUpdateLargestPossibleRegionTest.cxx -itkImageIOBaseTest.cxx -itkImageIODirection2DTest.cxx -itkImageIODirection3DTest.cxx -itkImageIOFileNameExtensionsTests.cxx -itkImageSeriesReaderDimensionsTest.cxx -itkImageSeriesReaderSamplingTest.cxx -itkImageSeriesReaderVectorTest.cxx -itkImageSeriesWriterTest.cxx -itkIOPluginTest.cxx -itkNoiseImageFilterTest.cxx -itkMatrixImageWriteReadTest.cxx -itkReadWriteImageWithDictionaryTest.cxx -itkVectorImageReadWriteTest.cxx -itk64bitTest.cxx -itkImageFileReaderManyComponentVectorTest.cxx -) + itkConvertBufferTest.cxx + itkConvertBufferTest2.cxx + itkImageFileReaderTest1.cxx + itkImageFileWriterTest.cxx + itkIOCommonTest.cxx + itkIOCommonTest2.cxx + itkNumericSeriesFileNamesTest.cxx + itkRegularExpressionSeriesFileNamesTest.cxx + itkArchetypeSeriesFileNamesTest.cxx + itkLargeImageWriteConvertReadTest.cxx + itkLargeImageWriteReadTest.cxx + itkImageFileReaderDimensionsTest.cxx + itkImageFileReaderPositiveSpacingTest.cxx + itkImageFileReaderStreamingTest.cxx + itkImageFileReaderStreamingTest2.cxx + itkImageFileWriterPastingTest1.cxx + itkImageFileWriterPastingTest2.cxx + itkImageFileWriterPastingTest3.cxx + itkImageFileWriterStreamingPastingCompressingTest1.cxx + itkImageFileWriterStreamingTest1.cxx + itkImageFileWriterStreamingTest2.cxx + itkImageFileWriterTest2.cxx + itkImageFileWriterUpdateLargestPossibleRegionTest.cxx + itkImageIOBaseTest.cxx + itkImageIODirection2DTest.cxx + itkImageIODirection3DTest.cxx + itkImageIOFileNameExtensionsTests.cxx + itkImageSeriesReaderDimensionsTest.cxx + itkImageSeriesReaderSamplingTest.cxx + itkImageSeriesReaderVectorTest.cxx + itkImageSeriesWriterTest.cxx + itkIOPluginTest.cxx + itkNoiseImageFilterTest.cxx + itkMatrixImageWriteReadTest.cxx + itkReadWriteImageWithDictionaryTest.cxx + itkVectorImageReadWriteTest.cxx + itk64bitTest.cxx + itkImageFileReaderManyComponentVectorTest.cxx) +createtestdriver(ITKIOImageBase "${ITKIOImageBase-Test_LIBRARIES}" "${ITKIOImageBaseTests}") +itk_add_test( + NAME + itkArchetypeSeriesFileNamesTest + COMMAND + ITKIOImageBaseTestDriver + itkArchetypeSeriesFileNamesTest + DATA{${ITK_DATA_ROOT}/Input/Archetype/a5b7.PNG,REGEX:a[0-9]b[0-9]\\.PNG} + DATA{${ITK_DATA_ROOT}/Input/Archetype/a7b1.PNG}) +itk_add_test( + NAME + itkArchetypeSeriesFileNamesTest2 + COMMAND + ITKIOImageBaseTestDriver + itkArchetypeSeriesFileNamesTest + DATA{${ITK_DATA_ROOT}/Input/Archetype/image.001,REGEX:image\\.[0-9]+} + DATA{${ITK_DATA_ROOT}/Input/Archetype/image.010}) +itk_add_test( + NAME + itkConvertBufferTest + COMMAND + ITKIOImageBaseTestDriver + itkConvertBufferTest) +itk_add_test( + NAME + itkConvertBufferTest2 + COMMAND + ITKIOImageBaseTestDriver + itkConvertBufferTest2) +itk_add_test( + NAME + itkImageFileReaderTest1 + COMMAND + ITKIOImageBaseTestDriver + itkImageFileReaderTest1) +itk_add_test( + NAME + itkImageFileWriterTest + COMMAND + ITKIOImageBaseTestDriver + itkImageFileWriterTest + ${ITK_TEST_OUTPUT_DIR}/test.png) +itk_add_test( + NAME + itkIOCommonTest + COMMAND + ITKIOImageBaseTestDriver + itkIOCommonTest) +itk_add_test( + NAME + itkIOCommonTest2 + COMMAND + ITKIOImageBaseTestDriver + itkIOCommonTest2) +itk_add_test( + NAME + itkNumericSeriesFileNamesTest + COMMAND + ITKIOImageBaseTestDriver + itkNumericSeriesFileNamesTest) +itk_add_test( + NAME + itk64bitTestNRRDtoMHA + COMMAND + ITKIOImageBaseTestDriver + --compare + DATA{Input/Test64bit.nrrd} + ${ITK_TEST_OUTPUT_DIR}/Test64bit.mha + itk64bitTest + DATA{Input/Test64bit.nrrd} + ${ITK_TEST_OUTPUT_DIR}/Test64bit.mha) +itk_add_test( + NAME + itk64bitTestMHAtoNRRD + COMMAND + ITKIOImageBaseTestDriver + --compare + DATA{Input/Test64bit.mha} + ${ITK_TEST_OUTPUT_DIR}/Test64bit.nrrd + itk64bitTest + DATA{Input/Test64bit.mha} + ${ITK_TEST_OUTPUT_DIR}/Test64bit.nrrd) +itk_add_test( + NAME + itk64bitTestNRRDtoMHA2 + COMMAND + ITKIOImageBaseTestDriver + --compare + DATA{Input/Test64bit.nrrd} + ${ITK_TEST_OUTPUT_DIR}/Test64bit2.mha + itk64bitTest + DATA{Input/Test64bit.mha} + ${ITK_TEST_OUTPUT_DIR}/Test64bit2.mha) +itk_add_test( + NAME + itk64bitTestNRRDtoNIFTI + COMMAND + ITKIOImageBaseTestDriver + --compare + DATA{Input/Test64bit.nrrd} + ${ITK_TEST_OUTPUT_DIR}/Test64bit.nii + itk64bitTest + DATA{Input/Test64bit.nrrd} + ${ITK_TEST_OUTPUT_DIR}/Test64bit.nii) +itk_add_test( + NAME + itk64bitTestNRRDtoVTK + COMMAND + ITKIOImageBaseTestDriver + --ignoreInputInformation + --compare + DATA{Input/Test64bit.nrrd} + ${ITK_TEST_OUTPUT_DIR}/Test64bit.vtk + itk64bitTest + DATA{Input/Test64bit.nrrd} + ${ITK_TEST_OUTPUT_DIR}/Test64bit.vtk) -CreateTestDriver(ITKIOImageBase "${ITKIOImageBase-Test_LIBRARIES}" "${ITKIOImageBaseTests}") -itk_add_test(NAME itkArchetypeSeriesFileNamesTest - COMMAND ITKIOImageBaseTestDriver - itkArchetypeSeriesFileNamesTest - DATA{${ITK_DATA_ROOT}/Input/Archetype/a5b7.PNG,REGEX:a[0-9]b[0-9]\\.PNG} - DATA{${ITK_DATA_ROOT}/Input/Archetype/a7b1.PNG}) -itk_add_test(NAME itkArchetypeSeriesFileNamesTest2 - COMMAND ITKIOImageBaseTestDriver - itkArchetypeSeriesFileNamesTest - DATA{${ITK_DATA_ROOT}/Input/Archetype/image.001,REGEX:image\\.[0-9]+} - DATA{${ITK_DATA_ROOT}/Input/Archetype/image.010}) -itk_add_test(NAME itkConvertBufferTest - COMMAND ITKIOImageBaseTestDriver itkConvertBufferTest) -itk_add_test(NAME itkConvertBufferTest2 - COMMAND ITKIOImageBaseTestDriver itkConvertBufferTest2) -itk_add_test(NAME itkImageFileReaderTest1 - COMMAND ITKIOImageBaseTestDriver itkImageFileReaderTest1) -itk_add_test(NAME itkImageFileWriterTest - COMMAND ITKIOImageBaseTestDriver itkImageFileWriterTest - ${ITK_TEST_OUTPUT_DIR}/test.png) -itk_add_test(NAME itkIOCommonTest - COMMAND ITKIOImageBaseTestDriver itkIOCommonTest) -itk_add_test(NAME itkIOCommonTest2 - COMMAND ITKIOImageBaseTestDriver itkIOCommonTest2) -itk_add_test(NAME itkNumericSeriesFileNamesTest - COMMAND ITKIOImageBaseTestDriver itkNumericSeriesFileNamesTest) -itk_add_test(NAME itk64bitTestNRRDtoMHA - COMMAND ITKIOImageBaseTestDriver --compare DATA{Input/Test64bit.nrrd} ${ITK_TEST_OUTPUT_DIR}/Test64bit.mha - itk64bitTest DATA{Input/Test64bit.nrrd} ${ITK_TEST_OUTPUT_DIR}/Test64bit.mha) -itk_add_test(NAME itk64bitTestMHAtoNRRD - COMMAND ITKIOImageBaseTestDriver --compare DATA{Input/Test64bit.mha} ${ITK_TEST_OUTPUT_DIR}/Test64bit.nrrd - itk64bitTest DATA{Input/Test64bit.mha} ${ITK_TEST_OUTPUT_DIR}/Test64bit.nrrd) -itk_add_test(NAME itk64bitTestNRRDtoMHA2 - COMMAND ITKIOImageBaseTestDriver --compare DATA{Input/Test64bit.nrrd} ${ITK_TEST_OUTPUT_DIR}/Test64bit2.mha - itk64bitTest DATA{Input/Test64bit.mha} ${ITK_TEST_OUTPUT_DIR}/Test64bit2.mha) -itk_add_test(NAME itk64bitTestNRRDtoNIFTI - COMMAND ITKIOImageBaseTestDriver --compare DATA{Input/Test64bit.nrrd} ${ITK_TEST_OUTPUT_DIR}/Test64bit.nii - itk64bitTest DATA{Input/Test64bit.nrrd} ${ITK_TEST_OUTPUT_DIR}/Test64bit.nii) -itk_add_test(NAME itk64bitTestNRRDtoVTK - COMMAND ITKIOImageBaseTestDriver --ignoreInputInformation --compare DATA{Input/Test64bit.nrrd} ${ITK_TEST_OUTPUT_DIR}/Test64bit.vtk - itk64bitTest DATA{Input/Test64bit.nrrd} ${ITK_TEST_OUTPUT_DIR}/Test64bit.vtk) +itk_add_test( + NAME + itkRegularExpressionSeriesFileNamesTest + COMMAND + ITKIOImageBaseTestDriver + --redirectOutput + ${ITK_TEST_OUTPUT_DIR}/itkRegularExpressionSeriesFileNamesTest.txt + itkRegularExpressionSeriesFileNamesTest + ${ITK_DATA_ROOT}/Input) +set_tests_properties( + itkRegularExpressionSeriesFileNamesTest PROPERTIES ATTACHED_FILES_ON_FAIL + ${ITK_TEST_OUTPUT_DIR}/itkRegularExpressionSeriesFileNamesTest.txt) -itk_add_test(NAME itkRegularExpressionSeriesFileNamesTest - COMMAND ITKIOImageBaseTestDriver --redirectOutput ${ITK_TEST_OUTPUT_DIR}/itkRegularExpressionSeriesFileNamesTest.txt - itkRegularExpressionSeriesFileNamesTest - ${ITK_DATA_ROOT}/Input) -set_tests_properties(itkRegularExpressionSeriesFileNamesTest PROPERTIES ATTACHED_FILES_ON_FAIL ${ITK_TEST_OUTPUT_DIR}/itkRegularExpressionSeriesFileNamesTest.txt) - - -itk_add_test(NAME itkImageFileReaderDimensionsTest_MHD - COMMAND ITKIOImageBaseTestDriver itkImageFileReaderDimensionsTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} ${ITK_TEST_OUTPUT_DIR} mha) -itk_add_test(NAME itkImageFileReaderDimensionsTest_NRRD - COMMAND ITKIOImageBaseTestDriver itkImageFileReaderDimensionsTest - DATA{${ITK_DATA_ROOT}/Input/vol-ascii.nrrd} ${ITK_TEST_OUTPUT_DIR} nrrd) -itk_add_test(NAME itkImageFileReaderStreamingTest_1 - COMMAND ITKIOImageBaseTestDriver itkImageFileReaderStreamingTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} 1 0) -itk_add_test(NAME itkImageFileReaderStreamingTest_2 - COMMAND ITKIOImageBaseTestDriver itkImageFileReaderStreamingTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} 0 1) -itk_add_test(NAME itkImageFileReaderStreamingTest_3 - COMMAND ITKIOImageBaseTestDriver itkImageFileReaderStreamingTest - DATA{${ITK_DATA_ROOT}/Input/vol-ascii.nrrd} 0 0) -itk_add_test(NAME itkImageFileReaderStreamingTest2_MHD - COMMAND ITKIOImageBaseTestDriver itkImageFileReaderStreamingTest2 - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw}) -itk_add_test(NAME itkImageFileWriterPastingTest1 - COMMAND ITKIOImageBaseTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterPastingTest1_01.mha - itkImageFileWriterPastingTest1 DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterPastingTest1_01.mha) -itk_add_test(NAME itkImageFileWriterPastingTest2_5 - COMMAND ITKIOImageBaseTestDriver itkImageFileWriterPastingTest2 - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterPastingTest2_5.mha) -itk_add_test(NAME itkImageFileWriterPastingTest2_6 - COMMAND ITKIOImageBaseTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterPastingTest2_6.mha - itkImageFileWriterPastingTest2 DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterPastingTest2_6.mha DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha}) -itk_add_test(NAME itkImageFileWriterPastingTest2_7 - COMMAND ITKIOImageBaseTestDriver itkImageFileWriterPastingTest2 - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterPastingTest2_7.mha DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeCompressed.mha}) -itk_add_test(NAME itkImageFileWriterPastingTest3 - COMMAND ITKIOImageBaseTestDriver - itkImageFileWriterPastingTest3 - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterPastingTest3_01.mha) -itk_add_test(NAME itkImageFileWriterStreamingPastingCompressingTest_MHA - COMMAND ITKIOImageBaseTestDriver itkImageFileWriterStreamingPastingCompressingTest1 - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreamingPastingCompressingTest mha 0 0 0 1 0 0 0 1) -itk_add_test(NAME itkImageFileWriterStreamingPastingCompressingTest_NRRD - COMMAND ITKIOImageBaseTestDriver itkImageFileWriterStreamingPastingCompressingTest1 - DATA{${ITK_DATA_ROOT}/Input/vol-ascii.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreamingPastingCompressingTest nrrd 0 0 1 1 0 0 1 1) -itk_add_test(NAME itkImageFileWriterStreamingPastingCompressingTest_NHDR - COMMAND ITKIOImageBaseTestDriver itkImageFileWriterStreamingPastingCompressingTest1 - DATA{${ITK_DATA_ROOT}/Input/vol-ascii.nrrd} ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreamingPastingCompressingTest nhdr 0 0 1 1 0 0 1 1) -itk_add_test(NAME itkImageFileWriterStreamingPastingCompressingTest_VTK - COMMAND ITKIOImageBaseTestDriver - --compare DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreamingPastingCompressingTest000.vtk - itkImageFileWriterStreamingPastingCompressingTest1 DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreamingPastingCompressingTest vtk 0 0 0 0 0 0 0 0) +itk_add_test( + NAME + itkImageFileReaderDimensionsTest_MHD + COMMAND + ITKIOImageBaseTestDriver + itkImageFileReaderDimensionsTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR} + mha) +itk_add_test( + NAME + itkImageFileReaderDimensionsTest_NRRD + COMMAND + ITKIOImageBaseTestDriver + itkImageFileReaderDimensionsTest + DATA{${ITK_DATA_ROOT}/Input/vol-ascii.nrrd} + ${ITK_TEST_OUTPUT_DIR} + nrrd) +itk_add_test( + NAME + itkImageFileReaderStreamingTest_1 + COMMAND + ITKIOImageBaseTestDriver + itkImageFileReaderStreamingTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + 1 + 0) +itk_add_test( + NAME + itkImageFileReaderStreamingTest_2 + COMMAND + ITKIOImageBaseTestDriver + itkImageFileReaderStreamingTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + 0 + 1) +itk_add_test( + NAME + itkImageFileReaderStreamingTest_3 + COMMAND + ITKIOImageBaseTestDriver + itkImageFileReaderStreamingTest + DATA{${ITK_DATA_ROOT}/Input/vol-ascii.nrrd} + 0 + 0) +itk_add_test( + NAME + itkImageFileReaderStreamingTest2_MHD + COMMAND + ITKIOImageBaseTestDriver + itkImageFileReaderStreamingTest2 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw}) +itk_add_test( + NAME + itkImageFileWriterPastingTest1 + COMMAND + ITKIOImageBaseTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterPastingTest1_01.mha + itkImageFileWriterPastingTest1 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterPastingTest1_01.mha) +itk_add_test( + NAME + itkImageFileWriterPastingTest2_5 + COMMAND + ITKIOImageBaseTestDriver + itkImageFileWriterPastingTest2 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterPastingTest2_5.mha) +itk_add_test( + NAME + itkImageFileWriterPastingTest2_6 + COMMAND + ITKIOImageBaseTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterPastingTest2_6.mha + itkImageFileWriterPastingTest2 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterPastingTest2_6.mha + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha}) +itk_add_test( + NAME + itkImageFileWriterPastingTest2_7 + COMMAND + ITKIOImageBaseTestDriver + itkImageFileWriterPastingTest2 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterPastingTest2_7.mha + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeCompressed.mha}) +itk_add_test( + NAME + itkImageFileWriterPastingTest3 + COMMAND + ITKIOImageBaseTestDriver + itkImageFileWriterPastingTest3 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterPastingTest3_01.mha) +itk_add_test( + NAME + itkImageFileWriterStreamingPastingCompressingTest_MHA + COMMAND + ITKIOImageBaseTestDriver + itkImageFileWriterStreamingPastingCompressingTest1 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreamingPastingCompressingTest + mha + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 1) +itk_add_test( + NAME + itkImageFileWriterStreamingPastingCompressingTest_NRRD + COMMAND + ITKIOImageBaseTestDriver + itkImageFileWriterStreamingPastingCompressingTest1 + DATA{${ITK_DATA_ROOT}/Input/vol-ascii.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreamingPastingCompressingTest + nrrd + 0 + 0 + 1 + 1 + 0 + 0 + 1 + 1) +itk_add_test( + NAME + itkImageFileWriterStreamingPastingCompressingTest_NHDR + COMMAND + ITKIOImageBaseTestDriver + itkImageFileWriterStreamingPastingCompressingTest1 + DATA{${ITK_DATA_ROOT}/Input/vol-ascii.nrrd} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreamingPastingCompressingTest + nhdr + 0 + 0 + 1 + 1 + 0 + 0 + 1 + 1) +itk_add_test( + NAME + itkImageFileWriterStreamingPastingCompressingTest_VTK + COMMAND + ITKIOImageBaseTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreamingPastingCompressingTest000.vtk + itkImageFileWriterStreamingPastingCompressingTest1 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreamingPastingCompressingTest + vtk + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0) # JIRA ITK182 # This test has been disabled due to the above bug. It should be @@ -152,168 +349,503 @@ itk_add_test(NAME itkImageFileWriterStreamingPastingCompressingTest_VTK #itk_add_test(NAME itkImageFileWriterStreamingPastingCompressingTest_DCM # COMMAND ITKIOImageBaseTestDriver itkImageFileWriterStreamingPastingCompressingTest1 # DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreamingPastingCompressingTest dcm 0 0 1 1 0 0 1 1) -itk_add_test(NAME itkImageFileWriterStreamingTest1_1 - COMMAND ITKIOImageBaseTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreaming1_1.mha - itkImageFileWriterStreamingTest1 DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreaming1_1.mha) -itk_add_test(NAME itkImageFileWriterStreamingTest1_2 - COMMAND ITKIOImageBaseTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreaming1_2.mha - itkImageFileWriterStreamingTest1 DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreaming1_2.mha DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeCompressed.mha} 0) -itk_add_test(NAME itkImageFileWriterStreamingTest1_3 - COMMAND ITKIOImageBaseTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreaming1_3.mha - itkImageFileWriterStreamingTest1 DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreaming1_3.mha DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} 1) -itk_add_test(NAME itkImageFileWriterStreamingTest2_4 - COMMAND ITKIOImageBaseTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreaming2_4.mha - itkImageFileWriterStreamingTest2 DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreaming2_4.mha) -itk_add_test(NAME itkImageFileWriterTest2_1 - COMMAND ITKIOImageBaseTestDriver itkImageFileWriterTest2 - ${ITK_TEST_OUTPUT_DIR}/test.nrrd) -itk_add_test(NAME itkImageFileWriterTest2_2 - COMMAND ITKIOImageBaseTestDriver itkImageFileWriterTest2 - ${ITK_TEST_OUTPUT_DIR}/test.mha) -itk_add_test(NAME itkImageFileWriterTest2_3 - COMMAND ITKIOImageBaseTestDriver itkImageFileWriterTest2 - ${ITK_TEST_OUTPUT_DIR}/test.vtk) -itk_add_test(NAME itkImageFileWriterUpdateLargestPossibleRegionTest - COMMAND ITKIOImageBaseTestDriver - --compare DATA{${ITK_DATA_ROOT}/Input/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterUpdateLargestPossibleRegionTest.png - itkImageFileWriterUpdateLargestPossibleRegionTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterUpdateLargestPossibleRegionTest.png) -itk_add_test(NAME itkImageIOBaseTest - COMMAND ITKIOImageBaseTestDriver itkImageIOBaseTest) -itk_add_test(NAME itkImageIODirection2DTest01 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection2DTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png 1.0 0.0 0.0 1.0 ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensitySliceBorder20.mhd) -itk_add_test(NAME itkImageIODirection2DTest02 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection2DTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.png 1.0 0.0 0.0 1.0 ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensitySliceShifted13x17y.mhd) -itk_add_test(NAME itkImageIODirection2DTest03 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection2DTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20DirectionPlus30.mhd 0.8660254 -0.5 0.5 0.8660254 ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensitySliceBorder20DirectionPlus30.mhd) -itk_add_test(NAME itkImageIODirection2DTest04 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection2DTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17yDirectionPlus30.mhd 0.8660254 -0.5 0.5 0.8660254 ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensitySliceShifted13x17yDirectionPlus30.mhd) -itk_add_test(NAME itkImageIODirection2DTest05 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection2DTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainT1SliceBorder20DirectionPlus30.mhd 0.8660254 -0.5 0.5 0.8660254 ${ITK_TEST_OUTPUT_DIR}/BrainT1SliceBorder20DirectionPlus30.mhd) -itk_add_test(NAME itkImageIODirection2DTest06 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection2DTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.mhd 1.0 0.0 0.0 1.0 ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensitySliceBorder20.nhdr) -itk_add_test(NAME itkImageIODirection2DTest07 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection2DTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.mhd 1.0 0.0 0.0 1.0 ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensitySliceShifted13x17y.nhdr) -itk_add_test(NAME itkImageIODirection2DTest08 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection2DTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20DirectionPlus30.mhd 0.8660254 -0.5 0.5 0.8660254 ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensitySliceBorder20DirectionPlus30.nhdr) -itk_add_test(NAME itkImageIODirection2DTest09 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection2DTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17yDirectionPlus30.mhd 0.8660254 -0.5 0.5 0.8660254 ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensitySliceShifted13x17yDirectionPlus30.nhdr) -itk_add_test(NAME itkImageIODirection2DTest10 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection2DTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainT1SliceBorder20DirectionPlus30.mhd 0.8660254 -0.5 0.5 0.8660254 ${ITK_TEST_OUTPUT_DIR}/BrainT1SliceBorder20DirectionPlus30.nhdr) -itk_add_test(NAME itkImageIODirection2DTest11 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection2DTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.nhdr 1.0 0.0 0.0 1.0) -itk_add_test(NAME itkImageIODirection2DTest12 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection2DTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.nhdr 1.0 0.0 0.0 1.0) -itk_add_test(NAME itkImageIODirection2DTest13 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection2DTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20DirectionPlus30.nhdr 0.8660254 -0.5 0.5 0.8660254) -itk_add_test(NAME itkImageIODirection2DTest14 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection2DTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17yDirectionPlus30.nhdr 0.8660254 -0.5 0.5 0.8660254) -itk_add_test(NAME itkImageIODirection2DTest15 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection2DTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainT1SliceBorder20DirectionPlus30.nhdr 0.8660254 -0.5 0.5 0.8660254) -itk_add_test(NAME itkImageIODirection3DTest01 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection3DTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirectionIdentity.mhd} - 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeWithDirectionIdentity.mhd) -itk_add_test(NAME itkImageIODirection3DTest02 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection3DTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.mhd} - 0.8660254 0.5 0.0 -0.5 0.8660254 0.0 0.0 0.0 1.0 ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeWithDirection.mhd) -itk_add_test(NAME itkImageIODirection3DTest03 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection3DTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirectionIdentity.mhd} - 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeWithDirectionIdentity.nhdr) -itk_add_test(NAME itkImageIODirection3DTest04 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection3DTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.mhd} - 0.8660254 0.5 0.0 -0.5 0.8660254 0.0 0.0 0.0 1.0 ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeWithDirection.nhdr) -itk_add_test(NAME itkImageIODirection3DTest05 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection3DTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirectionIdentity.nhdr,HeadMRVolumeWithDirectionIdentity.raw.gz} - 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0) -itk_add_test(NAME itkImageIODirection3DTest06 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection3DTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.nhdr,HeadMRVolumeWithDirection.raw.gz} - 0.8660254 0.5 0.0 -0.5 0.8660254 0.0 0.0 0.0 1.0) -itk_add_test(NAME itkImageIODirection3DTest07 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection3DTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection001.mhd} - 1.0 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 1.0 ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeWithDirection001.nhdr) -itk_add_test(NAME itkImageIODirection3DTest08 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection3DTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection002.mhd} - 1.0 0.0 0.0 0.0 0.0 01.0 0.0 -1.0 0.0 ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeWithDirection002.nhdr) -itk_add_test(NAME itkImageIODirection3DTest09 - COMMAND ITKIOImageBaseTestDriver itkImageIODirection3DTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection003.mhd} - 0.0 -1.0 0.0 0.0 0.0 1.0 1.0 0.0 0.0 ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeWithDirection003.nhdr) -itk_add_test(NAME itkImageIOFileNameExtensionsTests - COMMAND ITKIOImageBaseTestDriver itkImageIOFileNameExtensionsTests) +itk_add_test( + NAME + itkImageFileWriterStreamingTest1_1 + COMMAND + ITKIOImageBaseTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreaming1_1.mha + itkImageFileWriterStreamingTest1 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreaming1_1.mha) +itk_add_test( + NAME + itkImageFileWriterStreamingTest1_2 + COMMAND + ITKIOImageBaseTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreaming1_2.mha + itkImageFileWriterStreamingTest1 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreaming1_2.mha + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeCompressed.mha} + 0) +itk_add_test( + NAME + itkImageFileWriterStreamingTest1_3 + COMMAND + ITKIOImageBaseTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreaming1_3.mha + itkImageFileWriterStreamingTest1 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreaming1_3.mha + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + 1) +itk_add_test( + NAME + itkImageFileWriterStreamingTest2_4 + COMMAND + ITKIOImageBaseTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreaming2_4.mha + itkImageFileWriterStreamingTest2 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterStreaming2_4.mha) +itk_add_test( + NAME + itkImageFileWriterTest2_1 + COMMAND + ITKIOImageBaseTestDriver + itkImageFileWriterTest2 + ${ITK_TEST_OUTPUT_DIR}/test.nrrd) +itk_add_test( + NAME + itkImageFileWriterTest2_2 + COMMAND + ITKIOImageBaseTestDriver + itkImageFileWriterTest2 + ${ITK_TEST_OUTPUT_DIR}/test.mha) +itk_add_test( + NAME + itkImageFileWriterTest2_3 + COMMAND + ITKIOImageBaseTestDriver + itkImageFileWriterTest2 + ${ITK_TEST_OUTPUT_DIR}/test.vtk) +itk_add_test( + NAME + itkImageFileWriterUpdateLargestPossibleRegionTest + COMMAND + ITKIOImageBaseTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterUpdateLargestPossibleRegionTest.png + itkImageFileWriterUpdateLargestPossibleRegionTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkImageFileWriterUpdateLargestPossibleRegionTest.png) +itk_add_test( + NAME + itkImageIOBaseTest + COMMAND + ITKIOImageBaseTestDriver + itkImageIOBaseTest) +itk_add_test( + NAME + itkImageIODirection2DTest01 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection2DTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + 1.0 + 0.0 + 0.0 + 1.0 + ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensitySliceBorder20.mhd) +itk_add_test( + NAME + itkImageIODirection2DTest02 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection2DTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.png + 1.0 + 0.0 + 0.0 + 1.0 + ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensitySliceShifted13x17y.mhd) +itk_add_test( + NAME + itkImageIODirection2DTest03 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection2DTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20DirectionPlus30.mhd + 0.8660254 + -0.5 + 0.5 + 0.8660254 + ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensitySliceBorder20DirectionPlus30.mhd) +itk_add_test( + NAME + itkImageIODirection2DTest04 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection2DTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17yDirectionPlus30.mhd + 0.8660254 + -0.5 + 0.5 + 0.8660254 + ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensitySliceShifted13x17yDirectionPlus30.mhd) +itk_add_test( + NAME + itkImageIODirection2DTest05 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection2DTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainT1SliceBorder20DirectionPlus30.mhd + 0.8660254 + -0.5 + 0.5 + 0.8660254 + ${ITK_TEST_OUTPUT_DIR}/BrainT1SliceBorder20DirectionPlus30.mhd) +itk_add_test( + NAME + itkImageIODirection2DTest06 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection2DTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.mhd + 1.0 + 0.0 + 0.0 + 1.0 + ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensitySliceBorder20.nhdr) +itk_add_test( + NAME + itkImageIODirection2DTest07 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection2DTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.mhd + 1.0 + 0.0 + 0.0 + 1.0 + ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensitySliceShifted13x17y.nhdr) +itk_add_test( + NAME + itkImageIODirection2DTest08 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection2DTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20DirectionPlus30.mhd + 0.8660254 + -0.5 + 0.5 + 0.8660254 + ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensitySliceBorder20DirectionPlus30.nhdr) +itk_add_test( + NAME + itkImageIODirection2DTest09 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection2DTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17yDirectionPlus30.mhd + 0.8660254 + -0.5 + 0.5 + 0.8660254 + ${ITK_TEST_OUTPUT_DIR}/BrainProtonDensitySliceShifted13x17yDirectionPlus30.nhdr) +itk_add_test( + NAME + itkImageIODirection2DTest10 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection2DTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainT1SliceBorder20DirectionPlus30.mhd + 0.8660254 + -0.5 + 0.5 + 0.8660254 + ${ITK_TEST_OUTPUT_DIR}/BrainT1SliceBorder20DirectionPlus30.nhdr) +itk_add_test( + NAME + itkImageIODirection2DTest11 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection2DTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.nhdr + 1.0 + 0.0 + 0.0 + 1.0) +itk_add_test( + NAME + itkImageIODirection2DTest12 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection2DTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.nhdr + 1.0 + 0.0 + 0.0 + 1.0) +itk_add_test( + NAME + itkImageIODirection2DTest13 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection2DTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20DirectionPlus30.nhdr + 0.8660254 + -0.5 + 0.5 + 0.8660254) +itk_add_test( + NAME + itkImageIODirection2DTest14 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection2DTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17yDirectionPlus30.nhdr + 0.8660254 + -0.5 + 0.5 + 0.8660254) +itk_add_test( + NAME + itkImageIODirection2DTest15 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection2DTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainT1SliceBorder20DirectionPlus30.nhdr + 0.8660254 + -0.5 + 0.5 + 0.8660254) +itk_add_test( + NAME + itkImageIODirection3DTest01 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection3DTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirectionIdentity.mhd} + 1.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 1.0 + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeWithDirectionIdentity.mhd) +itk_add_test( + NAME + itkImageIODirection3DTest02 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection3DTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.mhd} + 0.8660254 + 0.5 + 0.0 + -0.5 + 0.8660254 + 0.0 + 0.0 + 0.0 + 1.0 + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeWithDirection.mhd) +itk_add_test( + NAME + itkImageIODirection3DTest03 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection3DTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirectionIdentity.mhd} + 1.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 1.0 + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeWithDirectionIdentity.nhdr) +itk_add_test( + NAME + itkImageIODirection3DTest04 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection3DTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.mhd} + 0.8660254 + 0.5 + 0.0 + -0.5 + 0.8660254 + 0.0 + 0.0 + 0.0 + 1.0 + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeWithDirection.nhdr) +itk_add_test( + NAME + itkImageIODirection3DTest05 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection3DTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirectionIdentity.nhdr,HeadMRVolumeWithDirectionIdentity.raw.gz} + 1.0 + 0.0 + 0.0 + 0.0 + 1.0 + 0.0 + 0.0 + 0.0 + 1.0) +itk_add_test( + NAME + itkImageIODirection3DTest06 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection3DTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.nhdr,HeadMRVolumeWithDirection.raw.gz} + 0.8660254 + 0.5 + 0.0 + -0.5 + 0.8660254 + 0.0 + 0.0 + 0.0 + 1.0) +itk_add_test( + NAME + itkImageIODirection3DTest07 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection3DTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection001.mhd} + 1.0 + 0.0 + 0.0 + 0.0 + -1.0 + 0.0 + 0.0 + 0.0 + 1.0 + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeWithDirection001.nhdr) +itk_add_test( + NAME + itkImageIODirection3DTest08 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection3DTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection002.mhd} + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 01.0 + 0.0 + -1.0 + 0.0 + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeWithDirection002.nhdr) +itk_add_test( + NAME + itkImageIODirection3DTest09 + COMMAND + ITKIOImageBaseTestDriver + itkImageIODirection3DTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection003.mhd} + 0.0 + -1.0 + 0.0 + 0.0 + 0.0 + 1.0 + 1.0 + 0.0 + 0.0 + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeWithDirection003.nhdr) +itk_add_test( + NAME + itkImageIOFileNameExtensionsTests + COMMAND + ITKIOImageBaseTestDriver + itkImageIOFileNameExtensionsTests) -itk_add_test(NAME itkImageSeriesReaderDimensionsTest1 - COMMAND ITKIOImageBaseTestDriver itkImageSeriesReaderDimensionsTest - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0075.dcm} - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0076.dcm} - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0077.dcm}) +itk_add_test( + NAME + itkImageSeriesReaderDimensionsTest1 + COMMAND + ITKIOImageBaseTestDriver + itkImageSeriesReaderDimensionsTest + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0075.dcm} + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0076.dcm} + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0077.dcm}) -set_property(TEST itkImageSeriesReaderDimensionsTest1 APPEND PROPERTY DEPENDS ITK_Data) +set_property( + TEST itkImageSeriesReaderDimensionsTest1 + APPEND + PROPERTY DEPENDS ITK_Data) -itk_add_test(NAME itkImageSeriesReaderSamplingTest1 - COMMAND ITKIOImageBaseTestDriver itkImageSeriesReaderSamplingTest - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0075.dcm} - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0076.dcm} - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0076.dcm} # duplicated slice test to emulate non-uniform sampling - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0077.dcm}) +itk_add_test( + NAME + itkImageSeriesReaderSamplingTest1 + COMMAND + ITKIOImageBaseTestDriver + itkImageSeriesReaderSamplingTest + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0075.dcm} + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0076.dcm} + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0076.dcm} # duplicated slice test to emulate non-uniform sampling + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0077.dcm}) -set_property(TEST itkImageSeriesReaderDimensionsTest1 APPEND PROPERTY DEPENDS ITK_Data) +set_property( + TEST itkImageSeriesReaderDimensionsTest1 + APPEND + PROPERTY DEPENDS ITK_Data) # TODO: add a test with a missing slice, for that we need to have example with one more slice +itk_add_test( + NAME + itkImageFileReaderPositiveSpacingTest + COMMAND + ITKIOImageBaseTestDriver + itkImageFileReaderPositiveSpacingTest + DATA{${ITK_DATA_ROOT}/Input/itkImageNegativeSpacing.mha}) -itk_add_test(NAME itkImageFileReaderPositiveSpacingTest - COMMAND ITKIOImageBaseTestDriver itkImageFileReaderPositiveSpacingTest - DATA{${ITK_DATA_ROOT}/Input/itkImageNegativeSpacing.mha}) +itk_add_test( + NAME + itkImageSeriesReaderDimensionsTest2 + COMMAND + ITKIOImageBaseTestDriver + itkImageSeriesReaderDimensionsTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.tif} + DATA{${ITK_DATA_ROOT}/Input/cthead1.tif} + DATA{${ITK_DATA_ROOT}/Input/cthead1.tif}) -itk_add_test(NAME itkImageSeriesReaderDimensionsTest2 - COMMAND ITKIOImageBaseTestDriver itkImageSeriesReaderDimensionsTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.tif} - DATA{${ITK_DATA_ROOT}/Input/cthead1.tif} DATA{${ITK_DATA_ROOT}/Input/cthead1.tif}) - -itk_add_test(NAME itkImageSeriesReaderVectorImageTest1 - COMMAND ITKIOImageBaseTestDriver itkImageSeriesReaderVectorTest +itk_add_test( + NAME + itkImageSeriesReaderVectorImageTest1 + COMMAND + ITKIOImageBaseTestDriver + itkImageSeriesReaderVectorTest DATA{${ITK_DATA_ROOT}/Input/RGBTestImage.tif} DATA{${ITK_DATA_ROOT}/Input/RGBTestImage.tif} DATA{${ITK_DATA_ROOT}/Input/RGBTestImage.tif}) -itk_add_test(NAME itkImageSeriesReaderVectorImageTest2 - COMMAND ITKIOImageBaseTestDriver itkImageSeriesReaderVectorTest - DATA{${ITK_DATA_ROOT}/Input/48BitTestImage.tif} - DATA{${ITK_DATA_ROOT}/Input/48BitTestImage.tif} DATA{${ITK_DATA_ROOT}/Input/48BitTestImage.tif}) -itk_add_test(NAME itkImageSeriesWriterTest - COMMAND ITKIOImageBaseTestDriver itkImageSeriesWriterTest - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} - ${ITK_TEST_OUTPUT_DIR} png) +itk_add_test( + NAME + itkImageSeriesReaderVectorImageTest2 + COMMAND + ITKIOImageBaseTestDriver + itkImageSeriesReaderVectorTest + DATA{${ITK_DATA_ROOT}/Input/48BitTestImage.tif} + DATA{${ITK_DATA_ROOT}/Input/48BitTestImage.tif} + DATA{${ITK_DATA_ROOT}/Input/48BitTestImage.tif}) +itk_add_test( + NAME + itkImageSeriesWriterTest + COMMAND + ITKIOImageBaseTestDriver + itkImageSeriesWriterTest + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} + ${ITK_TEST_OUTPUT_DIR} + png) if(ITK_BUILD_SHARED_LIBS) ## Create a library to test ITK IO plugins @@ -324,47 +856,84 @@ if(ITK_BUILD_SHARED_LIBS) set_property(TARGET FileFreeTestLib PROPERTY LIBRARY_OUTPUT_DIRECTORY ${ITK_TEST_OUTPUT_DIR}) add_dependencies(ITKIOImageBaseTestDriver FileFreeTestLib) - itk_add_test(NAME itkIOPluginTest - COMMAND itkTestDriver --add-before-env ITK_AUTOLOAD_PATH "$" - "$" itkIOPluginTest - ${ITK_TEST_OUTPUT_DIR} - "FileFreeIO::Size=128,256:Spacing=.5,.8:Origin=5,6:Direction=-1,0,0,-1" - ${ITK_TEST_OUTPUT_DIR}/itkIOPluginTest.png - ) + itk_add_test( + NAME + itkIOPluginTest + COMMAND + itkTestDriver + --add-before-env + ITK_AUTOLOAD_PATH + "$" + "$" + itkIOPluginTest + ${ITK_TEST_OUTPUT_DIR} + "FileFreeIO::Size=128,256:Spacing=.5,.8:Origin=5,6:Direction=-1,0,0,-1" + ${ITK_TEST_OUTPUT_DIR}/itkIOPluginTest.png) endif() -itk_add_test(NAME itkNoiseImageFilterTest - COMMAND ITKIOImageBaseTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkNoiseImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkNoiseImageFilterTest.png - itkNoiseImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkNoiseImageFilterTest.png) -itk_add_test(NAME itkMatrixImageWriteReadTest - COMMAND ITKIOImageBaseTestDriver itkMatrixImageWriteReadTest - ${ITK_TEST_OUTPUT_DIR}/testMatrix1.mha) -itk_add_test(NAME itkReadWriteImageWithDictionaryTest - COMMAND ITKIOImageBaseTestDriver itkReadWriteImageWithDictionaryTest - ${ITK_TEST_OUTPUT_DIR}/test.hdr) -itk_add_test(NAME itkReadWriteImageWithDictionaryTest1 - COMMAND ITKIOImageBaseTestDriver itkReadWriteImageWithDictionaryTest - ${ITK_TEST_OUTPUT_DIR}/test.mha) -itk_add_test(NAME itkVectorImageReadWriteTest - COMMAND ITKIOImageBaseTestDriver itkVectorImageReadWriteTest - ${ITK_TEST_OUTPUT_DIR}/VectorImageReadWriteTest.mhd) -itk_add_test(NAME itkVectorImageReadWriteTest2 - COMMAND ITKIOImageBaseTestDriver itkVectorImageReadWriteTest - ${ITK_TEST_OUTPUT_DIR}/VectorImageReadWriteTest.nrrd) +itk_add_test( + NAME + itkNoiseImageFilterTest + COMMAND + ITKIOImageBaseTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/itkNoiseImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkNoiseImageFilterTest.png + itkNoiseImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkNoiseImageFilterTest.png) +itk_add_test( + NAME + itkMatrixImageWriteReadTest + COMMAND + ITKIOImageBaseTestDriver + itkMatrixImageWriteReadTest + ${ITK_TEST_OUTPUT_DIR}/testMatrix1.mha) +itk_add_test( + NAME + itkReadWriteImageWithDictionaryTest + COMMAND + ITKIOImageBaseTestDriver + itkReadWriteImageWithDictionaryTest + ${ITK_TEST_OUTPUT_DIR}/test.hdr) +itk_add_test( + NAME + itkReadWriteImageWithDictionaryTest1 + COMMAND + ITKIOImageBaseTestDriver + itkReadWriteImageWithDictionaryTest + ${ITK_TEST_OUTPUT_DIR}/test.mha) +itk_add_test( + NAME + itkVectorImageReadWriteTest + COMMAND + ITKIOImageBaseTestDriver + itkVectorImageReadWriteTest + ${ITK_TEST_OUTPUT_DIR}/VectorImageReadWriteTest.mhd) +itk_add_test( + NAME + itkVectorImageReadWriteTest2 + COMMAND + ITKIOImageBaseTestDriver + itkVectorImageReadWriteTest + ${ITK_TEST_OUTPUT_DIR}/VectorImageReadWriteTest.nrrd) -itk_add_test(NAME itkImageFileReaderManyComponentVectorTest - COMMAND ITKIOImageBaseTestDriver itkImageFileReaderManyComponentVectorTest - DATA{Input/rf_voltage_15_freq_0005000000_2017-5-31_12-36-44_ReferenceSpectrum_side_lines_03_fft1d_size_128.mha}) +itk_add_test( + NAME + itkImageFileReaderManyComponentVectorTest + COMMAND + ITKIOImageBaseTestDriver + itkImageFileReaderManyComponentVectorTest + DATA{Input/rf_voltage_15_freq_0005000000_2017-5-31_12-36-44_ReferenceSpectrum_side_lines_03_fft1d_size_128.mha}) add_executable(itkUnicodeIOTest itkUnicodeIOTest.cxx) itk_module_target_label(itkUnicodeIOTest) -itk_add_test(NAME itkUnicodeIOTest COMMAND itkUnicodeIOTest) - +itk_add_test( + NAME + itkUnicodeIOTest + COMMAND + itkUnicodeIOTest) -set(ITKIOImageBaseGTests - itkWriteImageFunctionGTest.cxx - ) -CreateGoogleTestDriver(ITKIOImageBase "${ITKIOImageBase-Test_LIBRARIES}" "${ITKIOImageBaseGTests}") +set(ITKIOImageBaseGTests itkWriteImageFunctionGTest.cxx) +creategoogletestdriver(ITKIOImageBase "${ITKIOImageBase-Test_LIBRARIES}" "${ITKIOImageBaseGTests}") target_compile_definitions(ITKIOImageBaseGTestDriver PRIVATE "-DITK_TEST_OUTPUT_DIR=${ITK_TEST_OUTPUT_DIR}") diff --git a/Modules/IO/ImageBase/wrapping/CMakeLists.txt b/Modules/IO/ImageBase/wrapping/CMakeLists.txt index f4367cbba13..a7a948ef670 100644 --- a/Modules/IO/ImageBase/wrapping/CMakeLists.txt +++ b/Modules/IO/ImageBase/wrapping/CMakeLists.txt @@ -1,6 +1,4 @@ itk_wrap_module(ITKIOImageBase) -set(WRAPPER_SUBMODULE_ORDER - ITKIOImageBaseBase -) +set(WRAPPER_SUBMODULE_ORDER ITKIOImageBaseBase) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/IO/ImageBase/wrapping/ITKIOImageBaseBase.wrap b/Modules/IO/ImageBase/wrapping/ITKIOImageBaseBase.wrap index 843149ad0e6..0410de72cb7 100644 --- a/Modules/IO/ImageBase/wrapping/ITKIOImageBaseBase.wrap +++ b/Modules/IO/ImageBase/wrapping/ITKIOImageBaseBase.wrap @@ -1,4 +1,3 @@ - # non templated IO classes and factories itk_wrap_simple_class("itk::ImageIOBase" POINTER) itk_wrap_simple_class("itk::StreamingImageIOBase" POINTER) diff --git a/Modules/IO/ImageBase/wrapping/itkImageFileReader.wrap b/Modules/IO/ImageBase/wrapping/itkImageFileReader.wrap index 6c581c92b0b..a105d063be9 100644 --- a/Modules/IO/ImageBase/wrapping/itkImageFileReader.wrap +++ b/Modules/IO/ImageBase/wrapping/itkImageFileReader.wrap @@ -1,18 +1,17 @@ itk_wrap_include("itkPhasedArray3DSpecialCoordinatesImage.h") itk_wrap_class("itk::ImageFileReader" POINTER) - # Force uchar image IO - UNIQUE(image_types "ULL;SI;UI;UC;${WRAP_ITK_ALL_TYPES}") - itk_wrap_image_filter("${image_types}" 1) +# Force uchar image IO +unique(image_types "ULL;SI;UI;UC;${WRAP_ITK_ALL_TYPES}") +itk_wrap_image_filter("${image_types}" 1) - UNIQUE(to_types "${WRAP_ITK_SCALAR};UC") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(type ${to_types}) - itk_wrap_template("${ITKM_VI${type}${d}}" "${ITKT_VI${type}${d}}") - endforeach() +unique(to_types "${WRAP_ITK_SCALAR};UC") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(type ${to_types}) + itk_wrap_template("${ITKM_VI${type}${d}}" "${ITKT_VI${type}${d}}") endforeach() +endforeach() - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("PA3DSCI${ITKM_${t}}" - "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("PA3DSCI${ITKM_${t}}" "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/IO/ImageBase/wrapping/itkImageFileWriter.wrap b/Modules/IO/ImageBase/wrapping/itkImageFileWriter.wrap index 6ee18a6c248..2b67509d00d 100644 --- a/Modules/IO/ImageBase/wrapping/itkImageFileWriter.wrap +++ b/Modules/IO/ImageBase/wrapping/itkImageFileWriter.wrap @@ -1,18 +1,17 @@ itk_wrap_include("itkPhasedArray3DSpecialCoordinatesImage.h") itk_wrap_class("itk::ImageFileWriter" POINTER) - # Force uchar image IO - UNIQUE(image_types "ULL;UI;SI;UC;RGBUC;${WRAP_ITK_ALL_TYPES}") - itk_wrap_image_filter("${image_types}" 1) +# Force uchar image IO +unique(image_types "ULL;UI;SI;UC;RGBUC;${WRAP_ITK_ALL_TYPES}") +itk_wrap_image_filter("${image_types}" 1) - UNIQUE(to_types "${WRAP_ITK_SCALAR};UC") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(type ${to_types}) - itk_wrap_template("${ITKM_VI${type}${d}}" "${ITKT_VI${type}${d}}") - endforeach() +unique(to_types "${WRAP_ITK_SCALAR};UC") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(type ${to_types}) + itk_wrap_template("${ITKM_VI${type}${d}}" "${ITKT_VI${type}${d}}") endforeach() +endforeach() - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("PA3DSCI${ITKM_${t}}" - "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("PA3DSCI${ITKM_${t}}" "itk::PhasedArray3DSpecialCoordinatesImage< ${ITKT_${t}} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/IO/ImageBase/wrapping/itkImageSeriesReader.wrap b/Modules/IO/ImageBase/wrapping/itkImageSeriesReader.wrap index 7f0083633db..a41d6f09af0 100644 --- a/Modules/IO/ImageBase/wrapping/itkImageSeriesReader.wrap +++ b/Modules/IO/ImageBase/wrapping/itkImageSeriesReader.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ImageSeriesReader" POINTER) - # Force uchar image IO - UNIQUE(image_types "UC;UI;SI;${WRAP_ITK_ALL_TYPES}") - itk_wrap_image_filter("${image_types}" 1) +# Force uchar image IO +unique(image_types "UC;UI;SI;${WRAP_ITK_ALL_TYPES}") +itk_wrap_image_filter("${image_types}" 1) itk_end_wrap_class() diff --git a/Modules/IO/ImageBase/wrapping/itkImageSeriesWriter.wrap b/Modules/IO/ImageBase/wrapping/itkImageSeriesWriter.wrap index d68ae18fbbf..e09b6419df7 100644 --- a/Modules/IO/ImageBase/wrapping/itkImageSeriesWriter.wrap +++ b/Modules/IO/ImageBase/wrapping/itkImageSeriesWriter.wrap @@ -1,16 +1,15 @@ itk_wrap_class("itk::ImageSeriesWriter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2) - foreach(d1 ${ITK_WRAP_IMAGE_DIMS}) - foreach(d2 ${ITK_WRAP_IMAGE_DIMS}) - if("${d1}" GREATER "${d2}") - foreach(t ${WRAP_ITK_SCALAR} ${WRAP_ITK_RGB} ${WRAP_ITK_COMPLEX_REAL}) - itk_wrap_template("${ITKM_I${t}${d1}}${ITKM_I${t}${d2}}" - "${ITKT_I${t}${d1}},${ITKT_I${t}${d2}}") - endforeach() - endif() - endforeach() +foreach(d1 ${ITK_WRAP_IMAGE_DIMS}) + foreach(d2 ${ITK_WRAP_IMAGE_DIMS}) + if("${d1}" GREATER "${d2}") + foreach(t ${WRAP_ITK_SCALAR} ${WRAP_ITK_RGB} ${WRAP_ITK_COMPLEX_REAL}) + itk_wrap_template("${ITKM_I${t}${d1}}${ITKM_I${t}${d2}}" "${ITKT_I${t}${d1}},${ITKT_I${t}${d2}}") + endforeach() + endif() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/IO/JPEG/itk-module.cmake b/Modules/IO/JPEG/itk-module.cmake index 664c5767728..2596e269dc7 100644 --- a/Modules/IO/JPEG/itk-module.cmake +++ b/Modules/IO/JPEG/itk-module.cmake @@ -1,16 +1,16 @@ set(DOCUMENTATION "This module contains an ImageIO class for reading and writing files in the JPEG format.") -itk_module(ITKIOJPEG +itk_module( + ITKIOJPEG ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase PRIVATE_DEPENDS - ITKJPEG + ITKJPEG TEST_DEPENDS - ITKTestKernel + ITKTestKernel FACTORY_NAMES - ImageIO::JPEG + ImageIO::JPEG DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/JPEG/src/CMakeLists.txt b/Modules/IO/JPEG/src/CMakeLists.txt index ac9d6f993f8..327d8a0b4bc 100644 --- a/Modules/IO/JPEG/src/CMakeLists.txt +++ b/Modules/IO/JPEG/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOJPEG_SRCS - itkJPEGImageIOFactory.cxx - itkJPEGImageIO.cxx - ) +set(ITKIOJPEG_SRCS itkJPEGImageIOFactory.cxx itkJPEGImageIO.cxx) itk_module_add_library(ITKIOJPEG ${ITKIOJPEG_SRCS}) diff --git a/Modules/IO/JPEG/test/CMakeLists.txt b/Modules/IO/JPEG/test/CMakeLists.txt index 774a2245770..8b136313b2e 100644 --- a/Modules/IO/JPEG/test/CMakeLists.txt +++ b/Modules/IO/JPEG/test/CMakeLists.txt @@ -1,33 +1,60 @@ itk_module_test() set(ITKIOJPEGTests -itkJPEGImageIOTest.cxx -itkJPEGImageIOTest2.cxx -itkJPEGImageIODegenerateCasesTest.cxx -itkJPEGImageIOBrokenCasesTest.cxx -itkJPEGImageIOCMYKTest.cxx -) + itkJPEGImageIOTest.cxx + itkJPEGImageIOTest2.cxx + itkJPEGImageIODegenerateCasesTest.cxx + itkJPEGImageIOBrokenCasesTest.cxx + itkJPEGImageIOCMYKTest.cxx) -CreateTestDriver(ITKIOJPEG "${ITKIOJPEG-Test_LIBRARIES}" "${ITKIOJPEGTests}") +createtestdriver(ITKIOJPEG "${ITKIOJPEG-Test_LIBRARIES}" "${ITKIOJPEGTests}") -itk_add_test(NAME itkJPEGImageIOTest - COMMAND ITKIOJPEGTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/cthead1.png - itkJPEGImageIOTest DATA{${ITK_DATA_ROOT}/Input/cthead1.jpg} ${ITK_TEST_OUTPUT_DIR}/cthead1.png) -itk_add_test(NAME itkJPEGImageIOTest2 - COMMAND ITKIOJPEGTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.jpg} - ${ITK_TEST_OUTPUT_DIR}/cthead1.jpg - itkJPEGImageIOTest DATA{${ITK_DATA_ROOT}/Input/cthead1.jpg} ${ITK_TEST_OUTPUT_DIR}/cthead1.jpg) -itk_add_test(NAME itkJPEGImageIOSpacing - COMMAND ITKIOJPEGTestDriver - itkJPEGImageIOTest2 ${ITK_TEST_OUTPUT_DIR}/itkJPEGImageIOSpacing.jpg) -itk_add_test(NAME itkJPEGImageIOTestCorruptedImage - COMMAND ITKIOJPEGTestDriver - itkJPEGImageIODegenerateCasesTest DATA{Input/corrupted_image.jpg}) -itk_add_test(NAME itkJPEGImageIOTestCorruptedImage2 - COMMAND ITKIOJPEGTestDriver - itkJPEGImageIOBrokenCasesTest DATA{Input/corrupted2.jpg}) -itk_add_test(NAME itkJPEGImageIOTestCMYKImage - COMMAND ITKIOJPEGTestDriver - itkJPEGImageIOCMYKTest DATA{Input/cmyk.jpg}) +itk_add_test( + NAME + itkJPEGImageIOTest + COMMAND + ITKIOJPEGTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/cthead1.png + itkJPEGImageIOTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.jpg} + ${ITK_TEST_OUTPUT_DIR}/cthead1.png) +itk_add_test( + NAME + itkJPEGImageIOTest2 + COMMAND + ITKIOJPEGTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.jpg} + ${ITK_TEST_OUTPUT_DIR}/cthead1.jpg + itkJPEGImageIOTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.jpg} + ${ITK_TEST_OUTPUT_DIR}/cthead1.jpg) +itk_add_test( + NAME + itkJPEGImageIOSpacing + COMMAND + ITKIOJPEGTestDriver + itkJPEGImageIOTest2 + ${ITK_TEST_OUTPUT_DIR}/itkJPEGImageIOSpacing.jpg) +itk_add_test( + NAME + itkJPEGImageIOTestCorruptedImage + COMMAND + ITKIOJPEGTestDriver + itkJPEGImageIODegenerateCasesTest + DATA{Input/corrupted_image.jpg}) +itk_add_test( + NAME + itkJPEGImageIOTestCorruptedImage2 + COMMAND + ITKIOJPEGTestDriver + itkJPEGImageIOBrokenCasesTest + DATA{Input/corrupted2.jpg}) +itk_add_test( + NAME + itkJPEGImageIOTestCMYKImage + COMMAND + ITKIOJPEGTestDriver + itkJPEGImageIOCMYKTest + DATA{Input/cmyk.jpg}) diff --git a/Modules/IO/JPEG2000/itk-module.cmake b/Modules/IO/JPEG2000/itk-module.cmake index 9040bc34872..e7d90602cd2 100644 --- a/Modules/IO/JPEG2000/itk-module.cmake +++ b/Modules/IO/JPEG2000/itk-module.cmake @@ -1,17 +1,17 @@ set(DOCUMENTATION "This module contains an ImageIO class for reading and writing files in the JPEG2000 format.") -itk_module(ITKIOJPEG2000 +itk_module( + ITKIOJPEG2000 ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase PRIVATE_DEPENDS - ITKOpenJPEG + ITKOpenJPEG TEST_DEPENDS - ITKTestKernel - ITKImageGrid + ITKTestKernel + ITKImageGrid FACTORY_NAMES - ImageIO::JPEG2000 + ImageIO::JPEG2000 DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/JPEG2000/src/CMakeLists.txt b/Modules/IO/JPEG2000/src/CMakeLists.txt index 1a854be03d7..6327dbfa4d0 100644 --- a/Modules/IO/JPEG2000/src/CMakeLists.txt +++ b/Modules/IO/JPEG2000/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOJPEG2000_SRCS - itkJPEG2000ImageIOFactory.cxx - itkJPEG2000ImageIO.cxx - ) +set(ITKIOJPEG2000_SRCS itkJPEG2000ImageIOFactory.cxx itkJPEG2000ImageIO.cxx) itk_module_add_library(ITKIOJPEG2000 ${ITKIOJPEG2000_SRCS}) diff --git a/Modules/IO/JPEG2000/test/CMakeLists.txt b/Modules/IO/JPEG2000/test/CMakeLists.txt index 4267ae31bd9..037b03104aa 100644 --- a/Modules/IO/JPEG2000/test/CMakeLists.txt +++ b/Modules/IO/JPEG2000/test/CMakeLists.txt @@ -1,38 +1,76 @@ itk_module_test() set(ITKIOJPEG2000Tests -itkJPEG2000ImageIOFactoryTest01.cxx -itkJPEG2000ImageIORegionOfInterest.cxx -itkJPEG2000ImageIOTest00.cxx -itkJPEG2000ImageIOTest01.cxx -itkJPEG2000ImageIOTest02.cxx -itkJPEG2000ImageIOTest03.cxx -itkJPEG2000ImageIOTest04.cxx -itkJPEG2000ImageIOTest05.cxx -itkJPEG2000ImageIOTest06.cxx -) + itkJPEG2000ImageIOFactoryTest01.cxx + itkJPEG2000ImageIORegionOfInterest.cxx + itkJPEG2000ImageIOTest00.cxx + itkJPEG2000ImageIOTest01.cxx + itkJPEG2000ImageIOTest02.cxx + itkJPEG2000ImageIOTest03.cxx + itkJPEG2000ImageIOTest04.cxx + itkJPEG2000ImageIOTest05.cxx + itkJPEG2000ImageIOTest06.cxx) -CreateTestDriver(ITKIOJPEG2000 "${ITKIOJPEG2000-Test_LIBRARIES}" "${ITKIOJPEG2000Tests}") -itk_add_test(NAME itkJPEG2000Test00 - COMMAND ITKIOJPEG2000TestDriver itkJPEG2000ImageIORegionOfInterest - DATA{Input/Bretagne1.j2k} ${ITK_TEST_OUTPUT_DIR}/Bretagne1_RegionTest01.tif 160 120 320 240) -itk_add_test(NAME itkJPEG2000Test01 - COMMAND ITKIOJPEG2000TestDriver itkJPEG2000ImageIOTest03 - DATA{Input/Bretagne1.j2k} ${ITK_TEST_OUTPUT_DIR}/Bretagne1_01.png) -itk_add_test(NAME itkJPEG2000Test02 - COMMAND ITKIOJPEG2000TestDriver itkJPEG2000ImageIOTest03 - DATA{Input/Cevennes2.jp2} ${ITK_TEST_OUTPUT_DIR}/Cevennes2_01.png) -itk_add_test(NAME itkJPEG2000Test03 - COMMAND ITKIOJPEG2000TestDriver itkJPEG2000ImageIOTest03 - ${ITK_TEST_OUTPUT_DIR}/Bretagne1_RegionTest01.tif ${ITK_TEST_OUTPUT_DIR}/Bretagne1_02.j2k) -set_tests_properties(itkJPEG2000Test03 PROPERTIES - DEPENDS itkJPEG2000Test00 - REQUIRED_FILES ${ITK_TEST_OUTPUT_DIR}/Bretagne1_RegionTest01.tif) +createtestdriver(ITKIOJPEG2000 "${ITKIOJPEG2000-Test_LIBRARIES}" "${ITKIOJPEG2000Tests}") +itk_add_test( + NAME + itkJPEG2000Test00 + COMMAND + ITKIOJPEG2000TestDriver + itkJPEG2000ImageIORegionOfInterest + DATA{Input/Bretagne1.j2k} + ${ITK_TEST_OUTPUT_DIR}/Bretagne1_RegionTest01.tif + 160 + 120 + 320 + 240) +itk_add_test( + NAME + itkJPEG2000Test01 + COMMAND + ITKIOJPEG2000TestDriver + itkJPEG2000ImageIOTest03 + DATA{Input/Bretagne1.j2k} + ${ITK_TEST_OUTPUT_DIR}/Bretagne1_01.png) +itk_add_test( + NAME + itkJPEG2000Test02 + COMMAND + ITKIOJPEG2000TestDriver + itkJPEG2000ImageIOTest03 + DATA{Input/Cevennes2.jp2} + ${ITK_TEST_OUTPUT_DIR}/Cevennes2_01.png) +itk_add_test( + NAME + itkJPEG2000Test03 + COMMAND + ITKIOJPEG2000TestDriver + itkJPEG2000ImageIOTest03 + ${ITK_TEST_OUTPUT_DIR}/Bretagne1_RegionTest01.tif + ${ITK_TEST_OUTPUT_DIR}/Bretagne1_02.j2k) +set_tests_properties( + itkJPEG2000Test03 + PROPERTIES DEPENDS + itkJPEG2000Test00 + REQUIRED_FILES + ${ITK_TEST_OUTPUT_DIR}/Bretagne1_RegionTest01.tif) -itk_add_test(NAME itkJPEG2000Test05 - COMMAND ITKIOJPEG2000TestDriver itkJPEG2000ImageIOTest05 - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR} jp2) -itk_add_test(NAME itkJPEG2000Test06 - COMMAND ITKIOJPEG2000TestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1-unitspacing.tif} +itk_add_test( + NAME + itkJPEG2000Test05 + COMMAND + ITKIOJPEG2000TestDriver + itkJPEG2000ImageIOTest05 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR} + jp2) +itk_add_test( + NAME + itkJPEG2000Test06 + COMMAND + ITKIOJPEG2000TestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1-unitspacing.tif} ${ITK_TEST_OUTPUT_DIR}/itkJPEG2000Test06_cthead1.tif - itkJPEG2000ImageIOTest06 DATA{Input/cthead1.j2k} ${ITK_TEST_OUTPUT_DIR}/itkJPEG2000Test06_cthead1.tif) + itkJPEG2000ImageIOTest06 + DATA{Input/cthead1.j2k} + ${ITK_TEST_OUTPUT_DIR}/itkJPEG2000Test06_cthead1.tif) diff --git a/Modules/IO/LSM/itk-module.cmake b/Modules/IO/LSM/itk-module.cmake index da0d773f033..223b90cd62e 100644 --- a/Modules/IO/LSM/itk-module.cmake +++ b/Modules/IO/LSM/itk-module.cmake @@ -1,20 +1,21 @@ -set(DOCUMENTATION "This module contains an ImageIO class for reading LSM (Zeiss) +set(DOCUMENTATION + "This module contains an ImageIO class for reading LSM (Zeiss) images LSM is a line of confocal laser scanning microscopes produced by the Zeiss company. LSM files are essentially extensions of the TIFF multiple image stack file format.") -itk_module(ITKIOLSM +itk_module( + ITKIOLSM DEPENDS - ITKIOTIFF + ITKIOTIFF ENABLE_SHARED PRIVATE_DEPENDS - ITKIOImageBase - ITKTIFF + ITKIOImageBase + ITKTIFF TEST_DEPENDS - ITKTestKernel - ITKIOTIFF + ITKTestKernel + ITKIOTIFF FACTORY_NAMES - ImageIO::LSM + ImageIO::LSM DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/LSM/src/CMakeLists.txt b/Modules/IO/LSM/src/CMakeLists.txt index cfba7d03ba7..c46c78959e6 100644 --- a/Modules/IO/LSM/src/CMakeLists.txt +++ b/Modules/IO/LSM/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOLSM_SRCS - itkLSMImageIOFactory.cxx - itkLSMImageIO.cxx - ) +set(ITKIOLSM_SRCS itkLSMImageIOFactory.cxx itkLSMImageIO.cxx) itk_module_add_library(ITKIOLSM ${ITKIOLSM_SRCS}) diff --git a/Modules/IO/LSM/test/CMakeLists.txt b/Modules/IO/LSM/test/CMakeLists.txt index 6c40df44feb..6c9511a1c63 100644 --- a/Modules/IO/LSM/test/CMakeLists.txt +++ b/Modules/IO/LSM/test/CMakeLists.txt @@ -1,13 +1,21 @@ itk_module_test() -set(ITKIOLSMTests -itkLSMImageIOTest.cxx -) +set(ITKIOLSMTests itkLSMImageIOTest.cxx) -CreateTestDriver(ITKIOLSM "${ITKIOLSM-Test_LIBRARIES}" "${ITKIOLSMTests}") +createtestdriver(ITKIOLSM "${ITKIOLSM-Test_LIBRARIES}" "${ITKIOLSMTests}") -itk_add_test(NAME itkLSMImageIOTest - COMMAND ITKIOLSMTestDriver --ignoreInputInformation - --compareCoordinateTolerance 1.0e-6 --compareDirectionTolerance 1.0e-6 # flags added to verify that they are available - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.tif} - ${ITK_TEST_OUTPUT_DIR}/itkLSMImageIOTest_cthead1.tif - itkLSMImageIOTest DATA{${ITK_DATA_ROOT}/Input/cthead1.lsm} ${ITK_TEST_OUTPUT_DIR}/itkLSMImageIOTest_cthead1.tif) +itk_add_test( + NAME + itkLSMImageIOTest + COMMAND + ITKIOLSMTestDriver + --ignoreInputInformation + --compareCoordinateTolerance + 1.0e-6 + --compareDirectionTolerance + 1.0e-6 # flags added to verify that they are available + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.tif} + ${ITK_TEST_OUTPUT_DIR}/itkLSMImageIOTest_cthead1.tif + itkLSMImageIOTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.lsm} + ${ITK_TEST_OUTPUT_DIR}/itkLSMImageIOTest_cthead1.tif) diff --git a/Modules/IO/MINC/CMakeLists.txt b/Modules/IO/MINC/CMakeLists.txt index 5999fbeffa3..a0e19fda960 100644 --- a/Modules/IO/MINC/CMakeLists.txt +++ b/Modules/IO/MINC/CMakeLists.txt @@ -2,11 +2,8 @@ project(ITKIOMINC) set(ITKIOMINC_LIBRARIES ITKIOMINC) if(NOT ITK_USE_SYSTEM_HDF5) - include_directories( - "${ITKHDF5_SOURCE_DIR}/src/itkhdf5" - "${ITKHDF5_SOURCE_DIR}/src/itkhdf5/src" - "${ITKHDF5_BINARY_DIR}/src/itkhdf5" - ) + include_directories("${ITKHDF5_SOURCE_DIR}/src/itkhdf5" "${ITKHDF5_SOURCE_DIR}/src/itkhdf5/src" + "${ITKHDF5_BINARY_DIR}/src/itkhdf5") endif() itk_module_impl() diff --git a/Modules/IO/MINC/itk-module.cmake b/Modules/IO/MINC/itk-module.cmake index dc5dc99015c..31e1bafe1a6 100644 --- a/Modules/IO/MINC/itk-module.cmake +++ b/Modules/IO/MINC/itk-module.cmake @@ -1,17 +1,17 @@ set(DOCUMENTATION "This module contains classes for reading and writing image files in the MINC 2 file Format (mnc) and transformations (xfm).") -itk_module(ITKIOMINC +itk_module( + ITKIOMINC ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase PRIVATE_DEPENDS - ITKMINC + ITKMINC TEST_DEPENDS - ITKTestKernel - ITKImageStatistics + ITKTestKernel + ITKImageStatistics FACTORY_NAMES - ImageIO::MINC + ImageIO::MINC DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/MINC/src/CMakeLists.txt b/Modules/IO/MINC/src/CMakeLists.txt index bdf7fce4179..db5afa07594 100644 --- a/Modules/IO/MINC/src/CMakeLists.txt +++ b/Modules/IO/MINC/src/CMakeLists.txt @@ -1,7 +1,4 @@ -set(ITKIOMINC_SRC - itkMINCImageIO.cxx - itkMINCImageIOFactory.cxx -) +set(ITKIOMINC_SRC itkMINCImageIO.cxx itkMINCImageIOFactory.cxx) add_library(ITKIOMINC ${ITK_LIBRARY_BUILD_TYPE} ${ITKIOMINC_SRC}) itk_module_link_dependencies() diff --git a/Modules/IO/MINC/test/CMakeLists.txt b/Modules/IO/MINC/test/CMakeLists.txt index 5e2c8431d5d..6f2b2f8551e 100644 --- a/Modules/IO/MINC/test/CMakeLists.txt +++ b/Modules/IO/MINC/test/CMakeLists.txt @@ -1,105 +1,171 @@ itk_module_test() if(NOT ITK_USE_SYSTEM_HDF5) - include_directories( - "${ITKHDF5_SOURCE_DIR}/src/itkhdf5" - "${ITKHDF5_SOURCE_DIR}/src/itkhdf5/src" - "${ITKHDF5_BINARY_DIR}/src/itkhdf5" - ) + include_directories("${ITKHDF5_SOURCE_DIR}/src/itkhdf5" "${ITKHDF5_SOURCE_DIR}/src/itkhdf5/src" + "${ITKHDF5_BINARY_DIR}/src/itkhdf5") endif() set(ITKIOMINCTests - itkMINCImageIOTest.cxx - itkMINCImageIOTest2.cxx - itkMINCImageIOTest4.cxx - itkMINCImageIOTest_2D.cxx - itkMINCImageIOTest_4D.cxx - itkMINCImageIOTest_Labels.cxx - ) - -CreateTestDriver(ITKIOMINC "${ITKIOMINC-Test_LIBRARIES}" "${ITKIOMINCTests}") - -itk_add_test(NAME itkMINCImageIOTest1 - COMMAND ITKIOMINCTestDriver itkMINCImageIOTest ${ITK_TEST_OUTPUT_DIR}) - -itk_add_test(NAME itkMINCImageIOTest2 - COMMAND ITKIOMINCTestDriver itkMINCImageIOTest2 - DATA{Input/t1_z+_byte_cor.mnc} ${ITK_TEST_OUTPUT_DIR}/t1_z+_byte_cor_3.mnc) - -itk_add_test(NAME itkMINCImageIOTest3 - COMMAND ITKIOMINCTestDriver - --compare DATA{Input/t1_z+_byte_cor.mnc} - ${ITK_TEST_OUTPUT_DIR}/t1_z+_byte_cor_2.mnc + itkMINCImageIOTest.cxx + itkMINCImageIOTest2.cxx + itkMINCImageIOTest4.cxx + itkMINCImageIOTest_2D.cxx + itkMINCImageIOTest_4D.cxx + itkMINCImageIOTest_Labels.cxx) + +createtestdriver(ITKIOMINC "${ITKIOMINC-Test_LIBRARIES}" "${ITKIOMINCTests}") + +itk_add_test( + NAME + itkMINCImageIOTest1 + COMMAND + ITKIOMINCTestDriver + itkMINCImageIOTest + ${ITK_TEST_OUTPUT_DIR}) + +itk_add_test( + NAME + itkMINCImageIOTest2 + COMMAND + ITKIOMINCTestDriver + itkMINCImageIOTest2 + DATA{Input/t1_z+_byte_cor.mnc} + ${ITK_TEST_OUTPUT_DIR}/t1_z+_byte_cor_3.mnc) + +itk_add_test( + NAME + itkMINCImageIOTest3 + COMMAND + ITKIOMINCTestDriver + --compare + DATA{Input/t1_z+_byte_cor.mnc} + ${ITK_TEST_OUTPUT_DIR}/t1_z+_byte_cor_2.mnc itkMINCImageIOTest4 - DATA{Input/t1_z+_byte_cor.mnc} ${ITK_TEST_OUTPUT_DIR}/t1_z+_byte_cor_2.mnc) + DATA{Input/t1_z+_byte_cor.mnc} + ${ITK_TEST_OUTPUT_DIR}/t1_z+_byte_cor_2.mnc) -itk_add_test(NAME itkMINCImageIOTest4 - COMMAND ITKIOMINCTestDriver - --compare DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume.mnc +itk_add_test( + NAME itkMINCImageIOTest4 - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume.mnc) + COMMAND + ITKIOMINCTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume.mnc + itkMINCImageIOTest4 + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume.mnc) # Test to make sure that inter-slice normalization was properly dealt with -itk_add_test(NAME itkMINCImageIOTest5 - COMMAND ITKIOMINCTestDriver - --compare DATA{Input/t1_z+_float_yxz_norm.mnc} - ${ITK_TEST_OUTPUT_DIR}/t1_z+_ubyte_yxz_nonorm_noParams.mnc +itk_add_test( + NAME + itkMINCImageIOTest5 + COMMAND + ITKIOMINCTestDriver + --compare + DATA{Input/t1_z+_float_yxz_norm.mnc} + ${ITK_TEST_OUTPUT_DIR}/t1_z+_ubyte_yxz_nonorm_noParams.mnc itkMINCImageIOTest4 - DATA{Input/t1_z+_ubyte_yxz_nonorm.mnc} ${ITK_TEST_OUTPUT_DIR}/t1_z+_ubyte_yxz_nonorm_noParams.mnc) - -itk_add_test(NAME itkMINCImageIOTest6 - COMMAND ITKIOMINCTestDriver - --compare DATA{Input/t1_z+_float_yxz_norm.mnc} - ${ITK_TEST_OUTPUT_DIR}/t1_z+_float_yxz_nonorm_noParams.mnc + DATA{Input/t1_z+_ubyte_yxz_nonorm.mnc} + ${ITK_TEST_OUTPUT_DIR}/t1_z+_ubyte_yxz_nonorm_noParams.mnc) + +itk_add_test( + NAME + itkMINCImageIOTest6 + COMMAND + ITKIOMINCTestDriver + --compare + DATA{Input/t1_z+_float_yxz_norm.mnc} + ${ITK_TEST_OUTPUT_DIR}/t1_z+_float_yxz_nonorm_noParams.mnc itkMINCImageIOTest4 - DATA{Input/t1_z+_float_yxz_nonorm.mnc} ${ITK_TEST_OUTPUT_DIR}/t1_z+_float_yxz_nonorm_noParams.mnc) + DATA{Input/t1_z+_float_yxz_nonorm.mnc} + ${ITK_TEST_OUTPUT_DIR}/t1_z+_float_yxz_nonorm_noParams.mnc) -itk_add_test(NAME itkMINCImageIOTest_2D - COMMAND ITKIOMINCTestDriver - --compare DATA{${ITK_DATA_ROOT}/Input/cthead1.tif} - ${ITK_TEST_OUTPUT_DIR}/cthead1.mnc +itk_add_test( + NAME itkMINCImageIOTest_2D - DATA{${ITK_DATA_ROOT}/Input/cthead1.tif} ${ITK_TEST_OUTPUT_DIR}/cthead1.mnc) - + COMMAND + ITKIOMINCTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/cthead1.tif} + ${ITK_TEST_OUTPUT_DIR}/cthead1.mnc + itkMINCImageIOTest_2D + DATA{${ITK_DATA_ROOT}/Input/cthead1.tif} + ${ITK_TEST_OUTPUT_DIR}/cthead1.mnc) -itk_add_test(NAME itkMINCImageIOTest_4D - COMMAND ITKIOMINCTestDriver - --compare DATA{Input/dti_sample.mnc} - ${ITK_TEST_OUTPUT_DIR}/dti_sample.mnc +itk_add_test( + NAME itkMINCImageIOTest_4D - DATA{Input/dti_sample.mnc} ${ITK_TEST_OUTPUT_DIR}/dti_sample.mnc) + COMMAND + ITKIOMINCTestDriver + --compare + DATA{Input/dti_sample.mnc} + ${ITK_TEST_OUTPUT_DIR}/dti_sample.mnc + itkMINCImageIOTest_4D + DATA{Input/dti_sample.mnc} + ${ITK_TEST_OUTPUT_DIR}/dti_sample.mnc) -itk_add_test(NAME itkMINCImageIOTest_Labels - COMMAND ITKIOMINCTestDriver - --compare DATA{Input/labels_sample.mnc} - ${ITK_TEST_OUTPUT_DIR}/labels_sample.mnc +itk_add_test( + NAME + itkMINCImageIOTest_Labels + COMMAND + ITKIOMINCTestDriver + --compare + DATA{Input/labels_sample.mnc} + ${ITK_TEST_OUTPUT_DIR}/labels_sample.mnc itkMINCImageIOTest_Labels - DATA{Input/labels_sample.mnc} ${ITK_TEST_OUTPUT_DIR}/labels_sample.mnc) + DATA{Input/labels_sample.mnc} + ${ITK_TEST_OUTPUT_DIR}/labels_sample.mnc) # test different cases -itk_add_test(NAME itkMINCImageIOTest-COM-t1_z+_float_yxz_nonorm - COMMAND ITKIOMINCTestDriver - --compare DATA{Input/t1_z+_float_yxz_nonorm.mnc} ${ITK_TEST_OUTPUT_DIR}/t1_z+_float_yxz_nonorm.mnc - itkMINCImageIOTest4 - DATA{Input/t1_z+_float_yxz_nonorm.mnc} ${ITK_TEST_OUTPUT_DIR}/t1_z+_float_yxz_nonorm.mnc 427621.7839 -8.195741583 72.45998819 -3.148534512) - - -itk_add_test(NAME itkMINCImageIOTest-COM-t1_z+_float_yxz_norm - COMMAND ITKIOMINCTestDriver - --compare DATA{Input/t1_z+_float_yxz_norm.mnc} ${ITK_TEST_OUTPUT_DIR}/t1_z+_float_yxz_norm.mnc - itkMINCImageIOTest4 - DATA{Input/t1_z+_float_yxz_norm.mnc} ${ITK_TEST_OUTPUT_DIR}/t1_z+_float_yxz_norm.mnc 427621.7839 -8.195741583 72.45998819 -3.148534512) - - -itk_add_test(NAME itkMINCImageIOTest-COM-t1_z+_ubyte_yxz_nonorm - COMMAND ITKIOMINCTestDriver - --compare DATA{Input/t1_z+_ubyte_yxz_nonorm.mnc} ${ITK_TEST_OUTPUT_DIR}/t1_z+_ubyte_yxz_nonorm.mnc - itkMINCImageIOTest4 - DATA{Input/t1_z+_ubyte_yxz_nonorm.mnc} ${ITK_TEST_OUTPUT_DIR}/t1_z+_ubyte_yxz_nonorm.mnc 427621.7838 -8.195741583 72.45998819 -3.148534512) - - +itk_add_test( + NAME + itkMINCImageIOTest-COM-t1_z+_float_yxz_nonorm + COMMAND + ITKIOMINCTestDriver + --compare + DATA{Input/t1_z+_float_yxz_nonorm.mnc} + ${ITK_TEST_OUTPUT_DIR}/t1_z+_float_yxz_nonorm.mnc + itkMINCImageIOTest4 + DATA{Input/t1_z+_float_yxz_nonorm.mnc} + ${ITK_TEST_OUTPUT_DIR}/t1_z+_float_yxz_nonorm.mnc + 427621.7839 + -8.195741583 + 72.45998819 + -3.148534512) + +itk_add_test( + NAME + itkMINCImageIOTest-COM-t1_z+_float_yxz_norm + COMMAND + ITKIOMINCTestDriver + --compare + DATA{Input/t1_z+_float_yxz_norm.mnc} + ${ITK_TEST_OUTPUT_DIR}/t1_z+_float_yxz_norm.mnc + itkMINCImageIOTest4 + DATA{Input/t1_z+_float_yxz_norm.mnc} + ${ITK_TEST_OUTPUT_DIR}/t1_z+_float_yxz_norm.mnc + 427621.7839 + -8.195741583 + 72.45998819 + -3.148534512) + +itk_add_test( + NAME + itkMINCImageIOTest-COM-t1_z+_ubyte_yxz_nonorm + COMMAND + ITKIOMINCTestDriver + --compare + DATA{Input/t1_z+_ubyte_yxz_nonorm.mnc} + ${ITK_TEST_OUTPUT_DIR}/t1_z+_ubyte_yxz_nonorm.mnc + itkMINCImageIOTest4 + DATA{Input/t1_z+_ubyte_yxz_nonorm.mnc} + ${ITK_TEST_OUTPUT_DIR}/t1_z+_ubyte_yxz_nonorm.mnc + 427621.7838 + -8.195741583 + 72.45998819 + -3.148534512) # multiple loops because of different numerical parameters @@ -109,10 +175,21 @@ foreach(type byte;short;ubyte) set(imageName t1_z${plusMinus}_${type}_${axis}) set(outImage ${ITK_TEST_OUTPUT_DIR}/${imageName}.mnc) - itk_add_test(NAME itkMINCImageIOTest-COM-${imageName} - COMMAND ITKIOMINCTestDriver --compare DATA{Input/${imageName}.mnc} ${outImage} - itkMINCImageIOTest4 DATA{Input/${imageName}.mnc} ${outImage} - 427620.3115 -8.195582241 72.46002233 -3.148594157) # this line is different + itk_add_test( + NAME + itkMINCImageIOTest-COM-${imageName} + COMMAND + ITKIOMINCTestDriver + --compare + DATA{Input/${imageName}.mnc} + ${outImage} + itkMINCImageIOTest4 + DATA{Input/${imageName}.mnc} + ${outImage} + 427620.3115 + -8.195582241 + 72.46002233 + -3.148594157) # this line is different endforeach() endforeach() endforeach() @@ -123,10 +200,21 @@ foreach(type double;float;long;ulong) set(imageName t1_z${plusMinus}_${type}_${axis}) set(outImage ${ITK_TEST_OUTPUT_DIR}/${imageName}.mnc) - itk_add_test(NAME itkMINCImageIOTest-COM-${imageName} - COMMAND ITKIOMINCTestDriver --compare DATA{Input/${imageName}.mnc} ${outImage} - itkMINCImageIOTest4 DATA{Input/${imageName}.mnc} ${outImage} - 427590.7631 -8.195995507 72.45943584 -3.148635493) # this line is different + itk_add_test( + NAME + itkMINCImageIOTest-COM-${imageName} + COMMAND + ITKIOMINCTestDriver + --compare + DATA{Input/${imageName}.mnc} + ${outImage} + itkMINCImageIOTest4 + DATA{Input/${imageName}.mnc} + ${outImage} + 427590.7631 + -8.195995507 + 72.45943584 + -3.148635493) # this line is different endforeach() endforeach() endforeach() @@ -137,10 +225,21 @@ foreach(type ushort) set(imageName t1_z${plusMinus}_${type}_${axis}) set(outImage ${ITK_TEST_OUTPUT_DIR}/${imageName}.mnc) - itk_add_test(NAME itkMINCImageIOTest-COM-${imageName} - COMMAND ITKIOMINCTestDriver --compare DATA{Input/${imageName}.mnc} ${outImage} - itkMINCImageIOTest4 DATA{Input/${imageName}.mnc} ${outImage} - 427590.7957 -8.195997123 72.45943721 -3.148635961) # this line is different + itk_add_test( + NAME + itkMINCImageIOTest-COM-${imageName} + COMMAND + ITKIOMINCTestDriver + --compare + DATA{Input/${imageName}.mnc} + ${outImage} + itkMINCImageIOTest4 + DATA{Input/${imageName}.mnc} + ${outImage} + 427590.7957 + -8.195997123 + 72.45943721 + -3.148635961) # this line is different endforeach() endforeach() endforeach() diff --git a/Modules/IO/MRC/itk-module.cmake b/Modules/IO/MRC/itk-module.cmake index f0fb013590d..496f7a5ce47 100644 --- a/Modules/IO/MRC/itk-module.cmake +++ b/Modules/IO/MRC/itk-module.cmake @@ -1,15 +1,15 @@ set(DOCUMENTATION "This module contains classes for reading and writing image files in the MRC file format. https://en.wikipedia.org/wiki/MRC_(file_format) ") -itk_module(ITKIOMRC +itk_module( + ITKIOMRC ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase TEST_DEPENDS - ITKTestKernel - ITKImageSources + ITKTestKernel + ITKImageSources FACTORY_NAMES - ImageIO::MRC + ImageIO::MRC DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/MRC/src/CMakeLists.txt b/Modules/IO/MRC/src/CMakeLists.txt index f7f9016f109..1a8df2a9934 100644 --- a/Modules/IO/MRC/src/CMakeLists.txt +++ b/Modules/IO/MRC/src/CMakeLists.txt @@ -1,7 +1,3 @@ -set(ITKIOMRC_SRCS - itkMRCHeaderObject.cxx - itkMRCImageIO.cxx - itkMRCImageIOFactory.cxx - ) +set(ITKIOMRC_SRCS itkMRCHeaderObject.cxx itkMRCImageIO.cxx itkMRCImageIOFactory.cxx) itk_module_add_library(ITKIOMRC ${ITKIOMRC_SRCS}) diff --git a/Modules/IO/MRC/test/CMakeLists.txt b/Modules/IO/MRC/test/CMakeLists.txt index cf7fef86b6e..64b62113c27 100644 --- a/Modules/IO/MRC/test/CMakeLists.txt +++ b/Modules/IO/MRC/test/CMakeLists.txt @@ -1,44 +1,60 @@ itk_module_test() -set(ITKIOMRCTests -itkMRCImageIOTest.cxx -itkMRCImageIOTest2.cxx -) +set(ITKIOMRCTests itkMRCImageIOTest.cxx itkMRCImageIOTest2.cxx) +createtestdriver(ITKIOMRC "${ITKIOMRC-Test_LIBRARIES}" "${ITKIOMRCTests}") -CreateTestDriver(ITKIOMRC "${ITKIOMRC-Test_LIBRARIES}" "${ITKIOMRCTests}") - -itk_add_test(NAME itkMRCImageIOTest - COMMAND ITKIOMRCTestDriver itkMRCImageIOTest - ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkMRCImageIOTest2a - COMMAND ITKIOMRCTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkMRCImageIOTest2a.mrc - 5eac5b2827533e8df8b061ff0ab33718 - itkMRCImageIOTest2 - DATA{${ITK_DATA_ROOT}/Input/tilt_series_little.mrc} - ${ITK_TEST_OUTPUT_DIR}/itkMRCImageIOTest2a.mrc - 5eac5b2827533e8df8b061ff0ab33718) -itk_add_test(NAME itkMRCImageIOTest2b - COMMAND ITKIOMRCTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkMRCImageIOTest2b.mrc - 5eac5b2827533e8df8b061ff0ab33718 - itkMRCImageIOTest2 - DATA{${ITK_DATA_ROOT}/Input/tilt_series_big.mrc} - ${ITK_TEST_OUTPUT_DIR}/itkMRCImageIOTest2b.mrc - 5eac5b2827533e8df8b061ff0ab33718) -itk_add_test(NAME itkMRCImageIOTest2c - COMMAND ITKIOMRCTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkMRCImageIOTest2c.mrc - 38a2dcfc08812e04b1528f15ca3d2ab7 - itkMRCImageIOTest2 - DATA{${ITK_DATA_ROOT}/Input/RGBTestImageLZW.tif} - ${ITK_TEST_OUTPUT_DIR}/itkMRCImageIOTest2c.mrc - 38a2dcfc08812e04b1528f15ca3d2ab7) -itk_add_test(NAME itkMRCImageIOTest2d - COMMAND ITKIOMRCTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkMRCImageIOTest2d.mrc - 96093c8573ce2b4f197f0b0bfcc574bf - itkMRCImageIOTest2 - DATA{Input/tilt_uint8.mrc} - ${ITK_TEST_OUTPUT_DIR}/itkMRCImageIOTest2d.mrc - 96093c8573ce2b4f197f0b0bfcc574bf) +itk_add_test( + NAME + itkMRCImageIOTest + COMMAND + ITKIOMRCTestDriver + itkMRCImageIOTest + ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkMRCImageIOTest2a + COMMAND + ITKIOMRCTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkMRCImageIOTest2a.mrc + 5eac5b2827533e8df8b061ff0ab33718 + itkMRCImageIOTest2 + DATA{${ITK_DATA_ROOT}/Input/tilt_series_little.mrc} + ${ITK_TEST_OUTPUT_DIR}/itkMRCImageIOTest2a.mrc + 5eac5b2827533e8df8b061ff0ab33718) +itk_add_test( + NAME + itkMRCImageIOTest2b + COMMAND + ITKIOMRCTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkMRCImageIOTest2b.mrc + 5eac5b2827533e8df8b061ff0ab33718 + itkMRCImageIOTest2 + DATA{${ITK_DATA_ROOT}/Input/tilt_series_big.mrc} + ${ITK_TEST_OUTPUT_DIR}/itkMRCImageIOTest2b.mrc + 5eac5b2827533e8df8b061ff0ab33718) +itk_add_test( + NAME + itkMRCImageIOTest2c + COMMAND + ITKIOMRCTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkMRCImageIOTest2c.mrc + 38a2dcfc08812e04b1528f15ca3d2ab7 + itkMRCImageIOTest2 + DATA{${ITK_DATA_ROOT}/Input/RGBTestImageLZW.tif} + ${ITK_TEST_OUTPUT_DIR}/itkMRCImageIOTest2c.mrc + 38a2dcfc08812e04b1528f15ca3d2ab7) +itk_add_test( + NAME + itkMRCImageIOTest2d + COMMAND + ITKIOMRCTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkMRCImageIOTest2d.mrc + 96093c8573ce2b4f197f0b0bfcc574bf + itkMRCImageIOTest2 + DATA{Input/tilt_uint8.mrc} + ${ITK_TEST_OUTPUT_DIR}/itkMRCImageIOTest2d.mrc + 96093c8573ce2b4f197f0b0bfcc574bf) diff --git a/Modules/IO/Mesh/itk-module.cmake b/Modules/IO/Mesh/itk-module.cmake index 92197853321..c2a6887f280 100644 --- a/Modules/IO/Mesh/itk-module.cmake +++ b/Modules/IO/Mesh/itk-module.cmake @@ -1,35 +1,36 @@ -set(DOCUMENTATION "This module contains classes for reading and writing +set(DOCUMENTATION + "This module contains classes for reading and writing Meshes as opposed to general images. This module is present for backwards compatibility and should not be used - for support for a specific mesh file format, depend on the specific module, instead.") -itk_module(ITKIOMesh +itk_module( + ITKIOMesh DEPENDS - ITKCommon - ITKIOMeshBase - ITKIOMeshVTK - ITKIOMeshBYU - ITKIOMeshFreeSurfer - ITKIOMeshGifti - ITKIOMeshOBJ - ITKIOMeshOFF + ITKCommon + ITKIOMeshBase + ITKIOMeshVTK + ITKIOMeshBYU + ITKIOMeshFreeSurfer + ITKIOMeshGifti + ITKIOMeshOBJ + ITKIOMeshOFF TEST_DEPENDS - ITKTestKernel - ITKQuadEdgeMesh - ITKIOMeshVTK - ITKIOMeshFreeSurfer - ITKIOMeshGifti - ITKIOMeshOBJ - ITKIOMeshOFF + ITKTestKernel + ITKQuadEdgeMesh + ITKIOMeshVTK + ITKIOMeshFreeSurfer + ITKIOMeshGifti + ITKIOMeshOBJ + ITKIOMeshOFF FACTORY_NAMES - MeshIO::BYU - MeshIO::FreeSurferAscii - MeshIO::FreeSurferBinary - MeshIO::Gifti - MeshIO::OBJ - MeshIO::OFF + MeshIO::BYU + MeshIO::FreeSurferAscii + MeshIO::FreeSurferBinary + MeshIO::Gifti + MeshIO::OBJ + MeshIO::OFF DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/Mesh/test/CMakeLists.txt b/Modules/IO/Mesh/test/CMakeLists.txt index a6b1481fe0a..3b604b5c3c3 100644 --- a/Modules/IO/Mesh/test/CMakeLists.txt +++ b/Modules/IO/Mesh/test/CMakeLists.txt @@ -1,29 +1,39 @@ itk_module_test() -set(ITKIOMeshTests - itkMeshFileReadWriteTest.cxx -) +set(ITKIOMeshTests itkMeshFileReadWriteTest.cxx) -CreateTestDriver(ITKIOMesh "${ITKIOMesh-Test_LIBRARIES}" "${ITKIOMeshTests}") +createtestdriver(ITKIOMesh "${ITKIOMesh-Test_LIBRARIES}" "${ITKIOMeshTests}") -itk_add_test(NAME itkMeshFileReadWriteTest01 - COMMAND ITKIOMeshTestDriver itkMeshFileReadWriteTest - DATA{Baseline/sphere.fsb} - ${ITK_TEST_OUTPUT_DIR}/sphere01.vtk -) -itk_add_test(NAME itkMeshFileReadWriteTest03 - COMMAND ITKIOMeshTestDriver itkMeshFileReadWriteTest - DATA{Baseline/sphere_curv.vtk} - ${ITK_TEST_OUTPUT_DIR}/sphere_curv_03.vtk -) -itk_add_test(NAME itkMeshFileReadWriteTest04 - COMMAND ITKIOMeshTestDriver itkMeshFileReadWriteTest - DATA{Baseline/thickness.fcv} - ${ITK_TEST_OUTPUT_DIR}/thickness.fcv -) -itk_add_test(NAME itkMeshFileReadWriteTest07 - COMMAND ITKIOMeshTestDriver itkMeshFileReadWriteTest - DATA{Baseline/sphere_curv_b.vtk} - ${ITK_TEST_OUTPUT_DIR}/sphere_curv_07.vtk - 1 -) +itk_add_test( + NAME + itkMeshFileReadWriteTest01 + COMMAND + ITKIOMeshTestDriver + itkMeshFileReadWriteTest + DATA{Baseline/sphere.fsb} + ${ITK_TEST_OUTPUT_DIR}/sphere01.vtk) +itk_add_test( + NAME + itkMeshFileReadWriteTest03 + COMMAND + ITKIOMeshTestDriver + itkMeshFileReadWriteTest + DATA{Baseline/sphere_curv.vtk} + ${ITK_TEST_OUTPUT_DIR}/sphere_curv_03.vtk) +itk_add_test( + NAME + itkMeshFileReadWriteTest04 + COMMAND + ITKIOMeshTestDriver + itkMeshFileReadWriteTest + DATA{Baseline/thickness.fcv} + ${ITK_TEST_OUTPUT_DIR}/thickness.fcv) +itk_add_test( + NAME + itkMeshFileReadWriteTest07 + COMMAND + ITKIOMeshTestDriver + itkMeshFileReadWriteTest + DATA{Baseline/sphere_curv_b.vtk} + ${ITK_TEST_OUTPUT_DIR}/sphere_curv_07.vtk + 1) diff --git a/Modules/IO/MeshBYU/itk-module.cmake b/Modules/IO/MeshBYU/itk-module.cmake index 0f71f85842f..b9de3e8af99 100644 --- a/Modules/IO/MeshBYU/itk-module.cmake +++ b/Modules/IO/MeshBYU/itk-module.cmake @@ -1,17 +1,17 @@ set(DOCUMENTATION "This module contains classes for reading and writing Meshes in the BYU file format.") -itk_module(ITKIOMeshBYU +itk_module( + ITKIOMeshBYU ENABLE_SHARED DEPENDS - ITKCommon - ITKIOMeshBase + ITKCommon + ITKIOMeshBase COMPILE_DEPENDS - ITKMesh + ITKMesh TEST_DEPENDS - ITKTestKernel - ITKQuadEdgeMesh + ITKTestKernel + ITKQuadEdgeMesh FACTORY_NAMES - MeshIO::BYU + MeshIO::BYU DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/MeshBYU/src/CMakeLists.txt b/Modules/IO/MeshBYU/src/CMakeLists.txt index e022777faff..32f1e7c6e3b 100644 --- a/Modules/IO/MeshBYU/src/CMakeLists.txt +++ b/Modules/IO/MeshBYU/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOMeshBYU_SRCS - itkBYUMeshIO.cxx - itkBYUMeshIOFactory.cxx - ) +set(ITKIOMeshBYU_SRCS itkBYUMeshIO.cxx itkBYUMeshIOFactory.cxx) itk_module_add_library(ITKIOMeshBYU ${ITKIOMeshBYU_SRCS}) diff --git a/Modules/IO/MeshBYU/test/CMakeLists.txt b/Modules/IO/MeshBYU/test/CMakeLists.txt index 4965717a059..beb7696c1a3 100644 --- a/Modules/IO/MeshBYU/test/CMakeLists.txt +++ b/Modules/IO/MeshBYU/test/CMakeLists.txt @@ -1,22 +1,33 @@ itk_module_test() -set(ITKIOMeshBYUTests - itkBYUMeshIOTest.cxx - itkMeshFileReadWriteTest.cxx -) +set(ITKIOMeshBYUTests itkBYUMeshIOTest.cxx itkMeshFileReadWriteTest.cxx) -CreateTestDriver(ITKIOMeshBYU "${ITKIOMeshBYU-Test_LIBRARIES}" "${ITKIOMeshBYUTests}") +createtestdriver(ITKIOMeshBYU "${ITKIOMeshBYU-Test_LIBRARIES}" "${ITKIOMeshBYUTests}") -itk_add_test(NAME itkBYUMeshIOTest - COMMAND ITKIOMeshBYUTestDriver itkBYUMeshIOTest - DATA{Baseline/cube.byu} - ${ITK_TEST_OUTPUT_DIR}/byumeshiocube.byu - DATA{${ITK_DATA_ROOT}/Input/tetrahedron.vtk} - ${ITK_TEST_OUTPUT_DIR}/byu2vtkcube.vtk - 0 1 1 1 1 8 0 6 0 -) -itk_add_test(NAME itkMeshFileReadWriteTest06 - COMMAND ITKIOMeshBYUTestDriver itkMeshFileReadWriteTest - DATA{Baseline/cube.byu} - ${ITK_TEST_OUTPUT_DIR}/cube.byu -) +itk_add_test( + NAME + itkBYUMeshIOTest + COMMAND + ITKIOMeshBYUTestDriver + itkBYUMeshIOTest + DATA{Baseline/cube.byu} + ${ITK_TEST_OUTPUT_DIR}/byumeshiocube.byu + DATA{${ITK_DATA_ROOT}/Input/tetrahedron.vtk} + ${ITK_TEST_OUTPUT_DIR}/byu2vtkcube.vtk + 0 + 1 + 1 + 1 + 1 + 8 + 0 + 6 + 0) +itk_add_test( + NAME + itkMeshFileReadWriteTest06 + COMMAND + ITKIOMeshBYUTestDriver + itkMeshFileReadWriteTest + DATA{Baseline/cube.byu} + ${ITK_TEST_OUTPUT_DIR}/cube.byu) diff --git a/Modules/IO/MeshBase/itk-module.cmake b/Modules/IO/MeshBase/itk-module.cmake index 27956b9ad5c..4d34fee7f0e 100644 --- a/Modules/IO/MeshBase/itk-module.cmake +++ b/Modules/IO/MeshBase/itk-module.cmake @@ -1,20 +1,21 @@ -set(DOCUMENTATION "This module contains base classes for IO, helper classes for +set(DOCUMENTATION + "This module contains base classes for IO, helper classes for IO, and classes that function as an itk::MeshSource in an ITK pipeline. Classes for specific file formats, found in other modules in the IO group, should inherit from itk::MeshIOBase. For a mesh source or sink in the ITK pipeline that handles all available file formats, see itk::MeshFileReader, or itk::MeshFileWriter.") -itk_module(ITKIOMeshBase +itk_module( + ITKIOMeshBase ENABLE_SHARED DEPENDS - ITKCommon - ITKIOImageBase - ITKQuadEdgeMesh - ITKMesh - ITKVoronoi + ITKCommon + ITKIOImageBase + ITKQuadEdgeMesh + ITKMesh + ITKVoronoi TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/MeshBase/src/CMakeLists.txt b/Modules/IO/MeshBase/src/CMakeLists.txt index 8b719e83731..71ccec08de5 100644 --- a/Modules/IO/MeshBase/src/CMakeLists.txt +++ b/Modules/IO/MeshBase/src/CMakeLists.txt @@ -1,8 +1,7 @@ set(ITKIOMeshBase_SRCS - itkMeshFileReaderException.cxx - itkMeshFileWriterException.cxx - itkMeshIOBase.cxx - itkMeshIOFactory.cxx -) + itkMeshFileReaderException.cxx + itkMeshFileWriterException.cxx + itkMeshIOBase.cxx + itkMeshIOFactory.cxx) itk_module_add_library(ITKIOMeshBase ${ITKIOMeshBase_SRCS}) diff --git a/Modules/IO/MeshBase/test/CMakeLists.txt b/Modules/IO/MeshBase/test/CMakeLists.txt index 1b3c2ff698e..d6e44540a57 100644 --- a/Modules/IO/MeshBase/test/CMakeLists.txt +++ b/Modules/IO/MeshBase/test/CMakeLists.txt @@ -1,14 +1,15 @@ itk_module_test() -set(ITKIOMeshBaseTests - itkMeshFileReaderWriterTest.cxx -) +set(ITKIOMeshBaseTests itkMeshFileReaderWriterTest.cxx) -CreateTestDriver(ITKIOMeshBase "${ITKIOMeshBase-Test_LIBRARIES}" "${ITKIOMeshBaseTests}") +createtestdriver(ITKIOMeshBase "${ITKIOMeshBase-Test_LIBRARIES}" "${ITKIOMeshBaseTests}") -itk_add_test(NAME itkMeshFileReaderWriterTest - COMMAND ITKIOMeshBaseTestDriver itkMeshFileReaderWriterTest - DATA{${ITK_DATA_ROOT}/Input/mushroom.vtk} - ${ITK_TEST_OUTPUT_DIR}/itkMeshFileReaderWriterTest.vtk - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} -) +itk_add_test( + NAME + itkMeshFileReaderWriterTest + COMMAND + ITKIOMeshBaseTestDriver + itkMeshFileReaderWriterTest + DATA{${ITK_DATA_ROOT}/Input/mushroom.vtk} + ${ITK_TEST_OUTPUT_DIR}/itkMeshFileReaderWriterTest.vtk + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha}) diff --git a/Modules/IO/MeshBase/wrapping/CMakeLists.txt b/Modules/IO/MeshBase/wrapping/CMakeLists.txt index cd99e2c19ad..ee036266746 100644 --- a/Modules/IO/MeshBase/wrapping/CMakeLists.txt +++ b/Modules/IO/MeshBase/wrapping/CMakeLists.txt @@ -1,7 +1,4 @@ itk_wrap_module(ITKIOMeshBase) -set(WRAPPER_SUBMODULE_ORDER - itkMeshIOBase - itkMeshIOFactory -) +set(WRAPPER_SUBMODULE_ORDER itkMeshIOBase itkMeshIOFactory) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/IO/MeshBase/wrapping/itkMeshFileReader.wrap b/Modules/IO/MeshBase/wrapping/itkMeshFileReader.wrap index 60e53aaf94c..7c7fba11f76 100644 --- a/Modules/IO/MeshBase/wrapping/itkMeshFileReader.wrap +++ b/Modules/IO/MeshBase/wrapping/itkMeshFileReader.wrap @@ -3,10 +3,10 @@ itk_wrap_include("itkDefaultStaticMeshTraits.h") itk_wrap_include("itkDefaultDynamicMeshTraits.h") itk_wrap_class("itk::MeshFileReader" POINTER) - UNIQUE(types "${WRAP_ITK_SCALAR};D") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("M${ITKM_${t}}${d}" "itk::Mesh< ${ITKT_${t}},${d} >") - endforeach() +unique(types "${WRAP_ITK_SCALAR};D") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("M${ITKM_${t}}${d}" "itk::Mesh< ${ITKT_${t}},${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/IO/MeshBase/wrapping/itkMeshFileWriter.wrap b/Modules/IO/MeshBase/wrapping/itkMeshFileWriter.wrap index ad174de948b..b5af7e126b0 100644 --- a/Modules/IO/MeshBase/wrapping/itkMeshFileWriter.wrap +++ b/Modules/IO/MeshBase/wrapping/itkMeshFileWriter.wrap @@ -3,10 +3,10 @@ itk_wrap_include("itkDefaultStaticMeshTraits.h") itk_wrap_include("itkDefaultDynamicMeshTraits.h") itk_wrap_class("itk::MeshFileWriter" POINTER) - UNIQUE(types "${WRAP_ITK_SCALAR};D") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("M${ITKM_${t}}${d}" "itk::Mesh< ${ITKT_${t}},${d} >") - endforeach() +unique(types "${WRAP_ITK_SCALAR};D") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("M${ITKM_${t}}${d}" "itk::Mesh< ${ITKT_${t}},${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/IO/MeshFreeSurfer/itk-module.cmake b/Modules/IO/MeshFreeSurfer/itk-module.cmake index b26657d65b2..eda106eec74 100644 --- a/Modules/IO/MeshFreeSurfer/itk-module.cmake +++ b/Modules/IO/MeshFreeSurfer/itk-module.cmake @@ -1,18 +1,18 @@ set(DOCUMENTATION "This module contains classes for reading and writing Meshes in the FreeSurfer file format.") -itk_module(ITKIOMeshFreeSurfer +itk_module( + ITKIOMeshFreeSurfer ENABLE_SHARED DEPENDS - ITKCommon - ITKIOMeshBase + ITKCommon + ITKIOMeshBase COMPILE_DEPENDS - ITKMesh + ITKMesh TEST_DEPENDS - ITKTestKernel - ITKQuadEdgeMesh + ITKTestKernel + ITKQuadEdgeMesh FACTORY_NAMES - MeshIO::FreeSurferAscii - MeshIO::FreeSurferBinary + MeshIO::FreeSurferAscii + MeshIO::FreeSurferBinary DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/MeshFreeSurfer/src/CMakeLists.txt b/Modules/IO/MeshFreeSurfer/src/CMakeLists.txt index 6441a122945..9881cbfc53d 100644 --- a/Modules/IO/MeshFreeSurfer/src/CMakeLists.txt +++ b/Modules/IO/MeshFreeSurfer/src/CMakeLists.txt @@ -1,8 +1,7 @@ set(ITKIOMeshFreeSurfer_SRCS - itkFreeSurferAsciiMeshIO.cxx - itkFreeSurferAsciiMeshIOFactory.cxx - itkFreeSurferBinaryMeshIO.cxx - itkFreeSurferBinaryMeshIOFactory.cxx - ) + itkFreeSurferAsciiMeshIO.cxx + itkFreeSurferAsciiMeshIOFactory.cxx + itkFreeSurferBinaryMeshIO.cxx + itkFreeSurferBinaryMeshIOFactory.cxx) itk_module_add_library(ITKIOMeshFreeSurfer ${ITKIOMeshFreeSurfer_SRCS}) diff --git a/Modules/IO/MeshFreeSurfer/test/CMakeLists.txt b/Modules/IO/MeshFreeSurfer/test/CMakeLists.txt index e2da9652a64..9487edf4f3e 100644 --- a/Modules/IO/MeshFreeSurfer/test/CMakeLists.txt +++ b/Modules/IO/MeshFreeSurfer/test/CMakeLists.txt @@ -1,35 +1,62 @@ itk_module_test() -set(ITKIOMeshFreeSurferTests - itkFreeSurferMeshIOTest.cxx - itkMeshFileReadWriteTest.cxx -) +set(ITKIOMeshFreeSurferTests itkFreeSurferMeshIOTest.cxx itkMeshFileReadWriteTest.cxx) -CreateTestDriver(ITKIOMeshFreeSurfer "${ITKIOMeshFreeSurfer-Test_LIBRARIES}" "${ITKIOMeshFreeSurferTests}") +createtestdriver(ITKIOMeshFreeSurfer "${ITKIOMeshFreeSurfer-Test_LIBRARIES}" "${ITKIOMeshFreeSurferTests}") -itk_add_test(NAME itkFreeSurferMeshIOTestAscii - COMMAND ITKIOMeshFreeSurferTestDriver itkFreeSurferMeshIOTest - DATA{Baseline/sphere.fsa} - ${ITK_TEST_OUTPUT_DIR}/fsmeshiosphere.fsa - DATA{Baseline/sphere.fsb} - ${ITK_TEST_OUTPUT_DIR}/fsa2fsbsphere.fsb - 0 0 0 0 0 162 0 320 0 0 -) -itk_add_test(NAME itkFreeSurferMeshIOTestBinary - COMMAND ITKIOMeshFreeSurferTestDriver itkFreeSurferMeshIOTest - DATA{Baseline/sphere.fsb} - ${ITK_TEST_OUTPUT_DIR}/fsmeshiosphere.fsb - DATA{Baseline/sphere.fsa} - ${ITK_TEST_OUTPUT_DIR}/fsb2fsasphere.fsa - 0 0 0 0 0 162 0 320 0 1 -) -itk_add_test(NAME itkMeshFileReadWriteTestFreeSurfer1 - COMMAND ITKIOMeshFreeSurferTestDriver itkMeshFileReadWriteTest - DATA{Baseline/sphere.fsb} - ${ITK_TEST_OUTPUT_DIR}/sphere.fsb -) -itk_add_test(NAME itkMeshFileReadWriteTestFreeSurfer2 - COMMAND ITKIOMeshFreeSurferTestDriver itkMeshFileReadWriteTest - DATA{Baseline/sphere.fsa} - ${ITK_TEST_OUTPUT_DIR}/sphere.fsa -) +itk_add_test( + NAME + itkFreeSurferMeshIOTestAscii + COMMAND + ITKIOMeshFreeSurferTestDriver + itkFreeSurferMeshIOTest + DATA{Baseline/sphere.fsa} + ${ITK_TEST_OUTPUT_DIR}/fsmeshiosphere.fsa + DATA{Baseline/sphere.fsb} + ${ITK_TEST_OUTPUT_DIR}/fsa2fsbsphere.fsb + 0 + 0 + 0 + 0 + 0 + 162 + 0 + 320 + 0 + 0) +itk_add_test( + NAME + itkFreeSurferMeshIOTestBinary + COMMAND + ITKIOMeshFreeSurferTestDriver + itkFreeSurferMeshIOTest + DATA{Baseline/sphere.fsb} + ${ITK_TEST_OUTPUT_DIR}/fsmeshiosphere.fsb + DATA{Baseline/sphere.fsa} + ${ITK_TEST_OUTPUT_DIR}/fsb2fsasphere.fsa + 0 + 0 + 0 + 0 + 0 + 162 + 0 + 320 + 0 + 1) +itk_add_test( + NAME + itkMeshFileReadWriteTestFreeSurfer1 + COMMAND + ITKIOMeshFreeSurferTestDriver + itkMeshFileReadWriteTest + DATA{Baseline/sphere.fsb} + ${ITK_TEST_OUTPUT_DIR}/sphere.fsb) +itk_add_test( + NAME + itkMeshFileReadWriteTestFreeSurfer2 + COMMAND + ITKIOMeshFreeSurferTestDriver + itkMeshFileReadWriteTest + DATA{Baseline/sphere.fsa} + ${ITK_TEST_OUTPUT_DIR}/sphere.fsa) diff --git a/Modules/IO/MeshGifti/itk-module.cmake b/Modules/IO/MeshGifti/itk-module.cmake index 6393a3cbe71..161a71f7c32 100644 --- a/Modules/IO/MeshGifti/itk-module.cmake +++ b/Modules/IO/MeshGifti/itk-module.cmake @@ -1,19 +1,19 @@ set(DOCUMENTATION "This module contains classes for reading and writing Meshes in the Gifti file format.") -itk_module(ITKIOMeshGifti +itk_module( + ITKIOMeshGifti ENABLE_SHARED DEPENDS - ITKCommon - ITKIOMeshBase + ITKCommon + ITKIOMeshBase COMPILE_DEPENDS - ITKMesh + ITKMesh PRIVATE_DEPENDS - ITKGIFTI + ITKGIFTI TEST_DEPENDS - ITKTestKernel - ITKQuadEdgeMesh + ITKTestKernel + ITKQuadEdgeMesh FACTORY_NAMES - MeshIO::Gifti + MeshIO::Gifti DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/MeshGifti/src/CMakeLists.txt b/Modules/IO/MeshGifti/src/CMakeLists.txt index 2d78b84999d..f05b0508640 100644 --- a/Modules/IO/MeshGifti/src/CMakeLists.txt +++ b/Modules/IO/MeshGifti/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOMeshGifti_SRCS - itkGiftiMeshIO.cxx - itkGiftiMeshIOFactory.cxx - ) +set(ITKIOMeshGifti_SRCS itkGiftiMeshIO.cxx itkGiftiMeshIOFactory.cxx) itk_module_add_library(ITKIOMeshGifti ${ITKIOMeshGifti_SRCS}) diff --git a/Modules/IO/MeshGifti/test/CMakeLists.txt b/Modules/IO/MeshGifti/test/CMakeLists.txt index 51a2478cac3..322705f0f9e 100644 --- a/Modules/IO/MeshGifti/test/CMakeLists.txt +++ b/Modules/IO/MeshGifti/test/CMakeLists.txt @@ -1,35 +1,68 @@ itk_module_test() -set(ITKIOMeshGiftiTests - itkGiftiMeshIOTest.cxx - itkMeshFileReadWriteTest.cxx -) +set(ITKIOMeshGiftiTests itkGiftiMeshIOTest.cxx itkMeshFileReadWriteTest.cxx) -CreateTestDriver(ITKIOMeshGifti "${ITKIOMeshGifti-Test_LIBRARIES}" "${ITKIOMeshGiftiTests}") +createtestdriver(ITKIOMeshGifti "${ITKIOMeshGifti-Test_LIBRARIES}" "${ITKIOMeshGiftiTests}") -itk_add_test(NAME itkGiftiMeshIOTest1 - COMMAND ITKIOMeshGiftiTestDriver itkGiftiMeshIOTest - DATA{Baseline/aparc.gii} - ${ITK_TEST_OUTPUT_DIR}/giftimeshioaparc.gii - DATA{${ITK_DATA_ROOT}/Input/tetrahedron.vtk} - ${ITK_TEST_OUTPUT_DIR}/gifti2vtkaparc.vtk - 0 1 1 1 1 0 0 1 0 131122 0 0 1 -) -itk_add_test(NAME itkGiftiMeshIOTest2 - COMMAND ITKIOMeshGiftiTestDriver itkGiftiMeshIOTest - DATA{Baseline/white.gii} - ${ITK_TEST_OUTPUT_DIR}/giftimeshiowhite.gii - DATA{${ITK_DATA_ROOT}/Input/tetrahedron.vtk} - ${ITK_TEST_OUTPUT_DIR}/gifti2vtkwhite.vtk - 0 1 1 1 1 0 0 1 22134 0 44264 0 0 -) -itk_add_test(NAME itkMeshFileReadWriteTestGifti1 - COMMAND ITKIOMeshGiftiTestDriver itkMeshFileReadWriteTest - DATA{Baseline/white.gii} - ${ITK_TEST_OUTPUT_DIR}/white.gii -) -itk_add_test(NAME itkMeshFileReadWriteTestGifti2 - COMMAND ITKIOMeshGiftiTestDriver itkMeshFileReadWriteTest - DATA{Baseline/aparc.gii} - ${ITK_TEST_OUTPUT_DIR}/aparc.gii -) +itk_add_test( + NAME + itkGiftiMeshIOTest1 + COMMAND + ITKIOMeshGiftiTestDriver + itkGiftiMeshIOTest + DATA{Baseline/aparc.gii} + ${ITK_TEST_OUTPUT_DIR}/giftimeshioaparc.gii + DATA{${ITK_DATA_ROOT}/Input/tetrahedron.vtk} + ${ITK_TEST_OUTPUT_DIR}/gifti2vtkaparc.vtk + 0 + 1 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 131122 + 0 + 0 + 1) +itk_add_test( + NAME + itkGiftiMeshIOTest2 + COMMAND + ITKIOMeshGiftiTestDriver + itkGiftiMeshIOTest + DATA{Baseline/white.gii} + ${ITK_TEST_OUTPUT_DIR}/giftimeshiowhite.gii + DATA{${ITK_DATA_ROOT}/Input/tetrahedron.vtk} + ${ITK_TEST_OUTPUT_DIR}/gifti2vtkwhite.vtk + 0 + 1 + 1 + 1 + 1 + 0 + 0 + 1 + 22134 + 0 + 44264 + 0 + 0) +itk_add_test( + NAME + itkMeshFileReadWriteTestGifti1 + COMMAND + ITKIOMeshGiftiTestDriver + itkMeshFileReadWriteTest + DATA{Baseline/white.gii} + ${ITK_TEST_OUTPUT_DIR}/white.gii) +itk_add_test( + NAME + itkMeshFileReadWriteTestGifti2 + COMMAND + ITKIOMeshGiftiTestDriver + itkMeshFileReadWriteTest + DATA{Baseline/aparc.gii} + ${ITK_TEST_OUTPUT_DIR}/aparc.gii) diff --git a/Modules/IO/MeshGifti/wrapping/itkGiftiMeshIO.wrap b/Modules/IO/MeshGifti/wrapping/itkGiftiMeshIO.wrap index 665d3b440d1..db0e4b1c09b 100644 --- a/Modules/IO/MeshGifti/wrapping/itkGiftiMeshIO.wrap +++ b/Modules/IO/MeshGifti/wrapping/itkGiftiMeshIO.wrap @@ -5,6 +5,6 @@ itk_wrap_include("itkMapContainer.h") itk_wrap_include("itkRGBPixel.h") itk_wrap_class("itk::MapContainer" POINTER) - itk_wrap_template("Istring" "int, std::string") - itk_wrap_template("IRGBAF" "int, itk::RGBAPixel< float >") +itk_wrap_template("Istring" "int, std::string") +itk_wrap_template("IRGBAF" "int, itk::RGBAPixel< float >") itk_end_wrap_class() diff --git a/Modules/IO/MeshGifti/wrapping/test/CMakeLists.txt b/Modules/IO/MeshGifti/wrapping/test/CMakeLists.txt index 3755f333cdc..10fa5dcd4ea 100644 --- a/Modules/IO/MeshGifti/wrapping/test/CMakeLists.txt +++ b/Modules/IO/MeshGifti/wrapping/test/CMakeLists.txt @@ -1,4 +1,7 @@ if(ITK_WRAP_PYTHON) - itk_python_expression_add_test(NAME itkGiftiMeshIOPythonTest - EXPRESSION "io = itk.GiftiMeshIO.New()") + itk_python_expression_add_test( + NAME + itkGiftiMeshIOPythonTest + EXPRESSION + "io = itk.GiftiMeshIO.New()") endif() diff --git a/Modules/IO/MeshOBJ/itk-module.cmake b/Modules/IO/MeshOBJ/itk-module.cmake index e5c4adcc5f7..702947bdf9d 100644 --- a/Modules/IO/MeshOBJ/itk-module.cmake +++ b/Modules/IO/MeshOBJ/itk-module.cmake @@ -1,17 +1,17 @@ set(DOCUMENTATION "This module contains classes for reading and writing Meshes in the OBJ file format.") -itk_module(ITKIOMeshOBJ +itk_module( + ITKIOMeshOBJ ENABLE_SHARED DEPENDS - ITKCommon - ITKIOMeshBase + ITKCommon + ITKIOMeshBase COMPILE_DEPENDS - ITKMesh + ITKMesh TEST_DEPENDS - ITKTestKernel - ITKQuadEdgeMesh + ITKTestKernel + ITKQuadEdgeMesh FACTORY_NAMES - MeshIO::OBJ + MeshIO::OBJ DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/MeshOBJ/src/CMakeLists.txt b/Modules/IO/MeshOBJ/src/CMakeLists.txt index 9ca8021acc1..3c6515cf1d3 100644 --- a/Modules/IO/MeshOBJ/src/CMakeLists.txt +++ b/Modules/IO/MeshOBJ/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOMeshOBJ_SRCS - itkOBJMeshIO.cxx - itkOBJMeshIOFactory.cxx - ) +set(ITKIOMeshOBJ_SRCS itkOBJMeshIO.cxx itkOBJMeshIOFactory.cxx) itk_module_add_library(ITKIOMeshOBJ ${ITKIOMeshOBJ_SRCS}) diff --git a/Modules/IO/MeshOBJ/test/CMakeLists.txt b/Modules/IO/MeshOBJ/test/CMakeLists.txt index 844b9f851a1..84d899b587c 100644 --- a/Modules/IO/MeshOBJ/test/CMakeLists.txt +++ b/Modules/IO/MeshOBJ/test/CMakeLists.txt @@ -1,38 +1,63 @@ itk_module_test() -set(ITKIOMeshOBJTests - itkMeshFileReadWriteTest.cxx - itkOBJMeshIOTest.cxx -) +set(ITKIOMeshOBJTests itkMeshFileReadWriteTest.cxx itkOBJMeshIOTest.cxx) -CreateTestDriver(ITKIOMeshOBJ "${ITKIOMeshOBJ-Test_LIBRARIES}" "${ITKIOMeshOBJTests}") +createtestdriver(ITKIOMeshOBJ "${ITKIOMeshOBJ-Test_LIBRARIES}" "${ITKIOMeshOBJTests}") -itk_add_test(NAME itkMeshFileReadWriteOBJTest - COMMAND ITKIOMeshOBJTestDriver itkMeshFileReadWriteTest - DATA{Baseline/box.obj} - ${ITK_TEST_OUTPUT_DIR}/box.obj -) +itk_add_test( + NAME + itkMeshFileReadWriteOBJTest + COMMAND + ITKIOMeshOBJTestDriver + itkMeshFileReadWriteTest + DATA{Baseline/box.obj} + ${ITK_TEST_OUTPUT_DIR}/box.obj) -itk_add_test(NAME itkMeshFileReadWriteOBJWithPointDataTest - COMMAND ITKIOMeshOBJTestDriver itkMeshFileReadWriteTest - DATA{Baseline/bunny.obj} - ${ITK_TEST_OUTPUT_DIR}/bunny.vtk -) +itk_add_test( + NAME + itkMeshFileReadWriteOBJWithPointDataTest + COMMAND + ITKIOMeshOBJTestDriver + itkMeshFileReadWriteTest + DATA{Baseline/bunny.obj} + ${ITK_TEST_OUTPUT_DIR}/bunny.vtk) -itk_add_test(NAME itkOBJMeshIOTest1 - COMMAND ITKIOMeshOBJTestDriver itkOBJMeshIOTest - DATA{Baseline/box.obj} - ${ITK_TEST_OUTPUT_DIR}/objmeshiobox.obj - DATA{${ITK_DATA_ROOT}/Input/tetrahedron.vtk} - ${ITK_TEST_OUTPUT_DIR}/obj2vtkbox.vtk - 0 1 1 1 1 8 0 6 0 -) +itk_add_test( + NAME + itkOBJMeshIOTest1 + COMMAND + ITKIOMeshOBJTestDriver + itkOBJMeshIOTest + DATA{Baseline/box.obj} + ${ITK_TEST_OUTPUT_DIR}/objmeshiobox.obj + DATA{${ITK_DATA_ROOT}/Input/tetrahedron.vtk} + ${ITK_TEST_OUTPUT_DIR}/obj2vtkbox.vtk + 0 + 1 + 1 + 1 + 1 + 8 + 0 + 6 + 0) -itk_add_test(NAME itkOBJMeshIOTest2 - COMMAND ITKIOMeshOBJTestDriver itkOBJMeshIOTest - DATA{Baseline/bunny.obj} - ${ITK_TEST_OUTPUT_DIR}/objmeshiobunny.obj - DATA{${ITK_DATA_ROOT}/Input/tetrahedron.vtk} - ${ITK_TEST_OUTPUT_DIR}/obj2vtkbunny.vtk - 0 1 1 1 1 2503 4968 4968 0 -) +itk_add_test( + NAME + itkOBJMeshIOTest2 + COMMAND + ITKIOMeshOBJTestDriver + itkOBJMeshIOTest + DATA{Baseline/bunny.obj} + ${ITK_TEST_OUTPUT_DIR}/objmeshiobunny.obj + DATA{${ITK_DATA_ROOT}/Input/tetrahedron.vtk} + ${ITK_TEST_OUTPUT_DIR}/obj2vtkbunny.vtk + 0 + 1 + 1 + 1 + 1 + 2503 + 4968 + 4968 + 0) diff --git a/Modules/IO/MeshOBJ/wrapping/test/CMakeLists.txt b/Modules/IO/MeshOBJ/wrapping/test/CMakeLists.txt index 8c9818ea0a9..4be891b5276 100644 --- a/Modules/IO/MeshOBJ/wrapping/test/CMakeLists.txt +++ b/Modules/IO/MeshOBJ/wrapping/test/CMakeLists.txt @@ -1,4 +1,7 @@ if(ITK_WRAP_PYTHON) - itk_python_expression_add_test(NAME itkOBJMeshIOPythonTest - EXPRESSION "io = itk.OBJMeshIO.New()") + itk_python_expression_add_test( + NAME + itkOBJMeshIOPythonTest + EXPRESSION + "io = itk.OBJMeshIO.New()") endif() diff --git a/Modules/IO/MeshOFF/itk-module.cmake b/Modules/IO/MeshOFF/itk-module.cmake index ff3b5fb4153..4aa961f3cd3 100644 --- a/Modules/IO/MeshOFF/itk-module.cmake +++ b/Modules/IO/MeshOFF/itk-module.cmake @@ -1,17 +1,17 @@ set(DOCUMENTATION "This module contains classes for reading and writing Meshes in the OFF file format.") -itk_module(ITKIOMeshOFF +itk_module( + ITKIOMeshOFF ENABLE_SHARED DEPENDS - ITKCommon - ITKIOMeshBase + ITKCommon + ITKIOMeshBase COMPILE_DEPENDS - ITKMesh + ITKMesh TEST_DEPENDS - ITKTestKernel - ITKQuadEdgeMesh + ITKTestKernel + ITKQuadEdgeMesh FACTORY_NAMES - MeshIO::OFF + MeshIO::OFF DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/MeshOFF/src/CMakeLists.txt b/Modules/IO/MeshOFF/src/CMakeLists.txt index 6d18bb72189..e5b93f2a5d3 100644 --- a/Modules/IO/MeshOFF/src/CMakeLists.txt +++ b/Modules/IO/MeshOFF/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOMeshOFF_SRCS - itkOFFMeshIO.cxx - itkOFFMeshIOFactory.cxx - ) +set(ITKIOMeshOFF_SRCS itkOFFMeshIO.cxx itkOFFMeshIOFactory.cxx) itk_module_add_library(ITKIOMeshOFF ${ITKIOMeshOFF_SRCS}) diff --git a/Modules/IO/MeshOFF/test/CMakeLists.txt b/Modules/IO/MeshOFF/test/CMakeLists.txt index 985193c2226..8324d82e09c 100644 --- a/Modules/IO/MeshOFF/test/CMakeLists.txt +++ b/Modules/IO/MeshOFF/test/CMakeLists.txt @@ -1,22 +1,33 @@ itk_module_test() -set(ITKIOMeshOFFTests - itkMeshFileReadWriteTest.cxx - itkOFFMeshIOTest.cxx -) +set(ITKIOMeshOFFTests itkMeshFileReadWriteTest.cxx itkOFFMeshIOTest.cxx) -CreateTestDriver(ITKIOMeshOFF "${ITKIOMeshOFF-Test_LIBRARIES}" "${ITKIOMeshOFFTests}") +createtestdriver(ITKIOMeshOFF "${ITKIOMeshOFF-Test_LIBRARIES}" "${ITKIOMeshOFFTests}") -itk_add_test(NAME itkMeshFileReadWriteOFFTest - COMMAND ITKIOMeshOFFTestDriver itkMeshFileReadWriteTest - DATA{Baseline/octa.off} - ${ITK_TEST_OUTPUT_DIR}/octa.off -) -itk_add_test(NAME itkOFFMeshIOTest - COMMAND ITKIOMeshOFFTestDriver itkOFFMeshIOTest - DATA{Baseline/octa.off} - ${ITK_TEST_OUTPUT_DIR}/offmeshioocta.off - DATA{${ITK_DATA_ROOT}/Input/tetrahedron.vtk} - ${ITK_TEST_OUTPUT_DIR}/off2vtkocta.vtk - 0 1 1 1 1 6 0 8 0 -) +itk_add_test( + NAME + itkMeshFileReadWriteOFFTest + COMMAND + ITKIOMeshOFFTestDriver + itkMeshFileReadWriteTest + DATA{Baseline/octa.off} + ${ITK_TEST_OUTPUT_DIR}/octa.off) +itk_add_test( + NAME + itkOFFMeshIOTest + COMMAND + ITKIOMeshOFFTestDriver + itkOFFMeshIOTest + DATA{Baseline/octa.off} + ${ITK_TEST_OUTPUT_DIR}/offmeshioocta.off + DATA{${ITK_DATA_ROOT}/Input/tetrahedron.vtk} + ${ITK_TEST_OUTPUT_DIR}/off2vtkocta.vtk + 0 + 1 + 1 + 1 + 1 + 6 + 0 + 8 + 0) diff --git a/Modules/IO/MeshOFF/wrapping/test/CMakeLists.txt b/Modules/IO/MeshOFF/wrapping/test/CMakeLists.txt index eb0d85e2fc0..198502d872d 100644 --- a/Modules/IO/MeshOFF/wrapping/test/CMakeLists.txt +++ b/Modules/IO/MeshOFF/wrapping/test/CMakeLists.txt @@ -1,4 +1,7 @@ if(ITK_WRAP_PYTHON) - itk_python_expression_add_test(NAME itkOFFMeshIOPythonTest - EXPRESSION "io = itk.OFFMeshIO.New()") + itk_python_expression_add_test( + NAME + itkOFFMeshIOPythonTest + EXPRESSION + "io = itk.OFFMeshIO.New()") endif() diff --git a/Modules/IO/MeshVTK/itk-module.cmake b/Modules/IO/MeshVTK/itk-module.cmake index 59c5457bc92..c19b466cd9d 100644 --- a/Modules/IO/MeshVTK/itk-module.cmake +++ b/Modules/IO/MeshVTK/itk-module.cmake @@ -1,19 +1,19 @@ set(DOCUMENTATION "This module contains classes for reading and writing Meshes in the VTK file format.") -itk_module(ITKIOMeshVTK +itk_module( + ITKIOMeshVTK ENABLE_SHARED DEPENDS - ITKCommon - ITKIOMeshBase + ITKCommon + ITKIOMeshBase PRIVATE_DEPENDS - ITKDoubleConversion + ITKDoubleConversion COMPILE_DEPENDS - ITKMesh + ITKMesh TEST_DEPENDS - ITKTestKernel - ITKQuadEdgeMesh + ITKTestKernel + ITKQuadEdgeMesh FACTORY_NAMES - MeshIO::VTKPolyData + MeshIO::VTKPolyData DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/MeshVTK/src/CMakeLists.txt b/Modules/IO/MeshVTK/src/CMakeLists.txt index 28410952cca..a78589e484a 100644 --- a/Modules/IO/MeshVTK/src/CMakeLists.txt +++ b/Modules/IO/MeshVTK/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOMeshVTK_SRCS - itkVTKPolyDataMeshIO.cxx - itkVTKPolyDataMeshIOFactory.cxx - ) +set(ITKIOMeshVTK_SRCS itkVTKPolyDataMeshIO.cxx itkVTKPolyDataMeshIOFactory.cxx) itk_module_add_library(ITKIOMeshVTK ${ITKIOMeshVTK_SRCS}) diff --git a/Modules/IO/MeshVTK/test/CMakeLists.txt b/Modules/IO/MeshVTK/test/CMakeLists.txt index 34337ef344c..6459c5c8629 100644 --- a/Modules/IO/MeshVTK/test/CMakeLists.txt +++ b/Modules/IO/MeshVTK/test/CMakeLists.txt @@ -1,92 +1,165 @@ itk_module_test() set(ITKIOMeshVTKTests - itkMeshFileReadWriteTest.cxx - itkMeshFileWriteReadTensorTest.cxx - itkMeshFileReadWriteVectorAttributeTest.cxx - itkPolylineReadWriteTest.cxx - itkVTKPolyDataMeshCanReadImageTest.cxx - itkVTKPolyDataMeshIOTest.cxx -) + itkMeshFileReadWriteTest.cxx + itkMeshFileWriteReadTensorTest.cxx + itkMeshFileReadWriteVectorAttributeTest.cxx + itkPolylineReadWriteTest.cxx + itkVTKPolyDataMeshCanReadImageTest.cxx + itkVTKPolyDataMeshIOTest.cxx) -CreateTestDriver(ITKIOMeshVTK "${ITKIOMeshVTK-Test_LIBRARIES}" "${ITKIOMeshVTKTests}") +createtestdriver(ITKIOMeshVTK "${ITKIOMeshVTK-Test_LIBRARIES}" "${ITKIOMeshVTKTests}") -itk_add_test(NAME itkMeshFileReadWriteTest00 - COMMAND ITKIOMeshVTKTestDriver itkMeshFileReadWriteTest - DATA{Baseline/sphere.vtk} - ${ITK_TEST_OUTPUT_DIR}/sphere00.vtk -) -itk_add_test(NAME itkMeshFileReadWriteVectorAttributeTest - COMMAND ITKIOMeshVTKTestDriver itkMeshFileReadWriteVectorAttributeTest - DATA{Baseline/sphere_norm.vtk} - ${ITK_TEST_OUTPUT_DIR}/sphere_norm.vtk -) -itk_add_test(NAME itkPolyLineReadWriteTest00 - COMMAND ITKIOMeshVTKTestDriver itkPolylineReadWriteTest - DATA{Baseline/fibers.vtk} - ${ITK_TEST_OUTPUT_DIR}/fibers.vtk -) -itk_add_test(NAME itkPolyLineReadWriteTest01 - COMMAND ITKIOMeshVTKTestDriver itkPolylineReadWriteTest - DATA{Baseline/fibers.vtk} - ${ITK_TEST_OUTPUT_DIR}/fibers_b.vtk - 1 -) -itk_add_test(NAME itkPolyLineReadWriteTest02 - COMMAND ITKIOMeshVTKTestDriver itkPolylineReadWriteTest - DATA{Baseline/hollow_test.vtk} - ${ITK_TEST_OUTPUT_DIR}/hollow_test.vtk -) -itk_add_test(NAME itkPolyLineReadWriteTest03 - COMMAND ITKIOMeshVTKTestDriver itkPolylineReadWriteTest - DATA{Baseline/hollow_test.vtk} - ${ITK_TEST_OUTPUT_DIR}/hollow_test_b.vtk - 1 -) -itk_add_test(NAME itkMeshFileWriteReadTensorTest - COMMAND ITKIOMeshVTKTestDriver itkMeshFileWriteReadTensorTest +itk_add_test( + NAME + itkMeshFileReadWriteTest00 + COMMAND + ITKIOMeshVTKTestDriver + itkMeshFileReadWriteTest + DATA{Baseline/sphere.vtk} + ${ITK_TEST_OUTPUT_DIR}/sphere00.vtk) +itk_add_test( + NAME + itkMeshFileReadWriteVectorAttributeTest + COMMAND + ITKIOMeshVTKTestDriver + itkMeshFileReadWriteVectorAttributeTest + DATA{Baseline/sphere_norm.vtk} + ${ITK_TEST_OUTPUT_DIR}/sphere_norm.vtk) +itk_add_test( + NAME + itkPolyLineReadWriteTest00 + COMMAND + ITKIOMeshVTKTestDriver + itkPolylineReadWriteTest + DATA{Baseline/fibers.vtk} + ${ITK_TEST_OUTPUT_DIR}/fibers.vtk) +itk_add_test( + NAME + itkPolyLineReadWriteTest01 + COMMAND + ITKIOMeshVTKTestDriver + itkPolylineReadWriteTest + DATA{Baseline/fibers.vtk} + ${ITK_TEST_OUTPUT_DIR}/fibers_b.vtk + 1) +itk_add_test( + NAME + itkPolyLineReadWriteTest02 + COMMAND + ITKIOMeshVTKTestDriver + itkPolylineReadWriteTest + DATA{Baseline/hollow_test.vtk} + ${ITK_TEST_OUTPUT_DIR}/hollow_test.vtk) +itk_add_test( + NAME + itkPolyLineReadWriteTest03 + COMMAND + ITKIOMeshVTKTestDriver + itkPolylineReadWriteTest + DATA{Baseline/hollow_test.vtk} + ${ITK_TEST_OUTPUT_DIR}/hollow_test_b.vtk + 1) +itk_add_test( + NAME + itkMeshFileWriteReadTensorTest + COMMAND + ITKIOMeshVTKTestDriver + itkMeshFileWriteReadTensorTest ${ITK_TEST_OUTPUT_DIR}/itkMeshFileWriteReadTensorTest2D.vtk - ${ITK_TEST_OUTPUT_DIR}/itkMeshFileWriteReadTensorTest3D.vtk -) -itk_add_test(NAME itkVTKPolyDataMeshCanReadImageTest - COMMAND ITKIOMeshVTKTestDriver itkVTKPolyDataMeshCanReadImageTest - DATA{Input/ironProt.vtk} -) -itk_add_test(NAME itkVTKPolyDataMeshIOTestInOutAscii - COMMAND ITKIOMeshVTKTestDriver itkVTKPolyDataMeshIOTest - DATA{Baseline/sphere.vtk} - ${ITK_TEST_OUTPUT_DIR}/sphere_a.vtk - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/ascii2asciivtk2mhaHeadMRVolume.mha - 0 1 1 1 1 162 0 320 0 0 0 -) -itk_add_test(NAME itkVTKPolyDataMeshIOTestInAsciiOutBinary - COMMAND ITKIOMeshVTKTestDriver itkVTKPolyDataMeshIOTest - DATA{Baseline/sphere.vtk} - ${ITK_TEST_OUTPUT_DIR}/sphere_b.vtk - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/ascii2binaryvtk2mhaHeadMRVolume.mha - 0 1 1 1 1 162 0 320 0 0 1 -) -itk_add_test(NAME itkVTKPolyDataMeshIOTestInBinaryOutAscii - COMMAND ITKIOMeshVTKTestDriver itkVTKPolyDataMeshIOTest - DATA{Baseline/fibers.vtk} - ${ITK_TEST_OUTPUT_DIR}/fibers_a.vtk - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/binary2asciivtk2mhaHeadMRVolume.mha - 0 1 1 1 1 72 72 2 2 1 0 -) -itk_add_test(NAME itkVTKPolyDataMeshIOTestInOutBinary - COMMAND ITKIOMeshVTKTestDriver itkVTKPolyDataMeshIOTest - DATA{Baseline/fibers.vtk} - ${ITK_TEST_OUTPUT_DIR}/fibers_b.vtk - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} - ${ITK_TEST_OUTPUT_DIR}/binary2binaryvtk2mhaHeadMRVolume.mha - 0 1 1 1 1 72 72 2 2 1 1 -) + ${ITK_TEST_OUTPUT_DIR}/itkMeshFileWriteReadTensorTest3D.vtk) +itk_add_test( + NAME + itkVTKPolyDataMeshCanReadImageTest + COMMAND + ITKIOMeshVTKTestDriver + itkVTKPolyDataMeshCanReadImageTest + DATA{Input/ironProt.vtk}) +itk_add_test( + NAME + itkVTKPolyDataMeshIOTestInOutAscii + COMMAND + ITKIOMeshVTKTestDriver + itkVTKPolyDataMeshIOTest + DATA{Baseline/sphere.vtk} + ${ITK_TEST_OUTPUT_DIR}/sphere_a.vtk + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/ascii2asciivtk2mhaHeadMRVolume.mha + 0 + 1 + 1 + 1 + 1 + 162 + 0 + 320 + 0 + 0 + 0) +itk_add_test( + NAME + itkVTKPolyDataMeshIOTestInAsciiOutBinary + COMMAND + ITKIOMeshVTKTestDriver + itkVTKPolyDataMeshIOTest + DATA{Baseline/sphere.vtk} + ${ITK_TEST_OUTPUT_DIR}/sphere_b.vtk + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/ascii2binaryvtk2mhaHeadMRVolume.mha + 0 + 1 + 1 + 1 + 1 + 162 + 0 + 320 + 0 + 0 + 1) +itk_add_test( + NAME + itkVTKPolyDataMeshIOTestInBinaryOutAscii + COMMAND + ITKIOMeshVTKTestDriver + itkVTKPolyDataMeshIOTest + DATA{Baseline/fibers.vtk} + ${ITK_TEST_OUTPUT_DIR}/fibers_a.vtk + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/binary2asciivtk2mhaHeadMRVolume.mha + 0 + 1 + 1 + 1 + 1 + 72 + 72 + 2 + 2 + 1 + 0) +itk_add_test( + NAME + itkVTKPolyDataMeshIOTestInOutBinary + COMMAND + ITKIOMeshVTKTestDriver + itkVTKPolyDataMeshIOTest + DATA{Baseline/fibers.vtk} + ${ITK_TEST_OUTPUT_DIR}/fibers_b.vtk + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/binary2binaryvtk2mhaHeadMRVolume.mha + 0 + 1 + 1 + 1 + 1 + 72 + 72 + 2 + 2 + 1 + 1) -set(ITKIOMeshVTKGTests - itkVTKPolyDataMeshIOGTest.cxx -) +set(ITKIOMeshVTKGTests itkVTKPolyDataMeshIOGTest.cxx) -CreateGoogleTestDriver(ITKIOMeshVTK "${ITKIOMeshVTK-Test_LIBRARIES}" "${ITKIOMeshVTKGTests}") +creategoogletestdriver(ITKIOMeshVTK "${ITKIOMeshVTK-Test_LIBRARIES}" "${ITKIOMeshVTKGTests}") diff --git a/Modules/IO/Meta/itk-module.cmake b/Modules/IO/Meta/itk-module.cmake index 0ecdd9adc75..3c6bd7b406a 100644 --- a/Modules/IO/Meta/itk-module.cmake +++ b/Modules/IO/Meta/itk-module.cmake @@ -1,22 +1,23 @@ -set(DOCUMENTATION "This module contains IO classes for reading and writing from +set(DOCUMENTATION + "This module contains IO classes for reading and writing from the MetaIO format. The MetaIO formats for objects includes a format for images (MetaImage). A MetaImage can either consist of a simple plain text header coupled with a data file (usually .mhd + .raw) or the header inline with the data (usually .mha).") -itk_module(ITKIOMeta +itk_module( + ITKIOMeta ENABLE_SHARED DEPENDS - ITKMetaIO - ITKIOImageBase + ITKMetaIO + ITKIOImageBase TEST_DEPENDS - ITKTestKernel - ITKSmoothing - ITKMetaIO + ITKTestKernel + ITKSmoothing + ITKMetaIO FACTORY_NAMES - ImageIO::Meta + ImageIO::Meta DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") # Extra test dependency of ITKSmoothing is caused by itkMetaStreamingIOTest. diff --git a/Modules/IO/Meta/src/CMakeLists.txt b/Modules/IO/Meta/src/CMakeLists.txt index 8147de13d6d..4292435e918 100644 --- a/Modules/IO/Meta/src/CMakeLists.txt +++ b/Modules/IO/Meta/src/CMakeLists.txt @@ -1,8 +1,7 @@ set(ITKIOMeta_SRCS - itkMetaArrayWriter.cxx - itkMetaImageIO.cxx - itkMetaArrayReader.cxx - itkMetaImageIOFactory.cxx - ) + itkMetaArrayWriter.cxx + itkMetaImageIO.cxx + itkMetaArrayReader.cxx + itkMetaImageIOFactory.cxx) itk_module_add_library(ITKIOMeta ${ITKIOMeta_SRCS}) diff --git a/Modules/IO/Meta/test/CMakeLists.txt b/Modules/IO/Meta/test/CMakeLists.txt index 0ba04970ab8..96c20fb8d39 100644 --- a/Modules/IO/Meta/test/CMakeLists.txt +++ b/Modules/IO/Meta/test/CMakeLists.txt @@ -1,121 +1,387 @@ itk_module_test() set(ITKIOMetaTests -itkMetaImageIOMetaDataTest.cxx -itkMetaImageIOGzTest.cxx -itkMetaImageIOTest.cxx -itkMetaImageIOTest2.cxx -itkLargeMetaImageWriteReadTest.cxx -testMetaArray.cxx -testMetaCommand.cxx -testMetaGroup.cxx -testMetaImage.cxx -testMetaMesh.cxx -itkMetaImageStreamingIOTest.cxx -itkMetaImageStreamingWriterIOTest.cxx -itkMetaTestLongFilename.cxx -) + itkMetaImageIOMetaDataTest.cxx + itkMetaImageIOGzTest.cxx + itkMetaImageIOTest.cxx + itkMetaImageIOTest2.cxx + itkLargeMetaImageWriteReadTest.cxx + testMetaArray.cxx + testMetaCommand.cxx + testMetaGroup.cxx + testMetaImage.cxx + testMetaMesh.cxx + itkMetaImageStreamingIOTest.cxx + itkMetaImageStreamingWriterIOTest.cxx + itkMetaTestLongFilename.cxx) -CreateTestDriver(ITKIOMeta "${ITKIOMeta-Test_LIBRARIES}" "${ITKIOMetaTests}") +createtestdriver(ITKIOMeta "${ITKIOMeta-Test_LIBRARIES}" "${ITKIOMetaTests}") -itk_add_test(NAME itkMetaImageIOMetaDataTest - COMMAND ITKIOMetaTestDriver itkMetaImageIOMetaDataTest - ${ITK_TEST_OUTPUT_DIR}/MetaImageIOMetaDataTest.mhd) -itk_add_test(NAME itkMetaImageIOGzTest - COMMAND ITKIOMetaTestDriver itkMetaImageIOGzTest - ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkMetaImageIOTest - COMMAND ITKIOMetaTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume.mhd - itkMetaImageIOTest DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume.mhd) -itk_add_test(NAME itkMetaImageIOTestList - COMMAND ITKIOMetaTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/SmallRampVolume.mhd,SmallRampVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTestList.mhd - itkMetaImageIOTest DATA{${ITK_DATA_ROOT}/Input/MetaIO/SmallRampVolumeList.mhd,SmallRampVolume01.tif,SmallRampVolume02.tif,SmallRampVolume03.tif,SmallRampVolume04.tif,SmallRampVolume05.tif,SmallRampVolume06.tif} ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTestList.mhd) -itk_add_test(NAME itkMetaImageIOTestListWithFilenameSpaces - COMMAND ITKIOMetaTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/SmallRampVolume.mhd,SmallRampVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTestListWithFilenameSpaces.mhd - itkMetaImageIOTest DATA{${ITK_DATA_ROOT}/Input/MetaIO/Small\ Ramp\ Volume\ List.mhd,Small\ Ramp\ Volume\ 01.tif,Small\ Ramp\ Volume\ 02.tif,Small\ Ramp\ Volume\ 03.tif,Small\ Ramp\ Volume\ 04.tif,Small\ Ramp\ Volume\ 05.tif,Small\ Ramp\ Volume\ 06.tif} ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTestListWithFilenameSpaces.mhd) -itk_add_test(NAME itkMetaImageIOTestRegEx - COMMAND ITKIOMetaTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/SmallRampVolume.mhd,SmallRampVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTestRegEx.mhd - itkMetaImageIOTest DATA{${ITK_DATA_ROOT}/Input/MetaIO/SmallRampVolumeRegEx.mhd,SmallRampVolume01.tif,SmallRampVolume02.tif,SmallRampVolume03.tif,SmallRampVolume04.tif,SmallRampVolume05.tif,SmallRampVolume06.tif} ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTestRegEx.mhd) -itk_add_test(NAME itkMetaImageIOTestRegExWithFilenameSpaces - COMMAND ITKIOMetaTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/SmallRampVolume.mhd,SmallRampVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTestRegExWithFilenameSpaces.mhd - itkMetaImageIOTest DATA{${ITK_DATA_ROOT}/Input/MetaIO/Small\ Ramp\ Volume\ Reg\ Ex.mhd,Small\ Ramp\ Volume\ 01.tif,Small\ Ramp\ Volume\ 02.tif,Small\ Ramp\ Volume\ 03.tif,Small\ Ramp\ Volume\ 04.tif,Small\ Ramp\ Volume\ 05.tif,Small\ Ramp\ Volume\ 06.tif} ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTestRegExWithFilenameSpaces.mhd) -itk_add_test(NAME itkMetaImageIOTest2 - COMMAND ITKIOMetaTestDriver itkMetaImageIOTest2 - ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTest2.mha) -itk_add_test(NAME itkMetaImageIOShouldFailTest - COMMAND ITKIOMetaTestDriver itkMetaImageIOTest - DATA{${ITK_DATA_ROOT}/Input/MetaImageError.mhd} "OutputNotUsed" 1) -itk_add_test(NAME testMetaGroup - COMMAND ITKIOMetaTestDriver testMetaGroup - ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME testMetaImage - COMMAND ITKIOMetaTestDriver testMetaImage) -itk_add_test(NAME testMetaMesh - COMMAND ITKIOMetaTestDriver testMetaMesh - ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME MetaCommandRequiredOptionsWithMultipleStrings - COMMAND ITKIOMetaTestDriver testMetaCommand - -ExpectedFailStatus 0 -sum 7 -r1c_rs StringValue1 StringValue2 StringValue3 -r2_ri 7) -itk_add_test(NAME MetaCommandRequiredOptionsWithMultipleStringsAtEnd - COMMAND ITKIOMetaTestDriver testMetaCommand - -ExpectedFailStatus 0 -sum 7 -r2_ri 7 -r1c_rs StringValue1 StringValue2 StringValue3) -itk_add_test(NAME MetaCommandOptionalWithRequired - COMMAND ITKIOMetaTestDriver testMetaCommand - -ExpectedFailStatus 0 -sum 107 -r1c_rs StringValue1 StringValue2 StringValue3 -r2_ri 7 -o1_ri 1 -o2_ri 99) -itk_add_test(NAME MetaCommandOptionalOptoinsWithOutArguments - COMMAND ITKIOMetaTestDriver testMetaCommand - -ExpectedFailStatus 0 -sum 207 -r1c_rs StringValue1 StringValue2 StringValue3 -r2_ri 7 -o1_oi -o2_oi) -itk_add_test(NAME MetaCommandOptionalOptoinsWithOutArguments1 - COMMAND ITKIOMetaTestDriver testMetaCommand - -ExpectedFailStatus 0 -sum 107 -r1c_rs StringValue1 StringValue2 StringValue3 -r2_ri 7 -o1_oi 1 -o2_oi 99) -itk_add_test(NAME MetaCommandRequiredAndOptionalOptoinsWithArguments - COMMAND ITKIOMetaTestDriver testMetaCommand - -ExpectedFailStatus 0 -sum 207 -r1c_rs StringValue1 StringValue2 StringValue3 -r2_ri 7 -o1_ri 1 -o2_ri 99 -o3_ri_oi 50 50) -itk_add_test(NAME MetaCommandRequiredAndOptionalOptoinsWithOutArguments - COMMAND ITKIOMetaTestDriver testMetaCommand - -ExpectedFailStatus 0 -sum 257 -r1c_rs StringValue1 StringValue2 StringValue3 -r2_ri 7 -o1_ri 1 -o2_ri 99 -o3_ri_oi 50) -itk_add_test(NAME MetaCommandRequiredAndOptionalOptoinsWithOutArguments-1 - COMMAND ITKIOMetaTestDriver testMetaCommand - -ExpectedFailStatus 0 -sum 457 -r1c_rs StringValue1 StringValue2 StringValue3 -r2_ri 7 -o1_ri 1 -o2_ri 99 -o3_ri_oi 50 -o1_oi -o2_oi) -itk_add_test(NAME MetaCommandRequiredOptionsWithMissingMultipleStrings - COMMAND ITKIOMetaTestDriver testMetaCommand - -ExpectedFailStatus 1 -sum 7 -r1c_rs -r2_ri 7) -itk_add_test(NAME MetaCommandRequiredOptionsWithMissingMultipleStringsAtEnd - COMMAND ITKIOMetaTestDriver testMetaCommand - -ExpectedFailStatus 1 -sum 7 -r2_ri 7 -r1c_rs) -itk_add_test(NAME MetaCommandOptionalWithRequiredMissing - COMMAND ITKIOMetaTestDriver testMetaCommand - -ExpectedFailStatus 1 -sum 107 -r1c_rs StringValue1 StringValue2 StringValue3 -r2_ri -o1_ri 1 -o2_ri 99) -itk_add_test(NAME MetaCommandRequiredAndOptionalOptoinsWithArgumentsMissing - COMMAND ITKIOMetaTestDriver testMetaCommand - -ExpectedFailStatus 1 -sum 207 -r1c_rs StringValue1 StringValue2 StringValue3 -r2_ri 7 -o3_ri_oi) -itk_add_test(NAME testMetaArray - COMMAND ITKIOMetaTestDriver testMetaArray - ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkMetaImageStreamingIOTest - COMMAND ITKIOMetaTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeStreamed.mhd - itkMetaImageStreamingIOTest DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeStreamed.mhd) -itk_add_test(NAME itkMetaImageCompressedStreamingIOTest - COMMAND ITKIOMetaTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeCompressedStreamed.mha - itkMetaImageStreamingIOTest DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeCompressed.mha} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeCompressedStreamed.mha) -itk_add_test(NAME itkMetaImageStreamingWriterIOTest - COMMAND ITKIOMetaTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/MetaImageStreamingWriterIOTest.mha - itkMetaImageStreamingWriterIOTest DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/MetaImageStreamingWriterIOTest.mha) +itk_add_test( + NAME + itkMetaImageIOMetaDataTest + COMMAND + ITKIOMetaTestDriver + itkMetaImageIOMetaDataTest + ${ITK_TEST_OUTPUT_DIR}/MetaImageIOMetaDataTest.mhd) +itk_add_test( + NAME + itkMetaImageIOGzTest + COMMAND + ITKIOMetaTestDriver + itkMetaImageIOGzTest + ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkMetaImageIOTest + COMMAND + ITKIOMetaTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume.mhd + itkMetaImageIOTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume.mhd) +itk_add_test( + NAME + itkMetaImageIOTestList + COMMAND + ITKIOMetaTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/SmallRampVolume.mhd,SmallRampVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTestList.mhd + itkMetaImageIOTest + DATA{${ITK_DATA_ROOT}/Input/MetaIO/SmallRampVolumeList.mhd,SmallRampVolume01.tif,SmallRampVolume02.tif,SmallRampVolume03.tif,SmallRampVolume04.tif,SmallRampVolume05.tif,SmallRampVolume06.tif} + ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTestList.mhd) +itk_add_test( + NAME + itkMetaImageIOTestListWithFilenameSpaces + COMMAND + ITKIOMetaTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/SmallRampVolume.mhd,SmallRampVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTestListWithFilenameSpaces.mhd + itkMetaImageIOTest + DATA{${ITK_DATA_ROOT}/Input/MetaIO/Small\ Ramp\ Volume\ List.mhd,Small\ Ramp\ Volume\ 01.tif,Small\ Ramp\ Volume\ 02.tif,Small\ Ramp\ Volume\ 03.tif,Small\ Ramp\ Volume\ 04.tif,Small\ Ramp\ Volume\ 05.tif,Small\ Ramp\ Volume\ 06.tif} + ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTestListWithFilenameSpaces.mhd) +itk_add_test( + NAME + itkMetaImageIOTestRegEx + COMMAND + ITKIOMetaTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/SmallRampVolume.mhd,SmallRampVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTestRegEx.mhd + itkMetaImageIOTest + DATA{${ITK_DATA_ROOT}/Input/MetaIO/SmallRampVolumeRegEx.mhd,SmallRampVolume01.tif,SmallRampVolume02.tif,SmallRampVolume03.tif,SmallRampVolume04.tif,SmallRampVolume05.tif,SmallRampVolume06.tif} + ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTestRegEx.mhd) +itk_add_test( + NAME + itkMetaImageIOTestRegExWithFilenameSpaces + COMMAND + ITKIOMetaTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/SmallRampVolume.mhd,SmallRampVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTestRegExWithFilenameSpaces.mhd + itkMetaImageIOTest + DATA{${ITK_DATA_ROOT}/Input/MetaIO/Small\ Ramp\ Volume\ Reg\ Ex.mhd,Small\ Ramp\ Volume\ 01.tif,Small\ Ramp\ Volume\ 02.tif,Small\ Ramp\ Volume\ 03.tif,Small\ Ramp\ Volume\ 04.tif,Small\ Ramp\ Volume\ 05.tif,Small\ Ramp\ Volume\ 06.tif} + ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTestRegExWithFilenameSpaces.mhd) +itk_add_test( + NAME + itkMetaImageIOTest2 + COMMAND + ITKIOMetaTestDriver + itkMetaImageIOTest2 + ${ITK_TEST_OUTPUT_DIR}/itkMetaImageIOTest2.mha) +itk_add_test( + NAME + itkMetaImageIOShouldFailTest + COMMAND + ITKIOMetaTestDriver + itkMetaImageIOTest + DATA{${ITK_DATA_ROOT}/Input/MetaImageError.mhd} + "OutputNotUsed" + 1) +itk_add_test( + NAME + testMetaGroup + COMMAND + ITKIOMetaTestDriver + testMetaGroup + ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + testMetaImage + COMMAND + ITKIOMetaTestDriver + testMetaImage) +itk_add_test( + NAME + testMetaMesh + COMMAND + ITKIOMetaTestDriver + testMetaMesh + ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + MetaCommandRequiredOptionsWithMultipleStrings + COMMAND + ITKIOMetaTestDriver + testMetaCommand + -ExpectedFailStatus + 0 + -sum + 7 + -r1c_rs + StringValue1 + StringValue2 + StringValue3 + -r2_ri + 7) +itk_add_test( + NAME + MetaCommandRequiredOptionsWithMultipleStringsAtEnd + COMMAND + ITKIOMetaTestDriver + testMetaCommand + -ExpectedFailStatus + 0 + -sum + 7 + -r2_ri + 7 + -r1c_rs + StringValue1 + StringValue2 + StringValue3) +itk_add_test( + NAME + MetaCommandOptionalWithRequired + COMMAND + ITKIOMetaTestDriver + testMetaCommand + -ExpectedFailStatus + 0 + -sum + 107 + -r1c_rs + StringValue1 + StringValue2 + StringValue3 + -r2_ri + 7 + -o1_ri + 1 + -o2_ri + 99) +itk_add_test( + NAME + MetaCommandOptionalOptoinsWithOutArguments + COMMAND + ITKIOMetaTestDriver + testMetaCommand + -ExpectedFailStatus + 0 + -sum + 207 + -r1c_rs + StringValue1 + StringValue2 + StringValue3 + -r2_ri + 7 + -o1_oi + -o2_oi) +itk_add_test( + NAME + MetaCommandOptionalOptoinsWithOutArguments1 + COMMAND + ITKIOMetaTestDriver + testMetaCommand + -ExpectedFailStatus + 0 + -sum + 107 + -r1c_rs + StringValue1 + StringValue2 + StringValue3 + -r2_ri + 7 + -o1_oi + 1 + -o2_oi + 99) +itk_add_test( + NAME + MetaCommandRequiredAndOptionalOptoinsWithArguments + COMMAND + ITKIOMetaTestDriver + testMetaCommand + -ExpectedFailStatus + 0 + -sum + 207 + -r1c_rs + StringValue1 + StringValue2 + StringValue3 + -r2_ri + 7 + -o1_ri + 1 + -o2_ri + 99 + -o3_ri_oi + 50 + 50) +itk_add_test( + NAME + MetaCommandRequiredAndOptionalOptoinsWithOutArguments + COMMAND + ITKIOMetaTestDriver + testMetaCommand + -ExpectedFailStatus + 0 + -sum + 257 + -r1c_rs + StringValue1 + StringValue2 + StringValue3 + -r2_ri + 7 + -o1_ri + 1 + -o2_ri + 99 + -o3_ri_oi + 50) +itk_add_test( + NAME + MetaCommandRequiredAndOptionalOptoinsWithOutArguments-1 + COMMAND + ITKIOMetaTestDriver + testMetaCommand + -ExpectedFailStatus + 0 + -sum + 457 + -r1c_rs + StringValue1 + StringValue2 + StringValue3 + -r2_ri + 7 + -o1_ri + 1 + -o2_ri + 99 + -o3_ri_oi + 50 + -o1_oi + -o2_oi) +itk_add_test( + NAME + MetaCommandRequiredOptionsWithMissingMultipleStrings + COMMAND + ITKIOMetaTestDriver + testMetaCommand + -ExpectedFailStatus + 1 + -sum + 7 + -r1c_rs + -r2_ri + 7) +itk_add_test( + NAME + MetaCommandRequiredOptionsWithMissingMultipleStringsAtEnd + COMMAND + ITKIOMetaTestDriver + testMetaCommand + -ExpectedFailStatus + 1 + -sum + 7 + -r2_ri + 7 + -r1c_rs) +itk_add_test( + NAME + MetaCommandOptionalWithRequiredMissing + COMMAND + ITKIOMetaTestDriver + testMetaCommand + -ExpectedFailStatus + 1 + -sum + 107 + -r1c_rs + StringValue1 + StringValue2 + StringValue3 + -r2_ri + -o1_ri + 1 + -o2_ri + 99) +itk_add_test( + NAME + MetaCommandRequiredAndOptionalOptoinsWithArgumentsMissing + COMMAND + ITKIOMetaTestDriver + testMetaCommand + -ExpectedFailStatus + 1 + -sum + 207 + -r1c_rs + StringValue1 + StringValue2 + StringValue3 + -r2_ri + 7 + -o3_ri_oi) +itk_add_test( + NAME + testMetaArray + COMMAND + ITKIOMetaTestDriver + testMetaArray + ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkMetaImageStreamingIOTest + COMMAND + ITKIOMetaTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeStreamed.mhd + itkMetaImageStreamingIOTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeStreamed.mhd) +itk_add_test( + NAME + itkMetaImageCompressedStreamingIOTest + COMMAND + ITKIOMetaTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeCompressedStreamed.mha + itkMetaImageStreamingIOTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeCompressed.mha} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeCompressedStreamed.mha) +itk_add_test( + NAME + itkMetaImageStreamingWriterIOTest + COMMAND + ITKIOMetaTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/MetaImageStreamingWriterIOTest.mha + itkMetaImageStreamingWriterIOTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/MetaImageStreamingWriterIOTest.mha) # The data contained in ${ITK_DATA_ROOT}/Input/DicomSeries/ # is required by mri3D.mhd: @@ -126,66 +392,110 @@ itk_add_test(NAME itkMetaImageStreamingWriterIOTest # Since DATA{} does not allow to specify an associated # file that is in a different directory, we call ExternalData_Expand_Arguments # manually to download the required files. -ExternalData_Expand_Arguments(ITKData - ExpandedData - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm} - ) +ExternalData_expand_arguments(ITKData ExpandedData DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm}) -itk_add_test(NAME itkMetaImageStreamingWriterIOTest2 - COMMAND ITKIOMetaTestDriver - --compare DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} - ${ITK_TEST_OUTPUT_DIR}/mri3DWriteStreamed.mha - itkMetaImageStreamingWriterIOTest DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} ${ITK_TEST_OUTPUT_DIR}/mri3DWriteStreamed.mha) +itk_add_test( + NAME + itkMetaImageStreamingWriterIOTest2 + COMMAND + ITKIOMetaTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} + ${ITK_TEST_OUTPUT_DIR}/mri3DWriteStreamed.mha + itkMetaImageStreamingWriterIOTest + DATA{${ITK_DATA_ROOT}/Input/mri3D.mhd} + ${ITK_TEST_OUTPUT_DIR}/mri3DWriteStreamed.mha) -itk_add_test(NAME itkMetaTestLongFilename COMMAND ITKIOMetaTestDriver itkMetaTestLongFilename) +itk_add_test( + NAME + itkMetaTestLongFilename + COMMAND + ITKIOMetaTestDriver + itkMetaTestLongFilename) if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 5) # Image of 1.67 Gigabytes (pixels size is 16bits) - itk_add_test(NAME itkLargeMetaImageWriteReadTest1 - COMMAND ITKIOMetaTestDriver - itkLargeMetaImageWriteReadTest ${ITK_TEST_OUTPUT_DIR}/LargeImage01.mhd 30000L) + itk_add_test( + NAME + itkLargeMetaImageWriteReadTest1 + COMMAND + ITKIOMetaTestDriver + itkLargeMetaImageWriteReadTest + ${ITK_TEST_OUTPUT_DIR}/LargeImage01.mhd + 30000L) # Image of 2.98 Gigabytes (pixels size is 16bits) - itk_add_test(NAME itkLargeMetaImageWriteReadTest2 - COMMAND ITKIOMetaTestDriver - itkLargeMetaImageWriteReadTest ${ITK_TEST_OUTPUT_DIR}/LargeImage02.mhd 40000L) + itk_add_test( + NAME + itkLargeMetaImageWriteReadTest2 + COMMAND + ITKIOMetaTestDriver + itkLargeMetaImageWriteReadTest + ${ITK_TEST_OUTPUT_DIR}/LargeImage02.mhd + 40000L) # Image of 4.9 Gigabytes (pixels size is 8-bits out and 16-bit in) - itk_add_test(NAME itkLargeMetaImageWriteReadTest3 - COMMAND ITKIOMetaTestDriver - itkLargeMetaImageWriteReadTest ${ITK_TEST_OUTPUT_DIR}/LargeImage03.mhd 50000L) + itk_add_test( + NAME + itkLargeMetaImageWriteReadTest3 + COMMAND + ITKIOMetaTestDriver + itkLargeMetaImageWriteReadTest + ${ITK_TEST_OUTPUT_DIR}/LargeImage03.mhd + 50000L) # Due to the large memory requirements this tests must be run one by one - set_tests_properties(itkLargeMetaImageWriteReadTest1 - itkLargeMetaImageWriteReadTest2 - itkLargeMetaImageWriteReadTest3 - PROPERTIES - LABELS BigIO - RESOURCE_LOCK MEMORY_SIZE - COST 10 - ) - set_property(TEST itkLargeMetaImageWriteReadTest1 APPEND PROPERTY LABELS RUNS_LONG) - set_property(TEST itkLargeMetaImageWriteReadTest2 APPEND PROPERTY LABELS RUNS_LONG) - set_property(TEST itkLargeMetaImageWriteReadTest3 APPEND PROPERTY LABELS RUNS_LONG) + set_tests_properties( + itkLargeMetaImageWriteReadTest1 itkLargeMetaImageWriteReadTest2 itkLargeMetaImageWriteReadTest3 + PROPERTIES LABELS + BigIO + RESOURCE_LOCK + MEMORY_SIZE + COST + 10) + set_property( + TEST itkLargeMetaImageWriteReadTest1 + APPEND + PROPERTY LABELS RUNS_LONG) + set_property( + TEST itkLargeMetaImageWriteReadTest2 + APPEND + PROPERTY LABELS RUNS_LONG) + set_property( + TEST itkLargeMetaImageWriteReadTest3 + APPEND + PROPERTY LABELS RUNS_LONG) endif() - if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 12) # Image of 9.12 Gigabytes (pixels size is 16bits) - itk_add_test(NAME itkLargeMetaImageWriteReadTest4 - COMMAND ITKIOMetaTestDriver - itkLargeMetaImageWriteReadTest ${ITK_TEST_OUTPUT_DIR}/LargeImage04.mhd 70000L) + itk_add_test( + NAME + itkLargeMetaImageWriteReadTest4 + COMMAND + ITKIOMetaTestDriver + itkLargeMetaImageWriteReadTest + ${ITK_TEST_OUTPUT_DIR}/LargeImage04.mhd + 70000L) # Due to the large memory requirements this tests must be run one by one - set_tests_properties(itkLargeMetaImageWriteReadTest4 - PROPERTIES - LABELS BigIO - RESOURCE_LOCK MEMORY_SIZE - COST 30 - ) - set_property(TEST itkLargeMetaImageWriteReadTest4 APPEND PROPERTY LABELS RUNS_LONG) - set_property(TEST itkLargeMetaImageWriteReadTest4 APPEND PROPERTY RUN_SERIAL True) + set_tests_properties( + itkLargeMetaImageWriteReadTest4 + PROPERTIES LABELS + BigIO + RESOURCE_LOCK + MEMORY_SIZE + COST + 30) + set_property( + TEST itkLargeMetaImageWriteReadTest4 + APPEND + PROPERTY LABELS RUNS_LONG) + set_property( + TEST itkLargeMetaImageWriteReadTest4 + APPEND + PROPERTY RUN_SERIAL True) endif() diff --git a/Modules/IO/NIFTI/itk-module.cmake b/Modules/IO/NIFTI/itk-module.cmake index ca7815ec3ca..abe16fa2315 100644 --- a/Modules/IO/NIFTI/itk-module.cmake +++ b/Modules/IO/NIFTI/itk-module.cmake @@ -1,19 +1,19 @@ set(DOCUMENTATION "This modules contains an ImageIO class to read or write the nifti medical image format.") -itk_module(ITKIONIFTI +itk_module( + ITKIONIFTI ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase PRIVATE_DEPENDS - ITKTransform - ITKNIFTI + ITKTransform + ITKNIFTI TEST_DEPENDS - ITKTestKernel - ITKNIFTI - ITKTransform + ITKTestKernel + ITKNIFTI + ITKTransform FACTORY_NAMES - ImageIO::Nifti + ImageIO::Nifti DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/NIFTI/src/CMakeLists.txt b/Modules/IO/NIFTI/src/CMakeLists.txt index 3362475b03a..22759110e78 100644 --- a/Modules/IO/NIFTI/src/CMakeLists.txt +++ b/Modules/IO/NIFTI/src/CMakeLists.txt @@ -1,9 +1,6 @@ configure_file(itkNiftiImageIOConfigurePrivate.h.in itkNiftiImageIOConfigurePrivate.h @ONLY) include_directories("${CMAKE_CURRENT_BINARY_DIR}") -set(ITKIONIFTI_SRCS - itkNiftiImageIOFactory.cxx - itkNiftiImageIO.cxx - ) +set(ITKIONIFTI_SRCS itkNiftiImageIOFactory.cxx itkNiftiImageIO.cxx) itk_module_add_library(ITKIONIFTI ${ITKIONIFTI_SRCS}) diff --git a/Modules/IO/NIFTI/test/CMakeLists.txt b/Modules/IO/NIFTI/test/CMakeLists.txt index 6c7a91247be..fc5f7a57c27 100644 --- a/Modules/IO/NIFTI/test/CMakeLists.txt +++ b/Modules/IO/NIFTI/test/CMakeLists.txt @@ -1,128 +1,270 @@ itk_module_test() set(ITKIONIFTITests -itkNiftiImageIOTest.cxx -itkNiftiImageIOTest2.cxx -itkNiftiImageIOTest3.cxx -itkNiftiImageIOTest4.cxx -itkNiftiImageIOTest5.cxx -itkNiftiImageIOTest6.cxx -itkNiftiImageIOTest7.cxx -itkNiftiImageIOTest8.cxx -itkNiftiImageIOTest9.cxx -itkNiftiImageIOTest10.cxx -itkNiftiImageIOTest11.cxx -itkNiftiImageIOTest12.cxx -itkNiftiImageIOTest13.cxx -itkNiftiLargeImageRegionReadTest.cxx -itkNiftiReadAnalyzeTest.cxx -itkNiftiReadWriteDirectionTest.cxx -itkExtractSlice.cxx -itkNiftiWriteCoerceOrthogonalDirectionTest.cxx -) + itkNiftiImageIOTest.cxx + itkNiftiImageIOTest2.cxx + itkNiftiImageIOTest3.cxx + itkNiftiImageIOTest4.cxx + itkNiftiImageIOTest5.cxx + itkNiftiImageIOTest6.cxx + itkNiftiImageIOTest7.cxx + itkNiftiImageIOTest8.cxx + itkNiftiImageIOTest9.cxx + itkNiftiImageIOTest10.cxx + itkNiftiImageIOTest11.cxx + itkNiftiImageIOTest12.cxx + itkNiftiImageIOTest13.cxx + itkNiftiLargeImageRegionReadTest.cxx + itkNiftiReadAnalyzeTest.cxx + itkNiftiReadWriteDirectionTest.cxx + itkExtractSlice.cxx + itkNiftiWriteCoerceOrthogonalDirectionTest.cxx) # For itkNiftiImageIOTest.h. include_directories(${ITKIONIFTI_SOURCE_DIR}/test) -add_library(ITKIONIFTI-TestSupport itkNiftiImageIOTestHelper.cxx) +add_library(ITKIONIFTI-TestSupport itkNiftiImageIOTestHelper.cxx) itk_module_target_label(ITKIONIFTI-TestSupport) target_link_libraries(ITKIONIFTI-TestSupport LINK_PUBLIC ${ITKIONIFTI-Test_LIBRARIES}) list(APPEND ITKIONIFTI-Test_LIBRARIES ITKIONIFTI-TestSupport) -CreateTestDriver(ITKIONIFTI "${ITKIONIFTI-Test_LIBRARIES}" "${ITKIONIFTITests}") +createtestdriver(ITKIONIFTI "${ITKIONIFTI-Test_LIBRARIES}" "${ITKIONIFTITests}") -itk_add_test(NAME itkNiftisform2DirectionDef.nii.gz - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest - ${ITK_TEST_OUTPUT_DIR} DATA{${ITK_DATA_ROOT}/Input/itkNiftisform2DirectionDef.nii.gz}) +itk_add_test( + NAME + itkNiftisform2DirectionDef.nii.gz + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest + ${ITK_TEST_OUTPUT_DIR} + DATA{${ITK_DATA_ROOT}/Input/itkNiftisform2DirectionDef.nii.gz}) -itk_add_test(NAME itkNiftiIOBigEndianCompressed.hdr - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest - ${ITK_TEST_OUTPUT_DIR} itkNiftiIOBigEndianCompressed.hdr DATA{${ITK_DATA_ROOT}/Input/BigEndianCompressed.hdr}) -itk_add_test(NAME itkNiftiIOBigEndianCompressed.img - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest - ${ITK_TEST_OUTPUT_DIR} itkNiftiIOBigEndianCompressed.img DATA{${ITK_DATA_ROOT}/Input/BigEndianCompressed.img}) -itk_add_test(NAME itkNiftiIOBigEndianCompressed.img.gz - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest - ${ITK_TEST_OUTPUT_DIR} itkNiftiIOBigEndianCompressed.img.gz DATA{${ITK_DATA_ROOT}/Input/BigEndianCompressed.img.gz}) -itk_add_test(NAME itkNiftiIOBigEndian - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest - ${ITK_TEST_OUTPUT_DIR} itkNiftiIOBigEndian DATA{${ITK_DATA_ROOT}/Input/BigEndian.hdr,BigEndian.mhd,BigEndian.img}) -itk_add_test(NAME itkNiftiIOLittleEndianCompressed - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest - ${ITK_TEST_OUTPUT_DIR} itkNiftiImageIOTest DATA{${ITK_DATA_ROOT}/Input/LittleEndianCompressed.hdr,LittleEndianCompressed.img.gz}) -itk_add_test(NAME itkNiftiIOLittleEndian - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest - ${ITK_TEST_OUTPUT_DIR} itkNiftiIOLittleEndian DATA{${ITK_DATA_ROOT}/Input/LittleEndian.hdr,LittleEndian.mhd,LittleEndian.img}) -itk_add_test(NAME itkNiftiIOInternalTests - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest - ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkNiftiIOShouldFail - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest2 - ${ITK_TEST_OUTPUT_DIR} itkNiftiIOShouldFail false DATA{${ITK_DATA_ROOT}/Input/ramp.gipl}) -itk_add_test(NAME itkNiftiIOShouldSucceed - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest2 - ${ITK_TEST_OUTPUT_DIR} itkNiftiIOShouldSucceed true DATA{${ITK_DATA_ROOT}/Input/LittleEndian.hdr,LittleEndian.mhd,LittleEndian.img}) -itk_add_test(NAME itkDirCosinesTest - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest4 ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkNiftiSlopeInterceptTest - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest5 ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkNiftiVectorImageTest2 - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest6 ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkNiftiDiffusionTensor3dImageTest - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest7 ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkNiftiSymmetricSecondRankTensorImageTest - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest8 ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkNiftiRGBImageTest - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest9 ${ITK_TEST_OUTPUT_DIR} RGBImage.nii.gz) -itk_add_test(NAME itkNiftiRGBAImageTest - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest10 ${ITK_TEST_OUTPUT_DIR} RGBAImage.nii.gz) -itk_add_test(NAME itkNiftiVectorImageTest - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest3 ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkNiftiDimensionLimitsTest - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest11 ${ITK_TEST_OUTPUT_DIR} SizeFailure.nii.gz) -itk_add_test(NAME itkNiftiLargeRGBTest - COMMAND ITKIONIFTITestDriver itkNiftiImageIOTest12 ${ITK_TEST_OUTPUT_DIR} LargeRGBImage.nii.gz) -itk_add_test(NAME itkNiftiReadAnalyzeTest - COMMAND ITKIONIFTITestDriver itkNiftiReadAnalyzeTest ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkExtractSliceSlopeInterceptUCHAR - COMMAND ITKIONIFTITestDriver --compare DATA{Baseline/SlopeInterceptUCHAR-midSlice.nrrd} ${ITK_TEST_OUTPUT_DIR}/SlopeInterceptUCHAR-midSlice.nrrd - itkExtractSlice DATA{Input/SlopeInterceptUCHAR.nii.gz} ${ITK_TEST_OUTPUT_DIR}/SlopeInterceptUCHAR-midSlice.nrrd) +itk_add_test( + NAME + itkNiftiIOBigEndianCompressed.hdr + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest + ${ITK_TEST_OUTPUT_DIR} + itkNiftiIOBigEndianCompressed.hdr + DATA{${ITK_DATA_ROOT}/Input/BigEndianCompressed.hdr}) +itk_add_test( + NAME + itkNiftiIOBigEndianCompressed.img + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest + ${ITK_TEST_OUTPUT_DIR} + itkNiftiIOBigEndianCompressed.img + DATA{${ITK_DATA_ROOT}/Input/BigEndianCompressed.img}) +itk_add_test( + NAME + itkNiftiIOBigEndianCompressed.img.gz + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest + ${ITK_TEST_OUTPUT_DIR} + itkNiftiIOBigEndianCompressed.img.gz + DATA{${ITK_DATA_ROOT}/Input/BigEndianCompressed.img.gz}) +itk_add_test( + NAME + itkNiftiIOBigEndian + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest + ${ITK_TEST_OUTPUT_DIR} + itkNiftiIOBigEndian + DATA{${ITK_DATA_ROOT}/Input/BigEndian.hdr,BigEndian.mhd,BigEndian.img}) +itk_add_test( + NAME + itkNiftiIOLittleEndianCompressed + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest + ${ITK_TEST_OUTPUT_DIR} + itkNiftiImageIOTest + DATA{${ITK_DATA_ROOT}/Input/LittleEndianCompressed.hdr,LittleEndianCompressed.img.gz}) +itk_add_test( + NAME + itkNiftiIOLittleEndian + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest + ${ITK_TEST_OUTPUT_DIR} + itkNiftiIOLittleEndian + DATA{${ITK_DATA_ROOT}/Input/LittleEndian.hdr,LittleEndian.mhd,LittleEndian.img}) +itk_add_test( + NAME + itkNiftiIOInternalTests + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest + ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkNiftiIOShouldFail + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest2 + ${ITK_TEST_OUTPUT_DIR} + itkNiftiIOShouldFail + false + DATA{${ITK_DATA_ROOT}/Input/ramp.gipl}) +itk_add_test( + NAME + itkNiftiIOShouldSucceed + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest2 + ${ITK_TEST_OUTPUT_DIR} + itkNiftiIOShouldSucceed + true + DATA{${ITK_DATA_ROOT}/Input/LittleEndian.hdr,LittleEndian.mhd,LittleEndian.img}) +itk_add_test( + NAME + itkDirCosinesTest + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest4 + ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkNiftiSlopeInterceptTest + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest5 + ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkNiftiVectorImageTest2 + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest6 + ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkNiftiDiffusionTensor3dImageTest + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest7 + ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkNiftiSymmetricSecondRankTensorImageTest + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest8 + ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkNiftiRGBImageTest + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest9 + ${ITK_TEST_OUTPUT_DIR} + RGBImage.nii.gz) +itk_add_test( + NAME + itkNiftiRGBAImageTest + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest10 + ${ITK_TEST_OUTPUT_DIR} + RGBAImage.nii.gz) +itk_add_test( + NAME + itkNiftiVectorImageTest + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest3 + ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkNiftiDimensionLimitsTest + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest11 + ${ITK_TEST_OUTPUT_DIR} + SizeFailure.nii.gz) +itk_add_test( + NAME + itkNiftiLargeRGBTest + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest12 + ${ITK_TEST_OUTPUT_DIR} + LargeRGBImage.nii.gz) +itk_add_test( + NAME + itkNiftiReadAnalyzeTest + COMMAND + ITKIONIFTITestDriver + itkNiftiReadAnalyzeTest + ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkExtractSliceSlopeInterceptUCHAR + COMMAND + ITKIONIFTITestDriver + --compare + DATA{Baseline/SlopeInterceptUCHAR-midSlice.nrrd} + ${ITK_TEST_OUTPUT_DIR}/SlopeInterceptUCHAR-midSlice.nrrd + itkExtractSlice + DATA{Input/SlopeInterceptUCHAR.nii.gz} + ${ITK_TEST_OUTPUT_DIR}/SlopeInterceptUCHAR-midSlice.nrrd) -itk_add_test(NAME itkNiftiReadWriteDirectionTest - COMMAND ITKIONIFTITestDriver itkNiftiReadWriteDirectionTest - DATA{${ITK_DATA_ROOT}/Input/LPSLabels.nii.gz} - DATA{${ITK_DATA_ROOT}/Input/LPSLabels_noqform.nii.gz} - DATA{${ITK_DATA_ROOT}/Input/LPSLabels_nosform.nii.gz} - DATA{${ITK_DATA_ROOT}/Input/NonOrthoSform.nii.gz} - ${ITK_TEST_OUTPUT_DIR} - ) +itk_add_test( + NAME + itkNiftiReadWriteDirectionTest + COMMAND + ITKIONIFTITestDriver + itkNiftiReadWriteDirectionTest + DATA{${ITK_DATA_ROOT}/Input/LPSLabels.nii.gz} + DATA{${ITK_DATA_ROOT}/Input/LPSLabels_noqform.nii.gz} + DATA{${ITK_DATA_ROOT}/Input/LPSLabels_nosform.nii.gz} + DATA{${ITK_DATA_ROOT}/Input/NonOrthoSform.nii.gz} + ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkNiftiReadWriteDirectionSmallVoxelTest - COMMAND ITKIONIFTITestDriver itkNiftiReadWriteDirectionTest - DATA{Input/SmallVoxels.nii.gz} - DATA{Input/SmallVoxels_noqform.nii.gz} - DATA{Input/SmallVoxels_nosform.nii.gz} - DATA{Input/SmallVoxelsNonOrthoSform.nii.gz} - ${ITK_TEST_OUTPUT_DIR} - ) +itk_add_test( + NAME + itkNiftiReadWriteDirectionSmallVoxelTest + COMMAND + ITKIONIFTITestDriver + itkNiftiReadWriteDirectionTest + DATA{Input/SmallVoxels.nii.gz} + DATA{Input/SmallVoxels_noqform.nii.gz} + DATA{Input/SmallVoxels_nosform.nii.gz} + DATA{Input/SmallVoxelsNonOrthoSform.nii.gz} + ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkNiftiSmallVoxelsAffinePrecisionTest - COMMAND ITKIONIFTITestDriver - itkNiftiImageIOTest13 - DATA{Input/SmallVoxels_AffinePrecision.nii.gz} - ) +itk_add_test( + NAME + itkNiftiSmallVoxelsAffinePrecisionTest + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest13 + DATA{Input/SmallVoxels_AffinePrecision.nii.gz}) -itk_add_test(NAME itkNiftiQFormSFormDifferentSpacingTest - COMMAND ITKIONIFTITestDriver - itkNiftiImageIOTest13 - DATA{Input/ChickenEgg-zeros.nii.gz} - ) +itk_add_test( + NAME + itkNiftiQFormSFormDifferentSpacingTest + COMMAND + ITKIONIFTITestDriver + itkNiftiImageIOTest13 + DATA{Input/ChickenEgg-zeros.nii.gz}) -itk_add_test(NAME itkNiftiLargeImageRegionReadTest - COMMAND ITKIONIFTITestDriver itkNiftiLargeImageRegionReadTest - ${ITK_TEST_OUTPUT_DIR}/itkNiftiLargeImageRegionReadTest.nii.gz) +itk_add_test( + NAME + itkNiftiLargeImageRegionReadTest + COMMAND + ITKIONIFTITestDriver + itkNiftiLargeImageRegionReadTest + ${ITK_TEST_OUTPUT_DIR}/itkNiftiLargeImageRegionReadTest.nii.gz) -itk_add_test(NAME itkNiftiWriteCoerceOrthogonalDirectionTest - COMMAND ITKIONIFTITestDriver itkNiftiWriteCoerceOrthogonalDirectionTest - ${ITK_TEST_OUTPUT_DIR} - ) +itk_add_test( + NAME + itkNiftiWriteCoerceOrthogonalDirectionTest + COMMAND + ITKIONIFTITestDriver + itkNiftiWriteCoerceOrthogonalDirectionTest + ${ITK_TEST_OUTPUT_DIR}) diff --git a/Modules/IO/NRRD/itk-module.cmake b/Modules/IO/NRRD/itk-module.cmake index 49c41fbe1a5..b62a9a74ce9 100644 --- a/Modules/IO/NRRD/itk-module.cmake +++ b/Modules/IO/NRRD/itk-module.cmake @@ -1,17 +1,18 @@ -set(DOCUMENTATION "This module contains an ImageIO class to read and write the +set(DOCUMENTATION + "This module contains an ImageIO class to read and write the Nearly Raw Raster Data (NRRD) medical image format.") -itk_module(ITKIONRRD +itk_module( + ITKIONRRD ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase PRIVATE_DEPENDS - ITKNrrdIO + ITKNrrdIO TEST_DEPENDS - ITKTestKernel + ITKTestKernel FACTORY_NAMES - ImageIO::Nrrd + ImageIO::Nrrd DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/NRRD/src/CMakeLists.txt b/Modules/IO/NRRD/src/CMakeLists.txt index ca041276dbb..82e26bc0e38 100644 --- a/Modules/IO/NRRD/src/CMakeLists.txt +++ b/Modules/IO/NRRD/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIONRRD_SRCS - itkNrrdImageIOFactory.cxx - itkNrrdImageIO.cxx - ) +set(ITKIONRRD_SRCS itkNrrdImageIOFactory.cxx itkNrrdImageIO.cxx) itk_module_add_library(ITKIONRRD ${ITKIONRRD_SRCS}) diff --git a/Modules/IO/NRRD/test/CMakeLists.txt b/Modules/IO/NRRD/test/CMakeLists.txt index 8e5476ee376..317ab1dd510 100644 --- a/Modules/IO/NRRD/test/CMakeLists.txt +++ b/Modules/IO/NRRD/test/CMakeLists.txt @@ -1,161 +1,327 @@ itk_module_test() set(ITKIONRRDTests -itkNrrdImageIOTest.cxx -itkNrrdComplexImageReadTest.cxx -itkNrrdComplexImageReadWriteTest.cxx -itkNrrdCovariantVectorImageReadTest.cxx -itkNrrdCovariantVectorImageReadWriteTest.cxx -itkNrrdDiffusionTensor3DImageReadTensorDoubleWriteTensorDoubleTest.cxx -itkNrrdDiffusionTensor3DImageReadTest.cxx -itkNrrdDiffusionTensor3DImageReadWriteTest.cxx -itkNrrdImageReadWriteTest.cxx -itkNrrdRGBAImageReadWriteTest.cxx -itkNrrdRGBImageReadWriteTest.cxx -itkNrrdVectorImageReadTest.cxx -itkNrrdVectorImageReadWriteTest.cxx -itkNrrdMetaDataTest.cxx -) + itkNrrdImageIOTest.cxx + itkNrrdComplexImageReadTest.cxx + itkNrrdComplexImageReadWriteTest.cxx + itkNrrdCovariantVectorImageReadTest.cxx + itkNrrdCovariantVectorImageReadWriteTest.cxx + itkNrrdDiffusionTensor3DImageReadTensorDoubleWriteTensorDoubleTest.cxx + itkNrrdDiffusionTensor3DImageReadTest.cxx + itkNrrdDiffusionTensor3DImageReadWriteTest.cxx + itkNrrdImageReadWriteTest.cxx + itkNrrdRGBAImageReadWriteTest.cxx + itkNrrdRGBImageReadWriteTest.cxx + itkNrrdVectorImageReadTest.cxx + itkNrrdVectorImageReadWriteTest.cxx + itkNrrdMetaDataTest.cxx) # For itkNrrdImageIOTest.h. include_directories(${ITKIONRRD_SOURCE_DIR}) -CreateTestDriver(ITKIONRRD "${ITKIONRRD-Test_LIBRARIES}" "${ITKIONRRDTests}") +createtestdriver(ITKIONRRD "${ITKIONRRD-Test_LIBRARIES}" "${ITKIONRRDTests}") -itk_add_test(NAME itkNrrdImageIOTest1 - COMMAND ITKIONRRDTestDriver --redirectOutput ${ITK_TEST_OUTPUT_DIR}/itkNrrdImageIOTest1.txt - itkNrrdImageIOTest - ${ITK_TEST_OUTPUT_DIR}/testNrrd.nrrd) -set_tests_properties(itkNrrdImageIOTest1 PROPERTIES ATTACHED_FILES_ON_FAIL ${ITK_TEST_OUTPUT_DIR}/itkNrrdImageIOTest1.txt) +itk_add_test( + NAME + itkNrrdImageIOTest1 + COMMAND + ITKIONRRDTestDriver + --redirectOutput + ${ITK_TEST_OUTPUT_DIR}/itkNrrdImageIOTest1.txt + itkNrrdImageIOTest + ${ITK_TEST_OUTPUT_DIR}/testNrrd.nrrd) +set_tests_properties(itkNrrdImageIOTest1 PROPERTIES ATTACHED_FILES_ON_FAIL + ${ITK_TEST_OUTPUT_DIR}/itkNrrdImageIOTest1.txt) -itk_add_test(NAME itkNrrdImageIOTest2 - COMMAND ITKIONRRDTestDriver --redirectOutput ${ITK_TEST_OUTPUT_DIR}/itkNrrdImageIOTest2.txt - itkNrrdImageIOTest - ${ITK_TEST_OUTPUT_DIR}/testNrrd.nhdr) -set_tests_properties(itkNrrdImageIOTest2 PROPERTIES ATTACHED_FILES_ON_FAIL ${ITK_TEST_OUTPUT_DIR}/itkNrrdImageIOTest2.txt) +itk_add_test( + NAME + itkNrrdImageIOTest2 + COMMAND + ITKIONRRDTestDriver + --redirectOutput + ${ITK_TEST_OUTPUT_DIR}/itkNrrdImageIOTest2.txt + itkNrrdImageIOTest + ${ITK_TEST_OUTPUT_DIR}/testNrrd.nhdr) +set_tests_properties(itkNrrdImageIOTest2 PROPERTIES ATTACHED_FILES_ON_FAIL + ${ITK_TEST_OUTPUT_DIR}/itkNrrdImageIOTest2.txt) -itk_add_test(NAME itkNrrdComplexImageReadTest - COMMAND ITKIONRRDTestDriver itkNrrdComplexImageReadTest - DATA{${ITK_DATA_ROOT}/Input/mini-complex-slow.nrrd}) -itk_add_test(NAME itkNrrdComplexImageReadWriteTest - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/mini-complex-fast.nrrd} - ${ITK_TEST_OUTPUT_DIR}/mini-complex.nrrd - itkNrrdComplexImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/mini-complex-slow.nrrd} ${ITK_TEST_OUTPUT_DIR}/mini-complex.nrrd) -itk_add_test(NAME itkNrrdCovariantVectorImageReadTest - COMMAND ITKIONRRDTestDriver itkNrrdCovariantVectorImageReadTest - DATA{${ITK_DATA_ROOT}/Input/mini-covector-fast.nrrd}) -itk_add_test(NAME itkNrrdCovariantVectorImageReadWriteTest - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/mini-covector.nrrd} - ${ITK_TEST_OUTPUT_DIR}/mini-covector.nrrd - itkNrrdCovariantVectorImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/mini-covector-slow.nrrd} ${ITK_TEST_OUTPUT_DIR}/mini-covector.nrrd) -itk_add_test(NAME itkNrrdDiffusionTensor3DImageReadTensorDoubleWriteTensorDouble - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/small-tensors-double.nrrd} - ${ITK_TEST_OUTPUT_DIR}/small-tensors-double.nrrd - itkNrrdDiffusionTensor3DImageReadTensorDoubleWriteTensorDoubleTest DATA{${ITK_DATA_ROOT}/Input/small-tensors.nhdr,small-tensors.raw} ${ITK_TEST_OUTPUT_DIR}/small-tensors-double.nrrd) -itk_add_test(NAME itkNrrdDiffusionTensor3DImageReadTest1 - COMMAND ITKIONRRDTestDriver itkNrrdDiffusionTensor3DImageReadTest - DATA{${ITK_DATA_ROOT}/Input/mini-ten-mask.nrrd}) -itk_add_test(NAME itkNrrdDiffusionTensor3DImageReadTest2 - COMMAND ITKIONRRDTestDriver itkNrrdDiffusionTensor3DImageReadTest - DATA{${ITK_DATA_ROOT}/Input/mini-ten-nomask-fast.nrrd}) -itk_add_test(NAME itkNrrdDiffusionTensor3DImageReadTest3 - COMMAND ITKIONRRDTestDriver itkNrrdDiffusionTensor3DImageReadTest - DATA{${ITK_DATA_ROOT}/Input/mini-ten-nomask-slow.nrrd}) -itk_add_test(NAME itkNrrdDiffusionTensor3DImageReadWriteTest - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/mini-ten.nrrd} - ${ITK_TEST_OUTPUT_DIR}/mini-ten.nrrd - itkNrrdDiffusionTensor3DImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/mini-ten-nomask-fast.nrrd} ${ITK_TEST_OUTPUT_DIR}/mini-ten.nrrd) -itk_add_test(NAME itkNrrdDiffusionTensor3DImageReadWriteTest4 - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/small-tensors.nhdr,small-tensors.raw} - ${ITK_TEST_OUTPUT_DIR}/small-tensors.nhdr - itkNrrdDiffusionTensor3DImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/small-tensors.nhdr} ${ITK_TEST_OUTPUT_DIR}/small-tensors.nhdr) -itk_add_test(NAME itkNrrdImageReadWriteTest1 - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/NrrdImageReadWriteTest1.nrrd} - ${ITK_TEST_OUTPUT_DIR}/box.nrrd - itkNrrdImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/box.nhdr,box.raw} ${ITK_TEST_OUTPUT_DIR}/box.nrrd) -itk_add_test(NAME itkNrrdImageReadWriteTest2 - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} - ${ITK_TEST_OUTPUT_DIR}/vol2.nrrd - itkNrrdImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/vol-ascii.nrrd} ${ITK_TEST_OUTPUT_DIR}/vol2.nrrd) -itk_add_test(NAME itkNrrdImageReadWriteTest3 - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} - ${ITK_TEST_OUTPUT_DIR}/vol3.nrrd - itkNrrdImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/vol-raw-big.nrrd} ${ITK_TEST_OUTPUT_DIR}/vol3.nrrd) -itk_add_test(NAME itkNrrdImageReadWriteTest4 - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} - ${ITK_TEST_OUTPUT_DIR}/vol4.nrrd - itkNrrdImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/vol-raw-little.nrrd} ${ITK_TEST_OUTPUT_DIR}/vol4.nrrd) -itk_add_test(NAME itkNrrdImageReadWriteTest5 - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} - ${ITK_TEST_OUTPUT_DIR}/vol5.nrrd - itkNrrdImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/vol-gzip-big.nrrd} ${ITK_TEST_OUTPUT_DIR}/vol5.nrrd) -itk_add_test(NAME itkNrrdImageReadWriteTest6 - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} - ${ITK_TEST_OUTPUT_DIR}/vol6.nrrd - itkNrrdImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/vol-gzip-little.nrrd} ${ITK_TEST_OUTPUT_DIR}/vol6.nrrd) -itk_add_test(NAME itkNrrdImageReadWriteTest7 - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} - ${ITK_TEST_OUTPUT_DIR}/vol7.nrrd - itkNrrdImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/vol-ascii.nhdr,vol-ascii.ascii} ${ITK_TEST_OUTPUT_DIR}/vol7.nrrd) -itk_add_test(NAME itkNrrdImageReadWriteTest8 - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} - ${ITK_TEST_OUTPUT_DIR}/vol8.nrrd - itkNrrdImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/vol-raw-big.nhdr,vol-raw-big.raw} ${ITK_TEST_OUTPUT_DIR}/vol8.nrrd) -itk_add_test(NAME itkNrrdImageReadWriteTest9 - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} - ${ITK_TEST_OUTPUT_DIR}/vol9.nrrd - itkNrrdImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/vol-raw-little.nhdr,vol-raw-little.raw} ${ITK_TEST_OUTPUT_DIR}/vol9.nrrd) -itk_add_test(NAME itkNrrdImageReadWriteTest10 - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} - ${ITK_TEST_OUTPUT_DIR}/vol10.nrrd - itkNrrdImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/vol-gzip-big.nhdr,vol-gzip-big.raw.gz} ${ITK_TEST_OUTPUT_DIR}/vol10.nrrd) -itk_add_test(NAME itkNrrdImageReadWriteTest11 - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} - ${ITK_TEST_OUTPUT_DIR}/vol11.nrrd - itkNrrdImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/vol-gzip-little.nhdr,vol-gzip-little.raw.gz} ${ITK_TEST_OUTPUT_DIR}/vol11.nrrd) -itk_add_test(NAME itkNrrdRGBAImageReadWriteTest - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/NrrdRGBAImageReadWriteTest.png} - ${ITK_TEST_OUTPUT_DIR}/NrrdRGBAImageReadWriteTest.png - itkNrrdRGBAImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/testrgba.nrrd} ${ITK_TEST_OUTPUT_DIR}/NrrdRGBAImageReadWriteTest.png) -itk_add_test(NAME itkNrrdRGBImageReadWriteTest0 - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/NrrdRGBImageReadWriteTest0.png} - ${ITK_TEST_OUTPUT_DIR}/NrrdRGBImageReadWriteTest0.png - itkNrrdRGBImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/testrgb-0.nhdr,testrgb-0.raw} ${ITK_TEST_OUTPUT_DIR}/NrrdRGBImageReadWriteTest0.png) -itk_add_test(NAME itkNrrdRGBImageReadWriteTest1 - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/NrrdRGBImageReadWriteTest1.png} - ${ITK_TEST_OUTPUT_DIR}/NrrdRGBImageReadWriteTest1.png - itkNrrdRGBImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/testrgb-1.nhdr,testrgb-1.raw} ${ITK_TEST_OUTPUT_DIR}/NrrdRGBImageReadWriteTest1.png) -itk_add_test(NAME itkNrrdRGBImageReadWriteTest2 - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/NrrdRGBImageReadWriteTest2.png} - ${ITK_TEST_OUTPUT_DIR}/NrrdRGBImageReadWriteTest2.png - itkNrrdRGBImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/testrgb-2.nhdr,testrgb-2.raw} ${ITK_TEST_OUTPUT_DIR}/NrrdRGBImageReadWriteTest2.png) -itk_add_test(NAME itkNrrdVectorImageReadTest - COMMAND ITKIONRRDTestDriver itkNrrdVectorImageReadTest - DATA{${ITK_DATA_ROOT}/Input/mini-vector-fast.nrrd}) -itk_add_test(NAME itkNrrdVectorImageReadWriteTest - COMMAND ITKIONRRDTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/mini-vector.nrrd} - ${ITK_TEST_OUTPUT_DIR}/mini-vector.nrrd - itkNrrdVectorImageReadWriteTest DATA{${ITK_DATA_ROOT}/Input/mini-vector-slow.nrrd} ${ITK_TEST_OUTPUT_DIR}/mini-vector.nrrd) +itk_add_test( + NAME + itkNrrdComplexImageReadTest + COMMAND + ITKIONRRDTestDriver + itkNrrdComplexImageReadTest + DATA{${ITK_DATA_ROOT}/Input/mini-complex-slow.nrrd}) +itk_add_test( + NAME + itkNrrdComplexImageReadWriteTest + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/mini-complex-fast.nrrd} + ${ITK_TEST_OUTPUT_DIR}/mini-complex.nrrd + itkNrrdComplexImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/mini-complex-slow.nrrd} + ${ITK_TEST_OUTPUT_DIR}/mini-complex.nrrd) +itk_add_test( + NAME + itkNrrdCovariantVectorImageReadTest + COMMAND + ITKIONRRDTestDriver + itkNrrdCovariantVectorImageReadTest + DATA{${ITK_DATA_ROOT}/Input/mini-covector-fast.nrrd}) +itk_add_test( + NAME + itkNrrdCovariantVectorImageReadWriteTest + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/mini-covector.nrrd} + ${ITK_TEST_OUTPUT_DIR}/mini-covector.nrrd + itkNrrdCovariantVectorImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/mini-covector-slow.nrrd} + ${ITK_TEST_OUTPUT_DIR}/mini-covector.nrrd) +itk_add_test( + NAME + itkNrrdDiffusionTensor3DImageReadTensorDoubleWriteTensorDouble + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/small-tensors-double.nrrd} + ${ITK_TEST_OUTPUT_DIR}/small-tensors-double.nrrd + itkNrrdDiffusionTensor3DImageReadTensorDoubleWriteTensorDoubleTest + DATA{${ITK_DATA_ROOT}/Input/small-tensors.nhdr,small-tensors.raw} + ${ITK_TEST_OUTPUT_DIR}/small-tensors-double.nrrd) +itk_add_test( + NAME + itkNrrdDiffusionTensor3DImageReadTest1 + COMMAND + ITKIONRRDTestDriver + itkNrrdDiffusionTensor3DImageReadTest + DATA{${ITK_DATA_ROOT}/Input/mini-ten-mask.nrrd}) +itk_add_test( + NAME + itkNrrdDiffusionTensor3DImageReadTest2 + COMMAND + ITKIONRRDTestDriver + itkNrrdDiffusionTensor3DImageReadTest + DATA{${ITK_DATA_ROOT}/Input/mini-ten-nomask-fast.nrrd}) +itk_add_test( + NAME + itkNrrdDiffusionTensor3DImageReadTest3 + COMMAND + ITKIONRRDTestDriver + itkNrrdDiffusionTensor3DImageReadTest + DATA{${ITK_DATA_ROOT}/Input/mini-ten-nomask-slow.nrrd}) +itk_add_test( + NAME + itkNrrdDiffusionTensor3DImageReadWriteTest + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/mini-ten.nrrd} + ${ITK_TEST_OUTPUT_DIR}/mini-ten.nrrd + itkNrrdDiffusionTensor3DImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/mini-ten-nomask-fast.nrrd} + ${ITK_TEST_OUTPUT_DIR}/mini-ten.nrrd) +itk_add_test( + NAME + itkNrrdDiffusionTensor3DImageReadWriteTest4 + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/small-tensors.nhdr,small-tensors.raw} + ${ITK_TEST_OUTPUT_DIR}/small-tensors.nhdr + itkNrrdDiffusionTensor3DImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/small-tensors.nhdr} + ${ITK_TEST_OUTPUT_DIR}/small-tensors.nhdr) +itk_add_test( + NAME + itkNrrdImageReadWriteTest1 + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/NrrdImageReadWriteTest1.nrrd} + ${ITK_TEST_OUTPUT_DIR}/box.nrrd + itkNrrdImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/box.nhdr,box.raw} + ${ITK_TEST_OUTPUT_DIR}/box.nrrd) +itk_add_test( + NAME + itkNrrdImageReadWriteTest2 + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} + ${ITK_TEST_OUTPUT_DIR}/vol2.nrrd + itkNrrdImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/vol-ascii.nrrd} + ${ITK_TEST_OUTPUT_DIR}/vol2.nrrd) +itk_add_test( + NAME + itkNrrdImageReadWriteTest3 + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} + ${ITK_TEST_OUTPUT_DIR}/vol3.nrrd + itkNrrdImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/vol-raw-big.nrrd} + ${ITK_TEST_OUTPUT_DIR}/vol3.nrrd) +itk_add_test( + NAME + itkNrrdImageReadWriteTest4 + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} + ${ITK_TEST_OUTPUT_DIR}/vol4.nrrd + itkNrrdImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/vol-raw-little.nrrd} + ${ITK_TEST_OUTPUT_DIR}/vol4.nrrd) +itk_add_test( + NAME + itkNrrdImageReadWriteTest5 + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} + ${ITK_TEST_OUTPUT_DIR}/vol5.nrrd + itkNrrdImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/vol-gzip-big.nrrd} + ${ITK_TEST_OUTPUT_DIR}/vol5.nrrd) +itk_add_test( + NAME + itkNrrdImageReadWriteTest6 + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} + ${ITK_TEST_OUTPUT_DIR}/vol6.nrrd + itkNrrdImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/vol-gzip-little.nrrd} + ${ITK_TEST_OUTPUT_DIR}/vol6.nrrd) +itk_add_test( + NAME + itkNrrdImageReadWriteTest7 + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} + ${ITK_TEST_OUTPUT_DIR}/vol7.nrrd + itkNrrdImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/vol-ascii.nhdr,vol-ascii.ascii} + ${ITK_TEST_OUTPUT_DIR}/vol7.nrrd) +itk_add_test( + NAME + itkNrrdImageReadWriteTest8 + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} + ${ITK_TEST_OUTPUT_DIR}/vol8.nrrd + itkNrrdImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/vol-raw-big.nhdr,vol-raw-big.raw} + ${ITK_TEST_OUTPUT_DIR}/vol8.nrrd) +itk_add_test( + NAME + itkNrrdImageReadWriteTest9 + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} + ${ITK_TEST_OUTPUT_DIR}/vol9.nrrd + itkNrrdImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/vol-raw-little.nhdr,vol-raw-little.raw} + ${ITK_TEST_OUTPUT_DIR}/vol9.nrrd) +itk_add_test( + NAME + itkNrrdImageReadWriteTest10 + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} + ${ITK_TEST_OUTPUT_DIR}/vol10.nrrd + itkNrrdImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/vol-gzip-big.nhdr,vol-gzip-big.raw.gz} + ${ITK_TEST_OUTPUT_DIR}/vol10.nrrd) +itk_add_test( + NAME + itkNrrdImageReadWriteTest11 + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/vol-ascii.nrrd} + ${ITK_TEST_OUTPUT_DIR}/vol11.nrrd + itkNrrdImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/vol-gzip-little.nhdr,vol-gzip-little.raw.gz} + ${ITK_TEST_OUTPUT_DIR}/vol11.nrrd) +itk_add_test( + NAME + itkNrrdRGBAImageReadWriteTest + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/NrrdRGBAImageReadWriteTest.png} + ${ITK_TEST_OUTPUT_DIR}/NrrdRGBAImageReadWriteTest.png + itkNrrdRGBAImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/testrgba.nrrd} + ${ITK_TEST_OUTPUT_DIR}/NrrdRGBAImageReadWriteTest.png) +itk_add_test( + NAME + itkNrrdRGBImageReadWriteTest0 + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/NrrdRGBImageReadWriteTest0.png} + ${ITK_TEST_OUTPUT_DIR}/NrrdRGBImageReadWriteTest0.png + itkNrrdRGBImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/testrgb-0.nhdr,testrgb-0.raw} + ${ITK_TEST_OUTPUT_DIR}/NrrdRGBImageReadWriteTest0.png) +itk_add_test( + NAME + itkNrrdRGBImageReadWriteTest1 + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/NrrdRGBImageReadWriteTest1.png} + ${ITK_TEST_OUTPUT_DIR}/NrrdRGBImageReadWriteTest1.png + itkNrrdRGBImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/testrgb-1.nhdr,testrgb-1.raw} + ${ITK_TEST_OUTPUT_DIR}/NrrdRGBImageReadWriteTest1.png) +itk_add_test( + NAME + itkNrrdRGBImageReadWriteTest2 + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/NrrdRGBImageReadWriteTest2.png} + ${ITK_TEST_OUTPUT_DIR}/NrrdRGBImageReadWriteTest2.png + itkNrrdRGBImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/testrgb-2.nhdr,testrgb-2.raw} + ${ITK_TEST_OUTPUT_DIR}/NrrdRGBImageReadWriteTest2.png) +itk_add_test( + NAME + itkNrrdVectorImageReadTest + COMMAND + ITKIONRRDTestDriver + itkNrrdVectorImageReadTest + DATA{${ITK_DATA_ROOT}/Input/mini-vector-fast.nrrd}) +itk_add_test( + NAME + itkNrrdVectorImageReadWriteTest + COMMAND + ITKIONRRDTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/mini-vector.nrrd} + ${ITK_TEST_OUTPUT_DIR}/mini-vector.nrrd + itkNrrdVectorImageReadWriteTest + DATA{${ITK_DATA_ROOT}/Input/mini-vector-slow.nrrd} + ${ITK_TEST_OUTPUT_DIR}/mini-vector.nrrd) -itk_add_test(NAME itkNrrdMetaDataTest COMMAND ITKIONRRDTestDriver itkNrrdMetaDataTest +itk_add_test( + NAME + itkNrrdMetaDataTest + COMMAND + ITKIONRRDTestDriver + itkNrrdMetaDataTest ${ITK_TEST_OUTPUT_DIR}) diff --git a/Modules/IO/PNG/itk-module.cmake b/Modules/IO/PNG/itk-module.cmake index ce5c456b018..a0d7ca112af 100644 --- a/Modules/IO/PNG/itk-module.cmake +++ b/Modules/IO/PNG/itk-module.cmake @@ -1,16 +1,16 @@ set(DOCUMENTATION "This module contains an ImageIO class for reading and writing files in the Portable Network Graphics (PNG) format.") -itk_module(ITKIOPNG +itk_module( + ITKIOPNG ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase PRIVATE_DEPENDS - ITKPNG + ITKPNG TEST_DEPENDS - ITKTestKernel + ITKTestKernel FACTORY_NAMES - ImageIO::PNG + ImageIO::PNG DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/PNG/src/CMakeLists.txt b/Modules/IO/PNG/src/CMakeLists.txt index 8a629c4ee48..4e560b12312 100644 --- a/Modules/IO/PNG/src/CMakeLists.txt +++ b/Modules/IO/PNG/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOPNG_SRCS - itkPNGImageIOFactory.cxx - itkPNGImageIO.cxx - ) +set(ITKIOPNG_SRCS itkPNGImageIOFactory.cxx itkPNGImageIO.cxx) itk_module_add_library(ITKIOPNG ${ITKIOPNG_SRCS}) diff --git a/Modules/IO/PNG/test/CMakeLists.txt b/Modules/IO/PNG/test/CMakeLists.txt index d6556f69213..6c25cfb326b 100644 --- a/Modules/IO/PNG/test/CMakeLists.txt +++ b/Modules/IO/PNG/test/CMakeLists.txt @@ -1,86 +1,198 @@ itk_module_test() set(ITKIOPNGTests -itkPNGImageIOTest.cxx -itkPNGImageIOTest2.cxx -itkPNGImageIOTest3.cxx -itkPNGImageIOTestPalette.cxx -) + itkPNGImageIOTest.cxx + itkPNGImageIOTest2.cxx + itkPNGImageIOTest3.cxx + itkPNGImageIOTestPalette.cxx) -CreateTestDriver(ITKIOPNG "${ITKIOPNG-Test_LIBRARIES}" "${ITKIOPNGTests}") - -itk_add_test(NAME itkPNGImageIOTest1Grey - COMMAND ITKIOPNGTestDriver - itkPNGImageIOTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest1Grey.png 0 4 1) -itk_add_test(NAME itkPNGImageIOTest1Color - COMMAND ITKIOPNGTestDriver - itkPNGImageIOTest DATA{${ITK_DATA_ROOT}/Input/peppers.png} ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest1Color.png 0 4 1) -itk_add_test(NAME itkPNGImageIOTest1Palette - COMMAND ITKIOPNGTestDriver - itkPNGImageIOTest DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest1Palette.png 0 4 1) -itk_add_test(NAME itkPNGImageIOTest1Palette2Scalar - COMMAND ITKIOPNGTestDriver - itkPNGImageIOTest DATA{Input/HeliconiusNumataPalette.png} ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest1Palette2Scalar.png 1 9 0) -itk_add_test(NAME itkPNGImageIOTest1PaletteExpanded - COMMAND ITKIOPNGTestDriver - itkPNGImageIOTest DATA{Input/HeliconiusNumataPalette.png} ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest1PaletteExpanded.png 1 9 1) -itk_add_test(NAME itkPNGImageIOTest2GreyAlpha - COMMAND ITKIOPNGTestDriver - --compare DATA{Baseline/itkPNGImageIOTest2GreyAlpha.png} - ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest2GreyAlpha.png - itkPNGImageIOTest2 DATA{Input/GrayAlpha.png} ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest2GreyAlpha.png 0 4 1) -itk_add_test(NAME itkPNGImageIOTest2Palette - COMMAND ITKIOPNGTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest2Palette.png - 4a4133ec26e5c83a5cbd9188067b1633 - itkPNGImageIOTest2 DATA{Input/HeliconiusNumataPalette.png} ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest2Palette.png 1 9 0) +createtestdriver(ITKIOPNG "${ITKIOPNG-Test_LIBRARIES}" "${ITKIOPNGTests}") +itk_add_test( + NAME + itkPNGImageIOTest1Grey + COMMAND + ITKIOPNGTestDriver + itkPNGImageIOTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest1Grey.png + 0 + 4 + 1) +itk_add_test( + NAME + itkPNGImageIOTest1Color + COMMAND + ITKIOPNGTestDriver + itkPNGImageIOTest + DATA{${ITK_DATA_ROOT}/Input/peppers.png} + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest1Color.png + 0 + 4 + 1) +itk_add_test( + NAME + itkPNGImageIOTest1Palette + COMMAND + ITKIOPNGTestDriver + itkPNGImageIOTest + DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest1Palette.png + 0 + 4 + 1) +itk_add_test( + NAME + itkPNGImageIOTest1Palette2Scalar + COMMAND + ITKIOPNGTestDriver + itkPNGImageIOTest + DATA{Input/HeliconiusNumataPalette.png} + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest1Palette2Scalar.png + 1 + 9 + 0) +itk_add_test( + NAME + itkPNGImageIOTest1PaletteExpanded + COMMAND + ITKIOPNGTestDriver + itkPNGImageIOTest + DATA{Input/HeliconiusNumataPalette.png} + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest1PaletteExpanded.png + 1 + 9 + 1) +itk_add_test( + NAME + itkPNGImageIOTest2GreyAlpha + COMMAND + ITKIOPNGTestDriver + --compare + DATA{Baseline/itkPNGImageIOTest2GreyAlpha.png} + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest2GreyAlpha.png + itkPNGImageIOTest2 + DATA{Input/GrayAlpha.png} + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest2GreyAlpha.png + 0 + 4 + 1) +itk_add_test( + NAME + itkPNGImageIOTest2Palette + COMMAND + ITKIOPNGTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest2Palette.png + 4a4133ec26e5c83a5cbd9188067b1633 + itkPNGImageIOTest2 + DATA{Input/HeliconiusNumataPalette.png} + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest2Palette.png + 1 + 9 + 0) # expand + RGB image -itk_add_test(NAME itkPNGImageIOTest3RGBExpanded - COMMAND ITKIOPNGTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3RGBExpanded.png - 1e1a89a70b7cb472f55c450909df7b77 - itkPNGImageIOTestPalette DATA{Input/HeliconiusNumataPaletteRGB.png} ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3RGBExpanded.png 1 0) +itk_add_test( + NAME + itkPNGImageIOTest3RGBExpanded + COMMAND + ITKIOPNGTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3RGBExpanded.png + 1e1a89a70b7cb472f55c450909df7b77 + itkPNGImageIOTestPalette + DATA{Input/HeliconiusNumataPaletteRGB.png} + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3RGBExpanded.png + 1 + 0) # not expand + RGB image -itk_add_test(NAME itkPNGImageIOTest3RGBNotExpanded - COMMAND ITKIOPNGTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3RGBNotExpanded.png - 1e1a89a70b7cb472f55c450909df7b77 - itkPNGImageIOTestPalette DATA{Input/HeliconiusNumataPaletteRGB.png} ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3RGBNotExpanded.png 0 0) +itk_add_test( + NAME + itkPNGImageIOTest3RGBNotExpanded + COMMAND + ITKIOPNGTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3RGBNotExpanded.png + 1e1a89a70b7cb472f55c450909df7b77 + itkPNGImageIOTestPalette + DATA{Input/HeliconiusNumataPaletteRGB.png} + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3RGBNotExpanded.png + 0 + 0) # not expand + palette -itk_add_test(NAME itkPNGImageIOTest3PaletteNotExpanded - COMMAND ITKIOPNGTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3PaletteNotExpanded.png - 27c6dc313b42f2fd8a271c7b1c44765d - itkPNGImageIOTestPalette DATA{Input/HeliconiusNumataPalette.png} ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3PaletteNotExpanded.png 0 1) +itk_add_test( + NAME + itkPNGImageIOTest3PaletteNotExpanded + COMMAND + ITKIOPNGTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3PaletteNotExpanded.png + 27c6dc313b42f2fd8a271c7b1c44765d + itkPNGImageIOTestPalette + DATA{Input/HeliconiusNumataPalette.png} + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3PaletteNotExpanded.png + 0 + 1) # expand + palette image -itk_add_test(NAME itkPNGImageIOTest3PaletteExpanded - COMMAND ITKIOPNGTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3PaletteExpanded.png - 1e1a89a70b7cb472f55c450909df7b77 - itkPNGImageIOTestPalette DATA{Input/HeliconiusNumataPalette.png} ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3PaletteExpanded.png 1 1) +itk_add_test( + NAME + itkPNGImageIOTest3PaletteExpanded + COMMAND + ITKIOPNGTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3PaletteExpanded.png + 1e1a89a70b7cb472f55c450909df7b77 + itkPNGImageIOTestPalette + DATA{Input/HeliconiusNumataPalette.png} + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3PaletteExpanded.png + 1 + 1) # not expand + grey palette image -itk_add_test(NAME itkPNGImageIOTest3GreyPaletteNotExpandedGrey - COMMAND ITKIOPNGTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3GreyPaletteNotExpandedGrey.png - 63e9a4ca5f533f98a0ba2253036349f9 - itkPNGImageIOTestPalette DATA{Input/HeliconiusNumataPaletteGrey.png} ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3GreyPaletteNotExpandedGrey.png 0 1) +itk_add_test( + NAME + itkPNGImageIOTest3GreyPaletteNotExpandedGrey + COMMAND + ITKIOPNGTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3GreyPaletteNotExpandedGrey.png + 63e9a4ca5f533f98a0ba2253036349f9 + itkPNGImageIOTestPalette + DATA{Input/HeliconiusNumataPaletteGrey.png} + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3GreyPaletteNotExpandedGrey.png + 0 + 1) # expand + grey palette image -itk_add_test(NAME itkPNGImageIOTest3GreyPaletteExpandedGrey - COMMAND ITKIOPNGTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3GreyPaletteExpandedGrey.png - a77e7f6919266c88e61ee7896c675044 - itkPNGImageIOTestPalette DATA{Input/HeliconiusNumataPaletteGrey.png} ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3GreyPaletteExpandedGrey.png 1 1) +itk_add_test( + NAME + itkPNGImageIOTest3GreyPaletteExpandedGrey + COMMAND + ITKIOPNGTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3GreyPaletteExpandedGrey.png + a77e7f6919266c88e61ee7896c675044 + itkPNGImageIOTestPalette + DATA{Input/HeliconiusNumataPaletteGrey.png} + ${ITK_TEST_OUTPUT_DIR}/itkPNGImageIOTest3GreyPaletteExpandedGrey.png + 1 + 1) -itk_add_test(NAME itkPNGImageIOTestCorrupt - COMMAND ITKIOPNGTestDriver - itkPNGImageIOTest3 DATA{Input/cthead1-257-corrupt.png}) +itk_add_test( + NAME + itkPNGImageIOTestCorrupt + COMMAND + ITKIOPNGTestDriver + itkPNGImageIOTest3 + DATA{Input/cthead1-257-corrupt.png}) -itk_add_test(NAME itkPNGImageIOTestCorrupt2 - COMMAND ITKIOPNGTestDriver - itkPNGImageIOTest3 DATA{Input/corrupted.png}) +itk_add_test( + NAME + itkPNGImageIOTestCorrupt2 + COMMAND + ITKIOPNGTestDriver + itkPNGImageIOTest3 + DATA{Input/corrupted.png}) diff --git a/Modules/IO/PhilipsREC/itk-module.cmake b/Modules/IO/PhilipsREC/itk-module.cmake index e494e236db6..a4b17c4d35e 100644 --- a/Modules/IO/PhilipsREC/itk-module.cmake +++ b/Modules/IO/PhilipsREC/itk-module.cmake @@ -1,21 +1,22 @@ set(DOCUMENTATION "This module contains classes that read Philips REC/PAR image files.") -itk_module(ITKIOPhilipsREC +itk_module( + ITKIOPhilipsREC ENABLE_SHARED PRIVATE_DEPENDS - ITKIOImageBase - ITKZLIB + ITKIOImageBase + ITKZLIB TEST_DEPENDS - ITKTestKernel - ITKTransform - ITKImageGrid - ITKImageIntensity + ITKTestKernel + ITKTransform + ITKImageGrid + ITKImageIntensity FACTORY_NAMES - ImageIO::PhilipsREC + ImageIO::PhilipsREC EXCLUDE_FROM_DEFAULT DESCRIPTION - "${DOCUMENTATION}") + "${DOCUMENTATION}") # Extra dependency of ITKTransform is introduced by itkPhilipsRECImageIOOrientationTest. # Extra dependency of ITKImageGrid is introduced by itkPhilipsRECImageIOOrientationTest. # Extra dependency of ITKImageIntensity is introduced by itkPhilipsRECImageIOOrientationTest. diff --git a/Modules/IO/PhilipsREC/src/CMakeLists.txt b/Modules/IO/PhilipsREC/src/CMakeLists.txt index c6d35a0e620..129224481b5 100644 --- a/Modules/IO/PhilipsREC/src/CMakeLists.txt +++ b/Modules/IO/PhilipsREC/src/CMakeLists.txt @@ -1,8 +1,4 @@ -set(ITKIOPhilipsREC_SRC -itkPhilipsPAR.cxx -itkPhilipsRECImageIO.cxx -itkPhilipsRECImageIOFactory.cxx -) +set(ITKIOPhilipsREC_SRC itkPhilipsPAR.cxx itkPhilipsRECImageIO.cxx itkPhilipsRECImageIOFactory.cxx) add_library(ITKIOPhilipsREC ${ITK_LIBRARY_BUILD_TYPE} ${ITKIOPhilipsREC_SRC}) itk_module_link_dependencies() diff --git a/Modules/IO/PhilipsREC/test/CMakeLists.txt b/Modules/IO/PhilipsREC/test/CMakeLists.txt index 0ecc752b227..c10c08899db 100644 --- a/Modules/IO/PhilipsREC/test/CMakeLists.txt +++ b/Modules/IO/PhilipsREC/test/CMakeLists.txt @@ -1,38 +1,70 @@ itk_module_test() -set(ITKIOPhilipsRECTests -itkPhilipsRECImageIOTest.cxx -itkPhilipsRECImageIOOrientationTest.cxx -itkPhilipsRECImageIOPrintTest.cxx -) +set(ITKIOPhilipsRECTests itkPhilipsRECImageIOTest.cxx itkPhilipsRECImageIOOrientationTest.cxx + itkPhilipsRECImageIOPrintTest.cxx) -CreateTestDriver(ITKIOPhilipsREC "${ITKIOPhilipsREC-Test_LIBRARIES}" "${ITKIOPhilipsRECTests}") +createtestdriver(ITKIOPhilipsREC "${ITKIOPhilipsREC-Test_LIBRARIES}" "${ITKIOPhilipsRECTests}") set(BASELINE ${ITK_DATA_ROOT}/Baseline/Philips) set(INPUTDATA ${ITK_DATA_ROOT}/Input) set(BASELINE_ROOT ${ITK_DATA_ROOT}/Baseline) set(TEMP ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkPhilipsRECImageIOTest1 - COMMAND ITKIOPhilipsRECTestDriver itkPhilipsRECImageIOTest - DATA{${ITK_DATA_ROOT}/Input/T1_MEASUREMENT_4_1.PAR,T1_MEASUREMENT_4_1.REC} ${ITK_TEST_OUTPUT_DIR}/itkPhilipsRECImageIOTest1.mha) -itk_add_test(NAME itkPhilipsRECImageIOOrientationTest1 - COMMAND ITKIOPhilipsRECTestDriver - --compare DATA{Baseline/itkPhilipsRECImageIOOrientationTest1.mha} - ${ITK_TEST_OUTPUT_DIR}/itkPhilipsRECImageIOOrientationTest1.mha - itkPhilipsRECImageIOOrientationTest DATA{Input/Test_Orientation_2_3.PAR} DATA{Input/Test_Orientation_2_1.PAR} ${ITK_TEST_OUTPUT_DIR}/itkPhilipsRECImageIOOrientationTest1.mha) -itk_add_test(NAME itkPhilipsRECImageIOOrientationTest2 - COMMAND ITKIOPhilipsRECTestDriver - --compare DATA{Baseline/itkPhilipsRECImageIOOrientationTest2.mha} - ${ITK_TEST_OUTPUT_DIR}/itkPhilipsRECImageIOOrientationTest2.mha - itkPhilipsRECImageIOOrientationTest DATA{Input/Test_Orientation_2_5.PAR} DATA{Input/Test_Orientation_2_1.REC.gz} ${ITK_TEST_OUTPUT_DIR}/itkPhilipsRECImageIOOrientationTest2.mha) -itk_add_test(NAME itkPhilipsRECImageIOOrientationTest3 - COMMAND ITKIOPhilipsRECTestDriver - --compare DATA{Baseline/itkPhilipsRECImageIOOrientationTest3.mha} - ${ITK_TEST_OUTPUT_DIR}/itkPhilipsRECImageIOOrientationTest3.mha - itkPhilipsRECImageIOOrientationTest DATA{Input/Test_Orientation_2_5.REC.gz} DATA{Input/Test_Orientation_2_3.REC.gz} ${ITK_TEST_OUTPUT_DIR}/itkPhilipsRECImageIOOrientationTest3.mha) -itk_add_test(NAME itkPhilipsRECImageIOTest2 - COMMAND ITKIOPhilipsRECTestDriver itkPhilipsRECImageIOTest - DATA{Input/Test_Cardiac_Phase_7_1.REC.gz} ${ITK_TEST_OUTPUT_DIR}/itkPhilipsRECImageIOTest2.mha) -itk_add_test(NAME itkPhilipsRECImageIOPrintTest1 - COMMAND ITKIOPhilipsRECTestDriver itkPhilipsRECImageIOPrintTest - DATA{Input/Test_Cardiac_Phase_7_1.PAR}) +itk_add_test( + NAME + itkPhilipsRECImageIOTest1 + COMMAND + ITKIOPhilipsRECTestDriver + itkPhilipsRECImageIOTest + DATA{${ITK_DATA_ROOT}/Input/T1_MEASUREMENT_4_1.PAR,T1_MEASUREMENT_4_1.REC} + ${ITK_TEST_OUTPUT_DIR}/itkPhilipsRECImageIOTest1.mha) +itk_add_test( + NAME + itkPhilipsRECImageIOOrientationTest1 + COMMAND + ITKIOPhilipsRECTestDriver + --compare + DATA{Baseline/itkPhilipsRECImageIOOrientationTest1.mha} + ${ITK_TEST_OUTPUT_DIR}/itkPhilipsRECImageIOOrientationTest1.mha + itkPhilipsRECImageIOOrientationTest + DATA{Input/Test_Orientation_2_3.PAR} + DATA{Input/Test_Orientation_2_1.PAR} + ${ITK_TEST_OUTPUT_DIR}/itkPhilipsRECImageIOOrientationTest1.mha) +itk_add_test( + NAME + itkPhilipsRECImageIOOrientationTest2 + COMMAND + ITKIOPhilipsRECTestDriver + --compare + DATA{Baseline/itkPhilipsRECImageIOOrientationTest2.mha} + ${ITK_TEST_OUTPUT_DIR}/itkPhilipsRECImageIOOrientationTest2.mha + itkPhilipsRECImageIOOrientationTest + DATA{Input/Test_Orientation_2_5.PAR} + DATA{Input/Test_Orientation_2_1.REC.gz} + ${ITK_TEST_OUTPUT_DIR}/itkPhilipsRECImageIOOrientationTest2.mha) +itk_add_test( + NAME + itkPhilipsRECImageIOOrientationTest3 + COMMAND + ITKIOPhilipsRECTestDriver + --compare + DATA{Baseline/itkPhilipsRECImageIOOrientationTest3.mha} + ${ITK_TEST_OUTPUT_DIR}/itkPhilipsRECImageIOOrientationTest3.mha + itkPhilipsRECImageIOOrientationTest + DATA{Input/Test_Orientation_2_5.REC.gz} + DATA{Input/Test_Orientation_2_3.REC.gz} + ${ITK_TEST_OUTPUT_DIR}/itkPhilipsRECImageIOOrientationTest3.mha) +itk_add_test( + NAME + itkPhilipsRECImageIOTest2 + COMMAND + ITKIOPhilipsRECTestDriver + itkPhilipsRECImageIOTest + DATA{Input/Test_Cardiac_Phase_7_1.REC.gz} + ${ITK_TEST_OUTPUT_DIR}/itkPhilipsRECImageIOTest2.mha) +itk_add_test( + NAME + itkPhilipsRECImageIOPrintTest1 + COMMAND + ITKIOPhilipsRECTestDriver + itkPhilipsRECImageIOPrintTest + DATA{Input/Test_Cardiac_Phase_7_1.PAR}) diff --git a/Modules/IO/RAW/itk-module.cmake b/Modules/IO/RAW/itk-module.cmake index acc8b4d56ab..ec5d99eb380 100644 --- a/Modules/IO/RAW/itk-module.cmake +++ b/Modules/IO/RAW/itk-module.cmake @@ -1,14 +1,15 @@ -set(DOCUMENTATION "This modules contains a class for reading and writing raw +set(DOCUMENTATION + "This modules contains a class for reading and writing raw binary images. Unlike other file format readers, it is necessary to specify critical information like the pixel type, dimensions, spacing, origin, etc. when reading RAW files.") -itk_module(ITKIORAW +itk_module( + ITKIORAW ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/RAW/test/CMakeLists.txt b/Modules/IO/RAW/test/CMakeLists.txt index 00c2ac0685b..9f1a5abf739 100644 --- a/Modules/IO/RAW/test/CMakeLists.txt +++ b/Modules/IO/RAW/test/CMakeLists.txt @@ -1,26 +1,48 @@ itk_module_test() set(ITKIORAWTests -itkRawImageIOTest.cxx -itkRawImageIOTest2.cxx -itkRawImageIOTest3.cxx -itkRawImageIOTest4.cxx -itkRawImageIOTest5.cxx -) + itkRawImageIOTest.cxx + itkRawImageIOTest2.cxx + itkRawImageIOTest3.cxx + itkRawImageIOTest4.cxx + itkRawImageIOTest5.cxx) -CreateTestDriver(ITKIORAW "${ITKIORAW-Test_LIBRARIES}" "${ITKIORAWTests}") +createtestdriver(ITKIORAW "${ITKIORAW-Test_LIBRARIES}" "${ITKIORAWTests}") -itk_add_test(NAME itkRawImageIOTest - COMMAND ITKIORAWTestDriver itkRawImageIOTest - ${ITK_TEST_OUTPUT_DIR}/raw1.raw ${ITK_TEST_OUTPUT_DIR}/raw2.raw) -itk_add_test(NAME itkRawImageIOTest2 - COMMAND ITKIORAWTestDriver itkRawImageIOTest2 - DATA{${ITK_DATA_ROOT}/Input/VHFColor.raw}) -itk_add_test(NAME itkRawImageIOTest3 - COMMAND ITKIORAWTestDriver itkRawImageIOTest3 - ${ITK_TEST_OUTPUT_DIR}/raw3.raw ${ITK_TEST_OUTPUT_DIR}/raw4.raw) -itk_add_test(NAME itkRawImageIOTest4 - COMMAND ITKIORAWTestDriver itkRawImageIOTest4 - ${ITK_TEST_OUTPUT_DIR}/bigendian.raw ${ITK_TEST_OUTPUT_DIR}/littleendian.raw) -itk_add_test(NAME itkRawImageIOTest5 - COMMAND ITKIORAWTestDriver itkRawImageIOTest5 - ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkRawImageIOTest + COMMAND + ITKIORAWTestDriver + itkRawImageIOTest + ${ITK_TEST_OUTPUT_DIR}/raw1.raw + ${ITK_TEST_OUTPUT_DIR}/raw2.raw) +itk_add_test( + NAME + itkRawImageIOTest2 + COMMAND + ITKIORAWTestDriver + itkRawImageIOTest2 + DATA{${ITK_DATA_ROOT}/Input/VHFColor.raw}) +itk_add_test( + NAME + itkRawImageIOTest3 + COMMAND + ITKIORAWTestDriver + itkRawImageIOTest3 + ${ITK_TEST_OUTPUT_DIR}/raw3.raw + ${ITK_TEST_OUTPUT_DIR}/raw4.raw) +itk_add_test( + NAME + itkRawImageIOTest4 + COMMAND + ITKIORAWTestDriver + itkRawImageIOTest4 + ${ITK_TEST_OUTPUT_DIR}/bigendian.raw + ${ITK_TEST_OUTPUT_DIR}/littleendian.raw) +itk_add_test( + NAME + itkRawImageIOTest5 + COMMAND + ITKIORAWTestDriver + itkRawImageIOTest5 + ${ITK_TEST_OUTPUT_DIR}) diff --git a/Modules/IO/RAW/wrapping/itkRawImageIO.wrap b/Modules/IO/RAW/wrapping/itkRawImageIO.wrap index 3b38d4b41d0..ad75ba05372 100644 --- a/Modules/IO/RAW/wrapping/itkRawImageIO.wrap +++ b/Modules/IO/RAW/wrapping/itkRawImageIO.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::RawImageIO" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}},${d}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/IO/Siemens/itk-module.cmake b/Modules/IO/Siemens/itk-module.cmake index d3e06ae85d5..9aa56e33d3d 100644 --- a/Modules/IO/Siemens/itk-module.cmake +++ b/Modules/IO/Siemens/itk-module.cmake @@ -1,14 +1,14 @@ set(DOCUMENTATION "This module contains a class for reading the SiemensVision medical file format.") -itk_module(ITKIOSiemens +itk_module( + ITKIOSiemens ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase PRIVATE_DEPENDS - ITKIOIPL + ITKIOIPL TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/Siemens/src/CMakeLists.txt b/Modules/IO/Siemens/src/CMakeLists.txt index 2a1ce9ffd38..0e7852f5432 100644 --- a/Modules/IO/Siemens/src/CMakeLists.txt +++ b/Modules/IO/Siemens/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOSiemens_SRCS - itkSiemensVisionImageIOFactory.cxx - itkSiemensVisionImageIO.cxx - ) +set(ITKIOSiemens_SRCS itkSiemensVisionImageIOFactory.cxx itkSiemensVisionImageIO.cxx) itk_module_add_library(ITKIOSiemens ${ITKIOSiemens_SRCS}) diff --git a/Modules/IO/SpatialObjects/itk-module.cmake b/Modules/IO/SpatialObjects/itk-module.cmake index 474c3d4e4a2..50ee73ca4b9 100644 --- a/Modules/IO/SpatialObjects/itk-module.cmake +++ b/Modules/IO/SpatialObjects/itk-module.cmake @@ -1,22 +1,22 @@ -set(DOCUMENTATION "This module contains classes for reading and writing +set(DOCUMENTATION + "This module contains classes for reading and writing SpatialObjects as opposed to general images. The SpatialObjects are written in MetaIO format.") - -itk_module(ITKIOSpatialObjects +itk_module( + ITKIOSpatialObjects DEPENDS - ITKSpatialObjects + ITKSpatialObjects PRIVATE_DEPENDS - ITKIOXML - ITKMesh + ITKIOXML + ITKMesh TEST_DEPENDS - ITKTestKernel - ITKSpatialObjects - ITKIOXML - ITKMetaIO - ITKMesh + ITKTestKernel + ITKSpatialObjects + ITKIOXML + ITKMetaIO + ITKMesh DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/SpatialObjects/src/CMakeLists.txt b/Modules/IO/SpatialObjects/src/CMakeLists.txt index 4cd6b3a54cd..5d5a02b75e0 100644 --- a/Modules/IO/SpatialObjects/src/CMakeLists.txt +++ b/Modules/IO/SpatialObjects/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKIOSpatialObjects_SRCS - itkPolygonGroupSpatialObjectXMLFile.cxx - ) +set(ITKIOSpatialObjects_SRCS itkPolygonGroupSpatialObjectXMLFile.cxx) itk_module_add_library(ITKIOSpatialObjects ${ITKIOSpatialObjects_SRCS}) diff --git a/Modules/IO/SpatialObjects/test/CMakeLists.txt b/Modules/IO/SpatialObjects/test/CMakeLists.txt index 39bd8f995b3..73713b2eeb0 100644 --- a/Modules/IO/SpatialObjects/test/CMakeLists.txt +++ b/Modules/IO/SpatialObjects/test/CMakeLists.txt @@ -1,25 +1,44 @@ itk_module_test() -set(ITKIOSpatialObjectsTests -itkPolygonGroupSpatialObjectXMLFileTest.cxx -itkReadWriteSpatialObjectTest.cxx -itkReadVesselTubeSpatialObjectTest.cxx -) +set(ITKIOSpatialObjectsTests itkPolygonGroupSpatialObjectXMLFileTest.cxx itkReadWriteSpatialObjectTest.cxx + itkReadVesselTubeSpatialObjectTest.cxx) -CreateTestDriver(ITKIOSpatialObjects "${ITKIOSpatialObjects-Test_LIBRARIES}" "${ITKIOSpatialObjectsTests}") +createtestdriver(ITKIOSpatialObjects "${ITKIOSpatialObjects-Test_LIBRARIES}" "${ITKIOSpatialObjectsTests}") -itk_add_test(NAME itkReadWriteSpatialObjectTest - COMMAND ITKIOSpatialObjectsTestDriver itkReadWriteSpatialObjectTest - ${ITK_TEST_OUTPUT_DIR}/Objects.meta) -itk_add_test(NAME itkReadWriteSpatialObjectTest1 - COMMAND ITKIOSpatialObjectsTestDriver itkReadWriteSpatialObjectTest - ${ITK_TEST_OUTPUT_DIR}/Objects1.meta binary) -itk_add_test(NAME itkReadWriteSpatialObjectTest2 - COMMAND ITKIOSpatialObjectsTestDriver itkReadWriteSpatialObjectTest - ${ITK_TEST_OUTPUT_DIR}/Objects2.meta DATA{${ITK_DATA_ROOT}/Input/SpatialObjects.meta}) -itk_add_test(NAME itkPolygonGroupSpatialObjectXMLFileTest - COMMAND ITKIOSpatialObjectsTestDriver itkPolygonGroupSpatialObjectXMLFileTest - ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkReadVesselTubeSpatialObjectTest - COMMAND ITKIOSpatialObjectsTestDriver itkReadVesselTubeSpatialObjectTest - DATA{Input/Branch-truth.tre}) +itk_add_test( + NAME + itkReadWriteSpatialObjectTest + COMMAND + ITKIOSpatialObjectsTestDriver + itkReadWriteSpatialObjectTest + ${ITK_TEST_OUTPUT_DIR}/Objects.meta) +itk_add_test( + NAME + itkReadWriteSpatialObjectTest1 + COMMAND + ITKIOSpatialObjectsTestDriver + itkReadWriteSpatialObjectTest + ${ITK_TEST_OUTPUT_DIR}/Objects1.meta + binary) +itk_add_test( + NAME + itkReadWriteSpatialObjectTest2 + COMMAND + ITKIOSpatialObjectsTestDriver + itkReadWriteSpatialObjectTest + ${ITK_TEST_OUTPUT_DIR}/Objects2.meta + DATA{${ITK_DATA_ROOT}/Input/SpatialObjects.meta}) +itk_add_test( + NAME + itkPolygonGroupSpatialObjectXMLFileTest + COMMAND + ITKIOSpatialObjectsTestDriver + itkPolygonGroupSpatialObjectXMLFileTest + ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkReadVesselTubeSpatialObjectTest + COMMAND + ITKIOSpatialObjectsTestDriver + itkReadVesselTubeSpatialObjectTest + DATA{Input/Branch-truth.tre}) diff --git a/Modules/IO/SpatialObjects/wrapping/itkSpatialObjectReader.wrap b/Modules/IO/SpatialObjects/wrapping/itkSpatialObjectReader.wrap index 048914cb889..a8c3b309932 100644 --- a/Modules/IO/SpatialObjects/wrapping/itkSpatialObjectReader.wrap +++ b/Modules/IO/SpatialObjects/wrapping/itkSpatialObjectReader.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::SpatialObjectReader" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${d}" "${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${d}" "${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/IO/SpatialObjects/wrapping/itkSpatialObjectWriter.wrap b/Modules/IO/SpatialObjects/wrapping/itkSpatialObjectWriter.wrap index a2ca6bc6a33..63e4b7d64bd 100644 --- a/Modules/IO/SpatialObjects/wrapping/itkSpatialObjectWriter.wrap +++ b/Modules/IO/SpatialObjects/wrapping/itkSpatialObjectWriter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::SpatialObjectWriter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${d}" "${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${d}" "${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/IO/Stimulate/itk-module.cmake b/Modules/IO/Stimulate/itk-module.cmake index 7140b050e1d..276a3bdc078 100644 --- a/Modules/IO/Stimulate/itk-module.cmake +++ b/Modules/IO/Stimulate/itk-module.cmake @@ -1,15 +1,16 @@ -set(DOCUMENTATION "This model contains a class for reading +set(DOCUMENTATION + "This model contains a class for reading Stimulate (SDT/SPR) images.") -itk_module(ITKIOStimulate +itk_module( + ITKIOStimulate ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase TEST_DEPENDS - ITKTestKernel + ITKTestKernel FACTORY_NAMES - ImageIO::Stimulate + ImageIO::Stimulate DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/Stimulate/src/CMakeLists.txt b/Modules/IO/Stimulate/src/CMakeLists.txt index db8f7e12a44..a2e26d74677 100644 --- a/Modules/IO/Stimulate/src/CMakeLists.txt +++ b/Modules/IO/Stimulate/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOStimulate_SRCS - itkStimulateImageIO.cxx - itkStimulateImageIOFactory.cxx - ) +set(ITKIOStimulate_SRCS itkStimulateImageIO.cxx itkStimulateImageIOFactory.cxx) itk_module_add_library(ITKIOStimulate ${ITKIOStimulate_SRCS}) diff --git a/Modules/IO/Stimulate/test/CMakeLists.txt b/Modules/IO/Stimulate/test/CMakeLists.txt index 0cd0c87943b..b48f8ecf68e 100644 --- a/Modules/IO/Stimulate/test/CMakeLists.txt +++ b/Modules/IO/Stimulate/test/CMakeLists.txt @@ -1,14 +1,20 @@ itk_module_test() -set(ITKIOStimulateTests -itkStimulateImageIOTest.cxx -itkStimulateImageIOTest2.cxx -) +set(ITKIOStimulateTests itkStimulateImageIOTest.cxx itkStimulateImageIOTest2.cxx) -CreateTestDriver(ITKIOStimulate "${ITKIOStimulate-Test_LIBRARIES}" "${ITKIOStimulateTests}") +createtestdriver(ITKIOStimulate "${ITKIOStimulate-Test_LIBRARIES}" "${ITKIOStimulateTests}") -itk_add_test(NAME itkStimulateImageIOTest - COMMAND ITKIOStimulateTestDriver itkStimulateImageIOTest - ${ITK_TEST_OUTPUT_DIR}/test1.spr ${ITK_TEST_OUTPUT_DIR}/test2.spr) -itk_add_test(NAME itkStimulateImageIOTest2 - COMMAND ITKIOStimulateTestDriver itkStimulateImageIOTest2 - DATA{${ITK_DATA_ROOT}/Input/BigEndian.spr,BigEndian.img}) +itk_add_test( + NAME + itkStimulateImageIOTest + COMMAND + ITKIOStimulateTestDriver + itkStimulateImageIOTest + ${ITK_TEST_OUTPUT_DIR}/test1.spr + ${ITK_TEST_OUTPUT_DIR}/test2.spr) +itk_add_test( + NAME + itkStimulateImageIOTest2 + COMMAND + ITKIOStimulateTestDriver + itkStimulateImageIOTest2 + DATA{${ITK_DATA_ROOT}/Input/BigEndian.spr,BigEndian.img}) diff --git a/Modules/IO/TIFF/itk-module.cmake b/Modules/IO/TIFF/itk-module.cmake index 22715cd8887..9d9759bf45c 100644 --- a/Modules/IO/TIFF/itk-module.cmake +++ b/Modules/IO/TIFF/itk-module.cmake @@ -1,16 +1,16 @@ set(DOCUMENTATION "This module contains classes for reading and writing image files in the Tagged Image File Format (TIFF).") -itk_module(ITKIOTIFF +itk_module( + ITKIOTIFF ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase PRIVATE_DEPENDS - ITKTIFF + ITKTIFF TEST_DEPENDS - ITKTestKernel + ITKTestKernel FACTORY_NAMES - ImageIO::TIFF + ImageIO::TIFF DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/TIFF/src/CMakeLists.txt b/Modules/IO/TIFF/src/CMakeLists.txt index d9481fb7f74..faa24b74050 100644 --- a/Modules/IO/TIFF/src/CMakeLists.txt +++ b/Modules/IO/TIFF/src/CMakeLists.txt @@ -1,7 +1,3 @@ -set(ITKIOTIFF_SRCS - itkTIFFImageIO.cxx - itkTIFFReaderInternal.cxx - itkTIFFImageIOFactory.cxx - ) +set(ITKIOTIFF_SRCS itkTIFFImageIO.cxx itkTIFFReaderInternal.cxx itkTIFFImageIOFactory.cxx) itk_module_add_library(ITKIOTIFF ${ITKIOTIFF_SRCS}) diff --git a/Modules/IO/TIFF/test/CMakeLists.txt b/Modules/IO/TIFF/test/CMakeLists.txt index 2f5b66469ee..bc74802c164 100644 --- a/Modules/IO/TIFF/test/CMakeLists.txt +++ b/Modules/IO/TIFF/test/CMakeLists.txt @@ -1,310 +1,634 @@ itk_module_test() set(ITKIOTIFFTests -itkTIFFImageIOTest.cxx -itkTIFFImageIOTest2.cxx -itkTIFFImageIOCompressionTest.cxx -itkLargeTIFFImageWriteReadTest.cxx -itkTIFFImageIOInfoTest.cxx -itkTIFFImageIOTestPalette.cxx -itkTIFFImageIOIntPixelTest.cxx -) + itkTIFFImageIOTest.cxx + itkTIFFImageIOTest2.cxx + itkTIFFImageIOCompressionTest.cxx + itkLargeTIFFImageWriteReadTest.cxx + itkTIFFImageIOInfoTest.cxx + itkTIFFImageIOTestPalette.cxx + itkTIFFImageIOIntPixelTest.cxx) -CreateTestDriver(ITKIOTIFF "${ITKIOTIFF-Test_LIBRARIES}" "${ITKIOTIFFTests}") +createtestdriver(ITKIOTIFF "${ITKIOTIFF-Test_LIBRARIES}" "${ITKIOTIFFTests}") -itk_add_test(NAME itkTIFFImageIOTest - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.tif} - ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTest_cthead1.tif - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/cthead1.tif} ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTest_cthead1.tif) -itk_add_test(NAME itkTIFFImageIOTest1 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImage.tif} - ${ITK_TEST_OUTPUT_DIR}/RGBTestImage.tif - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/RGBTestImage.tif} ${ITK_TEST_OUTPUT_DIR}/RGBTestImage.tif) -itk_add_test(NAME itkTIFFImageIOTest2 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageCCITTFax3.tif} - ${ITK_TEST_OUTPUT_DIR}/RGBTestImageCCITTFax3.tif - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/RGBTestImageCCITTFax3.tif} ${ITK_TEST_OUTPUT_DIR}/RGBTestImageCCITTFax3.tif) -itk_add_test(NAME itkTIFFImageIOTest3 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageCCITTFax4.tif} - ${ITK_TEST_OUTPUT_DIR}/RGBTestImageCCITTFax4.tif - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/RGBTestImageCCITTFax4.tif} ${ITK_TEST_OUTPUT_DIR}/RGBTestImageCCITTFax4.tif) -itk_add_test(NAME itkTIFFImageIOTest4 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageGray.tif} - ${ITK_TEST_OUTPUT_DIR}/RGBTestImageGray.tif - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/RGBTestImageGray.tif} ${ITK_TEST_OUTPUT_DIR}/RGBTestImageGray.tif) -itk_add_test(NAME itkTIFFImageIOTest5 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageHuffmanRLE.tif} - ${ITK_TEST_OUTPUT_DIR}/RGBTestImageHuffmanRLE.tif - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/RGBTestImageHuffmanRLE.tif} ${ITK_TEST_OUTPUT_DIR}/RGBTestImageHuffmanRLE.tif) -itk_add_test(NAME itkTIFFImageIOTest6 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageJPEG.tif} - ${ITK_TEST_OUTPUT_DIR}/RGBTestImageJPEG.tif - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/RGBTestImageJPEG.tif} ${ITK_TEST_OUTPUT_DIR}/RGBTestImageJPEG.tif) -itk_add_test(NAME itkTIFFImageIOTest7 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageLZW.tif} - ${ITK_TEST_OUTPUT_DIR}/RGBTestImageLZW.tif - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/RGBTestImageLZW.tif} ${ITK_TEST_OUTPUT_DIR}/RGBTestImageLZW.tif) -itk_add_test(NAME itkTIFFImageIOTest8 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageNone.tif} - ${ITK_TEST_OUTPUT_DIR}/RGBTestImageNone.tif - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/RGBTestImageNone.tif} ${ITK_TEST_OUTPUT_DIR}/RGBTestImageNone.tif) -itk_add_test(NAME itkTIFFImageIOTest9 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImagePackBits.tif} - ${ITK_TEST_OUTPUT_DIR}/RGBTestImagePackBits.tif - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/RGBTestImagePackBits.tif} ${ITK_TEST_OUTPUT_DIR}/RGBTestImagePackBits.tif) -itk_add_test(NAME itkTIFFImageIOTest10 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageZIP.tif} - ${ITK_TEST_OUTPUT_DIR}/RGBTestImageZIP.tif - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/RGBTestImageZIP.tif} ${ITK_TEST_OUTPUT_DIR}/RGBTestImageZIP.tif) -itk_add_test(NAME itkTIFFImageIOTest11 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/ShortTestImage.tiff} - ${ITK_TEST_OUTPUT_DIR}/ShortTestImage.tiff - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/ShortTestImage.tiff} ${ITK_TEST_OUTPUT_DIR}/ShortTestImage.tiff 2 2) -itk_add_test(NAME itkTIFFImageIOTest12 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/48BitTestImage.tif} - ${ITK_TEST_OUTPUT_DIR}/48BitTestImage.tif - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/48BitTestImage.tif} ${ITK_TEST_OUTPUT_DIR}/48BitTestImage.tif 2 2) -itk_add_test(NAME itkTIFFImageIOTest13 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageCCITTFax3.mha} - ${ITK_TEST_OUTPUT_DIR}/RGBTestImageCCITTFax3.mha - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/RGBTestImageCCITTFax3.tif} ${ITK_TEST_OUTPUT_DIR}/RGBTestImageCCITTFax3.mha) -itk_add_test(NAME itkTIFFImageIOTest14 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageCCITTFax4.mha} - ${ITK_TEST_OUTPUT_DIR}/RGBTestImageCCITTFax4.mha - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/RGBTestImageCCITTFax4.tif} ${ITK_TEST_OUTPUT_DIR}/RGBTestImageCCITTFax4.mha) -itk_add_test(NAME itkTIFFImageIOTest15 - COMMAND ITKIOTIFFTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTest15.png - fd894cf735a09380c3492f46b39a0ab9 - itkTIFFImageIOTest DATA{Input/jello.tif} ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTest15.png 2 2) +itk_add_test( + NAME + itkTIFFImageIOTest + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTest_cthead1.tif + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTest_cthead1.tif) +itk_add_test( + NAME + itkTIFFImageIOTest1 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImage.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImage.tif + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/RGBTestImage.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImage.tif) +itk_add_test( + NAME + itkTIFFImageIOTest2 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageCCITTFax3.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageCCITTFax3.tif + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/RGBTestImageCCITTFax3.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageCCITTFax3.tif) +itk_add_test( + NAME + itkTIFFImageIOTest3 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageCCITTFax4.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageCCITTFax4.tif + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/RGBTestImageCCITTFax4.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageCCITTFax4.tif) +itk_add_test( + NAME + itkTIFFImageIOTest4 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageGray.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageGray.tif + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/RGBTestImageGray.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageGray.tif) +itk_add_test( + NAME + itkTIFFImageIOTest5 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageHuffmanRLE.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageHuffmanRLE.tif + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/RGBTestImageHuffmanRLE.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageHuffmanRLE.tif) +itk_add_test( + NAME + itkTIFFImageIOTest6 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageJPEG.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageJPEG.tif + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/RGBTestImageJPEG.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageJPEG.tif) +itk_add_test( + NAME + itkTIFFImageIOTest7 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageLZW.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageLZW.tif + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/RGBTestImageLZW.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageLZW.tif) +itk_add_test( + NAME + itkTIFFImageIOTest8 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageNone.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageNone.tif + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/RGBTestImageNone.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageNone.tif) +itk_add_test( + NAME + itkTIFFImageIOTest9 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImagePackBits.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImagePackBits.tif + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/RGBTestImagePackBits.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImagePackBits.tif) +itk_add_test( + NAME + itkTIFFImageIOTest10 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageZIP.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageZIP.tif + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/RGBTestImageZIP.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageZIP.tif) +itk_add_test( + NAME + itkTIFFImageIOTest11 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/ShortTestImage.tiff} + ${ITK_TEST_OUTPUT_DIR}/ShortTestImage.tiff + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/ShortTestImage.tiff} + ${ITK_TEST_OUTPUT_DIR}/ShortTestImage.tiff + 2 + 2) +itk_add_test( + NAME + itkTIFFImageIOTest12 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/48BitTestImage.tif} + ${ITK_TEST_OUTPUT_DIR}/48BitTestImage.tif + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/48BitTestImage.tif} + ${ITK_TEST_OUTPUT_DIR}/48BitTestImage.tif + 2 + 2) +itk_add_test( + NAME + itkTIFFImageIOTest13 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageCCITTFax3.mha} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageCCITTFax3.mha + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/RGBTestImageCCITTFax3.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageCCITTFax3.mha) +itk_add_test( + NAME + itkTIFFImageIOTest14 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/RGBTestImageCCITTFax4.mha} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageCCITTFax4.mha + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/RGBTestImageCCITTFax4.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImageCCITTFax4.mha) +itk_add_test( + NAME + itkTIFFImageIOTest15 + COMMAND + ITKIOTIFFTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTest15.png + fd894cf735a09380c3492f46b39a0ab9 + itkTIFFImageIOTest + DATA{Input/jello.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTest15.png + 2 + 2) -itk_add_test(NAME itkTIFFImageIOMultiPagesTest - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/ramp.tif} - ${ITK_TEST_OUTPUT_DIR}/ramp.tif - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/ramp.tif} ${ITK_TEST_OUTPUT_DIR}/ramp.tif 3) -itk_add_test(NAME itkTIFFImageIOMultiPagesTest2 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/rampShort.tif} - ${ITK_TEST_OUTPUT_DIR}/rampShort.tif - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/rampShort.tif} ${ITK_TEST_OUTPUT_DIR}/rampShort.tif 3 3) -itk_add_test(NAME itkTIFFImageIOMultResTest1 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.tif} - ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOMultResTest1.tif - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/cthead1-multires.tif} ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOMultResTest1.tif) -itk_add_test(NAME itkTIFFImageIOMultResTest2 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.tif} - ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOMultResTest2.tif - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/cthead1-multires.tif} ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOMultResTest2.tif 3) -itk_add_test(NAME itkTIFFImageIOSpacing - COMMAND ITKIOTIFFTestDriver - itkTIFFImageIOTest2 ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOSpacing.tif) -itk_add_test(NAME itkTIFFImageIOFloatTest - COMMAND ITKIOTIFFTestDriver - --compare DATA{Baseline/rampFloat.tif} - ${ITK_TEST_OUTPUT_DIR}/rampFloat.tif - itkTIFFImageIOTest DATA{Baseline/rampFloat.tif} ${ITK_TEST_OUTPUT_DIR}/rampFloat.tif 3 4) - itk_add_test(NAME itkTIFFImageIORGBATest - COMMAND ITKIOTIFFTestDriver - --compare DATA{Baseline/itkTIFFImageIORGBATestBaseline.tif} - ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIORGBATest.tif - itkTIFFImageIOTest DATA{Input/RGBAHead.tif} ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIORGBATest.tif 3 5) +itk_add_test( + NAME + itkTIFFImageIOMultiPagesTest + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/ramp.tif} + ${ITK_TEST_OUTPUT_DIR}/ramp.tif + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/ramp.tif} + ${ITK_TEST_OUTPUT_DIR}/ramp.tif + 3) +itk_add_test( + NAME + itkTIFFImageIOMultiPagesTest2 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/rampShort.tif} + ${ITK_TEST_OUTPUT_DIR}/rampShort.tif + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/rampShort.tif} + ${ITK_TEST_OUTPUT_DIR}/rampShort.tif + 3 + 3) +itk_add_test( + NAME + itkTIFFImageIOMultResTest1 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOMultResTest1.tif + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/cthead1-multires.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOMultResTest1.tif) +itk_add_test( + NAME + itkTIFFImageIOMultResTest2 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOMultResTest2.tif + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/cthead1-multires.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOMultResTest2.tif + 3) +itk_add_test( + NAME + itkTIFFImageIOSpacing + COMMAND + ITKIOTIFFTestDriver + itkTIFFImageIOTest2 + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOSpacing.tif) +itk_add_test( + NAME + itkTIFFImageIOFloatTest + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{Baseline/rampFloat.tif} + ${ITK_TEST_OUTPUT_DIR}/rampFloat.tif + itkTIFFImageIOTest + DATA{Baseline/rampFloat.tif} + ${ITK_TEST_OUTPUT_DIR}/rampFloat.tif + 3 + 4) +itk_add_test( + NAME + itkTIFFImageIORGBATest + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{Baseline/itkTIFFImageIORGBATestBaseline.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIORGBATest.tif + itkTIFFImageIOTest + DATA{Input/RGBAHead.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIORGBATest.tif + 3 + 5) -itk_add_test(NAME itkTIFFImageIOOrientation1 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.tif} - ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOOrientation1.tif - itkTIFFImageIOTest DATA{Input/cthead_oriet_tl.tif} ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOOrientation1.tif 2 1) -itk_add_test(NAME itkTIFFImageIOOrientation2 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.tif} - ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOOrientation2.tif - itkTIFFImageIOTest DATA{Input/cthead_oriet_bl.tif} ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOOrientation2.tif 2 1) -itk_add_test(NAME itkTIFFImageIOOrientation3 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.tif} - ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOOrientation3.tif - itkTIFFImageIOTest DATA{Input/cthead_oriet_br.tif} ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOOrientation3.tif 2 1) -itk_add_test(NAME itkTIFFImageIOOrientation4 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.tif} - ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOOrientation4.tif - itkTIFFImageIOTest DATA{Input/cthead_oriet_tr.tif} ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOOrientation4.tif 2 1) -itk_add_test(NAME itkTIFFImageIOPlannarConfig1 - COMMAND ITKIOTIFFTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOPlannarConfig1.tif - e3db5c8b5ddfb17dc708330c66a22659 - itkTIFFImageIOTest DATA{Input/oxford.tif} ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOPlannarConfig1.tif 2 1) -itk_add_test(NAME itkTIFFImageIOPlannarConfig2 - COMMAND ITKIOTIFFTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOPlannarConfig2.tif - 91975481ba66709c8f3ccb538af5cd2a - itkTIFFImageIOTest DATA{Input/ps-separated.tif} ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOPlannarConfig2.tif 2 1) -itk_add_test(NAME itkTIFFImageIOTestUShortPlanarConfig2 - COMMAND ITKIOTIFFTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/ShortPlanarTestImage.tiff} - ${ITK_TEST_OUTPUT_DIR}/ShortPlanarTestImage.tiff - itkTIFFImageIOTest DATA{${ITK_DATA_ROOT}/Input/ShortPlanarTestImage.tiff} ${ITK_TEST_OUTPUT_DIR}/ShortPlanarTestImage.tiff 2 5) - -itk_add_test(NAME itkTIFFImageIOInfoTest1 - COMMAND ITKIOTIFFTestDriver - itkTIFFImageIOInfoTest DATA{Input/single-channel.ome.tif}) -set_tests_properties(itkTIFFImageIOInfoTest1 - PROPERTIES PASS_REGULAR_EXPRESSION "OME-XML metadata block") -itk_add_test(NAME itkTIFFImageIOInfoTest2 - COMMAND ITKIOTIFFTestDriver - itkTIFFImageIOInfoTest DATA{Input/ps-separated.tif}) -set_tests_properties(itkTIFFImageIOInfoTest2 - PROPERTIES PASS_REGULAR_EXPRESSION "2014:09:24 14:16:01") -itk_add_test(NAME itkTIFFImageIOInfoTest3 - COMMAND ITKIOTIFFTestDriver - itkTIFFImageIOInfoTest DATA{Input/3d_spacing.tif}) -set_tests_properties(itkTIFFImageIOInfoTest3 - PROPERTIES PASS_REGULAR_EXPRESSION "17 19 1") +itk_add_test( + NAME + itkTIFFImageIOOrientation1 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOOrientation1.tif + itkTIFFImageIOTest + DATA{Input/cthead_oriet_tl.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOOrientation1.tif + 2 + 1) +itk_add_test( + NAME + itkTIFFImageIOOrientation2 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOOrientation2.tif + itkTIFFImageIOTest + DATA{Input/cthead_oriet_bl.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOOrientation2.tif + 2 + 1) +itk_add_test( + NAME + itkTIFFImageIOOrientation3 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOOrientation3.tif + itkTIFFImageIOTest + DATA{Input/cthead_oriet_br.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOOrientation3.tif + 2 + 1) +itk_add_test( + NAME + itkTIFFImageIOOrientation4 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/cthead1.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOOrientation4.tif + itkTIFFImageIOTest + DATA{Input/cthead_oriet_tr.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOOrientation4.tif + 2 + 1) +itk_add_test( + NAME + itkTIFFImageIOPlannarConfig1 + COMMAND + ITKIOTIFFTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOPlannarConfig1.tif + e3db5c8b5ddfb17dc708330c66a22659 + itkTIFFImageIOTest + DATA{Input/oxford.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOPlannarConfig1.tif + 2 + 1) +itk_add_test( + NAME + itkTIFFImageIOPlannarConfig2 + COMMAND + ITKIOTIFFTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOPlannarConfig2.tif + 91975481ba66709c8f3ccb538af5cd2a + itkTIFFImageIOTest + DATA{Input/ps-separated.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOPlannarConfig2.tif + 2 + 1) +itk_add_test( + NAME + itkTIFFImageIOTestUShortPlanarConfig2 + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/ShortPlanarTestImage.tiff} + ${ITK_TEST_OUTPUT_DIR}/ShortPlanarTestImage.tiff + itkTIFFImageIOTest + DATA{${ITK_DATA_ROOT}/Input/ShortPlanarTestImage.tiff} + ${ITK_TEST_OUTPUT_DIR}/ShortPlanarTestImage.tiff + 2 + 5) +itk_add_test( + NAME + itkTIFFImageIOInfoTest1 + COMMAND + ITKIOTIFFTestDriver + itkTIFFImageIOInfoTest + DATA{Input/single-channel.ome.tif}) +set_tests_properties(itkTIFFImageIOInfoTest1 PROPERTIES PASS_REGULAR_EXPRESSION "OME-XML metadata block") +itk_add_test( + NAME + itkTIFFImageIOInfoTest2 + COMMAND + ITKIOTIFFTestDriver + itkTIFFImageIOInfoTest + DATA{Input/ps-separated.tif}) +set_tests_properties(itkTIFFImageIOInfoTest2 PROPERTIES PASS_REGULAR_EXPRESSION "2014:09:24 14:16:01") +itk_add_test( + NAME + itkTIFFImageIOInfoTest3 + COMMAND + ITKIOTIFFTestDriver + itkTIFFImageIOInfoTest + DATA{Input/3d_spacing.tif}) +set_tests_properties(itkTIFFImageIOInfoTest3 PROPERTIES PASS_REGULAR_EXPRESSION "17 19 1") ###################### # Test Compression -set (Compression "NoCompression;LZW;JPEG;PackBits;Deflate") -set (CompressionFiles "cthead1;RGBTestImageJPEG") +set(Compression "NoCompression;LZW;JPEG;PackBits;Deflate") +set(CompressionFiles "cthead1;RGBTestImageJPEG") foreach(f ${CompressionFiles}) foreach(c ${Compression}) - set (file TestTIFFCompression_${f}_${c}.tif}) - itk_add_test(NAME itkTIFFImageIOCompression_${f}_${c} - COMMAND ITKIOTIFFTestDriver - --compare DATA{Baseline/TestTIFFCompression_${f}_${c}.tif} - ${ITK_TEST_OUTPUT_DIR}/TestTIFFCompression_${f}_${c}.tif - itkTIFFImageIOCompressionTest DATA{${ITK_DATA_ROOT}/Input/${f}.tif} ${ITK_TEST_OUTPUT_DIR}/TestTIFFCompression_${f}_${c}.tif ${c}) - endforeach() + set(file TestTIFFCompression_${f}_${c}.tif}) + itk_add_test( + NAME + itkTIFFImageIOCompression_${f}_${c} + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{Baseline/TestTIFFCompression_${f}_${c}.tif} + ${ITK_TEST_OUTPUT_DIR}/TestTIFFCompression_${f}_${c}.tif + itkTIFFImageIOCompressionTest + DATA{${ITK_DATA_ROOT}/Input/${f}.tif} + ${ITK_TEST_OUTPUT_DIR}/TestTIFFCompression_${f}_${c}.tif + ${c}) + endforeach() endforeach() -set (Compression "JPEG") -set (CompressionFiles "cthead1") -set (Quality "1;50;100") +set(Compression "JPEG") +set(CompressionFiles "cthead1") +set(Quality "1;50;100") foreach(f ${CompressionFiles}) foreach(q ${Quality}) - set (file TestTIFFCompression_${f}_JPEG_${q}.tif}) - itk_add_test(NAME itkTIFFImageIOCompression_${f}_JPEG_${q} - COMMAND ITKIOTIFFTestDriver - --compare DATA{Baseline/TestTIFFCompression_${f}_JPEG_${q}.tif} - ${ITK_TEST_OUTPUT_DIR}/TestTIFFCompression_${f}_JPEG_${q}.tif - itkTIFFImageIOCompressionTest DATA{${ITK_DATA_ROOT}/Input/${f}.tif} ${ITK_TEST_OUTPUT_DIR}/TestTIFFCompression_${f}_JPEG_${q}.tif JPEG ${q}) - endforeach() + set(file TestTIFFCompression_${f}_JPEG_${q}.tif}) + itk_add_test( + NAME + itkTIFFImageIOCompression_${f}_JPEG_${q} + COMMAND + ITKIOTIFFTestDriver + --compare + DATA{Baseline/TestTIFFCompression_${f}_JPEG_${q}.tif} + ${ITK_TEST_OUTPUT_DIR}/TestTIFFCompression_${f}_JPEG_${q}.tif + itkTIFFImageIOCompressionTest + DATA{${ITK_DATA_ROOT}/Input/${f}.tif} + ${ITK_TEST_OUTPUT_DIR}/TestTIFFCompression_${f}_JPEG_${q}.tif + JPEG + ${q}) + endforeach() endforeach() ###################### if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 5) # Image of 1.67 Gigabytes (pixels size is 16bits) - itk_add_test(NAME itkLargeTIFFImageWriteReadTest1 - COMMAND ITKIOTIFFTestDriver - itkLargeTIFFImageWriteReadTest ${ITK_TEST_OUTPUT_DIR}/LargeImage01.tif 30000L) + itk_add_test( + NAME + itkLargeTIFFImageWriteReadTest1 + COMMAND + ITKIOTIFFTestDriver + itkLargeTIFFImageWriteReadTest + ${ITK_TEST_OUTPUT_DIR}/LargeImage01.tif + 30000L) # Image of 2.98 Gigabytes (pixels size is 16bits) - itk_add_test(NAME itkLargeTIFFImageWriteReadTest2 - COMMAND ITKIOTIFFTestDriver - itkLargeTIFFImageWriteReadTest ${ITK_TEST_OUTPUT_DIR}/LargeImage02.tif 40000L) + itk_add_test( + NAME + itkLargeTIFFImageWriteReadTest2 + COMMAND + ITKIOTIFFTestDriver + itkLargeTIFFImageWriteReadTest + ${ITK_TEST_OUTPUT_DIR}/LargeImage02.tif + 40000L) # Image of 4.9 Gigabytes (pixels size is 8-bits out and 16-bit in) - itk_add_test(NAME itkLargeTIFFImageWriteReadTest3 - COMMAND ITKIOTIFFTestDriver - itkLargeTIFFImageWriteReadTest ${ITK_TEST_OUTPUT_DIR}/LargeImage03.tif 50000L) + itk_add_test( + NAME + itkLargeTIFFImageWriteReadTest3 + COMMAND + ITKIOTIFFTestDriver + itkLargeTIFFImageWriteReadTest + ${ITK_TEST_OUTPUT_DIR}/LargeImage03.tif + 50000L) # Due to the large memory requirements this tests must be run one by one - set_tests_properties(itkLargeTIFFImageWriteReadTest1 - itkLargeTIFFImageWriteReadTest2 - itkLargeTIFFImageWriteReadTest3 - PROPERTIES - LABELS BigIO - RESOURCE_LOCK MEMORY_SIZE - ) - set_property(TEST itkLargeTIFFImageWriteReadTest1 APPEND PROPERTY LABELS RUNS_LONG) - set_property(TEST itkLargeTIFFImageWriteReadTest1 APPEND PROPERTY RUN_SERIAL True) - set_property(TEST itkLargeTIFFImageWriteReadTest2 APPEND PROPERTY LABELS RUNS_LONG) - set_property(TEST itkLargeTIFFImageWriteReadTest2 APPEND PROPERTY RUN_SERIAL True) - set_property(TEST itkLargeTIFFImageWriteReadTest3 APPEND PROPERTY LABELS RUNS_LONG) - set_property(TEST itkLargeTIFFImageWriteReadTest3 APPEND PROPERTY RUN_SERIAL True) + set_tests_properties( + itkLargeTIFFImageWriteReadTest1 itkLargeTIFFImageWriteReadTest2 itkLargeTIFFImageWriteReadTest3 + PROPERTIES LABELS + BigIO + RESOURCE_LOCK + MEMORY_SIZE) + set_property( + TEST itkLargeTIFFImageWriteReadTest1 + APPEND + PROPERTY LABELS RUNS_LONG) + set_property( + TEST itkLargeTIFFImageWriteReadTest1 + APPEND + PROPERTY RUN_SERIAL True) + set_property( + TEST itkLargeTIFFImageWriteReadTest2 + APPEND + PROPERTY LABELS RUNS_LONG) + set_property( + TEST itkLargeTIFFImageWriteReadTest2 + APPEND + PROPERTY RUN_SERIAL True) + set_property( + TEST itkLargeTIFFImageWriteReadTest3 + APPEND + PROPERTY LABELS RUNS_LONG) + set_property( + TEST itkLargeTIFFImageWriteReadTest3 + APPEND + PROPERTY RUN_SERIAL True) endif() - if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 12) # Image of 9.12 Gigabytes (pixels size is 16bits) - itk_add_test(NAME itkLargeTIFFImageWriteReadTest4 - COMMAND ITKIOTIFFTestDriver - itkLargeTIFFImageWriteReadTest ${ITK_TEST_OUTPUT_DIR}/LargeImage04.tif 70000L) + itk_add_test( + NAME + itkLargeTIFFImageWriteReadTest4 + COMMAND + ITKIOTIFFTestDriver + itkLargeTIFFImageWriteReadTest + ${ITK_TEST_OUTPUT_DIR}/LargeImage04.tif + 70000L) # Due to the large memory requirements this tests must lock the memory size resource - set_tests_properties(itkLargeTIFFImageWriteReadTest4 - PROPERTIES - LABELS BigIO - RESOURCE_LOCK MEMORY_SIZE - COST 30 - ) - set_property(TEST itkLargeTIFFImageWriteReadTest4 APPEND PROPERTY LABELS RUNS_LONG) - set_property(TEST itkLargeTIFFImageWriteReadTest4 APPEND PROPERTY RUN_SERIAL True) + set_tests_properties( + itkLargeTIFFImageWriteReadTest4 + PROPERTIES LABELS + BigIO + RESOURCE_LOCK + MEMORY_SIZE + COST + 30) + set_property( + TEST itkLargeTIFFImageWriteReadTest4 + APPEND + PROPERTY LABELS RUNS_LONG) + set_property( + TEST itkLargeTIFFImageWriteReadTest4 + APPEND + PROPERTY RUN_SERIAL True) endif() # expand + RGB image -itk_add_test(NAME itkTIFFImageIOTestRGBExpanded - COMMAND ITKIOTIFFTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestRGBExpanded.tif - b38e265b776d8b9b23a6fb1180089b05 - itkTIFFImageIOTestPalette DATA{Baseline/TestTIFFCompression_RGBTestImageJPEG_PackBits.tif} ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestRGBExpanded.tif 1 0) +itk_add_test( + NAME + itkTIFFImageIOTestRGBExpanded + COMMAND + ITKIOTIFFTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestRGBExpanded.tif + b38e265b776d8b9b23a6fb1180089b05 + itkTIFFImageIOTestPalette + DATA{Baseline/TestTIFFCompression_RGBTestImageJPEG_PackBits.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestRGBExpanded.tif + 1 + 0) # not expand + RGB image -itk_add_test(NAME itkTIFFImageIOTestRGBNotExpanded - COMMAND ITKIOTIFFTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestRGBNotExpanded.tif - b38e265b776d8b9b23a6fb1180089b05 - itkTIFFImageIOTestPalette DATA{Baseline/TestTIFFCompression_RGBTestImageJPEG_PackBits.tif} ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestRGBNotExpanded.tif 0 0) +itk_add_test( + NAME + itkTIFFImageIOTestRGBNotExpanded + COMMAND + ITKIOTIFFTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestRGBNotExpanded.tif + b38e265b776d8b9b23a6fb1180089b05 + itkTIFFImageIOTestPalette + DATA{Baseline/TestTIFFCompression_RGBTestImageJPEG_PackBits.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestRGBNotExpanded.tif + 0 + 0) # not expand + palette image -itk_add_test(NAME itkTIFFImageIOTestPaletteNotExpanded - COMMAND ITKIOTIFFTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestPaletteNotExpanded.tif - 6bc3fbf2c6743260a777c9244bd88b58 - itkTIFFImageIOTestPalette DATA{Input/HeliconiusNumataPalette.tif} ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestPaletteNotExpanded.tif 0 1) +itk_add_test( + NAME + itkTIFFImageIOTestPaletteNotExpanded + COMMAND + ITKIOTIFFTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestPaletteNotExpanded.tif + 6bc3fbf2c6743260a777c9244bd88b58 + itkTIFFImageIOTestPalette + DATA{Input/HeliconiusNumataPalette.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestPaletteNotExpanded.tif + 0 + 1) # expand + palette image -itk_add_test(NAME itkTIFFImageIOTestPaletteExpanded - COMMAND ITKIOTIFFTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestPaletteExpanded.tif - 1e1a89a70b7cb472f55c450909df7b77 - itkTIFFImageIOTestPalette DATA{Input/HeliconiusNumataPalette.tif} ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestPaletteExpanded.tif 1 1) +itk_add_test( + NAME + itkTIFFImageIOTestPaletteExpanded + COMMAND + ITKIOTIFFTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestPaletteExpanded.tif + 1e1a89a70b7cb472f55c450909df7b77 + itkTIFFImageIOTestPalette + DATA{Input/HeliconiusNumataPalette.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestPaletteExpanded.tif + 1 + 1) # not expand + grey palette image -itk_add_test(NAME itkTIFFImageIOTestGreyPaletteNotExpanded - COMMAND ITKIOTIFFTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestGreyPaletteNotExpanded.tif - 6bc3fbf2c6743260a777c9244bd88b58 - itkTIFFImageIOTestPalette DATA{Input/HeliconiusNumataPalette.tif} ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestGreyPaletteNotExpanded.tif 0 1) +itk_add_test( + NAME + itkTIFFImageIOTestGreyPaletteNotExpanded + COMMAND + ITKIOTIFFTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestGreyPaletteNotExpanded.tif + 6bc3fbf2c6743260a777c9244bd88b58 + itkTIFFImageIOTestPalette + DATA{Input/HeliconiusNumataPalette.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestGreyPaletteNotExpanded.tif + 0 + 1) # expand + grey palette image -itk_add_test(NAME itkTIFFImageIOTestGreyPaletteExpanded - COMMAND ITKIOTIFFTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestGreyPaletteExpanded.tif - 1e1a89a70b7cb472f55c450909df7b77 - itkTIFFImageIOTestPalette DATA{Input/HeliconiusNumataPalette.tif} ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestGreyPaletteExpanded.tif 1 1) +itk_add_test( + NAME + itkTIFFImageIOTestGreyPaletteExpanded + COMMAND + ITKIOTIFFTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestGreyPaletteExpanded.tif + 1e1a89a70b7cb472f55c450909df7b77 + itkTIFFImageIOTestPalette + DATA{Input/HeliconiusNumataPalette.tif} + ${ITK_TEST_OUTPUT_DIR}/itkTIFFImageIOTestGreyPaletteExpanded.tif + 1 + 1) -itk_add_test(NAME itkTIFFImageIOIntPixelTest - COMMAND ITKIOTIFFTestDriver - itkTIFFImageIOIntPixelTest DATA{Input/int.tiff}) +itk_add_test( + NAME + itkTIFFImageIOIntPixelTest + COMMAND + ITKIOTIFFTestDriver + itkTIFFImageIOIntPixelTest + DATA{Input/int.tiff}) diff --git a/Modules/IO/TransformBase/CMakeLists.txt b/Modules/IO/TransformBase/CMakeLists.txt index 83b70ecc4c3..51634e4c22e 100644 --- a/Modules/IO/TransformBase/CMakeLists.txt +++ b/Modules/IO/TransformBase/CMakeLists.txt @@ -1,7 +1,9 @@ project(ITKIOTransformBase) set(ITKIOTransformBase_LIBRARIES ITKIOTransformBase) -set(ITK_TRANSFORM_FACTORY_MAX_DIM 4 CACHE STRING "The transform dimensions in the range [2,(this number)] supported by the TransformIO.") +set(ITK_TRANSFORM_FACTORY_MAX_DIM + 4 + CACHE STRING "The transform dimensions in the range [2,(this number)] supported by the TransformIO.") mark_as_advanced(ITK_TRANSFORM_FACTORY_MAX_DIM) if(ITK_TRANSFORM_FACTORY_MAX_DIM LESS "3") message(FATAL_ERROR "ITK_TRANSFORM_FACTORY_MAX_DIM must be an integer greater than 2.") diff --git a/Modules/IO/TransformBase/itk-module.cmake b/Modules/IO/TransformBase/itk-module.cmake index e44386883ce..941b378e258 100644 --- a/Modules/IO/TransformBase/itk-module.cmake +++ b/Modules/IO/TransformBase/itk-module.cmake @@ -1,16 +1,16 @@ set(DOCUMENTATION "This module contains the base classes for the input and output of itkTransform objects.") -itk_module(ITKIOTransformBase +itk_module( + ITKIOTransformBase ENABLE_SHARED DEPENDS - ITKCommon - ITKTransform - ITKTransformFactory + ITKCommon + ITKTransform + ITKTransformFactory COMPILE_DEPENDS - ITKDisplacementField + ITKDisplacementField TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/TransformBase/src/CMakeLists.txt b/Modules/IO/TransformBase/src/CMakeLists.txt index 1067c005b52..b9560e10f4c 100644 --- a/Modules/IO/TransformBase/src/CMakeLists.txt +++ b/Modules/IO/TransformBase/src/CMakeLists.txt @@ -1,9 +1,8 @@ set(ITKIOTransformBase_SRCS - itkCompositeTransformIOHelper.cxx - itkTransformFileReader.cxx - itkTransformFileWriterSpecializations.cxx - itkTransformIOBase.cxx - itkTransformIOFactory.cxx - ) + itkCompositeTransformIOHelper.cxx + itkTransformFileReader.cxx + itkTransformFileWriterSpecializations.cxx + itkTransformIOBase.cxx + itkTransformIOFactory.cxx) itk_module_add_library(ITKIOTransformBase ${ITKIOTransformBase_SRCS}) diff --git a/Modules/IO/TransformBase/test/CMakeLists.txt b/Modules/IO/TransformBase/test/CMakeLists.txt index 8a0ad99a12e..be150ea16f8 100644 --- a/Modules/IO/TransformBase/test/CMakeLists.txt +++ b/Modules/IO/TransformBase/test/CMakeLists.txt @@ -1,12 +1,17 @@ itk_module_test() -set(ITKIOTransformBaseTests -itkTransformFileReaderTest.cxx -itkTransformFileWriterTest.cxx -) +set(ITKIOTransformBaseTests itkTransformFileReaderTest.cxx itkTransformFileWriterTest.cxx) -CreateTestDriver(ITKIOTransformBase "${ITKIOTransformBase-Test_LIBRARIES}" "${ITKIOTransformBaseTests}") +createtestdriver(ITKIOTransformBase "${ITKIOTransformBase-Test_LIBRARIES}" "${ITKIOTransformBaseTests}") -itk_add_test(NAME itkTransformFileReaderTest - COMMAND ITKIOTransformBaseTestDriver itkTransformFileReaderTest) -itk_add_test(NAME itkTransformFileWriterTest - COMMAND ITKIOTransformBaseTestDriver itkTransformFileWriterTest) +itk_add_test( + NAME + itkTransformFileReaderTest + COMMAND + ITKIOTransformBaseTestDriver + itkTransformFileReaderTest) +itk_add_test( + NAME + itkTransformFileWriterTest + COMMAND + ITKIOTransformBaseTestDriver + itkTransformFileWriterTest) diff --git a/Modules/IO/TransformBase/wrapping/itkTransformFileReader.wrap b/Modules/IO/TransformBase/wrapping/itkTransformFileReader.wrap index 559ce4c00d4..f2b91653b0d 100644 --- a/Modules/IO/TransformBase/wrapping/itkTransformFileReader.wrap +++ b/Modules/IO/TransformBase/wrapping/itkTransformFileReader.wrap @@ -1,8 +1,8 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkTransformFileReader.h") itk_wrap_class("itk::TransformFileReaderTemplate" POINTER) - UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(types "D;${WRAP_ITK_REAL}") +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/IO/TransformBase/wrapping/itkTransformFileWriter.wrap b/Modules/IO/TransformBase/wrapping/itkTransformFileWriter.wrap index ae9f73c80d7..02ee89d138d 100644 --- a/Modules/IO/TransformBase/wrapping/itkTransformFileWriter.wrap +++ b/Modules/IO/TransformBase/wrapping/itkTransformFileWriter.wrap @@ -1,8 +1,8 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkTransformFileWriter.h") itk_wrap_class("itk::TransformFileWriterTemplate" POINTER) - UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(types "D;${WRAP_ITK_REAL}") +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/IO/TransformBase/wrapping/itkTransformIOBaseTemplate.wrap b/Modules/IO/TransformBase/wrapping/itkTransformIOBaseTemplate.wrap index f251f37f0de..b7ee33966e7 100644 --- a/Modules/IO/TransformBase/wrapping/itkTransformIOBaseTemplate.wrap +++ b/Modules/IO/TransformBase/wrapping/itkTransformIOBaseTemplate.wrap @@ -1,9 +1,9 @@ -UNIQUE(types "D;${WRAP_ITK_REAL}") +unique(types "D;${WRAP_ITK_REAL}") set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkTransformIOBase.h") itk_wrap_class("itk::TransformIOBaseTemplate" POINTER) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/IO/TransformFactory/CMakeLists.txt b/Modules/IO/TransformFactory/CMakeLists.txt index 36e2f3e5bc5..8fb7249c102 100644 --- a/Modules/IO/TransformFactory/CMakeLists.txt +++ b/Modules/IO/TransformFactory/CMakeLists.txt @@ -1,7 +1,9 @@ project(ITKTransformFactory) set(ITKTransformFactory_LIBRARIES ITKTransformFactory) -set(ITK_TRANSFORM_FACTORY_MAX_DIM 4 CACHE STRING "The transform dimensions in the range [2-(this number)] supported by the TransformIO.") +set(ITK_TRANSFORM_FACTORY_MAX_DIM + 4 + CACHE STRING "The transform dimensions in the range [2-(this number)] supported by the TransformIO.") mark_as_advanced(ITK_TRANSFORM_FACTORY_MAX_DIM) if(ITK_TRANSFORM_FACTORY_MAX_DIM LESS "3") message(FATAL_ERROR "ITK_TRANSFORM_FACTORY_MAX_DIM must be an integer greater than 2.") diff --git a/Modules/IO/TransformFactory/itk-module.cmake b/Modules/IO/TransformFactory/itk-module.cmake index a344c26d966..c90a46b0a55 100644 --- a/Modules/IO/TransformFactory/itk-module.cmake +++ b/Modules/IO/TransformFactory/itk-module.cmake @@ -1,14 +1,14 @@ set(DOCUMENTATION "This module contains a factory to create transforms from a string identifier.") -itk_module(ITKTransformFactory +itk_module( + ITKTransformFactory DEPENDS - ITKCommon - ITKTransform + ITKCommon + ITKTransform COMPILE_DEPENDS - ITKDisplacementField + ITKDisplacementField TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/TransformFactory/src/CMakeLists.txt b/Modules/IO/TransformFactory/src/CMakeLists.txt index df40a1ffd77..640a830656f 100644 --- a/Modules/IO/TransformFactory/src/CMakeLists.txt +++ b/Modules/IO/TransformFactory/src/CMakeLists.txt @@ -1,8 +1,5 @@ -set(ITKTransformFactory_SRCS - itkTransformFactoryBase.cxx - itkTransformFactoryBaseRegisterFloatParameters.cxx - itkTransformFactoryBaseRegisterDoubleParameters.cxx - ) +set(ITKTransformFactory_SRCS itkTransformFactoryBase.cxx itkTransformFactoryBaseRegisterFloatParameters.cxx + itkTransformFactoryBaseRegisterDoubleParameters.cxx) add_definitions("-DITK_TRANSFORM_FACTORY_MAX_DIM=${ITK_TRANSFORM_FACTORY_MAX_DIM}") itk_module_add_library(ITKTransformFactory ${ITKTransformFactory_SRCS}) diff --git a/Modules/IO/TransformFactory/test/CMakeLists.txt b/Modules/IO/TransformFactory/test/CMakeLists.txt index 7dc740f9ee7..18d5bb480d7 100644 --- a/Modules/IO/TransformFactory/test/CMakeLists.txt +++ b/Modules/IO/TransformFactory/test/CMakeLists.txt @@ -1,10 +1,12 @@ itk_module_test() -set(ITKTransformFactoryTests -itkTransformFactoryBaseTest.cxx -) +set(ITKTransformFactoryTests itkTransformFactoryBaseTest.cxx) add_definitions("-DITK_TRANSFORM_FACTORY_MAX_DIM=${ITK_TRANSFORM_FACTORY_MAX_DIM}") -CreateTestDriver(ITKTransformFactory "${ITKTransformFactory-Test_LIBRARIES}" "${ITKTransformFactoryTests}") +createtestdriver(ITKTransformFactory "${ITKTransformFactory-Test_LIBRARIES}" "${ITKTransformFactoryTests}") -itk_add_test(NAME itkTransformFactoryBaseTest - COMMAND ITKTransformFactoryTestDriver itkTransformFactoryBaseTest) +itk_add_test( + NAME + itkTransformFactoryBaseTest + COMMAND + ITKTransformFactoryTestDriver + itkTransformFactoryBaseTest) diff --git a/Modules/IO/TransformHDF5/itk-module.cmake b/Modules/IO/TransformHDF5/itk-module.cmake index 0b222016973..bfac7a43670 100644 --- a/Modules/IO/TransformHDF5/itk-module.cmake +++ b/Modules/IO/TransformHDF5/itk-module.cmake @@ -1,16 +1,16 @@ set(DOCUMENTATION "This module contains the classes for the input and output of itkTransform object in HDF5 format.") -itk_module(ITKIOTransformHDF5 +itk_module( + ITKIOTransformHDF5 ENABLE_SHARED DEPENDS - ITKIOTransformBase + ITKIOTransformBase PRIVATE_DEPENDS - ITKHDF5 + ITKHDF5 TEST_DEPENDS - ITKTestKernel + ITKTestKernel FACTORY_NAMES - TransformIO::HDF5 + TransformIO::HDF5 DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/TransformHDF5/src/CMakeLists.txt b/Modules/IO/TransformHDF5/src/CMakeLists.txt index b11c3ea82db..fbdae3c2407 100644 --- a/Modules/IO/TransformHDF5/src/CMakeLists.txt +++ b/Modules/IO/TransformHDF5/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOTransformHDF5_SRCS - itkHDF5TransformIO.cxx - itkHDF5TransformIOFactory.cxx - ) +set(ITKIOTransformHDF5_SRCS itkHDF5TransformIO.cxx itkHDF5TransformIOFactory.cxx) itk_module_add_library(ITKIOTransformHDF5 ${ITKIOTransformHDF5_SRCS}) diff --git a/Modules/IO/TransformHDF5/test/CMakeLists.txt b/Modules/IO/TransformHDF5/test/CMakeLists.txt index 5d71baa26aa..c10818ffd67 100644 --- a/Modules/IO/TransformHDF5/test/CMakeLists.txt +++ b/Modules/IO/TransformHDF5/test/CMakeLists.txt @@ -1,20 +1,37 @@ itk_module_test() -set(ITKIOTransformHDF5Tests -itkIOTransformHDF5Test.cxx -itkThinPlateTransformWriteReadTest.cxx -) +set(ITKIOTransformHDF5Tests itkIOTransformHDF5Test.cxx itkThinPlateTransformWriteReadTest.cxx) -CreateTestDriver(ITKIOTransformHDF5 "${ITKIOTransformHDF5-Test_LIBRARIES}" "${ITKIOTransformHDF5Tests}") +createtestdriver(ITKIOTransformHDF5 "${ITKIOTransformHDF5-Test_LIBRARIES}" "${ITKIOTransformHDF5Tests}") -itk_add_test(NAME itkIOTransformHDF5Test - COMMAND ITKIOTransformHDF5TestDriver itkIOTransformHDF5Test uncompressed) +itk_add_test( + NAME + itkIOTransformHDF5Test + COMMAND + ITKIOTransformHDF5TestDriver + itkIOTransformHDF5Test + uncompressed) -itk_add_test(NAME itkIOTransformHDF5TestCompressed - COMMAND ITKIOTransformHDF5TestDriver itkIOTransformHDF5Test compressed) +itk_add_test( + NAME + itkIOTransformHDF5TestCompressed + COMMAND + ITKIOTransformHDF5TestDriver + itkIOTransformHDF5Test + compressed) -itk_add_test(NAME itkThinPlateTransformWriteReadTest - COMMAND ITKIOTransformHDF5TestDriver itkThinPlateTransformWriteReadTest ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkThinPlateTransformWriteReadTest + COMMAND + ITKIOTransformHDF5TestDriver + itkThinPlateTransformWriteReadTest + ${ITK_TEST_OUTPUT_DIR}) # A test to read transform file that was written before v5.0a02 when the internal paths were incorrect -itk_add_test(NAME itkReadOldHDF5MisspelledPathTest - COMMAND ITKIOTransformHDF5TestDriver itkIOTransformHDF5Test DATA{${ITK_DATA_ROOT}/Input/historical_misspelled_TranformParameters.h5}) +itk_add_test( + NAME + itkReadOldHDF5MisspelledPathTest + COMMAND + ITKIOTransformHDF5TestDriver + itkIOTransformHDF5Test + DATA{${ITK_DATA_ROOT}/Input/historical_misspelled_TranformParameters.h5}) diff --git a/Modules/IO/TransformHDF5/wrapping/itkHDF5TransformIO.wrap b/Modules/IO/TransformHDF5/wrapping/itkHDF5TransformIO.wrap index 5f3a7533b79..ffed5e9d2c7 100644 --- a/Modules/IO/TransformHDF5/wrapping/itkHDF5TransformIO.wrap +++ b/Modules/IO/TransformHDF5/wrapping/itkHDF5TransformIO.wrap @@ -1,13 +1,13 @@ -UNIQUE(types "D;${WRAP_ITK_REAL}") +unique(types "D;${WRAP_ITK_REAL}") set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkHDF5TransformIO.h") itk_wrap_simple_class("itk::HDF5CommonPathNames") itk_wrap_class("itk::HDF5TransformIOTemplate" POINTER) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS ON) diff --git a/Modules/IO/TransformInsightLegacy/itk-module.cmake b/Modules/IO/TransformInsightLegacy/itk-module.cmake index 318604fb97e..230cdd17bc7 100644 --- a/Modules/IO/TransformInsightLegacy/itk-module.cmake +++ b/Modules/IO/TransformInsightLegacy/itk-module.cmake @@ -1,16 +1,16 @@ set(DOCUMENTATION "This module contains the classes for the input and output of itkTransform object in txt format.") -itk_module(ITKIOTransformInsightLegacy +itk_module( + ITKIOTransformInsightLegacy ENABLE_SHARED DEPENDS - ITKIOTransformBase + ITKIOTransformBase PRIVATE_DEPENDS - ITKDoubleConversion + ITKDoubleConversion TEST_DEPENDS - ITKTestKernel + ITKTestKernel FACTORY_NAMES - TransformIO::Txt + TransformIO::Txt DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/TransformInsightLegacy/src/CMakeLists.txt b/Modules/IO/TransformInsightLegacy/src/CMakeLists.txt index ee8cf1aeb63..e586d0614b8 100644 --- a/Modules/IO/TransformInsightLegacy/src/CMakeLists.txt +++ b/Modules/IO/TransformInsightLegacy/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOTransformInsightLegacy_SRCS - itkTxtTransformIO.cxx - itkTxtTransformIOFactory.cxx - ) +set(ITKIOTransformInsightLegacy_SRCS itkTxtTransformIO.cxx itkTxtTransformIOFactory.cxx) itk_module_add_library(ITKIOTransformInsightLegacy ${ITKIOTransformInsightLegacy_SRCS}) diff --git a/Modules/IO/TransformInsightLegacy/test/CMakeLists.txt b/Modules/IO/TransformInsightLegacy/test/CMakeLists.txt index db583f42ffb..a626b42e3a6 100644 --- a/Modules/IO/TransformInsightLegacy/test/CMakeLists.txt +++ b/Modules/IO/TransformInsightLegacy/test/CMakeLists.txt @@ -1,15 +1,22 @@ itk_module_test() -set(ITKIOTransformInsightLegacyTests -itkIOTransformTxtTest.cxx -itkIOEuler3DTransformTxtTest.cxx -) +set(ITKIOTransformInsightLegacyTests itkIOTransformTxtTest.cxx itkIOEuler3DTransformTxtTest.cxx) -CreateTestDriver(ITKIOTransformInsightLegacy "${ITKIOTransformInsightLegacy-Test_LIBRARIES}" "${ITKIOTransformInsightLegacyTests}") +createtestdriver(ITKIOTransformInsightLegacy "${ITKIOTransformInsightLegacy-Test_LIBRARIES}" + "${ITKIOTransformInsightLegacyTests}") -itk_add_test(NAME itkIOTransformTxtTest - COMMAND ITKIOTransformInsightLegacyTestDriver itkIOTransformTxtTest - ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkIOTransformTxtTest + COMMAND + ITKIOTransformInsightLegacyTestDriver + itkIOTransformTxtTest + ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkIOTransformEuler3DTxtTest - COMMAND ITKIOTransformInsightLegacyTestDriver itkIOEuler3DTransformTxtTest - DATA{Input/euler3DOldFormat.tfm} ${ITK_TEST_OUTPUT_DIR}/euler3DNewFormat.tfm) +itk_add_test( + NAME + itkIOTransformEuler3DTxtTest + COMMAND + ITKIOTransformInsightLegacyTestDriver + itkIOEuler3DTransformTxtTest + DATA{Input/euler3DOldFormat.tfm} + ${ITK_TEST_OUTPUT_DIR}/euler3DNewFormat.tfm) diff --git a/Modules/IO/TransformInsightLegacy/wrapping/itkTxtTransformIO.wrap b/Modules/IO/TransformInsightLegacy/wrapping/itkTxtTransformIO.wrap index 941e572794f..720db7cb441 100644 --- a/Modules/IO/TransformInsightLegacy/wrapping/itkTxtTransformIO.wrap +++ b/Modules/IO/TransformInsightLegacy/wrapping/itkTxtTransformIO.wrap @@ -1,11 +1,11 @@ -UNIQUE(types "D;${WRAP_ITK_REAL}") +unique(types "D;${WRAP_ITK_REAL}") set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkTxtTransformIO.h") itk_wrap_class("itk::TxtTransformIOTemplate" POINTER) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS ON) diff --git a/Modules/IO/TransformMINC/CMakeLists.txt b/Modules/IO/TransformMINC/CMakeLists.txt index 339b349a14a..f1015c1b5da 100644 --- a/Modules/IO/TransformMINC/CMakeLists.txt +++ b/Modules/IO/TransformMINC/CMakeLists.txt @@ -2,11 +2,8 @@ project(ITKIOTransformMINC) set(ITKIOTransformMINC_LIBRARIES ITKIOTransformMINC) if(NOT ITK_USE_SYSTEM_HDF5) - include_directories( - "${ITKHDF5_SOURCE_DIR}/src/itkhdf5" - "${ITKHDF5_SOURCE_DIR}/src/itkhdf5/src" - "${ITKHDF5_BINARY_DIR}/src/itkhdf5" - ) + include_directories("${ITKHDF5_SOURCE_DIR}/src/itkhdf5" "${ITKHDF5_SOURCE_DIR}/src/itkhdf5/src" + "${ITKHDF5_BINARY_DIR}/src/itkhdf5") endif() itk_module_impl() diff --git a/Modules/IO/TransformMINC/itk-module.cmake b/Modules/IO/TransformMINC/itk-module.cmake index 89d7dc0aba2..8ec51e40162 100644 --- a/Modules/IO/TransformMINC/itk-module.cmake +++ b/Modules/IO/TransformMINC/itk-module.cmake @@ -1,23 +1,23 @@ set(DOCUMENTATION "This module contains the classes for the input and output of itkTransform object in MINC format (.xfm).") -itk_module(ITKIOTransformMINC +itk_module( + ITKIOTransformMINC ENABLE_SHARED DEPENDS - ITKIOTransformBase - ITKMINC + ITKIOTransformBase + ITKMINC COMPILE_DEPENDS - ITKIOImageBase + ITKIOImageBase PRIVATE_DEPENDS - ITKIOMINC + ITKIOMINC TEST_DEPENDS - ITKTestKernel - ITKDisplacementField - ITKMINC - ITKIOMINC + ITKTestKernel + ITKDisplacementField + ITKMINC + ITKIOMINC FACTORY_NAMES - TransformIO::MINC + TransformIO::MINC DESCRIPTION - "${DOCUMENTATION}" - EXCLUDE_FROM_DEFAULT -) + "${DOCUMENTATION}" + EXCLUDE_FROM_DEFAULT) diff --git a/Modules/IO/TransformMINC/src/CMakeLists.txt b/Modules/IO/TransformMINC/src/CMakeLists.txt index 93cb99b16ed..bcced1a399c 100644 --- a/Modules/IO/TransformMINC/src/CMakeLists.txt +++ b/Modules/IO/TransformMINC/src/CMakeLists.txt @@ -1,7 +1,4 @@ -set(ITKIOTransformMINC_SRC - itkMINCTransformIO.cxx - itkMINCTransformIOFactory.cxx -) +set(ITKIOTransformMINC_SRC itkMINCTransformIO.cxx itkMINCTransformIOFactory.cxx) add_library(ITKIOTransformMINC ${ITK_LIBRARY_BUILD_TYPE} ${ITKIOTransformMINC_SRC}) diff --git a/Modules/IO/TransformMINC/test/CMakeLists.txt b/Modules/IO/TransformMINC/test/CMakeLists.txt index 503a79a15b3..e46dbe1078b 100644 --- a/Modules/IO/TransformMINC/test/CMakeLists.txt +++ b/Modules/IO/TransformMINC/test/CMakeLists.txt @@ -1,23 +1,25 @@ itk_module_test() if(NOT ITK_USE_SYSTEM_HDF5) - include_directories( - "${ITKHDF5_SOURCE_DIR}/src/itkhdf5" - "${ITKHDF5_SOURCE_DIR}/src/itkhdf5/src" - "${ITKHDF5_BINARY_DIR}/src/itkhdf5" - ) + include_directories("${ITKHDF5_SOURCE_DIR}/src/itkhdf5" "${ITKHDF5_SOURCE_DIR}/src/itkhdf5/src" + "${ITKHDF5_BINARY_DIR}/src/itkhdf5") endif() -set(ITKIOTransformMINCTests - itkIOTransformMINCTest.cxx - itkMINCTransformAdapterTest.cxx - ) +set(ITKIOTransformMINCTests itkIOTransformMINCTest.cxx itkMINCTransformAdapterTest.cxx) -CreateTestDriver(ITKIOTransformMINC "${ITKIOTransformMINC-Test_LIBRARIES}" "${ITKIOTransformMINCTests}") - target_link_libraries(ITKIOTransformMINCTestDriver LINK_PUBLIC ITKIOTransformBase) +createtestdriver(ITKIOTransformMINC "${ITKIOTransformMINC-Test_LIBRARIES}" "${ITKIOTransformMINCTests}") +target_link_libraries(ITKIOTransformMINCTestDriver LINK_PUBLIC ITKIOTransformBase) -itk_add_test(NAME itkIOTransformMINCTest - COMMAND ITKIOTransformMINCTestDriver itkIOTransformMINCTest) +itk_add_test( + NAME + itkIOTransformMINCTest + COMMAND + ITKIOTransformMINCTestDriver + itkIOTransformMINCTest) -itk_add_test(NAME itkMINCTransformAdapterTest - COMMAND ITKIOTransformMINCTestDriver itkMINCTransformAdapterTest) +itk_add_test( + NAME + itkMINCTransformAdapterTest + COMMAND + ITKIOTransformMINCTestDriver + itkMINCTransformAdapterTest) diff --git a/Modules/IO/TransformMINC/wrapping/itkMINCTransformIO.wrap b/Modules/IO/TransformMINC/wrapping/itkMINCTransformIO.wrap index ef3a1f90815..4ba4f881d03 100644 --- a/Modules/IO/TransformMINC/wrapping/itkMINCTransformIO.wrap +++ b/Modules/IO/TransformMINC/wrapping/itkMINCTransformIO.wrap @@ -1,10 +1,10 @@ -UNIQUE(types "D;${WRAP_ITK_REAL}") +unique(types "D;${WRAP_ITK_REAL}") set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkMINCTransformIO.h") itk_wrap_class("itk::MINCTransformIOTemplate" POINTER) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS ON) diff --git a/Modules/IO/TransformMatlab/itk-module.cmake b/Modules/IO/TransformMatlab/itk-module.cmake index 314098b2fb3..aa665e7b96f 100644 --- a/Modules/IO/TransformMatlab/itk-module.cmake +++ b/Modules/IO/TransformMatlab/itk-module.cmake @@ -1,14 +1,14 @@ set(DOCUMENTATION "This module contains the classes for the input and output of itkTransform object in Matlab format.") -itk_module(ITKIOTransformMatlab +itk_module( + ITKIOTransformMatlab ENABLE_SHARED DEPENDS - ITKIOTransformBase + ITKIOTransformBase TEST_DEPENDS - ITKTestKernel + ITKTestKernel FACTORY_NAMES - TransformIO::Matlab + TransformIO::Matlab DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/TransformMatlab/src/CMakeLists.txt b/Modules/IO/TransformMatlab/src/CMakeLists.txt index c320c68d7c0..e9e29941310 100644 --- a/Modules/IO/TransformMatlab/src/CMakeLists.txt +++ b/Modules/IO/TransformMatlab/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOTransformMatlab_SRCS - itkMatlabTransformIO.cxx - itkMatlabTransformIOFactory.cxx - ) +set(ITKIOTransformMatlab_SRCS itkMatlabTransformIO.cxx itkMatlabTransformIOFactory.cxx) itk_module_add_library(ITKIOTransformMatlab ${ITKIOTransformMatlab_SRCS}) diff --git a/Modules/IO/TransformMatlab/test/CMakeLists.txt b/Modules/IO/TransformMatlab/test/CMakeLists.txt index 7134305cea4..98a5dc3b922 100644 --- a/Modules/IO/TransformMatlab/test/CMakeLists.txt +++ b/Modules/IO/TransformMatlab/test/CMakeLists.txt @@ -1,9 +1,11 @@ itk_module_test() -set(ITKIOTransformMatlabTests -itkIOTransformMatlabTest.cxx -) +set(ITKIOTransformMatlabTests itkIOTransformMatlabTest.cxx) -CreateTestDriver(ITKIOTransformMatlab "${ITKIOTransformMatlab-Test_LIBRARIES}" "${ITKIOTransformMatlabTests}") +createtestdriver(ITKIOTransformMatlab "${ITKIOTransformMatlab-Test_LIBRARIES}" "${ITKIOTransformMatlabTests}") -itk_add_test(NAME itkIOTransformMatlabTest - COMMAND ITKIOTransformMatlabTestDriver itkIOTransformMatlabTest) +itk_add_test( + NAME + itkIOTransformMatlabTest + COMMAND + ITKIOTransformMatlabTestDriver + itkIOTransformMatlabTest) diff --git a/Modules/IO/TransformMatlab/wrapping/itkMatlabTransformIO.wrap b/Modules/IO/TransformMatlab/wrapping/itkMatlabTransformIO.wrap index 3018b234f3d..7125b7a2ad9 100644 --- a/Modules/IO/TransformMatlab/wrapping/itkMatlabTransformIO.wrap +++ b/Modules/IO/TransformMatlab/wrapping/itkMatlabTransformIO.wrap @@ -1,11 +1,11 @@ -UNIQUE(types "D;${WRAP_ITK_REAL}") +unique(types "D;${WRAP_ITK_REAL}") set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkMatlabTransformIO.h") itk_wrap_class("itk::MatlabTransformIOTemplate" POINTER) - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS ON) diff --git a/Modules/IO/VTK/itk-module.cmake b/Modules/IO/VTK/itk-module.cmake index 5e18d9af977..ecd2d5eb198 100644 --- a/Modules/IO/VTK/itk-module.cmake +++ b/Modules/IO/VTK/itk-module.cmake @@ -1,15 +1,15 @@ set(DOCUMENTATION "This module contains classes for reading and writing image files in the \"legacy\" (non-XML) VTK file format.") -itk_module(ITKIOVTK +itk_module( + ITKIOVTK ENABLE_SHARED PRIVATE_DEPENDS - ITKIOImageBase + ITKIOImageBase TEST_DEPENDS - ITKTestKernel - ITKImageSources + ITKTestKernel + ITKImageSources FACTORY_NAMES - ImageIO::VTK + ImageIO::VTK DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/VTK/src/CMakeLists.txt b/Modules/IO/VTK/src/CMakeLists.txt index 94fe020e475..bfd84bd9df6 100644 --- a/Modules/IO/VTK/src/CMakeLists.txt +++ b/Modules/IO/VTK/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKIOVTK_SRCS - itkVTKImageIOFactory.cxx - itkVTKImageIO.cxx - ) +set(ITKIOVTK_SRCS itkVTKImageIOFactory.cxx itkVTKImageIO.cxx) itk_module_add_library(ITKIOVTK ${ITKIOVTK_SRCS}) diff --git a/Modules/IO/VTK/test/CMakeLists.txt b/Modules/IO/VTK/test/CMakeLists.txt index ea32a65147e..2ed93d8a00c 100644 --- a/Modules/IO/VTK/test/CMakeLists.txt +++ b/Modules/IO/VTK/test/CMakeLists.txt @@ -1,34 +1,64 @@ itk_module_test() set(ITKIOVTKTests -itkVTKImageIO2Test.cxx -itkVTKImageIOTest.cxx -itkVTKImageIO2Test2.cxx -itkVTKImageIOTest2.cxx -itkVTKImageIOTest3.cxx -itkVTKImageIOStreamTest.cxx -itkVTKImageIOFileReadTest.cxx -) + itkVTKImageIO2Test.cxx + itkVTKImageIOTest.cxx + itkVTKImageIO2Test2.cxx + itkVTKImageIOTest2.cxx + itkVTKImageIOTest3.cxx + itkVTKImageIOStreamTest.cxx + itkVTKImageIOFileReadTest.cxx) -CreateTestDriver(ITKIOVTK "${ITKIOVTK-Test_LIBRARIES}" "${ITKIOVTKTests}") +createtestdriver(ITKIOVTK "${ITKIOVTK-Test_LIBRARIES}" "${ITKIOVTKTests}") -itk_add_test(NAME itkVTKImageIO2Test - COMMAND ITKIOVTKTestDriver itkVTKImageIO2Test - ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkVTKImageIOTest - COMMAND ITKIOVTKTestDriver itkVTKImageIOTest - ${ITK_TEST_OUTPUT_DIR}/test1.vtk ${ITK_TEST_OUTPUT_DIR}/test2.vtk) -itk_add_test(NAME itkVTKImageIO2Test2 - COMMAND ITKIOVTKTestDriver itkVTKImageIO2Test2 - ${ITK_TEST_OUTPUT_DIR}/itkVTKImageIO2Test2.vtk) -itk_add_test(NAME itkVTKImageIOTest2 - COMMAND ITKIOVTKTestDriver itkVTKImageIOTest2 - DATA{${ITK_DATA_ROOT}/Input/VHFColor.mhd,VHFColor.raw} ${ITK_TEST_OUTPUT_DIR}/testVector.vtk) -itk_add_test(NAME itkVTKImageIOTest3 - COMMAND ITKIOVTKTestDriver itkVTKImageIOTest3 - DATA{Input/fibers.vtk}) -itk_add_test(NAME itkVTKImageIOStreamTest - COMMAND ITKIOVTKTestDriver itkVTKImageIOStreamTest - ${ITK_TEST_OUTPUT_DIR}/itkVTKImageIOStreamTest.vtk) -itk_add_test(NAME itkVTKImageIOFileReadTest - COMMAND ITKIOVTKTestDriver itkVTKImageIOFileReadTest - DATA{Input/matrix.vtk} DATA{Input/ironProt.vtk}) +itk_add_test( + NAME + itkVTKImageIO2Test + COMMAND + ITKIOVTKTestDriver + itkVTKImageIO2Test + ${ITK_TEST_OUTPUT_DIR}) +itk_add_test( + NAME + itkVTKImageIOTest + COMMAND + ITKIOVTKTestDriver + itkVTKImageIOTest + ${ITK_TEST_OUTPUT_DIR}/test1.vtk + ${ITK_TEST_OUTPUT_DIR}/test2.vtk) +itk_add_test( + NAME + itkVTKImageIO2Test2 + COMMAND + ITKIOVTKTestDriver + itkVTKImageIO2Test2 + ${ITK_TEST_OUTPUT_DIR}/itkVTKImageIO2Test2.vtk) +itk_add_test( + NAME + itkVTKImageIOTest2 + COMMAND + ITKIOVTKTestDriver + itkVTKImageIOTest2 + DATA{${ITK_DATA_ROOT}/Input/VHFColor.mhd,VHFColor.raw} + ${ITK_TEST_OUTPUT_DIR}/testVector.vtk) +itk_add_test( + NAME + itkVTKImageIOTest3 + COMMAND + ITKIOVTKTestDriver + itkVTKImageIOTest3 + DATA{Input/fibers.vtk}) +itk_add_test( + NAME + itkVTKImageIOStreamTest + COMMAND + ITKIOVTKTestDriver + itkVTKImageIOStreamTest + ${ITK_TEST_OUTPUT_DIR}/itkVTKImageIOStreamTest.vtk) +itk_add_test( + NAME + itkVTKImageIOFileReadTest + COMMAND + ITKIOVTKTestDriver + itkVTKImageIOFileReadTest + DATA{Input/matrix.vtk} + DATA{Input/ironProt.vtk}) diff --git a/Modules/IO/XML/itk-module.cmake b/Modules/IO/XML/itk-module.cmake index 65e2a140dd1..fb8f1633bd0 100644 --- a/Modules/IO/XML/itk-module.cmake +++ b/Modules/IO/XML/itk-module.cmake @@ -1,14 +1,14 @@ set(DOCUMENTATION "This module contains classes for reading and writing XML files with the expat library.") -itk_module(ITKIOXML +itk_module( + ITKIOXML ENABLE_SHARED DEPENDS - ITKIOImageBase + ITKIOImageBase PRIVATE_DEPENDS - ITKExpat + ITKExpat TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/IO/XML/src/CMakeLists.txt b/Modules/IO/XML/src/CMakeLists.txt index 7d4f3ad1faf..61e5f56f77b 100644 --- a/Modules/IO/XML/src/CMakeLists.txt +++ b/Modules/IO/XML/src/CMakeLists.txt @@ -1,10 +1,9 @@ set(ITKIOXML_SRCS - itkXMLFile.cxx - itkDOMNode.cxx - itkDOMNodeXMLReader.cxx - itkDOMNodeXMLWriter.cxx - itkStringTools.cxx - itkFancyString.cxx - ) + itkXMLFile.cxx + itkDOMNode.cxx + itkDOMNodeXMLReader.cxx + itkDOMNodeXMLWriter.cxx + itkStringTools.cxx + itkFancyString.cxx) itk_module_add_library(ITKIOXML ${ITKIOXML_SRCS}) diff --git a/Modules/IO/XML/test/CMakeLists.txt b/Modules/IO/XML/test/CMakeLists.txt index 2208bb36f5b..8c47518904f 100644 --- a/Modules/IO/XML/test/CMakeLists.txt +++ b/Modules/IO/XML/test/CMakeLists.txt @@ -1,177 +1,327 @@ itk_module_test() set(ITKIOXMLTests - itkDOMTest1.cxx - itkDOMTest2.cxx - itkDOMTest3.cxx - itkDOMTest4.cxx - itkDOMTest5.cxx - itkDOMTest6.cxx - itkDOMTest7.cxx - itkDOMTest8.cxx - itkFileToolsTest.cxx -) - -CreateTestDriver(ITKIOXML "${ITKIOXML-Test_LIBRARIES}" "${ITKIOXMLTests}") - -itk_add_test(NAME itkDOMTest1 - COMMAND ITKIOXMLTestDriver itkDOMTest1 -) - -itk_add_test(NAME itkDOMTest21 - COMMAND ITKIOXMLTestDriver - itkDOMTest2 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} ${ITK_TEST_OUTPUT_DIR}/xmldom-test21-output.xml -) - -itk_add_test(NAME itkDOMTest22 - COMMAND ITKIOXMLTestDriver - itkDOMTest2 DATA{${ITK_DATA_ROOT}/Input/XML/test.pso.xml} ${ITK_TEST_OUTPUT_DIR}/xmldom-test22-output.xml -) - -itk_add_test(NAME itkDOMTest3 - COMMAND ITKIOXMLTestDriver - itkDOMTest3 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} -) - -itk_add_test(NAME itkDOMTest4_01 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/1" "/1" -) - -itk_add_test(NAME itkDOMTest4_02 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/user" "/1" -) - -itk_add_test(NAME itkDOMTest4_03 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/user:0" "/1" -) - -itk_add_test(NAME itkDOMTest4_04 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/1/who:2" "/1/10" -) - -itk_add_test(NAME itkDOMTest4_05 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/user/!" "/1/1" -) - -itk_add_test(NAME itkDOMTest4_06 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/user/!:0" "/1/1" -) - -itk_add_test(NAME itkDOMTest4_07 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/user/!:5" "/1/8" -) - -itk_add_test(NAME itkDOMTest4_08 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/user/-" "/0" -) - -itk_add_test(NAME itkDOMTest4_09 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/user/-0" "/1" -) - -itk_add_test(NAME itkDOMTest4_10 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/user/-1" "/0" -) - -itk_add_test(NAME itkDOMTest4_11 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/body/-2" "/0" -) - -itk_add_test(NAME itkDOMTest4_12 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/to/+" "/1" -) - -itk_add_test(NAME itkDOMTest4_13 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/to/+1" "/1" -) - -itk_add_test(NAME itkDOMTest4_14 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/to/+0" "/0" -) - -itk_add_test(NAME itkDOMTest4_15 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/to/+1" "/1" -) - -itk_add_test(NAME itkDOMTest4_16 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/to/+2" "/2" -) - -itk_add_test(NAME itkDOMTest4_17 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/user/:hi" "/1/9" -) - -itk_add_test(NAME itkDOMTest4_18 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/user/." "/1" -) - -itk_add_test(NAME itkDOMTest4_19 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/user/who:2/.." "/1" -) - -itk_add_test(NAME itkDOMTest4_20 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/user//" "[]" -) - -itk_add_test(NAME itkDOMTest4_21 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/" "[]" -) - -itk_add_test(NAME itkDOMTest4_22 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/user/" "/1" -) - -itk_add_test(NAME itkDOMTest4_23 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "/user/!/+5/-2/.././who:2/../:hi" "/1/9" -) - -itk_add_test(NAME itkDOMTest4_24 - COMMAND ITKIOXMLTestDriver - itkDOMTest4 DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} "[]" "[]" -) - -itk_add_test(NAME itkDOMTest5 - COMMAND ITKIOXMLTestDriver - itkDOMTest5 ${ITK_TEST_OUTPUT_DIR}/xmldom-test5/output.xml -) - -itk_add_test(NAME itkDOMTest6 - COMMAND ITKIOXMLTestDriver itkDOMTest6 -) - -itk_add_test(NAME itkDOMTest7 - COMMAND ITKIOXMLTestDriver itkDOMTest7 -) - -itk_add_test(NAME itkDOMTest8 - COMMAND ITKIOXMLTestDriver - itkDOMTest8 ${ITK_TEST_OUTPUT_DIR}/xmldom-test8/ output/test_file -) - -itk_add_test(NAME itkFileToolsTest - COMMAND ITKIOXMLTestDriver - itkFileToolsTest ${ITK_TEST_OUTPUT_DIR}/mytestdir ${ITK_TEST_OUTPUT_DIR}/mytestfile.txt -) + itkDOMTest1.cxx + itkDOMTest2.cxx + itkDOMTest3.cxx + itkDOMTest4.cxx + itkDOMTest5.cxx + itkDOMTest6.cxx + itkDOMTest7.cxx + itkDOMTest8.cxx + itkFileToolsTest.cxx) + +createtestdriver(ITKIOXML "${ITKIOXML-Test_LIBRARIES}" "${ITKIOXMLTests}") + +itk_add_test( + NAME + itkDOMTest1 + COMMAND + ITKIOXMLTestDriver + itkDOMTest1) + +itk_add_test( + NAME + itkDOMTest21 + COMMAND + ITKIOXMLTestDriver + itkDOMTest2 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + ${ITK_TEST_OUTPUT_DIR}/xmldom-test21-output.xml) + +itk_add_test( + NAME + itkDOMTest22 + COMMAND + ITKIOXMLTestDriver + itkDOMTest2 + DATA{${ITK_DATA_ROOT}/Input/XML/test.pso.xml} + ${ITK_TEST_OUTPUT_DIR}/xmldom-test22-output.xml) + +itk_add_test( + NAME + itkDOMTest3 + COMMAND + ITKIOXMLTestDriver + itkDOMTest3 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml}) + +itk_add_test( + NAME + itkDOMTest4_01 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/1" + "/1") + +itk_add_test( + NAME + itkDOMTest4_02 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/user" + "/1") + +itk_add_test( + NAME + itkDOMTest4_03 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/user:0" + "/1") + +itk_add_test( + NAME + itkDOMTest4_04 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/1/who:2" + "/1/10") + +itk_add_test( + NAME + itkDOMTest4_05 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/user/!" + "/1/1") + +itk_add_test( + NAME + itkDOMTest4_06 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/user/!:0" + "/1/1") + +itk_add_test( + NAME + itkDOMTest4_07 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/user/!:5" + "/1/8") + +itk_add_test( + NAME + itkDOMTest4_08 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/user/-" + "/0") + +itk_add_test( + NAME + itkDOMTest4_09 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/user/-0" + "/1") + +itk_add_test( + NAME + itkDOMTest4_10 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/user/-1" + "/0") + +itk_add_test( + NAME + itkDOMTest4_11 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/body/-2" + "/0") + +itk_add_test( + NAME + itkDOMTest4_12 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/to/+" + "/1") + +itk_add_test( + NAME + itkDOMTest4_13 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/to/+1" + "/1") + +itk_add_test( + NAME + itkDOMTest4_14 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/to/+0" + "/0") + +itk_add_test( + NAME + itkDOMTest4_15 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/to/+1" + "/1") + +itk_add_test( + NAME + itkDOMTest4_16 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/to/+2" + "/2") + +itk_add_test( + NAME + itkDOMTest4_17 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/user/:hi" + "/1/9") + +itk_add_test( + NAME + itkDOMTest4_18 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/user/." + "/1") + +itk_add_test( + NAME + itkDOMTest4_19 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/user/who:2/.." + "/1") + +itk_add_test( + NAME + itkDOMTest4_20 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/user//" + "[]") + +itk_add_test( + NAME + itkDOMTest4_21 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/" + "[]") + +itk_add_test( + NAME + itkDOMTest4_22 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/user/" + "/1") + +itk_add_test( + NAME + itkDOMTest4_23 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "/user/!/+5/-2/.././who:2/../:hi" + "/1/9") + +itk_add_test( + NAME + itkDOMTest4_24 + COMMAND + ITKIOXMLTestDriver + itkDOMTest4 + DATA{${ITK_DATA_ROOT}/Input/XML/test.xml} + "[]" + "[]") + +itk_add_test( + NAME + itkDOMTest5 + COMMAND + ITKIOXMLTestDriver + itkDOMTest5 + ${ITK_TEST_OUTPUT_DIR}/xmldom-test5/output.xml) + +itk_add_test( + NAME + itkDOMTest6 + COMMAND + ITKIOXMLTestDriver + itkDOMTest6) + +itk_add_test( + NAME + itkDOMTest7 + COMMAND + ITKIOXMLTestDriver + itkDOMTest7) + +itk_add_test( + NAME + itkDOMTest8 + COMMAND + ITKIOXMLTestDriver + itkDOMTest8 + ${ITK_TEST_OUTPUT_DIR}/xmldom-test8/ + output/test_file) + +itk_add_test( + NAME + itkFileToolsTest + COMMAND + ITKIOXMLTestDriver + itkFileToolsTest + ${ITK_TEST_OUTPUT_DIR}/mytestdir + ${ITK_TEST_OUTPUT_DIR}/mytestfile.txt) diff --git a/Modules/Nonunit/IntegratedTest/itk-module.cmake b/Modules/Nonunit/IntegratedTest/itk-module.cmake index c5e9ef4027e..c141651f237 100644 --- a/Modules/Nonunit/IntegratedTest/itk-module.cmake +++ b/Modules/Nonunit/IntegratedTest/itk-module.cmake @@ -1,84 +1,84 @@ set(DOCUMENTATION "This modules contains tests targeting the behavior of multiple modules of the toolkit when they act together.") -itk_module(ITKIntegratedTest +itk_module( + ITKIntegratedTest TEST_DEPENDS - ITKAnisotropicSmoothing - ITKAntiAlias - ITKBiasCorrection - ITKClassifiers - ITKCommon - ITKConnectedComponents - ITKCurvatureFlow - ITKDeformableMesh - ITKDisplacementField - ITKDiffusionTensorImage - ITKDistanceMap - ITKEigen - ITKFFT - ITKFiniteDifference - ITKImageAdaptors - ITKImageCompare - ITKImageCompose - ITKImageFeature - ITKImageFilterBase - ITKImageFunction - ITKImageGradient - ITKImageGrid - ITKImageIntensity - ITKImageLabel - ITKImageSources - ITKImageStatistics - ITKIOImageBase - ITKIOBioRad - ITKIOBMP - ITKIOGDCM - ITKIOGE - ITKIOGIPL - ITKIOIPL - ITKIOJPEG - ITKIOMeta - ITKIONIFTI - ITKIONRRD - ITKIOPNG - ITKIORAW - ITKIOSiemens - ITKIOTransformBase - ITKIOTransformMatlab - ITKIOTransformHDF5 - ITKIOTransformInsightLegacy - ITKIOSpatialObjects - ITKIOStimulate - ITKIOTIFF - ITKIOVTK - ITKIOXML - ITKIOMesh - ITKKLMRegionGrowing - ITKLabelVoting - ITKLevelSets - ITKIOLSM - ITKMarkovRandomFieldsClassifiers - ITKMathematicalMorphology - ITKMesh - ITKNarrowBand - ITKOptimizers - ITKPath - ITKPDEDeformableRegistration - ITKPolynomials - ITKQuadEdgeMesh - ITKQuadEdgeMeshFiltering - ITKRegionGrowing - ITKRegistrationCommon - ITKSignedDistanceFunction - ITKSmoothing - ITKSpatialFunction - ITKSpatialObjects - ITKStatistics - ITKThresholding - ITKVoronoi - ITKVTK - ITKWatersheds - ITKTestKernel + ITKAnisotropicSmoothing + ITKAntiAlias + ITKBiasCorrection + ITKClassifiers + ITKCommon + ITKConnectedComponents + ITKCurvatureFlow + ITKDeformableMesh + ITKDisplacementField + ITKDiffusionTensorImage + ITKDistanceMap + ITKEigen + ITKFFT + ITKFiniteDifference + ITKImageAdaptors + ITKImageCompare + ITKImageCompose + ITKImageFeature + ITKImageFilterBase + ITKImageFunction + ITKImageGradient + ITKImageGrid + ITKImageIntensity + ITKImageLabel + ITKImageSources + ITKImageStatistics + ITKIOImageBase + ITKIOBioRad + ITKIOBMP + ITKIOGDCM + ITKIOGE + ITKIOGIPL + ITKIOIPL + ITKIOJPEG + ITKIOMeta + ITKIONIFTI + ITKIONRRD + ITKIOPNG + ITKIORAW + ITKIOSiemens + ITKIOTransformBase + ITKIOTransformMatlab + ITKIOTransformHDF5 + ITKIOTransformInsightLegacy + ITKIOSpatialObjects + ITKIOStimulate + ITKIOTIFF + ITKIOVTK + ITKIOXML + ITKIOMesh + ITKKLMRegionGrowing + ITKLabelVoting + ITKLevelSets + ITKIOLSM + ITKMarkovRandomFieldsClassifiers + ITKMathematicalMorphology + ITKMesh + ITKNarrowBand + ITKOptimizers + ITKPath + ITKPDEDeformableRegistration + ITKPolynomials + ITKQuadEdgeMesh + ITKQuadEdgeMeshFiltering + ITKRegionGrowing + ITKRegistrationCommon + ITKSignedDistanceFunction + ITKSmoothing + ITKSpatialFunction + ITKSpatialObjects + ITKStatistics + ITKThresholding + ITKVoronoi + ITKVTK + ITKWatersheds + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Nonunit/IntegratedTest/test/CMakeLists.txt b/Modules/Nonunit/IntegratedTest/test/CMakeLists.txt index 5864641d207..a4890ad145e 100644 --- a/Modules/Nonunit/IntegratedTest/test/CMakeLists.txt +++ b/Modules/Nonunit/IntegratedTest/test/CMakeLists.txt @@ -1,61 +1,106 @@ itk_module_test() set(ITKIntegratedTestTests -itkFilterImageAddTest.cxx # missing itk_add_test() call -itkNumericsPrintTest.cxx -itkReleaseDataFilterTest.cxx # missing itk_add_test() call -itkStatisticsPrintTest.cxx -itkCommonPrintTest.cxx -itkIOPrintTest.cxx -itkBasicFiltersPrintTest.cxx -itkSpatialObjectPrintTest.cxx -itkShrinkImagePreserveObjectPhysicalLocations.cxx -) - -CreateTestDriver(ITKIntegratedTest "${ITKIntegratedTest-Test_LIBRARIES}" "${ITKIntegratedTestTests}") + itkFilterImageAddTest.cxx # missing itk_add_test() call + itkNumericsPrintTest.cxx + itkReleaseDataFilterTest.cxx # missing itk_add_test() call + itkStatisticsPrintTest.cxx + itkCommonPrintTest.cxx + itkIOPrintTest.cxx + itkBasicFiltersPrintTest.cxx + itkSpatialObjectPrintTest.cxx + itkShrinkImagePreserveObjectPhysicalLocations.cxx) + +createtestdriver(ITKIntegratedTest "${ITKIntegratedTest-Test_LIBRARIES}" "${ITKIntegratedTestTests}") set(TEMP ${ITK_TEST_OUTPUT_DIR}) # temporary solution for all print tests. Each module should have its own print test later. -add_executable(itkAlgorithmsPrintTest itkAlgorithmsPrintTest.cxx) +add_executable(itkAlgorithmsPrintTest itkAlgorithmsPrintTest.cxx) itk_module_target_label(itkAlgorithmsPrintTest) target_link_libraries(itkAlgorithmsPrintTest LINK_PUBLIC ${ITKIntegratedTest-Test_LIBRARIES}) -itk_add_test(NAME itkAlgorithmsPrintTest COMMAND itkAlgorithmsPrintTest) +itk_add_test( + NAME + itkAlgorithmsPrintTest + COMMAND + itkAlgorithmsPrintTest) -add_executable(itkAlgorithmsPrintTest2 itkAlgorithmsPrintTest2.cxx) +add_executable(itkAlgorithmsPrintTest2 itkAlgorithmsPrintTest2.cxx) itk_module_target_label(itkAlgorithmsPrintTest2) target_link_libraries(itkAlgorithmsPrintTest2 LINK_PUBLIC ${ITKIntegratedTest-Test_LIBRARIES}) -itk_add_test(NAME itkAlgorithmsPrintTest2 COMMAND itkAlgorithmsPrintTest) +itk_add_test( + NAME + itkAlgorithmsPrintTest2 + COMMAND + itkAlgorithmsPrintTest) -add_executable(itkAlgorithmsPrintTest3 itkAlgorithmsPrintTest3.cxx) +add_executable(itkAlgorithmsPrintTest3 itkAlgorithmsPrintTest3.cxx) itk_module_target_label(itkAlgorithmsPrintTest3) target_link_libraries(itkAlgorithmsPrintTest3 LINK_PUBLIC ${ITKIntegratedTest-Test_LIBRARIES}) -itk_add_test(NAME itkAlgorithmsPrintTest3 COMMAND itkAlgorithmsPrintTest) +itk_add_test( + NAME + itkAlgorithmsPrintTest3 + COMMAND + itkAlgorithmsPrintTest) -add_executable(itkAlgorithmsPrintTest4 itkAlgorithmsPrintTest4.cxx) +add_executable(itkAlgorithmsPrintTest4 itkAlgorithmsPrintTest4.cxx) itk_module_target_label(itkAlgorithmsPrintTest4) target_link_libraries(itkAlgorithmsPrintTest4 LINK_PUBLIC ${ITKIntegratedTest-Test_LIBRARIES}) -itk_add_test(NAME itkAlgorithmsPrintTest4 COMMAND itkAlgorithmsPrintTest) +itk_add_test( + NAME + itkAlgorithmsPrintTest4 + COMMAND + itkAlgorithmsPrintTest) #------------------------------------------------------------------------- -itk_add_test(NAME itkStatisticsPrintTest - COMMAND ITKIntegratedTestTestDriver itkStatisticsPrintTest) -itk_add_test(NAME itkSpatialObjectPrintTest - COMMAND ITKIntegratedTestTestDriver itkSpatialObjectPrintTest) -itk_add_test(NAME itkIOPrintTest - COMMAND ITKIntegratedTestTestDriver itkIOPrintTest) - -itk_add_test(NAME itkCommonPrintTest - COMMAND ITKIntegratedTestTestDriver --redirectOutput ${TEMP}/itkCommonPrintTest.txt - itkCommonPrintTest) +itk_add_test( + NAME + itkStatisticsPrintTest + COMMAND + ITKIntegratedTestTestDriver + itkStatisticsPrintTest) +itk_add_test( + NAME + itkSpatialObjectPrintTest + COMMAND + ITKIntegratedTestTestDriver + itkSpatialObjectPrintTest) +itk_add_test( + NAME + itkIOPrintTest + COMMAND + ITKIntegratedTestTestDriver + itkIOPrintTest) + +itk_add_test( + NAME + itkCommonPrintTest + COMMAND + ITKIntegratedTestTestDriver + --redirectOutput + ${TEMP}/itkCommonPrintTest.txt + itkCommonPrintTest) set_tests_properties(itkCommonPrintTest PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkCommonPrintTest.txt) -itk_add_test(NAME itkBasicFiltersPrintTest - COMMAND ITKIntegratedTestTestDriver --redirectOutput ${TEMP}/itkBasicFiltersPrintTest.txt - itkBasicFiltersPrintTest) +itk_add_test( + NAME + itkBasicFiltersPrintTest + COMMAND + ITKIntegratedTestTestDriver + --redirectOutput + ${TEMP}/itkBasicFiltersPrintTest.txt + itkBasicFiltersPrintTest) set_tests_properties(itkBasicFiltersPrintTest PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkBasicFiltersPrintTest.txt) -itk_add_test(NAME itkNumericsPrintTest - COMMAND ITKIntegratedTestTestDriver itkNumericsPrintTest) +itk_add_test( + NAME + itkNumericsPrintTest + COMMAND + ITKIntegratedTestTestDriver + itkNumericsPrintTest) -itk_add_test(NAME itkShrinkImagePreserveObjectPhysicalLocations - COMMAND ITKIntegratedTestTestDriver itkShrinkImagePreserveObjectPhysicalLocations) +itk_add_test( + NAME + itkShrinkImagePreserveObjectPhysicalLocations + COMMAND + ITKIntegratedTestTestDriver + itkShrinkImagePreserveObjectPhysicalLocations) diff --git a/Modules/Nonunit/IntegratedTest/wrapping/test/CMakeLists.txt b/Modules/Nonunit/IntegratedTest/wrapping/test/CMakeLists.txt index e69de29bb2d..8b137891791 100644 --- a/Modules/Nonunit/IntegratedTest/wrapping/test/CMakeLists.txt +++ b/Modules/Nonunit/IntegratedTest/wrapping/test/CMakeLists.txt @@ -0,0 +1 @@ + diff --git a/Modules/Nonunit/Review/itk-module.cmake b/Modules/Nonunit/Review/itk-module.cmake index 28cd7b46c68..8e46f8401eb 100644 --- a/Modules/Nonunit/Review/itk-module.cmake +++ b/Modules/Nonunit/Review/itk-module.cmake @@ -1,93 +1,94 @@ -set(DOCUMENTATION "These classes came into the toolkit from the Insight Journal +set(DOCUMENTATION + "These classes came into the toolkit from the Insight Journal and are staged to be integrated into the appropriate Module if they are high quality and see high use. If they are low quality or serve a very specific use case, they may be removed or made available as an ExternalModule.") -itk_module(ITKReview +itk_module( + ITKReview DEPENDS - ITKAnisotropicSmoothing - ITKAntiAlias - ITKBiasCorrection - ITKClassifiers - ITKCommon - ITKConnectedComponents - ITKCurvatureFlow - ITKDeformableMesh - ITKDisplacementField - ITKDiffusionTensorImage - ITKDistanceMap - ITKEigen - ITKFFT - ITKFiniteDifference - ITKImageAdaptors - ITKImageCompare - ITKImageCompose - ITKImageFeature - ITKImageFilterBase - ITKImageFunction - ITKImageGradient - ITKImageGrid - ITKImageIntensity - ITKImageLabel - ITKImageStatistics - ITKIOImageBase - ITKIOBioRad - ITKIOBMP - ITKIOGDCM - ITKIOGE - ITKIOGIPL - ITKIOIPL - ITKIOJPEG - ITKIOMeta - ITKIONIFTI - ITKIONRRD - ITKIOPNG - ITKIORAW - ITKIOSiemens - ITKIOTransformMatlab - ITKIOTransformHDF5 - ITKIOTransformInsightLegacy - ITKIOSpatialObjects - ITKIOStimulate - ITKIOTIFF - ITKIOVTK - ITKIOXML - ITKKLMRegionGrowing - ITKLabelVoting - ITKLevelSets - ITKMarkovRandomFieldsClassifiers - ITKMathematicalMorphology - ITKMesh - ITKNarrowBand - ITKOptimizers - ITKPath - ITKPDEDeformableRegistration - ITKPolynomials - ITKQuadEdgeMesh - ITKQuadEdgeMeshFiltering - ITKRegionGrowing - ITKRegistrationCommon - ITKSignedDistanceFunction - ITKSmoothing - ITKSpatialFunction - ITKSpatialObjects - ITKStatistics - ITKThresholding - ITKVoronoi - ITKVTK - ITKWatersheds + ITKAnisotropicSmoothing + ITKAntiAlias + ITKBiasCorrection + ITKClassifiers + ITKCommon + ITKConnectedComponents + ITKCurvatureFlow + ITKDeformableMesh + ITKDisplacementField + ITKDiffusionTensorImage + ITKDistanceMap + ITKEigen + ITKFFT + ITKFiniteDifference + ITKImageAdaptors + ITKImageCompare + ITKImageCompose + ITKImageFeature + ITKImageFilterBase + ITKImageFunction + ITKImageGradient + ITKImageGrid + ITKImageIntensity + ITKImageLabel + ITKImageStatistics + ITKIOImageBase + ITKIOBioRad + ITKIOBMP + ITKIOGDCM + ITKIOGE + ITKIOGIPL + ITKIOIPL + ITKIOJPEG + ITKIOMeta + ITKIONIFTI + ITKIONRRD + ITKIOPNG + ITKIORAW + ITKIOSiemens + ITKIOTransformMatlab + ITKIOTransformHDF5 + ITKIOTransformInsightLegacy + ITKIOSpatialObjects + ITKIOStimulate + ITKIOTIFF + ITKIOVTK + ITKIOXML + ITKKLMRegionGrowing + ITKLabelVoting + ITKLevelSets + ITKMarkovRandomFieldsClassifiers + ITKMathematicalMorphology + ITKMesh + ITKNarrowBand + ITKOptimizers + ITKPath + ITKPDEDeformableRegistration + ITKPolynomials + ITKQuadEdgeMesh + ITKQuadEdgeMeshFiltering + ITKRegionGrowing + ITKRegistrationCommon + ITKSignedDistanceFunction + ITKSmoothing + ITKSpatialFunction + ITKSpatialObjects + ITKStatistics + ITKThresholding + ITKVoronoi + ITKVTK + ITKWatersheds COMPILE_DEPENDS - ITKIOTransformBase - ITKOpenJPEG - ITKLabelMap - ITKBinaryMathematicalMorphology - ITKImageFusion + ITKIOTransformBase + ITKOpenJPEG + ITKLabelMap + ITKBinaryMathematicalMorphology + ITKImageFusion TEST_DEPENDS - ITKTestKernel - ITKIOMesh - ITKIOCSV - ITKIOLSM + ITKTestKernel + ITKIOMesh + ITKIOCSV + ITKIOLSM DESCRIPTION - "${DOCUMENTATION}" - EXCLUDE_FROM_DEFAULT - ) + "${DOCUMENTATION}" + EXCLUDE_FROM_DEFAULT) diff --git a/Modules/Nonunit/Review/src/CMakeLists.txt b/Modules/Nonunit/Review/src/CMakeLists.txt index 288d3c45721..f30a6683f21 100644 --- a/Modules/Nonunit/Review/src/CMakeLists.txt +++ b/Modules/Nonunit/Review/src/CMakeLists.txt @@ -1,11 +1,11 @@ -set(ITKReview_SRC -itkVoxBoCUBImageIO.cxx -itkVoxBoCUBImageIOFactory.cxx -) +set(ITKReview_SRC itkVoxBoCUBImageIO.cxx itkVoxBoCUBImageIOFactory.cxx) add_library(ITKReview ${ITKReview_SRC}) itk_module_link_dependencies() -target_link_libraries(ITKReview LINK_PUBLIC ${ITKTestKernel_LIBRARIES} ${ITKIOLSM_LIBRARIES} itkopenjpeg) +target_link_libraries( + ITKReview + LINK_PUBLIC + ${ITKTestKernel_LIBRARIES} + ${ITKIOLSM_LIBRARIES} + itkopenjpeg) itk_module_target(ITKReview) - - diff --git a/Modules/Nonunit/Review/test/CMakeLists.txt b/Modules/Nonunit/Review/test/CMakeLists.txt index 40e6391d0f3..14bc16221f2 100644 --- a/Modules/Nonunit/Review/test/CMakeLists.txt +++ b/Modules/Nonunit/Review/test/CMakeLists.txt @@ -1,269 +1,684 @@ itk_module_test() set(ITKReviewTests -itkAreaClosingImageFilterTest.cxx -itkAreaOpeningImageFilterTest.cxx -itkConformalFlatteningMeshFilterTest.cxx -itkConformalFlatteningQuadEdgeMeshFilterTest.cxx -itkDirectFourierReconstructionImageToImageFilterTest.cxx -itkDiscreteGaussianDerivativeImageFunctionTest.cxx -itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx -itkDiscreteHessianGaussianImageFunctionTest.cxx -itkFastApproximateRankImageFilterTest.cxx -itkGridForwardWarpImageFilterTest.cxx -itkImageFunctionTest.cxx -itkLabelGeometryImageFilterTest.cxx -itkMultiphaseDenseFiniteDifferenceImageFilterTest.cxx -itkMultiphaseFiniteDifferenceImageFilterTest.cxx -itkMultiphaseSparseFiniteDifferenceImageFilterTest.cxx -itkOptImageToImageMetricsTest.cxx -itkOptImageToImageMetricsTest2.cxx -itkOptMattesMutualInformationImageToImageMetricThreadsTest1.cxx -itkRegionBasedLevelSetFunctionTest.cxx -itkReviewPrintTest.cxx -itkRobustAutomaticThresholdCalculatorTest.cxx -itkRobustAutomaticThresholdImageFilterTest.cxx -itkScalarChanAndVeseDenseLevelSetImageFilterTest1.cxx -itkScalarChanAndVeseDenseLevelSetImageFilterTest2.cxx -itkScalarChanAndVeseDenseLevelSetImageFilterTest3.cxx -itkScalarChanAndVeseDenseLevelSetImageFilterTest4.cxx -itkScalarChanAndVeseLevelSetFunctionTest1.cxx -itkScalarChanAndVeseLevelSetFunctionTest2.cxx -itkScalarChanAndVeseSparseLevelSetImageFilterTest1.cxx -itkScalarChanAndVeseSparseLevelSetImageFilterTest2.cxx -itkScalarRegionBasedLevelSetFunctionTest.cxx -itkShapedFloodFilledImageFunctionConditionalConstIteratorTest1.cxx -itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2.cxx -itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3.cxx -itkStochasticFractalDimensionImageFilterTest.cxx -itkTimeAndMemoryProbeTest.cxx -itkVoxBoCUBImageIOTest.cxx -itkWarpHarmonicEnergyCalculatorTest.cxx -itkWarpJacobianDeterminantFilterTest.cxx -) + itkAreaClosingImageFilterTest.cxx + itkAreaOpeningImageFilterTest.cxx + itkConformalFlatteningMeshFilterTest.cxx + itkConformalFlatteningQuadEdgeMeshFilterTest.cxx + itkDirectFourierReconstructionImageToImageFilterTest.cxx + itkDiscreteGaussianDerivativeImageFunctionTest.cxx + itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx + itkDiscreteHessianGaussianImageFunctionTest.cxx + itkFastApproximateRankImageFilterTest.cxx + itkGridForwardWarpImageFilterTest.cxx + itkImageFunctionTest.cxx + itkLabelGeometryImageFilterTest.cxx + itkMultiphaseDenseFiniteDifferenceImageFilterTest.cxx + itkMultiphaseFiniteDifferenceImageFilterTest.cxx + itkMultiphaseSparseFiniteDifferenceImageFilterTest.cxx + itkOptImageToImageMetricsTest.cxx + itkOptImageToImageMetricsTest2.cxx + itkOptMattesMutualInformationImageToImageMetricThreadsTest1.cxx + itkRegionBasedLevelSetFunctionTest.cxx + itkReviewPrintTest.cxx + itkRobustAutomaticThresholdCalculatorTest.cxx + itkRobustAutomaticThresholdImageFilterTest.cxx + itkScalarChanAndVeseDenseLevelSetImageFilterTest1.cxx + itkScalarChanAndVeseDenseLevelSetImageFilterTest2.cxx + itkScalarChanAndVeseDenseLevelSetImageFilterTest3.cxx + itkScalarChanAndVeseDenseLevelSetImageFilterTest4.cxx + itkScalarChanAndVeseLevelSetFunctionTest1.cxx + itkScalarChanAndVeseLevelSetFunctionTest2.cxx + itkScalarChanAndVeseSparseLevelSetImageFilterTest1.cxx + itkScalarChanAndVeseSparseLevelSetImageFilterTest2.cxx + itkScalarRegionBasedLevelSetFunctionTest.cxx + itkShapedFloodFilledImageFunctionConditionalConstIteratorTest1.cxx + itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2.cxx + itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3.cxx + itkStochasticFractalDimensionImageFilterTest.cxx + itkTimeAndMemoryProbeTest.cxx + itkVoxBoCUBImageIOTest.cxx + itkWarpHarmonicEnergyCalculatorTest.cxx + itkWarpJacobianDeterminantFilterTest.cxx) set(BASELINE ${ITK_DATA_ROOT}/Baseline/Review) set(INPUTDATA ${ITK_DATA_ROOT}/Input) set(BASELINE_ROOT ${ITK_DATA_ROOT}/Baseline) set(TEMP ${ITK_TEST_OUTPUT_DIR}) +createtestdriver(ITKReview "${ITKReview-Test_LIBRARIES}" "${ITKReviewTests}") -CreateTestDriver(ITKReview "${ITKReview-Test_LIBRARIES}" "${ITKReviewTests}") +itk_add_test( + NAME + itkReviewPrintTest + COMMAND + ITKReviewTestDriver + itkReviewPrintTest) -itk_add_test(NAME itkReviewPrintTest COMMAND ITKReviewTestDriver itkReviewPrintTest) +itk_add_test( + NAME + itkAreaClosingImageFilterTest0 + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkAreaClosingImageFilterTest0.png} + ${ITK_TEST_OUTPUT_DIR}/itkAreaClosingImageFilterTest0.png + itkAreaClosingImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkAreaClosingImageFilterTest0.png + 1000 + 0 + 0) +itk_add_test( + NAME + itkAreaOpeningImageFilterTest0 + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkAreaOpeningImageFilterTest0.png} + ${ITK_TEST_OUTPUT_DIR}/itkAreaOpeningImageFilterTest0.png + itkAreaOpeningImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkAreaOpeningImageFilterTest0.png + 1000 + 0 + 1) +itk_add_test( + NAME + itkConformalFlatteningMeshFilterTest1 + COMMAND + ITKReviewTestDriver + itkConformalFlatteningMeshFilterTest + DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk} + ${ITK_TEST_OUTPUT_DIR}/genusZeroMesh01ConformalFlattenedToSphere.vtk + 1) +itk_add_test( + NAME + itkConformalFlatteningMeshFilterTest2 + COMMAND + ITKReviewTestDriver + itkConformalFlatteningMeshFilterTest + DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk} + ${ITK_TEST_OUTPUT_DIR}/genusZeroMesh01ConformalFlattenedToPlane.vtk + 0) +itk_add_test( + NAME + itkConformalFlatteningQuadEdgeMeshFilterTest1 + COMMAND + ITKReviewTestDriver + itkConformalFlatteningQuadEdgeMeshFilterTest + DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk} + ${ITK_TEST_OUTPUT_DIR}/genusZeroQuadEdgeMesh01ConformalFlattenedToSphere.vtk + 3 + 100.0 + 1) +itk_add_test( + NAME + itkConformalFlatteningQuadEdgeMeshFilterTest2 + COMMAND + ITKReviewTestDriver + itkConformalFlatteningQuadEdgeMeshFilterTest + DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk} + ${ITK_TEST_OUTPUT_DIR}/genusZeroQuadEdgeMesh01ConformalFlattenedToPlane.vtk + 3 + 100.0 + 0) +itk_add_test( + NAME + itkDirectFourierReconstructionImageToImageFilterTest + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/reconstruct.mha} + ${ITK_TEST_OUTPUT_DIR}/reconstruct.mha + itkDirectFourierReconstructionImageToImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/sinogram-small.mha} + ${ITK_TEST_OUTPUT_DIR}/reconstruct.mha + 1 + 2 + 0 + 2 + 2 + 1 + 3 + 180 + 0 + 0 + 0 + 64 + 64 + 2 + 0) +itk_add_test( + NAME + itkDiscreteGaussianDerivativeImageFunctionTest01 + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFunctionTest01.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFunctionTest01.png + itkDiscreteGaussianDerivativeImageFunctionTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFunctionTest01.png + 1 + 2.0 + 0.01 + 32 + 0) +itk_add_test( + NAME + itkDiscreteGaussianDerivativeImageFunctionTest02 + COMMAND + ITKReviewTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFunctionTest02.png + 488a4bf5daa08cadb3e8b1018a3fe5c0 + itkDiscreteGaussianDerivativeImageFunctionTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFunctionTest02.png + 2 + 1.5 + 0.03 + 16 + 1) +itk_add_test( + NAME + itkDiscreteGradientMagnitudeGaussianImageFunctionTest01 + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGradientMagnitudeGaussianImageFunctionTest01.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGradientMagnitudeGaussianImageFunctionTest01.png + itkDiscreteGradientMagnitudeGaussianImageFunctionTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGradientMagnitudeGaussianImageFunctionTest01.png + 2.0 + 0.01 + 32 + 0 + 1) +itk_add_test( + NAME + itkDiscreteGradientMagnitudeGaussianImageFunctionTest02 + COMMAND + ITKReviewTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGradientMagnitudeGaussianImageFunctionTest02.png + de1904605e667018baaa3f73c5e5c220 + itkDiscreteGradientMagnitudeGaussianImageFunctionTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGradientMagnitudeGaussianImageFunctionTest02.png + 1.5 + 0.03 + 64 + 1 + 1) +itk_add_test( + NAME + itkDiscreteGradientMagnitudeGaussianImageFunctionTestUseImageSpacingOff + COMMAND + ITKReviewTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGradientMagnitudeGaussianImageFunctionTestUseImageSpacingOff.png + de1904605e667018baaa3f73c5e5c220 + itkDiscreteGradientMagnitudeGaussianImageFunctionTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGradientMagnitudeGaussianImageFunctionTestUseImageSpacingOff.png + 1.5 + 0.03 + 64 + 1 + 0) +itk_add_test( + NAME + itkDiscreteHessianGaussianImageFunctionTest + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteHessianGaussianImageFunctionTest.mha} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteHessianGaussianImageFunctionTest.mha + itkDiscreteHessianGaussianImageFunctionTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkDiscreteHessianGaussianImageFunctionTest.mha + 2.0 + 0.01 + 32) +itk_add_test( + NAME + itkFastApproximateRankImageFilterTest3 + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkFastApproximateRankImageFilter3.png} + ${ITK_TEST_OUTPUT_DIR}/itkFastApproximateRankImageFilter3.png + itkFastApproximateRankImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkFastApproximateRankImageFilter3.png + 3) +itk_add_test( + NAME + itkFastApproximateRankImageFilterTest10 + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkFastApproximateRankImageFilter10.png} + ${ITK_TEST_OUTPUT_DIR}/itkFastApproximateRankImageFilter10.png + itkFastApproximateRankImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkFastApproximateRankImageFilter10.png + 10) +itk_add_test( + NAME + itkGridForwardWarpImageFilterTest + COMMAND + ITKReviewTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkGridForwardWarpImageFilterTest.mha + 7dea362b3fac8e00956a4952a3d4f474 + itkGridForwardWarpImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkGridForwardWarpImageFilterTest.mha) +itk_add_test( + NAME + itkImageFunctionTest + COMMAND + ITKReviewTestDriver + itkImageFunctionTest) +itk_add_test( + NAME + itkLabelGeometryImageFilterTest + COMMAND + ITKReviewTestDriver + --compare + DATA{${BASELINE}/itkLabelGeometryImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelGeometryImageFilterTest.png + itkLabelGeometryImageFilterTest + DATA{${INPUTDATA}/LabelImageWithVariousShapes.png} + DATA{${INPUTDATA}/GrayscaleImageWithVariousShapes.png} + ${ITK_TEST_OUTPUT_DIR}/itkLabelGeometryImageFilterTest.png + ${ITK_TEST_OUTPUT_DIR}/itkLabelGeometryImageFilterTest.csv + DATA{${BASELINE}/itkLabelGeometryImageFilterTest.csv}) +itk_add_test( + NAME + itkLabelGeometryImageFilterTest3D + COMMAND + ITKReviewTestDriver + --compare + DATA{${BASELINE}/itkLabelGeometryImageFilterTest3D.mhd,itkLabelGeometryImageFilterTest3D.raw} + ${ITK_TEST_OUTPUT_DIR}/itkLabelGeometryImageFilterTest3D.mhd + itkLabelGeometryImageFilterTest + DATA{${INPUTDATA}/LabelVolumeWithVariousShapes.mhd,LabelVolumeWithVariousShapes.raw} + DATA{${INPUTDATA}/GrayscaleVolumeWithVariousShapes.mhd,GrayscaleVolumeWithVariousShapes.raw} + ${ITK_TEST_OUTPUT_DIR}/itkLabelGeometryImageFilterTest3D.mhd + ${ITK_TEST_OUTPUT_DIR}/itkLabelGeometryImageFilterTest3D.csv + DATA{${BASELINE}/itkLabelGeometryImageFilterTest3D.csv}) +itk_add_test( + NAME + itkMultiphaseDenseFiniteDifferenceImageFilterTest + COMMAND + ITKReviewTestDriver + itkMultiphaseDenseFiniteDifferenceImageFilterTest) +itk_add_test( + NAME + itkMultiphaseFiniteDifferenceImageFilterTest + COMMAND + ITKReviewTestDriver + itkMultiphaseFiniteDifferenceImageFilterTest) +itk_add_test( + NAME + itkMultiphaseSparseFiniteDifferenceImageFilterTest + COMMAND + ITKReviewTestDriver + itkMultiphaseSparseFiniteDifferenceImageFilterTest) -itk_add_test(NAME itkAreaClosingImageFilterTest0 - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkAreaClosingImageFilterTest0.png} - ${ITK_TEST_OUTPUT_DIR}/itkAreaClosingImageFilterTest0.png - itkAreaClosingImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkAreaClosingImageFilterTest0.png 1000 0 0) -itk_add_test(NAME itkAreaOpeningImageFilterTest0 - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkAreaOpeningImageFilterTest0.png} - ${ITK_TEST_OUTPUT_DIR}/itkAreaOpeningImageFilterTest0.png - itkAreaOpeningImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkAreaOpeningImageFilterTest0.png 1000 0 1) -itk_add_test(NAME itkConformalFlatteningMeshFilterTest1 - COMMAND ITKReviewTestDriver itkConformalFlatteningMeshFilterTest - DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk} ${ITK_TEST_OUTPUT_DIR}/genusZeroMesh01ConformalFlattenedToSphere.vtk 1) -itk_add_test(NAME itkConformalFlatteningMeshFilterTest2 - COMMAND ITKReviewTestDriver itkConformalFlatteningMeshFilterTest - DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk} ${ITK_TEST_OUTPUT_DIR}/genusZeroMesh01ConformalFlattenedToPlane.vtk 0) -itk_add_test(NAME itkConformalFlatteningQuadEdgeMeshFilterTest1 - COMMAND ITKReviewTestDriver itkConformalFlatteningQuadEdgeMeshFilterTest - DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk} ${ITK_TEST_OUTPUT_DIR}/genusZeroQuadEdgeMesh01ConformalFlattenedToSphere.vtk 3 100.0 1) -itk_add_test(NAME itkConformalFlatteningQuadEdgeMeshFilterTest2 - COMMAND ITKReviewTestDriver itkConformalFlatteningQuadEdgeMeshFilterTest - DATA{${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk} ${ITK_TEST_OUTPUT_DIR}/genusZeroQuadEdgeMesh01ConformalFlattenedToPlane.vtk 3 100.0 0) -itk_add_test(NAME itkDirectFourierReconstructionImageToImageFilterTest - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/reconstruct.mha} - ${ITK_TEST_OUTPUT_DIR}/reconstruct.mha - itkDirectFourierReconstructionImageToImageFilterTest DATA{${ITK_DATA_ROOT}/Input/sinogram-small.mha} ${ITK_TEST_OUTPUT_DIR}/reconstruct.mha 1 2 0 2 2 1 3 180 0 0 0 64 64 2 0) -itk_add_test(NAME itkDiscreteGaussianDerivativeImageFunctionTest01 - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGaussianDerivativeImageFunctionTest01.png} - ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFunctionTest01.png - itkDiscreteGaussianDerivativeImageFunctionTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFunctionTest01.png 1 2.0 0.01 32 0) -itk_add_test(NAME itkDiscreteGaussianDerivativeImageFunctionTest02 - COMMAND ITKReviewTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFunctionTest02.png - 488a4bf5daa08cadb3e8b1018a3fe5c0 - itkDiscreteGaussianDerivativeImageFunctionTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGaussianDerivativeImageFunctionTest02.png 2 1.5 0.03 16 1) -itk_add_test(NAME itkDiscreteGradientMagnitudeGaussianImageFunctionTest01 - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteGradientMagnitudeGaussianImageFunctionTest01.png} - ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGradientMagnitudeGaussianImageFunctionTest01.png - itkDiscreteGradientMagnitudeGaussianImageFunctionTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGradientMagnitudeGaussianImageFunctionTest01.png 2.0 0.01 32 0 1) -itk_add_test(NAME itkDiscreteGradientMagnitudeGaussianImageFunctionTest02 - COMMAND ITKReviewTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGradientMagnitudeGaussianImageFunctionTest02.png - de1904605e667018baaa3f73c5e5c220 - itkDiscreteGradientMagnitudeGaussianImageFunctionTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGradientMagnitudeGaussianImageFunctionTest02.png 1.5 0.03 64 1 1) -itk_add_test(NAME itkDiscreteGradientMagnitudeGaussianImageFunctionTestUseImageSpacingOff - COMMAND ITKReviewTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGradientMagnitudeGaussianImageFunctionTestUseImageSpacingOff.png - de1904605e667018baaa3f73c5e5c220 - itkDiscreteGradientMagnitudeGaussianImageFunctionTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkDiscreteGradientMagnitudeGaussianImageFunctionTestUseImageSpacingOff.png 1.5 0.03 64 1 0) -itk_add_test(NAME itkDiscreteHessianGaussianImageFunctionTest - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkDiscreteHessianGaussianImageFunctionTest.mha} - ${ITK_TEST_OUTPUT_DIR}/itkDiscreteHessianGaussianImageFunctionTest.mha - itkDiscreteHessianGaussianImageFunctionTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkDiscreteHessianGaussianImageFunctionTest.mha 2.0 0.01 32) -itk_add_test(NAME itkFastApproximateRankImageFilterTest3 - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkFastApproximateRankImageFilter3.png} - ${ITK_TEST_OUTPUT_DIR}/itkFastApproximateRankImageFilter3.png - itkFastApproximateRankImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkFastApproximateRankImageFilter3.png 3) -itk_add_test(NAME itkFastApproximateRankImageFilterTest10 - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkFastApproximateRankImageFilter10.png} - ${ITK_TEST_OUTPUT_DIR}/itkFastApproximateRankImageFilter10.png - itkFastApproximateRankImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkFastApproximateRankImageFilter10.png 10) -itk_add_test(NAME itkGridForwardWarpImageFilterTest - COMMAND ITKReviewTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkGridForwardWarpImageFilterTest.mha - 7dea362b3fac8e00956a4952a3d4f474 - itkGridForwardWarpImageFilterTest ${ITK_TEST_OUTPUT_DIR}/itkGridForwardWarpImageFilterTest.mha) -itk_add_test(NAME itkImageFunctionTest - COMMAND ITKReviewTestDriver itkImageFunctionTest) -itk_add_test(NAME itkLabelGeometryImageFilterTest - COMMAND ITKReviewTestDriver - --compare DATA{${BASELINE}/itkLabelGeometryImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkLabelGeometryImageFilterTest.png - itkLabelGeometryImageFilterTest DATA{${INPUTDATA}/LabelImageWithVariousShapes.png} DATA{${INPUTDATA}/GrayscaleImageWithVariousShapes.png} ${ITK_TEST_OUTPUT_DIR}/itkLabelGeometryImageFilterTest.png ${ITK_TEST_OUTPUT_DIR}/itkLabelGeometryImageFilterTest.csv DATA{${BASELINE}/itkLabelGeometryImageFilterTest.csv}) -itk_add_test(NAME itkLabelGeometryImageFilterTest3D - COMMAND ITKReviewTestDriver - --compare DATA{${BASELINE}/itkLabelGeometryImageFilterTest3D.mhd,itkLabelGeometryImageFilterTest3D.raw} - ${ITK_TEST_OUTPUT_DIR}/itkLabelGeometryImageFilterTest3D.mhd - itkLabelGeometryImageFilterTest DATA{${INPUTDATA}/LabelVolumeWithVariousShapes.mhd,LabelVolumeWithVariousShapes.raw} DATA{${INPUTDATA}/GrayscaleVolumeWithVariousShapes.mhd,GrayscaleVolumeWithVariousShapes.raw} ${ITK_TEST_OUTPUT_DIR}/itkLabelGeometryImageFilterTest3D.mhd ${ITK_TEST_OUTPUT_DIR}/itkLabelGeometryImageFilterTest3D.csv DATA{${BASELINE}/itkLabelGeometryImageFilterTest3D.csv}) -itk_add_test(NAME itkMultiphaseDenseFiniteDifferenceImageFilterTest - COMMAND ITKReviewTestDriver itkMultiphaseDenseFiniteDifferenceImageFilterTest) -itk_add_test(NAME itkMultiphaseFiniteDifferenceImageFilterTest - COMMAND ITKReviewTestDriver itkMultiphaseFiniteDifferenceImageFilterTest) -itk_add_test(NAME itkMultiphaseSparseFiniteDifferenceImageFilterTest - COMMAND ITKReviewTestDriver itkMultiphaseSparseFiniteDifferenceImageFilterTest) +itk_add_test( + NAME + itkOptImageToImageMetricsTest01 + COMMAND + ITKReviewTestDriver + --redirectOutput + ${TEMP}/itkOptImageToImageMetricsTest01.txt + itkOptImageToImageMetricsTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png) +set_tests_properties(itkOptImageToImageMetricsTest01 PROPERTIES ATTACHED_FILES_ON_FAIL + ${TEMP}/itkOptImageToImageMetricsTest01.txt) -itk_add_test(NAME itkOptImageToImageMetricsTest01 - COMMAND ITKReviewTestDriver --redirectOutput ${TEMP}/itkOptImageToImageMetricsTest01.txt - itkOptImageToImageMetricsTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png) -set_tests_properties(itkOptImageToImageMetricsTest01 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkOptImageToImageMetricsTest01.txt) +itk_add_test( + NAME + itkOptImageToImageMetricsTest02 + COMMAND + ITKReviewTestDriver + --with-threads + 2 + --redirectOutput + ${TEMP}/itkOptImageToImageMetricsTest02.txt + itkOptImageToImageMetricsTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png) +set_tests_properties(itkOptImageToImageMetricsTest02 PROPERTIES ATTACHED_FILES_ON_FAIL + ${TEMP}/itkOptImageToImageMetricsTest02.txt) -itk_add_test(NAME itkOptImageToImageMetricsTest02 - COMMAND ITKReviewTestDriver --with-threads 2 --redirectOutput ${TEMP}/itkOptImageToImageMetricsTest02.txt - itkOptImageToImageMetricsTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png) -set_tests_properties(itkOptImageToImageMetricsTest02 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkOptImageToImageMetricsTest02.txt) +itk_add_test( + NAME + itkOptImageToImageMetricsTest03 + COMMAND + ITKReviewTestDriver + --without-threads + --redirectOutput + ${TEMP}/itkOptImageToImageMetricsTest03.txt + itkOptImageToImageMetricsTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png) +set_tests_properties(itkOptImageToImageMetricsTest03 PROPERTIES ATTACHED_FILES_ON_FAIL + ${TEMP}/itkOptImageToImageMetricsTest03.txt) -itk_add_test(NAME itkOptImageToImageMetricsTest03 - COMMAND ITKReviewTestDriver --without-threads --redirectOutput ${TEMP}/itkOptImageToImageMetricsTest03.txt - itkOptImageToImageMetricsTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png) -set_tests_properties(itkOptImageToImageMetricsTest03 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkOptImageToImageMetricsTest03.txt) - -itk_add_test(NAME itkOptImageToImageMetricsTest04 - COMMAND ITKReviewTestDriver - itkOptImageToImageMetricsTest2 - ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png DATA{Baseline/itkBSplineTransformTest4.png}) -itk_add_test(NAME itkOptMattesImageToImageMetricsTest01 - COMMAND ITKReviewTestDriver itkOptMattesMutualInformationImageToImageMetricThreadsTest1 - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png 0 100) -itk_add_test(NAME itkRegionBasedLevelSetFunctionTest - COMMAND ITKReviewTestDriver itkRegionBasedLevelSetFunctionTest) -itk_add_test(NAME itkRobustAutomaticThresholdImageFilterTest - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkRobustAutomaticThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkRobustAutomaticThresholdImageFilterTest.png - itkRobustAutomaticThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkRobustAutomaticThresholdImageFilterTest.png 2 65535 0 94) -itk_add_test(NAME itkRobustAutomaticThresholdCalculatorTest - COMMAND ITKReviewTestDriver - itkRobustAutomaticThresholdCalculatorTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} 2 94) -itk_add_test(NAME itkScalarChanAndVeseDenseLevelSetImageFilterTest1 - COMMAND ITKReviewTestDriver itkScalarChanAndVeseDenseLevelSetImageFilterTest1) -itk_add_test(NAME itkScalarChanAndVeseDenseLevelSetImageFilterTest2_0 - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_0.mha} - ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_0.mha - itkScalarChanAndVeseDenseLevelSetImageFilterTest2 DATA{${ITK_DATA_ROOT}/Baseline/Segmentation/ShapeDetectionLevelSetLeftVentricleTest.png,:} ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_0.mha 1 1 0 0 0) -itk_add_test(NAME itkScalarChanAndVeseDenseLevelSetImageFilterTest2_1 - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_1.mha} - ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_1.mha - itkScalarChanAndVeseDenseLevelSetImageFilterTest2 DATA{${ITK_DATA_ROOT}/Baseline/Segmentation/ShapeDetectionLevelSetLeftVentricleTest.png,:} ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_1.mha 1 1 1 1 200) -itk_add_test(NAME itkScalarChanAndVeseDenseLevelSetImageFilterTest2_2 - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_2.mha} - ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_2.mha - itkScalarChanAndVeseDenseLevelSetImageFilterTest2 DATA{${ITK_DATA_ROOT}/Baseline/Segmentation/ShapeDetectionLevelSetLeftVentricleTest.png,:} ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_2.mha 0 0 1 0 0) -itk_add_test(NAME itkScalarChanAndVeseDenseLevelSetImageFilterTest2_3 - COMMAND ITKReviewTestDriver itkScalarChanAndVeseDenseLevelSetImageFilterTest2 - DATA{${ITK_DATA_ROOT}/Baseline/Segmentation/ShapeDetectionLevelSetLeftVentricleTest.png,:} ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_3.mha 0 0 0 0 0) -itk_add_test(NAME itkScalarChanAndVeseDenseLevelSetImageFilterTest3 - COMMAND ITKReviewTestDriver itkScalarChanAndVeseDenseLevelSetImageFilterTest3) -itk_add_test(NAME itkScalarChanAndVeseDenseLevelSetImageFilterTest4 - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_0.mha} - ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest4.mha - itkScalarChanAndVeseDenseLevelSetImageFilterTest4 DATA{${ITK_DATA_ROOT}/Baseline/Segmentation/ShapeDetectionLevelSetLeftVentricleTest.png,:} ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest4.mha 1 1 0 0 0) -itk_add_test(NAME itkScalarChanAndVeseLevelSetFunctionTest1 - COMMAND ITKReviewTestDriver itkScalarChanAndVeseLevelSetFunctionTest1) -itk_add_test(NAME itkScalarChanAndVeseLevelSetFunctionTest2 - COMMAND ITKReviewTestDriver itkScalarChanAndVeseLevelSetFunctionTest2) -itk_add_test(NAME itkScalarChanAndVeseSparseLevelSetImageFilterTest1 - COMMAND ITKReviewTestDriver itkScalarChanAndVeseSparseLevelSetImageFilterTest1) -itk_add_test(NAME itkScalarChanAndVeseSparseLevelSetImageFilterTest2 - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkScalarChanAndVeseSparseLevelSetImageFilterTest2.mha} - ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseSparseLevelSetImageFilterTest2.mha - itkScalarChanAndVeseSparseLevelSetImageFilterTest2 DATA{${ITK_DATA_ROOT}/Baseline/Segmentation/ShapeDetectionLevelSetLeftVentricleTest.png,:} ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseSparseLevelSetImageFilterTest2.mha) -itk_add_test(NAME itkScalarRegionBasedLevelSetFunctionTest - COMMAND ITKReviewTestDriver itkScalarRegionBasedLevelSetFunctionTest) -itk_add_test(NAME itkShapedFloodFilledImageFunctionConditionalConstIteratorTest1 - COMMAND ITKReviewTestDriver itkShapedFloodFilledImageFunctionConditionalConstIteratorTest1 - DATA{${ITK_DATA_ROOT}/Input/8ConnectedImage.bmp}) -itk_add_test(NAME itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2 - COMMAND ITKReviewTestDriver itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2) -itk_add_test(NAME itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3 - COMMAND ITKReviewTestDriver itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3) -itk_add_test(NAME itkStochasticFractalDimensionImageFilterTest1 - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkStochasticFractalDimensionImageFilterTest1.mha} - ${ITK_TEST_OUTPUT_DIR}/itkStochasticFractalDimensionImageFilterTest1.mha - itkStochasticFractalDimensionImageFilterTest 2 DATA{${ITK_DATA_ROOT}/Input/TreeBarkTexture.png} ${ITK_TEST_OUTPUT_DIR}/itkStochasticFractalDimensionImageFilterTest1.mha 2) -itk_add_test(NAME itkStochasticFractalDimensionImageFilterTest2 - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Review/itkStochasticFractalDimensionImageFilterTest2.mha} - ${ITK_TEST_OUTPUT_DIR}/itkStochasticFractalDimensionImageFilterTest2.mha - itkStochasticFractalDimensionImageFilterTest 2 DATA{${ITK_DATA_ROOT}/Input/TreeBarkTexture.png} ${ITK_TEST_OUTPUT_DIR}/itkStochasticFractalDimensionImageFilterTest2.mha 2 DATA{${ITK_DATA_ROOT}/Input/circle100.png} 255) -itk_add_test(NAME itkTimeAndMemoryProbeTest1 - COMMAND ITKReviewTestDriver itkTimeAndMemoryProbeTest) -itk_add_test(NAME itkVoxBoCUBImageIOTest1 - COMMAND ITKReviewTestDriver itkVoxBoCUBImageIOTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume.cub) -itk_add_test(NAME itkVoxBoCUBImageIOTest2 - COMMAND ITKReviewTestDriver itkVoxBoCUBImageIOTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.cub} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume1.cub) -itk_add_test(NAME itkVoxBoCUBImageIOTest3 - COMMAND ITKReviewTestDriver itkVoxBoCUBImageIOTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume1.cub} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume1.cub.gz) -itk_add_test(NAME itkVoxBoCUBImageIOTest4 - COMMAND ITKReviewTestDriver itkVoxBoCUBImageIOTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume1.cub.gz} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume2.cub.gz) -itk_add_test(NAME itkVoxBoCUBImageIOTest5 - COMMAND ITKReviewTestDriver itkVoxBoCUBImageIOTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume2.cub.gz} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume2.cub) -itk_add_test(NAME itkVoxBoCUBImageIOTest6 - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeFromCUB2.mha - itkVoxBoCUBImageIOTest DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume2.cub} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeFromCUB2.mha) -itk_add_test(NAME itkVoxBoCUBImageIOTest7 - COMMAND ITKReviewTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeFromCUB3.mha - itkVoxBoCUBImageIOTest DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume2.cub.gz} ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeFromCUB3.mha) -itk_add_test(NAME itkWarpHarmonicEnergyCalculatorTestUseImageSpacingOn - COMMAND ITKReviewTestDriver itkWarpHarmonicEnergyCalculatorTest 1 1.0 0.0) -itk_add_test(NAME itkWarpHarmonicEnergyCalculatorTestUseImageSpacingOff - COMMAND ITKReviewTestDriver itkWarpHarmonicEnergyCalculatorTest 0 1.0 0.0) +itk_add_test( + NAME + itkOptImageToImageMetricsTest04 + COMMAND + ITKReviewTestDriver + itkOptImageToImageMetricsTest2 + ${ITK_EXAMPLE_DATA_ROOT}/DiagonalLines.png + DATA{Baseline/itkBSplineTransformTest4.png}) +itk_add_test( + NAME + itkOptMattesImageToImageMetricsTest01 + COMMAND + ITKReviewTestDriver + itkOptMattesMutualInformationImageToImageMetricThreadsTest1 + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + 0 + 100) +itk_add_test( + NAME + itkRegionBasedLevelSetFunctionTest + COMMAND + ITKReviewTestDriver + itkRegionBasedLevelSetFunctionTest) +itk_add_test( + NAME + itkRobustAutomaticThresholdImageFilterTest + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkRobustAutomaticThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkRobustAutomaticThresholdImageFilterTest.png + itkRobustAutomaticThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkRobustAutomaticThresholdImageFilterTest.png + 2 + 65535 + 0 + 94) +itk_add_test( + NAME + itkRobustAutomaticThresholdCalculatorTest + COMMAND + ITKReviewTestDriver + itkRobustAutomaticThresholdCalculatorTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + 2 + 94) +itk_add_test( + NAME + itkScalarChanAndVeseDenseLevelSetImageFilterTest1 + COMMAND + ITKReviewTestDriver + itkScalarChanAndVeseDenseLevelSetImageFilterTest1) +itk_add_test( + NAME + itkScalarChanAndVeseDenseLevelSetImageFilterTest2_0 + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_0.mha} + ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_0.mha + itkScalarChanAndVeseDenseLevelSetImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Baseline/Segmentation/ShapeDetectionLevelSetLeftVentricleTest.png,:} + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png + ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_0.mha + 1 + 1 + 0 + 0 + 0) +itk_add_test( + NAME + itkScalarChanAndVeseDenseLevelSetImageFilterTest2_1 + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_1.mha} + ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_1.mha + itkScalarChanAndVeseDenseLevelSetImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Baseline/Segmentation/ShapeDetectionLevelSetLeftVentricleTest.png,:} + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png + ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_1.mha + 1 + 1 + 1 + 1 + 200) +itk_add_test( + NAME + itkScalarChanAndVeseDenseLevelSetImageFilterTest2_2 + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_2.mha} + ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_2.mha + itkScalarChanAndVeseDenseLevelSetImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Baseline/Segmentation/ShapeDetectionLevelSetLeftVentricleTest.png,:} + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png + ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_2.mha + 0 + 0 + 1 + 0 + 0) +itk_add_test( + NAME + itkScalarChanAndVeseDenseLevelSetImageFilterTest2_3 + COMMAND + ITKReviewTestDriver + itkScalarChanAndVeseDenseLevelSetImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Baseline/Segmentation/ShapeDetectionLevelSetLeftVentricleTest.png,:} + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png + ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_3.mha + 0 + 0 + 0 + 0 + 0) +itk_add_test( + NAME + itkScalarChanAndVeseDenseLevelSetImageFilterTest3 + COMMAND + ITKReviewTestDriver + itkScalarChanAndVeseDenseLevelSetImageFilterTest3) +itk_add_test( + NAME + itkScalarChanAndVeseDenseLevelSetImageFilterTest4 + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkScalarChanAndVeseDenseLevelSetImageFilterTest2_0.mha} + ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest4.mha + itkScalarChanAndVeseDenseLevelSetImageFilterTest4 + DATA{${ITK_DATA_ROOT}/Baseline/Segmentation/ShapeDetectionLevelSetLeftVentricleTest.png,:} + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png + ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseDenseLevelSetImageFilterTest4.mha + 1 + 1 + 0 + 0 + 0) +itk_add_test( + NAME + itkScalarChanAndVeseLevelSetFunctionTest1 + COMMAND + ITKReviewTestDriver + itkScalarChanAndVeseLevelSetFunctionTest1) +itk_add_test( + NAME + itkScalarChanAndVeseLevelSetFunctionTest2 + COMMAND + ITKReviewTestDriver + itkScalarChanAndVeseLevelSetFunctionTest2) +itk_add_test( + NAME + itkScalarChanAndVeseSparseLevelSetImageFilterTest1 + COMMAND + ITKReviewTestDriver + itkScalarChanAndVeseSparseLevelSetImageFilterTest1) +itk_add_test( + NAME + itkScalarChanAndVeseSparseLevelSetImageFilterTest2 + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkScalarChanAndVeseSparseLevelSetImageFilterTest2.mha} + ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseSparseLevelSetImageFilterTest2.mha + itkScalarChanAndVeseSparseLevelSetImageFilterTest2 + DATA{${ITK_DATA_ROOT}/Baseline/Segmentation/ShapeDetectionLevelSetLeftVentricleTest.png,:} + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png + ${ITK_TEST_OUTPUT_DIR}/itkScalarChanAndVeseSparseLevelSetImageFilterTest2.mha) +itk_add_test( + NAME + itkScalarRegionBasedLevelSetFunctionTest + COMMAND + ITKReviewTestDriver + itkScalarRegionBasedLevelSetFunctionTest) +itk_add_test( + NAME + itkShapedFloodFilledImageFunctionConditionalConstIteratorTest1 + COMMAND + ITKReviewTestDriver + itkShapedFloodFilledImageFunctionConditionalConstIteratorTest1 + DATA{${ITK_DATA_ROOT}/Input/8ConnectedImage.bmp}) +itk_add_test( + NAME + itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2 + COMMAND + ITKReviewTestDriver + itkShapedFloodFilledImageFunctionConditionalConstIteratorTest2) +itk_add_test( + NAME + itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3 + COMMAND + ITKReviewTestDriver + itkShapedFloodFilledImageFunctionConditionalConstIteratorTest3) +itk_add_test( + NAME + itkStochasticFractalDimensionImageFilterTest1 + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkStochasticFractalDimensionImageFilterTest1.mha} + ${ITK_TEST_OUTPUT_DIR}/itkStochasticFractalDimensionImageFilterTest1.mha + itkStochasticFractalDimensionImageFilterTest + 2 + DATA{${ITK_DATA_ROOT}/Input/TreeBarkTexture.png} + ${ITK_TEST_OUTPUT_DIR}/itkStochasticFractalDimensionImageFilterTest1.mha + 2) +itk_add_test( + NAME + itkStochasticFractalDimensionImageFilterTest2 + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Review/itkStochasticFractalDimensionImageFilterTest2.mha} + ${ITK_TEST_OUTPUT_DIR}/itkStochasticFractalDimensionImageFilterTest2.mha + itkStochasticFractalDimensionImageFilterTest + 2 + DATA{${ITK_DATA_ROOT}/Input/TreeBarkTexture.png} + ${ITK_TEST_OUTPUT_DIR}/itkStochasticFractalDimensionImageFilterTest2.mha + 2 + DATA{${ITK_DATA_ROOT}/Input/circle100.png} + 255) +itk_add_test( + NAME + itkTimeAndMemoryProbeTest1 + COMMAND + ITKReviewTestDriver + itkTimeAndMemoryProbeTest) +itk_add_test( + NAME + itkVoxBoCUBImageIOTest1 + COMMAND + ITKReviewTestDriver + itkVoxBoCUBImageIOTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume.cub) +itk_add_test( + NAME + itkVoxBoCUBImageIOTest2 + COMMAND + ITKReviewTestDriver + itkVoxBoCUBImageIOTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.cub} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume1.cub) +itk_add_test( + NAME + itkVoxBoCUBImageIOTest3 + COMMAND + ITKReviewTestDriver + itkVoxBoCUBImageIOTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume1.cub} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume1.cub.gz) +itk_add_test( + NAME + itkVoxBoCUBImageIOTest4 + COMMAND + ITKReviewTestDriver + itkVoxBoCUBImageIOTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume1.cub.gz} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume2.cub.gz) +itk_add_test( + NAME + itkVoxBoCUBImageIOTest5 + COMMAND + ITKReviewTestDriver + itkVoxBoCUBImageIOTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume2.cub.gz} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume2.cub) +itk_add_test( + NAME + itkVoxBoCUBImageIOTest6 + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeFromCUB2.mha + itkVoxBoCUBImageIOTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume2.cub} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeFromCUB2.mha) +itk_add_test( + NAME + itkVoxBoCUBImageIOTest7 + COMMAND + ITKReviewTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/IO/HeadMRVolume.mhd,HeadMRVolume.raw} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeFromCUB3.mha + itkVoxBoCUBImageIOTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume2.cub.gz} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolumeFromCUB3.mha) +itk_add_test( + NAME + itkWarpHarmonicEnergyCalculatorTestUseImageSpacingOn + COMMAND + ITKReviewTestDriver + itkWarpHarmonicEnergyCalculatorTest + 1 + 1.0 + 0.0) +itk_add_test( + NAME + itkWarpHarmonicEnergyCalculatorTestUseImageSpacingOff + COMMAND + ITKReviewTestDriver + itkWarpHarmonicEnergyCalculatorTest + 0 + 1.0 + 0.0) diff --git a/Modules/Nonunit/Review/wrapping/itkAreaClosingImageFilter.wrap b/Modules/Nonunit/Review/wrapping/itkAreaClosingImageFilter.wrap index 075b2d3ae03..47bdf5b94ea 100644 --- a/Modules/Nonunit/Review/wrapping/itkAreaClosingImageFilter.wrap +++ b/Modules/Nonunit/Review/wrapping/itkAreaClosingImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::AreaClosingImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Nonunit/Review/wrapping/itkAreaOpeningImageFilter.wrap b/Modules/Nonunit/Review/wrapping/itkAreaOpeningImageFilter.wrap index 194f4c21d67..06825c3ee2d 100644 --- a/Modules/Nonunit/Review/wrapping/itkAreaOpeningImageFilter.wrap +++ b/Modules/Nonunit/Review/wrapping/itkAreaOpeningImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::AreaOpeningImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Nonunit/Review/wrapping/itkBoxMeanImageFilter.wrap b/Modules/Nonunit/Review/wrapping/itkBoxMeanImageFilter.wrap index 452b11b17fe..1cc573dd67a 100644 --- a/Modules/Nonunit/Review/wrapping/itkBoxMeanImageFilter.wrap +++ b/Modules/Nonunit/Review/wrapping/itkBoxMeanImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BoxMeanImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Nonunit/Review/wrapping/itkBoxSigmaImageFilter.wrap b/Modules/Nonunit/Review/wrapping/itkBoxSigmaImageFilter.wrap index c496bf5bda2..71cecedc444 100644 --- a/Modules/Nonunit/Review/wrapping/itkBoxSigmaImageFilter.wrap +++ b/Modules/Nonunit/Review/wrapping/itkBoxSigmaImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BoxSigmaImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Nonunit/Review/wrapping/itkDirectFourierReconstructionImageToImageFilter.wrap b/Modules/Nonunit/Review/wrapping/itkDirectFourierReconstructionImageToImageFilter.wrap index 6b92b2ffccf..5b3cb3409ae 100644 --- a/Modules/Nonunit/Review/wrapping/itkDirectFourierReconstructionImageToImageFilter.wrap +++ b/Modules/Nonunit/Review/wrapping/itkDirectFourierReconstructionImageToImageFilter.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::DirectFourierReconstructionImageToImageFilter" POINTER) - itk_wrap_filter_dims(d 3) - if(d) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t}3}${ITKM_I${t}3}" "${ITKT_I${t}3}, ${ITKT_I${t}3}") - endforeach() - endif() +itk_wrap_filter_dims(d 3) +if(d) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}3}${ITKM_I${t}3}" "${ITKT_I${t}3}, ${ITKT_I${t}3}") + endforeach() +endif() itk_end_wrap_class() diff --git a/Modules/Nonunit/Review/wrapping/itkESMDemonsRegistrationFunction.wrap b/Modules/Nonunit/Review/wrapping/itkESMDemonsRegistrationFunction.wrap index db668c4a5ce..021702aec12 100644 --- a/Modules/Nonunit/Review/wrapping/itkESMDemonsRegistrationFunction.wrap +++ b/Modules/Nonunit/Review/wrapping/itkESMDemonsRegistrationFunction.wrap @@ -1,5 +1,9 @@ itk_wrap_class("itk::ESMDemonsRegistrationFunction" POINTER) - foreach(s ${WRAP_ITK_SCALAR}) - itk_wrap_image_filter_combinations("${s}" "${s}" "${WRAP_ITK_VECTOR_REAL}" 2+) - endforeach() +foreach(s ${WRAP_ITK_SCALAR}) + itk_wrap_image_filter_combinations( + "${s}" + "${s}" + "${WRAP_ITK_VECTOR_REAL}" + 2+) +endforeach() itk_end_wrap_class() diff --git a/Modules/Nonunit/Review/wrapping/itkFastApproximateRankImageFilter.wrap b/Modules/Nonunit/Review/wrapping/itkFastApproximateRankImageFilter.wrap index 29c506e6934..a725d8f4099 100644 --- a/Modules/Nonunit/Review/wrapping/itkFastApproximateRankImageFilter.wrap +++ b/Modules/Nonunit/Review/wrapping/itkFastApproximateRankImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::FastApproximateRankImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Nonunit/Review/wrapping/itkFastSymmetricForcesDemonsRegistrationFilter.wrap b/Modules/Nonunit/Review/wrapping/itkFastSymmetricForcesDemonsRegistrationFilter.wrap index 7a7054210b5..55af782d5a7 100644 --- a/Modules/Nonunit/Review/wrapping/itkFastSymmetricForcesDemonsRegistrationFilter.wrap +++ b/Modules/Nonunit/Review/wrapping/itkFastSymmetricForcesDemonsRegistrationFilter.wrap @@ -1,16 +1,20 @@ itk_wrap_class("itk::FastSymmetricForcesDemonsRegistrationFilter" POINTER) - foreach(curr_dim ${ITK_WRAP_IMAGE_DIMS}) - if(${curr_dim} LESS 1) - continue() - endif() - # Vector components dimension must match image dimension. Temporarily change the global vector dims list. - set(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_PDE_DEFORMABLE_REGISTRATION_FILTER "${ITK_WRAP_VECTOR_COMPONENTS}") - set(ITK_WRAP_VECTOR_COMPONENTS ${curr_dim}) - foreach(s ${WRAP_ITK_SCALAR}) - itk_wrap_image_filter_combinations("${s}" "${s}" "${WRAP_ITK_VECTOR_REAL}" ${curr_dim}) - endforeach() - # Restore the global vector dims list. - set(ITK_WRAP_VECTOR_COMPONENTS "${SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_PDE_DEFORMABLE_REGISTRATION_FILTER}") - unset(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_PDE_DEFORMABLE_REGISTRATION_FILTER) +foreach(curr_dim ${ITK_WRAP_IMAGE_DIMS}) + if(${curr_dim} LESS 1) + continue() + endif() + # Vector components dimension must match image dimension. Temporarily change the global vector dims list. + set(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_PDE_DEFORMABLE_REGISTRATION_FILTER "${ITK_WRAP_VECTOR_COMPONENTS}") + set(ITK_WRAP_VECTOR_COMPONENTS ${curr_dim}) + foreach(s ${WRAP_ITK_SCALAR}) + itk_wrap_image_filter_combinations( + "${s}" + "${s}" + "${WRAP_ITK_VECTOR_REAL}" + ${curr_dim}) endforeach() + # Restore the global vector dims list. + set(ITK_WRAP_VECTOR_COMPONENTS "${SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_PDE_DEFORMABLE_REGISTRATION_FILTER}") + unset(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_PDE_DEFORMABLE_REGISTRATION_FILTER) +endforeach() itk_end_wrap_class() diff --git a/Modules/Nonunit/Review/wrapping/itkGridForwardWarpImageFilter.wrap b/Modules/Nonunit/Review/wrapping/itkGridForwardWarpImageFilter.wrap index d0d1cecc00b..415e03bf472 100644 --- a/Modules/Nonunit/Review/wrapping/itkGridForwardWarpImageFilter.wrap +++ b/Modules/Nonunit/Review/wrapping/itkGridForwardWarpImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::GridForwardWarpImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR_REAL}" "${WRAP_ITK_INT}" 2+) +itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR_REAL}" "${WRAP_ITK_INT}" 2+) itk_end_wrap_class() diff --git a/Modules/Nonunit/Review/wrapping/itkLabelGeometryImageFilter.wrap b/Modules/Nonunit/Review/wrapping/itkLabelGeometryImageFilter.wrap index d4f2c33bbec..20295d0ef20 100644 --- a/Modules/Nonunit/Review/wrapping/itkLabelGeometryImageFilter.wrap +++ b/Modules/Nonunit/Review/wrapping/itkLabelGeometryImageFilter.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::LabelGeometryImageFilter" POINTER) foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t1 ${WRAP_ITK_SCALAR}) - foreach(t2 ${WRAP_ITK_USIGN_INT} ${WRAP_ITK_SIGN_INT}) - itk_wrap_template("${ITKM_I${t2}${d}}${ITKM_I${t1}${d}}" "${ITKT_I${t2}${d}},${ITKT_I${t1}${d}}") - endforeach() + foreach(t1 ${WRAP_ITK_SCALAR}) + foreach(t2 ${WRAP_ITK_USIGN_INT} ${WRAP_ITK_SIGN_INT}) + itk_wrap_template("${ITKM_I${t2}${d}}${ITKM_I${t1}${d}}" "${ITKT_I${t2}${d}},${ITKT_I${t1}${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Nonunit/Review/wrapping/itkMaskedRankImageFilter.wrap b/Modules/Nonunit/Review/wrapping/itkMaskedRankImageFilter.wrap index 57eca70da30..94d3ad0ce09 100644 --- a/Modules/Nonunit/Review/wrapping/itkMaskedRankImageFilter.wrap +++ b/Modules/Nonunit/Review/wrapping/itkMaskedRankImageFilter.wrap @@ -1,9 +1,10 @@ itk_wrap_class("itk::MaskedRankImageFilter" POINTER_WITH_SUPERCLASS) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - foreach(l ${WRAP_ITK_INT}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${l}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_I${l}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + foreach(l ${WRAP_ITK_INT}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${l}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${l}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Nonunit/Review/wrapping/itkRankImageFilter.wrap b/Modules/Nonunit/Review/wrapping/itkRankImageFilter.wrap index 0d34fd25a8f..0212cabbd20 100644 --- a/Modules/Nonunit/Review/wrapping/itkRankImageFilter.wrap +++ b/Modules/Nonunit/Review/wrapping/itkRankImageFilter.wrap @@ -1,7 +1,8 @@ itk_wrap_class("itk::RankImageFilter" POINTER_WITH_SUPERCLASS) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_SE${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_SE${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Nonunit/Review/wrapping/itkRobustAutomaticThresholdImageFilter.wrap b/Modules/Nonunit/Review/wrapping/itkRobustAutomaticThresholdImageFilter.wrap index 6e819cc180c..a13235206f0 100644 --- a/Modules/Nonunit/Review/wrapping/itkRobustAutomaticThresholdImageFilter.wrap +++ b/Modules/Nonunit/Review/wrapping/itkRobustAutomaticThresholdImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::RobustAutomaticThresholdImageFilter" POINTER) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_image_filter_combinations("${t}" "${t}" "${WRAP_ITK_INT}") - endforeach() +foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_image_filter_combinations("${t}" "${t}" "${WRAP_ITK_INT}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Nonunit/Review/wrapping/itkScalarChanAndVeseDenseLevelSetImageFilter.wrap b/Modules/Nonunit/Review/wrapping/itkScalarChanAndVeseDenseLevelSetImageFilter.wrap index caf58d69104..9c1376336cf 100644 --- a/Modules/Nonunit/Review/wrapping/itkScalarChanAndVeseDenseLevelSetImageFilter.wrap +++ b/Modules/Nonunit/Review/wrapping/itkScalarChanAndVeseDenseLevelSetImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ScalarChanAndVeseDenseLevelSetImageFilter" POINTER_WITH_2_SUPERCLASSES) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 3 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 3 2+) itk_end_wrap_class() diff --git a/Modules/Nonunit/Review/wrapping/itkScalarChanAndVeseLevelSetFunction.wrap b/Modules/Nonunit/Review/wrapping/itkScalarChanAndVeseLevelSetFunction.wrap index d58db38952c..3da25d986e0 100644 --- a/Modules/Nonunit/Review/wrapping/itkScalarChanAndVeseLevelSetFunction.wrap +++ b/Modules/Nonunit/Review/wrapping/itkScalarChanAndVeseLevelSetFunction.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ScalarChanAndVeseLevelSetFunction" POINTER_WITH_2_SUPERCLASSES) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Nonunit/Review/wrapping/itkScalarChanAndVeseSparseLevelSetImageFilter.wrap b/Modules/Nonunit/Review/wrapping/itkScalarChanAndVeseSparseLevelSetImageFilter.wrap index 1c8fa75d179..53a7dc5065b 100644 --- a/Modules/Nonunit/Review/wrapping/itkScalarChanAndVeseSparseLevelSetImageFilter.wrap +++ b/Modules/Nonunit/Review/wrapping/itkScalarChanAndVeseSparseLevelSetImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ScalarChanAndVeseSparseLevelSetImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 3 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 3 2+) itk_end_wrap_class() diff --git a/Modules/Nonunit/Review/wrapping/itkStochasticFractalDimensionImageFilter.wrap b/Modules/Nonunit/Review/wrapping/itkStochasticFractalDimensionImageFilter.wrap index ca1d3e812f8..51a0203d205 100644 --- a/Modules/Nonunit/Review/wrapping/itkStochasticFractalDimensionImageFilter.wrap +++ b/Modules/Nonunit/Review/wrapping/itkStochasticFractalDimensionImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::StochasticFractalDimensionImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Numerics/Eigen/itk-module.cmake b/Modules/Numerics/Eigen/itk-module.cmake index 31dc751fc8e..82902a86229 100644 --- a/Modules/Numerics/Eigen/itk-module.cmake +++ b/Modules/Numerics/Eigen/itk-module.cmake @@ -1,11 +1,11 @@ set(DOCUMENTATION "This module contains classes related to calculation of eigenvectors and eigenvalues.") -itk_module(ITKEigen +itk_module( + ITKEigen DEPENDS - ITKImageFilterBase + ITKImageFilterBase TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Numerics/Eigen/test/CMakeLists.txt b/Modules/Numerics/Eigen/test/CMakeLists.txt index f52253002c1..edbb3de0cad 100644 --- a/Modules/Numerics/Eigen/test/CMakeLists.txt +++ b/Modules/Numerics/Eigen/test/CMakeLists.txt @@ -1,9 +1,11 @@ itk_module_test() -set(ITKEigenTests -itkEigenAnalysis2DImageFilterTest.cxx -) +set(ITKEigenTests itkEigenAnalysis2DImageFilterTest.cxx) -CreateTestDriver(ITKEigen "${ITKEigen-Test_LIBRARIES}" "${ITKEigenTests}") +createtestdriver(ITKEigen "${ITKEigen-Test_LIBRARIES}" "${ITKEigenTests}") -itk_add_test(NAME itkEigenAnalysis2DImageFilterTest - COMMAND ITKEigenTestDriver itkEigenAnalysis2DImageFilterTest) +itk_add_test( + NAME + itkEigenAnalysis2DImageFilterTest + COMMAND + ITKEigenTestDriver + itkEigenAnalysis2DImageFilterTest) diff --git a/Modules/Numerics/Eigen/wrapping/itkEigenAnalysis2DImageFilter.wrap b/Modules/Numerics/Eigen/wrapping/itkEigenAnalysis2DImageFilter.wrap index 545a9674d3f..99ca1f575dc 100644 --- a/Modules/Numerics/Eigen/wrapping/itkEigenAnalysis2DImageFilter.wrap +++ b/Modules/Numerics/Eigen/wrapping/itkEigenAnalysis2DImageFilter.wrap @@ -1,11 +1,15 @@ itk_wrap_class("itk::EigenAnalysis2DImageFilter" POINTER) - # Only vectors with 2 components are valid. Temporarily change the global vector dims list. - set(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_EIGEN_ANALYSIS_2D_IMAGE_FILTER "${ITK_WRAP_VECTOR_COMPONENTS}") - set(ITK_WRAP_VECTOR_COMPONENTS 2) - foreach(s ${WRAP_ITK_REAL}) - itk_wrap_image_filter_combinations("${s}" "${s}" "${WRAP_ITK_VECTOR_REAL}" 2) - endforeach() - # Restore the global vector dims list. - set(ITK_WRAP_VECTOR_COMPONENTS "${SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_EIGEN_ANALYSIS_2D_IMAGE_FILTER}") - unset(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_EIGEN_ANALYSIS_2D_IMAGE_FILTER) +# Only vectors with 2 components are valid. Temporarily change the global vector dims list. +set(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_EIGEN_ANALYSIS_2D_IMAGE_FILTER "${ITK_WRAP_VECTOR_COMPONENTS}") +set(ITK_WRAP_VECTOR_COMPONENTS 2) +foreach(s ${WRAP_ITK_REAL}) + itk_wrap_image_filter_combinations( + "${s}" + "${s}" + "${WRAP_ITK_VECTOR_REAL}" + 2) +endforeach() +# Restore the global vector dims list. +set(ITK_WRAP_VECTOR_COMPONENTS "${SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_EIGEN_ANALYSIS_2D_IMAGE_FILTER}") +unset(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_EIGEN_ANALYSIS_2D_IMAGE_FILTER) itk_end_wrap_class() diff --git a/Modules/Numerics/FEM/itk-module.cmake b/Modules/Numerics/FEM/itk-module.cmake index 6001db09d88..e1793f31ea3 100644 --- a/Modules/Numerics/FEM/itk-module.cmake +++ b/Modules/Numerics/FEM/itk-module.cmake @@ -1,21 +1,22 @@ -set(DOCUMENTATION "This modules provides code to perform finite element +set(DOCUMENTATION + "This modules provides code to perform finite element analysis. A structural mechanics finite element model can, for instance, be used for image registration.") -itk_module(ITKFEM +itk_module( + ITKFEM ENABLE_SHARED DEPENDS - ITKImageFunction - ITKRegistrationCommon + ITKImageFunction + ITKRegistrationCommon COMPILE_DEPENDS - ITKSpatialObjects - ITKIOSpatialObjects + ITKSpatialObjects + ITKIOSpatialObjects TEST_DEPENDS - ITKTestKernel - ITKIOSpatialObjects + ITKTestKernel + ITKIOSpatialObjects DESCRIPTION - "${DOCUMENTATION}" - EXCLUDE_FROM_DEFAULT -) + "${DOCUMENTATION}" + EXCLUDE_FROM_DEFAULT) # ITKIOSpatialObjects dependency added for itkFEMSpatialObjectWriter diff --git a/Modules/Numerics/FEM/src/CMakeLists.txt b/Modules/Numerics/FEM/src/CMakeLists.txt index c6446c4077c..23cb6ea80cb 100644 --- a/Modules/Numerics/FEM/src/CMakeLists.txt +++ b/Modules/Numerics/FEM/src/CMakeLists.txt @@ -1,52 +1,51 @@ set(ITKFEM_SRCS - itkFEMSolution.cxx - itkFEMElement2DC0LinearLine.cxx - itkFEMElement2DC0LinearLineStress.cxx - itkFEMElement2DC0LinearQuadrilateral.cxx - itkFEMElement2DC0LinearQuadrilateralMembrane.cxx - itkFEMElement2DC0LinearQuadrilateralStrain.cxx - itkFEMElement2DC0LinearQuadrilateralStress.cxx - itkFEMElement2DC0LinearTriangular.cxx - itkFEMElement2DC0LinearTriangularMembrane.cxx - itkFEMElement2DC0LinearTriangularStrain.cxx - itkFEMElement2DC0LinearTriangularStress.cxx - itkFEMElement2DC0QuadraticTriangular.cxx - itkFEMElement2DC0QuadraticTriangularStrain.cxx - itkFEMElement2DC0QuadraticTriangularStress.cxx - itkFEMElement2DC1Beam.cxx - itkFEMElement3DC0LinearHexahedron.cxx - itkFEMElement3DC0LinearHexahedronMembrane.cxx - itkFEMElement3DC0LinearHexahedronStrain.cxx - itkFEMElement3DC0LinearTetrahedron.cxx - itkFEMElement3DC0LinearTetrahedronMembrane.cxx - itkFEMElement3DC0LinearTetrahedronStrain.cxx - itkFEMElement3DC0LinearTriangular.cxx - itkFEMElement3DC0LinearTriangularLaplaceBeltrami.cxx - itkFEMElement3DC0LinearTriangularMembrane.cxx - itkFEMElementBase.cxx - itkFEMException.cxx - itkFEMFactoryBase.cxx - itkFEMItpackSparseMatrix.cxx - itkFEMLightObject.cxx - itkFEMLinearSystemWrapper.cxx - itkFEMLinearSystemWrapperDenseVNL.cxx - itkFEMLinearSystemWrapperItpack.cxx - itkFEMLinearSystemWrapperVNL.cxx - itkFEMLoadBC.cxx - itkFEMLoadBCMFC.cxx - itkFEMLoadBase.cxx - itkFEMLoadEdge.cxx - itkFEMLoadElementBase.cxx - itkFEMLoadGrav.cxx - itkFEMLoadLandmark.cxx - itkFEMLoadNoisyLandmark.cxx - itkFEMLoadNode.cxx - itkFEMLoadPoint.cxx - itkFEMMaterialBase.cxx - itkFEMMaterialLinearElasticity.cxx - itkFEMUtility.cxx - dsrc2c.c - ) + itkFEMSolution.cxx + itkFEMElement2DC0LinearLine.cxx + itkFEMElement2DC0LinearLineStress.cxx + itkFEMElement2DC0LinearQuadrilateral.cxx + itkFEMElement2DC0LinearQuadrilateralMembrane.cxx + itkFEMElement2DC0LinearQuadrilateralStrain.cxx + itkFEMElement2DC0LinearQuadrilateralStress.cxx + itkFEMElement2DC0LinearTriangular.cxx + itkFEMElement2DC0LinearTriangularMembrane.cxx + itkFEMElement2DC0LinearTriangularStrain.cxx + itkFEMElement2DC0LinearTriangularStress.cxx + itkFEMElement2DC0QuadraticTriangular.cxx + itkFEMElement2DC0QuadraticTriangularStrain.cxx + itkFEMElement2DC0QuadraticTriangularStress.cxx + itkFEMElement2DC1Beam.cxx + itkFEMElement3DC0LinearHexahedron.cxx + itkFEMElement3DC0LinearHexahedronMembrane.cxx + itkFEMElement3DC0LinearHexahedronStrain.cxx + itkFEMElement3DC0LinearTetrahedron.cxx + itkFEMElement3DC0LinearTetrahedronMembrane.cxx + itkFEMElement3DC0LinearTetrahedronStrain.cxx + itkFEMElement3DC0LinearTriangular.cxx + itkFEMElement3DC0LinearTriangularLaplaceBeltrami.cxx + itkFEMElement3DC0LinearTriangularMembrane.cxx + itkFEMElementBase.cxx + itkFEMException.cxx + itkFEMFactoryBase.cxx + itkFEMItpackSparseMatrix.cxx + itkFEMLightObject.cxx + itkFEMLinearSystemWrapper.cxx + itkFEMLinearSystemWrapperDenseVNL.cxx + itkFEMLinearSystemWrapperItpack.cxx + itkFEMLinearSystemWrapperVNL.cxx + itkFEMLoadBC.cxx + itkFEMLoadBCMFC.cxx + itkFEMLoadBase.cxx + itkFEMLoadEdge.cxx + itkFEMLoadElementBase.cxx + itkFEMLoadGrav.cxx + itkFEMLoadLandmark.cxx + itkFEMLoadNoisyLandmark.cxx + itkFEMLoadNode.cxx + itkFEMLoadPoint.cxx + itkFEMMaterialBase.cxx + itkFEMMaterialLinearElasticity.cxx + itkFEMUtility.cxx + dsrc2c.c) itk_module_add_library(ITKFEM ${ITKFEM_SRCS}) target_link_libraries(ITKFEM LINK_PUBLIC ${ITKMetaIO_LIBRARIES}) diff --git a/Modules/Numerics/FEM/test/CMakeLists.txt b/Modules/Numerics/FEM/test/CMakeLists.txt index 8a8e501d20e..9d959d011f4 100644 --- a/Modules/Numerics/FEM/test/CMakeLists.txt +++ b/Modules/Numerics/FEM/test/CMakeLists.txt @@ -1,306 +1,699 @@ itk_module_test() set(ITKFEMTests -itkFEMExceptionTest.cxx -itkFEMElement2DMembraneTest.cxx -itkFEMElement3DMembraneTest.cxx -itkFEMElement2DStrainTest.cxx -itkFEMElement2DQuadraticTriangularTest.cxx -itkFEMLinearSystemWrapperItpackTest.cxx -itkFEMLinearSystemWrapperItpackTest2.cxx -itkFEMLinearSystemWrapperVNLTest.cxx -itkFEMLinearSystemWrapperDenseVNLTest.cxx -itkFEMPArrayTest.cxx -itkFEMElement2DC0LinearTriangleStressTest.cxx -itkFEMElement2DC0LinearQuadrilateralStrainItpackTest.cxx -itkFEMElement2DC0LinearTriangleStrainTest.cxx -itkFEMElement2DC0LinearTriangleMembraneTest.cxx -itkFEMElement2DC0LinearQuadrilateralStressTest.cxx -itkFEMElement2DC0LinearQuadrilateralStrainTest.cxx -itkFEMElement2DC0LinearQuadrilateralMembraneTest.cxx -itkFEMElement2DC0QuadraticTriangleStrainTest.cxx -itkFEMElement2DC0QuadraticTriangleStressTest.cxx -itkFEMElement2DC0LinearLineStressTest.cxx -itkFEMElement2DC1BeamTest.cxx -itkFEMElement3DC0LinearHexahedronStrainTest.cxx -itkFEMElement3DC0LinearHexahedronMembraneTest.cxx -itkFEMElement3DC0LinearTetrahedronStrainTest.cxx -itkFEMElement3DC0LinearTetrahedronMembraneTest.cxx -itkFEMLoadBCMFCTest.cxx -itkFEMLoadBCMFCTestUser.cxx -itkFEMLoadEdgeTest.cxx -itkFEMLoadGravConstTest.cxx -itkFEMLoadPointTestUser.cxx -itkFEMLandmarkLoadImplementationTest.cxx -# itkFEMSolverTest2D.cxx -itkFEMSolverTest3D.cxx -itkImageToRectilinearFEMObjectFilter2DTest.cxx -itkImageToRectilinearFEMObjectFilter3DTest.cxx -itkFEMElement2DTest.cxx -itkFEMElement3DTest.cxx -itkFEMObjectTest.cxx -itkFEMObjectTest2.cxx -itkFEMSpatialObjectTest.cxx -itkFEMSolverHyperbolicTest.cxx -itkFEMRobustSolverTest.cxx -itkFEMScatteredDataPointSetToImageFilterTest.cxx -) - -CreateTestDriver(ITKFEM "${ITKFEM-Test_LIBRARIES}" "${ITKFEMTests}") - -itk_add_test(NAME itkFEMElement2DMembraneTest - COMMAND ITKFEMTestDriver itkFEMElement2DMembraneTest) -itk_add_test(NAME itkFEMElement2DQuadraticTriangularTest - COMMAND ITKFEMTestDriver itkFEMElement2DQuadraticTriangularTest) -itk_add_test(NAME itkFEMElement2DStrainTest - COMMAND ITKFEMTestDriver itkFEMElement2DStrainTest) -itk_add_test(NAME itkFEMElement3DMembraneTest - COMMAND ITKFEMTestDriver itkFEMElement3DMembraneTest) -itk_add_test(NAME itkFEMExceptionTest - COMMAND ITKFEMTestDriver itkFEMExceptionTest) -itk_add_test(NAME itkFEMLinearSystemWrapperDenseVNLTest - COMMAND ITKFEMTestDriver itkFEMLinearSystemWrapperDenseVNLTest) -itk_add_test(NAME itkFEMLinearSystemWrapperItpackTest - COMMAND ITKFEMTestDriver itkFEMLinearSystemWrapperItpackTest) -itk_add_test(NAME itkFEMLinearSystemWrapperItpackTest1 - COMMAND ITKFEMTestDriver itkFEMLinearSystemWrapperItpackTest - 0) -itk_add_test(NAME itkFEMLinearSystemWrapperItpackTest2 - COMMAND ITKFEMTestDriver itkFEMLinearSystemWrapperItpackTest - 1) -itk_add_test(NAME itkFEMLinearSystemWrapperItpackTest3 - COMMAND ITKFEMTestDriver itkFEMLinearSystemWrapperItpackTest - 2) -itk_add_test(NAME itkFEMLinearSystemWrapperItpackTest4 - COMMAND ITKFEMTestDriver itkFEMLinearSystemWrapperItpackTest - 3) -itk_add_test(NAME itkFEMLinearSystemWrapperItpackTest5 - COMMAND ITKFEMTestDriver itkFEMLinearSystemWrapperItpackTest - 4) -itk_add_test(NAME itkFEMLinearSystemWrapperItpackTest6 - COMMAND ITKFEMTestDriver itkFEMLinearSystemWrapperItpackTest - 5) -itk_add_test(NAME itkFEMLinearSystemWrapperItpackTest7 - COMMAND ITKFEMTestDriver itkFEMLinearSystemWrapperItpackTest - 6) -itk_add_test(NAME itkFEMLinearSystemWrapperItpackTest8 - COMMAND ITKFEMTestDriver itkFEMLinearSystemWrapperItpackTest2 - 0) -itk_add_test(NAME itkFEMLinearSystemWrapperItpackTest9 - COMMAND ITKFEMTestDriver itkFEMLinearSystemWrapperItpackTest2 - 1) -itk_add_test(NAME itkFEMLinearSystemWrapperItpackTest10 - COMMAND ITKFEMTestDriver itkFEMLinearSystemWrapperItpackTest2 - 2) -itk_add_test(NAME itkFEMLinearSystemWrapperItpackTest11 - COMMAND ITKFEMTestDriver itkFEMLinearSystemWrapperItpackTest2 - 3) -itk_add_test(NAME itkFEMLinearSystemWrapperItpackTest12 - COMMAND ITKFEMTestDriver itkFEMLinearSystemWrapperItpackTest2 - 4) -itk_add_test(NAME itkFEMLinearSystemWrapperItpackTest13 - COMMAND ITKFEMTestDriver itkFEMLinearSystemWrapperItpackTest2 - 5) -itk_add_test(NAME itkFEMLinearSystemWrapperItpackTest14 - COMMAND ITKFEMTestDriver itkFEMLinearSystemWrapperItpackTest2 - 6) -itk_add_test(NAME itkFEMLinearSystemWrapperVNLTest - COMMAND ITKFEMTestDriver itkFEMLinearSystemWrapperVNLTest) -itk_add_test(NAME itkFEMPArrayTest - COMMAND ITKFEMTestDriver itkFEMPArrayTest) -itk_add_test(NAME itkFEMScatteredDataPointSetToImageFilterTest - COMMAND ITKFEMTestDriver itkFEMScatteredDataPointSetToImageFilterTest) - + itkFEMExceptionTest.cxx + itkFEMElement2DMembraneTest.cxx + itkFEMElement3DMembraneTest.cxx + itkFEMElement2DStrainTest.cxx + itkFEMElement2DQuadraticTriangularTest.cxx + itkFEMLinearSystemWrapperItpackTest.cxx + itkFEMLinearSystemWrapperItpackTest2.cxx + itkFEMLinearSystemWrapperVNLTest.cxx + itkFEMLinearSystemWrapperDenseVNLTest.cxx + itkFEMPArrayTest.cxx + itkFEMElement2DC0LinearTriangleStressTest.cxx + itkFEMElement2DC0LinearQuadrilateralStrainItpackTest.cxx + itkFEMElement2DC0LinearTriangleStrainTest.cxx + itkFEMElement2DC0LinearTriangleMembraneTest.cxx + itkFEMElement2DC0LinearQuadrilateralStressTest.cxx + itkFEMElement2DC0LinearQuadrilateralStrainTest.cxx + itkFEMElement2DC0LinearQuadrilateralMembraneTest.cxx + itkFEMElement2DC0QuadraticTriangleStrainTest.cxx + itkFEMElement2DC0QuadraticTriangleStressTest.cxx + itkFEMElement2DC0LinearLineStressTest.cxx + itkFEMElement2DC1BeamTest.cxx + itkFEMElement3DC0LinearHexahedronStrainTest.cxx + itkFEMElement3DC0LinearHexahedronMembraneTest.cxx + itkFEMElement3DC0LinearTetrahedronStrainTest.cxx + itkFEMElement3DC0LinearTetrahedronMembraneTest.cxx + itkFEMLoadBCMFCTest.cxx + itkFEMLoadBCMFCTestUser.cxx + itkFEMLoadEdgeTest.cxx + itkFEMLoadGravConstTest.cxx + itkFEMLoadPointTestUser.cxx + itkFEMLandmarkLoadImplementationTest.cxx + # itkFEMSolverTest2D.cxx + itkFEMSolverTest3D.cxx + itkImageToRectilinearFEMObjectFilter2DTest.cxx + itkImageToRectilinearFEMObjectFilter3DTest.cxx + itkFEMElement2DTest.cxx + itkFEMElement3DTest.cxx + itkFEMObjectTest.cxx + itkFEMObjectTest2.cxx + itkFEMSpatialObjectTest.cxx + itkFEMSolverHyperbolicTest.cxx + itkFEMRobustSolverTest.cxx + itkFEMScatteredDataPointSetToImageFilterTest.cxx) + +createtestdriver(ITKFEM "${ITKFEM-Test_LIBRARIES}" "${ITKFEMTests}") + +itk_add_test( + NAME + itkFEMElement2DMembraneTest + COMMAND + ITKFEMTestDriver + itkFEMElement2DMembraneTest) +itk_add_test( + NAME + itkFEMElement2DQuadraticTriangularTest + COMMAND + ITKFEMTestDriver + itkFEMElement2DQuadraticTriangularTest) +itk_add_test( + NAME + itkFEMElement2DStrainTest + COMMAND + ITKFEMTestDriver + itkFEMElement2DStrainTest) +itk_add_test( + NAME + itkFEMElement3DMembraneTest + COMMAND + ITKFEMTestDriver + itkFEMElement3DMembraneTest) +itk_add_test( + NAME + itkFEMExceptionTest + COMMAND + ITKFEMTestDriver + itkFEMExceptionTest) +itk_add_test( + NAME + itkFEMLinearSystemWrapperDenseVNLTest + COMMAND + ITKFEMTestDriver + itkFEMLinearSystemWrapperDenseVNLTest) +itk_add_test( + NAME + itkFEMLinearSystemWrapperItpackTest + COMMAND + ITKFEMTestDriver + itkFEMLinearSystemWrapperItpackTest) +itk_add_test( + NAME + itkFEMLinearSystemWrapperItpackTest1 + COMMAND + ITKFEMTestDriver + itkFEMLinearSystemWrapperItpackTest + 0) +itk_add_test( + NAME + itkFEMLinearSystemWrapperItpackTest2 + COMMAND + ITKFEMTestDriver + itkFEMLinearSystemWrapperItpackTest + 1) +itk_add_test( + NAME + itkFEMLinearSystemWrapperItpackTest3 + COMMAND + ITKFEMTestDriver + itkFEMLinearSystemWrapperItpackTest + 2) +itk_add_test( + NAME + itkFEMLinearSystemWrapperItpackTest4 + COMMAND + ITKFEMTestDriver + itkFEMLinearSystemWrapperItpackTest + 3) +itk_add_test( + NAME + itkFEMLinearSystemWrapperItpackTest5 + COMMAND + ITKFEMTestDriver + itkFEMLinearSystemWrapperItpackTest + 4) +itk_add_test( + NAME + itkFEMLinearSystemWrapperItpackTest6 + COMMAND + ITKFEMTestDriver + itkFEMLinearSystemWrapperItpackTest + 5) +itk_add_test( + NAME + itkFEMLinearSystemWrapperItpackTest7 + COMMAND + ITKFEMTestDriver + itkFEMLinearSystemWrapperItpackTest + 6) +itk_add_test( + NAME + itkFEMLinearSystemWrapperItpackTest8 + COMMAND + ITKFEMTestDriver + itkFEMLinearSystemWrapperItpackTest2 + 0) +itk_add_test( + NAME + itkFEMLinearSystemWrapperItpackTest9 + COMMAND + ITKFEMTestDriver + itkFEMLinearSystemWrapperItpackTest2 + 1) +itk_add_test( + NAME + itkFEMLinearSystemWrapperItpackTest10 + COMMAND + ITKFEMTestDriver + itkFEMLinearSystemWrapperItpackTest2 + 2) +itk_add_test( + NAME + itkFEMLinearSystemWrapperItpackTest11 + COMMAND + ITKFEMTestDriver + itkFEMLinearSystemWrapperItpackTest2 + 3) +itk_add_test( + NAME + itkFEMLinearSystemWrapperItpackTest12 + COMMAND + ITKFEMTestDriver + itkFEMLinearSystemWrapperItpackTest2 + 4) +itk_add_test( + NAME + itkFEMLinearSystemWrapperItpackTest13 + COMMAND + ITKFEMTestDriver + itkFEMLinearSystemWrapperItpackTest2 + 5) +itk_add_test( + NAME + itkFEMLinearSystemWrapperItpackTest14 + COMMAND + ITKFEMTestDriver + itkFEMLinearSystemWrapperItpackTest2 + 6) +itk_add_test( + NAME + itkFEMLinearSystemWrapperVNLTest + COMMAND + ITKFEMTestDriver + itkFEMLinearSystemWrapperVNLTest) +itk_add_test( + NAME + itkFEMPArrayTest + COMMAND + ITKFEMTestDriver + itkFEMPArrayTest) +itk_add_test( + NAME + itkFEMScatteredDataPointSetToImageFilterTest + COMMAND + ITKFEMTestDriver + itkFEMScatteredDataPointSetToImageFilterTest) # 3D Element Tests -itk_add_test(NAME itkFEMC0HexahedralElement-NodalLoads-BCs - COMMAND ITKFEMTestDriver itkFEMElement3DTest - DATA{Input/hexa2.meta}) -itk_add_test(NAME itkFEMC0HexahedralElement-NoLoads - COMMAND ITKFEMTestDriver itkFEMElement3DTest - DATA{Input/hexa3.meta}) -itk_add_test(NAME itkFEMC0HexahedralElement-GravityLoad-BCs - COMMAND ITKFEMTestDriver itkFEMElement3DTest - DATA{Input/hexa4-grav.meta}) -itk_add_test(NAME itkFEMC0TetrahedralElement-NodalLoads-BCs - COMMAND ITKFEMTestDriver itkFEMElement3DTest - DATA{Input/tetra2.meta}) -itk_add_test(NAME itkFEMC0TetrahedralElement-NoLoads - COMMAND ITKFEMTestDriver itkFEMElement3DTest - DATA{Input/tetra3.meta}) -itk_add_test(NAME itkFEMC0TetrahedralElement-GravityLoad-BCs - COMMAND ITKFEMTestDriver itkFEMElement3DTest - DATA{Input/tetra4-grav.meta}) - +itk_add_test( + NAME + itkFEMC0HexahedralElement-NodalLoads-BCs + COMMAND + ITKFEMTestDriver + itkFEMElement3DTest + DATA{Input/hexa2.meta}) +itk_add_test( + NAME + itkFEMC0HexahedralElement-NoLoads + COMMAND + ITKFEMTestDriver + itkFEMElement3DTest + DATA{Input/hexa3.meta}) +itk_add_test( + NAME + itkFEMC0HexahedralElement-GravityLoad-BCs + COMMAND + ITKFEMTestDriver + itkFEMElement3DTest + DATA{Input/hexa4-grav.meta}) +itk_add_test( + NAME + itkFEMC0TetrahedralElement-NodalLoads-BCs + COMMAND + ITKFEMTestDriver + itkFEMElement3DTest + DATA{Input/tetra2.meta}) +itk_add_test( + NAME + itkFEMC0TetrahedralElement-NoLoads + COMMAND + ITKFEMTestDriver + itkFEMElement3DTest + DATA{Input/tetra3.meta}) +itk_add_test( + NAME + itkFEMC0TetrahedralElement-GravityLoad-BCs + COMMAND + ITKFEMTestDriver + itkFEMElement3DTest + DATA{Input/tetra4-grav.meta}) # 2D Element Tests -itk_add_test(NAME itkFEMC0QuadElement-NodalLoads-BCs - COMMAND ITKFEMTestDriver itkFEMElement2DTest - DATA{Input/quad2-small.meta}) -itk_add_test(NAME itkFEMC0QuadElement-Strain - COMMAND ITKFEMTestDriver itkFEMElement2DTest - DATA{Input/quad2-strain.meta}) -itk_add_test(NAME itkFEMC0QuadElement-NoLoads - COMMAND ITKFEMTestDriver itkFEMElement2DTest - DATA{Input/quad4.meta}) -itk_add_test(NAME itkFEMC0QuadElement-GravityLoad-BCs - COMMAND ITKFEMTestDriver itkFEMElement2DTest - DATA{Input/quad6-grav.meta}) -itk_add_test(NAME itkFEMLoadLandmarkImplementation - COMMAND ITKFEMTestDriver itkFEMElement2DTest - DATA{Input/quad-lm.meta}) -itk_add_test(NAME itkFEMC0QuadElementTrapezoidalGeometry-NoLoads - COMMAND ITKFEMTestDriver itkFEMElement2DTest - DATA{Input/trapezoid.meta}) -itk_add_test(NAME itkFEMC0TriangularElement-NodalLoads-BCs - COMMAND ITKFEMTestDriver itkFEMElement2DTest - DATA{Input/tri2.meta}) -itk_add_test(NAME itkFEMC0TriangularElement-NoLoads - COMMAND ITKFEMTestDriver itkFEMElement2DTest - DATA{Input/tri3.meta}) -itk_add_test(NAME itkFEMC0TriangularElement-Strain - COMMAND ITKFEMTestDriver itkFEMElement2DTest - DATA{Input/tri3-e.meta}) -itk_add_test(NAME itkFEMC0TriangularElement-Quadratic - COMMAND ITKFEMTestDriver itkFEMElement2DTest - DATA{Input/tri3-q.meta}) -itk_add_test(NAME itkFEMTruss - COMMAND ITKFEMTestDriver itkFEMElement2DTest - DATA{Input/truss.meta}) -itk_add_test(NAME itkFEMSolverHyperbolicTest - COMMAND ITKFEMTestDriver itkFEMSolverHyperbolicTest - DATA{Input/quad2-small.meta} 5 0 0.0 0.0 5.9473e-07 -2.41038e-06 - 3.88745e-06 -2.64591e-06 0.0 0.0) - -itk_add_test(NAME itkFEMElement2DC0LinearQuadrilateralStrainTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMElement2DC0LinearQuadrilateralStrainTest - DATA{Input/2DC0LinearQuadrilateralStrainTest.meta} - ${ITK_TEST_OUTPUT_DIR}/2DC0LinearQuadrilateralStrainTestWrite.meta) - -itk_add_test(NAME itkFEMElement2DC0LinearQuadrilateralStressTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMElement2DC0LinearQuadrilateralStressTest - ${ITK_TEST_OUTPUT_DIR}/2DC0LinearQuadrilateralStressTestWrite.meta) - -itk_add_test(NAME itkFEMElement2DC0LinearQuadrilateralMembraneTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMElement2DC0LinearQuadrilateralMembraneTest - DATA{Input/2DC0LinearQuadrilateralMembraneTest.meta} - ${ITK_TEST_OUTPUT_DIR}/2DC0LinearQuadrilateralMembraneTestWrite.meta) - -itk_add_test(NAME itkFEMElement2DC0LinearTriangleMembraneTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMElement2DC0LinearTriangleMembraneTest - DATA{Input/2DC0LinearTriangleMembraneTest.meta} - ${ITK_TEST_OUTPUT_DIR}/2DC0LinearTriangleMembraneTestWrite.meta) - -itk_add_test(NAME itkFEMElement2DC0LinearTriangleStressTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMElement2DC0LinearTriangleStressTest - DATA{Input/2DC0LinearTriangleStressTest.meta} - ${ITK_TEST_OUTPUT_DIR}/2DC0LinearTriangleStressTestWrite.meta) - -itk_add_test(NAME itkFEMElement2DC0LinearTriangleStrainTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMElement2DC0LinearTriangleStrainTest - DATA{Input/2DC0LinearTriangleStrainTest.meta} - ${ITK_TEST_OUTPUT_DIR}/2DC0LinearTriangleStrainTestWrite.meta) - -itk_add_test(NAME itkFEMElement2DC0QuadraticTriangleStrainTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMElement2DC0QuadraticTriangleStrainTest - DATA{Input/2DC0QuadraticTriangleStrainTest.meta} - ${ITK_TEST_OUTPUT_DIR}/2DC0QuadraticTriangleStrainTestWrite.meta) - -itk_add_test(NAME itkFEMElement2DC0QuadraticTriangleStressTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMElement2DC0QuadraticTriangleStressTest - DATA{Input/2DC0QuadraticTriangleStressTest.meta} - ${ITK_TEST_OUTPUT_DIR}/2DC0QuadraticTriangleStressTestWrite.meta) - -itk_add_test(NAME itkFEMElement2DC0LinearLineStressTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMElement2DC0LinearLineStressTest - DATA{Input/2DC0LinearLineStressTest.meta} - ${ITK_TEST_OUTPUT_DIR}/2DC0LinearLineStressTestWrite.meta) - -itk_add_test(NAME itkFEMElement2DC0LinearQuadrilateralStrainItpackTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMElement2DC0LinearQuadrilateralStrainItpackTest - DATA{Input/2DC0LinearQuadrilateralStrainTest.meta} - ${ITK_TEST_OUTPUT_DIR}/2DC0LinearQuadrilateralStrainTestWrite.meta) - -itk_add_test(NAME itkFEMElement2DC1BeamTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMElement2DC1BeamTest - DATA{Input/2DC1BeamTest.meta} - ${ITK_TEST_OUTPUT_DIR}/2DC1BeamTestWrite.meta) - -itk_add_test(NAME itkFEMElement3DC0LinearHexahedronStrainTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMElement3DC0LinearHexahedronStrainTest - DATA{Input/3DC0LinearHexahedronStrainTest.meta} - ${ITK_TEST_OUTPUT_DIR}/3DC0LinearHexahedronStrainTestWrite.meta) - -itk_add_test(NAME itkFEMElement3DC0LinearHexahedronMembraneTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMElement3DC0LinearHexahedronMembraneTest - DATA{Input/3DC0LinearHexahedronMembraneTest.meta} - ${ITK_TEST_OUTPUT_DIR}/3DC0LinearHexahedronMembraneTestWrite.meta) - -itk_add_test(NAME itkFEMElement3DC0LinearTetrahedronStrainTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMElement3DC0LinearTetrahedronStrainTest - DATA{Input/3DC0LinearTetrahedronStrainTest.meta} - ${ITK_TEST_OUTPUT_DIR}/3DC0LinearTetrahedronStrainTestWrite.meta) - -itk_add_test(NAME itkFEMElement3DC0LinearTetrahedronMembraneTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMElement3DC0LinearTetrahedronMembraneTest - DATA{Input/3DC0LinearTetrahedronMembraneTest.meta} - ${ITK_TEST_OUTPUT_DIR}/3DC0LinearTetrahedronMembraneTestWrite.meta) - -itk_add_test(NAME itkFEMLoadBCMFCTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMLoadBCMFCTest - DATA{Input/LoadBCMFCTest.meta} - ${ITK_TEST_OUTPUT_DIR}/LoadBCMFCTestWrite.meta) - -itk_add_test(NAME itkFEMLoadBCMFCTestUser ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMLoadBCMFCTestUser) - -itk_add_test(NAME itkFEMLoadEdgeTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMLoadEdgeTest - DATA{Input/LoadEdgeTest.meta} - ${ITK_TEST_OUTPUT_DIR}/LoadEdgeTestWrite.meta) - -itk_add_test(NAME itkFEMLoadGravConstTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMLoadGravConstTest - DATA{Input/LoadGravConstTest.meta} - ${ITK_TEST_OUTPUT_DIR}/LoadGravConstWrite.meta) - -itk_add_test(NAME itkFEMLoadPointTestUser ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMLoadPointTestUser) - -itk_add_test(NAME itkFEMLandmarkLoadImplementationTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMLandmarkLoadImplementationTest - DATA{Input/quad-lm.meta} - ${ITK_TEST_OUTPUT_DIR}/QuadLandmardkWrite.meta) - -itk_add_test(NAME itkFEMObjectTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMObjectTest) - -itk_add_test(NAME itkFEMObjectTest2 ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMObjectTest2) - -itk_add_test(NAME itkFEMSpatialObjectTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMSpatialObjectTest - DATA{Input/tri3-e.meta}) +itk_add_test( + NAME + itkFEMC0QuadElement-NodalLoads-BCs + COMMAND + ITKFEMTestDriver + itkFEMElement2DTest + DATA{Input/quad2-small.meta}) +itk_add_test( + NAME + itkFEMC0QuadElement-Strain + COMMAND + ITKFEMTestDriver + itkFEMElement2DTest + DATA{Input/quad2-strain.meta}) +itk_add_test( + NAME + itkFEMC0QuadElement-NoLoads + COMMAND + ITKFEMTestDriver + itkFEMElement2DTest + DATA{Input/quad4.meta}) +itk_add_test( + NAME + itkFEMC0QuadElement-GravityLoad-BCs + COMMAND + ITKFEMTestDriver + itkFEMElement2DTest + DATA{Input/quad6-grav.meta}) +itk_add_test( + NAME + itkFEMLoadLandmarkImplementation + COMMAND + ITKFEMTestDriver + itkFEMElement2DTest + DATA{Input/quad-lm.meta}) +itk_add_test( + NAME + itkFEMC0QuadElementTrapezoidalGeometry-NoLoads + COMMAND + ITKFEMTestDriver + itkFEMElement2DTest + DATA{Input/trapezoid.meta}) +itk_add_test( + NAME + itkFEMC0TriangularElement-NodalLoads-BCs + COMMAND + ITKFEMTestDriver + itkFEMElement2DTest + DATA{Input/tri2.meta}) +itk_add_test( + NAME + itkFEMC0TriangularElement-NoLoads + COMMAND + ITKFEMTestDriver + itkFEMElement2DTest + DATA{Input/tri3.meta}) +itk_add_test( + NAME + itkFEMC0TriangularElement-Strain + COMMAND + ITKFEMTestDriver + itkFEMElement2DTest + DATA{Input/tri3-e.meta}) +itk_add_test( + NAME + itkFEMC0TriangularElement-Quadratic + COMMAND + ITKFEMTestDriver + itkFEMElement2DTest + DATA{Input/tri3-q.meta}) +itk_add_test( + NAME + itkFEMTruss + COMMAND + ITKFEMTestDriver + itkFEMElement2DTest + DATA{Input/truss.meta}) +itk_add_test( + NAME + itkFEMSolverHyperbolicTest + COMMAND + ITKFEMTestDriver + itkFEMSolverHyperbolicTest + DATA{Input/quad2-small.meta} + 5 + 0 + 0.0 + 0.0 + 5.9473e-07 + -2.41038e-06 + 3.88745e-06 + -2.64591e-06 + 0.0 + 0.0) + +itk_add_test( + NAME + itkFEMElement2DC0LinearQuadrilateralStrainTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMElement2DC0LinearQuadrilateralStrainTest + DATA{Input/2DC0LinearQuadrilateralStrainTest.meta} + ${ITK_TEST_OUTPUT_DIR}/2DC0LinearQuadrilateralStrainTestWrite.meta) + +itk_add_test( + NAME + itkFEMElement2DC0LinearQuadrilateralStressTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMElement2DC0LinearQuadrilateralStressTest + ${ITK_TEST_OUTPUT_DIR}/2DC0LinearQuadrilateralStressTestWrite.meta) + +itk_add_test( + NAME + itkFEMElement2DC0LinearQuadrilateralMembraneTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMElement2DC0LinearQuadrilateralMembraneTest + DATA{Input/2DC0LinearQuadrilateralMembraneTest.meta} + ${ITK_TEST_OUTPUT_DIR}/2DC0LinearQuadrilateralMembraneTestWrite.meta) + +itk_add_test( + NAME + itkFEMElement2DC0LinearTriangleMembraneTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMElement2DC0LinearTriangleMembraneTest + DATA{Input/2DC0LinearTriangleMembraneTest.meta} + ${ITK_TEST_OUTPUT_DIR}/2DC0LinearTriangleMembraneTestWrite.meta) + +itk_add_test( + NAME + itkFEMElement2DC0LinearTriangleStressTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMElement2DC0LinearTriangleStressTest + DATA{Input/2DC0LinearTriangleStressTest.meta} + ${ITK_TEST_OUTPUT_DIR}/2DC0LinearTriangleStressTestWrite.meta) + +itk_add_test( + NAME + itkFEMElement2DC0LinearTriangleStrainTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMElement2DC0LinearTriangleStrainTest + DATA{Input/2DC0LinearTriangleStrainTest.meta} + ${ITK_TEST_OUTPUT_DIR}/2DC0LinearTriangleStrainTestWrite.meta) + +itk_add_test( + NAME + itkFEMElement2DC0QuadraticTriangleStrainTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMElement2DC0QuadraticTriangleStrainTest + DATA{Input/2DC0QuadraticTriangleStrainTest.meta} + ${ITK_TEST_OUTPUT_DIR}/2DC0QuadraticTriangleStrainTestWrite.meta) + +itk_add_test( + NAME + itkFEMElement2DC0QuadraticTriangleStressTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMElement2DC0QuadraticTriangleStressTest + DATA{Input/2DC0QuadraticTriangleStressTest.meta} + ${ITK_TEST_OUTPUT_DIR}/2DC0QuadraticTriangleStressTestWrite.meta) + +itk_add_test( + NAME + itkFEMElement2DC0LinearLineStressTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMElement2DC0LinearLineStressTest + DATA{Input/2DC0LinearLineStressTest.meta} + ${ITK_TEST_OUTPUT_DIR}/2DC0LinearLineStressTestWrite.meta) + +itk_add_test( + NAME + itkFEMElement2DC0LinearQuadrilateralStrainItpackTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMElement2DC0LinearQuadrilateralStrainItpackTest + DATA{Input/2DC0LinearQuadrilateralStrainTest.meta} + ${ITK_TEST_OUTPUT_DIR}/2DC0LinearQuadrilateralStrainTestWrite.meta) + +itk_add_test( + NAME + itkFEMElement2DC1BeamTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMElement2DC1BeamTest + DATA{Input/2DC1BeamTest.meta} + ${ITK_TEST_OUTPUT_DIR}/2DC1BeamTestWrite.meta) + +itk_add_test( + NAME + itkFEMElement3DC0LinearHexahedronStrainTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMElement3DC0LinearHexahedronStrainTest + DATA{Input/3DC0LinearHexahedronStrainTest.meta} + ${ITK_TEST_OUTPUT_DIR}/3DC0LinearHexahedronStrainTestWrite.meta) + +itk_add_test( + NAME + itkFEMElement3DC0LinearHexahedronMembraneTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMElement3DC0LinearHexahedronMembraneTest + DATA{Input/3DC0LinearHexahedronMembraneTest.meta} + ${ITK_TEST_OUTPUT_DIR}/3DC0LinearHexahedronMembraneTestWrite.meta) + +itk_add_test( + NAME + itkFEMElement3DC0LinearTetrahedronStrainTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMElement3DC0LinearTetrahedronStrainTest + DATA{Input/3DC0LinearTetrahedronStrainTest.meta} + ${ITK_TEST_OUTPUT_DIR}/3DC0LinearTetrahedronStrainTestWrite.meta) + +itk_add_test( + NAME + itkFEMElement3DC0LinearTetrahedronMembraneTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMElement3DC0LinearTetrahedronMembraneTest + DATA{Input/3DC0LinearTetrahedronMembraneTest.meta} + ${ITK_TEST_OUTPUT_DIR}/3DC0LinearTetrahedronMembraneTestWrite.meta) + +itk_add_test( + NAME + itkFEMLoadBCMFCTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMLoadBCMFCTest + DATA{Input/LoadBCMFCTest.meta} + ${ITK_TEST_OUTPUT_DIR}/LoadBCMFCTestWrite.meta) + +itk_add_test( + NAME + itkFEMLoadBCMFCTestUser + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMLoadBCMFCTestUser) + +itk_add_test( + NAME + itkFEMLoadEdgeTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMLoadEdgeTest + DATA{Input/LoadEdgeTest.meta} + ${ITK_TEST_OUTPUT_DIR}/LoadEdgeTestWrite.meta) + +itk_add_test( + NAME + itkFEMLoadGravConstTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMLoadGravConstTest + DATA{Input/LoadGravConstTest.meta} + ${ITK_TEST_OUTPUT_DIR}/LoadGravConstWrite.meta) + +itk_add_test( + NAME + itkFEMLoadPointTestUser + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMLoadPointTestUser) + +itk_add_test( + NAME + itkFEMLandmarkLoadImplementationTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMLandmarkLoadImplementationTest + DATA{Input/quad-lm.meta} + ${ITK_TEST_OUTPUT_DIR}/QuadLandmardkWrite.meta) + +itk_add_test( + NAME + itkFEMObjectTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMObjectTest) + +itk_add_test( + NAME + itkFEMObjectTest2 + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMObjectTest2) + +itk_add_test( + NAME + itkFEMSpatialObjectTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMSpatialObjectTest + DATA{Input/tri3-e.meta}) #add_test(NAME itkFEMSolverTest2D ${FEM_TESTS3} # COMMAND ITKFEMTestDriver itkFEMSolverTest2D # DATA{Input/2DC0LinearTriangleStressTest.meta} # ${ITK_TEST_OUTPUT_DIR}/2DC0LinearTriangleStressTestWrite_NewSolver.meta) -itk_add_test(NAME itkFEMSolverTest3D ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMSolverTest3D - DATA{Input/3DC0LinearHexahedronMembraneTest.meta} - ${ITK_TEST_OUTPUT_DIR}/3DC0LinearHexahedronMembraneTestWrite_NewSolver.meta) - -itk_add_test(NAME itkFEMRobustSolverTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkFEMRobustSolverTest) - -itk_add_test(NAME itkImageToRectilinearFEMObjectFilter2DTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkImageToRectilinearFEMObjectFilter2DTest - DATA{${ITK_DATA_ROOT}/Input/circle.png} - 20 20 7 7 64 49 3 0 0 0 10 40 20 33 20 80 3 0 0 1 9 8 10 11 12 20 19 33 37 38 46 45) - -itk_add_test(NAME itkImageToRectilinearFEMObjectFilter3DTest ${FEM_TESTS3} - COMMAND ITKFEMTestDriver itkImageToRectilinearFEMObjectFilter3DTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.mhd} - 10 10 10 4 6 4 175 96 3 0 0 0 0 10 40 69.282 0 33 223.923 147.846 0 3 0 0 1 6 5 35 36 41 40 10 12 13 18 17 47 48 53 52 33 46 47 52 51 81 82 87 86) +itk_add_test( + NAME + itkFEMSolverTest3D + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMSolverTest3D + DATA{Input/3DC0LinearHexahedronMembraneTest.meta} + ${ITK_TEST_OUTPUT_DIR}/3DC0LinearHexahedronMembraneTestWrite_NewSolver.meta) + +itk_add_test( + NAME + itkFEMRobustSolverTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkFEMRobustSolverTest) + +itk_add_test( + NAME + itkImageToRectilinearFEMObjectFilter2DTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkImageToRectilinearFEMObjectFilter2DTest + DATA{${ITK_DATA_ROOT}/Input/circle.png} + 20 + 20 + 7 + 7 + 64 + 49 + 3 + 0 + 0 + 0 + 10 + 40 + 20 + 33 + 20 + 80 + 3 + 0 + 0 + 1 + 9 + 8 + 10 + 11 + 12 + 20 + 19 + 33 + 37 + 38 + 46 + 45) + +itk_add_test( + NAME + itkImageToRectilinearFEMObjectFilter3DTest + ${FEM_TESTS3} + COMMAND + ITKFEMTestDriver + itkImageToRectilinearFEMObjectFilter3DTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeWithDirection.mhd} + 10 + 10 + 10 + 4 + 6 + 4 + 175 + 96 + 3 + 0 + 0 + 0 + 0 + 10 + 40 + 69.282 + 0 + 33 + 223.923 + 147.846 + 0 + 3 + 0 + 0 + 1 + 6 + 5 + 35 + 36 + 41 + 40 + 10 + 12 + 13 + 18 + 17 + 47 + 48 + 53 + 52 + 33 + 46 + 47 + 52 + 51 + 81 + 82 + 87 + 86) diff --git a/Modules/Numerics/NarrowBand/itk-module.cmake b/Modules/Numerics/NarrowBand/itk-module.cmake index 305fe4c5d0c..70e537ff870 100644 --- a/Modules/Numerics/NarrowBand/itk-module.cmake +++ b/Modules/Numerics/NarrowBand/itk-module.cmake @@ -1,13 +1,13 @@ set(DOCUMENTATION "This module contains code for data types and calculation on a narrow band of space.") -itk_module(ITKNarrowBand +itk_module( + ITKNarrowBand DEPENDS - ITKImageIntensity - ITKFiniteDifference - ITKCurvatureFlow + ITKImageIntensity + ITKFiniteDifference + ITKCurvatureFlow TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Numerics/NarrowBand/test/CMakeLists.txt b/Modules/Numerics/NarrowBand/test/CMakeLists.txt index 765528773bd..8fdd240cc91 100644 --- a/Modules/Numerics/NarrowBand/test/CMakeLists.txt +++ b/Modules/Numerics/NarrowBand/test/CMakeLists.txt @@ -1,13 +1,18 @@ itk_module_test() -set(ITKNarrowBandTests -itkNarrowBandTest.cxx -itkNarrowBandImageFilterBaseTest.cxx -) +set(ITKNarrowBandTests itkNarrowBandTest.cxx itkNarrowBandImageFilterBaseTest.cxx) -CreateTestDriver(ITKNarrowBand "${ITKNarrowBand-Test_LIBRARIES}" "${ITKNarrowBandTests}") +createtestdriver(ITKNarrowBand "${ITKNarrowBand-Test_LIBRARIES}" "${ITKNarrowBandTests}") -itk_add_test(NAME itkNarrowBandTest - COMMAND ITKNarrowBandTestDriver itkNarrowBandTest) -itk_add_test(NAME itkNarrowBandImageFilterBaseTest - COMMAND ITKNarrowBandTestDriver itkNarrowBandImageFilterBaseTest - ${ITK_TEST_OUTPUT_DIR}/itkNarrowBandImageFilterBaseTest.png) +itk_add_test( + NAME + itkNarrowBandTest + COMMAND + ITKNarrowBandTestDriver + itkNarrowBandTest) +itk_add_test( + NAME + itkNarrowBandImageFilterBaseTest + COMMAND + ITKNarrowBandTestDriver + itkNarrowBandImageFilterBaseTest + ${ITK_TEST_OUTPUT_DIR}/itkNarrowBandImageFilterBaseTest.png) diff --git a/Modules/Numerics/NarrowBand/wrapping/ITKNarrowBandBase.wrap b/Modules/Numerics/NarrowBand/wrapping/ITKNarrowBandBase.wrap index 59bbe5ef2b5..739164f1ec2 100644 --- a/Modules/Numerics/NarrowBand/wrapping/ITKNarrowBandBase.wrap +++ b/Modules/Numerics/NarrowBand/wrapping/ITKNarrowBandBase.wrap @@ -1,19 +1,18 @@ - set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkNarrowBand.h") itk_wrap_class("itk::BandNode") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("I${d}${ITKM_${t}}" "itk::Index<${d}>, ${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("I${d}${ITKM_${t}}" "itk::Index<${d}>, ${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::NarrowBand" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("BNI${d}${ITKM_${t}}" "itk::BandNode< itk::Index<${d}>, ${ITKT_${t}}>") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("BNI${d}${ITKM_${t}}" "itk::BandNode< itk::Index<${d}>, ${ITKT_${t}}>") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/NarrowBand/wrapping/itkNarrowBandImageFilterBase.wrap b/Modules/Numerics/NarrowBand/wrapping/itkNarrowBandImageFilterBase.wrap index 1a164f64562..234f2a94a63 100644 --- a/Modules/Numerics/NarrowBand/wrapping/itkNarrowBandImageFilterBase.wrap +++ b/Modules/Numerics/NarrowBand/wrapping/itkNarrowBandImageFilterBase.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::NarrowBandImageFilterBase" POINTER) - # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +# itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +# itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Numerics/Optimizers/itk-module.cmake b/Modules/Numerics/Optimizers/itk-module.cmake index 1b5fcd8ae8a..d2dc9dded47 100644 --- a/Modules/Numerics/Optimizers/itk-module.cmake +++ b/Modules/Numerics/Optimizers/itk-module.cmake @@ -1,15 +1,16 @@ -set(DOCUMENTATION "This module contains ITK classes that encapsulate numerical +set(DOCUMENTATION + "This module contains ITK classes that encapsulate numerical optimizers. A set of base classes categorize the type of cost function an optimizer is capable of operating on, and the concrete classes provide implementations of specific algorithms.") -itk_module(ITKOptimizers +itk_module( + ITKOptimizers ENABLE_SHARED DEPENDS - ITKStatistics + ITKStatistics TEST_DEPENDS - ITKTransform - ITKTestKernel + ITKTransform + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Numerics/Optimizers/src/CMakeLists.txt b/Modules/Numerics/Optimizers/src/CMakeLists.txt index 905a01724d0..809b592d00c 100644 --- a/Modules/Numerics/Optimizers/src/CMakeLists.txt +++ b/Modules/Numerics/Optimizers/src/CMakeLists.txt @@ -1,35 +1,34 @@ set(ITKOptimizers_SRCS - itkNonLinearOptimizer.cxx - itkMultipleValuedCostFunction.cxx - itkSingleValuedCostFunction.cxx - itkConjugateGradientOptimizer.cxx - itkRegularStepGradientDescentOptimizer.cxx - itkLBFGSOptimizer.cxx - itkExhaustiveOptimizer.cxx - itkLevenbergMarquardtOptimizer.cxx - itkSingleValuedNonLinearVnlOptimizer.cxx - itkQuaternionRigidTransformGradientDescentOptimizer.cxx - itkSPSAOptimizer.cxx - itkSingleValuedVnlCostFunctionAdaptor.cxx - itkMultipleValuedNonLinearVnlOptimizer.cxx - itkPowellOptimizer.cxx - itkVersorTransformOptimizer.cxx - itkOnePlusOneEvolutionaryOptimizer.cxx - itkMultipleValuedNonLinearOptimizer.cxx - itkLBFGSBOptimizer.cxx - itkCumulativeGaussianOptimizer.cxx - itkAmoebaOptimizer.cxx - itkCumulativeGaussianCostFunction.cxx - itkOptimizer.cxx - itkFRPROptimizer.cxx - itkGradientDescentOptimizer.cxx - itkSingleValuedNonLinearOptimizer.cxx - itkRegularStepGradientDescentBaseOptimizer.cxx - itkMultipleValuedVnlCostFunctionAdaptor.cxx - itkParticleSwarmOptimizerBase.cxx - itkParticleSwarmOptimizer.cxx - itkInitializationBiasedParticleSwarmOptimizer.cxx - ) + itkNonLinearOptimizer.cxx + itkMultipleValuedCostFunction.cxx + itkSingleValuedCostFunction.cxx + itkConjugateGradientOptimizer.cxx + itkRegularStepGradientDescentOptimizer.cxx + itkLBFGSOptimizer.cxx + itkExhaustiveOptimizer.cxx + itkLevenbergMarquardtOptimizer.cxx + itkSingleValuedNonLinearVnlOptimizer.cxx + itkQuaternionRigidTransformGradientDescentOptimizer.cxx + itkSPSAOptimizer.cxx + itkSingleValuedVnlCostFunctionAdaptor.cxx + itkMultipleValuedNonLinearVnlOptimizer.cxx + itkPowellOptimizer.cxx + itkVersorTransformOptimizer.cxx + itkOnePlusOneEvolutionaryOptimizer.cxx + itkMultipleValuedNonLinearOptimizer.cxx + itkLBFGSBOptimizer.cxx + itkCumulativeGaussianOptimizer.cxx + itkAmoebaOptimizer.cxx + itkCumulativeGaussianCostFunction.cxx + itkOptimizer.cxx + itkFRPROptimizer.cxx + itkGradientDescentOptimizer.cxx + itkSingleValuedNonLinearOptimizer.cxx + itkRegularStepGradientDescentBaseOptimizer.cxx + itkMultipleValuedVnlCostFunctionAdaptor.cxx + itkParticleSwarmOptimizerBase.cxx + itkParticleSwarmOptimizer.cxx + itkInitializationBiasedParticleSwarmOptimizer.cxx) itk_module_add_library(ITKOptimizers ${ITKOptimizers_SRCS}) target_link_libraries(ITKOptimizers LINK_PUBLIC ${ITKTransform_LIBRARIES}) diff --git a/Modules/Numerics/Optimizers/test/CMakeLists.txt b/Modules/Numerics/Optimizers/test/CMakeLists.txt index 364de87631a..50386f09a1e 100644 --- a/Modules/Numerics/Optimizers/test/CMakeLists.txt +++ b/Modules/Numerics/Optimizers/test/CMakeLists.txt @@ -1,60 +1,143 @@ itk_module_test() set(ITKOptimizersTests -itkFRPROptimizerTest.cxx -itkPowellOptimizerTest.cxx -itkGradientDescentOptimizerTest.cxx -itkVersorTransformOptimizerTest.cxx -itkSPSAOptimizerTest.cxx -itkOptimizersHierarchyTest.cxx -itkExhaustiveOptimizerTest.cxx -itkLBFGSBOptimizerTest.cxx -itkConjugateGradientOptimizerTest.cxx -itkLBFGSOptimizerTest.cxx -itkCumulativeGaussianOptimizerTest.cxx -itkRegularStepGradientDescentOptimizerTest.cxx -itkLevenbergMarquardtOptimizerTest.cxx -itkVersorRigid3DTransformOptimizerTest.cxx -itkAmoebaOptimizerTest.cxx -itkOnePlusOneEvolutionaryOptimizerTest.cxx -itkParticleSwarmOptimizerTest.cxx -itkInitializationBiasedParticleSwarmOptimizerTest.cxx -) + itkFRPROptimizerTest.cxx + itkPowellOptimizerTest.cxx + itkGradientDescentOptimizerTest.cxx + itkVersorTransformOptimizerTest.cxx + itkSPSAOptimizerTest.cxx + itkOptimizersHierarchyTest.cxx + itkExhaustiveOptimizerTest.cxx + itkLBFGSBOptimizerTest.cxx + itkConjugateGradientOptimizerTest.cxx + itkLBFGSOptimizerTest.cxx + itkCumulativeGaussianOptimizerTest.cxx + itkRegularStepGradientDescentOptimizerTest.cxx + itkLevenbergMarquardtOptimizerTest.cxx + itkVersorRigid3DTransformOptimizerTest.cxx + itkAmoebaOptimizerTest.cxx + itkOnePlusOneEvolutionaryOptimizerTest.cxx + itkParticleSwarmOptimizerTest.cxx + itkInitializationBiasedParticleSwarmOptimizerTest.cxx) -CreateTestDriver(ITKOptimizers "${ITKOptimizers-Test_LIBRARIES}" "${ITKOptimizersTests}") +createtestdriver(ITKOptimizers "${ITKOptimizers-Test_LIBRARIES}" "${ITKOptimizersTests}") -itk_add_test(NAME itkOptimizersHierarchyTest - COMMAND ITKOptimizersTestDriver itkOptimizersHierarchyTest) -itk_add_test(NAME itkFRPROptimizerTest - COMMAND ITKOptimizersTestDriver itkFRPROptimizerTest) -itk_add_test(NAME itkPowellOptimizerTest - COMMAND ITKOptimizersTestDriver itkPowellOptimizerTest 0 10 0.01 0.1 100 100 0 0.0) -itk_add_test(NAME itkGradientDescentOptimizerTest - COMMAND ITKOptimizersTestDriver itkGradientDescentOptimizerTest) -itk_add_test(NAME itkVersorTransformOptimizerTest - COMMAND ITKOptimizersTestDriver itkVersorTransformOptimizerTest) -itk_add_test(NAME itkSPSAOptimizerTest - COMMAND ITKOptimizersTestDriver itkSPSAOptimizerTest) -itk_add_test(NAME itkExhaustiveOptimizerTest - COMMAND ITKOptimizersTestDriver itkExhaustiveOptimizerTest) -itk_add_test(NAME itkLBFGSBOptimizerTest - COMMAND ITKOptimizersTestDriver itkLBFGSBOptimizerTest) -itk_add_test(NAME itkConjugateGradientOptimizerTest - COMMAND ITKOptimizersTestDriver itkConjugateGradientOptimizerTest) -itk_add_test(NAME itkLBFGSOptimizerTest - COMMAND ITKOptimizersTestDriver itkLBFGSOptimizerTest) -itk_add_test(NAME itkCumulativeGaussianOptimizerTest - COMMAND ITKOptimizersTestDriver itkCumulativeGaussianOptimizerTest) -itk_add_test(NAME itkRegularStepGradientDescentOptimizerTest - COMMAND ITKOptimizersTestDriver itkRegularStepGradientDescentOptimizerTest) -itk_add_test(NAME itkLevenbergMarquardtOptimizerTest - COMMAND ITKOptimizersTestDriver itkLevenbergMarquardtOptimizerTest) -itk_add_test(NAME itkVersorRigid3DTransformOptimizerTest - COMMAND ITKOptimizersTestDriver itkVersorRigid3DTransformOptimizerTest) -itk_add_test(NAME itkAmoebaOptimizerTest - COMMAND ITKOptimizersTestDriver itkAmoebaOptimizerTest) -itk_add_test(NAME itkParticleSwarmOptimizerTest - COMMAND ITKOptimizersTestDriver itkParticleSwarmOptimizerTest) -itk_add_test(NAME itkInitializationBiasedParticleSwarmOptimizerTest - COMMAND ITKOptimizersTestDriver itkInitializationBiasedParticleSwarmOptimizerTest 0.7298 1.49609 1.49609 1.49609) -itk_add_test(NAME itkOnePlusOneEvolutionaryOptimizerTest - COMMAND ITKOptimizersTestDriver itkOnePlusOneEvolutionaryOptimizerTest) +itk_add_test( + NAME + itkOptimizersHierarchyTest + COMMAND + ITKOptimizersTestDriver + itkOptimizersHierarchyTest) +itk_add_test( + NAME + itkFRPROptimizerTest + COMMAND + ITKOptimizersTestDriver + itkFRPROptimizerTest) +itk_add_test( + NAME + itkPowellOptimizerTest + COMMAND + ITKOptimizersTestDriver + itkPowellOptimizerTest + 0 + 10 + 0.01 + 0.1 + 100 + 100 + 0 + 0.0) +itk_add_test( + NAME + itkGradientDescentOptimizerTest + COMMAND + ITKOptimizersTestDriver + itkGradientDescentOptimizerTest) +itk_add_test( + NAME + itkVersorTransformOptimizerTest + COMMAND + ITKOptimizersTestDriver + itkVersorTransformOptimizerTest) +itk_add_test( + NAME + itkSPSAOptimizerTest + COMMAND + ITKOptimizersTestDriver + itkSPSAOptimizerTest) +itk_add_test( + NAME + itkExhaustiveOptimizerTest + COMMAND + ITKOptimizersTestDriver + itkExhaustiveOptimizerTest) +itk_add_test( + NAME + itkLBFGSBOptimizerTest + COMMAND + ITKOptimizersTestDriver + itkLBFGSBOptimizerTest) +itk_add_test( + NAME + itkConjugateGradientOptimizerTest + COMMAND + ITKOptimizersTestDriver + itkConjugateGradientOptimizerTest) +itk_add_test( + NAME + itkLBFGSOptimizerTest + COMMAND + ITKOptimizersTestDriver + itkLBFGSOptimizerTest) +itk_add_test( + NAME + itkCumulativeGaussianOptimizerTest + COMMAND + ITKOptimizersTestDriver + itkCumulativeGaussianOptimizerTest) +itk_add_test( + NAME + itkRegularStepGradientDescentOptimizerTest + COMMAND + ITKOptimizersTestDriver + itkRegularStepGradientDescentOptimizerTest) +itk_add_test( + NAME + itkLevenbergMarquardtOptimizerTest + COMMAND + ITKOptimizersTestDriver + itkLevenbergMarquardtOptimizerTest) +itk_add_test( + NAME + itkVersorRigid3DTransformOptimizerTest + COMMAND + ITKOptimizersTestDriver + itkVersorRigid3DTransformOptimizerTest) +itk_add_test( + NAME + itkAmoebaOptimizerTest + COMMAND + ITKOptimizersTestDriver + itkAmoebaOptimizerTest) +itk_add_test( + NAME + itkParticleSwarmOptimizerTest + COMMAND + ITKOptimizersTestDriver + itkParticleSwarmOptimizerTest) +itk_add_test( + NAME + itkInitializationBiasedParticleSwarmOptimizerTest + COMMAND + ITKOptimizersTestDriver + itkInitializationBiasedParticleSwarmOptimizerTest + 0.7298 + 1.49609 + 1.49609 + 1.49609) +itk_add_test( + NAME + itkOnePlusOneEvolutionaryOptimizerTest + COMMAND + ITKOptimizersTestDriver + itkOnePlusOneEvolutionaryOptimizerTest) diff --git a/Modules/Numerics/Optimizers/wrapping/itkCostFunction.wrap b/Modules/Numerics/Optimizers/wrapping/itkCostFunction.wrap index d8c427ece38..d7faac67217 100644 --- a/Modules/Numerics/Optimizers/wrapping/itkCostFunction.wrap +++ b/Modules/Numerics/Optimizers/wrapping/itkCostFunction.wrap @@ -1,8 +1,8 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkCostFunction.h") itk_wrap_class("itk::CostFunctionTemplate" POINTER) - UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(types "D;${WRAP_ITK_REAL}") +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Optimizersv4/itk-module.cmake b/Modules/Numerics/Optimizersv4/itk-module.cmake index b515ef5467f..a0bf6ea5aa7 100644 --- a/Modules/Numerics/Optimizersv4/itk-module.cmake +++ b/Modules/Numerics/Optimizersv4/itk-module.cmake @@ -1,23 +1,24 @@ -set(DOCUMENTATION "This module contains ITK classes that encapsulate numerical +set(DOCUMENTATION + "This module contains ITK classes that encapsulate numerical optimizers using a new hierarchy developed for the needs of registration with high-dimensional transforms. These optimizers will NOT work with the metrics in Registration/Common, but rather with the new metrics in Registration/Metricsv4.") -itk_module(ITKOptimizersv4 +itk_module( + ITKOptimizersv4 ENABLE_SHARED DEPENDS - ITKOptimizers - ITKLIBLBFGS + ITKOptimizers + ITKLIBLBFGS COMPILE_DEPENDS - ITKCommon - ITKTransform - ITKImageGrid - ITKDisplacementField + ITKCommon + ITKTransform + ITKImageGrid + ITKDisplacementField TEST_DEPENDS - ITKTestKernel - ITKMetricsv4 + ITKTestKernel + ITKMetricsv4 DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") # ITKOptimizers dependency added to get itkCostFunction for itkSingleValuedCostFunctionv4 diff --git a/Modules/Numerics/Optimizersv4/src/CMakeLists.txt b/Modules/Numerics/Optimizersv4/src/CMakeLists.txt index d9ea12ad680..35398ac4e61 100644 --- a/Modules/Numerics/Optimizersv4/src/CMakeLists.txt +++ b/Modules/Numerics/Optimizersv4/src/CMakeLists.txt @@ -1,14 +1,13 @@ set(ITKOptimizersv4_SRCS - itkObjectToObjectOptimizerBase.cxx - itkSingleValuedNonLinearVnlOptimizerv4.cxx - itkSingleValuedVnlCostFunctionAdaptorv4.cxx - itkLBFGSOptimizerv4.cxx - itkLBFGS2Optimizerv4.cxx - itkLBFGSBOptimizerv4.cxx - itkAmoebaOptimizerv4.cxx - itkRegistrationParameterScalesEstimator.cxx - itkObjectToObjectMetricBase.cxx - ) + itkObjectToObjectOptimizerBase.cxx + itkSingleValuedNonLinearVnlOptimizerv4.cxx + itkSingleValuedVnlCostFunctionAdaptorv4.cxx + itkLBFGSOptimizerv4.cxx + itkLBFGS2Optimizerv4.cxx + itkLBFGSBOptimizerv4.cxx + itkAmoebaOptimizerv4.cxx + itkRegistrationParameterScalesEstimator.cxx + itkObjectToObjectMetricBase.cxx) itk_module_add_library(ITKOptimizersv4 ${ITKOptimizersv4_SRCS}) target_link_libraries(ITKOptimizersv4 LINK_PUBLIC ${ITKMetricsv4_LIBRARIES}) diff --git a/Modules/Numerics/Optimizersv4/test/CMakeLists.txt b/Modules/Numerics/Optimizersv4/test/CMakeLists.txt index 86d47fcf0b4..31d02877f12 100644 --- a/Modules/Numerics/Optimizersv4/test/CMakeLists.txt +++ b/Modules/Numerics/Optimizersv4/test/CMakeLists.txt @@ -1,155 +1,274 @@ itk_module_test() set(ITKOptimizersv4Tests - itkObjectToObjectOptimizerBaseTest.cxx - itkGradientDescentOptimizerBasev4Test.cxx - itkGradientDescentOptimizerv4Test.cxx - itkGradientDescentOptimizerv4Test2.cxx - itkGradientDescentLineSearchOptimizerv4Test.cxx - itkConjugateGradientLineSearchOptimizerv4Test.cxx - itkMultiStartOptimizerv4Test.cxx - itkMultiGradientOptimizerv4Test.cxx - itkOptimizerParameterScalesEstimatorTest.cxx - itkRegistrationParameterScalesEstimatorTest.cxx - itkRegistrationParameterScalesFromPhysicalShiftTest.cxx - itkRegistrationParameterScalesFromPhysicalShiftPointSetTest.cxx - itkRegistrationParameterScalesFromIndexShiftTest.cxx - itkRegistrationParameterScalesFromJacobianTest.cxx - itkAutoScaledGradientDescentRegistrationTest.cxx - itkAutoScaledGradientDescentRegistrationOnVectorTest.cxx - itkWindowConvergenceMonitoringFunctionTest.cxx - itkQuasiNewtonOptimizerv4Test.cxx - itkObjectToObjectMetricBaseTest.cxx - itkLBFGSOptimizerv4Test.cxx - itkLBFGS2Optimizerv4Test.cxx - itkLBFGSBOptimizerv4Test.cxx - itkRegularStepGradientDescentOptimizerv4Test.cxx - itkAmoebaOptimizerv4Test.cxx - itkExhaustiveOptimizerv4Test.cxx - itkPowellOptimizerv4Test.cxx - itkOnePlusOneEvolutionaryOptimizerv4Test.cxx - ) + itkObjectToObjectOptimizerBaseTest.cxx + itkGradientDescentOptimizerBasev4Test.cxx + itkGradientDescentOptimizerv4Test.cxx + itkGradientDescentOptimizerv4Test2.cxx + itkGradientDescentLineSearchOptimizerv4Test.cxx + itkConjugateGradientLineSearchOptimizerv4Test.cxx + itkMultiStartOptimizerv4Test.cxx + itkMultiGradientOptimizerv4Test.cxx + itkOptimizerParameterScalesEstimatorTest.cxx + itkRegistrationParameterScalesEstimatorTest.cxx + itkRegistrationParameterScalesFromPhysicalShiftTest.cxx + itkRegistrationParameterScalesFromPhysicalShiftPointSetTest.cxx + itkRegistrationParameterScalesFromIndexShiftTest.cxx + itkRegistrationParameterScalesFromJacobianTest.cxx + itkAutoScaledGradientDescentRegistrationTest.cxx + itkAutoScaledGradientDescentRegistrationOnVectorTest.cxx + itkWindowConvergenceMonitoringFunctionTest.cxx + itkQuasiNewtonOptimizerv4Test.cxx + itkObjectToObjectMetricBaseTest.cxx + itkLBFGSOptimizerv4Test.cxx + itkLBFGS2Optimizerv4Test.cxx + itkLBFGSBOptimizerv4Test.cxx + itkRegularStepGradientDescentOptimizerv4Test.cxx + itkAmoebaOptimizerv4Test.cxx + itkExhaustiveOptimizerv4Test.cxx + itkPowellOptimizerv4Test.cxx + itkOnePlusOneEvolutionaryOptimizerv4Test.cxx) set(INPUTDATA ${ITK_DATA_ROOT}/Input) set(BASELINE_ROOT ${ITK_DATA_ROOT}/Baseline) set(TEMP ${ITK_TEST_OUTPUT_DIR}) -CreateTestDriver(ITKOptimizersv4 "${ITKOptimizersv4-Test_LIBRARIES}" "${ITKOptimizersv4Tests}") - -itk_add_test(NAME itkWindowConvergenceMonitoringFunctionTest - COMMAND ITKOptimizersv4TestDriver itkWindowConvergenceMonitoringFunctionTest) - -itk_add_test(NAME itkObjectToObjectOptimizerBaseTest - COMMAND ITKOptimizersv4TestDriver - itkObjectToObjectOptimizerBaseTest) - -itk_add_test(NAME itkGradientDescentOptimizerBasev4Test - COMMAND ITKOptimizersv4TestDriver - itkGradientDescentOptimizerBasev4Test) - -itk_add_test(NAME itkGradientDescentOptimizerv4Test - COMMAND ITKOptimizersv4TestDriver - itkGradientDescentOptimizerv4Test) - -itk_add_test(NAME itkGradientDescentLineSearchOptimizerv4Test - COMMAND ITKOptimizersv4TestDriver - itkGradientDescentLineSearchOptimizerv4Test) - -itk_add_test(NAME itkConjugateGradientLineSearchOptimizerv4Test - COMMAND ITKOptimizersv4TestDriver - itkConjugateGradientLineSearchOptimizerv4Test) - -itk_add_test(NAME itkMultiStartOptimizerv4Test - COMMAND ITKOptimizersv4TestDriver - itkMultiStartOptimizerv4Test) - -itk_add_test(NAME itkMultiGradientOptimizerv4Test - COMMAND ITKOptimizersv4TestDriver - itkMultiGradientOptimizerv4Test) - -itk_add_test(NAME itkOptimizerParameterScalesEstimatorTest - COMMAND ITKOptimizersv4TestDriver - itkOptimizerParameterScalesEstimatorTest) - -itk_add_test(NAME itkRegistrationParameterScalesEstimatorTest - COMMAND ITKOptimizersv4TestDriver - itkRegistrationParameterScalesEstimatorTest) - -itk_add_test(NAME itkRegistrationParameterScalesFromPhysicalShiftTest - COMMAND ITKOptimizersv4TestDriver - itkRegistrationParameterScalesFromPhysicalShiftTest) - -itk_add_test(NAME itkRegistrationParameterScalesFromJacobianTest - COMMAND ITKOptimizersv4TestDriver - itkRegistrationParameterScalesFromJacobianTest) - -itk_add_test(NAME itkGradientDescentOptimizerv4Test2 - COMMAND ITKOptimizersv4TestDriver - itkGradientDescentOptimizerv4Test2) - -itk_add_test(NAME itkAutoScaledGradientDescentRegistrationTest - COMMAND ITKOptimizersv4TestDriver - itkAutoScaledGradientDescentRegistrationTest 30 1.0 1 0 1) - -itk_add_test(NAME itkAutoScaledGradientDescentRegistrationTest2 - COMMAND ITKOptimizersv4TestDriver - itkAutoScaledGradientDescentRegistrationTest 30 1.0 0 1 1) - -itk_add_test(NAME itkAutoScaledGradientDescentRegistrationTest3 - COMMAND ITKOptimizersv4TestDriver - itkAutoScaledGradientDescentRegistrationTest 30 1.0 0 0 1) - -itk_add_test(NAME itkAutoScaledGradientDescentRegistrationTest4 - COMMAND ITKOptimizersv4TestDriver - itkAutoScaledGradientDescentRegistrationTest 30 1.0 0 1 0) - -itk_add_test(NAME itkAutoScaledGradientDescentRegistrationOnVectorTest - COMMAND ITKOptimizersv4TestDriver - itkAutoScaledGradientDescentRegistrationOnVectorTest 30 1.0) - -itk_add_test(NAME itkQuasiNewtonOptimizerv4Test - COMMAND ITKOptimizersv4TestDriver - itkQuasiNewtonOptimizerv4Test) - -itk_add_test(NAME itkRegistrationParameterScalesFromIndexShiftTest - COMMAND ITKOptimizersv4TestDriver - itkRegistrationParameterScalesFromIndexShiftTest) - -itk_add_test(NAME itkRegistrationParameterScalesFromPhysicalShiftPointSetTest - COMMAND ITKOptimizersv4TestDriver - itkRegistrationParameterScalesFromPhysicalShiftPointSetTest) - -itk_add_test(NAME itkObjectToObjectMetricBaseTest - COMMAND ITKOptimizersv4TestDriver - itkObjectToObjectMetricBaseTest) - -itk_add_test(NAME itkLBFGSOptimizerv4Test - COMMAND ITKOptimizersv4TestDriver +createtestdriver(ITKOptimizersv4 "${ITKOptimizersv4-Test_LIBRARIES}" "${ITKOptimizersv4Tests}") + +itk_add_test( + NAME + itkWindowConvergenceMonitoringFunctionTest + COMMAND + ITKOptimizersv4TestDriver + itkWindowConvergenceMonitoringFunctionTest) + +itk_add_test( + NAME + itkObjectToObjectOptimizerBaseTest + COMMAND + ITKOptimizersv4TestDriver + itkObjectToObjectOptimizerBaseTest) + +itk_add_test( + NAME + itkGradientDescentOptimizerBasev4Test + COMMAND + ITKOptimizersv4TestDriver + itkGradientDescentOptimizerBasev4Test) + +itk_add_test( + NAME + itkGradientDescentOptimizerv4Test + COMMAND + ITKOptimizersv4TestDriver + itkGradientDescentOptimizerv4Test) + +itk_add_test( + NAME + itkGradientDescentLineSearchOptimizerv4Test + COMMAND + ITKOptimizersv4TestDriver + itkGradientDescentLineSearchOptimizerv4Test) + +itk_add_test( + NAME + itkConjugateGradientLineSearchOptimizerv4Test + COMMAND + ITKOptimizersv4TestDriver + itkConjugateGradientLineSearchOptimizerv4Test) + +itk_add_test( + NAME + itkMultiStartOptimizerv4Test + COMMAND + ITKOptimizersv4TestDriver + itkMultiStartOptimizerv4Test) + +itk_add_test( + NAME + itkMultiGradientOptimizerv4Test + COMMAND + ITKOptimizersv4TestDriver + itkMultiGradientOptimizerv4Test) + +itk_add_test( + NAME + itkOptimizerParameterScalesEstimatorTest + COMMAND + ITKOptimizersv4TestDriver + itkOptimizerParameterScalesEstimatorTest) + +itk_add_test( + NAME + itkRegistrationParameterScalesEstimatorTest + COMMAND + ITKOptimizersv4TestDriver + itkRegistrationParameterScalesEstimatorTest) + +itk_add_test( + NAME + itkRegistrationParameterScalesFromPhysicalShiftTest + COMMAND + ITKOptimizersv4TestDriver + itkRegistrationParameterScalesFromPhysicalShiftTest) + +itk_add_test( + NAME + itkRegistrationParameterScalesFromJacobianTest + COMMAND + ITKOptimizersv4TestDriver + itkRegistrationParameterScalesFromJacobianTest) + +itk_add_test( + NAME + itkGradientDescentOptimizerv4Test2 + COMMAND + ITKOptimizersv4TestDriver + itkGradientDescentOptimizerv4Test2) + +itk_add_test( + NAME + itkAutoScaledGradientDescentRegistrationTest + COMMAND + ITKOptimizersv4TestDriver + itkAutoScaledGradientDescentRegistrationTest + 30 + 1.0 + 1 + 0 + 1) + +itk_add_test( + NAME + itkAutoScaledGradientDescentRegistrationTest2 + COMMAND + ITKOptimizersv4TestDriver + itkAutoScaledGradientDescentRegistrationTest + 30 + 1.0 + 0 + 1 + 1) + +itk_add_test( + NAME + itkAutoScaledGradientDescentRegistrationTest3 + COMMAND + ITKOptimizersv4TestDriver + itkAutoScaledGradientDescentRegistrationTest + 30 + 1.0 + 0 + 0 + 1) + +itk_add_test( + NAME + itkAutoScaledGradientDescentRegistrationTest4 + COMMAND + ITKOptimizersv4TestDriver + itkAutoScaledGradientDescentRegistrationTest + 30 + 1.0 + 0 + 1 + 0) + +itk_add_test( + NAME + itkAutoScaledGradientDescentRegistrationOnVectorTest + COMMAND + ITKOptimizersv4TestDriver + itkAutoScaledGradientDescentRegistrationOnVectorTest + 30 + 1.0) + +itk_add_test( + NAME + itkQuasiNewtonOptimizerv4Test + COMMAND + ITKOptimizersv4TestDriver + itkQuasiNewtonOptimizerv4Test) + +itk_add_test( + NAME + itkRegistrationParameterScalesFromIndexShiftTest + COMMAND + ITKOptimizersv4TestDriver + itkRegistrationParameterScalesFromIndexShiftTest) + +itk_add_test( + NAME + itkRegistrationParameterScalesFromPhysicalShiftPointSetTest + COMMAND + ITKOptimizersv4TestDriver + itkRegistrationParameterScalesFromPhysicalShiftPointSetTest) + +itk_add_test( + NAME + itkObjectToObjectMetricBaseTest + COMMAND + ITKOptimizersv4TestDriver + itkObjectToObjectMetricBaseTest) + +itk_add_test( + NAME + itkLBFGSOptimizerv4Test + COMMAND + ITKOptimizersv4TestDriver itkLBFGSOptimizerv4Test) -itk_add_test(NAME itkLBFGS2Optimizerv4Test - COMMAND ITKOptimizersv4TestDriver +itk_add_test( + NAME + itkLBFGS2Optimizerv4Test + COMMAND + ITKOptimizersv4TestDriver itkLBFGS2Optimizerv4Test) -itk_add_test(NAME itkLBFGSBOptimizerv4Test - COMMAND ITKOptimizersv4TestDriver +itk_add_test( + NAME + itkLBFGSBOptimizerv4Test + COMMAND + ITKOptimizersv4TestDriver itkLBFGSBOptimizerv4Test) -itk_add_test(NAME itkAmoebaOptimizerv4Test - COMMAND ITKOptimizersv4TestDriver +itk_add_test( + NAME + itkAmoebaOptimizerv4Test + COMMAND + ITKOptimizersv4TestDriver itkAmoebaOptimizerv4Test) -itk_add_test(NAME itkExhaustiveOptimizerv4Test - COMMAND ITKOptimizersv4TestDriver +itk_add_test( + NAME + itkExhaustiveOptimizerv4Test + COMMAND + ITKOptimizersv4TestDriver itkExhaustiveOptimizerv4Test) -itk_add_test(NAME itkPowellOptimizerv4Test - COMMAND ITKOptimizersv4TestDriver - itkPowellOptimizerv4Test 10 0.01 0.1 100 100 0 0.0) - -itk_add_test(NAME itkOnePlusOneEvolutionaryOptimizerv4Test - COMMAND ITKOptimizersv4TestDriver +itk_add_test( + NAME + itkPowellOptimizerv4Test + COMMAND + ITKOptimizersv4TestDriver + itkPowellOptimizerv4Test + 10 + 0.01 + 0.1 + 100 + 100 + 0 + 0.0) + +itk_add_test( + NAME + itkOnePlusOneEvolutionaryOptimizerv4Test + COMMAND + ITKOptimizersv4TestDriver itkOnePlusOneEvolutionaryOptimizerv4Test) -itk_add_test(NAME itkRegularStepGradientDescentOptimizerv4Test - COMMAND ITKOptimizersv4TestDriver +itk_add_test( + NAME + itkRegularStepGradientDescentOptimizerv4Test + COMMAND + ITKOptimizersv4TestDriver itkRegularStepGradientDescentOptimizerv4Test) diff --git a/Modules/Numerics/Optimizersv4/wrapping/CMakeLists.txt b/Modules/Numerics/Optimizersv4/wrapping/CMakeLists.txt index dba3c8b3925..1112ba9ad0f 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/CMakeLists.txt +++ b/Modules/Numerics/Optimizersv4/wrapping/CMakeLists.txt @@ -1,20 +1,19 @@ itk_wrap_module(ITKOptimizersv4) set(WRAPPER_SUBMODULE_ORDER - itkVnlTypes - itkLBFGSOptimizerBasev4 - itkLBFGSOptimizerBaseHelperv4 - itkLBFGSBOptimizerv4 - itkLBFGSOptimizerv4 - itkAmoebaOptimizerv4 - itkGradientDescentLineSearchOptimizerv4 - itkConjugateGradientLineSearchOptimizerv4 - itkExhaustiveOptimizerv4 - itkMultiGradientOptimizerv4 - itkMultiStartOptimizerv4 - itkPowellOptimizerv4 - itkQuasiNewtonOptimizerv4 - itkRegularStepGradientDescentOptimizerv4 - itkOnePlusOneEvolutionaryOptimizerv4 - itkCommandIterationUpdatev4 -) + itkVnlTypes + itkLBFGSOptimizerBasev4 + itkLBFGSOptimizerBaseHelperv4 + itkLBFGSBOptimizerv4 + itkLBFGSOptimizerv4 + itkAmoebaOptimizerv4 + itkGradientDescentLineSearchOptimizerv4 + itkConjugateGradientLineSearchOptimizerv4 + itkExhaustiveOptimizerv4 + itkMultiGradientOptimizerv4 + itkMultiStartOptimizerv4 + itkPowellOptimizerv4 + itkQuasiNewtonOptimizerv4 + itkRegularStepGradientDescentOptimizerv4 + itkOnePlusOneEvolutionaryOptimizerv4 + itkCommandIterationUpdatev4) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkCommandIterationUpdatev4.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkCommandIterationUpdatev4.wrap index 6dd76be275b..992db10116e 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/itkCommandIterationUpdatev4.wrap +++ b/Modules/Numerics/Optimizersv4/wrapping/itkCommandIterationUpdatev4.wrap @@ -15,14 +15,10 @@ itk_wrap_include("itkPowellOptimizerv4.h") itk_wrap_include("itkQuasiNewtonOptimizerv4.h") itk_wrap_include("itkRegularStepGradientDescentOptimizerv4.h") - itk_wrap_class("itk::CommandIterationUpdatev4" POINTER) - # these types aren't templated - set(simple_types - "AmoebaOptimizerv4" - "LBFGSOptimizerv4" - "LBFGSBOptimizerv4") - set(internal_types +# these types aren't templated +set(simple_types "AmoebaOptimizerv4" "LBFGSOptimizerv4" "LBFGSBOptimizerv4") +set(internal_types "ConjugateGradientLineSearchOptimizerv4Template" "ExhaustiveOptimizerv4" "GradientDescentLineSearchOptimizerv4Template" @@ -30,26 +26,25 @@ itk_wrap_class("itk::CommandIterationUpdatev4" POINTER) "MultiStartOptimizerv4Template" "PowellOptimizerv4" "QuasiNewtonOptimizerv4Template" - "RegularStepGradientDescentOptimizerv4" - ) + "RegularStepGradientDescentOptimizerv4") - # mangle string then c++ type - # e.g. itk_wrap_template("itkAmoebaOptimizerv4" "itk::AmoebaOptimizerv4") - foreach(t ${simple_types}) - itk_wrap_template("itk${t}" "itk::${t}") - endforeach() +# mangle string then c++ type +# e.g. itk_wrap_template("itkAmoebaOptimizerv4" "itk::AmoebaOptimizerv4") +foreach(t ${simple_types}) + itk_wrap_template("itk${t}" "itk::${t}") +endforeach() - # mangle string then c++ type, but each optimizer instantiated with a real type - # e.g. itk_wrap_template("ExhaustiveOptimizerv4D" "itk::ExhaustiveOptimizerv4") - foreach(t ${internal_types}) - # saw this forced double (D) in itkRegularStepGradientDescentOptimizerv4.wrap - # we need to cover the internal type instantiations these optimizers might have - UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(t2 ${types}) - itk_wrap_template("itk${t}${ITKM_${t2}}" "itk::${t}< ${ITKT_${t2}} >") - endforeach() +# mangle string then c++ type, but each optimizer instantiated with a real type +# e.g. itk_wrap_template("ExhaustiveOptimizerv4D" "itk::ExhaustiveOptimizerv4") +foreach(t ${internal_types}) + # saw this forced double (D) in itkRegularStepGradientDescentOptimizerv4.wrap + # we need to cover the internal type instantiations these optimizers might have + unique(types "D;${WRAP_ITK_REAL}") + foreach(t2 ${types}) + itk_wrap_template("itk${t}${ITKM_${t2}}" "itk::${t}< ${ITKT_${t2}} >") endforeach() +endforeach() - # current issue where this can't be instantiated over float - itk_wrap_template("itkOnePlusOneEvolutionaryOptimizerv4${ITKM_D}" "itk::OnePlusOneEvolutionaryOptimizerv4< ${ITKT_D} >") +# current issue where this can't be instantiated over float +itk_wrap_template("itkOnePlusOneEvolutionaryOptimizerv4${ITKM_D}" "itk::OnePlusOneEvolutionaryOptimizerv4< ${ITKT_D} >") itk_end_wrap_class() diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkConjugateGradientLineSearchOptimizerv4.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkConjugateGradientLineSearchOptimizerv4.wrap index 71ffcccd380..4a7d508524d 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/itkConjugateGradientLineSearchOptimizerv4.wrap +++ b/Modules/Numerics/Optimizersv4/wrapping/itkConjugateGradientLineSearchOptimizerv4.wrap @@ -1,8 +1,8 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkConjugateGradientLineSearchOptimizerv4.h") itk_wrap_class("itk::ConjugateGradientLineSearchOptimizerv4Template" POINTER_WITH_SUPERCLASS) - UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(types "D;${WRAP_ITK_REAL}") +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkExhaustiveOptimizerv4.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkExhaustiveOptimizerv4.wrap index ff6924de88d..bb968df19ab 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/itkExhaustiveOptimizerv4.wrap +++ b/Modules/Numerics/Optimizersv4/wrapping/itkExhaustiveOptimizerv4.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::ExhaustiveOptimizerv4" POINTER) - UNIQUE(real_types "${WRAP_ITK_REAL};D") - foreach(t ${real_types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(real_types "${WRAP_ITK_REAL};D") +foreach(t ${real_types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentLineSearchOptimizerv4.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentLineSearchOptimizerv4.wrap index 12863b68c77..7a4308eca7f 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentLineSearchOptimizerv4.wrap +++ b/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentLineSearchOptimizerv4.wrap @@ -1,8 +1,8 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkGradientDescentLineSearchOptimizerv4.h") itk_wrap_class("itk::GradientDescentLineSearchOptimizerv4Template" POINTER) - UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(types "D;${WRAP_ITK_REAL}") +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerBasev4.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerBasev4.wrap index 2a9902188a8..c8d4d5bcfdc 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerBasev4.wrap +++ b/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerBasev4.wrap @@ -1,8 +1,8 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkGradientDescentOptimizerBasev4.h") itk_wrap_class("itk::GradientDescentOptimizerBasev4Template" POINTER) - UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(types "D;${WRAP_ITK_REAL}") +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerv4.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerv4.wrap index 6abbcd1d41e..a93dd0388d4 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerv4.wrap +++ b/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerv4.wrap @@ -1,10 +1,10 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkGradientDescentOptimizerv4.h") itk_wrap_class("itk::GradientDescentOptimizerv4Template" POINTER) - UNIQUE( types "D;${WRAP_ITK_REAL}") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(types "D;${WRAP_ITK_REAL}") +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() itk_wrap_simple_class("itk::GradientDescentOptimizerv4" POINTER) diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkMultiGradientOptimizerv4.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkMultiGradientOptimizerv4.wrap index f793cfb2dba..435ec8ac05c 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/itkMultiGradientOptimizerv4.wrap +++ b/Modules/Numerics/Optimizersv4/wrapping/itkMultiGradientOptimizerv4.wrap @@ -4,8 +4,8 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkMultiGradientOptimizerv4.h") itk_wrap_class("itk::MultiGradientOptimizerv4Template" POINTER) - UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(types "D;${WRAP_ITK_REAL}") +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkMultiStartOptimizerv4.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkMultiStartOptimizerv4.wrap index 3363372f856..6bc55c05d8e 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/itkMultiStartOptimizerv4.wrap +++ b/Modules/Numerics/Optimizersv4/wrapping/itkMultiStartOptimizerv4.wrap @@ -2,8 +2,8 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkMultiStartOptimizerv4.h") itk_wrap_class("itk::MultiStartOptimizerv4Template" POINTER) - UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(types "D;${WRAP_ITK_REAL}") +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectMetric.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectMetric.wrap index 3e13f6fdc9b..42c3804ff87 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectMetric.wrap +++ b/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectMetric.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::ObjectToObjectMetric" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${d}${d}" "${d},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${d}${d}" "${d},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectMetricBase.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectMetricBase.wrap index d26f15f2082..90e4a7d5692 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectMetricBase.wrap +++ b/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectMetricBase.wrap @@ -4,8 +4,8 @@ itk_wrap_include("itkObjectToObjectMetricBase.h") itk_wrap_simple_class("itk::ObjectToObjectMetricBaseTemplateEnums") itk_wrap_class("itk::ObjectToObjectMetricBaseTemplate" POINTER) - UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(types "D;${WRAP_ITK_REAL}") +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectOptimizerBase.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectOptimizerBase.wrap index c1362b2d077..59b1af618e7 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectOptimizerBase.wrap +++ b/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectOptimizerBase.wrap @@ -4,8 +4,8 @@ itk_wrap_include("itkObjectToObjectOptimizerBase.h") itk_wrap_simple_class("itk::ObjectToObjectOptimizerBaseTemplateEnums") itk_wrap_class("itk::ObjectToObjectOptimizerBaseTemplate" POINTER) - UNIQUE(real_types "${WRAP_ITK_REAL};D") - foreach(t ${real_types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(real_types "${WRAP_ITK_REAL};D") +foreach(t ${real_types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkOnePlusOneEvolutionaryOptimizerv4.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkOnePlusOneEvolutionaryOptimizerv4.wrap index 3a6bd062e18..f188c537dd5 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/itkOnePlusOneEvolutionaryOptimizerv4.wrap +++ b/Modules/Numerics/Optimizersv4/wrapping/itkOnePlusOneEvolutionaryOptimizerv4.wrap @@ -1,12 +1,12 @@ itk_wrap_class("itk::OnePlusOneEvolutionaryOptimizerv4" POINTER) - # can't include ${WRAP_ITK_REAL} because of issue where - # OnePlusOneEvolutionaryOptimizerv4 can't be instantiated with float +# can't include ${WRAP_ITK_REAL} because of issue where +# OnePlusOneEvolutionaryOptimizerv4 can't be instantiated with float # UNIQUE(types "D") # foreach(t ${types}) # itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") # endforeach() - itk_wrap_template("${ITKM_D}" "${ITKT_D}") +itk_wrap_template("${ITKM_D}" "${ITKT_D}") itk_end_wrap_class() diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkOptimizerParameterScalesEstimator.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkOptimizerParameterScalesEstimator.wrap index 99a7e768433..ea5c9db6cb5 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/itkOptimizerParameterScalesEstimator.wrap +++ b/Modules/Numerics/Optimizersv4/wrapping/itkOptimizerParameterScalesEstimator.wrap @@ -1,8 +1,8 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkOptimizerParameterScalesEstimator.h") itk_wrap_class("itk::OptimizerParameterScalesEstimatorTemplate" POINTER) - UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(types "D;${WRAP_ITK_REAL}") +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkPowellOptimizerv4.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkPowellOptimizerv4.wrap index a53edc12aad..bcbefaeea91 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/itkPowellOptimizerv4.wrap +++ b/Modules/Numerics/Optimizersv4/wrapping/itkPowellOptimizerv4.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::PowellOptimizerv4" POINTER) - UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(types "D;${WRAP_ITK_REAL}") +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkQuasiNewtonOptimizerv4.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkQuasiNewtonOptimizerv4.wrap index 7a4d9b49f87..ef6d38013c1 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/itkQuasiNewtonOptimizerv4.wrap +++ b/Modules/Numerics/Optimizersv4/wrapping/itkQuasiNewtonOptimizerv4.wrap @@ -2,10 +2,10 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkQuasiNewtonOptimizerv4.h") itk_wrap_class("itk::QuasiNewtonOptimizerv4Template" POINTER) - UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(types "D;${WRAP_ITK_REAL}") +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() itk_wrap_simple_class("itk::QuasiNewtonOptimizerv4") diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkRegularStepGradientDescentOptimizerv4.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkRegularStepGradientDescentOptimizerv4.wrap index cd3fefa9dd5..9c7b9dadb47 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/itkRegularStepGradientDescentOptimizerv4.wrap +++ b/Modules/Numerics/Optimizersv4/wrapping/itkRegularStepGradientDescentOptimizerv4.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::RegularStepGradientDescentOptimizerv4" POINTER) - UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(types "D;${WRAP_ITK_REAL}") +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Optimizersv4/wrapping/itkSingleValuedCostFunctionv4.wrap b/Modules/Numerics/Optimizersv4/wrapping/itkSingleValuedCostFunctionv4.wrap index 75ca20183e1..390001dfac0 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/itkSingleValuedCostFunctionv4.wrap +++ b/Modules/Numerics/Optimizersv4/wrapping/itkSingleValuedCostFunctionv4.wrap @@ -1,8 +1,8 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkSingleValuedCostFunctionv4.h") itk_wrap_class("itk::SingleValuedCostFunctionv4Template" POINTER) - UNIQUE(types "D;${WRAP_ITK_REAL}") - foreach(t ${types}) - itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") - endforeach() +unique(types "D;${WRAP_ITK_REAL}") +foreach(t ${types}) + itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Optimizersv4/wrapping/test/CMakeLists.txt b/Modules/Numerics/Optimizersv4/wrapping/test/CMakeLists.txt index 01a51ff831f..dea14261b8f 100644 --- a/Modules/Numerics/Optimizersv4/wrapping/test/CMakeLists.txt +++ b/Modules/Numerics/Optimizersv4/wrapping/test/CMakeLists.txt @@ -1,56 +1,110 @@ if(ITK_WRAP_PYTHON) - itk_python_expression_add_test(NAME itkAmoebaOptimizerv4PythonTest - EXPRESSION "instance = itk.AmoebaOptimizerv4.New()") - - itk_python_expression_add_test(NAME itkCommandIterationUpdatev4PythonTest - EXPRESSION "instance = itk.CommandIterationUpdatev4.New()") - - itk_python_expression_add_test(NAME itkExhaustiveOptimizerv4PythonTest - EXPRESSION "instance = itk.ExhaustiveOptimizerv4.New()") - - itk_python_expression_add_test(NAME itkGradientDescentLineSearchOptimizerv4TemplatePythonTest - EXPRESSION "instance = itk.GradientDescentLineSearchOptimizerv4Template.New()") - - itk_python_expression_add_test(NAME itkGradientDescentOptimizerv4PythonTest - EXPRESSION "instance = itk.GradientDescentOptimizerv4.New()") - - itk_python_expression_add_test(NAME itkLBFGSBOptimizerv4PythonTest - EXPRESSION "instance = itk.LBFGSBOptimizerv4.New()") - - itk_python_expression_add_test(NAME itkLBFGSOptimizerBasev4PythonTest - EXPRESSION "instance = itk.LBFGSOptimizerBasev4.New()") + itk_python_expression_add_test( + NAME + itkAmoebaOptimizerv4PythonTest + EXPRESSION + "instance = itk.AmoebaOptimizerv4.New()") + + itk_python_expression_add_test( + NAME + itkCommandIterationUpdatev4PythonTest + EXPRESSION + "instance = itk.CommandIterationUpdatev4.New()") + + itk_python_expression_add_test( + NAME + itkExhaustiveOptimizerv4PythonTest + EXPRESSION + "instance = itk.ExhaustiveOptimizerv4.New()") + + itk_python_expression_add_test( + NAME + itkGradientDescentLineSearchOptimizerv4TemplatePythonTest + EXPRESSION + "instance = itk.GradientDescentLineSearchOptimizerv4Template.New()") + + itk_python_expression_add_test( + NAME + itkGradientDescentOptimizerv4PythonTest + EXPRESSION + "instance = itk.GradientDescentOptimizerv4.New()") + + itk_python_expression_add_test( + NAME + itkLBFGSBOptimizerv4PythonTest + EXPRESSION + "instance = itk.LBFGSBOptimizerv4.New()") + + itk_python_expression_add_test( + NAME + itkLBFGSOptimizerBasev4PythonTest + EXPRESSION + "instance = itk.LBFGSOptimizerBasev4.New()") # LBFGSOptimizerBaseHelperv4 is not wrapped with POINTER so cannot use .New() - itk_python_expression_add_test(NAME itkLBFGSOptimizerBaseHelperv4PythonTest - EXPRESSION "inst = itk.LBFGSOptimizerBaseHelperv4") - - itk_python_expression_add_test(NAME itkMultiGradientOptimizerv4TemplatePythonTest - EXPRESSION "instance = itk.MultiGradientOptimizerv4Template.New()") - - itk_python_expression_add_test(NAME itkMultiStartOptimizerv4TemplatePythonTest - EXPRESSION "instance = itk.MultiStartOptimizerv4Template.New()") - - itk_python_expression_add_test(NAME itkOnePlusOneEvolutionaryOptimizerv4PythonTest - EXPRESSION "instance = itk.OnePlusOneEvolutionaryOptimizerv4.New()") - - itk_python_expression_add_test(NAME itkPowellOptimizerv4PythonTest - EXPRESSION "instance = itk.PowellOptimizerv4.New()") - - itk_python_expression_add_test(NAME itkQuasiNewtonOptimizerv4TemplatePythonTest - EXPRESSION "instance = itk.QuasiNewtonOptimizerv4Template.New()") - - itk_python_expression_add_test(NAME itkRegistrationParameterScalesFromIndexShiftPythonTest - EXPRESSION "instance = itk.RegistrationParameterScalesFromIndexShift.New()") - - itk_python_expression_add_test(NAME itkRegistrationParameterScalesFromJacobianPythonTest - EXPRESSION "instance = itk.RegistrationParameterScalesFromJacobian.New()") - - itk_python_expression_add_test(NAME itkRegistrationParameterScalesFromPhysicalShiftPythonTest - EXPRESSION "instance = itk.RegistrationParameterScalesFromPhysicalShift.New()") - - itk_python_expression_add_test(NAME itkRegularStepGradientDescentOptimizerv4PythonTest - EXPRESSION "instance = itk.RegularStepGradientDescentOptimizerv4.New()") - - itk_python_expression_add_test(NAME itkSingleValuedNonLinearVnlOptimizerv4PythonTest - EXPRESSION "instance = itk.SingleValuedNonLinearVnlOptimizerv4.New()") + itk_python_expression_add_test( + NAME + itkLBFGSOptimizerBaseHelperv4PythonTest + EXPRESSION + "inst = itk.LBFGSOptimizerBaseHelperv4") + + itk_python_expression_add_test( + NAME + itkMultiGradientOptimizerv4TemplatePythonTest + EXPRESSION + "instance = itk.MultiGradientOptimizerv4Template.New()") + + itk_python_expression_add_test( + NAME + itkMultiStartOptimizerv4TemplatePythonTest + EXPRESSION + "instance = itk.MultiStartOptimizerv4Template.New()") + + itk_python_expression_add_test( + NAME + itkOnePlusOneEvolutionaryOptimizerv4PythonTest + EXPRESSION + "instance = itk.OnePlusOneEvolutionaryOptimizerv4.New()") + + itk_python_expression_add_test( + NAME + itkPowellOptimizerv4PythonTest + EXPRESSION + "instance = itk.PowellOptimizerv4.New()") + + itk_python_expression_add_test( + NAME + itkQuasiNewtonOptimizerv4TemplatePythonTest + EXPRESSION + "instance = itk.QuasiNewtonOptimizerv4Template.New()") + + itk_python_expression_add_test( + NAME + itkRegistrationParameterScalesFromIndexShiftPythonTest + EXPRESSION + "instance = itk.RegistrationParameterScalesFromIndexShift.New()") + + itk_python_expression_add_test( + NAME + itkRegistrationParameterScalesFromJacobianPythonTest + EXPRESSION + "instance = itk.RegistrationParameterScalesFromJacobian.New()") + + itk_python_expression_add_test( + NAME + itkRegistrationParameterScalesFromPhysicalShiftPythonTest + EXPRESSION + "instance = itk.RegistrationParameterScalesFromPhysicalShift.New()") + + itk_python_expression_add_test( + NAME + itkRegularStepGradientDescentOptimizerv4PythonTest + EXPRESSION + "instance = itk.RegularStepGradientDescentOptimizerv4.New()") + + itk_python_expression_add_test( + NAME + itkSingleValuedNonLinearVnlOptimizerv4PythonTest + EXPRESSION + "instance = itk.SingleValuedNonLinearVnlOptimizerv4.New()") endif() diff --git a/Modules/Numerics/Polynomials/itk-module.cmake b/Modules/Numerics/Polynomials/itk-module.cmake index be0e0208894..899c80688ad 100644 --- a/Modules/Numerics/Polynomials/itk-module.cmake +++ b/Modules/Numerics/Polynomials/itk-module.cmake @@ -1,12 +1,12 @@ set(DOCUMENTATION "This module contains code for the calculation of polynomial functions.") -itk_module(ITKPolynomials +itk_module( + ITKPolynomials ENABLE_SHARED DEPENDS - ITKCommon + ITKCommon TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Numerics/Polynomials/src/CMakeLists.txt b/Modules/Numerics/Polynomials/src/CMakeLists.txt index eae9d721f5c..1f9444061d3 100644 --- a/Modules/Numerics/Polynomials/src/CMakeLists.txt +++ b/Modules/Numerics/Polynomials/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKPolynomials_SRCS - itkMultivariateLegendrePolynomial.cxx - ) +set(ITKPolynomials_SRCS itkMultivariateLegendrePolynomial.cxx) itk_module_add_library(ITKPolynomials ${ITKPolynomials_SRCS}) diff --git a/Modules/Numerics/Polynomials/test/CMakeLists.txt b/Modules/Numerics/Polynomials/test/CMakeLists.txt index 6810ba17218..5050fd4c76b 100644 --- a/Modules/Numerics/Polynomials/test/CMakeLists.txt +++ b/Modules/Numerics/Polynomials/test/CMakeLists.txt @@ -1,9 +1,11 @@ itk_module_test() -set(ITKPolynomialsTests -itkMultivariateLegendrePolynomialTest.cxx -) +set(ITKPolynomialsTests itkMultivariateLegendrePolynomialTest.cxx) -CreateTestDriver(ITKPolynomials "${ITKPolynomials-Test_LIBRARIES}" "${ITKPolynomialsTests}") +createtestdriver(ITKPolynomials "${ITKPolynomials-Test_LIBRARIES}" "${ITKPolynomialsTests}") -itk_add_test(NAME itkMultivariateLegendrePolynomialTest - COMMAND ITKPolynomialsTestDriver itkMultivariateLegendrePolynomialTest) +itk_add_test( + NAME + itkMultivariateLegendrePolynomialTest + COMMAND + ITKPolynomialsTestDriver + itkMultivariateLegendrePolynomialTest) diff --git a/Modules/Numerics/Statistics/itk-module.cmake b/Modules/Numerics/Statistics/itk-module.cmake index eef83552d07..f08bc7ab961 100644 --- a/Modules/Numerics/Statistics/itk-module.cmake +++ b/Modules/Numerics/Statistics/itk-module.cmake @@ -1,22 +1,23 @@ -set(DOCUMENTATION "The Statistics module contains basic data structures, +set(DOCUMENTATION + "The Statistics module contains basic data structures, statistical algorithms, and a classification for general statistical analysis and classification problems. This includes, for example, classes for calculating histograms, calculating sample statistics, creating decision rules, or for performing statistical pattern classification. Statistics are calculated on an itk::Sample, which contains measurement vectors.") -itk_module(ITKStatistics +itk_module( + ITKStatistics ENABLE_SHARED DEPENDS - ITKCommon - ITKNetlib + ITKCommon + ITKNetlib TEST_DEPENDS - ITKTestKernel - ITKImageIntensity - ITKImageCompose - ITKIOImageBase + ITKTestKernel + ITKImageIntensity + ITKImageCompose + ITKIOImageBase DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") # Extra test dependency of ImageIntensity is introduced by itkImageToListSampleAdaptorTest.cxx. diff --git a/Modules/Numerics/Statistics/src/CMakeLists.txt b/Modules/Numerics/Statistics/src/CMakeLists.txt index 3146bdede47..e1c2586fa87 100644 --- a/Modules/Numerics/Statistics/src/CMakeLists.txt +++ b/Modules/Numerics/Statistics/src/CMakeLists.txt @@ -1,18 +1,17 @@ set(ITKStatistics_SRCS - itkProbabilityDistribution.cxx - itkDenseFrequencyContainer2.cxx - itkSparseFrequencyContainer2.cxx - itkChiSquareDistribution.cxx - itkGaussianDistribution.cxx - itkTDistribution.cxx - itkNormalVariateGenerator.cxx - itkDecisionRule.cxx - itkMaximumDecisionRule.cxx - itkMaximumRatioDecisionRule.cxx - itkMinimumDecisionRule.cxx - itkHistogramToRunLengthFeaturesFilter.cxx -itkExpectationMaximizationMixtureModelEstimator.cxx -itkHistogramToTextureFeaturesFilter.cxx - ) + itkProbabilityDistribution.cxx + itkDenseFrequencyContainer2.cxx + itkSparseFrequencyContainer2.cxx + itkChiSquareDistribution.cxx + itkGaussianDistribution.cxx + itkTDistribution.cxx + itkNormalVariateGenerator.cxx + itkDecisionRule.cxx + itkMaximumDecisionRule.cxx + itkMaximumRatioDecisionRule.cxx + itkMinimumDecisionRule.cxx + itkHistogramToRunLengthFeaturesFilter.cxx + itkExpectationMaximizationMixtureModelEstimator.cxx + itkHistogramToTextureFeaturesFilter.cxx) itk_module_add_library(ITKStatistics ${ITKStatistics_SRCS}) diff --git a/Modules/Numerics/Statistics/test/CMakeLists.txt b/Modules/Numerics/Statistics/test/CMakeLists.txt index 5827c592038..02bdf795a6e 100644 --- a/Modules/Numerics/Statistics/test/CMakeLists.txt +++ b/Modules/Numerics/Statistics/test/CMakeLists.txt @@ -1,201 +1,322 @@ itk_module_test() set(ITKStatisticsTests -itkDecisionRuleTest.cxx -itkDenseFrequencyContainer2Test.cxx -itkExpectationMaximizationMixtureModelEstimatorTest.cxx -itkGaussianDistributionTest.cxx -itkGaussianMembershipFunctionTest.cxx -itkGaussianMixtureModelComponentTest.cxx -itkGaussianRandomSpatialNeighborSubsamplerTest.cxx -itkKalmanLinearEstimatorTest.cxx -itkKdTreeBasedKmeansEstimatorTest.cxx -itkKdTreeGeneratorTest.cxx -itkKdTreeTest1.cxx -itkKdTreeTest2.cxx -itkKdTreeTest3.cxx -itkKdTreeTestSamplePoints.cxx -itkMaximumDecisionRuleTest.cxx -itkMinimumDecisionRuleTest.cxx -itkMaximumRatioDecisionRuleTest.cxx -itkMeanSampleFilterTest.cxx -itkMeanSampleFilterTest2.cxx -itkMeanSampleFilterTest3.cxx -itkHistogramTest.cxx -itkHistogramToTextureFeaturesFilterTest.cxx -itkHistogramToTextureFeaturesFilterNaNTest.cxx -itkChiSquareDistributionTest.cxx -itkCovarianceSampleFilterTest.cxx -itkCovarianceSampleFilterTest2.cxx -itkCovarianceSampleFilterTest3.cxx -itkWeightedCovarianceSampleFilterTest.cxx -itkWeightedCovarianceSampleFilterTest2.cxx -itkWeightedMeanSampleFilterTest.cxx -itkWeightedCentroidKdTreeGeneratorTest1.cxx -itkWeightedCentroidKdTreeGeneratorTest8.cxx -itkWeightedCentroidKdTreeGeneratorTest9.cxx -itkMahalanobisDistanceMetricTest.cxx -itkManhattanDistanceMetricTest.cxx -itkMembershipFunctionBaseTest.cxx -itkMembershipFunctionBaseTest2.cxx -itkMembershipSampleTest1.cxx -itkMembershipSampleTest2.cxx -itkMembershipSampleTest3.cxx -itkMembershipSampleTest4.cxx -itkMeasurementVectorTraitsTest.cxx -itkNeighborhoodSamplerTest1.cxx -itkMixtureModelComponentBaseTest.cxx -itkNormalVariateGeneratorTest1.cxx -itkDistanceMetricTest.cxx -itkDistanceMetricTest2.cxx -itkDistanceToCentroidMembershipFunctionTest.cxx -itkEuclideanDistanceMetricTest.cxx -itkEuclideanSquareDistanceMetricTest.cxx -itkListSampleTest.cxx -itkImageToListSampleAdaptorTest.cxx -itkImageToListSampleAdaptorTest2.cxx -itkImageToListSampleFilterTest.cxx -itkImageToListSampleFilterTest2.cxx -itkImageToListSampleFilterTest3.cxx -itkListSampleTest.cxx -itkJointDomainImageToListSampleAdaptorTest.cxx -itkPointSetToListSampleAdaptorTest.cxx -itkProbabilityDistributionTest.cxx -itkRandomVariateGeneratorBaseTest.cxx -itkSampleTest.cxx -itkSampleTest2.cxx -itkSampleTest3.cxx -itkSampleTest4.cxx -itkSampleToHistogramFilterTest.cxx -itkSampleToHistogramFilterTest2.cxx -itkSampleToHistogramFilterTest3.cxx -itkSampleToHistogramFilterTest4.cxx -itkSampleToHistogramFilterTest5.cxx -itkSampleToHistogramFilterTest6.cxx -itkSampleToHistogramFilterTest7.cxx -itkSampleToSubsampleFilterTest1.cxx -itkScalarImageToCooccurrenceListSampleFilterTest.cxx -itkScalarImageToCooccurrenceMatrixFilterTest.cxx -itkScalarImageToCooccurrenceMatrixFilterTest2.cxx -itkScalarImageToTextureFeaturesFilterTest.cxx -itkScalarImageToRunLengthMatrixFilterTest.cxx -itkScalarImageToRunLengthFeaturesFilterTest.cxx -itkSparseFrequencyContainer2Test.cxx -itkSpatialNeighborSubsamplerTest.cxx -itkStandardDeviationPerComponentSampleFilterTest.cxx -itkStatisticsTypesTest.cxx -itkSubsampleTest.cxx -itkSubsampleTest2.cxx -itkSubsampleTest3.cxx -itkTDistributionTest.cxx -itkStatisticsAlgorithmTest.cxx -itkStatisticsAlgorithmTest2.cxx -itkUniformRandomSpatialNeighborSubsamplerTest.cxx -itkVectorContainerToListSampleAdaptorTest.cxx -itkImageToHistogramFilterTest.cxx -itkImageToHistogramFilterTest2.cxx -itkScalarImageToHistogramGeneratorTest.cxx -) + itkDecisionRuleTest.cxx + itkDenseFrequencyContainer2Test.cxx + itkExpectationMaximizationMixtureModelEstimatorTest.cxx + itkGaussianDistributionTest.cxx + itkGaussianMembershipFunctionTest.cxx + itkGaussianMixtureModelComponentTest.cxx + itkGaussianRandomSpatialNeighborSubsamplerTest.cxx + itkKalmanLinearEstimatorTest.cxx + itkKdTreeBasedKmeansEstimatorTest.cxx + itkKdTreeGeneratorTest.cxx + itkKdTreeTest1.cxx + itkKdTreeTest2.cxx + itkKdTreeTest3.cxx + itkKdTreeTestSamplePoints.cxx + itkMaximumDecisionRuleTest.cxx + itkMinimumDecisionRuleTest.cxx + itkMaximumRatioDecisionRuleTest.cxx + itkMeanSampleFilterTest.cxx + itkMeanSampleFilterTest2.cxx + itkMeanSampleFilterTest3.cxx + itkHistogramTest.cxx + itkHistogramToTextureFeaturesFilterTest.cxx + itkHistogramToTextureFeaturesFilterNaNTest.cxx + itkChiSquareDistributionTest.cxx + itkCovarianceSampleFilterTest.cxx + itkCovarianceSampleFilterTest2.cxx + itkCovarianceSampleFilterTest3.cxx + itkWeightedCovarianceSampleFilterTest.cxx + itkWeightedCovarianceSampleFilterTest2.cxx + itkWeightedMeanSampleFilterTest.cxx + itkWeightedCentroidKdTreeGeneratorTest1.cxx + itkWeightedCentroidKdTreeGeneratorTest8.cxx + itkWeightedCentroidKdTreeGeneratorTest9.cxx + itkMahalanobisDistanceMetricTest.cxx + itkManhattanDistanceMetricTest.cxx + itkMembershipFunctionBaseTest.cxx + itkMembershipFunctionBaseTest2.cxx + itkMembershipSampleTest1.cxx + itkMembershipSampleTest2.cxx + itkMembershipSampleTest3.cxx + itkMembershipSampleTest4.cxx + itkMeasurementVectorTraitsTest.cxx + itkNeighborhoodSamplerTest1.cxx + itkMixtureModelComponentBaseTest.cxx + itkNormalVariateGeneratorTest1.cxx + itkDistanceMetricTest.cxx + itkDistanceMetricTest2.cxx + itkDistanceToCentroidMembershipFunctionTest.cxx + itkEuclideanDistanceMetricTest.cxx + itkEuclideanSquareDistanceMetricTest.cxx + itkListSampleTest.cxx + itkImageToListSampleAdaptorTest.cxx + itkImageToListSampleAdaptorTest2.cxx + itkImageToListSampleFilterTest.cxx + itkImageToListSampleFilterTest2.cxx + itkImageToListSampleFilterTest3.cxx + itkListSampleTest.cxx + itkJointDomainImageToListSampleAdaptorTest.cxx + itkPointSetToListSampleAdaptorTest.cxx + itkProbabilityDistributionTest.cxx + itkRandomVariateGeneratorBaseTest.cxx + itkSampleTest.cxx + itkSampleTest2.cxx + itkSampleTest3.cxx + itkSampleTest4.cxx + itkSampleToHistogramFilterTest.cxx + itkSampleToHistogramFilterTest2.cxx + itkSampleToHistogramFilterTest3.cxx + itkSampleToHistogramFilterTest4.cxx + itkSampleToHistogramFilterTest5.cxx + itkSampleToHistogramFilterTest6.cxx + itkSampleToHistogramFilterTest7.cxx + itkSampleToSubsampleFilterTest1.cxx + itkScalarImageToCooccurrenceListSampleFilterTest.cxx + itkScalarImageToCooccurrenceMatrixFilterTest.cxx + itkScalarImageToCooccurrenceMatrixFilterTest2.cxx + itkScalarImageToTextureFeaturesFilterTest.cxx + itkScalarImageToRunLengthMatrixFilterTest.cxx + itkScalarImageToRunLengthFeaturesFilterTest.cxx + itkSparseFrequencyContainer2Test.cxx + itkSpatialNeighborSubsamplerTest.cxx + itkStandardDeviationPerComponentSampleFilterTest.cxx + itkStatisticsTypesTest.cxx + itkSubsampleTest.cxx + itkSubsampleTest2.cxx + itkSubsampleTest3.cxx + itkTDistributionTest.cxx + itkStatisticsAlgorithmTest.cxx + itkStatisticsAlgorithmTest2.cxx + itkUniformRandomSpatialNeighborSubsamplerTest.cxx + itkVectorContainerToListSampleAdaptorTest.cxx + itkImageToHistogramFilterTest.cxx + itkImageToHistogramFilterTest2.cxx + itkScalarImageToHistogramGeneratorTest.cxx) -CreateTestDriver(ITKStatistics "${ITKStatistics-Test_LIBRARIES}" "${ITKStatisticsTests}") +createtestdriver(ITKStatistics "${ITKStatistics-Test_LIBRARIES}" "${ITKStatisticsTests}") set(TEMP ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkDecisionRuleTest - COMMAND ITKStatisticsTestDriver itkDecisionRuleTest) -itk_add_test(NAME itkDenseFrequencyContainer2Test - COMMAND ITKStatisticsTestDriver itkDenseFrequencyContainer2Test) -itk_add_test(NAME itkExpectationMaximizationMixtureModelEstimatorTest - COMMAND ITKStatisticsTestDriver itkExpectationMaximizationMixtureModelEstimatorTest - DATA{${ITK_DATA_ROOT}/Input/Statistics/TwoDimensionTwoGaussian.dat}) -itk_add_test(NAME itkGaussianDistributionTest - COMMAND ITKStatisticsTestDriver itkGaussianDistributionTest) -itk_add_test(NAME itkGaussianMembershipFunctionTest - COMMAND ITKStatisticsTestDriver itkGaussianMembershipFunctionTest) -itk_add_test(NAME itkGaussianMixtureModelComponentTest - COMMAND ITKStatisticsTestDriver itkGaussianMixtureModelComponentTest - DATA{${ITK_DATA_ROOT}/Input/Statistics/TwoDimensionTwoGaussian.dat}) -itk_add_test(NAME itkGaussianRandomSpatialNeighborSubsamplerTest - COMMAND ITKStatisticsTestDriver - --compare DATA{Baseline/itkGaussianRandomSubsamplingTest.mha} - ${ITK_TEST_OUTPUT_DIR}/itkGaussianRandomSubsamplingTest.mha - itkGaussianRandomSpatialNeighborSubsamplerTest - ${ITK_TEST_OUTPUT_DIR}/itkGaussianRandomSubsamplingTest.mha) -itk_add_test(NAME itkKalmanLinearEstimatorTest - COMMAND ITKStatisticsTestDriver itkKalmanLinearEstimatorTest) -itk_add_test(NAME itkKdTreeBasedKmeansEstimatorTest - COMMAND ITKStatisticsTestDriver itkKdTreeBasedKmeansEstimatorTest - DATA{${ITK_DATA_ROOT}/Input/Statistics/TwoDimensionTwoGaussian.dat} 1 28.54746 0.07 0) -itk_add_test(NAME itkKdTreeGeneratorTest - COMMAND ITKStatisticsTestDriver itkKdTreeGeneratorTest - DATA{${ITK_DATA_ROOT}/Input/Statistics/TwoDimensionTwoGaussian.dat}) +itk_add_test( + NAME + itkDecisionRuleTest + COMMAND + ITKStatisticsTestDriver + itkDecisionRuleTest) +itk_add_test( + NAME + itkDenseFrequencyContainer2Test + COMMAND + ITKStatisticsTestDriver + itkDenseFrequencyContainer2Test) +itk_add_test( + NAME + itkExpectationMaximizationMixtureModelEstimatorTest + COMMAND + ITKStatisticsTestDriver + itkExpectationMaximizationMixtureModelEstimatorTest + DATA{${ITK_DATA_ROOT}/Input/Statistics/TwoDimensionTwoGaussian.dat}) +itk_add_test( + NAME + itkGaussianDistributionTest + COMMAND + ITKStatisticsTestDriver + itkGaussianDistributionTest) +itk_add_test( + NAME + itkGaussianMembershipFunctionTest + COMMAND + ITKStatisticsTestDriver + itkGaussianMembershipFunctionTest) +itk_add_test( + NAME + itkGaussianMixtureModelComponentTest + COMMAND + ITKStatisticsTestDriver + itkGaussianMixtureModelComponentTest + DATA{${ITK_DATA_ROOT}/Input/Statistics/TwoDimensionTwoGaussian.dat}) +itk_add_test( + NAME + itkGaussianRandomSpatialNeighborSubsamplerTest + COMMAND + ITKStatisticsTestDriver + --compare + DATA{Baseline/itkGaussianRandomSubsamplingTest.mha} + ${ITK_TEST_OUTPUT_DIR}/itkGaussianRandomSubsamplingTest.mha + itkGaussianRandomSpatialNeighborSubsamplerTest + ${ITK_TEST_OUTPUT_DIR}/itkGaussianRandomSubsamplingTest.mha) +itk_add_test( + NAME + itkKalmanLinearEstimatorTest + COMMAND + ITKStatisticsTestDriver + itkKalmanLinearEstimatorTest) +itk_add_test( + NAME + itkKdTreeBasedKmeansEstimatorTest + COMMAND + ITKStatisticsTestDriver + itkKdTreeBasedKmeansEstimatorTest + DATA{${ITK_DATA_ROOT}/Input/Statistics/TwoDimensionTwoGaussian.dat} + 1 + 28.54746 + 0.07 + 0) +itk_add_test( + NAME + itkKdTreeGeneratorTest + COMMAND + ITKStatisticsTestDriver + itkKdTreeGeneratorTest + DATA{${ITK_DATA_ROOT}/Input/Statistics/TwoDimensionTwoGaussian.dat}) -itk_add_test(NAME itkKdTreeTest1 - COMMAND ITKStatisticsTestDriver --redirectOutput ${TEMP}/itkKdTreeTest1.txt - itkKdTreeTest1 - 100 100 1 ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest1_100.dot) +itk_add_test( + NAME + itkKdTreeTest1 + COMMAND + ITKStatisticsTestDriver + --redirectOutput + ${TEMP}/itkKdTreeTest1.txt + itkKdTreeTest1 + 100 + 100 + 1 + ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest1_100.dot) set_tests_properties(itkKdTreeTest1 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkKdTreeTest1.txt) -itk_add_test(NAME itkKdTreeTest2 - COMMAND ITKStatisticsTestDriver --redirectOutput ${TEMP}/itkKdTreeTest2.txt - itkKdTreeTest2 - DATA{${ITK_DATA_ROOT}/Input/pointsForKdTree.txt} 1 ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest2.dot) +itk_add_test( + NAME + itkKdTreeTest2 + COMMAND + ITKStatisticsTestDriver + --redirectOutput + ${TEMP}/itkKdTreeTest2.txt + itkKdTreeTest2 + DATA{${ITK_DATA_ROOT}/Input/pointsForKdTree.txt} + 1 + ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest2.dot) set_tests_properties(itkKdTreeTest2 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkKdTreeTest2.txt) -itk_add_test(NAME itkKdTreeTest3 - COMMAND ITKStatisticsTestDriver --redirectOutput ${TEMP}/itkKdTreeTest3.txt - itkKdTreeTest2 - DATA{${ITK_DATA_ROOT}/Input/pointsForKdTree2.txt} 1 ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest3.dot) +itk_add_test( + NAME + itkKdTreeTest3 + COMMAND + ITKStatisticsTestDriver + --redirectOutput + ${TEMP}/itkKdTreeTest3.txt + itkKdTreeTest2 + DATA{${ITK_DATA_ROOT}/Input/pointsForKdTree2.txt} + 1 + ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest3.dot) set_tests_properties(itkKdTreeTest3 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkKdTreeTest3.txt) -itk_add_test(NAME itkKdTreeTest4 - COMMAND ITKStatisticsTestDriver --redirectOutput ${TEMP}/itkKdTreeTest4.txt - itkKdTreeTest1 - 1000 1000 1) +itk_add_test( + NAME + itkKdTreeTest4 + COMMAND + ITKStatisticsTestDriver + --redirectOutput + ${TEMP}/itkKdTreeTest4.txt + itkKdTreeTest1 + 1000 + 1000 + 1) set_tests_properties(itkKdTreeTest4 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkKdTreeTest4.txt) -itk_add_test(NAME itkKdTreeTest5 - COMMAND ITKStatisticsTestDriver --redirectOutput ${TEMP}/itkKdTreeTest5.txt - itkKdTreeTest1 - 1000 1000 2) +itk_add_test( + NAME + itkKdTreeTest5 + COMMAND + ITKStatisticsTestDriver + --redirectOutput + ${TEMP}/itkKdTreeTest5.txt + itkKdTreeTest1 + 1000 + 1000 + 2) set_tests_properties(itkKdTreeTest5 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkKdTreeTest5.txt) -itk_add_test(NAME itkKdTreeTest6 - COMMAND ITKStatisticsTestDriver --redirectOutput ${TEMP}/itkKdTreeTest6.txt - itkKdTreeTest1 - 1000 1000 3) +itk_add_test( + NAME + itkKdTreeTest6 + COMMAND + ITKStatisticsTestDriver + --redirectOutput + ${TEMP}/itkKdTreeTest6.txt + itkKdTreeTest1 + 1000 + 1000 + 3) set_tests_properties(itkKdTreeTest6 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkKdTreeTest6.txt) -itk_add_test(NAME itkKdTreeTest7 - COMMAND ITKStatisticsTestDriver --redirectOutput ${TEMP}/itkKdTreeTest7.txt - itkKdTreeTest1 - 1000 1000 5) +itk_add_test( + NAME + itkKdTreeTest7 + COMMAND + ITKStatisticsTestDriver + --redirectOutput + ${TEMP}/itkKdTreeTest7.txt + itkKdTreeTest1 + 1000 + 1000 + 5) set_tests_properties(itkKdTreeTest7 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkKdTreeTest7.txt) -itk_add_test(NAME itkKdTreeTest8 - COMMAND ITKStatisticsTestDriver --redirectOutput ${TEMP}/itkKdTreeTest8.txt - itkKdTreeTest1 - 1000 1000 10) +itk_add_test( + NAME + itkKdTreeTest8 + COMMAND + ITKStatisticsTestDriver + --redirectOutput + ${TEMP}/itkKdTreeTest8.txt + itkKdTreeTest1 + 1000 + 1000 + 10) set_tests_properties(itkKdTreeTest8 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkKdTreeTest8.txt) -itk_add_test(NAME itkKdTreeTest9 - COMMAND ITKStatisticsTestDriver --redirectOutput ${TEMP}/itkKdTreeTest9.txt - itkKdTreeTest1 - 1000 1000 20) +itk_add_test( + NAME + itkKdTreeTest9 + COMMAND + ITKStatisticsTestDriver + --redirectOutput + ${TEMP}/itkKdTreeTest9.txt + itkKdTreeTest1 + 1000 + 1000 + 20) set_tests_properties(itkKdTreeTest9 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkKdTreeTest9.txt) -itk_add_test(NAME itkKdTreeTest10 - COMMAND ITKStatisticsTestDriver --redirectOutput ${TEMP}/itkKdTreeTest10.txt - itkKdTreeTest1 - 1000 1000 100) +itk_add_test( + NAME + itkKdTreeTest10 + COMMAND + ITKStatisticsTestDriver + --redirectOutput + ${TEMP}/itkKdTreeTest10.txt + itkKdTreeTest1 + 1000 + 1000 + 100) set_tests_properties(itkKdTreeTest10 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkKdTreeTest10.txt) -itk_add_test(NAME itkKdTreeTest11 - COMMAND ITKStatisticsTestDriver --redirectOutput ${TEMP}/itkKdTreeTest11.txt - itkKdTreeTest3 - 1000 100 20 16) +itk_add_test( + NAME + itkKdTreeTest11 + COMMAND + ITKStatisticsTestDriver + --redirectOutput + ${TEMP}/itkKdTreeTest11.txt + itkKdTreeTest3 + 1000 + 100 + 20 + 16) set_tests_properties(itkKdTreeTest11 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkKdTreeTest11.txt) - # # The following tests generate graphical plots of the KdTree organization. # They are very helpful for debugging and verification purposes, but not so @@ -205,218 +326,622 @@ set_tests_properties(itkKdTreeTest11 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/i # below, you must enable BUILD_DOXYGEN and ITK_BUILD_DOCUMENTATION. # if(DOXYGEN_DOT_EXECUTABLE) -itk_add_test(NAME itkKdTreeTest1Plot - COMMAND ${DOXYGEN_DOT_EXECUTABLE} -Tpng -o ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest1_100.png ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest1_100.dot) -set_tests_properties(itkKdTreeTest1Plot PROPERTIES DEPENDS itkKdTreeTest1) -itk_add_test(NAME itkKdTreeTest2Plot - COMMAND ${DOXYGEN_DOT_EXECUTABLE} -Tpng -o ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest2.png ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest2.dot) -set_tests_properties(itkKdTreeTest2Plot PROPERTIES DEPENDS itkKdTreeTest2) -itk_add_test(NAME itkKdTreeTest3Plot - COMMAND ${DOXYGEN_DOT_EXECUTABLE} -Tpng -o ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest3.png ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest3.dot) -set_tests_properties(itkKdTreeTest3Plot PROPERTIES DEPENDS itkKdTreeTest3) + itk_add_test( + NAME + itkKdTreeTest1Plot + COMMAND + ${DOXYGEN_DOT_EXECUTABLE} + -Tpng + -o + ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest1_100.png + ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest1_100.dot) + set_tests_properties(itkKdTreeTest1Plot PROPERTIES DEPENDS itkKdTreeTest1) + itk_add_test( + NAME + itkKdTreeTest2Plot + COMMAND + ${DOXYGEN_DOT_EXECUTABLE} + -Tpng + -o + ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest2.png + ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest2.dot) + set_tests_properties(itkKdTreeTest2Plot PROPERTIES DEPENDS itkKdTreeTest2) + itk_add_test( + NAME + itkKdTreeTest3Plot + COMMAND + ${DOXYGEN_DOT_EXECUTABLE} + -Tpng + -o + ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest3.png + ${ITK_TEST_OUTPUT_DIR}/itkKdTreeTest3.dot) + set_tests_properties(itkKdTreeTest3Plot PROPERTIES DEPENDS itkKdTreeTest3) endif() -itk_add_test(NAME itkKdTreeTestSamplePoints - COMMAND ITKStatisticsTestDriver itkKdTreeTestSamplePoints) -itk_add_test(NAME itkMaximumDecisionRuleTest - COMMAND ITKStatisticsTestDriver itkMaximumDecisionRuleTest) -itk_add_test(NAME itkMinimumDecisionRuleTest - COMMAND ITKStatisticsTestDriver itkMinimumDecisionRuleTest) -itk_add_test(NAME itkMaximumRatioDecisionRuleTest - COMMAND ITKStatisticsTestDriver itkMaximumRatioDecisionRuleTest) -itk_add_test(NAME itkMeanSampleFilterTest - COMMAND ITKStatisticsTestDriver itkMeanSampleFilterTest) -itk_add_test(NAME itkMeanSampleFilterTest2 - COMMAND ITKStatisticsTestDriver itkMeanSampleFilterTest2) -itk_add_test(NAME itkMeanSampleFilterTest3 - COMMAND ITKStatisticsTestDriver itkMeanSampleFilterTest3) -itk_add_test(NAME itkHistogramTest - COMMAND ITKStatisticsTestDriver itkHistogramTest) -itk_add_test(NAME itkHistogramToTextureFeaturesFilterTest - COMMAND ITKStatisticsTestDriver itkHistogramToTextureFeaturesFilterTest) -itk_add_test(NAME itkHistogramToTextureFeaturesFilterNaNTest - COMMAND ITKStatisticsTestDriver itkHistogramToTextureFeaturesFilterNaNTest) -itk_add_test(NAME itkChiSquareDistributionTest - COMMAND ITKStatisticsTestDriver itkChiSquareDistributionTest) -itk_add_test(NAME itkCovarianceSampleFilterTest - COMMAND ITKStatisticsTestDriver itkCovarianceSampleFilterTest) -itk_add_test(NAME itkCovarianceSampleFilterTest2 - COMMAND ITKStatisticsTestDriver itkCovarianceSampleFilterTest2) -itk_add_test(NAME itkCovarianceSampleFilterTest3 - COMMAND ITKStatisticsTestDriver itkCovarianceSampleFilterTest3) -itk_add_test(NAME itkWeightedCentroidKdTreeGeneratorTest1 - COMMAND ITKStatisticsTestDriver itkWeightedCentroidKdTreeGeneratorTest1 - 1000 1000 1) -itk_add_test(NAME itkWeightedCentroidKdTreeGeneratorTest2 - COMMAND ITKStatisticsTestDriver itkWeightedCentroidKdTreeGeneratorTest1 - 1000 1000 2) -itk_add_test(NAME itkWeightedCentroidKdTreeGeneratorTest3 - COMMAND ITKStatisticsTestDriver itkWeightedCentroidKdTreeGeneratorTest1 - 1000 1000 3) -itk_add_test(NAME itkWeightedCentroidKdTreeGeneratorTest4 - COMMAND ITKStatisticsTestDriver itkWeightedCentroidKdTreeGeneratorTest1 - 1000 1000 5) -itk_add_test(NAME itkWeightedCentroidKdTreeGeneratorTest5 - COMMAND ITKStatisticsTestDriver itkWeightedCentroidKdTreeGeneratorTest1 - 1000 1000 10) -itk_add_test(NAME itkWeightedCentroidKdTreeGeneratorTest6 - COMMAND ITKStatisticsTestDriver itkWeightedCentroidKdTreeGeneratorTest1 - 1000 1000 20) -itk_add_test(NAME itkWeightedCentroidKdTreeGeneratorTest7 - COMMAND ITKStatisticsTestDriver itkWeightedCentroidKdTreeGeneratorTest1 - 1000 1000 100) -itk_add_test(NAME itkWeightedCentroidKdTreeGeneratorTest8 - COMMAND ITKStatisticsTestDriver itkWeightedCentroidKdTreeGeneratorTest8 - 1000 1000 1) -itk_add_test(NAME itkWeightedCentroidKdTreeGeneratorTest9 - COMMAND ITKStatisticsTestDriver itkWeightedCentroidKdTreeGeneratorTest9 - 1000 1000 1) -itk_add_test(NAME itkWeightedCovarianceSampleFilterTest - COMMAND ITKStatisticsTestDriver itkWeightedCovarianceSampleFilterTest) -itk_add_test(NAME itkWeightedCovarianceSampleFilterTest2 - COMMAND ITKStatisticsTestDriver itkWeightedCovarianceSampleFilterTest2) -itk_add_test(NAME itkWeightedMeanSampleFilterTest - COMMAND ITKStatisticsTestDriver itkWeightedMeanSampleFilterTest) -itk_add_test(NAME itkDistanceMetricTest - COMMAND ITKStatisticsTestDriver itkDistanceMetricTest) -itk_add_test(NAME itkDistanceMetricTest2 - COMMAND ITKStatisticsTestDriver itkDistanceMetricTest2) -itk_add_test(NAME itkDistanceToCentroidMembershipFunctionTest - COMMAND ITKStatisticsTestDriver itkDistanceToCentroidMembershipFunctionTest) -itk_add_test(NAME itkEuclideanDistanceMetricTest - COMMAND ITKStatisticsTestDriver itkEuclideanDistanceMetricTest) -itk_add_test(NAME itkEuclideanSquareDistanceMetricTest - COMMAND ITKStatisticsTestDriver itkEuclideanSquareDistanceMetricTest) -itk_add_test(NAME itkListSampleTest1 - COMMAND ITKStatisticsTestDriver itkListSampleTest - 1) -itk_add_test(NAME itkListSampleTest2 - COMMAND ITKStatisticsTestDriver itkListSampleTest - 5) -itk_add_test(NAME itkListSampleTest3 - COMMAND ITKStatisticsTestDriver itkListSampleTest - 10) -itk_add_test(NAME itkListSampleTest4 - COMMAND ITKStatisticsTestDriver itkListSampleTest - 100) -itk_add_test(NAME itkImageToListSampleAdaptorTest - COMMAND ITKStatisticsTestDriver itkImageToListSampleAdaptorTest) -itk_add_test(NAME itkImageToListSampleAdaptorTest2 - COMMAND ITKStatisticsTestDriver itkImageToListSampleAdaptorTest2) -itk_add_test(NAME itkImageToListSampleFilterTest - COMMAND ITKStatisticsTestDriver itkImageToListSampleFilterTest) -itk_add_test(NAME itkImageToListSampleFilterTest2 - COMMAND ITKStatisticsTestDriver itkImageToListSampleFilterTest2) -itk_add_test(NAME itkImageToListSampleFilterTest3 - COMMAND ITKStatisticsTestDriver itkImageToListSampleFilterTest3) -itk_add_test(NAME itkJointDomainImageToListSampleAdaptorTest - COMMAND ITKStatisticsTestDriver itkJointDomainImageToListSampleAdaptorTest) -itk_add_test(NAME itkPointSetToListSampleAdaptorTest - COMMAND ITKStatisticsTestDriver itkPointSetToListSampleAdaptorTest) -itk_add_test(NAME itkProbabilityDistributionTest - COMMAND ITKStatisticsTestDriver itkProbabilityDistributionTest) -itk_add_test(NAME itkRandomVariateGeneratorBaseTest - COMMAND ITKStatisticsTestDriver itkRandomVariateGeneratorBaseTest) -itk_add_test(NAME itkMahalanobisDistanceMetricTest - COMMAND ITKStatisticsTestDriver itkMahalanobisDistanceMetricTest) -itk_add_test(NAME itkManhattanDistanceMetricTest - COMMAND ITKStatisticsTestDriver itkManhattanDistanceMetricTest) -itk_add_test(NAME itkMembershipFunctionBaseTest - COMMAND ITKStatisticsTestDriver itkMembershipFunctionBaseTest) -itk_add_test(NAME itkMembershipFunctionBaseTest2 - COMMAND ITKStatisticsTestDriver itkMembershipFunctionBaseTest2) -itk_add_test(NAME itkMembershipSampleTest1 - COMMAND ITKStatisticsTestDriver itkMembershipSampleTest1) -itk_add_test(NAME itkMembershipSampleTest2 - COMMAND ITKStatisticsTestDriver itkMembershipSampleTest2) -itk_add_test(NAME itkMembershipSampleTest3 - COMMAND ITKStatisticsTestDriver itkMembershipSampleTest3) -itk_add_test(NAME itkMembershipSampleTest4 - COMMAND ITKStatisticsTestDriver itkMembershipSampleTest4) -itk_add_test(NAME itkMeasurementVectorTraitsTest - COMMAND ITKStatisticsTestDriver itkMeasurementVectorTraitsTest) -itk_add_test(NAME itkNeighborhoodSamplerTest1 - COMMAND ITKStatisticsTestDriver itkNeighborhoodSamplerTest1) -itk_add_test(NAME itkMixtureModelComponentBaseTest - COMMAND ITKStatisticsTestDriver itkMixtureModelComponentBaseTest) -itk_add_test(NAME itkNormalVariateGeneratorTest1 - COMMAND ITKStatisticsTestDriver itkNormalVariateGeneratorTest1) -itk_add_test(NAME itkSampleTest - COMMAND ITKStatisticsTestDriver itkSampleTest) -itk_add_test(NAME itkSampleTest2 - COMMAND ITKStatisticsTestDriver itkSampleTest2) -itk_add_test(NAME itkSampleTest3 - COMMAND ITKStatisticsTestDriver itkSampleTest3) -itk_add_test(NAME itkSampleTest4 - COMMAND ITKStatisticsTestDriver itkSampleTest4) -itk_add_test(NAME itkSampleToHistogramFilterTest - COMMAND ITKStatisticsTestDriver itkSampleToHistogramFilterTest) -itk_add_test(NAME itkSampleToHistogramFilterTest2 - COMMAND ITKStatisticsTestDriver itkSampleToHistogramFilterTest2) -itk_add_test(NAME itkSampleToHistogramFilterTest3 - COMMAND ITKStatisticsTestDriver itkSampleToHistogramFilterTest3) +itk_add_test( + NAME + itkKdTreeTestSamplePoints + COMMAND + ITKStatisticsTestDriver + itkKdTreeTestSamplePoints) +itk_add_test( + NAME + itkMaximumDecisionRuleTest + COMMAND + ITKStatisticsTestDriver + itkMaximumDecisionRuleTest) +itk_add_test( + NAME + itkMinimumDecisionRuleTest + COMMAND + ITKStatisticsTestDriver + itkMinimumDecisionRuleTest) +itk_add_test( + NAME + itkMaximumRatioDecisionRuleTest + COMMAND + ITKStatisticsTestDriver + itkMaximumRatioDecisionRuleTest) +itk_add_test( + NAME + itkMeanSampleFilterTest + COMMAND + ITKStatisticsTestDriver + itkMeanSampleFilterTest) +itk_add_test( + NAME + itkMeanSampleFilterTest2 + COMMAND + ITKStatisticsTestDriver + itkMeanSampleFilterTest2) +itk_add_test( + NAME + itkMeanSampleFilterTest3 + COMMAND + ITKStatisticsTestDriver + itkMeanSampleFilterTest3) +itk_add_test( + NAME + itkHistogramTest + COMMAND + ITKStatisticsTestDriver + itkHistogramTest) +itk_add_test( + NAME + itkHistogramToTextureFeaturesFilterTest + COMMAND + ITKStatisticsTestDriver + itkHistogramToTextureFeaturesFilterTest) +itk_add_test( + NAME + itkHistogramToTextureFeaturesFilterNaNTest + COMMAND + ITKStatisticsTestDriver + itkHistogramToTextureFeaturesFilterNaNTest) +itk_add_test( + NAME + itkChiSquareDistributionTest + COMMAND + ITKStatisticsTestDriver + itkChiSquareDistributionTest) +itk_add_test( + NAME + itkCovarianceSampleFilterTest + COMMAND + ITKStatisticsTestDriver + itkCovarianceSampleFilterTest) +itk_add_test( + NAME + itkCovarianceSampleFilterTest2 + COMMAND + ITKStatisticsTestDriver + itkCovarianceSampleFilterTest2) +itk_add_test( + NAME + itkCovarianceSampleFilterTest3 + COMMAND + ITKStatisticsTestDriver + itkCovarianceSampleFilterTest3) +itk_add_test( + NAME + itkWeightedCentroidKdTreeGeneratorTest1 + COMMAND + ITKStatisticsTestDriver + itkWeightedCentroidKdTreeGeneratorTest1 + 1000 + 1000 + 1) +itk_add_test( + NAME + itkWeightedCentroidKdTreeGeneratorTest2 + COMMAND + ITKStatisticsTestDriver + itkWeightedCentroidKdTreeGeneratorTest1 + 1000 + 1000 + 2) +itk_add_test( + NAME + itkWeightedCentroidKdTreeGeneratorTest3 + COMMAND + ITKStatisticsTestDriver + itkWeightedCentroidKdTreeGeneratorTest1 + 1000 + 1000 + 3) +itk_add_test( + NAME + itkWeightedCentroidKdTreeGeneratorTest4 + COMMAND + ITKStatisticsTestDriver + itkWeightedCentroidKdTreeGeneratorTest1 + 1000 + 1000 + 5) +itk_add_test( + NAME + itkWeightedCentroidKdTreeGeneratorTest5 + COMMAND + ITKStatisticsTestDriver + itkWeightedCentroidKdTreeGeneratorTest1 + 1000 + 1000 + 10) +itk_add_test( + NAME + itkWeightedCentroidKdTreeGeneratorTest6 + COMMAND + ITKStatisticsTestDriver + itkWeightedCentroidKdTreeGeneratorTest1 + 1000 + 1000 + 20) +itk_add_test( + NAME + itkWeightedCentroidKdTreeGeneratorTest7 + COMMAND + ITKStatisticsTestDriver + itkWeightedCentroidKdTreeGeneratorTest1 + 1000 + 1000 + 100) +itk_add_test( + NAME + itkWeightedCentroidKdTreeGeneratorTest8 + COMMAND + ITKStatisticsTestDriver + itkWeightedCentroidKdTreeGeneratorTest8 + 1000 + 1000 + 1) +itk_add_test( + NAME + itkWeightedCentroidKdTreeGeneratorTest9 + COMMAND + ITKStatisticsTestDriver + itkWeightedCentroidKdTreeGeneratorTest9 + 1000 + 1000 + 1) +itk_add_test( + NAME + itkWeightedCovarianceSampleFilterTest + COMMAND + ITKStatisticsTestDriver + itkWeightedCovarianceSampleFilterTest) +itk_add_test( + NAME + itkWeightedCovarianceSampleFilterTest2 + COMMAND + ITKStatisticsTestDriver + itkWeightedCovarianceSampleFilterTest2) +itk_add_test( + NAME + itkWeightedMeanSampleFilterTest + COMMAND + ITKStatisticsTestDriver + itkWeightedMeanSampleFilterTest) +itk_add_test( + NAME + itkDistanceMetricTest + COMMAND + ITKStatisticsTestDriver + itkDistanceMetricTest) +itk_add_test( + NAME + itkDistanceMetricTest2 + COMMAND + ITKStatisticsTestDriver + itkDistanceMetricTest2) +itk_add_test( + NAME + itkDistanceToCentroidMembershipFunctionTest + COMMAND + ITKStatisticsTestDriver + itkDistanceToCentroidMembershipFunctionTest) +itk_add_test( + NAME + itkEuclideanDistanceMetricTest + COMMAND + ITKStatisticsTestDriver + itkEuclideanDistanceMetricTest) +itk_add_test( + NAME + itkEuclideanSquareDistanceMetricTest + COMMAND + ITKStatisticsTestDriver + itkEuclideanSquareDistanceMetricTest) +itk_add_test( + NAME + itkListSampleTest1 + COMMAND + ITKStatisticsTestDriver + itkListSampleTest + 1) +itk_add_test( + NAME + itkListSampleTest2 + COMMAND + ITKStatisticsTestDriver + itkListSampleTest + 5) +itk_add_test( + NAME + itkListSampleTest3 + COMMAND + ITKStatisticsTestDriver + itkListSampleTest + 10) +itk_add_test( + NAME + itkListSampleTest4 + COMMAND + ITKStatisticsTestDriver + itkListSampleTest + 100) +itk_add_test( + NAME + itkImageToListSampleAdaptorTest + COMMAND + ITKStatisticsTestDriver + itkImageToListSampleAdaptorTest) +itk_add_test( + NAME + itkImageToListSampleAdaptorTest2 + COMMAND + ITKStatisticsTestDriver + itkImageToListSampleAdaptorTest2) +itk_add_test( + NAME + itkImageToListSampleFilterTest + COMMAND + ITKStatisticsTestDriver + itkImageToListSampleFilterTest) +itk_add_test( + NAME + itkImageToListSampleFilterTest2 + COMMAND + ITKStatisticsTestDriver + itkImageToListSampleFilterTest2) +itk_add_test( + NAME + itkImageToListSampleFilterTest3 + COMMAND + ITKStatisticsTestDriver + itkImageToListSampleFilterTest3) +itk_add_test( + NAME + itkJointDomainImageToListSampleAdaptorTest + COMMAND + ITKStatisticsTestDriver + itkJointDomainImageToListSampleAdaptorTest) +itk_add_test( + NAME + itkPointSetToListSampleAdaptorTest + COMMAND + ITKStatisticsTestDriver + itkPointSetToListSampleAdaptorTest) +itk_add_test( + NAME + itkProbabilityDistributionTest + COMMAND + ITKStatisticsTestDriver + itkProbabilityDistributionTest) +itk_add_test( + NAME + itkRandomVariateGeneratorBaseTest + COMMAND + ITKStatisticsTestDriver + itkRandomVariateGeneratorBaseTest) +itk_add_test( + NAME + itkMahalanobisDistanceMetricTest + COMMAND + ITKStatisticsTestDriver + itkMahalanobisDistanceMetricTest) +itk_add_test( + NAME + itkManhattanDistanceMetricTest + COMMAND + ITKStatisticsTestDriver + itkManhattanDistanceMetricTest) +itk_add_test( + NAME + itkMembershipFunctionBaseTest + COMMAND + ITKStatisticsTestDriver + itkMembershipFunctionBaseTest) +itk_add_test( + NAME + itkMembershipFunctionBaseTest2 + COMMAND + ITKStatisticsTestDriver + itkMembershipFunctionBaseTest2) +itk_add_test( + NAME + itkMembershipSampleTest1 + COMMAND + ITKStatisticsTestDriver + itkMembershipSampleTest1) +itk_add_test( + NAME + itkMembershipSampleTest2 + COMMAND + ITKStatisticsTestDriver + itkMembershipSampleTest2) +itk_add_test( + NAME + itkMembershipSampleTest3 + COMMAND + ITKStatisticsTestDriver + itkMembershipSampleTest3) +itk_add_test( + NAME + itkMembershipSampleTest4 + COMMAND + ITKStatisticsTestDriver + itkMembershipSampleTest4) +itk_add_test( + NAME + itkMeasurementVectorTraitsTest + COMMAND + ITKStatisticsTestDriver + itkMeasurementVectorTraitsTest) +itk_add_test( + NAME + itkNeighborhoodSamplerTest1 + COMMAND + ITKStatisticsTestDriver + itkNeighborhoodSamplerTest1) +itk_add_test( + NAME + itkMixtureModelComponentBaseTest + COMMAND + ITKStatisticsTestDriver + itkMixtureModelComponentBaseTest) +itk_add_test( + NAME + itkNormalVariateGeneratorTest1 + COMMAND + ITKStatisticsTestDriver + itkNormalVariateGeneratorTest1) +itk_add_test( + NAME + itkSampleTest + COMMAND + ITKStatisticsTestDriver + itkSampleTest) +itk_add_test( + NAME + itkSampleTest2 + COMMAND + ITKStatisticsTestDriver + itkSampleTest2) +itk_add_test( + NAME + itkSampleTest3 + COMMAND + ITKStatisticsTestDriver + itkSampleTest3) +itk_add_test( + NAME + itkSampleTest4 + COMMAND + ITKStatisticsTestDriver + itkSampleTest4) +itk_add_test( + NAME + itkSampleToHistogramFilterTest + COMMAND + ITKStatisticsTestDriver + itkSampleToHistogramFilterTest) +itk_add_test( + NAME + itkSampleToHistogramFilterTest2 + COMMAND + ITKStatisticsTestDriver + itkSampleToHistogramFilterTest2) +itk_add_test( + NAME + itkSampleToHistogramFilterTest3 + COMMAND + ITKStatisticsTestDriver + itkSampleToHistogramFilterTest3) # There is a bug in VS2008, Release build that causes this test to fail. if(NOT MSVC90) -itk_add_test(NAME itkSampleToHistogramFilterTest4 - COMMAND ITKStatisticsTestDriver itkSampleToHistogramFilterTest4) + itk_add_test( + NAME + itkSampleToHistogramFilterTest4 + COMMAND + ITKStatisticsTestDriver + itkSampleToHistogramFilterTest4) endif() -itk_add_test(NAME itkSampleToHistogramFilterTest5 - COMMAND ITKStatisticsTestDriver itkSampleToHistogramFilterTest5 - DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png}) -itk_add_test(NAME itkSampleToHistogramFilterTest6 - COMMAND ITKStatisticsTestDriver itkSampleToHistogramFilterTest6) -itk_add_test(NAME itkSampleToHistogramFilterTest7 - COMMAND ITKStatisticsTestDriver itkSampleToHistogramFilterTest7) -itk_add_test(NAME itkSampleToSubsampleFilterTest1 - COMMAND ITKStatisticsTestDriver itkSampleToSubsampleFilterTest1) -itk_add_test(NAME itkScalarImageToCooccurrenceListSampleFilterTest - COMMAND ITKStatisticsTestDriver itkScalarImageToCooccurrenceListSampleFilterTest) -itk_add_test(NAME itkScalarImageToCooccurrenceMatrixFilterTest - COMMAND ITKStatisticsTestDriver itkScalarImageToCooccurrenceMatrixFilterTest) -itk_add_test(NAME itkScalarImageToCooccurrenceMatrixFilterTest2 - COMMAND ITKStatisticsTestDriver itkScalarImageToCooccurrenceMatrixFilterTest2) -itk_add_test(NAME itkScalarImageToTextureFeaturesFilterTest - COMMAND ITKStatisticsTestDriver itkScalarImageToTextureFeaturesFilterTest) -itk_add_test(NAME itkScalarImageToRunLengthMatrixFilterTest - COMMAND ITKStatisticsTestDriver itkScalarImageToRunLengthMatrixFilterTest) -itk_add_test(NAME itkScalarImageToRunLengthFeaturesFilterTest - COMMAND ITKStatisticsTestDriver itkScalarImageToRunLengthFeaturesFilterTest) -itk_add_test(NAME itkSparseFrequencyContainer2Test - COMMAND ITKStatisticsTestDriver itkSparseFrequencyContainer2Test) -itk_add_test(NAME itkSpatialNeighborSubsamplerTest - COMMAND ITKStatisticsTestDriver itkSpatialNeighborSubsamplerTest) -itk_add_test(NAME itkStandardDeviationPerComponentSampleFilterTest - COMMAND ITKStatisticsTestDriver itkStandardDeviationPerComponentSampleFilterTest) -itk_add_test(NAME itkStatisticsTypesTest - COMMAND ITKStatisticsTestDriver itkStatisticsTypesTest) -itk_add_test(NAME itkSubsampleTest - COMMAND ITKStatisticsTestDriver itkSubsampleTest) -itk_add_test(NAME itkSubsampleTest2 - COMMAND ITKStatisticsTestDriver itkSubsampleTest2) -itk_add_test(NAME itkSubsampleTest3 - COMMAND ITKStatisticsTestDriver itkSubsampleTest3) -itk_add_test(NAME itkTDistributionTest - COMMAND ITKStatisticsTestDriver itkTDistributionTest) -itk_add_test(NAME itkStatisticsAlgorithmTest - COMMAND ITKStatisticsTestDriver itkStatisticsAlgorithmTest) -itk_add_test(NAME itkStatisticsAlgorithmTest2 - COMMAND ITKStatisticsTestDriver itkStatisticsAlgorithmTest2) -itk_add_test(NAME itkUniformRandomSpatialNeighborSubsamplerTest - COMMAND ITKStatisticsTestDriver - --compare DATA{Baseline/itkUniformRandomSubsamplingTest.mha} - ${ITK_TEST_OUTPUT_DIR}/itkUniformRandomSubsamplingTest.mha - itkUniformRandomSpatialNeighborSubsamplerTest 0 - ${ITK_TEST_OUTPUT_DIR}/itkUniformRandomSubsamplingTest.mha) -itk_add_test(NAME itkVectorContainerToListSampleAdaptorTest - COMMAND ITKStatisticsTestDriver itkVectorContainerToListSampleAdaptorTest) -itk_add_test(NAME itkImageToHistogramFilterTest - COMMAND ITKStatisticsTestDriver itkImageToHistogramFilterTest) -itk_add_test(NAME itkImageToHistogramFilterTest2 - COMMAND ITKStatisticsTestDriver itkImageToHistogramFilterTest2 - DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} ${ITK_TEST_OUTPUT_DIR}/itkImageToHistogramFilterTest2.txt) -itk_add_test(NAME itkImageToHistogramFilterTest2_Auto - COMMAND ITKStatisticsTestDriver itkImageToHistogramFilterTest2 - DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} ${ITK_TEST_OUTPUT_DIR}/itkImageToHistogramFilterTest2.txt 1) -itk_add_test(NAME itkScalarImageToHistogramGeneratorTest - COMMAND ITKStatisticsTestDriver itkScalarImageToHistogramGeneratorTest - DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkScalarImageToHistogramGeneratorTest.txt) +itk_add_test( + NAME + itkSampleToHistogramFilterTest5 + COMMAND + ITKStatisticsTestDriver + itkSampleToHistogramFilterTest5 + DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png}) +itk_add_test( + NAME + itkSampleToHistogramFilterTest6 + COMMAND + ITKStatisticsTestDriver + itkSampleToHistogramFilterTest6) +itk_add_test( + NAME + itkSampleToHistogramFilterTest7 + COMMAND + ITKStatisticsTestDriver + itkSampleToHistogramFilterTest7) +itk_add_test( + NAME + itkSampleToSubsampleFilterTest1 + COMMAND + ITKStatisticsTestDriver + itkSampleToSubsampleFilterTest1) +itk_add_test( + NAME + itkScalarImageToCooccurrenceListSampleFilterTest + COMMAND + ITKStatisticsTestDriver + itkScalarImageToCooccurrenceListSampleFilterTest) +itk_add_test( + NAME + itkScalarImageToCooccurrenceMatrixFilterTest + COMMAND + ITKStatisticsTestDriver + itkScalarImageToCooccurrenceMatrixFilterTest) +itk_add_test( + NAME + itkScalarImageToCooccurrenceMatrixFilterTest2 + COMMAND + ITKStatisticsTestDriver + itkScalarImageToCooccurrenceMatrixFilterTest2) +itk_add_test( + NAME + itkScalarImageToTextureFeaturesFilterTest + COMMAND + ITKStatisticsTestDriver + itkScalarImageToTextureFeaturesFilterTest) +itk_add_test( + NAME + itkScalarImageToRunLengthMatrixFilterTest + COMMAND + ITKStatisticsTestDriver + itkScalarImageToRunLengthMatrixFilterTest) +itk_add_test( + NAME + itkScalarImageToRunLengthFeaturesFilterTest + COMMAND + ITKStatisticsTestDriver + itkScalarImageToRunLengthFeaturesFilterTest) +itk_add_test( + NAME + itkSparseFrequencyContainer2Test + COMMAND + ITKStatisticsTestDriver + itkSparseFrequencyContainer2Test) +itk_add_test( + NAME + itkSpatialNeighborSubsamplerTest + COMMAND + ITKStatisticsTestDriver + itkSpatialNeighborSubsamplerTest) +itk_add_test( + NAME + itkStandardDeviationPerComponentSampleFilterTest + COMMAND + ITKStatisticsTestDriver + itkStandardDeviationPerComponentSampleFilterTest) +itk_add_test( + NAME + itkStatisticsTypesTest + COMMAND + ITKStatisticsTestDriver + itkStatisticsTypesTest) +itk_add_test( + NAME + itkSubsampleTest + COMMAND + ITKStatisticsTestDriver + itkSubsampleTest) +itk_add_test( + NAME + itkSubsampleTest2 + COMMAND + ITKStatisticsTestDriver + itkSubsampleTest2) +itk_add_test( + NAME + itkSubsampleTest3 + COMMAND + ITKStatisticsTestDriver + itkSubsampleTest3) +itk_add_test( + NAME + itkTDistributionTest + COMMAND + ITKStatisticsTestDriver + itkTDistributionTest) +itk_add_test( + NAME + itkStatisticsAlgorithmTest + COMMAND + ITKStatisticsTestDriver + itkStatisticsAlgorithmTest) +itk_add_test( + NAME + itkStatisticsAlgorithmTest2 + COMMAND + ITKStatisticsTestDriver + itkStatisticsAlgorithmTest2) +itk_add_test( + NAME + itkUniformRandomSpatialNeighborSubsamplerTest + COMMAND + ITKStatisticsTestDriver + --compare + DATA{Baseline/itkUniformRandomSubsamplingTest.mha} + ${ITK_TEST_OUTPUT_DIR}/itkUniformRandomSubsamplingTest.mha + itkUniformRandomSpatialNeighborSubsamplerTest + 0 + ${ITK_TEST_OUTPUT_DIR}/itkUniformRandomSubsamplingTest.mha) +itk_add_test( + NAME + itkVectorContainerToListSampleAdaptorTest + COMMAND + ITKStatisticsTestDriver + itkVectorContainerToListSampleAdaptorTest) +itk_add_test( + NAME + itkImageToHistogramFilterTest + COMMAND + ITKStatisticsTestDriver + itkImageToHistogramFilterTest) +itk_add_test( + NAME + itkImageToHistogramFilterTest2 + COMMAND + ITKStatisticsTestDriver + itkImageToHistogramFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} + ${ITK_TEST_OUTPUT_DIR}/itkImageToHistogramFilterTest2.txt) +itk_add_test( + NAME + itkImageToHistogramFilterTest2_Auto + COMMAND + ITKStatisticsTestDriver + itkImageToHistogramFilterTest2 + DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} + ${ITK_TEST_OUTPUT_DIR}/itkImageToHistogramFilterTest2.txt + 1) +itk_add_test( + NAME + itkScalarImageToHistogramGeneratorTest + COMMAND + ITKStatisticsTestDriver + itkScalarImageToHistogramGeneratorTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkScalarImageToHistogramGeneratorTest.txt) diff --git a/Modules/Numerics/Statistics/wrapping/CMakeLists.txt b/Modules/Numerics/Statistics/wrapping/CMakeLists.txt index 37a21e4525b..4f22c0c57cd 100644 --- a/Modules/Numerics/Statistics/wrapping/CMakeLists.txt +++ b/Modules/Numerics/Statistics/wrapping/CMakeLists.txt @@ -1,10 +1,9 @@ itk_wrap_module(ITKStatistics) set(WRAPPER_SUBMODULE_ORDER - itkSample - itkHistogram - itkListSample - itkMembershipFunctionBase - itkKdTree -) + itkSample + itkHistogram + itkListSample + itkMembershipFunctionBase + itkKdTree) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Numerics/Statistics/wrapping/itkDistanceMetric.wrap b/Modules/Numerics/Statistics/wrapping/itkDistanceMetric.wrap index d04d9001775..c551b1f70c2 100644 --- a/Modules/Numerics/Statistics/wrapping/itkDistanceMetric.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkDistanceMetric.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::Statistics::DistanceMetric" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_VF${d}}" "${ITKT_VF${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_VF${d}}" "${ITKT_VF${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkEuclideanDistanceMetric.wrap b/Modules/Numerics/Statistics/wrapping/itkEuclideanDistanceMetric.wrap index 3f1159a296b..0fac93d40ed 100644 --- a/Modules/Numerics/Statistics/wrapping/itkEuclideanDistanceMetric.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkEuclideanDistanceMetric.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::Statistics::EuclideanDistanceMetric" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_VF${d}}" "${ITKT_VF${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_VF${d}}" "${ITKT_VF${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkHistogram.wrap b/Modules/Numerics/Statistics/wrapping/itkHistogram.wrap index 8909882aca0..48bbd589ea2 100644 --- a/Modules/Numerics/Statistics/wrapping/itkHistogram.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkHistogram.wrap @@ -1,10 +1,10 @@ itk_wrap_class("itk::Statistics::Histogram" POINTER) - set(WRAPPER_TEMPLATES "${itk_Wrap_Histogram}") +set(WRAPPER_TEMPLATES "${itk_Wrap_Histogram}") itk_end_wrap_class() # also wrap the decorator in the same file to avoid file collision with the # one in Base itk_wrap_class("itk::SimpleDataObjectDecorator" POINTER) - itk_wrap_template("${ITKM_HF}" "${ITKT_HF} *") - itk_wrap_template("${ITKM_HD}" "${ITKT_HD} *") +itk_wrap_template("${ITKM_HF}" "${ITKT_HF} *") +itk_wrap_template("${ITKM_HD}" "${ITKT_HD} *") itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkHistogramToEntropyImageFilter.wrap b/Modules/Numerics/Statistics/wrapping/itkHistogramToEntropyImageFilter.wrap index f9a7a92e908..10f978c8d91 100644 --- a/Modules/Numerics/Statistics/wrapping/itkHistogramToEntropyImageFilter.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkHistogramToEntropyImageFilter.wrap @@ -1,9 +1,9 @@ itk_wrap_include("itkHistogram.h") itk_wrap_class("itk::HistogramToEntropyImageFilter" POINTER_WITH_SUPERCLASS) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_HF}${ITKM_I${t}${d}}" "${ITKT_HF}, ${ITKT_I${t}${d}}") - itk_wrap_template("${ITKM_HD}${ITKM_I${t}${d}}" "${ITKT_HD}, ${ITKT_I${t}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_HF}${ITKM_I${t}${d}}" "${ITKT_HF}, ${ITKT_I${t}${d}}") + itk_wrap_template("${ITKM_HD}${ITKM_I${t}${d}}" "${ITKT_HD}, ${ITKT_I${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkHistogramToIntensityImageFilter.wrap b/Modules/Numerics/Statistics/wrapping/itkHistogramToIntensityImageFilter.wrap index ee9a1fe66f0..d916dcdf8b4 100644 --- a/Modules/Numerics/Statistics/wrapping/itkHistogramToIntensityImageFilter.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkHistogramToIntensityImageFilter.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::HistogramToIntensityImageFilter" POINTER_WITH_SUPERCLASS) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_HF}${ITKM_I${t}${d}}" "${ITKT_HF}, ${ITKT_I${t}${d}}") - itk_wrap_template("${ITKM_HD}${ITKM_I${t}${d}}" "${ITKT_HD}, ${ITKT_I${t}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_HF}${ITKM_I${t}${d}}" "${ITKT_HF}, ${ITKT_I${t}${d}}") + itk_wrap_template("${ITKM_HD}${ITKM_I${t}${d}}" "${ITKT_HD}, ${ITKT_I${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkHistogramToLogProbabilityImageFilter.wrap b/Modules/Numerics/Statistics/wrapping/itkHistogramToLogProbabilityImageFilter.wrap index a1f75c151b4..fcaa83fab03 100644 --- a/Modules/Numerics/Statistics/wrapping/itkHistogramToLogProbabilityImageFilter.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkHistogramToLogProbabilityImageFilter.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::HistogramToLogProbabilityImageFilter" POINTER_WITH_SUPERCLASS) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_HF}${ITKM_I${t}${d}}" "${ITKT_HF}, ${ITKT_I${t}${d}}") - itk_wrap_template("${ITKM_HD}${ITKM_I${t}${d}}" "${ITKT_HD}, ${ITKT_I${t}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_HF}${ITKM_I${t}${d}}" "${ITKT_HF}, ${ITKT_I${t}${d}}") + itk_wrap_template("${ITKM_HD}${ITKM_I${t}${d}}" "${ITKT_HD}, ${ITKT_I${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkHistogramToProbabilityImageFilter.wrap b/Modules/Numerics/Statistics/wrapping/itkHistogramToProbabilityImageFilter.wrap index e13a259b138..134c0982a44 100644 --- a/Modules/Numerics/Statistics/wrapping/itkHistogramToProbabilityImageFilter.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkHistogramToProbabilityImageFilter.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::HistogramToProbabilityImageFilter" POINTER_WITH_SUPERCLASS) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_HF}${ITKM_I${t}${d}}" "${ITKT_HF}, ${ITKT_I${t}${d}}") - itk_wrap_template("${ITKM_HD}${ITKM_I${t}${d}}" "${ITKT_HD}, ${ITKT_I${t}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_HF}${ITKM_I${t}${d}}" "${ITKT_HF}, ${ITKT_I${t}${d}}") + itk_wrap_template("${ITKM_HD}${ITKM_I${t}${d}}" "${ITKT_HD}, ${ITKT_I${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkHistogramToRunLengthFeaturesFilter.wrap b/Modules/Numerics/Statistics/wrapping/itkHistogramToRunLengthFeaturesFilter.wrap index ee02209c213..81b7da14a16 100644 --- a/Modules/Numerics/Statistics/wrapping/itkHistogramToRunLengthFeaturesFilter.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkHistogramToRunLengthFeaturesFilter.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::Statistics::HistogramToRunLengthFeaturesFilter" POINTER) - itk_wrap_template("${ITKM_HF}" "${ITKT_HF}") - itk_wrap_template("${ITKM_HD}" "${ITKT_HD}") +itk_wrap_template("${ITKM_HF}" "${ITKT_HF}") +itk_wrap_template("${ITKM_HD}" "${ITKT_HD}") itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) diff --git a/Modules/Numerics/Statistics/wrapping/itkHistogramToTextureFeaturesFilter.wrap b/Modules/Numerics/Statistics/wrapping/itkHistogramToTextureFeaturesFilter.wrap index 7102a401b6a..7195dea18f3 100644 --- a/Modules/Numerics/Statistics/wrapping/itkHistogramToTextureFeaturesFilter.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkHistogramToTextureFeaturesFilter.wrap @@ -1,6 +1,6 @@ -itk_wrap_class("itk::Statistics::HistogramToTextureFeaturesFilter" POINTER) - itk_wrap_template("${ITKM_HD}" "${ITKT_HD}") - itk_wrap_template("${ITKM_HF}" "${ITKT_HF}") +itk_wrap_class("itk::Statistics::HistogramToTextureFeaturesFilter" POINTER) +itk_wrap_template("${ITKM_HD}" "${ITKT_HD}") +itk_wrap_template("${ITKM_HF}" "${ITKT_HF}") itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) diff --git a/Modules/Numerics/Statistics/wrapping/itkImageToHistogramFilter.wrap b/Modules/Numerics/Statistics/wrapping/itkImageToHistogramFilter.wrap index 2f4e3a54545..bcea4a2dc31 100644 --- a/Modules/Numerics/Statistics/wrapping/itkImageToHistogramFilter.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkImageToHistogramFilter.wrap @@ -1,10 +1,10 @@ itk_wrap_class("itk::Statistics::ImageToHistogramFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) +itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 1) - # VectorImage types - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}}") - endforeach() +# VectorImage types +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_VI${t}${d}}" "${ITKT_VI${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkKdTree.wrap b/Modules/Numerics/Statistics/wrapping/itkKdTree.wrap index 95b7470e39f..a05c7d45780 100644 --- a/Modules/Numerics/Statistics/wrapping/itkKdTree.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkKdTree.wrap @@ -1,14 +1,14 @@ itk_wrap_include("itkListSample.h") itk_wrap_class("itk::Statistics::KdTree" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("LS${ITKM_VF${d}}" "itk::Statistics::ListSample< ${ITKT_VF${d}} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("LS${ITKM_VF${d}}" "itk::Statistics::ListSample< ${ITKT_VF${d}} >") +endforeach() itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_class("itk::Statistics::KdTreeNode") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("LS${ITKM_VF${d}}" "itk::Statistics::ListSample< ${ITKT_VF${d}} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("LS${ITKM_VF${d}}" "itk::Statistics::ListSample< ${ITKT_VF${d}} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkKdTreeBasedKmeansEstimator.wrap b/Modules/Numerics/Statistics/wrapping/itkKdTreeBasedKmeansEstimator.wrap index fe632a0969a..8e55c0446e4 100644 --- a/Modules/Numerics/Statistics/wrapping/itkKdTreeBasedKmeansEstimator.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkKdTreeBasedKmeansEstimator.wrap @@ -2,7 +2,7 @@ itk_wrap_include("itkListSample.h") itk_wrap_include("itkKdTree.h") itk_wrap_class("itk::Statistics::KdTreeBasedKmeansEstimator" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("KdTreeLS${ITKM_VF${d}}" "itk::Statistics::KdTree< itk::Statistics::ListSample< ${ITKT_VF${d}} > >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("KdTreeLS${ITKM_VF${d}}" "itk::Statistics::KdTree< itk::Statistics::ListSample< ${ITKT_VF${d}} > >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkKdTreeGenerator.wrap b/Modules/Numerics/Statistics/wrapping/itkKdTreeGenerator.wrap index affa1abc36e..3ab266f21d3 100644 --- a/Modules/Numerics/Statistics/wrapping/itkKdTreeGenerator.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkKdTreeGenerator.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkListSample.h") itk_wrap_class("itk::Statistics::KdTreeGenerator" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("LS${ITKM_VF${d}}" "itk::Statistics::ListSample< ${ITKT_VF${d}} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("LS${ITKM_VF${d}}" "itk::Statistics::ListSample< ${ITKT_VF${d}} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkListSample.wrap b/Modules/Numerics/Statistics/wrapping/itkListSample.wrap index 30101695481..d108756e4c2 100644 --- a/Modules/Numerics/Statistics/wrapping/itkListSample.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkListSample.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::Statistics::ListSample" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_VF${d}}" "${ITKT_VF${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_VF${d}}" "${ITKT_VF${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkMaskedImageToHistogramFilter.wrap b/Modules/Numerics/Statistics/wrapping/itkMaskedImageToHistogramFilter.wrap index 99c72faccd1..f4dcf1d31bc 100644 --- a/Modules/Numerics/Statistics/wrapping/itkMaskedImageToHistogramFilter.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkMaskedImageToHistogramFilter.wrap @@ -1,12 +1,12 @@ itk_wrap_class("itk::Statistics::MaskedImageToHistogramFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_ALL_TYPES}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_ALL_TYPES}" "${WRAP_ITK_INT}") - # VectorImage types - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - foreach(t2 ${WRAP_ITK_SCALAR}) - itk_wrap_template("${ITKM_VI${t}${d}}${ITKM_I${t2}${d}}" "${ITKT_VI${t}${d}}, ${ITKT_I${t2}${d}}") - endforeach() +# VectorImage types +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + foreach(t2 ${WRAP_ITK_SCALAR}) + itk_wrap_template("${ITKM_VI${t}${d}}${ITKM_I${t2}${d}}" "${ITKT_VI${t}${d}}, ${ITKT_I${t2}${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkMembershipFunctionBase.wrap b/Modules/Numerics/Statistics/wrapping/itkMembershipFunctionBase.wrap index a24ca8bbf2e..8628f54e157 100644 --- a/Modules/Numerics/Statistics/wrapping/itkMembershipFunctionBase.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkMembershipFunctionBase.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::Statistics::MembershipFunctionBase" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_VF${d}}" "${ITKT_VF${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_VF${d}}" "${ITKT_VF${d}}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkNormalVariateGenerator.wrap b/Modules/Numerics/Statistics/wrapping/itkNormalVariateGenerator.wrap index c8d1e9242d5..ce0fe4b10fd 100644 --- a/Modules/Numerics/Statistics/wrapping/itkNormalVariateGenerator.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkNormalVariateGenerator.wrap @@ -1 +1 @@ -itk_wrap_simple_class("itk::Statistics::NormalVariateGenerator" POINTER) +itk_wrap_simple_class("itk::Statistics::NormalVariateGenerator" POINTER) diff --git a/Modules/Numerics/Statistics/wrapping/itkSample.wrap b/Modules/Numerics/Statistics/wrapping/itkSample.wrap index a420ce7f7d5..7d70c94b2ce 100644 --- a/Modules/Numerics/Statistics/wrapping/itkSample.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkSample.wrap @@ -1,18 +1,18 @@ itk_wrap_class("itk::Statistics::Sample" POINTER) - UNIQUE(dims "1;2;${ITK_WRAP_IMAGE_DIMS}") - foreach(d ${dims}) - itk_wrap_template("${ITKM_FAD${d}}" "${ITKT_FAD${d}}") - itk_wrap_template("${ITKM_FAF${d}}" "${ITKT_FAF${d}}") - itk_wrap_template("${ITKM_FAUL${d}}" "${ITKT_FAUL${d}}") - itk_wrap_template("${ITKM_FAUS${d}}" "${ITKT_FAUS${d}}") - itk_wrap_template("${ITKM_FAUC${d}}" "${ITKT_FAUC${d}}") - itk_wrap_template("${ITKM_FASL${d}}" "${ITKT_FASL${d}}") - itk_wrap_template("${ITKM_FASS${d}}" "${ITKT_FASS${d}}") - itk_wrap_template("${ITKM_FASC${d}}" "${ITKT_FASC${d}}") - endforeach() - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_VF${d}}" "${ITKT_VF${d}}") - endforeach() - itk_wrap_template("${ITKM_AF}" "${ITKT_AF}") - itk_wrap_template("${ITKM_AD}" "${ITKT_AD}") +unique(dims "1;2;${ITK_WRAP_IMAGE_DIMS}") +foreach(d ${dims}) + itk_wrap_template("${ITKM_FAD${d}}" "${ITKT_FAD${d}}") + itk_wrap_template("${ITKM_FAF${d}}" "${ITKT_FAF${d}}") + itk_wrap_template("${ITKM_FAUL${d}}" "${ITKT_FAUL${d}}") + itk_wrap_template("${ITKM_FAUS${d}}" "${ITKT_FAUS${d}}") + itk_wrap_template("${ITKM_FAUC${d}}" "${ITKT_FAUC${d}}") + itk_wrap_template("${ITKM_FASL${d}}" "${ITKT_FASL${d}}") + itk_wrap_template("${ITKM_FASS${d}}" "${ITKT_FASS${d}}") + itk_wrap_template("${ITKM_FASC${d}}" "${ITKT_FASC${d}}") +endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_VF${d}}" "${ITKT_VF${d}}") +endforeach() +itk_wrap_template("${ITKM_AF}" "${ITKT_AF}") +itk_wrap_template("${ITKM_AD}" "${ITKT_AD}") itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkScalarImageToCooccurrenceMatrixFilter.wrap b/Modules/Numerics/Statistics/wrapping/itkScalarImageToCooccurrenceMatrixFilter.wrap index 8c6f3034fd9..461e4ea0160 100644 --- a/Modules/Numerics/Statistics/wrapping/itkScalarImageToCooccurrenceMatrixFilter.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkScalarImageToCooccurrenceMatrixFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::Statistics::ScalarImageToCooccurrenceMatrixFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkScalarImageToHistogramGenerator.wrap b/Modules/Numerics/Statistics/wrapping/itkScalarImageToHistogramGenerator.wrap index fb7e3c73510..bcf7f4df4fd 100644 --- a/Modules/Numerics/Statistics/wrapping/itkScalarImageToHistogramGenerator.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkScalarImageToHistogramGenerator.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::Statistics::ScalarImageToHistogramGenerator" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkScalarImageToRunLengthFeaturesFilter.wrap b/Modules/Numerics/Statistics/wrapping/itkScalarImageToRunLengthFeaturesFilter.wrap index 7e7524d4e07..dcd02747228 100644 --- a/Modules/Numerics/Statistics/wrapping/itkScalarImageToRunLengthFeaturesFilter.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkScalarImageToRunLengthFeaturesFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::Statistics::ScalarImageToRunLengthFeaturesFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkScalarImageToRunLengthMatrixFilter.wrap b/Modules/Numerics/Statistics/wrapping/itkScalarImageToRunLengthMatrixFilter.wrap index 4eab1cd312b..ccf3dee74f5 100644 --- a/Modules/Numerics/Statistics/wrapping/itkScalarImageToRunLengthMatrixFilter.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkScalarImageToRunLengthMatrixFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::Statistics::ScalarImageToRunLengthMatrixFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkScalarImageToTextureFeaturesFilter.wrap b/Modules/Numerics/Statistics/wrapping/itkScalarImageToTextureFeaturesFilter.wrap index 6e0ff37eed9..db1bfc0bc50 100644 --- a/Modules/Numerics/Statistics/wrapping/itkScalarImageToTextureFeaturesFilter.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkScalarImageToTextureFeaturesFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::Statistics::ScalarImageToTextureFeaturesFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/itkWeightedCentroidKdTreeGenerator.wrap b/Modules/Numerics/Statistics/wrapping/itkWeightedCentroidKdTreeGenerator.wrap index ac28c73afca..44a2463983b 100644 --- a/Modules/Numerics/Statistics/wrapping/itkWeightedCentroidKdTreeGenerator.wrap +++ b/Modules/Numerics/Statistics/wrapping/itkWeightedCentroidKdTreeGenerator.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkListSample.h") itk_wrap_class("itk::Statistics::WeightedCentroidKdTreeGenerator" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("LS${ITKM_VF${d}}" "itk::Statistics::ListSample< ${ITKT_VF${d}} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("LS${ITKM_VF${d}}" "itk::Statistics::ListSample< ${ITKT_VF${d}} >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Numerics/Statistics/wrapping/test/CMakeLists.txt b/Modules/Numerics/Statistics/wrapping/test/CMakeLists.txt index 1c2fcef0bef..c9ca3bc2fea 100644 --- a/Modules/Numerics/Statistics/wrapping/test/CMakeLists.txt +++ b/Modules/Numerics/Statistics/wrapping/test/CMakeLists.txt @@ -1,4 +1,7 @@ if(ITK_WRAP_PYTHON) - itk_python_expression_add_test(NAME itkNormalVariateGeneratorPythonTest - EXPRESSION "itkNormalVariateGenerator = itk.NormalVariateGenerator.New()") + itk_python_expression_add_test( + NAME + itkNormalVariateGeneratorPythonTest + EXPRESSION + "itkNormalVariateGenerator = itk.NormalVariateGenerator.New()") endif() diff --git a/Modules/Registration/Common/itk-module.cmake b/Modules/Registration/Common/itk-module.cmake index 40d7de5c9bc..54059821af4 100644 --- a/Modules/Registration/Common/itk-module.cmake +++ b/Modules/Registration/Common/itk-module.cmake @@ -1,4 +1,5 @@ -set(DOCUMENTATION "This module contains classes to perform registration within +set(DOCUMENTATION + "This module contains classes to perform registration within the default ITK registration framework. A moving image is registered against a fixed image by optimizing the parameters of a transform. This module contains metrics to compare the fixed and moving image and classes to coordinate the @@ -11,38 +12,37 @@ compare the moving image to the fixed image with the image metric, an interpolator is required-- these can be found in \\\\ref ITKImageFunction.") if(BUILD_EXAMPLES) -set(EXAMPLE_TEST_CASE_DEPENDANCIES - ITKImageCompare - ITKIOTransformBase - ITKIOImageBase - ITKPDEDeformableRegistration - ITKFFT -) + set(EXAMPLE_TEST_CASE_DEPENDANCIES + ITKImageCompare + ITKIOTransformBase + ITKIOImageBase + ITKPDEDeformableRegistration + ITKFFT) endif() -itk_module(ITKRegistrationCommon +itk_module( + ITKRegistrationCommon DEPENDS - ITKOptimizers - ITKImageIntensity - ITKImageFunction - ITKImageGrid - ITKSpatialObjects - ITKSmoothing - ITKImageGradient - ITKImageFeature - ITKFiniteDifference - ITKDisplacementField - ITKStatistics + ITKOptimizers + ITKImageIntensity + ITKImageFunction + ITKImageGrid + ITKSpatialObjects + ITKSmoothing + ITKImageGradient + ITKImageFeature + ITKFiniteDifference + ITKDisplacementField + ITKStatistics TEST_DEPENDS - ITKTestKernel - ITKDistanceMap - ITKImageSources - ITKColormap - ITKQuadEdgeMesh - ${EXAMPLE_TEST_CASE_DEPENDANCIES} + ITKTestKernel + ITKDistanceMap + ITKImageSources + ITKColormap + ITKQuadEdgeMesh + ${EXAMPLE_TEST_CASE_DEPENDANCIES} DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") # Extra test dependency on ITKDistanceMap is introduced by itkPointSetToPointSetRegistrationTest. # Dependency on ITKStatistics is introduced by itkPointsLocator. diff --git a/Modules/Registration/Common/test/CMakeLists.txt b/Modules/Registration/Common/test/CMakeLists.txt index f890e94a192..eef6aeded32 100644 --- a/Modules/Registration/Common/test/CMakeLists.txt +++ b/Modules/Registration/Common/test/CMakeLists.txt @@ -1,240 +1,510 @@ itk_module_test() set(ITKRegistrationCommonTests -itkBSplineTransformParametersAdaptorTest.cxx -itkDisplacementFieldTransformParametersAdaptorTest.cxx -itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest.cxx -itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest.cxx -itkBSplineExponentialDiffeomorphicTransformParametersAdaptorTest.cxx -itkGaussianExponentialDiffeomorphicTransformParametersAdaptorTest.cxx -itkCenteredTransformInitializerTest.cxx -itkCenteredVersorTransformInitializerTest.cxx -itkMultiResolutionImageRegistrationMethodTest_1.cxx -itkMultiResolutionImageRegistrationMethodTest_2.cxx -itkImageRegistrationMethodTest_10.cxx -itkImageRegistrationMethodTest_11.cxx -itkImageRegistrationMethodTest_12.cxx -itkImageRegistrationMethodTest_13.cxx -itkImageRegistrationMethodTest_14.cxx -itkImageRegistrationMethodTest_15.cxx -itkImageRegistrationMethodTest_16.cxx -itkMeanSquaresPointSetToImageMetricTest.cxx -itkGradientDifferenceImageToImageMetricTest.cxx -itkHistogramImageToImageMetricTest.cxx -itkMutualInformationHistogramImageToImageMetricTest.cxx -itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx -itkMultiResolutionImageRegistrationMethodTest.cxx -itkCompareHistogramImageToImageMetricTest.cxx -itkMeanSquaresHistogramImageToImageMetricTest.cxx -itkImageRegistrationMethodTest.cxx -itkCorrelationCoefficientHistogramImageToImageMetricTest.cxx -itkNormalizedCorrelationPointSetToImageMetricTest.cxx -itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx -itkNormalizedMutualInformationHistogramImageToImageMetricTest.cxx -itkPointSetToSpatialObjectDemonsRegistrationTest.cxx -itkPointSetToImageRegistrationTest.cxx -itkPointsLocatorTest.cxx -itkKappaStatisticImageToImageMetricTest.cxx -itkMattesMutualInformationImageToImageMetricTest.cxx -itkMatchCardinalityImageToImageMetricTest.cxx -itkMultiResolutionPyramidImageFilterTest.cxx -itkImageRegistrationMethodTest_1.cxx -itkImageRegistrationMethodTest_2.cxx -itkImageRegistrationMethodTest_3.cxx -itkImageRegistrationMethodTest_4.cxx -itkImageRegistrationMethodTest_5.cxx -itkImageRegistrationMethodTest_6.cxx -itkImageRegistrationMethodTest_7.cxx -itkImageRegistrationMethodTest_8.cxx -itkImageRegistrationMethodTest_9.cxx -itkRecursiveMultiResolutionPyramidImageFilterTest.cxx -itkNormalizedCorrelationImageMetricTest.cxx -itkMeanReciprocalSquareDifferenceImageMetricTest.cxx -itkMeanSquaresImageMetricTest.cxx -itkMutualInformationMetricTest.cxx -itkPointSetToPointSetRegistrationTest.cxx -itkImageToSpatialObjectRegistrationTest.cxx -itkBlockMatchingImageFilterTest.cxx -itkLandmarkBasedTransformInitializerTest.cxx -itkImageRegistrationMethodTest_17.cxx -itkEuclideanDistancePointMetricTest.cxx -) + itkBSplineTransformParametersAdaptorTest.cxx + itkDisplacementFieldTransformParametersAdaptorTest.cxx + itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest.cxx + itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest.cxx + itkBSplineExponentialDiffeomorphicTransformParametersAdaptorTest.cxx + itkGaussianExponentialDiffeomorphicTransformParametersAdaptorTest.cxx + itkCenteredTransformInitializerTest.cxx + itkCenteredVersorTransformInitializerTest.cxx + itkMultiResolutionImageRegistrationMethodTest_1.cxx + itkMultiResolutionImageRegistrationMethodTest_2.cxx + itkImageRegistrationMethodTest_10.cxx + itkImageRegistrationMethodTest_11.cxx + itkImageRegistrationMethodTest_12.cxx + itkImageRegistrationMethodTest_13.cxx + itkImageRegistrationMethodTest_14.cxx + itkImageRegistrationMethodTest_15.cxx + itkImageRegistrationMethodTest_16.cxx + itkMeanSquaresPointSetToImageMetricTest.cxx + itkGradientDifferenceImageToImageMetricTest.cxx + itkHistogramImageToImageMetricTest.cxx + itkMutualInformationHistogramImageToImageMetricTest.cxx + itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx + itkMultiResolutionImageRegistrationMethodTest.cxx + itkCompareHistogramImageToImageMetricTest.cxx + itkMeanSquaresHistogramImageToImageMetricTest.cxx + itkImageRegistrationMethodTest.cxx + itkCorrelationCoefficientHistogramImageToImageMetricTest.cxx + itkNormalizedCorrelationPointSetToImageMetricTest.cxx + itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx + itkNormalizedMutualInformationHistogramImageToImageMetricTest.cxx + itkPointSetToSpatialObjectDemonsRegistrationTest.cxx + itkPointSetToImageRegistrationTest.cxx + itkPointsLocatorTest.cxx + itkKappaStatisticImageToImageMetricTest.cxx + itkMattesMutualInformationImageToImageMetricTest.cxx + itkMatchCardinalityImageToImageMetricTest.cxx + itkMultiResolutionPyramidImageFilterTest.cxx + itkImageRegistrationMethodTest_1.cxx + itkImageRegistrationMethodTest_2.cxx + itkImageRegistrationMethodTest_3.cxx + itkImageRegistrationMethodTest_4.cxx + itkImageRegistrationMethodTest_5.cxx + itkImageRegistrationMethodTest_6.cxx + itkImageRegistrationMethodTest_7.cxx + itkImageRegistrationMethodTest_8.cxx + itkImageRegistrationMethodTest_9.cxx + itkRecursiveMultiResolutionPyramidImageFilterTest.cxx + itkNormalizedCorrelationImageMetricTest.cxx + itkMeanReciprocalSquareDifferenceImageMetricTest.cxx + itkMeanSquaresImageMetricTest.cxx + itkMutualInformationMetricTest.cxx + itkPointSetToPointSetRegistrationTest.cxx + itkImageToSpatialObjectRegistrationTest.cxx + itkBlockMatchingImageFilterTest.cxx + itkLandmarkBasedTransformInitializerTest.cxx + itkImageRegistrationMethodTest_17.cxx + itkEuclideanDistancePointMetricTest.cxx) -CreateTestDriver(ITKRegistrationCommon "${ITKRegistrationCommon-Test_LIBRARIES}" "${ITKRegistrationCommonTests}") +createtestdriver(ITKRegistrationCommon "${ITKRegistrationCommon-Test_LIBRARIES}" "${ITKRegistrationCommonTests}") set(TEMP ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkBSplineTransformParametersAdaptorTest - COMMAND ITKRegistrationCommonTestDriver itkBSplineTransformParametersAdaptorTest) -itk_add_test(NAME itkDisplacementFieldTransformParametersAdaptorTest - COMMAND ITKRegistrationCommonTestDriver itkDisplacementFieldTransformParametersAdaptorTest) -itk_add_test(NAME itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest - COMMAND ITKRegistrationCommonTestDriver itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest) -itk_add_test(NAME itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest - COMMAND ITKRegistrationCommonTestDriver itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest) -itk_add_test(NAME itkBSplineExponentialDiffeomorphicTransformParametersAdaptorTest - COMMAND ITKRegistrationCommonTestDriver itkBSplineExponentialDiffeomorphicTransformParametersAdaptorTest) -itk_add_test(NAME itkGaussianExponentialDiffeomorphicTransformParametersAdaptorTest - COMMAND ITKRegistrationCommonTestDriver itkGaussianExponentialDiffeomorphicTransformParametersAdaptorTest) -itk_add_test(NAME itkCenteredTransformInitializerTest - COMMAND ITKRegistrationCommonTestDriver itkCenteredTransformInitializerTest) -itk_add_test(NAME itkCenteredVersorTransformInitializerTest - COMMAND ITKRegistrationCommonTestDriver itkCenteredVersorTransformInitializerTest) -itk_add_test(NAME itkMultiResolutionImageRegistrationMethodTest_1 - COMMAND ITKRegistrationCommonTestDriver itkMultiResolutionImageRegistrationMethodTest_1) -itk_add_test(NAME itkMultiResolutionImageRegistrationMethodTest_2 - COMMAND ITKRegistrationCommonTestDriver itkMultiResolutionImageRegistrationMethodTest_2) -itk_add_test(NAME itkImageRegistrationMethodTest_10 - COMMAND ITKRegistrationCommonTestDriver itkImageRegistrationMethodTest_10) -itk_add_test(NAME itkImageRegistrationMethodTest_11 - COMMAND ITKRegistrationCommonTestDriver itkImageRegistrationMethodTest_11) -itk_add_test(NAME itkImageRegistrationMethodTest_12 - COMMAND ITKRegistrationCommonTestDriver itkImageRegistrationMethodTest_12) -itk_add_test(NAME itkImageRegistrationMethodTest_13 - COMMAND ITKRegistrationCommonTestDriver itkImageRegistrationMethodTest_13) +itk_add_test( + NAME + itkBSplineTransformParametersAdaptorTest + COMMAND + ITKRegistrationCommonTestDriver + itkBSplineTransformParametersAdaptorTest) +itk_add_test( + NAME + itkDisplacementFieldTransformParametersAdaptorTest + COMMAND + ITKRegistrationCommonTestDriver + itkDisplacementFieldTransformParametersAdaptorTest) +itk_add_test( + NAME + itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest + COMMAND + ITKRegistrationCommonTestDriver + itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest) +itk_add_test( + NAME + itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest + COMMAND + ITKRegistrationCommonTestDriver + itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptorTest) +itk_add_test( + NAME + itkBSplineExponentialDiffeomorphicTransformParametersAdaptorTest + COMMAND + ITKRegistrationCommonTestDriver + itkBSplineExponentialDiffeomorphicTransformParametersAdaptorTest) +itk_add_test( + NAME + itkGaussianExponentialDiffeomorphicTransformParametersAdaptorTest + COMMAND + ITKRegistrationCommonTestDriver + itkGaussianExponentialDiffeomorphicTransformParametersAdaptorTest) +itk_add_test( + NAME + itkCenteredTransformInitializerTest + COMMAND + ITKRegistrationCommonTestDriver + itkCenteredTransformInitializerTest) +itk_add_test( + NAME + itkCenteredVersorTransformInitializerTest + COMMAND + ITKRegistrationCommonTestDriver + itkCenteredVersorTransformInitializerTest) +itk_add_test( + NAME + itkMultiResolutionImageRegistrationMethodTest_1 + COMMAND + ITKRegistrationCommonTestDriver + itkMultiResolutionImageRegistrationMethodTest_1) +itk_add_test( + NAME + itkMultiResolutionImageRegistrationMethodTest_2 + COMMAND + ITKRegistrationCommonTestDriver + itkMultiResolutionImageRegistrationMethodTest_2) +itk_add_test( + NAME + itkImageRegistrationMethodTest_10 + COMMAND + ITKRegistrationCommonTestDriver + itkImageRegistrationMethodTest_10) +itk_add_test( + NAME + itkImageRegistrationMethodTest_11 + COMMAND + ITKRegistrationCommonTestDriver + itkImageRegistrationMethodTest_11) +itk_add_test( + NAME + itkImageRegistrationMethodTest_12 + COMMAND + ITKRegistrationCommonTestDriver + itkImageRegistrationMethodTest_12) +itk_add_test( + NAME + itkImageRegistrationMethodTest_13 + COMMAND + ITKRegistrationCommonTestDriver + itkImageRegistrationMethodTest_13) #Temporarily output full results for debugging of experimental builds #itk_add_test(NAME itkImageRegistrationMethodTest_14 # COMMAND ITKRegistrationCommonTestDriver --redirectOutput ${TEMP}/#itkImageRegistrationMethodTest_14.txt # itkImageRegistrationMethodTest_14) #set_tests_properties(itkImageRegistrationMethodTest_14 PROPERTIES #ATTACHED_FILES_ON_FAIL ${TEMP}/itkImageRegistrationMethodTest_14.txt) -itk_add_test(NAME itkImageRegistrationMethodTest_14 - COMMAND ITKRegistrationCommonTestDriver --full-output - itkImageRegistrationMethodTest_14) +itk_add_test( + NAME + itkImageRegistrationMethodTest_14 + COMMAND + ITKRegistrationCommonTestDriver + --full-output + itkImageRegistrationMethodTest_14) +itk_add_test( + NAME + itkImageRegistrationMethodTest_15 + COMMAND + ITKRegistrationCommonTestDriver + itkImageRegistrationMethodTest_15) -itk_add_test(NAME itkImageRegistrationMethodTest_15 - COMMAND ITKRegistrationCommonTestDriver itkImageRegistrationMethodTest_15) +itk_add_test( + NAME + itkImageRegistrationMethodTest_16 + COMMAND + ITKRegistrationCommonTestDriver + --redirectOutput + ${TEMP}/itkImageRegistrationMethodTest_16.txt + itkImageRegistrationMethodTest_16) +set_tests_properties(itkImageRegistrationMethodTest_16 PROPERTIES ATTACHED_FILES_ON_FAIL + ${TEMP}/itkImageRegistrationMethodTest_16.txt) -itk_add_test(NAME itkImageRegistrationMethodTest_16 - COMMAND ITKRegistrationCommonTestDriver --redirectOutput ${TEMP}/itkImageRegistrationMethodTest_16.txt - itkImageRegistrationMethodTest_16) -set_tests_properties(itkImageRegistrationMethodTest_16 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkImageRegistrationMethodTest_16.txt) +itk_add_test( + NAME + itkMeanSquaresPointSetToImageMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkMeanSquaresPointSetToImageMetricTest) +itk_add_test( + NAME + itkGradientDifferenceImageToImageMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkGradientDifferenceImageToImageMetricTest) +itk_add_test( + NAME + itkHistogramImageToImageMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkHistogramImageToImageMetricTest) +itk_add_test( + NAME + itkMutualInformationHistogramImageToImageMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkMutualInformationHistogramImageToImageMetricTest) +itk_add_test( + NAME + itkMeanReciprocalSquareDifferencePointSetToImageMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkMeanReciprocalSquareDifferencePointSetToImageMetricTest) +itk_add_test( + NAME + itkMultiResolutionImageRegistrationMethodTest + COMMAND + ITKRegistrationCommonTestDriver + itkMultiResolutionImageRegistrationMethodTest) +itk_add_test( + NAME + itkCompareHistogramImageToImageMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkCompareHistogramImageToImageMetricTest) +itk_add_test( + NAME + itkMeanSquaresHistogramImageToImageMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkMeanSquaresHistogramImageToImageMetricTest) +itk_add_test( + NAME + itkImageRegistrationMethodTest + COMMAND + ITKRegistrationCommonTestDriver + itkImageRegistrationMethodTest) +itk_add_test( + NAME + itkCorrelationCoefficientHistogramImageToImageMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkCorrelationCoefficientHistogramImageToImageMetricTest) +itk_add_test( + NAME + itkNormalizedCorrelationPointSetToImageMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkNormalizedCorrelationPointSetToImageMetricTest) +itk_add_test( + NAME + itkKullbackLeiblerCompareHistogramImageToImageMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkKullbackLeiblerCompareHistogramImageToImageMetricTest) +itk_add_test( + NAME + itkNormalizedMutualInformationHistogramImageToImageMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkNormalizedMutualInformationHistogramImageToImageMetricTest) +itk_add_test( + NAME + itkPointSetToSpatialObjectDemonsRegistrationTest + COMMAND + ITKRegistrationCommonTestDriver + itkPointSetToSpatialObjectDemonsRegistrationTest) +itk_add_test( + NAME + itkPointSetToImageRegistrationTest + COMMAND + ITKRegistrationCommonTestDriver + itkPointSetToImageRegistrationTest) +itk_add_test( + NAME + itkPointsLocatorTest + COMMAND + ITKRegistrationCommonTestDriver + itkPointsLocatorTest) +itk_add_test( + NAME + itkKappaStatisticImageToImageMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkKappaStatisticImageToImageMetricTest + DATA{${ITK_DATA_ROOT}/Input/Spots.png}) +itk_add_test( + NAME + itkMattesMutualInformationImageToImageMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkMattesMutualInformationImageToImageMetricTest + 1 + 1) +itk_add_test( + NAME + itkMattesMutualInformationImageToImageMetricTest2 + COMMAND + ITKRegistrationCommonTestDriver + itkMattesMutualInformationImageToImageMetricTest + 1 + 0) +itk_add_test( + NAME + itkMattesMutualInformationImageToImageMetricTest3 + COMMAND + ITKRegistrationCommonTestDriver + itkMattesMutualInformationImageToImageMetricTest + 0 + 1) +itk_add_test( + NAME + itkMattesMutualInformationImageToImageMetricTest4 + COMMAND + ITKRegistrationCommonTestDriver + itkMattesMutualInformationImageToImageMetricTest + 0 + 0) +itk_add_test( + NAME + itkMatchCardinalityImageToImageMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkMatchCardinalityImageToImageMetricTest + DATA{${ITK_DATA_ROOT}/Input/Spots.png}) +itk_add_test( + NAME + itkMultiResolutionPyramidImageFilterWithResampleFilterTest + COMMAND + ITKRegistrationCommonTestDriver + itkMultiResolutionPyramidImageFilterTest + Resample) +itk_add_test( + NAME + itkMultiResolutionPyramidImageFilterWithShrinkFilterTest + COMMAND + ITKRegistrationCommonTestDriver + itkMultiResolutionPyramidImageFilterTest + Shrink) +itk_add_test( + NAME + itkRecursiveMultiResolutionPyramidImageFilterWithResampleFilterTest2 + COMMAND + ITKRegistrationCommonTestDriver + itkMultiResolutionPyramidImageFilterTest + Resample + TestRecursive) +itk_add_test( + NAME + itkRecursiveMultiResolutionPyramidImageFilterWithShrinkFilterTest2 + COMMAND + ITKRegistrationCommonTestDriver + itkMultiResolutionPyramidImageFilterTest + Shrink + TestRecursive) +itk_add_test( + NAME + itkImageRegistrationMethodTest_1 + COMMAND + ITKRegistrationCommonTestDriver + itkImageRegistrationMethodTest_1) +itk_add_test( + NAME + itkImageRegistrationMethodTest_2 + COMMAND + ITKRegistrationCommonTestDriver + itkImageRegistrationMethodTest_2) +itk_add_test( + NAME + itkImageRegistrationMethodTest_3 + COMMAND + ITKRegistrationCommonTestDriver + itkImageRegistrationMethodTest_3) +itk_add_test( + NAME + itkImageRegistrationMethodTest_4 + COMMAND + ITKRegistrationCommonTestDriver + itkImageRegistrationMethodTest_4) +itk_add_test( + NAME + itkImageRegistrationMethodTest_5 + COMMAND + ITKRegistrationCommonTestDriver + itkImageRegistrationMethodTest_5) +itk_add_test( + NAME + itkImageRegistrationMethodTest_6 + COMMAND + ITKRegistrationCommonTestDriver + itkImageRegistrationMethodTest_6) +itk_add_test( + NAME + itkImageRegistrationMethodTest_7 + COMMAND + ITKRegistrationCommonTestDriver + itkImageRegistrationMethodTest_7) +itk_add_test( + NAME + itkImageRegistrationMethodTest_8 + COMMAND + ITKRegistrationCommonTestDriver + itkImageRegistrationMethodTest_8) +itk_add_test( + NAME + itkImageRegistrationMethodTest_9 + COMMAND + ITKRegistrationCommonTestDriver + itkImageRegistrationMethodTest_9) +itk_add_test( + NAME + itkRecursiveMultiResolutionPyramidImageFilterWithResampleFilterTest + COMMAND + ITKRegistrationCommonTestDriver + itkRecursiveMultiResolutionPyramidImageFilterTest + Resample) +itk_add_test( + NAME + itkRecursiveMultiResolutionPyramidImageFilterWithShrinkFilterTest + COMMAND + ITKRegistrationCommonTestDriver + itkRecursiveMultiResolutionPyramidImageFilterTest + Shrink) +itk_add_test( + NAME + itkNormalizedCorrelationImageMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkNormalizedCorrelationImageMetricTest) +itk_add_test( + NAME + itkMeanReciprocalSquareDifferenceImageMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkMeanReciprocalSquareDifferenceImageMetricTest) +itk_add_test( + NAME + itkMeanSquaresImageMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkMeanSquaresImageMetricTest) +itk_add_test( + NAME + itkMutualInformationMetricTest + COMMAND + ITKRegistrationCommonTestDriver + itkMutualInformationMetricTest) +itk_add_test( + NAME + itkPointSetToPointSetRegistrationTest + COMMAND + ITKRegistrationCommonTestDriver + itkPointSetToPointSetRegistrationTest) +itk_add_test( + NAME + itkImageToSpatialObjectRegistrationTest + COMMAND + ITKRegistrationCommonTestDriver + --redirectOutput + itkImageToSpatialObjectRegistrationTest.txt + itkImageToSpatialObjectRegistrationTest) +set_tests_properties( + itkImageToSpatialObjectRegistrationTest PROPERTIES ATTACHED_FILES_ON_FAIL + ${ITK_TEST_OUTPUT_DIR}/itkImageToSpatialObjectRegistrationTest.txt) +itk_add_test( + NAME + itkLandmarkBasedTransformInitializerTest + COMMAND + ITKRegistrationCommonTestDriver + itkLandmarkBasedTransformInitializerTest) +itk_add_test( + NAME + itkBlockMatchingImageFilterTest + COMMAND + ITKRegistrationCommonTestDriver + --compare + DATA{Baseline/itkBlockMatchingImageFilterTest.mha} + ${ITK_TEST_OUTPUT_DIR}/itkBlockMatchingImageFilterTest.mha + itkBlockMatchingImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} + ${ITK_TEST_OUTPUT_DIR}/itkBlockMatchingImageFilterTest.mha) -itk_add_test(NAME itkMeanSquaresPointSetToImageMetricTest - COMMAND ITKRegistrationCommonTestDriver itkMeanSquaresPointSetToImageMetricTest) -itk_add_test(NAME itkGradientDifferenceImageToImageMetricTest - COMMAND ITKRegistrationCommonTestDriver itkGradientDifferenceImageToImageMetricTest) -itk_add_test(NAME itkHistogramImageToImageMetricTest - COMMAND ITKRegistrationCommonTestDriver itkHistogramImageToImageMetricTest) -itk_add_test(NAME itkMutualInformationHistogramImageToImageMetricTest - COMMAND ITKRegistrationCommonTestDriver itkMutualInformationHistogramImageToImageMetricTest) -itk_add_test(NAME itkMeanReciprocalSquareDifferencePointSetToImageMetricTest - COMMAND ITKRegistrationCommonTestDriver itkMeanReciprocalSquareDifferencePointSetToImageMetricTest) -itk_add_test(NAME itkMultiResolutionImageRegistrationMethodTest - COMMAND ITKRegistrationCommonTestDriver itkMultiResolutionImageRegistrationMethodTest) -itk_add_test(NAME itkCompareHistogramImageToImageMetricTest - COMMAND ITKRegistrationCommonTestDriver itkCompareHistogramImageToImageMetricTest) -itk_add_test(NAME itkMeanSquaresHistogramImageToImageMetricTest - COMMAND ITKRegistrationCommonTestDriver itkMeanSquaresHistogramImageToImageMetricTest) -itk_add_test(NAME itkImageRegistrationMethodTest - COMMAND ITKRegistrationCommonTestDriver itkImageRegistrationMethodTest) -itk_add_test(NAME itkCorrelationCoefficientHistogramImageToImageMetricTest - COMMAND ITKRegistrationCommonTestDriver itkCorrelationCoefficientHistogramImageToImageMetricTest) -itk_add_test(NAME itkNormalizedCorrelationPointSetToImageMetricTest - COMMAND ITKRegistrationCommonTestDriver itkNormalizedCorrelationPointSetToImageMetricTest) -itk_add_test(NAME itkKullbackLeiblerCompareHistogramImageToImageMetricTest - COMMAND ITKRegistrationCommonTestDriver itkKullbackLeiblerCompareHistogramImageToImageMetricTest) -itk_add_test(NAME itkNormalizedMutualInformationHistogramImageToImageMetricTest - COMMAND ITKRegistrationCommonTestDriver itkNormalizedMutualInformationHistogramImageToImageMetricTest) -itk_add_test(NAME itkPointSetToSpatialObjectDemonsRegistrationTest - COMMAND ITKRegistrationCommonTestDriver itkPointSetToSpatialObjectDemonsRegistrationTest) -itk_add_test(NAME itkPointSetToImageRegistrationTest - COMMAND ITKRegistrationCommonTestDriver itkPointSetToImageRegistrationTest) -itk_add_test(NAME itkPointsLocatorTest - COMMAND ITKRegistrationCommonTestDriver itkPointsLocatorTest) -itk_add_test(NAME itkKappaStatisticImageToImageMetricTest - COMMAND ITKRegistrationCommonTestDriver itkKappaStatisticImageToImageMetricTest - DATA{${ITK_DATA_ROOT}/Input/Spots.png}) -itk_add_test(NAME itkMattesMutualInformationImageToImageMetricTest - COMMAND ITKRegistrationCommonTestDriver itkMattesMutualInformationImageToImageMetricTest - 1 1) -itk_add_test(NAME itkMattesMutualInformationImageToImageMetricTest2 - COMMAND ITKRegistrationCommonTestDriver itkMattesMutualInformationImageToImageMetricTest - 1 0) -itk_add_test(NAME itkMattesMutualInformationImageToImageMetricTest3 - COMMAND ITKRegistrationCommonTestDriver itkMattesMutualInformationImageToImageMetricTest - 0 1) -itk_add_test(NAME itkMattesMutualInformationImageToImageMetricTest4 - COMMAND ITKRegistrationCommonTestDriver itkMattesMutualInformationImageToImageMetricTest - 0 0) -itk_add_test(NAME itkMatchCardinalityImageToImageMetricTest - COMMAND ITKRegistrationCommonTestDriver itkMatchCardinalityImageToImageMetricTest - DATA{${ITK_DATA_ROOT}/Input/Spots.png}) -itk_add_test(NAME itkMultiResolutionPyramidImageFilterWithResampleFilterTest - COMMAND ITKRegistrationCommonTestDriver itkMultiResolutionPyramidImageFilterTest - Resample) -itk_add_test(NAME itkMultiResolutionPyramidImageFilterWithShrinkFilterTest - COMMAND ITKRegistrationCommonTestDriver itkMultiResolutionPyramidImageFilterTest - Shrink) -itk_add_test(NAME itkRecursiveMultiResolutionPyramidImageFilterWithResampleFilterTest2 - COMMAND ITKRegistrationCommonTestDriver itkMultiResolutionPyramidImageFilterTest - Resample TestRecursive) -itk_add_test(NAME itkRecursiveMultiResolutionPyramidImageFilterWithShrinkFilterTest2 - COMMAND ITKRegistrationCommonTestDriver itkMultiResolutionPyramidImageFilterTest - Shrink TestRecursive) -itk_add_test(NAME itkImageRegistrationMethodTest_1 - COMMAND ITKRegistrationCommonTestDriver itkImageRegistrationMethodTest_1) -itk_add_test(NAME itkImageRegistrationMethodTest_2 - COMMAND ITKRegistrationCommonTestDriver itkImageRegistrationMethodTest_2) -itk_add_test(NAME itkImageRegistrationMethodTest_3 - COMMAND ITKRegistrationCommonTestDriver itkImageRegistrationMethodTest_3) -itk_add_test(NAME itkImageRegistrationMethodTest_4 - COMMAND ITKRegistrationCommonTestDriver itkImageRegistrationMethodTest_4) -itk_add_test(NAME itkImageRegistrationMethodTest_5 - COMMAND ITKRegistrationCommonTestDriver itkImageRegistrationMethodTest_5) -itk_add_test(NAME itkImageRegistrationMethodTest_6 - COMMAND ITKRegistrationCommonTestDriver itkImageRegistrationMethodTest_6) -itk_add_test(NAME itkImageRegistrationMethodTest_7 - COMMAND ITKRegistrationCommonTestDriver itkImageRegistrationMethodTest_7) -itk_add_test(NAME itkImageRegistrationMethodTest_8 - COMMAND ITKRegistrationCommonTestDriver itkImageRegistrationMethodTest_8) -itk_add_test(NAME itkImageRegistrationMethodTest_9 - COMMAND ITKRegistrationCommonTestDriver itkImageRegistrationMethodTest_9) -itk_add_test(NAME itkRecursiveMultiResolutionPyramidImageFilterWithResampleFilterTest - COMMAND ITKRegistrationCommonTestDriver itkRecursiveMultiResolutionPyramidImageFilterTest - Resample) -itk_add_test(NAME itkRecursiveMultiResolutionPyramidImageFilterWithShrinkFilterTest - COMMAND ITKRegistrationCommonTestDriver itkRecursiveMultiResolutionPyramidImageFilterTest - Shrink) -itk_add_test(NAME itkNormalizedCorrelationImageMetricTest - COMMAND ITKRegistrationCommonTestDriver itkNormalizedCorrelationImageMetricTest) -itk_add_test(NAME itkMeanReciprocalSquareDifferenceImageMetricTest - COMMAND ITKRegistrationCommonTestDriver itkMeanReciprocalSquareDifferenceImageMetricTest) -itk_add_test(NAME itkMeanSquaresImageMetricTest - COMMAND ITKRegistrationCommonTestDriver itkMeanSquaresImageMetricTest) -itk_add_test(NAME itkMutualInformationMetricTest - COMMAND ITKRegistrationCommonTestDriver itkMutualInformationMetricTest) -itk_add_test(NAME itkPointSetToPointSetRegistrationTest - COMMAND ITKRegistrationCommonTestDriver itkPointSetToPointSetRegistrationTest) -itk_add_test(NAME itkImageToSpatialObjectRegistrationTest - COMMAND ITKRegistrationCommonTestDriver --redirectOutput itkImageToSpatialObjectRegistrationTest.txt - itkImageToSpatialObjectRegistrationTest) -set_tests_properties(itkImageToSpatialObjectRegistrationTest PROPERTIES ATTACHED_FILES_ON_FAIL ${ITK_TEST_OUTPUT_DIR}/itkImageToSpatialObjectRegistrationTest.txt) -itk_add_test(NAME itkLandmarkBasedTransformInitializerTest - COMMAND ITKRegistrationCommonTestDriver itkLandmarkBasedTransformInitializerTest) -itk_add_test(NAME itkBlockMatchingImageFilterTest - COMMAND ITKRegistrationCommonTestDriver - --compare DATA{Baseline/itkBlockMatchingImageFilterTest.mha} - ${ITK_TEST_OUTPUT_DIR}/itkBlockMatchingImageFilterTest.mha - itkBlockMatchingImageFilterTest -DATA{${ITK_DATA_ROOT}/Input/HeadMRVolume.mha} ${ITK_TEST_OUTPUT_DIR}/itkBlockMatchingImageFilterTest.mha) +itk_add_test( + NAME + itkImageRegistrationMethodTest_17 + COMMAND + ITKRegistrationCommonTestDriver + itkImageRegistrationMethodTest_17) +itk_add_test( + NAME + itkEuclideanDistancePointMetricTestSquaredDistanceOff + COMMAND + ITKRegistrationCommonTestDriver + itkEuclideanDistancePointMetricTest + 0) +itk_add_test( + NAME + itkEuclideanDistancePointMetricTestSquaredDistanceOn + COMMAND + ITKRegistrationCommonTestDriver + itkEuclideanDistancePointMetricTest + 1) -itk_add_test(NAME itkImageRegistrationMethodTest_17 - COMMAND ITKRegistrationCommonTestDriver itkImageRegistrationMethodTest_17) -itk_add_test(NAME itkEuclideanDistancePointMetricTestSquaredDistanceOff - COMMAND ITKRegistrationCommonTestDriver itkEuclideanDistancePointMetricTest 0) -itk_add_test(NAME itkEuclideanDistancePointMetricTestSquaredDistanceOn - COMMAND ITKRegistrationCommonTestDriver itkEuclideanDistancePointMetricTest 1) - -set(ITKRegistrationGTests - itkTransformInitializersGTest.cxx -) -CreateGoogleTestDriver(ITKRegistration "${ITKRegistrationCommon-Test_LIBRARIES}" "${ITKRegistrationGTests}") +set(ITKRegistrationGTests itkTransformInitializersGTest.cxx) +creategoogletestdriver(ITKRegistration "${ITKRegistrationCommon-Test_LIBRARIES}" "${ITKRegistrationGTests}") if(BUILD_EXAMPLES) -#The historical examples from RegistrationITKv3 should no longer be used -#as exemplars for best practices, but do provide reasonable historically -#relavant tests to exercise the toolkit in ways that older software -#bases may continue to use for backwards compatibility reasons. -add_subdirectory(RegistrationITKv3) + #The historical examples from RegistrationITKv3 should no longer be used + #as exemplars for best practices, but do provide reasonable historically + #relavant tests to exercise the toolkit in ways that older software + #bases may continue to use for backwards compatibility reasons. + add_subdirectory(RegistrationITKv3) endif() diff --git a/Modules/Registration/Common/test/RegistrationITKv3/CMakeLists.txt b/Modules/Registration/Common/test/RegistrationITKv3/CMakeLists.txt index c4eeb8dd9e1..b58eb29a9bb 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/CMakeLists.txt +++ b/Modules/Registration/Common/test/RegistrationITKv3/CMakeLists.txt @@ -29,9 +29,9 @@ target_link_libraries(ITKv3ImageRegistration11 "${ITKRegistrationCommon-Test_LIB # This example in getting stuck and timing out, likely due to spatial # object changes. -if (TEST_DISABLED) -add_executable(ITKv3ImageRegistration12 ImageRegistration12.cxx) -target_link_libraries(ITKv3ImageRegistration12 "${ITKRegistrationCommon-Test_LIBRARIES}") +if(TEST_DISABLED) + add_executable(ITKv3ImageRegistration12 ImageRegistration12.cxx) + target_link_libraries(ITKv3ImageRegistration12 "${ITKRegistrationCommon-Test_LIBRARIES}") endif() add_executable(ITKv3ImageRegistration13 ImageRegistration13.cxx) @@ -63,7 +63,7 @@ target_link_libraries(ITKv3DeformableRegistration12 "${ITKRegistrationCommon-Tes add_executable(ITKv3ImageRegistration1 ImageRegistration1.cxx) target_link_libraries(ITKv3ImageRegistration1 "${ITKRegistrationCommon-Test_LIBRARIES}") -add_executable(ITKv3MeanSquaresImageMetric1 MeanSquaresImageMetric1.cxx) +add_executable(ITKv3MeanSquaresImageMetric1 MeanSquaresImageMetric1.cxx) target_link_libraries(ITKv3MeanSquaresImageMetric1 "${ITKRegistrationCommon-Test_LIBRARIES}") add_executable(ITKv3DeformationFieldJacobian DeformationFieldJacobian.cxx) diff --git a/Modules/Registration/Common/test/RegistrationITKv3/test/CMakeLists.txt b/Modules/Registration/Common/test/RegistrationITKv3/test/CMakeLists.txt index 25bc8c7c665..9b5ecb2f443 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/test/CMakeLists.txt +++ b/Modules/Registration/Common/test/RegistrationITKv3/test/CMakeLists.txt @@ -1,293 +1,442 @@ - set(ITK_TEST_DRIVER itkTestDriver) set(BASELINE ${ITK_DATA_ROOT}/Baseline/Registration) set(TEMP ${ITK_BINARY_DIR}/Testing/Temporary) -itk_add_test(NAME ITKv3ImageRegistration1Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration1TestPixelCentered.png} - ${TEMP}/ImageRegistration1TestPixelCentered.png +itk_add_test( + NAME + ITKv3ImageRegistration1Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration1TestPixelCentered.png} + ${TEMP}/ImageRegistration1TestPixelCentered.png $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/ImageRegistration1TestPixelCentered.png - ${TEMP}/ImageRegistration1DifferenceAfterTestPixelCentered.png - ${TEMP}/ImageRegistration1DifferenceBeforeTestPixelCentered.png -) - -itk_add_test(NAME ITKv3ImageRegistration3Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration3TestPixelCentered.png} - ${TEMP}/ImageRegistration3TestPixelCentered.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/ImageRegistration1TestPixelCentered.png + ${TEMP}/ImageRegistration1DifferenceAfterTestPixelCentered.png + ${TEMP}/ImageRegistration1DifferenceBeforeTestPixelCentered.png) + +itk_add_test( + NAME + ITKv3ImageRegistration3Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration3TestPixelCentered.png} + ${TEMP}/ImageRegistration3TestPixelCentered.png $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/ImageRegistration3TestPixelCentered.png -) - -itk_add_test(NAME ITKv3ImageRegistration4Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ITKv3ImageRegistration4Test.png} - ${TEMP}/ImageRegistration4Test.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/ImageRegistration3TestPixelCentered.png) + +itk_add_test( + NAME + ITKv3ImageRegistration4Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ITKv3ImageRegistration4Test.png} + ${TEMP}/ImageRegistration4Test.png $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainT1SliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/ImageRegistration4Test.png 0 - ${TEMP}/ImageRegistration4BeforeTest.png - ${TEMP}/ImageRegistration4AfterTest.png - 24 10000 1 -) - -itk_add_test(NAME ITKv3ImageRegistration4Test2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ITKv3ImageRegistration4Test.png} - ${TEMP}/ImageRegistration4Test2.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainT1SliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/ImageRegistration4Test.png + 0 + ${TEMP}/ImageRegistration4BeforeTest.png + ${TEMP}/ImageRegistration4AfterTest.png + 24 + 10000 + 1) + +itk_add_test( + NAME + ITKv3ImageRegistration4Test2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ITKv3ImageRegistration4Test.png} + ${TEMP}/ImageRegistration4Test2.png $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainT1SliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/ImageRegistration4Test2.png 0 - ${TEMP}/ImageRegistration4BeforeTest.png - ${TEMP}/ImageRegistration4AfterTest.png - 24 10000 0 -) - -itk_add_test(NAME ITKv3ImageRegistration4Test3 COMMAND ${ITK_TEST_DRIVER} + ${ITK_EXAMPLE_DATA_ROOT}/BrainT1SliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/ImageRegistration4Test2.png + 0 + ${TEMP}/ImageRegistration4BeforeTest.png + ${TEMP}/ImageRegistration4AfterTest.png + 24 + 10000 + 0) + +itk_add_test( + NAME + ITKv3ImageRegistration4Test3 + COMMAND + ${ITK_TEST_DRIVER} $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20Mask.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20Mask.png - ${TEMP}/ImageRegistration4Test3.png 0 - ${TEMP}/ImageRegistration4BeforeTest3.png - ${TEMP}/ImageRegistration4AfterTest3.png - 5 10000 0 -) - -itk_add_test(NAME ITKv3ImageRegistration5Test1 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration5Test1PixelCentered.png} - ${TEMP}/ImageRegistration5Test1PixelCentered.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20Mask.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20Mask.png + ${TEMP}/ImageRegistration4Test3.png + 0 + ${TEMP}/ImageRegistration4BeforeTest3.png + ${TEMP}/ImageRegistration4AfterTest3.png + 5 + 10000 + 0) + +itk_add_test( + NAME + ITKv3ImageRegistration5Test1 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration5Test1PixelCentered.png} + ${TEMP}/ImageRegistration5Test1PixelCentered.png $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceRotated10.png - ${TEMP}/ImageRegistration5Test1PixelCentered.png -) - -itk_add_test(NAME ITKv3ImageRegistration5Test2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ITKv3ImageRegistration5Test2PixelCentered.png} - ${TEMP}/ImageRegistration5Test2PixelCentered.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceRotated10.png + ${TEMP}/ImageRegistration5Test1PixelCentered.png) + +itk_add_test( + NAME + ITKv3ImageRegistration5Test2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ITKv3ImageRegistration5Test2PixelCentered.png} + ${TEMP}/ImageRegistration5Test2PixelCentered.png $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png - ${TEMP}/ImageRegistration5Test2PixelCentered.png -) - -itk_add_test(NAME ITKv3ImageRegistration6Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration6TestPixelCentered.png} - ${TEMP}/ImageRegistration6TestPixelCentered.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png + ${TEMP}/ImageRegistration5Test2PixelCentered.png) + +itk_add_test( + NAME + ITKv3ImageRegistration6Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration6TestPixelCentered.png} + ${TEMP}/ImageRegistration6TestPixelCentered.png $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png - ${TEMP}/ImageRegistration6TestPixelCentered.png -) - -itk_add_test(NAME ITKv3ImageRegistration7Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration7TestPixelCentered.png} - ${TEMP}/ImageRegistration7TestPixelCentered.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png + ${TEMP}/ImageRegistration6TestPixelCentered.png) + +itk_add_test( + NAME + ITKv3ImageRegistration7Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration7TestPixelCentered.png} + ${TEMP}/ImageRegistration7TestPixelCentered.png $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17S12.png - ${TEMP}/ImageRegistration7TestPixelCentered.png - ${TEMP}/ImageRegistration7BeforeTestPixelCentered.png - ${TEMP}/ImageRegistration7AfterTestPixelCentered.png - 1.0 1.0 0.0 -) + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17S12.png + ${TEMP}/ImageRegistration7TestPixelCentered.png + ${TEMP}/ImageRegistration7BeforeTestPixelCentered.png + ${TEMP}/ImageRegistration7AfterTestPixelCentered.png + 1.0 + 1.0 + 0.0) if(ITK_USE_BRAINWEB_DATA) -## A test needed to prepare for making the latex documentation. -itk_add_test(NAME ITKv3ITKv3ConfidenceConnected3DTest COMMAND ${ITK_TEST_DRIVER} - $ - DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb165a10f17.mha} - ${TEMP}/WhiteMatterSegmentation.mhd -) - -itk_add_test(NAME ITKv3ImageRegistration8Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration8RegisteredSlice.png} - ${TEMP}/ImageRegistration8v3RegisteredSlice.png - $ - DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} - DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20Rot10Tx15.mha} - ${TEMP}/ImageRegistration8v3Output.mhd - ${TEMP}/ImageRegistration8v3DifferenceBefore.mhd - ${TEMP}/ImageRegistration8v3DifferenceAfter.mhd - ${TEMP}/ImageRegistration8v3Output.png - ${TEMP}/ImageRegistration8v3DifferenceBefore.png - ${TEMP}/ImageRegistration8v3DifferenceAfter.png - ${TEMP}/ImageRegistration8v3RegisteredSlice.png -) + ## A test needed to prepare for making the latex documentation. + itk_add_test( + NAME + ITKv3ITKv3ConfidenceConnected3DTest + COMMAND + ${ITK_TEST_DRIVER} + $ + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb165a10f17.mha} + ${TEMP}/WhiteMatterSegmentation.mhd) + + itk_add_test( + NAME + ITKv3ImageRegistration8Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration8RegisteredSlice.png} + ${TEMP}/ImageRegistration8v3RegisteredSlice.png + $ + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20Rot10Tx15.mha} + ${TEMP}/ImageRegistration8v3Output.mhd + ${TEMP}/ImageRegistration8v3DifferenceBefore.mhd + ${TEMP}/ImageRegistration8v3DifferenceAfter.mhd + ${TEMP}/ImageRegistration8v3Output.png + ${TEMP}/ImageRegistration8v3DifferenceBefore.png + ${TEMP}/ImageRegistration8v3DifferenceAfter.png + ${TEMP}/ImageRegistration8v3RegisteredSlice.png) endif() -itk_add_test(NAME ITKv3ImageRegistration9Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration9TestPixelCentered.png} - ${TEMP}/ImageRegistration9TestPixelCentered.png +itk_add_test( + NAME + ITKv3ImageRegistration9Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration9TestPixelCentered.png} + ${TEMP}/ImageRegistration9TestPixelCentered.png $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png - ${TEMP}/ImageRegistration9TestPixelCentered.png -) - -itk_add_test(NAME ITKv3ImageRegistration13Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration13TestPixelCentered.png} - ${TEMP}/ImageRegistration13TestPixelCentered.png - --compareNumberOfPixelsTolerance 5 + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png + ${TEMP}/ImageRegistration9TestPixelCentered.png) + +itk_add_test( + NAME + ITKv3ImageRegistration13Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration13TestPixelCentered.png} + ${TEMP}/ImageRegistration13TestPixelCentered.png + --compareNumberOfPixelsTolerance + 5 $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png - ${TEMP}/ImageRegistration13TestPixelCentered.png -) - -itk_add_test(NAME ITKv3ImageRegistration13Test2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration13TestPixelCentered.png} - ${TEMP}/ImageRegistration13Test2PixelCentered.png - --compareNumberOfPixelsTolerance 10 + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png + ${TEMP}/ImageRegistration13TestPixelCentered.png) + +itk_add_test( + NAME + ITKv3ImageRegistration13Test2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration13TestPixelCentered.png} + ${TEMP}/ImageRegistration13Test2PixelCentered.png + --compareNumberOfPixelsTolerance + 10 $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png - ${TEMP}/ImageRegistration13Test2PixelCentered.png - 0 0 -) - -itk_add_test(NAME ITKv3ImageRegistration13Test3 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration13TestPixelCentered.png} - ${TEMP}/ImageRegistration13Test3PixelCentered.png - --compareNumberOfPixelsTolerance 10 + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png + ${TEMP}/ImageRegistration13Test2PixelCentered.png + 0 + 0) + +itk_add_test( + NAME + ITKv3ImageRegistration13Test3 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration13TestPixelCentered.png} + ${TEMP}/ImageRegistration13Test3PixelCentered.png + --compareNumberOfPixelsTolerance + 10 $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png - ${TEMP}/ImageRegistration13Test3PixelCentered.png - 0 1 -) - -itk_add_test(NAME ITKv3ImageRegistration13Test4 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration13TestPixelCentered.png} - ${TEMP}/ImageRegistration13Test4PixelCentered.png - --compareNumberOfPixelsTolerance 5 + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png + ${TEMP}/ImageRegistration13Test3PixelCentered.png + 0 + 1) + +itk_add_test( + NAME + ITKv3ImageRegistration13Test4 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration13TestPixelCentered.png} + ${TEMP}/ImageRegistration13Test4PixelCentered.png + --compareNumberOfPixelsTolerance + 5 $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png - ${TEMP}/ImageRegistration13Test4PixelCentered.png - 1 0 -) - -itk_add_test(NAME ITKv3ImageRegistration13Test5 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration13TestPixelCentered.png} - ${TEMP}/ImageRegistration13Test5PixelCentered.png - --compareNumberOfPixelsTolerance 5 + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png + ${TEMP}/ImageRegistration13Test4PixelCentered.png + 1 + 0) + +itk_add_test( + NAME + ITKv3ImageRegistration13Test5 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration13TestPixelCentered.png} + ${TEMP}/ImageRegistration13Test5PixelCentered.png + --compareNumberOfPixelsTolerance + 5 $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png - ${TEMP}/ImageRegistration13Test5PixelCentered.png - 1 1 -) - -itk_add_test(NAME ITKv3ImageRegistration14Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration14Test.png,:} - ${TEMP}/ImageRegistration14Test.png - --compareNumberOfPixelsTolerance 2000 + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png + ${TEMP}/ImageRegistration13Test5PixelCentered.png + 1 + 1) + +itk_add_test( + NAME + ITKv3ImageRegistration14Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration14Test.png,:} + ${TEMP}/ImageRegistration14Test.png + --compareNumberOfPixelsTolerance + 2000 $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png - ${TEMP}/ImageRegistration14Test.png 32 0.01 0.1 0.15 10.0 14.0 -) -set_property(TEST ITKv3ImageRegistration14Test APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME ITKv3MultiResImageRegistration1Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/MultiResImageRegistration1Test.png,:} - ${TEMP}/MultiResImageRegistration1Test.png - --compareNumberOfPixelsTolerance 10 - --compareIntensityTolerance 7 + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png + ${TEMP}/ImageRegistration14Test.png + 32 + 0.01 + 0.1 + 0.15 + 10.0 + 14.0) +set_property( + TEST ITKv3ImageRegistration14Test + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + ITKv3MultiResImageRegistration1Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/MultiResImageRegistration1Test.png,:} + ${TEMP}/MultiResImageRegistration1Test.png + --compareNumberOfPixelsTolerance + 10 + --compareIntensityTolerance + 7 $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainT1SliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/MultiResImageRegistration1Test.png 100 - ${TEMP}/MultiResImageRegistration1CheckerBoardBeforeTest.png - ${TEMP}/MultiResImageRegistration1CheckerBoardAfterTest.png -) -set_property(TEST ITKv3MultiResImageRegistration1Test APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME ITKv3MultiResImageRegistration1Test2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/MultiResImageRegistration1Test.png,:} - ${TEMP}/MultiResImageRegistration1Test2.png - --compareNumberOfPixelsTolerance 10 - --compareIntensityTolerance 7 + ${ITK_EXAMPLE_DATA_ROOT}/BrainT1SliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/MultiResImageRegistration1Test.png + 100 + ${TEMP}/MultiResImageRegistration1CheckerBoardBeforeTest.png + ${TEMP}/MultiResImageRegistration1CheckerBoardAfterTest.png) +set_property( + TEST ITKv3MultiResImageRegistration1Test + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + ITKv3MultiResImageRegistration1Test2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/MultiResImageRegistration1Test.png,:} + ${TEMP}/MultiResImageRegistration1Test2.png + --compareNumberOfPixelsTolerance + 10 + --compareIntensityTolerance + 7 $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainT1SliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.png - ${TEMP}/MultiResImageRegistration1Test2.png 100 - ${TEMP}/MultiResImageRegistration1CheckerBoardBeforeTest2.png - ${TEMP}/MultiResImageRegistration1CheckerBoardAfterTest2.png - 0 -) -set_property(TEST ITKv3MultiResImageRegistration1Test2 APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME ITKv3DeformableRegistration12Test1 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{Baseline/DeformableRegistration12Test.png} - ${TEMP}/DeformableRegistration12Test1.png - --compareNumberOfPixelsTolerance 600 + ${ITK_EXAMPLE_DATA_ROOT}/BrainT1SliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceShifted13x17y.png + ${TEMP}/MultiResImageRegistration1Test2.png + 100 + ${TEMP}/MultiResImageRegistration1CheckerBoardBeforeTest2.png + ${TEMP}/MultiResImageRegistration1CheckerBoardAfterTest2.png + 0) +set_property( + TEST ITKv3MultiResImageRegistration1Test2 + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + ITKv3DeformableRegistration12Test1 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{Baseline/DeformableRegistration12Test.png} + ${TEMP}/DeformableRegistration12Test1.png + --compareNumberOfPixelsTolerance + 600 $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - DATA{Baseline/BSplineWarping1Test.png} - ${TEMP}/DeformableRegistration12Test1.png - ${TEMP}/DeformableRegistration12Test1DifferenceAfter.png - ${TEMP}/DeformableRegistration12Test1DifferenceBefore.png - ${TEMP}/DeformableRegistration12Test1DisplacementField.mhd - 0 0 - ${TEMP}/DeformableRegistration12Test1FinalTransformParameters.txt -) -set_property(TEST ITKv3DeformableRegistration12Test1 APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME ITKv3DeformableRegistration12Test2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{Baseline/DeformableRegistration12Test.png} - ${TEMP}/DeformableRegistration12Test2.png - --compareNumberOfPixelsTolerance 600 + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + DATA{Baseline/BSplineWarping1Test.png} + ${TEMP}/DeformableRegistration12Test1.png + ${TEMP}/DeformableRegistration12Test1DifferenceAfter.png + ${TEMP}/DeformableRegistration12Test1DifferenceBefore.png + ${TEMP}/DeformableRegistration12Test1DisplacementField.mhd + 0 + 0 + ${TEMP}/DeformableRegistration12Test1FinalTransformParameters.txt) +set_property( + TEST ITKv3DeformableRegistration12Test1 + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + ITKv3DeformableRegistration12Test2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{Baseline/DeformableRegistration12Test.png} + ${TEMP}/DeformableRegistration12Test2.png + --compareNumberOfPixelsTolerance + 600 $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - DATA{Baseline/BSplineWarping1Test.png} - ${TEMP}/DeformableRegistration12Test2.png - ${TEMP}/DeformableRegistration12Test2DifferenceAfter.png - ${TEMP}/DeformableRegistration12Test2DifferenceBefore.png - ${TEMP}/DeformableRegistration12Test2DisplacementField.mhd - 0 1 - ${TEMP}/DeformableRegistration12Test2FinalTransformParameters.txt -) - -itk_add_test(NAME ITKv3DeformableRegistration12Test3 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{Baseline/DeformableRegistration12Test.png} - ${TEMP}/DeformableRegistration12Test3.png - --compareNumberOfPixelsTolerance 600 + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + DATA{Baseline/BSplineWarping1Test.png} + ${TEMP}/DeformableRegistration12Test2.png + ${TEMP}/DeformableRegistration12Test2DifferenceAfter.png + ${TEMP}/DeformableRegistration12Test2DifferenceBefore.png + ${TEMP}/DeformableRegistration12Test2DisplacementField.mhd + 0 + 1 + ${TEMP}/DeformableRegistration12Test2FinalTransformParameters.txt) + +itk_add_test( + NAME + ITKv3DeformableRegistration12Test3 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{Baseline/DeformableRegistration12Test.png} + ${TEMP}/DeformableRegistration12Test3.png + --compareNumberOfPixelsTolerance + 600 $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - DATA{Baseline/BSplineWarping1Test.png} - ${TEMP}/DeformableRegistration12Test3.png - ${TEMP}/DeformableRegistration12Test3DifferenceAfter.png - ${TEMP}/DeformableRegistration12Test3DifferenceBefore.png - ${TEMP}/DeformableRegistration12Test3DisplacementField.mhd - 1 0 - ${TEMP}/DeformableRegistration12Test3FinalTransformParameters.txt -) -set_property(TEST ITKv3DeformableRegistration12Test3 APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME ITKv3DeformableRegistration12Test4 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{Baseline/DeformableRegistration12Test.png} - ${TEMP}/DeformableRegistration12Test4.png - --compareNumberOfPixelsTolerance 600 + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + DATA{Baseline/BSplineWarping1Test.png} + ${TEMP}/DeformableRegistration12Test3.png + ${TEMP}/DeformableRegistration12Test3DifferenceAfter.png + ${TEMP}/DeformableRegistration12Test3DifferenceBefore.png + ${TEMP}/DeformableRegistration12Test3DisplacementField.mhd + 1 + 0 + ${TEMP}/DeformableRegistration12Test3FinalTransformParameters.txt) +set_property( + TEST ITKv3DeformableRegistration12Test3 + APPEND + PROPERTY LABELS RUNS_LONG) + +itk_add_test( + NAME + ITKv3DeformableRegistration12Test4 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{Baseline/DeformableRegistration12Test.png} + ${TEMP}/DeformableRegistration12Test4.png + --compareNumberOfPixelsTolerance + 600 $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - DATA{Baseline/BSplineWarping1Test.png} - ${TEMP}/DeformableRegistration12Test4.png - ${TEMP}/DeformableRegistration12Test4DifferenceAfter.png - ${TEMP}/DeformableRegistration12Test4DifferenceBefore.png - ${TEMP}/DeformableRegistration12Test4DisplacementField.mhd - 1 1 - ${TEMP}/DeformableRegistration12Test4FinalTransformParameters.txt -) + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + DATA{Baseline/BSplineWarping1Test.png} + ${TEMP}/DeformableRegistration12Test4.png + ${TEMP}/DeformableRegistration12Test4DifferenceAfter.png + ${TEMP}/DeformableRegistration12Test4DifferenceBefore.png + ${TEMP}/DeformableRegistration12Test4DisplacementField.mhd + 1 + 1 + ${TEMP}/DeformableRegistration12Test4FinalTransformParameters.txt) if(ITK_USE_BRAINWEB_DATA) @@ -295,183 +444,271 @@ if(ITK_USE_BRAINWEB_DATA) if(CTEST_TEST_TIMEOUT GREATER 3000) - itk_add_test(NAME ITKv3DeformableRegistration8Test1 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/DeformableRegistration8Test1.mhd - --compareNumberOfPixelsTolerance 700000 - --compareIntensityTolerance 15 + itk_add_test( + NAME + ITKv3DeformableRegistration8Test1 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/DeformableRegistration8Test1.mhd + --compareNumberOfPixelsTolerance + 700000 + --compareIntensityTolerance + 15 $ - DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration8Test1.mhd - ${TEMP}/DeformableRegistration8Test1DifferenceAfter.mhd - ${TEMP}/DeformableRegistration8Test1DifferenceBefore.mhd - ${TEMP}/DeformableRegistration8Test1DisplacementField.mhd - 0 0 - ${TEMP}/DeformableRegistration8Test1FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ${ITK_EXAMPLE_DATA_ROOT}/IdentityTransform.tfm - ) - set_property(TEST ITKv3DeformableRegistration8Test1 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST ITKv3DeformableRegistration8Test1 APPEND PROPERTY LABELS RUNS_LONG) - - itk_add_test(NAME ITKv3DeformableRegistration8Test2 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/DeformableRegistration8Test2.mhd - --compareNumberOfPixelsTolerance 700000 - --compareIntensityTolerance 15 + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration8Test1.mhd + ${TEMP}/DeformableRegistration8Test1DifferenceAfter.mhd + ${TEMP}/DeformableRegistration8Test1DifferenceBefore.mhd + ${TEMP}/DeformableRegistration8Test1DisplacementField.mhd + 0 + 0 + ${TEMP}/DeformableRegistration8Test1FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES} + ${ITK_EXAMPLE_DATA_ROOT}/IdentityTransform.tfm) + set_property(TEST ITKv3DeformableRegistration8Test1 PROPERTY DEPENDS BSplineWarping2Test) + set_property( + TEST ITKv3DeformableRegistration8Test1 + APPEND + PROPERTY LABELS RUNS_LONG) + + itk_add_test( + NAME + ITKv3DeformableRegistration8Test2 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/DeformableRegistration8Test2.mhd + --compareNumberOfPixelsTolerance + 700000 + --compareIntensityTolerance + 15 $ - DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration8Test2.mhd - ${TEMP}/DeformableRegistration8Test2DifferenceAfter.mhd - ${TEMP}/DeformableRegistration8Test2DifferenceBefore.mhd - ${TEMP}/DeformableRegistration8Test2DisplacementField.mhd - 1 0 - ${TEMP}/DeformableRegistration8Test2FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ${ITK_EXAMPLE_DATA_ROOT}/IdentityTransform.tfm - ) - set_property(TEST ITKv3DeformableRegistration8Test2 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST ITKv3DeformableRegistration8Test2 APPEND PROPERTY LABELS RUNS_LONG) - - itk_add_test(NAME ITKv3DeformableRegistration8Test3 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/DeformableRegistration8Test3.mhd - --compareNumberOfPixelsTolerance 700000 - --compareIntensityTolerance 15 + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration8Test2.mhd + ${TEMP}/DeformableRegistration8Test2DifferenceAfter.mhd + ${TEMP}/DeformableRegistration8Test2DifferenceBefore.mhd + ${TEMP}/DeformableRegistration8Test2DisplacementField.mhd + 1 + 0 + ${TEMP}/DeformableRegistration8Test2FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES} + ${ITK_EXAMPLE_DATA_ROOT}/IdentityTransform.tfm) + set_property(TEST ITKv3DeformableRegistration8Test2 PROPERTY DEPENDS BSplineWarping2Test) + set_property( + TEST ITKv3DeformableRegistration8Test2 + APPEND + PROPERTY LABELS RUNS_LONG) + + itk_add_test( + NAME + ITKv3DeformableRegistration8Test3 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/DeformableRegistration8Test3.mhd + --compareNumberOfPixelsTolerance + 700000 + --compareIntensityTolerance + 15 $ - DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration8Test3.mhd - ${TEMP}/DeformableRegistration8Test3DifferenceAfter.mhd - ${TEMP}/DeformableRegistration8Test3DifferenceBefore.mhd - ${TEMP}/DeformableRegistration8Test3DisplacementField.mhd - 0 1 - ${TEMP}/DeformableRegistration8Test3FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ${ITK_EXAMPLE_DATA_ROOT}/IdentityTransform.tfm - ) - set_property(TEST ITKv3DeformableRegistration8Test3 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST ITKv3DeformableRegistration8Test3 APPEND PROPERTY LABELS RUNS_LONG) - - itk_add_test(NAME ITKv3DeformableRegistration8Test4 COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/DeformableRegistration8Test4.mhd - --compareNumberOfPixelsTolerance 700000 - --compareIntensityTolerance 15 + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration8Test3.mhd + ${TEMP}/DeformableRegistration8Test3DifferenceAfter.mhd + ${TEMP}/DeformableRegistration8Test3DifferenceBefore.mhd + ${TEMP}/DeformableRegistration8Test3DisplacementField.mhd + 0 + 1 + ${TEMP}/DeformableRegistration8Test3FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES} + ${ITK_EXAMPLE_DATA_ROOT}/IdentityTransform.tfm) + set_property(TEST ITKv3DeformableRegistration8Test3 PROPERTY DEPENDS BSplineWarping2Test) + set_property( + TEST ITKv3DeformableRegistration8Test3 + APPEND + PROPERTY LABELS RUNS_LONG) + + itk_add_test( + NAME + ITKv3DeformableRegistration8Test4 + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/DeformableRegistration8Test4.mhd + --compareNumberOfPixelsTolerance + 700000 + --compareIntensityTolerance + 15 $ - DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration8Test4.mhd - ${TEMP}/DeformableRegistration8Test4DifferenceAfter.mhd - ${TEMP}/DeformableRegistration8Test4DifferenceBefore.mhd - ${TEMP}/DeformableRegistration8Test4DisplacementField.mhd - 1 1 - ${TEMP}/DeformableRegistration8Test4FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ${ITK_EXAMPLE_DATA_ROOT}/IdentityTransform.tfm - ) - set_property(TEST ITKv3DeformableRegistration8Test4 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST ITKv3DeformableRegistration8Test4 APPEND PROPERTY LABELS RUNS_LONG) + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration8Test4.mhd + ${TEMP}/DeformableRegistration8Test4DifferenceAfter.mhd + ${TEMP}/DeformableRegistration8Test4DifferenceBefore.mhd + ${TEMP}/DeformableRegistration8Test4DisplacementField.mhd + 1 + 1 + ${TEMP}/DeformableRegistration8Test4FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES} + ${ITK_EXAMPLE_DATA_ROOT}/IdentityTransform.tfm) + set_property(TEST ITKv3DeformableRegistration8Test4 PROPERTY DEPENDS BSplineWarping2Test) + set_property( + TEST ITKv3DeformableRegistration8Test4 + APPEND + PROPERTY LABELS RUNS_LONG) endif() # CTEST_TEST_TIMEOUT GREATER 3000 if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 6) set(NUMBER_OF_BSPLINE_GRID_NODES 32) - itk_add_test(NAME ITKv3DeformableRegistration8Test5 COMMAND ${ITK_TEST_DRIVER} + itk_add_test( + NAME + ITKv3DeformableRegistration8Test5 + COMMAND + ${ITK_TEST_DRIVER} $ - DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration8Test5.mhd - ${TEMP}/DeformableRegistration8Test5DifferenceAfter.mhd - ${TEMP}/DeformableRegistration8Test5DifferenceBefore.mhd - ${TEMP}/DeformableRegistration8Test5DisplacementField.mhd - 0 0 - ${TEMP}/DeformableRegistration8Test5FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ) + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration8Test5.mhd + ${TEMP}/DeformableRegistration8Test5DifferenceAfter.mhd + ${TEMP}/DeformableRegistration8Test5DifferenceBefore.mhd + ${TEMP}/DeformableRegistration8Test5DisplacementField.mhd + 0 + 0 + ${TEMP}/DeformableRegistration8Test5FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES}) set_property(TEST ITKv3DeformableRegistration8Test5 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST ITKv3DeformableRegistration8Test5 APPEND PROPERTY LABELS RUNS_LONG) - set_property(TEST ITKv3DeformableRegistration8Test5 APPEND PROPERTY RUN_SERIAL True) - - itk_add_test(NAME ITKv3DeformableRegistration8Test6 COMMAND ${ITK_TEST_DRIVER} + set_property( + TEST ITKv3DeformableRegistration8Test5 + APPEND + PROPERTY LABELS RUNS_LONG) + set_property( + TEST ITKv3DeformableRegistration8Test5 + APPEND + PROPERTY RUN_SERIAL True) + + itk_add_test( + NAME + ITKv3DeformableRegistration8Test6 + COMMAND + ${ITK_TEST_DRIVER} $ - DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration8Test6.mhd - ${TEMP}/DeformableRegistration8Test6DifferenceAfter.mhd - ${TEMP}/DeformableRegistration8Test6DifferenceBefore.mhd - ${TEMP}/DeformableRegistration8Test6DisplacementField.mhd - 0 1 - ${TEMP}/DeformableRegistration8Test6FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ) + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration8Test6.mhd + ${TEMP}/DeformableRegistration8Test6DifferenceAfter.mhd + ${TEMP}/DeformableRegistration8Test6DifferenceBefore.mhd + ${TEMP}/DeformableRegistration8Test6DisplacementField.mhd + 0 + 1 + ${TEMP}/DeformableRegistration8Test6FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES}) set_property(TEST ITKv3DeformableRegistration8Test6 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST ITKv3DeformableRegistration8Test6 APPEND PROPERTY LABELS RUNS_LONG) + set_property( + TEST ITKv3DeformableRegistration8Test6 + APPEND + PROPERTY LABELS RUNS_LONG) - itk_add_test(NAME ITKv3DeformableRegistration8Test7 COMMAND ${ITK_TEST_DRIVER} + itk_add_test( + NAME + ITKv3DeformableRegistration8Test7 + COMMAND + ${ITK_TEST_DRIVER} $ - DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration8Test7.mhd - ${TEMP}/DeformableRegistration8Test7DifferenceAfter.mhd - ${TEMP}/DeformableRegistration8Test7DifferenceBefore.mhd - ${TEMP}/DeformableRegistration8Test7DisplacementField.mhd - 1 0 - ${TEMP}/DeformableRegistration8Test7FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ) + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration8Test7.mhd + ${TEMP}/DeformableRegistration8Test7DifferenceAfter.mhd + ${TEMP}/DeformableRegistration8Test7DifferenceBefore.mhd + ${TEMP}/DeformableRegistration8Test7DisplacementField.mhd + 1 + 0 + ${TEMP}/DeformableRegistration8Test7FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES}) set_property(TEST ITKv3DeformableRegistration8Test7 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST ITKv3DeformableRegistration8Test7 APPEND PROPERTY LABELS RUNS_LONG) + set_property( + TEST ITKv3DeformableRegistration8Test7 + APPEND + PROPERTY LABELS RUNS_LONG) - itk_add_test(NAME ITKv3DeformableRegistration8Test8 COMMAND ${ITK_TEST_DRIVER} + itk_add_test( + NAME + ITKv3DeformableRegistration8Test8 + COMMAND + ${ITK_TEST_DRIVER} $ - DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration8Test8.mhd - ${TEMP}/DeformableRegistration8Test8DifferenceAfter.mhd - ${TEMP}/DeformableRegistration8Test8DifferenceBefore.mhd - ${TEMP}/DeformableRegistration8Test8DisplacementField.mhd - 1 1 - ${TEMP}/DeformableRegistration8Test8FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ) + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration8Test8.mhd + ${TEMP}/DeformableRegistration8Test8DifferenceAfter.mhd + ${TEMP}/DeformableRegistration8Test8DifferenceBefore.mhd + ${TEMP}/DeformableRegistration8Test8DisplacementField.mhd + 1 + 1 + ${TEMP}/DeformableRegistration8Test8FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES}) set_property(TEST ITKv3DeformableRegistration8Test8 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST ITKv3DeformableRegistration8Test8 APPEND PROPERTY LABELS RUNS_LONG) + set_property( + TEST ITKv3DeformableRegistration8Test8 + APPEND + PROPERTY LABELS RUNS_LONG) set(NUMBER_OF_BSPLINE_GRID_NODES 100) - itk_add_test(NAME ITKv3DeformableRegistration8Test9 COMMAND ${ITK_TEST_DRIVER} + itk_add_test( + NAME + ITKv3DeformableRegistration8Test9 + COMMAND + ${ITK_TEST_DRIVER} $ - DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration8Test9.mhd - ${TEMP}/DeformableRegistration8Test9DifferenceAfter.mhd - ${TEMP}/DeformableRegistration8Test9DifferenceBefore.mhd - ${TEMP}/DeformableRegistration8Test9DisplacementField.mhd - 0 0 - ${TEMP}/DeformableRegistration8Test9FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ) + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration8Test9.mhd + ${TEMP}/DeformableRegistration8Test9DifferenceAfter.mhd + ${TEMP}/DeformableRegistration8Test9DifferenceBefore.mhd + ${TEMP}/DeformableRegistration8Test9DisplacementField.mhd + 0 + 0 + ${TEMP}/DeformableRegistration8Test9FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES}) set_property(TEST ITKv3DeformableRegistration8Test9 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST ITKv3DeformableRegistration8Test9 APPEND PROPERTY LABELS RUNS_LONG) - set_property(TEST ITKv3DeformableRegistration8Test9 APPEND PROPERTY RUN_SERIAL True) - - itk_add_test(NAME ITKv3DeformableRegistration8Test10 COMMAND ${ITK_TEST_DRIVER} + set_property( + TEST ITKv3DeformableRegistration8Test9 + APPEND + PROPERTY LABELS RUNS_LONG) + set_property( + TEST ITKv3DeformableRegistration8Test9 + APPEND + PROPERTY RUN_SERIAL True) + + itk_add_test( + NAME + ITKv3DeformableRegistration8Test10 + COMMAND + ${ITK_TEST_DRIVER} $ - DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration8Test10.mhd - ${TEMP}/DeformableRegistration8Test10DifferenceAfter.mhd - ${TEMP}/DeformableRegistration8Test10DifferenceBefore.mhd - ${TEMP}/DeformableRegistration8Test10DisplacementField.mhd - 0 1 - ${TEMP}/DeformableRegistration8Test10FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ) + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration8Test10.mhd + ${TEMP}/DeformableRegistration8Test10DifferenceAfter.mhd + ${TEMP}/DeformableRegistration8Test10DifferenceBefore.mhd + ${TEMP}/DeformableRegistration8Test10DisplacementField.mhd + 0 + 1 + ${TEMP}/DeformableRegistration8Test10FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES}) set_property(TEST ITKv3DeformableRegistration8Test10 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST ITKv3DeformableRegistration8Test10 APPEND PROPERTY LABELS RUNS_LONG) + set_property( + TEST ITKv3DeformableRegistration8Test10 + APPEND + PROPERTY LABELS RUNS_LONG) # Due to the large memory requirements this tests must be run one by one set_tests_properties( @@ -481,50 +718,58 @@ if(ITK_USE_BRAINWEB_DATA) ITKv3DeformableRegistration8Test8 ITKv3DeformableRegistration8Test9 ITKv3DeformableRegistration8Test10 - PROPERTIES - RESOURCE_LOCK MEMORY_SIZE - ) + PROPERTIES RESOURCE_LOCK MEMORY_SIZE) if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 16) - itk_add_test(NAME ITKv3DeformableRegistration8Test11 COMMAND ${ITK_TEST_DRIVER} + itk_add_test( + NAME + ITKv3DeformableRegistration8Test11 + COMMAND + ${ITK_TEST_DRIVER} $ - DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration8Test11.mhd - ${TEMP}/DeformableRegistration8Test11DifferenceAfter.mhd - ${TEMP}/DeformableRegistration8Test11DifferenceBefore.mhd - ${TEMP}/DeformableRegistration8Test11DisplacementField.mhd - 1 0 - ${TEMP}/DeformableRegistration8Test11FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ) + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration8Test11.mhd + ${TEMP}/DeformableRegistration8Test11DifferenceAfter.mhd + ${TEMP}/DeformableRegistration8Test11DifferenceBefore.mhd + ${TEMP}/DeformableRegistration8Test11DisplacementField.mhd + 1 + 0 + ${TEMP}/DeformableRegistration8Test11FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES}) set_property(TEST ITKv3DeformableRegistration8Test11 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST ITKv3DeformableRegistration8Test11 APPEND PROPERTY LABELS RUNS_LONG) - - itk_add_test(NAME ITKv3DeformableRegistration8Test12 COMMAND ${ITK_TEST_DRIVER} + set_property( + TEST ITKv3DeformableRegistration8Test11 + APPEND + PROPERTY LABELS RUNS_LONG) + + itk_add_test( + NAME + ITKv3DeformableRegistration8Test12 + COMMAND + ${ITK_TEST_DRIVER} $ - DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} - ${TEMP}/BSplineWarping2Test.mhd - ${TEMP}/DeformableRegistration8Test12.mhd - ${TEMP}/DeformableRegistration8Test12DifferenceAfter.mhd - ${TEMP}/DeformableRegistration8Test12DifferenceBefore.mhd - ${TEMP}/DeformableRegistration8Test12DisplacementField.mhd - 1 1 - ${TEMP}/DeformableRegistration8Test12FinalTransformParameters.txt - ${NUMBER_OF_BSPLINE_GRID_NODES} - ) + DATA{${ITK_EXAMPLE_DATA_ROOT}/BrainWeb/brainweb1e1a10f20.mha} + ${TEMP}/BSplineWarping2Test.mhd + ${TEMP}/DeformableRegistration8Test12.mhd + ${TEMP}/DeformableRegistration8Test12DifferenceAfter.mhd + ${TEMP}/DeformableRegistration8Test12DifferenceBefore.mhd + ${TEMP}/DeformableRegistration8Test12DisplacementField.mhd + 1 + 1 + ${TEMP}/DeformableRegistration8Test12FinalTransformParameters.txt + ${NUMBER_OF_BSPLINE_GRID_NODES}) set_property(TEST ITKv3DeformableRegistration8Test12 PROPERTY DEPENDS BSplineWarping2Test) - set_property(TEST ITKv3DeformableRegistration8Test12 APPEND PROPERTY LABELS RUNS_LONG) + set_property( + TEST ITKv3DeformableRegistration8Test12 + APPEND + PROPERTY LABELS RUNS_LONG) # Due to the large memory requirements this tests lock the memory size resource - set_tests_properties( - ITKv3DeformableRegistration8Test11 - ITKv3DeformableRegistration8Test12 - PROPERTIES - RESOURCE_LOCK MEMORY_SIZE - ) - endif() # ITK_COMPUTER_MEMORY_SIZE GREATER 16 + set_tests_properties(ITKv3DeformableRegistration8Test11 ITKv3DeformableRegistration8Test12 + PROPERTIES RESOURCE_LOCK MEMORY_SIZE) + endif() # ITK_COMPUTER_MEMORY_SIZE GREATER 16 endif() # ITK_COMPUTER_MEMORY_SIZE GREATER 6 @@ -532,15 +777,20 @@ endif() # ITK_USE_BRAINWEB_DATA # This example in getting stuck and timing out, likely due to spatial # object changes. -if (TEST_DISABLED) -itk_add_test(NAME ITKv3ImageRegistration12Test COMMAND ${ITK_TEST_DRIVER} - --compare DATA{${BASELINE}/ImageRegistration12TestPixelCentered.png} - ${TEMP}/ImageRegistration12TestPixelCentered.png - --compareNumberOfPixelsTolerance 2 - $ - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20Mask.png - ${TEMP}/ImageRegistration12TestPixelCentered.png -) +if(TEST_DISABLED) + itk_add_test( + NAME + ITKv3ImageRegistration12Test + COMMAND + ${ITK_TEST_DRIVER} + --compare + DATA{${BASELINE}/ImageRegistration12TestPixelCentered.png} + ${TEMP}/ImageRegistration12TestPixelCentered.png + --compareNumberOfPixelsTolerance + 2 + $ + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceR10X13Y17.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20Mask.png + ${TEMP}/ImageRegistration12TestPixelCentered.png) endif() diff --git a/Modules/Registration/Common/wrapping/itkBlockMatchingImageFilter.wrap b/Modules/Registration/Common/wrapping/itkBlockMatchingImageFilter.wrap index d199dbcd67c..a5b01f443ad 100644 --- a/Modules/Registration/Common/wrapping/itkBlockMatchingImageFilter.wrap +++ b/Modules/Registration/Common/wrapping/itkBlockMatchingImageFilter.wrap @@ -2,6 +2,6 @@ itk_wrap_filter_dims(has_d_3 3) if(has_d_3) itk_wrap_class("itk::BlockMatchingImageFilter" POINTER_WITH_2_SUPERCLASSES) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 3) + itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 3) itk_end_wrap_class() endif() diff --git a/Modules/Registration/Common/wrapping/itkCenteredTransformInitializer.wrap b/Modules/Registration/Common/wrapping/itkCenteredTransformInitializer.wrap index bb017451fae..c70ab2a4f5f 100644 --- a/Modules/Registration/Common/wrapping/itkCenteredTransformInitializer.wrap +++ b/Modules/Registration/Common/wrapping/itkCenteredTransformInitializer.wrap @@ -1,17 +1,19 @@ itk_wrap_include("itkVersorRigid3DTransform.h") itk_wrap_include("itkCenteredRigid2DTransform.h") itk_wrap_class("itk::CenteredTransformInitializer" POINTER) - itk_wrap_filter_dims(d 3) - if(d) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("VR3DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::VersorRigid3DTransform< ${ITKT_D} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}") - endforeach() - endif() +itk_wrap_filter_dims(d 3) +if(d) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("VR3DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" + "itk::VersorRigid3DTransform< ${ITKT_D} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}") + endforeach() +endif() - itk_wrap_filter_dims(d 2) - if(d) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("MOTB${ITKM_D}22${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::MatrixOffsetTransformBase< ${ITKT_D},2,2 >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}") - endforeach() - endif() +itk_wrap_filter_dims(d 2) +if(d) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("MOTB${ITKM_D}22${ITKM_I${t}${d}}${ITKM_I${t}${d}}" + "itk::MatrixOffsetTransformBase< ${ITKT_D},2,2 >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}") + endforeach() +endif() itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkCenteredVersorTransformInitializer.wrap b/Modules/Registration/Common/wrapping/itkCenteredVersorTransformInitializer.wrap index 04c196afe33..1747ce964f4 100644 --- a/Modules/Registration/Common/wrapping/itkCenteredVersorTransformInitializer.wrap +++ b/Modules/Registration/Common/wrapping/itkCenteredVersorTransformInitializer.wrap @@ -2,6 +2,6 @@ itk_wrap_filter_dims(has_d_3 3) if(has_d_3) itk_wrap_class("itk::CenteredVersorTransformInitializer" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 3) + itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 3) itk_end_wrap_class() endif() diff --git a/Modules/Registration/Common/wrapping/itkGradientDifferenceImageToImageMetric.wrap b/Modules/Registration/Common/wrapping/itkGradientDifferenceImageToImageMetric.wrap index 1cb2c2c3bbe..5d227d66a33 100644 --- a/Modules/Registration/Common/wrapping/itkGradientDifferenceImageToImageMetric.wrap +++ b/Modules/Registration/Common/wrapping/itkGradientDifferenceImageToImageMetric.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::GradientDifferenceImageToImageMetric" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkImageRegistrationMethod.wrap b/Modules/Registration/Common/wrapping/itkImageRegistrationMethod.wrap index 0fd88645b17..f13a451e90f 100644 --- a/Modules/Registration/Common/wrapping/itkImageRegistrationMethod.wrap +++ b/Modules/Registration/Common/wrapping/itkImageRegistrationMethod.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ImageRegistrationMethod" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkImageToImageMetric.wrap b/Modules/Registration/Common/wrapping/itkImageToImageMetric.wrap index 7b93c887de1..f3923c7cac8 100644 --- a/Modules/Registration/Common/wrapping/itkImageToImageMetric.wrap +++ b/Modules/Registration/Common/wrapping/itkImageToImageMetric.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ImageToImageMetric" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkLandmarkBasedTransformInitializer.wrap b/Modules/Registration/Common/wrapping/itkLandmarkBasedTransformInitializer.wrap index e379e7a8910..2543101dba5 100644 --- a/Modules/Registration/Common/wrapping/itkLandmarkBasedTransformInitializer.wrap +++ b/Modules/Registration/Common/wrapping/itkLandmarkBasedTransformInitializer.wrap @@ -1,8 +1,8 @@ -UNIQUE(types "D;${WRAP_ITK_REAL}") +unique(types "D;${WRAP_ITK_REAL}") itk_wrap_class("itk::LandmarkBasedTransformInitializer" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("T${t}${d}${d}" "itk::Transform<${ITKT_${t}},${d},${d}>") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("T${t}${d}${d}" "itk::Transform<${ITKT_${t}},${d},${d}>") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkMatchCardinalityImageToImageMetric.wrap b/Modules/Registration/Common/wrapping/itkMatchCardinalityImageToImageMetric.wrap index 3553d5168fe..762ac2654d6 100644 --- a/Modules/Registration/Common/wrapping/itkMatchCardinalityImageToImageMetric.wrap +++ b/Modules/Registration/Common/wrapping/itkMatchCardinalityImageToImageMetric.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MatchCardinalityImageToImageMetric" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkMattesMutualInformationImageToImageMetric.wrap b/Modules/Registration/Common/wrapping/itkMattesMutualInformationImageToImageMetric.wrap index 79f3622b648..ff95ad47af7 100644 --- a/Modules/Registration/Common/wrapping/itkMattesMutualInformationImageToImageMetric.wrap +++ b/Modules/Registration/Common/wrapping/itkMattesMutualInformationImageToImageMetric.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MattesMutualInformationImageToImageMetric" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkMeanReciprocalSquareDifferenceImageToImageMetric.wrap b/Modules/Registration/Common/wrapping/itkMeanReciprocalSquareDifferenceImageToImageMetric.wrap index 83220c6f86c..048c50fc4d3 100644 --- a/Modules/Registration/Common/wrapping/itkMeanReciprocalSquareDifferenceImageToImageMetric.wrap +++ b/Modules/Registration/Common/wrapping/itkMeanReciprocalSquareDifferenceImageToImageMetric.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MeanReciprocalSquareDifferenceImageToImageMetric" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkMeanSquaresImageToImageMetric.wrap b/Modules/Registration/Common/wrapping/itkMeanSquaresImageToImageMetric.wrap index adda2f14014..3f7d8d1acea 100644 --- a/Modules/Registration/Common/wrapping/itkMeanSquaresImageToImageMetric.wrap +++ b/Modules/Registration/Common/wrapping/itkMeanSquaresImageToImageMetric.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MeanSquaresImageToImageMetric" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkMultiResolutionImageRegistrationMethod.wrap b/Modules/Registration/Common/wrapping/itkMultiResolutionImageRegistrationMethod.wrap index bfbb12642d7..d74dcd0163c 100644 --- a/Modules/Registration/Common/wrapping/itkMultiResolutionImageRegistrationMethod.wrap +++ b/Modules/Registration/Common/wrapping/itkMultiResolutionImageRegistrationMethod.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MultiResolutionImageRegistrationMethod" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkMultiResolutionPyramidImageFilter.wrap b/Modules/Registration/Common/wrapping/itkMultiResolutionPyramidImageFilter.wrap index b7523441c2d..2e9a2a43f94 100644 --- a/Modules/Registration/Common/wrapping/itkMultiResolutionPyramidImageFilter.wrap +++ b/Modules/Registration/Common/wrapping/itkMultiResolutionPyramidImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MultiResolutionPyramidImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkMutualInformationImageToImageMetric.wrap b/Modules/Registration/Common/wrapping/itkMutualInformationImageToImageMetric.wrap index ae8933986d5..a32adae315f 100644 --- a/Modules/Registration/Common/wrapping/itkMutualInformationImageToImageMetric.wrap +++ b/Modules/Registration/Common/wrapping/itkMutualInformationImageToImageMetric.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MutualInformationImageToImageMetric" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkNormalizedCorrelationImageToImageMetric.wrap b/Modules/Registration/Common/wrapping/itkNormalizedCorrelationImageToImageMetric.wrap index 7b03f8d613b..69877dac714 100644 --- a/Modules/Registration/Common/wrapping/itkNormalizedCorrelationImageToImageMetric.wrap +++ b/Modules/Registration/Common/wrapping/itkNormalizedCorrelationImageToImageMetric.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::NormalizedCorrelationImageToImageMetric" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkPDEDeformableRegistrationFunction.wrap b/Modules/Registration/Common/wrapping/itkPDEDeformableRegistrationFunction.wrap index 4db7d7913bd..f85a44d507d 100644 --- a/Modules/Registration/Common/wrapping/itkPDEDeformableRegistrationFunction.wrap +++ b/Modules/Registration/Common/wrapping/itkPDEDeformableRegistrationFunction.wrap @@ -1,5 +1,9 @@ itk_wrap_class("itk::PDEDeformableRegistrationFunction" POINTER) - foreach(s ${WRAP_ITK_SCALAR}) - itk_wrap_image_filter_combinations("${s}" "${s}" "${WRAP_ITK_VECTOR_REAL}" 2+) - endforeach() +foreach(s ${WRAP_ITK_SCALAR}) + itk_wrap_image_filter_combinations( + "${s}" + "${s}" + "${WRAP_ITK_VECTOR_REAL}" + 2+) +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkPointSetToPointSetMetric.wrap b/Modules/Registration/Common/wrapping/itkPointSetToPointSetMetric.wrap index 0bf3005b6b0..84b0a38e450 100644 --- a/Modules/Registration/Common/wrapping/itkPointSetToPointSetMetric.wrap +++ b/Modules/Registration/Common/wrapping/itkPointSetToPointSetMetric.wrap @@ -1,15 +1,15 @@ itk_wrap_include("itkPointSet.h") -UNIQUE(types "${WRAP_ITK_REAL};D") +unique(types "${WRAP_ITK_REAL};D") itk_wrap_class("itk::PointSetToPointSetMetric" POINTER_WITH_2_SUPERCLASSES) - foreach(d ${ITK_WRAP_DIMS}) - foreach(t ${types}) - itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >, itk::PointSet< ${ITKT_${t}},${d} >") - endforeach() +foreach(d ${ITK_WRAP_DIMS}) + foreach(t ${types}) + itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >, itk::PointSet< ${ITKT_${t}},${d} >") endforeach() - if(d3 AND d2) - foreach(t ${types}) - itk_wrap_template("PS${ITKM_${t}}23" "itk::PointSet< ${ITKT_${t}},2 >, itk::PointSet< ${ITKT_${t}},3 >") - endforeach() - endif() +endforeach() +if(d3 AND d2) + foreach(t ${types}) + itk_wrap_template("PS${ITKM_${t}}23" "itk::PointSet< ${ITKT_${t}},2 >, itk::PointSet< ${ITKT_${t}},3 >") + endforeach() +endif() itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkPointSetToPointSetRegistrationMethod.wrap b/Modules/Registration/Common/wrapping/itkPointSetToPointSetRegistrationMethod.wrap index f46fb4c1aab..fe5675ca42e 100644 --- a/Modules/Registration/Common/wrapping/itkPointSetToPointSetRegistrationMethod.wrap +++ b/Modules/Registration/Common/wrapping/itkPointSetToPointSetRegistrationMethod.wrap @@ -2,19 +2,19 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkPointSetToPointSetRegistrationMethod.h") itk_wrap_include("itkPointSet.h") -UNIQUE(types "${WRAP_ITK_REAL};D") +unique(types "${WRAP_ITK_REAL};D") itk_wrap_class("itk::PointSetToPointSetRegistrationMethod" POINTER) - foreach(d ${ITK_WRAP_DIMS}) - foreach(t ${types}) - itk_wrap_template("REG${ITKM_${t}}${d}${ITKM_${t}}${d}" - "itk::PointSet< ${ITKT_${t}}, ${d} >, itk::PointSet< ${ITKT_${t}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_DIMS}) + foreach(t ${types}) + itk_wrap_template("REG${ITKM_${t}}${d}${ITKM_${t}}${d}" + "itk::PointSet< ${ITKT_${t}}, ${d} >, itk::PointSet< ${ITKT_${t}}, ${d} >") endforeach() - if(d3 AND d2) - foreach(t ${types}) - itk_wrap_template("REG${ITKM_${t}}2${ITKM_${t}}3" - "itk::PointSet< ${ITKT_${t}}, 2 >, itk::PointSet< ${ITKT_${t}}, 3 >") - endforeach() - endif() +endforeach() +if(d3 AND d2) + foreach(t ${types}) + itk_wrap_template("REG${ITKM_${t}}2${ITKM_${t}}3" + "itk::PointSet< ${ITKT_${t}}, 2 >, itk::PointSet< ${ITKT_${t}}, 3 >") + endforeach() +endif() itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkPointsLocator.wrap b/Modules/Registration/Common/wrapping/itkPointsLocator.wrap index 72b08e7b6ef..76d7489a50d 100644 --- a/Modules/Registration/Common/wrapping/itkPointsLocator.wrap +++ b/Modules/Registration/Common/wrapping/itkPointsLocator.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::PointsLocator" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("VC${ITKM_IT}${ITKM_P${t}${d}}" "itk::VectorContainer<${ITKT_IT}, ${ITKT_P${t}${d}} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("VC${ITKM_IT}${ITKM_P${t}${d}}" "itk::VectorContainer<${ITKT_IT}, ${ITKT_P${t}${d}} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkRecursiveMultiResolutionPyramidImageFilter.wrap b/Modules/Registration/Common/wrapping/itkRecursiveMultiResolutionPyramidImageFilter.wrap index 663de41e0bc..69d4796260c 100644 --- a/Modules/Registration/Common/wrapping/itkRecursiveMultiResolutionPyramidImageFilter.wrap +++ b/Modules/Registration/Common/wrapping/itkRecursiveMultiResolutionPyramidImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::RecursiveMultiResolutionPyramidImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/itkTransformParametersAdaptorBase.wrap b/Modules/Registration/Common/wrapping/itkTransformParametersAdaptorBase.wrap index b1aa5ede2e7..200a4d8b38b 100644 --- a/Modules/Registration/Common/wrapping/itkTransformParametersAdaptorBase.wrap +++ b/Modules/Registration/Common/wrapping/itkTransformParametersAdaptorBase.wrap @@ -1,10 +1,9 @@ itk_wrap_include("itkTransform.h") itk_wrap_class("itk::TransformParametersAdaptorBase" POINTER) - UNIQUE(real_types "${WRAP_ITK_REAL};D") - foreach(d ${ITK_WRAP_DIMS}) - foreach(t ${real_types}) - itk_wrap_template("${ITKM_${t}}${d}" - "itk::Transform< ${ITKT_${t}},${d},${d} >") - endforeach() +unique(real_types "${WRAP_ITK_REAL};D") +foreach(d ${ITK_WRAP_DIMS}) + foreach(t ${real_types}) + itk_wrap_template("${ITKM_${t}}${d}" "itk::Transform< ${ITKT_${t}},${d},${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/Common/wrapping/test/CMakeLists.txt b/Modules/Registration/Common/wrapping/test/CMakeLists.txt index b441b58703c..e2faa793cf8 100644 --- a/Modules/Registration/Common/wrapping/test/CMakeLists.txt +++ b/Modules/Registration/Common/wrapping/test/CMakeLists.txt @@ -1,3 +1,7 @@ if(ITK_WRAP_PYTHON) - itk_python_add_test(NAME itkPointsLocatorPythonTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/itkPointsLocatorTest.py) + itk_python_add_test( + NAME + itkPointsLocatorPythonTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/itkPointsLocatorTest.py) endif() diff --git a/Modules/Registration/FEM/itk-module.cmake b/Modules/Registration/FEM/itk-module.cmake index e953d0c1809..5266fe89c34 100644 --- a/Modules/Registration/FEM/itk-module.cmake +++ b/Modules/Registration/FEM/itk-module.cmake @@ -1,21 +1,22 @@ -set(DOCUMENTATION "This module contains classes to perform deformable image +set(DOCUMENTATION + "This module contains classes to perform deformable image registration with a structural mechanics, finite element method (FEM) deformation model. Local loads (forces) are determined by the image-to-image metric, and the solid body is assumed to have uniform density and elasticity.") -itk_module(ITKFEMRegistration +itk_module( + ITKFEMRegistration ENABLE_SHARED DEPENDS - ITKFEM - ITKImageStatistics - ITKPDEDeformableRegistration - ITKImageFeature - ITKSpatialObjects + ITKFEM + ITKImageStatistics + ITKPDEDeformableRegistration + ITKImageFeature + ITKSpatialObjects TEST_DEPENDS - ITKTestKernel - ITKImageSources - ITKIOMeta + ITKTestKernel + ITKImageSources + ITKIOMeta DESCRIPTION - "${DOCUMENTATION}" - EXCLUDE_FROM_DEFAULT -) + "${DOCUMENTATION}" + EXCLUDE_FROM_DEFAULT) diff --git a/Modules/Registration/FEM/src/CMakeLists.txt b/Modules/Registration/FEM/src/CMakeLists.txt index 80f1e8ca84e..e05521a0704 100644 --- a/Modules/Registration/FEM/src/CMakeLists.txt +++ b/Modules/Registration/FEM/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKFEMRegistration_SRCS - itkFEMRegistrationFilter.cxx - ) +set(ITKFEMRegistration_SRCS itkFEMRegistrationFilter.cxx) itk_module_add_library(ITKFEMRegistration ${ITKFEMRegistration_SRCS}) diff --git a/Modules/Registration/FEM/test/CMakeLists.txt b/Modules/Registration/FEM/test/CMakeLists.txt index 11f39f22ef8..d551fc57f82 100644 --- a/Modules/Registration/FEM/test/CMakeLists.txt +++ b/Modules/Registration/FEM/test/CMakeLists.txt @@ -1,41 +1,77 @@ itk_module_test() set(ITKFEMRegistrationTests -itkFEMFiniteDifferenceFunctionLoadTest.cxx -itkFEMRegistrationFilterTest.cxx -itkFEMRegistrationFilter2DTest.cxx -itkMIRegistrationFunctionTest.cxx -itkFEMRegistrationFilterTest2.cxx -itkPhysicsBasedNonRigidRegistrationMethodTest.cxx -) + itkFEMFiniteDifferenceFunctionLoadTest.cxx + itkFEMRegistrationFilterTest.cxx + itkFEMRegistrationFilter2DTest.cxx + itkMIRegistrationFunctionTest.cxx + itkFEMRegistrationFilterTest2.cxx + itkPhysicsBasedNonRigidRegistrationMethodTest.cxx) # For itkPhysicsBasedNonRigidRegistrationMethodTest.cxx include_directories(${ITKFEMRegistration_SOURCE_DIR}/test) -CreateTestDriver(ITKFEMRegistration "${ITKFEMRegistration-Test_LIBRARIES}" "${ITKFEMRegistrationTests}") +createtestdriver(ITKFEMRegistration "${ITKFEMRegistration-Test_LIBRARIES}" "${ITKFEMRegistrationTests}") -itk_add_test(NAME itkFEMFiniteDifferenceFunctionLoadTest - COMMAND ITKFEMRegistrationTestDriver itkFEMFiniteDifferenceFunctionLoadTest - ${ITK_TEST_OUTPUT_DIR}/FiniteDifferenceFunctionLoadTest) -itk_add_test(NAME itkFEMRegistrationFilterTest - COMMAND ITKFEMRegistrationTestDriver itkFEMRegistrationFilterTest - ${ITK_TEST_OUTPUT_DIR}/FEMDeformationField3D ${ITK_TEST_OUTPUT_DIR}/FEMDeformedMovingImage3D) -itk_add_test(NAME itkFEMRegistrationFilter2DTest - COMMAND ITKFEMRegistrationTestDriver itkFEMRegistrationFilter2DTest - ${ITK_TEST_OUTPUT_DIR}/FEMDeformationField2D ${ITK_TEST_OUTPUT_DIR}/FEMDeformedMovingImage2D) -itk_add_test(NAME itkMIRegistrationFunctionTest - COMMAND ITKFEMRegistrationTestDriver itkMIRegistrationFunctionTest) -itk_add_test(NAME itkFEMRegistrationFilterTest2 - COMMAND ITKFEMRegistrationTestDriver itkFEMRegistrationFilterTest2 - ${ITK_TEST_OUTPUT_DIR}/FEMDeformationField3DMultiRes ${ITK_TEST_OUTPUT_DIR}/FEMDeformedMovingImage3DMultiRes) -itk_add_test(NAME itkPhysicsBasedNonRigidRegistrationMethodTest - COMMAND ITKFEMRegistrationTestDriver - --compareRadiusTolerance 5 - --compareNumberOfPixelsTolerance 0 - --compareIntensityTolerance 9 - --compare DATA{${CMAKE_CURRENT_SOURCE_DIR}/Baseline/itkPhysicsBasedNonRigidRegistrationMethodTest.mha} - ${ITK_TEST_OUTPUT_DIR}/itkPhysicsBasedNonRigidRegistrationMethodTest.mha - itkPhysicsBasedNonRigidRegistrationMethodTest DATA{${CMAKE_CURRENT_SOURCE_DIR}/Input/PBNRRFixedImage.nii.gz} - DATA{${CMAKE_CURRENT_SOURCE_DIR}/Input/PBNRRMovingImage.nii.gz} - DATA{${CMAKE_CURRENT_SOURCE_DIR}/Input/PBNRRMaskImage.nii.gz} - DATA{${CMAKE_CURRENT_SOURCE_DIR}/Input/PBNRRMesh.vtk} - ${ITK_TEST_OUTPUT_DIR}/itkPhysicsBasedNonRigidRegistrationMethodTest.mha 0.05 0 2 5 10 10) +itk_add_test( + NAME + itkFEMFiniteDifferenceFunctionLoadTest + COMMAND + ITKFEMRegistrationTestDriver + itkFEMFiniteDifferenceFunctionLoadTest + ${ITK_TEST_OUTPUT_DIR}/FiniteDifferenceFunctionLoadTest) +itk_add_test( + NAME + itkFEMRegistrationFilterTest + COMMAND + ITKFEMRegistrationTestDriver + itkFEMRegistrationFilterTest + ${ITK_TEST_OUTPUT_DIR}/FEMDeformationField3D + ${ITK_TEST_OUTPUT_DIR}/FEMDeformedMovingImage3D) +itk_add_test( + NAME + itkFEMRegistrationFilter2DTest + COMMAND + ITKFEMRegistrationTestDriver + itkFEMRegistrationFilter2DTest + ${ITK_TEST_OUTPUT_DIR}/FEMDeformationField2D + ${ITK_TEST_OUTPUT_DIR}/FEMDeformedMovingImage2D) +itk_add_test( + NAME + itkMIRegistrationFunctionTest + COMMAND + ITKFEMRegistrationTestDriver + itkMIRegistrationFunctionTest) +itk_add_test( + NAME + itkFEMRegistrationFilterTest2 + COMMAND + ITKFEMRegistrationTestDriver + itkFEMRegistrationFilterTest2 + ${ITK_TEST_OUTPUT_DIR}/FEMDeformationField3DMultiRes + ${ITK_TEST_OUTPUT_DIR}/FEMDeformedMovingImage3DMultiRes) +itk_add_test( + NAME + itkPhysicsBasedNonRigidRegistrationMethodTest + COMMAND + ITKFEMRegistrationTestDriver + --compareRadiusTolerance + 5 + --compareNumberOfPixelsTolerance + 0 + --compareIntensityTolerance + 9 + --compare + DATA{${CMAKE_CURRENT_SOURCE_DIR}/Baseline/itkPhysicsBasedNonRigidRegistrationMethodTest.mha} + ${ITK_TEST_OUTPUT_DIR}/itkPhysicsBasedNonRigidRegistrationMethodTest.mha + itkPhysicsBasedNonRigidRegistrationMethodTest + DATA{${CMAKE_CURRENT_SOURCE_DIR}/Input/PBNRRFixedImage.nii.gz} + DATA{${CMAKE_CURRENT_SOURCE_DIR}/Input/PBNRRMovingImage.nii.gz} + DATA{${CMAKE_CURRENT_SOURCE_DIR}/Input/PBNRRMaskImage.nii.gz} + DATA{${CMAKE_CURRENT_SOURCE_DIR}/Input/PBNRRMesh.vtk} + ${ITK_TEST_OUTPUT_DIR}/itkPhysicsBasedNonRigidRegistrationMethodTest.mha + 0.05 + 0 + 2 + 5 + 10 + 10) diff --git a/Modules/Registration/GPUCommon/CMakeLists.txt b/Modules/Registration/GPUCommon/CMakeLists.txt index 7563ae38f07..c4373175b45 100644 --- a/Modules/Registration/GPUCommon/CMakeLists.txt +++ b/Modules/Registration/GPUCommon/CMakeLists.txt @@ -1,6 +1,6 @@ project(ITKGPURegistrationCommon) -if (ITK_USE_GPU) +if(ITK_USE_GPU) set(ITKGPURegistrationCommon_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) set(ITKGPURegistrationCommon_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) endif() diff --git a/Modules/Registration/GPUCommon/itk-module.cmake b/Modules/Registration/GPUCommon/itk-module.cmake index ca51c21dbc5..28c3c26b280 100644 --- a/Modules/Registration/GPUCommon/itk-module.cmake +++ b/Modules/Registration/GPUCommon/itk-module.cmake @@ -1,13 +1,13 @@ set(DOCUMENTATION "This module contains some common components to support GPU-based registrations") -itk_module(ITKGPURegistrationCommon +itk_module( + ITKGPURegistrationCommon DEPENDS - ITKCommon - ITKGPUCommon - ITKGPUFiniteDifference + ITKCommon + ITKGPUCommon + ITKGPUFiniteDifference TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Registration/GPUPDEDeformable/CMakeLists.txt b/Modules/Registration/GPUPDEDeformable/CMakeLists.txt index c8d70a423da..786d55a51bc 100644 --- a/Modules/Registration/GPUPDEDeformable/CMakeLists.txt +++ b/Modules/Registration/GPUPDEDeformable/CMakeLists.txt @@ -1,6 +1,6 @@ project(ITKGPUPDEDeformableRegistration) -if (ITK_USE_GPU) +if(ITK_USE_GPU) set(ITKGPUPDEDeformableRegistration_LIBRARIES ITKGPUPDEDeformableRegistration) set(ITKGPUPDEDeformableRegistration_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) set(ITKGPUPDEDeformableRegistration_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) diff --git a/Modules/Registration/GPUPDEDeformable/itk-module.cmake b/Modules/Registration/GPUPDEDeformable/itk-module.cmake index ced6d12fac9..2eafc7e38bc 100644 --- a/Modules/Registration/GPUPDEDeformable/itk-module.cmake +++ b/Modules/Registration/GPUPDEDeformable/itk-module.cmake @@ -1,21 +1,22 @@ -set(DOCUMENTATION "This module contains the GPU implementation of classes +set(DOCUMENTATION + "This module contains the GPU implementation of classes for deformable image registration based on intensity differences by solving the PDE, optical flow problem. This includes Thirion's popular \"demons\" algorithm.") -itk_module(ITKGPUPDEDeformableRegistration +itk_module( + ITKGPUPDEDeformableRegistration DEPENDS - ITKCommon - ITKGPUCommon - ITKGPUFiniteDifference + ITKCommon + ITKGPUCommon + ITKGPUFiniteDifference COMPILE_DEPENDS - ITKPDEDeformableRegistration - ITKGPURegistrationCommon + ITKPDEDeformableRegistration + ITKGPURegistrationCommon TEST_DEPENDS - ITKTestKernel - ITKImageGrid - ITKImageIntensity - ITKImageFunction + ITKTestKernel + ITKImageGrid + ITKImageIntensity + ITKImageFunction DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Registration/GPUPDEDeformable/src/CMakeLists.txt b/Modules/Registration/GPUPDEDeformable/src/CMakeLists.txt index 28b1d194cd0..e5970c549bf 100644 --- a/Modules/Registration/GPUPDEDeformable/src/CMakeLists.txt +++ b/Modules/Registration/GPUPDEDeformable/src/CMakeLists.txt @@ -1,11 +1,7 @@ -if (ITK_USE_GPU) - set(ITKGPUPDEDeformableRegistration_SRCS - ) +if(ITK_USE_GPU) + set(ITKGPUPDEDeformableRegistration_SRCS) - set(ITKGPUPDEDeformableRegistration_Kernels - GPUDemonsRegistrationFunction.cl - GPUPDEDeformableRegistrationFilter.cl - ) + set(ITKGPUPDEDeformableRegistration_Kernels GPUDemonsRegistrationFunction.cl GPUPDEDeformableRegistrationFilter.cl) write_gpu_kernels("${ITKGPUPDEDeformableRegistration_Kernels}" ITKGPUPDEDeformableRegistration_SRCS) diff --git a/Modules/Registration/GPUPDEDeformable/test/CMakeLists.txt b/Modules/Registration/GPUPDEDeformable/test/CMakeLists.txt index c69941cde1e..4a0d5fe90bd 100644 --- a/Modules/Registration/GPUPDEDeformable/test/CMakeLists.txt +++ b/Modules/Registration/GPUPDEDeformable/test/CMakeLists.txt @@ -1,40 +1,48 @@ -if (ITK_USE_GPU) - -itk_module_test() - -set(ITKGPUPDEDeformableRegistration-tests - itkGPUDemonsRegistrationFilterTest.cxx - itkGPUDemonsRegistrationFilterTest2.cxx - ) - -set(ITKGPUPDEDeformableRegistrationTest_LIBRARIES ITKCommon;ITKGPUCommon;ITKGPUFiniteDifference;ITKGPUPDEDeformableRegistration;ITKStatistics;ITKSpatialObjects;ITKPath;ITKOptimizers;ITKIOBMP;ITKIOBioRad;ITKIOGDCM;ITKIOGIPL;ITKIOJPEG;ITKIOLSM;ITKIOMeta;ITKIONIFTI;ITKIONRRD;ITKIOPNG;ITKIOStimulate;ITKIOTIFF;ITKIOVTK;itksys) - -CreateTestDriver(ITKGPUPDEDeformableRegistration - "${ITKGPUPDEDeformableRegistrationTest_LIBRARIES}" - "${ITKGPUPDEDeformableRegistration-tests}") - -itk_add_test(NAME itkGPUDemonsRegistrationFilterTestDim2 - COMMAND ITKGPUPDEDeformableRegistrationTestDriver itkGPUDemonsRegistrationFilterTest - 2 # number of dimensions - 50 # number of iterations - DATA{Input/LenaFix.png} - DATA{Input/LenaMov.png} - ${ITK_TEST_OUTPUT_DIR}/gpuDemonsRegistrationTest2D.mha) - -itk_add_test(NAME itkGPUDemonsRegistrationFilterTestDim3 - COMMAND ITKGPUPDEDeformableRegistrationTestDriver itkGPUDemonsRegistrationFilterTest - 3 # number of dimensions - 50 # number of iterations - DATA{Input/LenaFix.png} - DATA{Input/LenaMov.png} - ${ITK_TEST_OUTPUT_DIR}/gpuDemonsRegistrationTest2D.mha) - -itk_add_test(NAME itkGPUDemonsRegistrationFilterTest2 - COMMAND ITKGPUPDEDeformableRegistrationTestDriver - itkGPUDemonsRegistrationFilterTest2 - ${ITK_TEST_OUTPUT_DIR}/gpuDemonsRegistrationTest2Fixed.mha - ${ITK_TEST_OUTPUT_DIR}/gpuDemonsRegistrationTest2Warped.mha - ) - +if(ITK_USE_GPU) + + itk_module_test() + + set(ITKGPUPDEDeformableRegistration-tests itkGPUDemonsRegistrationFilterTest.cxx + itkGPUDemonsRegistrationFilterTest2.cxx) + + set(ITKGPUPDEDeformableRegistrationTest_LIBRARIES + ITKCommon;ITKGPUCommon;ITKGPUFiniteDifference;ITKGPUPDEDeformableRegistration;ITKStatistics;ITKSpatialObjects;ITKPath;ITKOptimizers;ITKIOBMP;ITKIOBioRad;ITKIOGDCM;ITKIOGIPL;ITKIOJPEG;ITKIOLSM;ITKIOMeta;ITKIONIFTI;ITKIONRRD;ITKIOPNG;ITKIOStimulate;ITKIOTIFF;ITKIOVTK;itksys + ) + + createtestdriver(ITKGPUPDEDeformableRegistration "${ITKGPUPDEDeformableRegistrationTest_LIBRARIES}" + "${ITKGPUPDEDeformableRegistration-tests}") + + itk_add_test( + NAME + itkGPUDemonsRegistrationFilterTestDim2 + COMMAND + ITKGPUPDEDeformableRegistrationTestDriver + itkGPUDemonsRegistrationFilterTest + 2 # number of dimensions + 50 # number of iterations + DATA{Input/LenaFix.png} + DATA{Input/LenaMov.png} + ${ITK_TEST_OUTPUT_DIR}/gpuDemonsRegistrationTest2D.mha) + + itk_add_test( + NAME + itkGPUDemonsRegistrationFilterTestDim3 + COMMAND + ITKGPUPDEDeformableRegistrationTestDriver + itkGPUDemonsRegistrationFilterTest + 3 # number of dimensions + 50 # number of iterations + DATA{Input/LenaFix.png} + DATA{Input/LenaMov.png} + ${ITK_TEST_OUTPUT_DIR}/gpuDemonsRegistrationTest2D.mha) + + itk_add_test( + NAME + itkGPUDemonsRegistrationFilterTest2 + COMMAND + ITKGPUPDEDeformableRegistrationTestDriver + itkGPUDemonsRegistrationFilterTest2 + ${ITK_TEST_OUTPUT_DIR}/gpuDemonsRegistrationTest2Fixed.mha + ${ITK_TEST_OUTPUT_DIR}/gpuDemonsRegistrationTest2Warped.mha) endif() diff --git a/Modules/Registration/Metricsv4/itk-module.cmake b/Modules/Registration/Metricsv4/itk-module.cmake index 45006c472f7..36411bbc357 100644 --- a/Modules/Registration/Metricsv4/itk-module.cmake +++ b/Modules/Registration/Metricsv4/itk-module.cmake @@ -1,13 +1,15 @@ -set(DOCUMENTATION "This module contains ITK metric classes using a new hierarchy developed for the needs of registration with high-dimensional transforms. These metrics will NOT work with the optimizers in Numerics/Optimizers, but rather with the new optimizers in Numerics/Optimizersv4.") +set(DOCUMENTATION + "This module contains ITK metric classes using a new hierarchy developed for the needs of registration with high-dimensional transforms. These metrics will NOT work with the optimizers in Numerics/Optimizers, but rather with the new optimizers in Numerics/Optimizersv4." +) -itk_module(ITKMetricsv4 +itk_module( + ITKMetricsv4 DEPENDS - ITKCommon - ITKRegistrationCommon - ITKOptimizersv4 + ITKCommon + ITKRegistrationCommon + ITKOptimizersv4 TEST_DEPENDS - ITKTestKernel - ITKOptimizersv4 + ITKTestKernel + ITKOptimizersv4 DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Registration/Metricsv4/test/CMakeLists.txt b/Modules/Registration/Metricsv4/test/CMakeLists.txt index 49ac2da5dc5..90dc1244f1d 100644 --- a/Modules/Registration/Metricsv4/test/CMakeLists.txt +++ b/Modules/Registration/Metricsv4/test/CMakeLists.txt @@ -1,274 +1,405 @@ itk_module_test() set(ITKMetricsv4Tests - itkEuclideanDistancePointSetMetricTest.cxx - itkExpectationBasedPointSetMetricTest.cxx - itkJensenHavrdaCharvatTsallisPointSetMetricTest.cxx - itkJensenHavrdaCharvatTsallisPointSetMetricRegistrationTest.cxx - itkLabeledPointSetMetricTest.cxx - itkLabeledPointSetMetricRegistrationTest.cxx - itkImageToImageMetricv4Test.cxx - itkJointHistogramMutualInformationImageToImageMetricv4Test.cxx - itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx - itkMeanSquaresImageToImageMetricv4Test.cxx - itkCorrelationImageToImageMetricv4Test.cxx - itkMeanSquaresImageToImageMetricv4OnVectorTest.cxx - itkMeanSquaresImageToImageMetricv4OnVectorTest2.cxx - itkANTSNeighborhoodCorrelationImageToImageMetricv4Test.cxx - itkANTSNeighborhoodCorrelationImageToImageRegistrationTest.cxx - itkMattesMutualInformationImageToImageMetricv4Test.cxx - itkMattesMutualInformationImageToImageMetricv4RegistrationTest.cxx - itkMultiStartImageToImageMetricv4RegistrationTest.cxx - itkMultiGradientImageToImageMetricv4RegistrationTest.cxx - itkMetricImageGradientTest.cxx - itkMeanSquaresImageToImageMetricv4RegistrationTest.cxx - itkMeanSquaresImageToImageMetricv4RegistrationTest2.cxx - itkImageToImageMetricv4RegistrationTest.cxx - itkDemonsImageToImageMetricv4Test.cxx - itkDemonsImageToImageMetricv4RegistrationTest.cxx - itkEuclideanDistancePointSetMetricRegistrationTest.cxx - itkExpectationBasedPointSetMetricRegistrationTest.cxx - itkEuclideanDistancePointSetMetricTest2.cxx - itkEuclideanDistancePointSetMetricTest3.cxx - itkObjectToObjectMultiMetricv4Test.cxx - itkObjectToObjectMultiMetricv4RegistrationTest.cxx - itkMeanSquaresImageToImageMetricv4SpeedTest.cxx - itkMeanSquaresImageToImageMetricv4VectorRegistrationTest.cxx -) + itkEuclideanDistancePointSetMetricTest.cxx + itkExpectationBasedPointSetMetricTest.cxx + itkJensenHavrdaCharvatTsallisPointSetMetricTest.cxx + itkJensenHavrdaCharvatTsallisPointSetMetricRegistrationTest.cxx + itkLabeledPointSetMetricTest.cxx + itkLabeledPointSetMetricRegistrationTest.cxx + itkImageToImageMetricv4Test.cxx + itkJointHistogramMutualInformationImageToImageMetricv4Test.cxx + itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx + itkMeanSquaresImageToImageMetricv4Test.cxx + itkCorrelationImageToImageMetricv4Test.cxx + itkMeanSquaresImageToImageMetricv4OnVectorTest.cxx + itkMeanSquaresImageToImageMetricv4OnVectorTest2.cxx + itkANTSNeighborhoodCorrelationImageToImageMetricv4Test.cxx + itkANTSNeighborhoodCorrelationImageToImageRegistrationTest.cxx + itkMattesMutualInformationImageToImageMetricv4Test.cxx + itkMattesMutualInformationImageToImageMetricv4RegistrationTest.cxx + itkMultiStartImageToImageMetricv4RegistrationTest.cxx + itkMultiGradientImageToImageMetricv4RegistrationTest.cxx + itkMetricImageGradientTest.cxx + itkMeanSquaresImageToImageMetricv4RegistrationTest.cxx + itkMeanSquaresImageToImageMetricv4RegistrationTest2.cxx + itkImageToImageMetricv4RegistrationTest.cxx + itkDemonsImageToImageMetricv4Test.cxx + itkDemonsImageToImageMetricv4RegistrationTest.cxx + itkEuclideanDistancePointSetMetricRegistrationTest.cxx + itkExpectationBasedPointSetMetricRegistrationTest.cxx + itkEuclideanDistancePointSetMetricTest2.cxx + itkEuclideanDistancePointSetMetricTest3.cxx + itkObjectToObjectMultiMetricv4Test.cxx + itkObjectToObjectMultiMetricv4RegistrationTest.cxx + itkMeanSquaresImageToImageMetricv4SpeedTest.cxx + itkMeanSquaresImageToImageMetricv4VectorRegistrationTest.cxx) set(INPUTDATA ${ITK_DATA_ROOT}/Input) set(BASELINE_ROOT ${ITK_DATA_ROOT}/Baseline) set(TEMP ${ITK_TEST_OUTPUT_DIR}) -CreateTestDriver(ITKMetricsv4 "${ITKMetricsv4-Test_LIBRARIES}" "${ITKMetricsv4Tests}") - -itk_add_test(NAME itkEuclideanDistancePointSetMetricTest - COMMAND ITKMetricsv4TestDriver itkEuclideanDistancePointSetMetricTest) - -itk_add_test(NAME itkEuclideanDistancePointSetMetricTest2 - COMMAND ITKMetricsv4TestDriver itkEuclideanDistancePointSetMetricTest2) - -itk_add_test(NAME itkEuclideanDistancePointSetMetricTest3 - COMMAND ITKMetricsv4TestDriver itkEuclideanDistancePointSetMetricTest3) - -itk_add_test(NAME itkExpectationBasedPointSetMetricTest - COMMAND ITKMetricsv4TestDriver itkExpectationBasedPointSetMetricTest) - -itk_add_test(NAME itkJensenHavrdaCharvatTsallisPointSetMetricTest - COMMAND ITKMetricsv4TestDriver itkJensenHavrdaCharvatTsallisPointSetMetricTest) - -itk_add_test(NAME itkJensenHavrdaCharvatTsallisPointSetMetricRegistrationTest - COMMAND ITKMetricsv4TestDriver - itkJensenHavrdaCharvatTsallisPointSetMetricRegistrationTest) - -itk_add_test(NAME itkLabeledPointSetMetricTest - COMMAND ITKMetricsv4TestDriver itkLabeledPointSetMetricTest) - -itk_add_test(NAME itkLabeledPointSetMetricRegistrationTest - COMMAND ITKMetricsv4TestDriver - itkLabeledPointSetMetricRegistrationTest) - -itk_add_test(NAME itkImageToImageMetricv4Test - COMMAND ITKMetricsv4TestDriver - itkImageToImageMetricv4Test) - -itk_add_test(NAME itkJointHistogramMutualInformationImageToImageMetricv4Test - COMMAND ITKMetricsv4TestDriver - itkJointHistogramMutualInformationImageToImageMetricv4Test) - -itk_add_test(NAME itkJointHistogramMutualInformationImageToImageRegistrationTest - COMMAND ITKMetricsv4TestDriver - itkJointHistogramMutualInformationImageToImageRegistrationTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBSplined10.png - ${TEMP}/itkJointHistogramMutualInformationImageToImageRegistrationTest.nii.gz - 2 1) - -itk_add_test(NAME itkJointHistogramMutualInformationImageToImageRegistrationTest2 - COMMAND ITKMetricsv4TestDriver - itkJointHistogramMutualInformationImageToImageRegistrationTest - DATA{Baseline/face_avg.jpg} - DATA{Input/face_b.jpg} - ${TEMP}/itkJointHistogramMutualInformationImageToImageRegistrationTest2.nii.gz - 2 1) - -itk_add_test(NAME itkMeanSquaresImageToImageMetricv4Test - COMMAND ITKMetricsv4TestDriver - itkMeanSquaresImageToImageMetricv4Test) - -itk_add_test(NAME itkCorrelationImageToImageMetricv4Test - COMMAND ITKMetricsv4TestDriver - itkCorrelationImageToImageMetricv4Test) - -itk_add_test(NAME itkMeanSquaresImageToImageMetricv4OnVectorTest - COMMAND ITKMetricsv4TestDriver - itkMeanSquaresImageToImageMetricv4OnVectorTest) - -itk_add_test(NAME itkMeanSquaresImageToImageMetricv4OnVectorTest2 - COMMAND ITKMetricsv4TestDriver - itkMeanSquaresImageToImageMetricv4OnVectorTest2) - -itk_add_test(NAME itkANTSNeighborhoodCorrelationImageToImageMetricv4Test - COMMAND ITKMetricsv4TestDriver - itkANTSNeighborhoodCorrelationImageToImageMetricv4Test) - -itk_add_test(NAME itkANTSNeighborhoodCorrelationImageToImageRegistrationTest - COMMAND ITKMetricsv4TestDriver - itkANTSNeighborhoodCorrelationImageToImageRegistrationTest - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png - ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBSplined10.png - ${TEMP}/itkANTSNeighborhoodCorrelationImageToImageRegistrationTest.nii.gz - 1 1 0.25) - -itk_add_test(NAME itkMattesMutualInformationImageToImageMetricv4Test - COMMAND ITKMetricsv4TestDriver - itkMattesMutualInformationImageToImageMetricv4Test) - -itk_add_test(NAME itkMattesMutualInformationImageToImageMetricv4RegistrationTest - COMMAND ITKMetricsv4TestDriver - itkMattesMutualInformationImageToImageMetricv4RegistrationTest - DATA{Baseline/face_avg.jpg} - DATA{Input/face_b.jpg} - ${TEMP}/itkMattesMutualInformationImageToImageMetricv4RegistrationTest.nii.gz - 5 0) - -itk_add_test(NAME itkMultiStartImageToImageMetricv4RegistrationTest - COMMAND ITKMetricsv4TestDriver - itkMultiStartImageToImageMetricv4RegistrationTest - DATA{Baseline/face_avg.jpg} - DATA{Input/face_b.jpg} - ${TEMP}/itkMultiStartImageToImageMetricv4RegistrationTest.nii.gz - 5 1) - -itk_add_test(NAME itkMultiGradientImageToImageMetricv4RegistrationTest - COMMAND ITKMetricsv4TestDriver - itkMultiGradientImageToImageMetricv4RegistrationTest - DATA{Baseline/face_avg.jpg} - DATA{Input/face_b.jpg} - ${TEMP}/itkMultiGradientImageToImageMetricv4RegistrationTest.nii.gz - 5 ) - -itk_add_test(NAME itkMetricImageGradientTest - COMMAND ITKMetricsv4TestDriver - itkMetricImageGradientTest) - -itk_add_test(NAME itkMeanSquaresImageToImageMetricv4RegistrationTest - COMMAND ITKMetricsv4TestDriver - itkMeanSquaresImageToImageMetricv4RegistrationTest - DATA{Baseline/face_avg.jpg} - DATA{Input/face_b.jpg} - ${TEMP}/itkMeanSquaresImageToImageMetricv4RegistrationTest.nii.gz - 2 1) - -itk_add_test(NAME itkMeanSquaresImageToImageMetricv4RegistrationTest2 - COMMAND ITKMetricsv4TestDriver +createtestdriver(ITKMetricsv4 "${ITKMetricsv4-Test_LIBRARIES}" "${ITKMetricsv4Tests}") + +itk_add_test( + NAME + itkEuclideanDistancePointSetMetricTest + COMMAND + ITKMetricsv4TestDriver + itkEuclideanDistancePointSetMetricTest) + +itk_add_test( + NAME + itkEuclideanDistancePointSetMetricTest2 + COMMAND + ITKMetricsv4TestDriver + itkEuclideanDistancePointSetMetricTest2) + +itk_add_test( + NAME + itkEuclideanDistancePointSetMetricTest3 + COMMAND + ITKMetricsv4TestDriver + itkEuclideanDistancePointSetMetricTest3) + +itk_add_test( + NAME + itkExpectationBasedPointSetMetricTest + COMMAND + ITKMetricsv4TestDriver + itkExpectationBasedPointSetMetricTest) + +itk_add_test( + NAME + itkJensenHavrdaCharvatTsallisPointSetMetricTest + COMMAND + ITKMetricsv4TestDriver + itkJensenHavrdaCharvatTsallisPointSetMetricTest) + +itk_add_test( + NAME + itkJensenHavrdaCharvatTsallisPointSetMetricRegistrationTest + COMMAND + ITKMetricsv4TestDriver + itkJensenHavrdaCharvatTsallisPointSetMetricRegistrationTest) + +itk_add_test( + NAME + itkLabeledPointSetMetricTest + COMMAND + ITKMetricsv4TestDriver + itkLabeledPointSetMetricTest) + +itk_add_test( + NAME + itkLabeledPointSetMetricRegistrationTest + COMMAND + ITKMetricsv4TestDriver + itkLabeledPointSetMetricRegistrationTest) + +itk_add_test( + NAME + itkImageToImageMetricv4Test + COMMAND + ITKMetricsv4TestDriver + itkImageToImageMetricv4Test) + +itk_add_test( + NAME + itkJointHistogramMutualInformationImageToImageMetricv4Test + COMMAND + ITKMetricsv4TestDriver + itkJointHistogramMutualInformationImageToImageMetricv4Test) + +itk_add_test( + NAME + itkJointHistogramMutualInformationImageToImageRegistrationTest + COMMAND + ITKMetricsv4TestDriver + itkJointHistogramMutualInformationImageToImageRegistrationTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBSplined10.png + ${TEMP}/itkJointHistogramMutualInformationImageToImageRegistrationTest.nii.gz + 2 + 1) + +itk_add_test( + NAME + itkJointHistogramMutualInformationImageToImageRegistrationTest2 + COMMAND + ITKMetricsv4TestDriver + itkJointHistogramMutualInformationImageToImageRegistrationTest + DATA{Baseline/face_avg.jpg} + DATA{Input/face_b.jpg} + ${TEMP}/itkJointHistogramMutualInformationImageToImageRegistrationTest2.nii.gz + 2 + 1) + +itk_add_test( + NAME + itkMeanSquaresImageToImageMetricv4Test + COMMAND + ITKMetricsv4TestDriver + itkMeanSquaresImageToImageMetricv4Test) + +itk_add_test( + NAME + itkCorrelationImageToImageMetricv4Test + COMMAND + ITKMetricsv4TestDriver + itkCorrelationImageToImageMetricv4Test) + +itk_add_test( + NAME + itkMeanSquaresImageToImageMetricv4OnVectorTest + COMMAND + ITKMetricsv4TestDriver + itkMeanSquaresImageToImageMetricv4OnVectorTest) + +itk_add_test( + NAME + itkMeanSquaresImageToImageMetricv4OnVectorTest2 + COMMAND + ITKMetricsv4TestDriver + itkMeanSquaresImageToImageMetricv4OnVectorTest2) + +itk_add_test( + NAME + itkANTSNeighborhoodCorrelationImageToImageMetricv4Test + COMMAND + ITKMetricsv4TestDriver + itkANTSNeighborhoodCorrelationImageToImageMetricv4Test) + +itk_add_test( + NAME + itkANTSNeighborhoodCorrelationImageToImageRegistrationTest + COMMAND + ITKMetricsv4TestDriver + itkANTSNeighborhoodCorrelationImageToImageRegistrationTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBorder20.png + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySliceBSplined10.png + ${TEMP}/itkANTSNeighborhoodCorrelationImageToImageRegistrationTest.nii.gz + 1 + 1 + 0.25) + +itk_add_test( + NAME + itkMattesMutualInformationImageToImageMetricv4Test + COMMAND + ITKMetricsv4TestDriver + itkMattesMutualInformationImageToImageMetricv4Test) + +itk_add_test( + NAME + itkMattesMutualInformationImageToImageMetricv4RegistrationTest + COMMAND + ITKMetricsv4TestDriver + itkMattesMutualInformationImageToImageMetricv4RegistrationTest + DATA{Baseline/face_avg.jpg} + DATA{Input/face_b.jpg} + ${TEMP}/itkMattesMutualInformationImageToImageMetricv4RegistrationTest.nii.gz + 5 + 0) + +itk_add_test( + NAME + itkMultiStartImageToImageMetricv4RegistrationTest + COMMAND + ITKMetricsv4TestDriver + itkMultiStartImageToImageMetricv4RegistrationTest + DATA{Baseline/face_avg.jpg} + DATA{Input/face_b.jpg} + ${TEMP}/itkMultiStartImageToImageMetricv4RegistrationTest.nii.gz + 5 + 1) + +itk_add_test( + NAME + itkMultiGradientImageToImageMetricv4RegistrationTest + COMMAND + ITKMetricsv4TestDriver + itkMultiGradientImageToImageMetricv4RegistrationTest + DATA{Baseline/face_avg.jpg} + DATA{Input/face_b.jpg} + ${TEMP}/itkMultiGradientImageToImageMetricv4RegistrationTest.nii.gz + 5) + +itk_add_test( + NAME + itkMetricImageGradientTest + COMMAND + ITKMetricsv4TestDriver + itkMetricImageGradientTest) + +itk_add_test( + NAME + itkMeanSquaresImageToImageMetricv4RegistrationTest + COMMAND + ITKMetricsv4TestDriver + itkMeanSquaresImageToImageMetricv4RegistrationTest + DATA{Baseline/face_avg.jpg} + DATA{Input/face_b.jpg} + ${TEMP}/itkMeanSquaresImageToImageMetricv4RegistrationTest.nii.gz + 2 + 1) + +itk_add_test( + NAME + itkMeanSquaresImageToImageMetricv4RegistrationTest2 + COMMAND + ITKMetricsv4TestDriver itkMeanSquaresImageToImageMetricv4RegistrationTest2 - DATA{${INPUTDATA}/r16slice.nii.gz} - DATA{${INPUTDATA}/r64slice.nii.gz} - ${TEMP}/itkMeanSquaresImageToImageMetricv4RegistrationTest2.nii.gz - ) - -itk_add_test(NAME itkImageToImageMetricv4RegistrationTest - COMMAND ITKMetricsv4TestDriver - itkImageToImageMetricv4RegistrationTest - 75 #iterations1 - 0.8 #maxStepSize1 - 120 #iterations2 - 0.1 #maxStepSize2 - 0 #doSampling - 0 #useGradientFilter - ) - -itk_add_test(NAME itkImageToImageMetricv4RegistrationTest2 - COMMAND ITKMetricsv4TestDriver - itkImageToImageMetricv4RegistrationTest - 47 #iterations1 - 1.0 #maxStepSize1 - 120 #iterations2 - 0.1 #maxStepSize2 - 1 #doSampling - 0 #useGradientFilter - ) - -itk_add_test(NAME itkImageToImageMetricv4RegistrationTest3 - COMMAND ITKMetricsv4TestDriver - itkImageToImageMetricv4RegistrationTest - 50 #iterations1 - 1.0 #maxStepSize1 - 120 #iterations2 - 0.1 #maxStepSize2 - 0 #doSampling - 1 #useGradientFilter - ) - -itk_add_test(NAME itkDemonsImageToImageMetricv4Test - COMMAND ITKMetricsv4TestDriver - itkDemonsImageToImageMetricv4Test) - -itk_add_test(NAME itkDemonsImageToImageMetricv4RegistrationTest - COMMAND ITKMetricsv4TestDriver - --with-threads 1 - --compare DATA{Baseline/itkDemonsImageToImageMetricv4RegistrationTest_I35_S0_T1_F0.nii.gz} - ${TEMP}/itkDemonsImageToImageMetricv4RegistrationTest.nii.gz - itkDemonsImageToImageMetricv4RegistrationTest - DATA{${INPUTDATA}/r16slice.nii.gz} - DATA{${INPUTDATA}/r64slice.nii.gz} - ${TEMP}/itkDemonsImageToImageMetricv4RegistrationTest.nii.gz - 35 #iterations - 0 #sampling - 0 #image gradient filter - ) - -itk_add_test(NAME itkDemonsImageToImageMetricv4RegistrationTest2 - COMMAND ITKMetricsv4TestDriver - --with-threads 1 - --compare DATA{Baseline/itkDemonsImageToImageMetricv4RegistrationTest_I35_S1_T1_F0.nii.gz} - ${TEMP}/itkDemonsImageToImageMetricv4RegistrationTest2.nii.gz - itkDemonsImageToImageMetricv4RegistrationTest - DATA{${INPUTDATA}/r16slice.nii.gz} - DATA{${INPUTDATA}/r64slice.nii.gz} - ${TEMP}/itkDemonsImageToImageMetricv4RegistrationTest2.nii.gz - 35 #iterations - 1 #sampling - 0 #image gradient filter - ) - -itk_add_test(NAME itkDemonsImageToImageMetricv4RegistrationTest3 - COMMAND ITKMetricsv4TestDriver - --with-threads 1 - --compare DATA{Baseline/itkDemonsImageToImageMetricv4RegistrationTest_I35_S0_T1_F1.nii.gz} - ${TEMP}/itkDemonsImageToImageMetricv4RegistrationTest3.nii.gz - itkDemonsImageToImageMetricv4RegistrationTest - DATA{${INPUTDATA}/r16slice.nii.gz} - DATA{${INPUTDATA}/r64slice.nii.gz} - ${TEMP}/itkDemonsImageToImageMetricv4RegistrationTest3.nii.gz - 35 #iterations - 0 #sampling - 1 #image gradient filter - ) - -itk_add_test(NAME itkEuclideanDistancePointSetMetricRegistrationTest - COMMAND ITKMetricsv4TestDriver - itkEuclideanDistancePointSetMetricRegistrationTest) - -itk_add_test(NAME itkExpectationBasedPointSetMetricRegistrationTest - COMMAND ITKMetricsv4TestDriver - itkExpectationBasedPointSetMetricRegistrationTest) - -itk_add_test(NAME itkObjectToObjectMultiMetricv4Test - COMMAND ITKMetricsv4TestDriver - itkObjectToObjectMultiMetricv4Test) - -itk_add_test(NAME itkObjectToObjectMultiMetricv4RegistrationTest - COMMAND ITKMetricsv4TestDriver - itkObjectToObjectMultiMetricv4RegistrationTest) - -itk_add_test(NAME itkMeanSquaresImageToImageMetricv4VectorRegistrationTest - COMMAND ITKMetricsv4TestDriver - --with-threads 1 - --compare DATA{Baseline/itkMeanSquaresImageToImageMetricv4VectorRegistrationTest.nii.gz} - ${TEMP}/itkMeanSquaresImageToImageMetricv4VectorRegistrationTest.nii.gz - itkMeanSquaresImageToImageMetricv4VectorRegistrationTest - DATA{Input/orange.jpg} - DATA{Input/apple.jpg} - ${TEMP}/itkMeanSquaresImageToImageMetricv4VectorRegistrationTest.nii.gz - 100 25) + DATA{${INPUTDATA}/r16slice.nii.gz} + DATA{${INPUTDATA}/r64slice.nii.gz} + ${TEMP}/itkMeanSquaresImageToImageMetricv4RegistrationTest2.nii.gz) + +itk_add_test( + NAME + itkImageToImageMetricv4RegistrationTest + COMMAND + ITKMetricsv4TestDriver + itkImageToImageMetricv4RegistrationTest + 75 #iterations1 + 0.8 #maxStepSize1 + 120 #iterations2 + 0.1 #maxStepSize2 + 0 #doSampling + 0 #useGradientFilter +) + +itk_add_test( + NAME + itkImageToImageMetricv4RegistrationTest2 + COMMAND + ITKMetricsv4TestDriver + itkImageToImageMetricv4RegistrationTest + 47 #iterations1 + 1.0 #maxStepSize1 + 120 #iterations2 + 0.1 #maxStepSize2 + 1 #doSampling + 0 #useGradientFilter +) + +itk_add_test( + NAME + itkImageToImageMetricv4RegistrationTest3 + COMMAND + ITKMetricsv4TestDriver + itkImageToImageMetricv4RegistrationTest + 50 #iterations1 + 1.0 #maxStepSize1 + 120 #iterations2 + 0.1 #maxStepSize2 + 0 #doSampling + 1 #useGradientFilter +) + +itk_add_test( + NAME + itkDemonsImageToImageMetricv4Test + COMMAND + ITKMetricsv4TestDriver + itkDemonsImageToImageMetricv4Test) + +itk_add_test( + NAME + itkDemonsImageToImageMetricv4RegistrationTest + COMMAND + ITKMetricsv4TestDriver + --with-threads + 1 + --compare + DATA{Baseline/itkDemonsImageToImageMetricv4RegistrationTest_I35_S0_T1_F0.nii.gz} + ${TEMP}/itkDemonsImageToImageMetricv4RegistrationTest.nii.gz + itkDemonsImageToImageMetricv4RegistrationTest + DATA{${INPUTDATA}/r16slice.nii.gz} + DATA{${INPUTDATA}/r64slice.nii.gz} + ${TEMP}/itkDemonsImageToImageMetricv4RegistrationTest.nii.gz + 35 #iterations + 0 #sampling + 0 #image gradient filter +) + +itk_add_test( + NAME + itkDemonsImageToImageMetricv4RegistrationTest2 + COMMAND + ITKMetricsv4TestDriver + --with-threads + 1 + --compare + DATA{Baseline/itkDemonsImageToImageMetricv4RegistrationTest_I35_S1_T1_F0.nii.gz} + ${TEMP}/itkDemonsImageToImageMetricv4RegistrationTest2.nii.gz + itkDemonsImageToImageMetricv4RegistrationTest + DATA{${INPUTDATA}/r16slice.nii.gz} + DATA{${INPUTDATA}/r64slice.nii.gz} + ${TEMP}/itkDemonsImageToImageMetricv4RegistrationTest2.nii.gz + 35 #iterations + 1 #sampling + 0 #image gradient filter +) + +itk_add_test( + NAME + itkDemonsImageToImageMetricv4RegistrationTest3 + COMMAND + ITKMetricsv4TestDriver + --with-threads + 1 + --compare + DATA{Baseline/itkDemonsImageToImageMetricv4RegistrationTest_I35_S0_T1_F1.nii.gz} + ${TEMP}/itkDemonsImageToImageMetricv4RegistrationTest3.nii.gz + itkDemonsImageToImageMetricv4RegistrationTest + DATA{${INPUTDATA}/r16slice.nii.gz} + DATA{${INPUTDATA}/r64slice.nii.gz} + ${TEMP}/itkDemonsImageToImageMetricv4RegistrationTest3.nii.gz + 35 #iterations + 0 #sampling + 1 #image gradient filter +) + +itk_add_test( + NAME + itkEuclideanDistancePointSetMetricRegistrationTest + COMMAND + ITKMetricsv4TestDriver + itkEuclideanDistancePointSetMetricRegistrationTest) + +itk_add_test( + NAME + itkExpectationBasedPointSetMetricRegistrationTest + COMMAND + ITKMetricsv4TestDriver + itkExpectationBasedPointSetMetricRegistrationTest) + +itk_add_test( + NAME + itkObjectToObjectMultiMetricv4Test + COMMAND + ITKMetricsv4TestDriver + itkObjectToObjectMultiMetricv4Test) + +itk_add_test( + NAME + itkObjectToObjectMultiMetricv4RegistrationTest + COMMAND + ITKMetricsv4TestDriver + itkObjectToObjectMultiMetricv4RegistrationTest) + +itk_add_test( + NAME + itkMeanSquaresImageToImageMetricv4VectorRegistrationTest + COMMAND + ITKMetricsv4TestDriver + --with-threads + 1 + --compare + DATA{Baseline/itkMeanSquaresImageToImageMetricv4VectorRegistrationTest.nii.gz} + ${TEMP}/itkMeanSquaresImageToImageMetricv4VectorRegistrationTest.nii.gz + itkMeanSquaresImageToImageMetricv4VectorRegistrationTest + DATA{Input/orange.jpg} + DATA{Input/apple.jpg} + ${TEMP}/itkMeanSquaresImageToImageMetricv4VectorRegistrationTest.nii.gz + 100 + 25) diff --git a/Modules/Registration/Metricsv4/wrapping/itkANTSNeighborhoodCorrelationImageToImageMetricv4.wrap b/Modules/Registration/Metricsv4/wrapping/itkANTSNeighborhoodCorrelationImageToImageMetricv4.wrap index 317d5bee413..0c37b4fe32e 100644 --- a/Modules/Registration/Metricsv4/wrapping/itkANTSNeighborhoodCorrelationImageToImageMetricv4.wrap +++ b/Modules/Registration/Metricsv4/wrapping/itkANTSNeighborhoodCorrelationImageToImageMetricv4.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ANTSNeighborhoodCorrelationImageToImageMetricv4" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Registration/Metricsv4/wrapping/itkCorrelationImageToImageMetricv4.wrap b/Modules/Registration/Metricsv4/wrapping/itkCorrelationImageToImageMetricv4.wrap index f069f5c67f3..d9d91ae24df 100644 --- a/Modules/Registration/Metricsv4/wrapping/itkCorrelationImageToImageMetricv4.wrap +++ b/Modules/Registration/Metricsv4/wrapping/itkCorrelationImageToImageMetricv4.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::CorrelationImageToImageMetricv4" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Registration/Metricsv4/wrapping/itkDemonsImageToImageMetricv4.wrap b/Modules/Registration/Metricsv4/wrapping/itkDemonsImageToImageMetricv4.wrap index 0140ccc28cb..8ce08829710 100644 --- a/Modules/Registration/Metricsv4/wrapping/itkDemonsImageToImageMetricv4.wrap +++ b/Modules/Registration/Metricsv4/wrapping/itkDemonsImageToImageMetricv4.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::DemonsImageToImageMetricv4" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Registration/Metricsv4/wrapping/itkEuclideanDistancePointSetToPointSetMetricv4.wrap b/Modules/Registration/Metricsv4/wrapping/itkEuclideanDistancePointSetToPointSetMetricv4.wrap index bbc11a50d35..7eb4a2b9d18 100644 --- a/Modules/Registration/Metricsv4/wrapping/itkEuclideanDistancePointSetToPointSetMetricv4.wrap +++ b/Modules/Registration/Metricsv4/wrapping/itkEuclideanDistancePointSetToPointSetMetricv4.wrap @@ -1,12 +1,12 @@ itk_wrap_include("itkPointSet.h") itk_wrap_include("itkDefaultStaticMeshTraits.h") -UNIQUE(types "${WRAP_ITK_SCALAR};D") +unique(types "${WRAP_ITK_SCALAR};D") itk_wrap_class("itk::EuclideanDistancePointSetToPointSetMetricv4" POINTER_WITH_2_SUPERCLASSES) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/Metricsv4/wrapping/itkExpectationBasedPointSetToPointSetMetricv4.wrap b/Modules/Registration/Metricsv4/wrapping/itkExpectationBasedPointSetToPointSetMetricv4.wrap index 902f1425d74..00707962507 100644 --- a/Modules/Registration/Metricsv4/wrapping/itkExpectationBasedPointSetToPointSetMetricv4.wrap +++ b/Modules/Registration/Metricsv4/wrapping/itkExpectationBasedPointSetToPointSetMetricv4.wrap @@ -1,12 +1,12 @@ itk_wrap_include("itkPointSet.h") itk_wrap_include("itkDefaultStaticMeshTraits.h") -UNIQUE(types "${WRAP_ITK_SCALAR};D") +unique(types "${WRAP_ITK_SCALAR};D") itk_wrap_class("itk::ExpectationBasedPointSetToPointSetMetricv4" POINTER_WITH_2_SUPERCLASSES) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/Metricsv4/wrapping/itkImageToImageMetricv4.wrap b/Modules/Registration/Metricsv4/wrapping/itkImageToImageMetricv4.wrap index dbff34cc345..672f8baa183 100644 --- a/Modules/Registration/Metricsv4/wrapping/itkImageToImageMetricv4.wrap +++ b/Modules/Registration/Metricsv4/wrapping/itkImageToImageMetricv4.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::ImageToImageMetricv4" POINTER_WITH_SUPERCLASS) - foreach(d ${ITK_WRAP_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_${t}}${d}${ITKM_${t}}${d}" - "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_${t}}${d}${ITKM_${t}}${d}" + "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/Metricsv4/wrapping/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.wrap b/Modules/Registration/Metricsv4/wrapping/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.wrap index 0f126022b0a..9185ccca4f5 100644 --- a/Modules/Registration/Metricsv4/wrapping/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.wrap +++ b/Modules/Registration/Metricsv4/wrapping/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.wrap @@ -1,12 +1,12 @@ itk_wrap_include("itkPointSet.h") itk_wrap_include("itkDefaultStaticMeshTraits.h") -UNIQUE(types "${WRAP_ITK_SCALAR};D") +unique(types "${WRAP_ITK_SCALAR};D") itk_wrap_class("itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4" POINTER_WITH_2_SUPERCLASSES) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/Metricsv4/wrapping/itkJointHistogramMutualInformationImageToImageMetricv4.wrap b/Modules/Registration/Metricsv4/wrapping/itkJointHistogramMutualInformationImageToImageMetricv4.wrap index 46a782d69c4..31ec99c4805 100644 --- a/Modules/Registration/Metricsv4/wrapping/itkJointHistogramMutualInformationImageToImageMetricv4.wrap +++ b/Modules/Registration/Metricsv4/wrapping/itkJointHistogramMutualInformationImageToImageMetricv4.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::JointHistogramMutualInformationImageToImageMetricv4" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Registration/Metricsv4/wrapping/itkLabeledPointSetToPointSetMetricv4.wrap b/Modules/Registration/Metricsv4/wrapping/itkLabeledPointSetToPointSetMetricv4.wrap index 818970f6ad1..cbd924cd89b 100644 --- a/Modules/Registration/Metricsv4/wrapping/itkLabeledPointSetToPointSetMetricv4.wrap +++ b/Modules/Registration/Metricsv4/wrapping/itkLabeledPointSetToPointSetMetricv4.wrap @@ -1,12 +1,12 @@ itk_wrap_include("itkPointSet.h") itk_wrap_include("itkDefaultStaticMeshTraits.h") -UNIQUE(types "${WRAP_ITK_INT}") +unique(types "${WRAP_ITK_INT}") itk_wrap_class("itk::LabeledPointSetToPointSetMetricv4" POINTER_WITH_2_SUPERCLASSES) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/Metricsv4/wrapping/itkMattesMutualInformationImageToImageMetricv4.wrap b/Modules/Registration/Metricsv4/wrapping/itkMattesMutualInformationImageToImageMetricv4.wrap index e9f4d3622a5..4ec58d4591a 100644 --- a/Modules/Registration/Metricsv4/wrapping/itkMattesMutualInformationImageToImageMetricv4.wrap +++ b/Modules/Registration/Metricsv4/wrapping/itkMattesMutualInformationImageToImageMetricv4.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MattesMutualInformationImageToImageMetricv4" POINTER_WITH_2_SUPERCLASSES) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Registration/Metricsv4/wrapping/itkMeanSquaresImageToImageMetricv4.wrap b/Modules/Registration/Metricsv4/wrapping/itkMeanSquaresImageToImageMetricv4.wrap index fea057b94c4..a6cea246c65 100644 --- a/Modules/Registration/Metricsv4/wrapping/itkMeanSquaresImageToImageMetricv4.wrap +++ b/Modules/Registration/Metricsv4/wrapping/itkMeanSquaresImageToImageMetricv4.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MeanSquaresImageToImageMetricv4" POINTER_WITH_2_SUPERCLASSES) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2 2+) itk_end_wrap_class() diff --git a/Modules/Registration/Metricsv4/wrapping/itkMetricv4Types.wrap b/Modules/Registration/Metricsv4/wrapping/itkMetricv4Types.wrap index 5553cabbb28..65864d91481 100644 --- a/Modules/Registration/Metricsv4/wrapping/itkMetricv4Types.wrap +++ b/Modules/Registration/Metricsv4/wrapping/itkMetricv4Types.wrap @@ -17,36 +17,60 @@ set(ITK_METRICV4_POINTSET_TYPES "") # Convenience functions to work around CMake lists # Use # as delimiter for sublists macro(itk_sublist_to_list out_var my_sublist) - string(REPLACE "#" ";" ${out_var} ${my_sublist}) + string( + REPLACE "#" + ";" + ${out_var} + ${my_sublist}) endmacro() macro(itk_list_to_sublist out_var my_list) - string(REPLACE ";" "#" ${out_var} ${my_list}) + string( + REPLACE ";" + "#" + ${out_var} + ${my_list}) endmacro() -macro(_cartesian out_var my_list1 my_list2) -# cartesian product of my_list1 and my_list2 into out_var as a list of sublists +macro( + _cartesian + out_var + my_list1 + my_list2) + # cartesian product of my_list1 and my_list2 into out_var as a list of sublists foreach(x1 ${my_list1}) foreach(x2 ${my_list2}) - list(APPEND ${out_var} "${x1}#${x2}") - endforeach() + list(APPEND ${out_var} "${x1}#${x2}") + endforeach() endforeach() - UNIQUE(${out_var} "${${out_var}}") + unique(${out_var} "${${out_var}}") endmacro() # recompute what 2+ means -itk_wrap_filter_dims( two_plus "2+") +itk_wrap_filter_dims(two_plus "2+") _cartesian(_real_images "${WRAP_ITK_REAL}" "${two_plus}") macro(_add_image_filter_types mangle cpp_name) -# recreates the types/behavior of itk_wrap_image_filter so that we can add the instantiations to our list -foreach(z ${_real_images}) - itk_sublist_to_list(y ${z}) - list(GET y 0 my_type) - list(GET y 1 my_dim) - list(APPEND ITK_METRICV4_IMAGE_TYPES "${mangle}${ITKM_${my_type}}${my_dim}#${cpp_name}< itk::Image< ${ITKT_${my_type}}, ${my_dim} >, itk::Image< ${ITKT_${my_type}}, ${my_dim} > >") -endforeach() + # recreates the types/behavior of itk_wrap_image_filter so that we can add the instantiations to our list + foreach(z ${_real_images}) + itk_sublist_to_list(y ${z}) + list( + GET + y + 0 + my_type) + list( + GET + y + 1 + my_dim) + list( + APPEND + ITK_METRICV4_IMAGE_TYPES + "${mangle}${ITKM_${my_type}}${my_dim}#${cpp_name}< itk::Image< ${ITKT_${my_type}}, ${my_dim} >, itk::Image< ${ITKT_${my_type}}, ${my_dim} > >" + ) + endforeach() endmacro() _add_image_filter_types("ANTSNCITIM" "itk::ANTSNeighborhoodCorrelationImageToImageMetricv4") @@ -58,17 +82,30 @@ _add_image_filter_types("MSITIM" "itk::MeanSquaresImageToImageMetricv4") _add_image_filter_types("ITIM" "itk::ImageToImageMetricv4") # not sure why we are articially adding double, but this is consistent across the Metricv4 types -UNIQUE(_real_plus_double "${WRAP_ITK_REAL};D") +unique(_real_plus_double "${WRAP_ITK_REAL};D") _cartesian(_real_pointsets "${_real_plus_double}" "${ITK_WRAP_IMAGE_DIMS}") _cartesian(_int_pointsets "${WRAP_ITK_INT}" "${ITK_WRAP_IMAGE_DIMS}") -macro(_add_pointset_types mangle cpp_name pointsets) -foreach(z ${pointsets}) - itk_sublist_to_list(y ${z}) - list(GET y 0 my_type) - list(GET y 1 my_dim) - list(APPEND ITK_METRICV4_POINTSET_TYPES "${mangle}PS${ITKM_${my_type}}${my_dim}#${cpp_name}< itk::PointSet< ${ITKT_${my_type}}, ${my_dim} > >") -endforeach() +macro( + _add_pointset_types + mangle + cpp_name + pointsets) + foreach(z ${pointsets}) + itk_sublist_to_list(y ${z}) + list( + GET + y + 0 + my_type) + list( + GET + y + 1 + my_dim) + list(APPEND ITK_METRICV4_POINTSET_TYPES + "${mangle}PS${ITKM_${my_type}}${my_dim}#${cpp_name}< itk::PointSet< ${ITKT_${my_type}}, ${my_dim} > >") + endforeach() endmacro() _add_pointset_types("EDPSTPSM" "itk::EuclideanDistancePointSetToPointSetMetricv4" "${_real_pointsets}") @@ -81,16 +118,16 @@ _add_pointset_types("LPSTPSM" "itk::LabeledPointSetToPointSetMetricv4" "${_int_p set(ITK_METRICV4_TYPES "${ITK_METRICV4_IMAGE_TYPES};${ITK_METRICV4_POINTSET_TYPES}") set(ITK_METRICV4_HEADERS - "itkANTSNeighborhoodCorrelationImageToImageMetricv4.h" - "itkCorrelationImageToImageMetricv4.h" - "itkDemonsImageToImageMetricv4.h" - "itkJointHistogramMutualInformationImageToImageMetricv4.h" - "itkMattesMutualInformationImageToImageMetricv4.h" - "itkMeanSquaresImageToImageMetricv4.h" - "itkImageToImageMetricv4.h" - "itkEuclideanDistancePointSetToPointSetMetricv4.h" - "itkExpectationBasedPointSetToPointSetMetricv4.h" - "itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h" - "itkPointSetToPointSetMetricv4.h" - "itkPointSetToPointSetMetricWithIndexv4.h" - "itkLabeledPointSetToPointSetMetricv4.h") + "itkANTSNeighborhoodCorrelationImageToImageMetricv4.h" + "itkCorrelationImageToImageMetricv4.h" + "itkDemonsImageToImageMetricv4.h" + "itkJointHistogramMutualInformationImageToImageMetricv4.h" + "itkMattesMutualInformationImageToImageMetricv4.h" + "itkMeanSquaresImageToImageMetricv4.h" + "itkImageToImageMetricv4.h" + "itkEuclideanDistancePointSetToPointSetMetricv4.h" + "itkExpectationBasedPointSetToPointSetMetricv4.h" + "itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h" + "itkPointSetToPointSetMetricv4.h" + "itkPointSetToPointSetMetricWithIndexv4.h" + "itkLabeledPointSetToPointSetMetricv4.h") diff --git a/Modules/Registration/Metricsv4/wrapping/itkPointSetToPointSetMetricWithIndexv4.wrap b/Modules/Registration/Metricsv4/wrapping/itkPointSetToPointSetMetricWithIndexv4.wrap index 2c2b11b1b42..22d184d3d25 100644 --- a/Modules/Registration/Metricsv4/wrapping/itkPointSetToPointSetMetricWithIndexv4.wrap +++ b/Modules/Registration/Metricsv4/wrapping/itkPointSetToPointSetMetricWithIndexv4.wrap @@ -1,12 +1,12 @@ itk_wrap_include("itkPointSet.h") itk_wrap_include("itkDefaultStaticMeshTraits.h") -UNIQUE(types "${WRAP_ITK_SCALAR};D") +unique(types "${WRAP_ITK_SCALAR};D") itk_wrap_class("itk::PointSetToPointSetMetricWithIndexv4" POINTER_WITH_SUPERCLASS) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/Metricsv4/wrapping/itkPointSetToPointSetMetricv4.wrap b/Modules/Registration/Metricsv4/wrapping/itkPointSetToPointSetMetricv4.wrap index 504cf500d4a..de1d5656b43 100644 --- a/Modules/Registration/Metricsv4/wrapping/itkPointSetToPointSetMetricv4.wrap +++ b/Modules/Registration/Metricsv4/wrapping/itkPointSetToPointSetMetricv4.wrap @@ -1,12 +1,12 @@ itk_wrap_include("itkPointSet.h") itk_wrap_include("itkDefaultStaticMeshTraits.h") -UNIQUE(types "${WRAP_ITK_SCALAR};D") +unique(types "${WRAP_ITK_SCALAR};D") itk_wrap_class("itk::PointSetToPointSetMetricv4" POINTER_WITH_2_SUPERCLASSES) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${types}) - itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${types}) + itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/Metricsv4/wrapping/itkRegistrationParameterScalesFromIndexShift.wrap b/Modules/Registration/Metricsv4/wrapping/itkRegistrationParameterScalesFromIndexShift.wrap index 2d9d8f0455e..6c2979b33a5 100644 --- a/Modules/Registration/Metricsv4/wrapping/itkRegistrationParameterScalesFromIndexShift.wrap +++ b/Modules/Registration/Metricsv4/wrapping/itkRegistrationParameterScalesFromIndexShift.wrap @@ -1,15 +1,23 @@ include("itkMetricv4Types.wrap") foreach(h ${ITK_METRICV4_HEADERS}) - itk_wrap_include(${h}) + itk_wrap_include(${h}) endforeach() # this class doesn't work with PointSetToPoinSet metrics and so only instantiate with ImageToImage metrics itk_wrap_class("itk::RegistrationParameterScalesFromIndexShift" POINTER_WITH_2_SUPERCLASSES) - foreach(z ${ITK_METRICV4_IMAGE_TYPES}) - itk_sublist_to_list(y ${z}) - list(GET y 0 my_mangle) - list(GET y 1 my_cpp) - itk_wrap_template(${my_mangle} ${my_cpp}) - endforeach() +foreach(z ${ITK_METRICV4_IMAGE_TYPES}) + itk_sublist_to_list(y ${z}) + list( + GET + y + 0 + my_mangle) + list( + GET + y + 1 + my_cpp) + itk_wrap_template(${my_mangle} ${my_cpp}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/Metricsv4/wrapping/itkRegistrationParameterScalesFromJacobian.wrap b/Modules/Registration/Metricsv4/wrapping/itkRegistrationParameterScalesFromJacobian.wrap index c8894eb45d6..d6e9ed0166d 100644 --- a/Modules/Registration/Metricsv4/wrapping/itkRegistrationParameterScalesFromJacobian.wrap +++ b/Modules/Registration/Metricsv4/wrapping/itkRegistrationParameterScalesFromJacobian.wrap @@ -1,14 +1,22 @@ include("itkMetricv4Types.wrap") foreach(h ${ITK_METRICV4_HEADERS}) - itk_wrap_include(${h}) + itk_wrap_include(${h}) endforeach() itk_wrap_class("itk::RegistrationParameterScalesFromJacobian" POINTER_WITH_SUPERCLASS) - foreach(z ${ITK_METRICV4_TYPES}) - itk_sublist_to_list(y ${z}) - list(GET y 0 my_mangle) - list(GET y 1 my_cpp) - itk_wrap_template(${my_mangle} ${my_cpp}) - endforeach() +foreach(z ${ITK_METRICV4_TYPES}) + itk_sublist_to_list(y ${z}) + list( + GET + y + 0 + my_mangle) + list( + GET + y + 1 + my_cpp) + itk_wrap_template(${my_mangle} ${my_cpp}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/Metricsv4/wrapping/itkRegistrationParameterScalesFromPhysicalShift.wrap b/Modules/Registration/Metricsv4/wrapping/itkRegistrationParameterScalesFromPhysicalShift.wrap index ce40940456e..10da0fabef6 100644 --- a/Modules/Registration/Metricsv4/wrapping/itkRegistrationParameterScalesFromPhysicalShift.wrap +++ b/Modules/Registration/Metricsv4/wrapping/itkRegistrationParameterScalesFromPhysicalShift.wrap @@ -1,14 +1,22 @@ include("itkMetricv4Types.wrap") foreach(h ${ITK_METRICV4_HEADERS}) - itk_wrap_include(${h}) + itk_wrap_include(${h}) endforeach() itk_wrap_class("itk::RegistrationParameterScalesFromPhysicalShift" POINTER_WITH_2_SUPERCLASSES) - foreach(z ${ITK_METRICV4_TYPES}) - itk_sublist_to_list(y ${z}) - list(GET y 0 my_mangle) - list(GET y 1 my_cpp) - itk_wrap_template(${my_mangle} ${my_cpp}) - endforeach() +foreach(z ${ITK_METRICV4_TYPES}) + itk_sublist_to_list(y ${z}) + list( + GET + y + 0 + my_mangle) + list( + GET + y + 1 + my_cpp) + itk_wrap_template(${my_mangle} ${my_cpp}) +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/Metricsv4/wrapping/test/CMakeLists.txt b/Modules/Registration/Metricsv4/wrapping/test/CMakeLists.txt index 9bb30f478a8..793b16b5c5c 100644 --- a/Modules/Registration/Metricsv4/wrapping/test/CMakeLists.txt +++ b/Modules/Registration/Metricsv4/wrapping/test/CMakeLists.txt @@ -1,40 +1,79 @@ if(ITK_WRAP_PYTHON) - itk_python_expression_add_test(NAME itkANTSNeighborhoodCorrelationImageToImageMetricv4PythonTest - EXPRESSION "instance = itk.ANTSNeighborhoodCorrelationImageToImageMetricv4.New()") + itk_python_expression_add_test( + NAME + itkANTSNeighborhoodCorrelationImageToImageMetricv4PythonTest + EXPRESSION + "instance = itk.ANTSNeighborhoodCorrelationImageToImageMetricv4.New()") - itk_python_expression_add_test(NAME itkCorrelationImageToImageMetricv4PythonTest - EXPRESSION "instance = itk.CorrelationImageToImageMetricv4.New()") + itk_python_expression_add_test( + NAME + itkCorrelationImageToImageMetricv4PythonTest + EXPRESSION + "instance = itk.CorrelationImageToImageMetricv4.New()") - itk_python_expression_add_test(NAME itkDemonsImageToImageMetricv4PythonTest - EXPRESSION "instance = itk.DemonsImageToImageMetricv4.New()") + itk_python_expression_add_test( + NAME + itkDemonsImageToImageMetricv4PythonTest + EXPRESSION + "instance = itk.DemonsImageToImageMetricv4.New()") - itk_python_expression_add_test(NAME itkEuclideanDistancePointSetToPointSetMetricv4PythonTest - EXPRESSION "instance = itk.EuclideanDistancePointSetToPointSetMetricv4.New()") + itk_python_expression_add_test( + NAME + itkEuclideanDistancePointSetToPointSetMetricv4PythonTest + EXPRESSION + "instance = itk.EuclideanDistancePointSetToPointSetMetricv4.New()") - itk_python_expression_add_test(NAME itkExpectationBasedPointSetToPointSetMetricv4PythonTest - EXPRESSION "instance = itk.ExpectationBasedPointSetToPointSetMetricv4.New()") + itk_python_expression_add_test( + NAME + itkExpectationBasedPointSetToPointSetMetricv4PythonTest + EXPRESSION + "instance = itk.ExpectationBasedPointSetToPointSetMetricv4.New()") - itk_python_expression_add_test(NAME itkImageToImageMetricv4PythonTest - EXPRESSION "instance = itk.ImageToImageMetricv4.New()") + itk_python_expression_add_test( + NAME + itkImageToImageMetricv4PythonTest + EXPRESSION + "instance = itk.ImageToImageMetricv4.New()") - itk_python_expression_add_test(NAME itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4PythonTest - EXPRESSION "instance = itk.JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.New()") + itk_python_expression_add_test( + NAME + itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4PythonTest + EXPRESSION + "instance = itk.JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.New()") - itk_python_expression_add_test(NAME itkJointHistogramMutualInformationImageToImageMetricv4PythonTest - EXPRESSION "instance = itk.JointHistogramMutualInformationImageToImageMetricv4.New()") + itk_python_expression_add_test( + NAME + itkJointHistogramMutualInformationImageToImageMetricv4PythonTest + EXPRESSION + "instance = itk.JointHistogramMutualInformationImageToImageMetricv4.New()") - itk_python_expression_add_test(NAME itkLabeledPointSetToPointSetMetricv4PythonTest - EXPRESSION "instance = itk.LabeledPointSetToPointSetMetricv4.New()") + itk_python_expression_add_test( + NAME + itkLabeledPointSetToPointSetMetricv4PythonTest + EXPRESSION + "instance = itk.LabeledPointSetToPointSetMetricv4.New()") - itk_python_expression_add_test(NAME itkMattesMutualInformationImageToImageMetricv4PythonTest - EXPRESSION "instance = itk.MattesMutualInformationImageToImageMetricv4.New()") + itk_python_expression_add_test( + NAME + itkMattesMutualInformationImageToImageMetricv4PythonTest + EXPRESSION + "instance = itk.MattesMutualInformationImageToImageMetricv4.New()") - itk_python_expression_add_test(NAME itkMeanSquaresImageToImageMetricv4PythonTest - EXPRESSION "instance = itk.MeanSquaresImageToImageMetricv4.New()") + itk_python_expression_add_test( + NAME + itkMeanSquaresImageToImageMetricv4PythonTest + EXPRESSION + "instance = itk.MeanSquaresImageToImageMetricv4.New()") - itk_python_expression_add_test(NAME itkPointSetToPointSetMetricv4PythonTest - EXPRESSION "instance = itk.PointSetToPointSetMetricv4.New()") + itk_python_expression_add_test( + NAME + itkPointSetToPointSetMetricv4PythonTest + EXPRESSION + "instance = itk.PointSetToPointSetMetricv4.New()") - itk_python_expression_add_test(NAME itkPointSetToPointSetMetricWithIndexv4PythonTest - EXPRESSION "instance = itk.PointSetToPointSetMetricWithIndexv4.New()") + itk_python_expression_add_test( + NAME + itkPointSetToPointSetMetricWithIndexv4PythonTest + EXPRESSION + "instance = itk.PointSetToPointSetMetricWithIndexv4.New()") endif() diff --git a/Modules/Registration/PDEDeformable/itk-module.cmake b/Modules/Registration/PDEDeformable/itk-module.cmake index d24743cc1b1..80bccf6aadc 100644 --- a/Modules/Registration/PDEDeformable/itk-module.cmake +++ b/Modules/Registration/PDEDeformable/itk-module.cmake @@ -1,21 +1,21 @@ -set(DOCUMENTATION "This module contains classes for deformable image +set(DOCUMENTATION + "This module contains classes for deformable image registration based on intensity differences by solving the PDE, optical flow problem. This includes Thirion's popular \"demons\" algorithm.") - set(_FFTW_DEPENDS) if(ITK_USE_FFTWF OR ITK_USE_FFTWD) set(_FFTW_DEPENDS "ITKFFT") endif() -itk_module(ITKPDEDeformableRegistration +itk_module( + ITKPDEDeformableRegistration ENABLE_SHARED DEPENDS - ${_FFTW_DEPENDS} - ITKRegistrationCommon - ITKFiniteDifference + ${_FFTW_DEPENDS} + ITKRegistrationCommon + ITKFiniteDifference TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Registration/PDEDeformable/src/CMakeLists.txt b/Modules/Registration/PDEDeformable/src/CMakeLists.txt index 38905b6c964..5f28a9c30fa 100644 --- a/Modules/Registration/PDEDeformable/src/CMakeLists.txt +++ b/Modules/Registration/PDEDeformable/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKPDEDeformableRegistration_SRCS - itkESMDemonsRegistrationFunction.cxx - ) +set(ITKPDEDeformableRegistration_SRCS itkESMDemonsRegistrationFunction.cxx) itk_module_add_library(ITKPDEDeformableRegistration ${ITKPDEDeformableRegistration_SRCS}) diff --git a/Modules/Registration/PDEDeformable/test/CMakeLists.txt b/Modules/Registration/PDEDeformable/test/CMakeLists.txt index 3723947768c..4981ad41664 100644 --- a/Modules/Registration/PDEDeformable/test/CMakeLists.txt +++ b/Modules/Registration/PDEDeformable/test/CMakeLists.txt @@ -1,76 +1,232 @@ itk_module_test() set(ITKPDEDeformableRegistrationTests -itkMultiResolutionPDEDeformableRegistrationTest.cxx -itkDemonsRegistrationFilterTest.cxx -itkDiffeomorphicDemonsRegistrationFilterTest.cxx -itkDiffeomorphicDemonsRegistrationFilterTest2.cxx -itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx -itkLevelSetMotionRegistrationFilterTest.cxx -itkSymmetricForcesDemonsRegistrationFilterTest.cxx -itkESMDemonsRegistrationFunctionTest.cxx -) - # Define some convenient locations + itkMultiResolutionPDEDeformableRegistrationTest.cxx + itkDemonsRegistrationFilterTest.cxx + itkDiffeomorphicDemonsRegistrationFilterTest.cxx + itkDiffeomorphicDemonsRegistrationFilterTest2.cxx + itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx + itkLevelSetMotionRegistrationFilterTest.cxx + itkSymmetricForcesDemonsRegistrationFilterTest.cxx + itkESMDemonsRegistrationFunctionTest.cxx) +# Define some convenient locations set(BASELINE ${ITK_DATA_ROOT}/Baseline/Algorithms) set(INPUTDATA ${ITK_DATA_ROOT}/Input) set(TEMP ${ITK_TEST_OUTPUT_DIR}) -CreateTestDriver(ITKPDEDeformableRegistration "${ITKPDEDeformableRegistration-Test_LIBRARIES}" "${ITKPDEDeformableRegistrationTests}") +createtestdriver(ITKPDEDeformableRegistration "${ITKPDEDeformableRegistration-Test_LIBRARIES}" + "${ITKPDEDeformableRegistrationTests}") -itk_add_test(NAME itkDemonsRegistrationFilterTest - COMMAND ITKPDEDeformableRegistrationTestDriver itkDemonsRegistrationFilterTest) -itk_add_test(NAME itkLevelSetMotionRegistrationFilterTest - COMMAND ITKPDEDeformableRegistrationTestDriver itkLevelSetMotionRegistrationFilterTest - ${ITK_TEST_OUTPUT_DIR}/itkLevelSetMotionRegistrationFilterTestFixedImage.mha ${ITK_TEST_OUTPUT_DIR}/itkLevelSetMotionRegistrationFilterTestMovingImage.mha ${ITK_TEST_OUTPUT_DIR}/itkLevelSetMotionRegistrationFilterTestResampledImage.mha) -itk_add_test(NAME itkSymmetricForcesDemonsRegistrationFilterTest - COMMAND ITKPDEDeformableRegistrationTestDriver itkSymmetricForcesDemonsRegistrationFilterTest) -itk_add_test(NAME itkMultiResolutionPDEDeformableRegistrationTestD ${TestDriver} - COMMAND ITKPDEDeformableRegistrationTestDriver - --compare DATA{${BASELINE}/itkMultiResolutionPDEDeformableRegistrationTestPixelCentered.png} - ${TEMP}/itkMultiResolutionPDEDeformableRegistrationTestPixelCentered.png - --compareNumberOfPixelsTolerance 20 +itk_add_test( + NAME + itkDemonsRegistrationFilterTest + COMMAND + ITKPDEDeformableRegistrationTestDriver + itkDemonsRegistrationFilterTest) +itk_add_test( + NAME + itkLevelSetMotionRegistrationFilterTest + COMMAND + ITKPDEDeformableRegistrationTestDriver + itkLevelSetMotionRegistrationFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkLevelSetMotionRegistrationFilterTestFixedImage.mha + ${ITK_TEST_OUTPUT_DIR}/itkLevelSetMotionRegistrationFilterTestMovingImage.mha + ${ITK_TEST_OUTPUT_DIR}/itkLevelSetMotionRegistrationFilterTestResampledImage.mha) +itk_add_test( + NAME + itkSymmetricForcesDemonsRegistrationFilterTest + COMMAND + ITKPDEDeformableRegistrationTestDriver + itkSymmetricForcesDemonsRegistrationFilterTest) +itk_add_test( + NAME + itkMultiResolutionPDEDeformableRegistrationTestD + ${TestDriver} + COMMAND + ITKPDEDeformableRegistrationTestDriver + --compare + DATA{${BASELINE}/itkMultiResolutionPDEDeformableRegistrationTestPixelCentered.png} + ${TEMP}/itkMultiResolutionPDEDeformableRegistrationTestPixelCentered.png + --compareNumberOfPixelsTolerance + 20 itkMultiResolutionPDEDeformableRegistrationTest - ${TEMP}/itkMultiResolutionPDEDeformableRegistrationTestPixelCentered.png) -itk_add_test(NAME itkDiffeomorphicDemonsRegistrationFilterTest01 - COMMAND ITKPDEDeformableRegistrationTestDriver itkDiffeomorphicDemonsRegistrationFilterTest - 0 0 0.001 20.0 200 0.01 0.08 5 10) -itk_add_test(NAME itkDiffeomorphicDemonsRegistrationFilterTest02 - COMMAND ITKPDEDeformableRegistrationTestDriver --redirectOutput itkDiffeomorphicDemonsRegistrationFilterTest02 --redirectOutput ${TEMP}/itkDiffeomorphicDemonsRegistrationFilterTest02.txt - itkDiffeomorphicDemonsRegistrationFilterTest - 1 0 0.01 3.0 400 0.2 0.9 10 70) -set_tests_properties(itkDiffeomorphicDemonsRegistrationFilterTest02 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkDiffeomorphicDemonsRegistrationFilterTest02.txt) + ${TEMP}/itkMultiResolutionPDEDeformableRegistrationTestPixelCentered.png) +itk_add_test( + NAME + itkDiffeomorphicDemonsRegistrationFilterTest01 + COMMAND + ITKPDEDeformableRegistrationTestDriver + itkDiffeomorphicDemonsRegistrationFilterTest + 0 + 0 + 0.001 + 20.0 + 200 + 0.01 + 0.08 + 5 + 10) +itk_add_test( + NAME + itkDiffeomorphicDemonsRegistrationFilterTest02 + COMMAND + ITKPDEDeformableRegistrationTestDriver + --redirectOutput + itkDiffeomorphicDemonsRegistrationFilterTest02 + --redirectOutput + ${TEMP}/itkDiffeomorphicDemonsRegistrationFilterTest02.txt + itkDiffeomorphicDemonsRegistrationFilterTest + 1 + 0 + 0.01 + 3.0 + 400 + 0.2 + 0.9 + 10 + 70) +set_tests_properties(itkDiffeomorphicDemonsRegistrationFilterTest02 + PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkDiffeomorphicDemonsRegistrationFilterTest02.txt) -itk_add_test(NAME itkDiffeomorphicDemonsRegistrationFilterTest03 - COMMAND ITKPDEDeformableRegistrationTestDriver itkDiffeomorphicDemonsRegistrationFilterTest - 2 0 0.001 20.0 200 0.01 0.08 5 10) -itk_add_test(NAME itkDiffeomorphicDemonsRegistrationFilterTest04 - COMMAND ITKPDEDeformableRegistrationTestDriver itkDiffeomorphicDemonsRegistrationFilterTest - 3 0 0.01 3.0 200 0.2 0.8 5 70) +itk_add_test( + NAME + itkDiffeomorphicDemonsRegistrationFilterTest03 + COMMAND + ITKPDEDeformableRegistrationTestDriver + itkDiffeomorphicDemonsRegistrationFilterTest + 2 + 0 + 0.001 + 20.0 + 200 + 0.01 + 0.08 + 5 + 10) +itk_add_test( + NAME + itkDiffeomorphicDemonsRegistrationFilterTest04 + COMMAND + ITKPDEDeformableRegistrationTestDriver + itkDiffeomorphicDemonsRegistrationFilterTest + 3 + 0 + 0.01 + 3.0 + 200 + 0.2 + 0.8 + 5 + 70) -itk_add_test(NAME itkDiffeomorphicDemonsRegistrationFilterTest05 - COMMAND ITKPDEDeformableRegistrationTestDriver --redirectOutput ${TEMP}/itkDiffeomorphicDemonsRegistrationFilterTest05.txt - itkDiffeomorphicDemonsRegistrationFilterTest - 0 1 0.01 3.0 400 0.2 0.08 5 70) -set_tests_properties(itkDiffeomorphicDemonsRegistrationFilterTest05 PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkDiffeomorphicDemonsRegistrationFilterTest05.txt) +itk_add_test( + NAME + itkDiffeomorphicDemonsRegistrationFilterTest05 + COMMAND + ITKPDEDeformableRegistrationTestDriver + --redirectOutput + ${TEMP}/itkDiffeomorphicDemonsRegistrationFilterTest05.txt + itkDiffeomorphicDemonsRegistrationFilterTest + 0 + 1 + 0.01 + 3.0 + 400 + 0.2 + 0.08 + 5 + 70) +set_tests_properties(itkDiffeomorphicDemonsRegistrationFilterTest05 + PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkDiffeomorphicDemonsRegistrationFilterTest05.txt) -itk_add_test(NAME itkDiffeomorphicDemonsRegistrationFilterTest06 - COMMAND ITKPDEDeformableRegistrationTestDriver itkDiffeomorphicDemonsRegistrationFilterTest - 0 0 0.005 20.0 200 0.01 0.08 5 10) -itk_add_test(NAME itkDiffeomorphicDemonsRegistrationFilterTest07 - COMMAND ITKPDEDeformableRegistrationTestDriver itkDiffeomorphicDemonsRegistrationFilterTest2 - ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice1.mha ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice2.mha ${ITK_TEST_OUTPUT_DIR}/itkDiffeomorphicDemonsRegistrationFilterTest07.mha 0 0 0.001 0.1) -itk_add_test(NAME itkDiffeomorphicDemonsRegistrationFilterTest08 - COMMAND ITKPDEDeformableRegistrationTestDriver itkDiffeomorphicDemonsRegistrationFilterTest2 - ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice1.mha ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice2.mha ${ITK_TEST_OUTPUT_DIR}/itkDiffeomorphicDemonsRegistrationFilterTest08.mha 1 0 0.001 0.1) -itk_add_test(NAME itkDiffeomorphicDemonsRegistrationFilterTest09 - COMMAND ITKPDEDeformableRegistrationTestDriver itkDiffeomorphicDemonsRegistrationFilterTest2 - ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice1.mha ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice2.mha ${ITK_TEST_OUTPUT_DIR}/itkDiffeomorphicDemonsRegistrationFilterTest09.mha 2 0 0.001 0.1) -itk_add_test(NAME itkDiffeomorphicDemonsRegistrationFilterTest10 - COMMAND ITKPDEDeformableRegistrationTestDriver itkDiffeomorphicDemonsRegistrationFilterTest2 - ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice1.mha ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice2.mha ${ITK_TEST_OUTPUT_DIR}/itkDiffeomorphicDemonsRegistrationFilterTest10.mha 3 0 0.001 0.1) -itk_add_test(NAME itkDiffeomorphicDemonsRegistrationFilterTest11 - COMMAND ITKPDEDeformableRegistrationTestDriver itkDiffeomorphicDemonsRegistrationFilterTest2 - ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice1.mha ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice2.mha ${ITK_TEST_OUTPUT_DIR}/itkDiffeomorphicDemonsRegistrationFilterTest11.mha 0 1 0.001 0.1) -itk_add_test(NAME itkFastSymmetricForcesDemonsRegistrationFilterTest - COMMAND ITKPDEDeformableRegistrationTestDriver itkFastSymmetricForcesDemonsRegistrationFilterTest) -itk_add_test(NAME itkESMDemonsRegistrationFunctionTest - COMMAND ITKPDEDeformableRegistrationTestDriver itkESMDemonsRegistrationFunctionTest) +itk_add_test( + NAME + itkDiffeomorphicDemonsRegistrationFilterTest06 + COMMAND + ITKPDEDeformableRegistrationTestDriver + itkDiffeomorphicDemonsRegistrationFilterTest + 0 + 0 + 0.005 + 20.0 + 200 + 0.01 + 0.08 + 5 + 10) +itk_add_test( + NAME + itkDiffeomorphicDemonsRegistrationFilterTest07 + COMMAND + ITKPDEDeformableRegistrationTestDriver + itkDiffeomorphicDemonsRegistrationFilterTest2 + ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice1.mha + ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice2.mha + ${ITK_TEST_OUTPUT_DIR}/itkDiffeomorphicDemonsRegistrationFilterTest07.mha + 0 + 0 + 0.001 + 0.1) +itk_add_test( + NAME + itkDiffeomorphicDemonsRegistrationFilterTest08 + COMMAND + ITKPDEDeformableRegistrationTestDriver + itkDiffeomorphicDemonsRegistrationFilterTest2 + ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice1.mha + ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice2.mha + ${ITK_TEST_OUTPUT_DIR}/itkDiffeomorphicDemonsRegistrationFilterTest08.mha + 1 + 0 + 0.001 + 0.1) +itk_add_test( + NAME + itkDiffeomorphicDemonsRegistrationFilterTest09 + COMMAND + ITKPDEDeformableRegistrationTestDriver + itkDiffeomorphicDemonsRegistrationFilterTest2 + ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice1.mha + ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice2.mha + ${ITK_TEST_OUTPUT_DIR}/itkDiffeomorphicDemonsRegistrationFilterTest09.mha + 2 + 0 + 0.001 + 0.1) +itk_add_test( + NAME + itkDiffeomorphicDemonsRegistrationFilterTest10 + COMMAND + ITKPDEDeformableRegistrationTestDriver + itkDiffeomorphicDemonsRegistrationFilterTest2 + ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice1.mha + ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice2.mha + ${ITK_TEST_OUTPUT_DIR}/itkDiffeomorphicDemonsRegistrationFilterTest10.mha + 3 + 0 + 0.001 + 0.1) +itk_add_test( + NAME + itkDiffeomorphicDemonsRegistrationFilterTest11 + COMMAND + ITKPDEDeformableRegistrationTestDriver + itkDiffeomorphicDemonsRegistrationFilterTest2 + ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice1.mha + ${ITK_EXAMPLE_DATA_ROOT}/RatLungSlice2.mha + ${ITK_TEST_OUTPUT_DIR}/itkDiffeomorphicDemonsRegistrationFilterTest11.mha + 0 + 1 + 0.001 + 0.1) +itk_add_test( + NAME + itkFastSymmetricForcesDemonsRegistrationFilterTest + COMMAND + ITKPDEDeformableRegistrationTestDriver + itkFastSymmetricForcesDemonsRegistrationFilterTest) +itk_add_test( + NAME + itkESMDemonsRegistrationFunctionTest + COMMAND + ITKPDEDeformableRegistrationTestDriver + itkESMDemonsRegistrationFunctionTest) diff --git a/Modules/Registration/PDEDeformable/wrapping/itkDemonsRegistrationFilter.wrap b/Modules/Registration/PDEDeformable/wrapping/itkDemonsRegistrationFilter.wrap index 1fce45e1868..3d4cb9d10be 100644 --- a/Modules/Registration/PDEDeformable/wrapping/itkDemonsRegistrationFilter.wrap +++ b/Modules/Registration/PDEDeformable/wrapping/itkDemonsRegistrationFilter.wrap @@ -1,16 +1,20 @@ itk_wrap_class("itk::DemonsRegistrationFilter" POINTER) - foreach(curr_dim ${ITK_WRAP_IMAGE_DIMS}) - if(${curr_dim} LESS 1) - continue() - endif() - # Vector components dimension must match image dimension. Temporarily change the global vector dims list. - set(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_DEMONS_REGISTRATION_FILTER "${ITK_WRAP_VECTOR_COMPONENTS}") - set(ITK_WRAP_VECTOR_COMPONENTS ${curr_dim}) - foreach(s ${WRAP_ITK_SCALAR}) - itk_wrap_image_filter_combinations("${s}" "${s}" "${WRAP_ITK_VECTOR_REAL}" ${curr_dim}) - endforeach() - # Restore the global vector dims list. - set(ITK_WRAP_VECTOR_COMPONENTS "${SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_DEMONS_REGISTRATION_FILTER}") - unset(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_DEMONS_REGISTRATION_FILTER) +foreach(curr_dim ${ITK_WRAP_IMAGE_DIMS}) + if(${curr_dim} LESS 1) + continue() + endif() + # Vector components dimension must match image dimension. Temporarily change the global vector dims list. + set(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_DEMONS_REGISTRATION_FILTER "${ITK_WRAP_VECTOR_COMPONENTS}") + set(ITK_WRAP_VECTOR_COMPONENTS ${curr_dim}) + foreach(s ${WRAP_ITK_SCALAR}) + itk_wrap_image_filter_combinations( + "${s}" + "${s}" + "${WRAP_ITK_VECTOR_REAL}" + ${curr_dim}) endforeach() + # Restore the global vector dims list. + set(ITK_WRAP_VECTOR_COMPONENTS "${SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_DEMONS_REGISTRATION_FILTER}") + unset(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_DEMONS_REGISTRATION_FILTER) +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/PDEDeformable/wrapping/itkDiffeomorphicDemonsRegistrationFilter.wrap b/Modules/Registration/PDEDeformable/wrapping/itkDiffeomorphicDemonsRegistrationFilter.wrap index b521326f08d..6019d328ebf 100644 --- a/Modules/Registration/PDEDeformable/wrapping/itkDiffeomorphicDemonsRegistrationFilter.wrap +++ b/Modules/Registration/PDEDeformable/wrapping/itkDiffeomorphicDemonsRegistrationFilter.wrap @@ -1,13 +1,12 @@ itk_wrap_class("itk::DiffeomorphicDemonsRegistrationFilter" POINTER) - # This filter needs to have image dimension == vector dimension - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions - foreach(t ${WRAP_ITK_SCALAR}) - foreach(v ${WRAP_ITK_VECTOR_REAL}) - itk_wrap_template( - "${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_I${v}${vector_dim}${d}}" - "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_I${v}${vector_dim}${d}}") - endforeach() +# This filter needs to have image dimension == vector dimension +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions + foreach(t ${WRAP_ITK_SCALAR}) + foreach(v ${WRAP_ITK_VECTOR_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_I${v}${vector_dim}${d}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_I${v}${vector_dim}${d}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/PDEDeformable/wrapping/itkLevelSetMotionRegistrationFilter.wrap b/Modules/Registration/PDEDeformable/wrapping/itkLevelSetMotionRegistrationFilter.wrap index fcac7b1ba6e..e710e657b2d 100644 --- a/Modules/Registration/PDEDeformable/wrapping/itkLevelSetMotionRegistrationFilter.wrap +++ b/Modules/Registration/PDEDeformable/wrapping/itkLevelSetMotionRegistrationFilter.wrap @@ -2,18 +2,22 @@ # so this class is not. # LevelSetMotionRegistrationFilter is wrapped with POINTER itk_wrap_class("itk::LevelSetMotionRegistrationFilter" POINTER) - foreach(curr_dim ${ITK_WRAP_IMAGE_DIMS}) - if(${curr_dim} LESS 1) - continue() - endif() - # Vector components dimension must match image dimension. Temporarily change the global vector dims list. - set(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_LEVEL_SET_MOTION_REGISTRATION_FILTER "${ITK_WRAP_VECTOR_COMPONENTS}") - set(ITK_WRAP_VECTOR_COMPONENTS ${curr_dim}) - foreach(s ${WRAP_ITK_SCALAR}) - itk_wrap_image_filter_combinations("${s}" "${s}" "${WRAP_ITK_VECTOR_REAL}" ${curr_dim}) - endforeach() - # Restore the global vector dims list. - set(ITK_WRAP_VECTOR_COMPONENTS "${SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_LEVEL_SET_MOTION_REGISTRATION_FILTER}") - unset(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_LEVEL_SET_MOTION_REGISTRATION_FILTER) +foreach(curr_dim ${ITK_WRAP_IMAGE_DIMS}) + if(${curr_dim} LESS 1) + continue() + endif() + # Vector components dimension must match image dimension. Temporarily change the global vector dims list. + set(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_LEVEL_SET_MOTION_REGISTRATION_FILTER "${ITK_WRAP_VECTOR_COMPONENTS}") + set(ITK_WRAP_VECTOR_COMPONENTS ${curr_dim}) + foreach(s ${WRAP_ITK_SCALAR}) + itk_wrap_image_filter_combinations( + "${s}" + "${s}" + "${WRAP_ITK_VECTOR_REAL}" + ${curr_dim}) endforeach() + # Restore the global vector dims list. + set(ITK_WRAP_VECTOR_COMPONENTS "${SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_LEVEL_SET_MOTION_REGISTRATION_FILTER}") + unset(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_LEVEL_SET_MOTION_REGISTRATION_FILTER) +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/PDEDeformable/wrapping/itkMultiResolutionPDEDeformableRegistration.wrap b/Modules/Registration/PDEDeformable/wrapping/itkMultiResolutionPDEDeformableRegistration.wrap index 6dd92b8ab17..6378a330068 100644 --- a/Modules/Registration/PDEDeformable/wrapping/itkMultiResolutionPDEDeformableRegistration.wrap +++ b/Modules/Registration/PDEDeformable/wrapping/itkMultiResolutionPDEDeformableRegistration.wrap @@ -1,12 +1,12 @@ itk_wrap_class("itk::MultiResolutionPDEDeformableRegistration" POINTER) - foreach(s ${WRAP_ITK_REAL}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(v ${WRAP_ITK_VECTOR_REAL}) - if(${d} GREATER 1) - itk_wrap_template("${ITKM_I${s}${d}}${ITKM_I${s}${d}}I${v}${d}${d}${s}" - "${ITKT_I${s}${d}}, ${ITKT_I${s}${d}}, itk::Image< ${ITKT_${v}${d}}, ${d} >, ${ITKT_${s}}") - endif() - endforeach() +foreach(s ${WRAP_ITK_REAL}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(v ${WRAP_ITK_VECTOR_REAL}) + if(${d} GREATER 1) + itk_wrap_template("${ITKM_I${s}${d}}${ITKM_I${s}${d}}I${v}${d}${d}${s}" + "${ITKT_I${s}${d}}, ${ITKT_I${s}${d}}, itk::Image< ${ITKT_${v}${d}}, ${d} >, ${ITKT_${s}}") + endif() endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/PDEDeformable/wrapping/itkPDEDeformableRegistrationFilter.wrap b/Modules/Registration/PDEDeformable/wrapping/itkPDEDeformableRegistrationFilter.wrap index a03f01c829c..f7ddc8fe690 100644 --- a/Modules/Registration/PDEDeformable/wrapping/itkPDEDeformableRegistrationFilter.wrap +++ b/Modules/Registration/PDEDeformable/wrapping/itkPDEDeformableRegistrationFilter.wrap @@ -1,16 +1,20 @@ itk_wrap_class("itk::PDEDeformableRegistrationFilter" POINTER) - foreach(curr_dim ${ITK_WRAP_IMAGE_DIMS}) - if(${curr_dim} LESS 1) - continue() - endif() - # Vector components dimension must match image dimension. Temporarily change the global vector dims list. - set(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_PDE_DEFORMABLE_REGISTRATION_FILTER "${ITK_WRAP_VECTOR_COMPONENTS}") - set(ITK_WRAP_VECTOR_COMPONENTS ${curr_dim}) - foreach(s ${WRAP_ITK_SCALAR}) - itk_wrap_image_filter_combinations("${s}" "${s}" "${WRAP_ITK_VECTOR_REAL}" ${curr_dim}) - endforeach() - # Restore the global vector dims list. - set(ITK_WRAP_VECTOR_COMPONENTS "${SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_PDE_DEFORMABLE_REGISTRATION_FILTER}") - unset(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_PDE_DEFORMABLE_REGISTRATION_FILTER) +foreach(curr_dim ${ITK_WRAP_IMAGE_DIMS}) + if(${curr_dim} LESS 1) + continue() + endif() + # Vector components dimension must match image dimension. Temporarily change the global vector dims list. + set(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_PDE_DEFORMABLE_REGISTRATION_FILTER "${ITK_WRAP_VECTOR_COMPONENTS}") + set(ITK_WRAP_VECTOR_COMPONENTS ${curr_dim}) + foreach(s ${WRAP_ITK_SCALAR}) + itk_wrap_image_filter_combinations( + "${s}" + "${s}" + "${WRAP_ITK_VECTOR_REAL}" + ${curr_dim}) endforeach() + # Restore the global vector dims list. + set(ITK_WRAP_VECTOR_COMPONENTS "${SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_PDE_DEFORMABLE_REGISTRATION_FILTER}") + unset(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_PDE_DEFORMABLE_REGISTRATION_FILTER) +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/PDEDeformable/wrapping/itkSymmetricForcesDemonsRegistrationFilter.wrap b/Modules/Registration/PDEDeformable/wrapping/itkSymmetricForcesDemonsRegistrationFilter.wrap index a1c8ead7297..9bbc469dfbb 100644 --- a/Modules/Registration/PDEDeformable/wrapping/itkSymmetricForcesDemonsRegistrationFilter.wrap +++ b/Modules/Registration/PDEDeformable/wrapping/itkSymmetricForcesDemonsRegistrationFilter.wrap @@ -1,18 +1,24 @@ # DemonsRegistrationFilter is wrapped with POINTER_WITH_SUPERCLASS # so this class is not. itk_wrap_class("itk::SymmetricForcesDemonsRegistrationFilter" POINTER) - foreach(curr_dim ${ITK_WRAP_IMAGE_DIMS}) - if(${curr_dim} LESS 1) - continue() - endif() - # Vector components dimension must match image dimension. Temporarily change the global vector dims list. - set(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_SYMMETRIC_FORCES_DEMONS_REGISTRATION_FILTER "${ITK_WRAP_VECTOR_COMPONENTS}") - set(ITK_WRAP_VECTOR_COMPONENTS ${curr_dim}) - foreach(s ${WRAP_ITK_SCALAR}) - itk_wrap_image_filter_combinations("${s}" "${s}" "${WRAP_ITK_VECTOR_REAL}" ${curr_dim}) - endforeach() - # Restore the global vector dims list. - set(ITK_WRAP_VECTOR_COMPONENTS "${SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_SYMMETRIC_FORCES_DEMONS_REGISTRATION_FILTER}") - unset(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_SYMMETRIC_FORCES_DEMONS_REGISTRATION_FILTER) +foreach(curr_dim ${ITK_WRAP_IMAGE_DIMS}) + if(${curr_dim} LESS 1) + continue() + endif() + # Vector components dimension must match image dimension. Temporarily change the global vector dims list. + set(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_SYMMETRIC_FORCES_DEMONS_REGISTRATION_FILTER + "${ITK_WRAP_VECTOR_COMPONENTS}") + set(ITK_WRAP_VECTOR_COMPONENTS ${curr_dim}) + foreach(s ${WRAP_ITK_SCALAR}) + itk_wrap_image_filter_combinations( + "${s}" + "${s}" + "${WRAP_ITK_VECTOR_REAL}" + ${curr_dim}) endforeach() + # Restore the global vector dims list. + set(ITK_WRAP_VECTOR_COMPONENTS + "${SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_SYMMETRIC_FORCES_DEMONS_REGISTRATION_FILTER}") + unset(SAVE_ITK_WRAP_VECTOR_COMPONENTS_FOR_ITK_SYMMETRIC_FORCES_DEMONS_REGISTRATION_FILTER) +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/PDEDeformable/wrapping/test/CMakeLists.txt b/Modules/Registration/PDEDeformable/wrapping/test/CMakeLists.txt index f98148465e5..aff3f804e89 100644 --- a/Modules/Registration/PDEDeformable/wrapping/test/CMakeLists.txt +++ b/Modules/Registration/PDEDeformable/wrapping/test/CMakeLists.txt @@ -1,4 +1,7 @@ if(ITK_WRAP_PYTHON) - itk_python_expression_add_test(NAME itkDiffeomorphicDemonsRegistrationFilterPythonTest - EXPRESSION "instance = itk.DiffeomorphicDemonsRegistrationFilter.New()") + itk_python_expression_add_test( + NAME + itkDiffeomorphicDemonsRegistrationFilterPythonTest + EXPRESSION + "instance = itk.DiffeomorphicDemonsRegistrationFilter.New()") endif() diff --git a/Modules/Registration/RegistrationMethodsv4/itk-module.cmake b/Modules/Registration/RegistrationMethodsv4/itk-module.cmake index bd2c7c2bc0f..62b60b4eb0d 100644 --- a/Modules/Registration/RegistrationMethodsv4/itk-module.cmake +++ b/Modules/Registration/RegistrationMethodsv4/itk-module.cmake @@ -1,12 +1,14 @@ -set(DOCUMENTATION "This module contains typical examples of regitration methods based upon the high dimensional metrics and high dimensional optimizers.") +set(DOCUMENTATION + "This module contains typical examples of regitration methods based upon the high dimensional metrics and high dimensional optimizers." +) -itk_module(ITKRegistrationMethodsv4 +itk_module( + ITKRegistrationMethodsv4 ENABLE_SHARED DEPENDS - ITKOptimizersv4 - ITKMetricsv4 + ITKOptimizersv4 + ITKMetricsv4 TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Registration/RegistrationMethodsv4/src/CMakeLists.txt b/Modules/Registration/RegistrationMethodsv4/src/CMakeLists.txt index 5f684bfe952..9dcb62b4351 100644 --- a/Modules/Registration/RegistrationMethodsv4/src/CMakeLists.txt +++ b/Modules/Registration/RegistrationMethodsv4/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKRegistrationMethodsv4_SRCS - itkImageRegistrationMethodv4.cxx - ) +set(ITKRegistrationMethodsv4_SRCS itkImageRegistrationMethodv4.cxx) itk_module_add_library(ITKRegistrationMethodsv4 ${ITKRegistrationMethodsv4_SRCS}) diff --git a/Modules/Registration/RegistrationMethodsv4/test/CMakeLists.txt b/Modules/Registration/RegistrationMethodsv4/test/CMakeLists.txt index 7ca501ced9a..f1356595a5a 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/CMakeLists.txt +++ b/Modules/Registration/RegistrationMethodsv4/test/CMakeLists.txt @@ -1,300 +1,432 @@ itk_module_test() set(ITKRegistrationMethodsv4Tests -itkImageRegistrationSamplingTest.cxx -itkSimpleImageRegistrationTest.cxx -itkSimpleImageRegistrationTest2.cxx -itkSimpleImageRegistrationTest3.cxx -itkSimpleImageRegistrationTest4.cxx -itkSimpleImageRegistrationTestWithMaskAndSampling.cxx -itkSimplePointSetRegistrationTest.cxx -itkExponentialImageRegistrationTest.cxx -itkBSplineExponentialImageRegistrationTest.cxx -itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx -itkTimeVaryingVelocityFieldImageRegistrationTest.cxx -itkSyNImageRegistrationTest.cxx -itkSyNPointSetRegistrationTest.cxx -itkBSplineSyNImageRegistrationTest.cxx -itkBSplineSyNPointSetRegistrationTest.cxx -itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest.cxx -itkQuasiNewtonOptimizerv4RegistrationTest.cxx -itkBSplineImageRegistrationTest.cxx -) + itkImageRegistrationSamplingTest.cxx + itkSimpleImageRegistrationTest.cxx + itkSimpleImageRegistrationTest2.cxx + itkSimpleImageRegistrationTest3.cxx + itkSimpleImageRegistrationTest4.cxx + itkSimpleImageRegistrationTestWithMaskAndSampling.cxx + itkSimplePointSetRegistrationTest.cxx + itkExponentialImageRegistrationTest.cxx + itkBSplineExponentialImageRegistrationTest.cxx + itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx + itkTimeVaryingVelocityFieldImageRegistrationTest.cxx + itkSyNImageRegistrationTest.cxx + itkSyNPointSetRegistrationTest.cxx + itkBSplineSyNImageRegistrationTest.cxx + itkBSplineSyNPointSetRegistrationTest.cxx + itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest.cxx + itkQuasiNewtonOptimizerv4RegistrationTest.cxx + itkBSplineImageRegistrationTest.cxx) set(INPUTDATA ${ITK_DATA_ROOT}/Input) set(BASELINE_ROOT ${ITK_DATA_ROOT}/Baseline) set(TEMP ${ITK_TEST_OUTPUT_DIR}) -CreateTestDriver(ITKRegistrationMethodsv4 "${ITKRegistrationMethodsv4-Test_LIBRARIES}" "${ITKRegistrationMethodsv4Tests}") +createtestdriver(ITKRegistrationMethodsv4 "${ITKRegistrationMethodsv4-Test_LIBRARIES}" + "${ITKRegistrationMethodsv4Tests}") -itk_add_test(NAME itkImageRegistrationSamplingTest - COMMAND ITKRegistrationMethodsv4TestDriver - itkImageRegistrationSamplingTest - ) +itk_add_test( + NAME + itkImageRegistrationSamplingTest + COMMAND + ITKRegistrationMethodsv4TestDriver + itkImageRegistrationSamplingTest) -itk_add_test(NAME itkSimpleImageRegistrationTestDouble - COMMAND ITKRegistrationMethodsv4TestDriver - --with-threads 1 - --compareIntensityTolerance 3.0 - --compareNumberOfPixelsTolerance 8 - --compare DATA{Baseline/itkSimpleImageRegistrationTest.nii,:} - ${TEMP}/itkSimpleImageRegistrationTestDouble.nii - itkSimpleImageRegistrationTest - double - 2 # number of dimensions - DATA{Input/r16slice_rigid.nii.gz} - DATA{Input/r64slice.nii.gz} - ${TEMP}/itkSimpleImageRegistrationTestDouble.nii - 100 # number of affine iterations - 10 # number of deformable iterations - ) -set_property(TEST itkSimpleImageRegistrationTestDouble APPEND PROPERTY LABELS RUNS_LONG) +itk_add_test( + NAME + itkSimpleImageRegistrationTestDouble + COMMAND + ITKRegistrationMethodsv4TestDriver + --with-threads + 1 + --compareIntensityTolerance + 3.0 + --compareNumberOfPixelsTolerance + 8 + --compare + DATA{Baseline/itkSimpleImageRegistrationTest.nii,:} + ${TEMP}/itkSimpleImageRegistrationTestDouble.nii + itkSimpleImageRegistrationTest + double + 2 # number of dimensions + DATA{Input/r16slice_rigid.nii.gz} + DATA{Input/r64slice.nii.gz} + ${TEMP}/itkSimpleImageRegistrationTestDouble.nii + 100 # number of affine iterations + 10 # number of deformable iterations +) +set_property( + TEST itkSimpleImageRegistrationTestDouble + APPEND + PROPERTY LABELS RUNS_LONG) set_tests_properties(itkSimpleImageRegistrationTestDouble PROPERTIES COST 30) -itk_add_test(NAME itkSimpleImageRegistrationTestFloat - COMMAND ITKRegistrationMethodsv4TestDriver - --with-threads 1 - --compareIntensityTolerance 3.0 - --compareNumberOfPixelsTolerance 8 - --compare DATA{Baseline/itkSimpleImageRegistrationTest.nii,:} - ${TEMP}/itkSimpleImageRegistrationTestFloat.nii - itkSimpleImageRegistrationTest - float - 2 # number of dimensions - DATA{Input/r16slice_rigid.nii.gz} - DATA{Input/r64slice.nii.gz} - ${TEMP}/itkSimpleImageRegistrationTestFloat.nii - 100 # number of affine iterations - 10 # number of deformable iterations - ) -set_property(TEST itkSimpleImageRegistrationTestFloat APPEND PROPERTY LABELS RUNS_LONG) +itk_add_test( + NAME + itkSimpleImageRegistrationTestFloat + COMMAND + ITKRegistrationMethodsv4TestDriver + --with-threads + 1 + --compareIntensityTolerance + 3.0 + --compareNumberOfPixelsTolerance + 8 + --compare + DATA{Baseline/itkSimpleImageRegistrationTest.nii,:} + ${TEMP}/itkSimpleImageRegistrationTestFloat.nii + itkSimpleImageRegistrationTest + float + 2 # number of dimensions + DATA{Input/r16slice_rigid.nii.gz} + DATA{Input/r64slice.nii.gz} + ${TEMP}/itkSimpleImageRegistrationTestFloat.nii + 100 # number of affine iterations + 10 # number of deformable iterations +) +set_property( + TEST itkSimpleImageRegistrationTestFloat + APPEND + PROPERTY LABELS RUNS_LONG) set_tests_properties(itkSimpleImageRegistrationTestFloat PROPERTIES COST 30) -itk_add_test(NAME itkSimpleImageRegistrationTestWithMaskAndSamplingDouble - COMMAND ITKRegistrationMethodsv4TestDriver - --with-threads 1 - itkSimpleImageRegistrationTestWithMaskAndSampling - double - 2 # number of dimensions - DATA{Input/r16slice_rigid.nii.gz} - DATA{Input/r64slice.nii.gz} - ${TEMP}/itkSimpleImageRegistrationTestWithMaskAndSamplingDouble.nii.gz - 100 # number of affine iterations - 10 # number of deformable iterations - ) -set_property(TEST itkSimpleImageRegistrationTestWithMaskAndSamplingDouble APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME itkSimpleImageRegistrationTestWithMaskAndSamplingFloat - COMMAND ITKRegistrationMethodsv4TestDriver - --with-threads 1 - itkSimpleImageRegistrationTestWithMaskAndSampling - float - 2 # number of dimensions - DATA{Input/r16slice_rigid.nii.gz} - DATA{Input/r64slice.nii.gz} - ${TEMP}/itkSimpleImageRegistrationTestWithMaskAndSamplingFloat.nii.gz - 100 # number of affine iterations - 10 # number of deformable iterations - ) -set_property(TEST itkSimpleImageRegistrationTestWithMaskAndSamplingFloat APPEND PROPERTY LABELS RUNS_LONG) - -itk_add_test(NAME itkSimpleImageRegistrationTest2 - COMMAND ITKRegistrationMethodsv4TestDriver - --with-threads 1 - itkSimpleImageRegistrationTest2 - 2 # number of dimensions - DATA{Input/r16slice_rigid.nii.gz} - DATA{Input/r64slice.nii.gz} - ${TEMP}/itkSimpleImageRegistrationTest2New.nii.gz - 100 # number of affine iterations - ) -set_property(TEST itkSimpleImageRegistrationTest2 APPEND PROPERTY LABELS RUNS_LONG) +itk_add_test( + NAME + itkSimpleImageRegistrationTestWithMaskAndSamplingDouble + COMMAND + ITKRegistrationMethodsv4TestDriver + --with-threads + 1 + itkSimpleImageRegistrationTestWithMaskAndSampling + double + 2 # number of dimensions + DATA{Input/r16slice_rigid.nii.gz} + DATA{Input/r64slice.nii.gz} + ${TEMP}/itkSimpleImageRegistrationTestWithMaskAndSamplingDouble.nii.gz + 100 # number of affine iterations + 10 # number of deformable iterations +) +set_property( + TEST itkSimpleImageRegistrationTestWithMaskAndSamplingDouble + APPEND + PROPERTY LABELS RUNS_LONG) -itk_add_test(NAME itkSimpleImageRegistrationTest3 - COMMAND ITKRegistrationMethodsv4TestDriver - --with-threads 1 - itkSimpleImageRegistrationTest3 - 2 # number of dimensions - DATA{Input/r16slice_rigid.nii.gz} - DATA{Input/r64slice.nii.gz} - ${TEMP}/itkSimpleImageRegistrationTest3New.nii.gz - ) -set_property(TEST itkSimpleImageRegistrationTest3 APPEND PROPERTY LABELS RUNS_LONG) +itk_add_test( + NAME + itkSimpleImageRegistrationTestWithMaskAndSamplingFloat + COMMAND + ITKRegistrationMethodsv4TestDriver + --with-threads + 1 + itkSimpleImageRegistrationTestWithMaskAndSampling + float + 2 # number of dimensions + DATA{Input/r16slice_rigid.nii.gz} + DATA{Input/r64slice.nii.gz} + ${TEMP}/itkSimpleImageRegistrationTestWithMaskAndSamplingFloat.nii.gz + 100 # number of affine iterations + 10 # number of deformable iterations +) +set_property( + TEST itkSimpleImageRegistrationTestWithMaskAndSamplingFloat + APPEND + PROPERTY LABELS RUNS_LONG) -itk_add_test(NAME itkSimpleImageRegistrationTest4 - COMMAND ITKRegistrationMethodsv4TestDriver - --with-threads 1 - itkSimpleImageRegistrationTest4 - 2 # number of dimensions - DATA{Input/Blob1.mha} - DATA{Input/Blob2.mha} - ) +itk_add_test( + NAME + itkSimpleImageRegistrationTest2 + COMMAND + ITKRegistrationMethodsv4TestDriver + --with-threads + 1 + itkSimpleImageRegistrationTest2 + 2 # number of dimensions + DATA{Input/r16slice_rigid.nii.gz} + DATA{Input/r64slice.nii.gz} + ${TEMP}/itkSimpleImageRegistrationTest2New.nii.gz + 100 # number of affine iterations +) +set_property( + TEST itkSimpleImageRegistrationTest2 + APPEND + PROPERTY LABELS RUNS_LONG) +itk_add_test( + NAME + itkSimpleImageRegistrationTest3 + COMMAND + ITKRegistrationMethodsv4TestDriver + --with-threads + 1 + itkSimpleImageRegistrationTest3 + 2 # number of dimensions + DATA{Input/r16slice_rigid.nii.gz} + DATA{Input/r64slice.nii.gz} + ${TEMP}/itkSimpleImageRegistrationTest3New.nii.gz) +set_property( + TEST itkSimpleImageRegistrationTest3 + APPEND + PROPERTY LABELS RUNS_LONG) -itk_add_test(NAME itkSimplePointSetRegistrationTest - COMMAND ITKRegistrationMethodsv4TestDriver - --with-threads 1 - itkSimplePointSetRegistrationTest - ) -set_property(TEST itkSimplePointSetRegistrationTest APPEND PROPERTY LABELS RUNS_LONG) +itk_add_test( + NAME + itkSimpleImageRegistrationTest4 + COMMAND + ITKRegistrationMethodsv4TestDriver + --with-threads + 1 + itkSimpleImageRegistrationTest4 + 2 # number of dimensions + DATA{Input/Blob1.mha} + DATA{Input/Blob2.mha}) -itk_add_test(NAME itkSyNPointSetRegistrationTest - COMMAND ITKRegistrationMethodsv4TestDriver - --with-threads 1 - itkSyNPointSetRegistrationTest - ) -set_property(TEST itkSyNPointSetRegistrationTest APPEND PROPERTY LABELS RUNS_LONG) +itk_add_test( + NAME + itkSimplePointSetRegistrationTest + COMMAND + ITKRegistrationMethodsv4TestDriver + --with-threads + 1 + itkSimplePointSetRegistrationTest) +set_property( + TEST itkSimplePointSetRegistrationTest + APPEND + PROPERTY LABELS RUNS_LONG) -itk_add_test(NAME itkBSplineSyNPointSetRegistrationTest - COMMAND ITKRegistrationMethodsv4TestDriver - --with-threads 1 - itkBSplineSyNPointSetRegistrationTest - ) -set_property(TEST itkBSplineSyNPointSetRegistrationTest APPEND PROPERTY LABELS RUNS_LONG) +itk_add_test( + NAME + itkSyNPointSetRegistrationTest + COMMAND + ITKRegistrationMethodsv4TestDriver + --with-threads + 1 + itkSyNPointSetRegistrationTest) +set_property( + TEST itkSyNPointSetRegistrationTest + APPEND + PROPERTY LABELS RUNS_LONG) -itk_add_test(NAME itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest - COMMAND ITKRegistrationMethodsv4TestDriver - itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest - ) -set_property(TEST itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest APPEND PROPERTY LABELS RUNS_LONG) +itk_add_test( + NAME + itkBSplineSyNPointSetRegistrationTest + COMMAND + ITKRegistrationMethodsv4TestDriver + --with-threads + 1 + itkBSplineSyNPointSetRegistrationTest) +set_property( + TEST itkBSplineSyNPointSetRegistrationTest + APPEND + PROPERTY LABELS RUNS_LONG) +itk_add_test( + NAME + itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest + COMMAND + ITKRegistrationMethodsv4TestDriver + itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest) +set_property( + TEST itkTimeVaryingBSplineVelocityFieldPointSetRegistrationTest + APPEND + PROPERTY LABELS RUNS_LONG) -itk_add_test(NAME itkExponentialImageRegistrationTest - COMMAND ITKRegistrationMethodsv4TestDriver - --with-threads 1 - --compareIntensityTolerance 3.0 - --compareNumberOfPixelsTolerance 4 -# --compare DATA{Baseline/itkSimpleImageRegistrationTestNew.nii.gz} -# ${TEMP}/itkExponentialImageRegistrationTestNew.nii.gz - itkExponentialImageRegistrationTest - 2 # number of dimensions - DATA{Input/r16slice_rigid.nii.gz} - DATA{Input/r64slice.nii.gz} - ${TEMP}/itkExponentialImageRegistrationTestNew.nii.gz - 100 # number of affine iterations - 10 # number of deformable iterations - 1 - 0.0 - 1.0 - 10) -set_property(TEST itkExponentialImageRegistrationTest APPEND PROPERTY LABELS RUNS_LONG) +itk_add_test( + NAME + itkExponentialImageRegistrationTest + COMMAND + ITKRegistrationMethodsv4TestDriver + --with-threads + 1 + --compareIntensityTolerance + 3.0 + --compareNumberOfPixelsTolerance + 4 + # --compare DATA{Baseline/itkSimpleImageRegistrationTestNew.nii.gz} + # ${TEMP}/itkExponentialImageRegistrationTestNew.nii.gz + itkExponentialImageRegistrationTest + 2 # number of dimensions + DATA{Input/r16slice_rigid.nii.gz} + DATA{Input/r64slice.nii.gz} + ${TEMP}/itkExponentialImageRegistrationTestNew.nii.gz + 100 # number of affine iterations + 10 # number of deformable iterations + 1 + 0.0 + 1.0 + 10) +set_property( + TEST itkExponentialImageRegistrationTest + APPEND + PROPERTY LABELS RUNS_LONG) -itk_add_test(NAME itkBSplineExponentialImageRegistrationTest - COMMAND ITKRegistrationMethodsv4TestDriver - --with-threads 1 - --compareIntensityTolerance 3.0 - --compareNumberOfPixelsTolerance 4 -# --compare DATA{Baseline/itkSimpleImageRegistrationTestNew.nii.gz} -# ${TEMP}/itkBSplineExponentialImageRegistrationTestNew.nii.gz - itkBSplineExponentialImageRegistrationTest - 2 # number of dimensions - DATA{Input/r16slice_rigid.nii.gz} - DATA{Input/r64slice.nii.gz} - ${TEMP}/itkBSplineExponentialImageRegistrationTestNew.nii.gz - 100 # number of affine iterations - 10 # number of deformable iterations - ) -set_property(TEST itkBSplineExponentialImageRegistrationTest APPEND PROPERTY LABELS RUNS_LONG) +itk_add_test( + NAME + itkBSplineExponentialImageRegistrationTest + COMMAND + ITKRegistrationMethodsv4TestDriver + --with-threads + 1 + --compareIntensityTolerance + 3.0 + --compareNumberOfPixelsTolerance + 4 + # --compare DATA{Baseline/itkSimpleImageRegistrationTestNew.nii.gz} + # ${TEMP}/itkBSplineExponentialImageRegistrationTestNew.nii.gz + itkBSplineExponentialImageRegistrationTest + 2 # number of dimensions + DATA{Input/r16slice_rigid.nii.gz} + DATA{Input/r64slice.nii.gz} + ${TEMP}/itkBSplineExponentialImageRegistrationTestNew.nii.gz + 100 # number of affine iterations + 10 # number of deformable iterations +) +set_property( + TEST itkBSplineExponentialImageRegistrationTest + APPEND + PROPERTY LABELS RUNS_LONG) -itk_add_test(NAME itkTimeVaryingVelocityFieldImageRegistrationTest - COMMAND ITKRegistrationMethodsv4TestDriver - itkTimeVaryingVelocityFieldImageRegistrationTest - 2 # number of dimensions - DATA{Input/r16slice_rigid.nii.gz} - DATA{Input/r64slice.nii.gz} - ${TEMP}/itkTimeVaryingVelocityFieldImageRegistrationTest - 2 # number of optimization iterations of the affine transform - 1 # number of iterations for first level of the displacement field - 1 # number of iterations for second level of the displacement field - 1 # number of iterations for third level of the displacement field - 0.5 # learning rate - ) -set_property(TEST itkTimeVaryingVelocityFieldImageRegistrationTest APPEND PROPERTY LABELS RUNS_LONG) +itk_add_test( + NAME + itkTimeVaryingVelocityFieldImageRegistrationTest + COMMAND + ITKRegistrationMethodsv4TestDriver + itkTimeVaryingVelocityFieldImageRegistrationTest + 2 # number of dimensions + DATA{Input/r16slice_rigid.nii.gz} + DATA{Input/r64slice.nii.gz} + ${TEMP}/itkTimeVaryingVelocityFieldImageRegistrationTest + 2 # number of optimization iterations of the affine transform + 1 # number of iterations for first level of the displacement field + 1 # number of iterations for second level of the displacement field + 1 # number of iterations for third level of the displacement field + 0.5 # learning rate +) +set_property( + TEST itkTimeVaryingVelocityFieldImageRegistrationTest + APPEND + PROPERTY LABELS RUNS_LONG) -itk_add_test(NAME itkTimeVaryingBSplineVelocityFieldImageRegistrationTest - COMMAND ITKRegistrationMethodsv4TestDriver - itkTimeVaryingBSplineVelocityFieldImageRegistrationTest - 2 # number of dimensions - DATA{Input/r16slice_rigid.nii.gz} - DATA{Input/r64slice.nii.gz} - ${TEMP}/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest - 2 # number of optimization iterations of the affine transform - 1 # number of iterations for first level of the displacement field - 1 # number of iterations for second level of the displacement field - 1 # number of iterations for third level of the displacement field - 0.5 # learning rate - 1.0e-7 - 10 - ) +itk_add_test( + NAME + itkTimeVaryingBSplineVelocityFieldImageRegistrationTest + COMMAND + ITKRegistrationMethodsv4TestDriver + itkTimeVaryingBSplineVelocityFieldImageRegistrationTest + 2 # number of dimensions + DATA{Input/r16slice_rigid.nii.gz} + DATA{Input/r64slice.nii.gz} + ${TEMP}/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest + 2 # number of optimization iterations of the affine transform + 1 # number of iterations for first level of the displacement field + 1 # number of iterations for second level of the displacement field + 1 # number of iterations for third level of the displacement field + 0.5 # learning rate + 1.0e-7 + 10) -set_property(TEST itkTimeVaryingBSplineVelocityFieldImageRegistrationTest APPEND PROPERTY LABELS RUNS_LONG) +set_property( + TEST itkTimeVaryingBSplineVelocityFieldImageRegistrationTest + APPEND + PROPERTY LABELS RUNS_LONG) -itk_add_test(NAME itkSyNImageRegistrationTest - COMMAND ITKRegistrationMethodsv4TestDriver - itkSyNImageRegistrationTest - 2 # number of dimensions - DATA{Input/r16slice_rigid.nii.gz} - DATA{Input/r64slice.nii.gz} - ${TEMP}/itkSyNImageRegistrationTest - 10 # number of optimization iterations of the displacement field - 0.5 # learning rate - ) +itk_add_test( + NAME + itkSyNImageRegistrationTest + COMMAND + ITKRegistrationMethodsv4TestDriver + itkSyNImageRegistrationTest + 2 # number of dimensions + DATA{Input/r16slice_rigid.nii.gz} + DATA{Input/r64slice.nii.gz} + ${TEMP}/itkSyNImageRegistrationTest + 10 # number of optimization iterations of the displacement field + 0.5 # learning rate +) -itk_add_test(NAME itkBSplineSyNImageRegistrationTest - COMMAND ITKRegistrationMethodsv4TestDriver - itkBSplineSyNImageRegistrationTest - 2 # number of dimensions - DATA{Input/r16slice_rigid.nii.gz} - DATA{Input/r64slice.nii.gz} - ${TEMP}/itkBSplineSyNImageRegistrationTest - 10 # number of optimization iterations of the displacement field - 0.5 # learning rate - ) +itk_add_test( + NAME + itkBSplineSyNImageRegistrationTest + COMMAND + ITKRegistrationMethodsv4TestDriver + itkBSplineSyNImageRegistrationTest + 2 # number of dimensions + DATA{Input/r16slice_rigid.nii.gz} + DATA{Input/r64slice.nii.gz} + ${TEMP}/itkBSplineSyNImageRegistrationTest + 10 # number of optimization iterations of the displacement field + 0.5 # learning rate +) -itk_add_test(NAME itkQuasiNewtonOptimizerv4RegistrationTest1 - COMMAND ITKRegistrationMethodsv4TestDriver - itkQuasiNewtonOptimizerv4RegistrationTest - 2 # number of dimensions - ms # MeanSquares metric - DATA{Input/r16slice_rigid.nii.gz} - DATA{Input/r64slice.nii.gz} - ${TEMP}/itkQuasiNewtonOptimizerv4RegistrationTest1.nii.gz - 5 2) +itk_add_test( + NAME + itkQuasiNewtonOptimizerv4RegistrationTest1 + COMMAND + ITKRegistrationMethodsv4TestDriver + itkQuasiNewtonOptimizerv4RegistrationTest + 2 # number of dimensions + ms # MeanSquares metric + DATA{Input/r16slice_rigid.nii.gz} + DATA{Input/r64slice.nii.gz} + ${TEMP}/itkQuasiNewtonOptimizerv4RegistrationTest1.nii.gz + 5 + 2) -itk_add_test(NAME itkQuasiNewtonOptimizerv4RegistrationTest2 - COMMAND ITKRegistrationMethodsv4TestDriver - itkQuasiNewtonOptimizerv4RegistrationTest - 2 # number of dimensions - mi # metric of joint histogram mutual information - DATA{Input/r16slice_rigid.nii.gz} - DATA{Input/r64slice.nii.gz} - ${TEMP}/itkQuasiNewtonOptimizerv4RegistrationTest2.nii.gz - 5 2) +itk_add_test( + NAME + itkQuasiNewtonOptimizerv4RegistrationTest2 + COMMAND + ITKRegistrationMethodsv4TestDriver + itkQuasiNewtonOptimizerv4RegistrationTest + 2 # number of dimensions + mi # metric of joint histogram mutual information + DATA{Input/r16slice_rigid.nii.gz} + DATA{Input/r64slice.nii.gz} + ${TEMP}/itkQuasiNewtonOptimizerv4RegistrationTest2.nii.gz + 5 + 2) -itk_add_test(NAME itkQuasiNewtonOptimizerv4RegistrationTest3 - COMMAND ITKRegistrationMethodsv4TestDriver - itkQuasiNewtonOptimizerv4RegistrationTest - 2 # number of dimensions - anc # metric of ants neighborhood correlation - DATA{Input/r16slice_rigid.nii.gz} - DATA{Input/r64slice.nii.gz} - ${TEMP}/itkQuasiNewtonOptimizerv4RegistrationTest3.nii.gz - 5 2) +itk_add_test( + NAME + itkQuasiNewtonOptimizerv4RegistrationTest3 + COMMAND + ITKRegistrationMethodsv4TestDriver + itkQuasiNewtonOptimizerv4RegistrationTest + 2 # number of dimensions + anc # metric of ants neighborhood correlation + DATA{Input/r16slice_rigid.nii.gz} + DATA{Input/r64slice.nii.gz} + ${TEMP}/itkQuasiNewtonOptimizerv4RegistrationTest3.nii.gz + 5 + 2) -itk_add_test(NAME itkBSplineImageRegistrationTest - COMMAND ITKRegistrationMethodsv4TestDriver - --with-threads 1 - --compareIntensityTolerance 3.0 - --compareNumberOfPixelsTolerance 4 -# --compare DATA{Baseline/itkSimpleImageRegistrationTestNew.nii.gz} -# ${TEMP}/itkBSplineImageRegistrationTestNew.nii.gz - itkBSplineImageRegistrationTest - 2 # number of dimensions - DATA{Input/r16slice_rigid.nii.gz} - DATA{Input/r64slice.nii.gz} - ${TEMP}/itkBSplineImageRegistrationTestNew.nii.gz - 100 # number of affine iterations - 10 # number of deformable iterations - ) -set_property(TEST itkBSplineImageRegistrationTest APPEND PROPERTY LABELS RUNS_LONG) -set_property(TEST itkBSplineImageRegistrationTest APPEND PROPERTY RUN_SERIAL True) +itk_add_test( + NAME + itkBSplineImageRegistrationTest + COMMAND + ITKRegistrationMethodsv4TestDriver + --with-threads + 1 + --compareIntensityTolerance + 3.0 + --compareNumberOfPixelsTolerance + 4 + # --compare DATA{Baseline/itkSimpleImageRegistrationTestNew.nii.gz} + # ${TEMP}/itkBSplineImageRegistrationTestNew.nii.gz + itkBSplineImageRegistrationTest + 2 # number of dimensions + DATA{Input/r16slice_rigid.nii.gz} + DATA{Input/r64slice.nii.gz} + ${TEMP}/itkBSplineImageRegistrationTestNew.nii.gz + 100 # number of affine iterations + 10 # number of deformable iterations +) +set_property( + TEST itkBSplineImageRegistrationTest + APPEND + PROPERTY LABELS RUNS_LONG) +set_property( + TEST itkBSplineImageRegistrationTest + APPEND + PROPERTY RUN_SERIAL True) set_tests_properties(itkBSplineImageRegistrationTest PROPERTIES COST 30) diff --git a/Modules/Registration/RegistrationMethodsv4/wrapping/CMakeLists.txt b/Modules/Registration/RegistrationMethodsv4/wrapping/CMakeLists.txt index 7e97ecfbfb2..4786d595d1f 100644 --- a/Modules/Registration/RegistrationMethodsv4/wrapping/CMakeLists.txt +++ b/Modules/Registration/RegistrationMethodsv4/wrapping/CMakeLists.txt @@ -1,12 +1,11 @@ itk_wrap_module(ITKRegistrationMethodsv4) set(WRAPPER_SUBMODULE_ORDER - itkImageRegistrationMethodv4 - itkSyNImageRegistrationMethod - itkBSplineSyNImageRegistrationMethod - itkTimeVaryingVelocityFieldImageRegistrationMethodv4 - itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod -) + itkImageRegistrationMethodv4 + itkSyNImageRegistrationMethod + itkBSplineSyNImageRegistrationMethod + itkTimeVaryingVelocityFieldImageRegistrationMethodv4 + itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod) # was getting custom rule already exists errors if below was included itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Registration/RegistrationMethodsv4/wrapping/itkBSplineSyNImageRegistrationMethod.wrap b/Modules/Registration/RegistrationMethodsv4/wrapping/itkBSplineSyNImageRegistrationMethod.wrap index b4c08c308e5..6dcb651ec62 100644 --- a/Modules/Registration/RegistrationMethodsv4/wrapping/itkBSplineSyNImageRegistrationMethod.wrap +++ b/Modules/Registration/RegistrationMethodsv4/wrapping/itkBSplineSyNImageRegistrationMethod.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::BSplineSyNImageRegistrationMethod" POINTER_WITH_2_SUPERCLASSES) - foreach(d ${ITK_WRAP_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_${t}}${d}${ITKM_${t}}${d}" - "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_${t}}${d}${ITKM_${t}}${d}" + "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/RegistrationMethodsv4/wrapping/itkImageRegistrationMethodv4.wrap b/Modules/Registration/RegistrationMethodsv4/wrapping/itkImageRegistrationMethodv4.wrap index 8fa7852114b..d0f3f390684 100644 --- a/Modules/Registration/RegistrationMethodsv4/wrapping/itkImageRegistrationMethodv4.wrap +++ b/Modules/Registration/RegistrationMethodsv4/wrapping/itkImageRegistrationMethodv4.wrap @@ -9,37 +9,46 @@ itk_wrap_include("itkDataObjectDecorator.h") itk_wrap_include("itkMesh.h") itk_wrap_class("itk::DataObjectDecorator" POINTER) - foreach(d ${ITK_WRAP_DIMS}) - itk_wrap_template("DFT${ITKM_D}${d}" - "itk::DisplacementFieldTransform< ${ITKT_D}, ${d} >") - itk_wrap_template("BSOUDFT${ITKM_D}${d}" - "itk::BSplineSmoothingOnUpdateDisplacementFieldTransform< ${ITKT_D}, ${d} >") - # necessary for TimeVaryingVelocityFieldImageRegistrationMethodv4 - itk_wrap_template("GSOUTVVFT${ITKM_D}${d}" - "itk::GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform< ${ITKT_D}, ${d} >") - # necessary for TimeVaryingBSplineVelocityFieldImageRegistrationMethodv4 - itk_wrap_template("TVBVFT${ITKM_D}${d}" - "itk::TimeVaryingBSplineVelocityFieldTransform< ${ITKT_D}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_DIMS}) + itk_wrap_template("DFT${ITKM_D}${d}" "itk::DisplacementFieldTransform< ${ITKT_D}, ${d} >") + itk_wrap_template("BSOUDFT${ITKM_D}${d}" "itk::BSplineSmoothingOnUpdateDisplacementFieldTransform< ${ITKT_D}, ${d} >") + # necessary for TimeVaryingVelocityFieldImageRegistrationMethodv4 + itk_wrap_template("GSOUTVVFT${ITKM_D}${d}" + "itk::GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform< ${ITKT_D}, ${d} >") + # necessary for TimeVaryingBSplineVelocityFieldImageRegistrationMethodv4 + itk_wrap_template("TVBVFT${ITKM_D}${d}" "itk::TimeVaryingBSplineVelocityFieldTransform< ${ITKT_D}, ${d} >") +endforeach() itk_end_wrap_class() itk_wrap_class("itk::ImageRegistrationMethodv4" POINTER) - foreach(d ${ITK_WRAP_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}" - "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >") - itk_wrap_template("REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}T${ITKM_D}${d}${ITKM_${t}}${d}M${ITKM_D}${d}" - "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::Transform< ${ITKT_D}, ${d}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::Mesh< ${ITKT_D}, ${d} >") - itk_wrap_template("REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}DFT${ITKM_D}${d}${ITKM_${t}}${d}M${ITKM_D}${d}" - "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::DisplacementFieldTransform< ${ITKT_D}, ${d}>, itk::Image< ${ITKT_${t}}, ${d} >, itk::Mesh< ${ITKT_D}, ${d} >") - itk_wrap_template("REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}DFT${ITKM_D}${d}" - "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::DisplacementFieldTransform< ${ITKT_D}, ${d} >") - itk_wrap_template("REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}BSOUDFT${ITKM_D}${d}" - "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::BSplineSmoothingOnUpdateDisplacementFieldTransform< ${ITKT_D}, ${d} >") - itk_wrap_template("REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}GSOUTVVFT${ITKM_D}${d}" - "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform< ${ITKT_D}, ${d} >") - itk_wrap_template("REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}TVBVFT${ITKM_D}${d}" - "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::TimeVaryingBSplineVelocityFieldTransform< ${ITKT_D}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}" + "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >") + itk_wrap_template( + "REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}T${ITKM_D}${d}${ITKM_${t}}${d}M${ITKM_D}${d}" + "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::Transform< ${ITKT_D}, ${d}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::Mesh< ${ITKT_D}, ${d} >" + ) + itk_wrap_template( + "REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}DFT${ITKM_D}${d}${ITKM_${t}}${d}M${ITKM_D}${d}" + "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::DisplacementFieldTransform< ${ITKT_D}, ${d}>, itk::Image< ${ITKT_${t}}, ${d} >, itk::Mesh< ${ITKT_D}, ${d} >" + ) + itk_wrap_template( + "REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}DFT${ITKM_D}${d}" + "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::DisplacementFieldTransform< ${ITKT_D}, ${d} >" + ) + itk_wrap_template( + "REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}BSOUDFT${ITKM_D}${d}" + "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::BSplineSmoothingOnUpdateDisplacementFieldTransform< ${ITKT_D}, ${d} >" + ) + itk_wrap_template( + "REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}GSOUTVVFT${ITKM_D}${d}" + "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform< ${ITKT_D}, ${d} >" + ) + itk_wrap_template( + "REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}TVBVFT${ITKM_D}${d}" + "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::TimeVaryingBSplineVelocityFieldTransform< ${ITKT_D}, ${d} >" + ) endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/RegistrationMethodsv4/wrapping/itkSyNImageRegistrationMethod.wrap b/Modules/Registration/RegistrationMethodsv4/wrapping/itkSyNImageRegistrationMethod.wrap index 5af8e11b28c..1a89f49f7cc 100644 --- a/Modules/Registration/RegistrationMethodsv4/wrapping/itkSyNImageRegistrationMethod.wrap +++ b/Modules/Registration/RegistrationMethodsv4/wrapping/itkSyNImageRegistrationMethod.wrap @@ -2,14 +2,18 @@ itk_wrap_include("itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h") itk_wrap_include("itkMesh.h") itk_wrap_class("itk::SyNImageRegistrationMethod" POINTER_WITH_SUPERCLASS) - foreach(d ${ITK_WRAP_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_${t}}${d}${ITKM_${t}}${d}" - "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >") - itk_wrap_template("${ITKM_${t}}${d}${ITKM_${t}}${d}BSOUDFT${ITKM_D}${d}" - "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::BSplineSmoothingOnUpdateDisplacementFieldTransform< ${ITKT_D}, ${d} >") - itk_wrap_template("${ITKM_${t}}${d}${ITKM_${t}}${d}DFT${ITKM_D}${d}M${ITKM_D}${d}" - "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::DisplacementFieldTransform< ${ITKT_D}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::Mesh< ${ITKT_D}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_${t}}${d}${ITKM_${t}}${d}" + "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >") + itk_wrap_template( + "${ITKM_${t}}${d}${ITKM_${t}}${d}BSOUDFT${ITKM_D}${d}" + "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::BSplineSmoothingOnUpdateDisplacementFieldTransform< ${ITKT_D}, ${d} >" + ) + itk_wrap_template( + "${ITKM_${t}}${d}${ITKM_${t}}${d}DFT${ITKM_D}${d}M${ITKM_D}${d}" + "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::DisplacementFieldTransform< ${ITKT_D}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >, itk::Mesh< ${ITKT_D}, ${d} >" + ) endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/RegistrationMethodsv4/wrapping/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.wrap b/Modules/Registration/RegistrationMethodsv4/wrapping/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.wrap index 703f3f94390..62db4ba2704 100644 --- a/Modules/Registration/RegistrationMethodsv4/wrapping/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.wrap +++ b/Modules/Registration/RegistrationMethodsv4/wrapping/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::TimeVaryingBSplineVelocityFieldImageRegistrationMethod" POINTER_WITH_2_SUPERCLASSES) - foreach(d ${ITK_WRAP_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}" - "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}" + "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/RegistrationMethodsv4/wrapping/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.wrap b/Modules/Registration/RegistrationMethodsv4/wrapping/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.wrap index 7faeaac9e07..43aed4f9581 100644 --- a/Modules/Registration/RegistrationMethodsv4/wrapping/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.wrap +++ b/Modules/Registration/RegistrationMethodsv4/wrapping/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::TimeVaryingVelocityFieldImageRegistrationMethodv4" POINTER_WITH_SUPERCLASS) - foreach(d ${ITK_WRAP_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}" - "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("REGv4${ITKM_${t}}${d}${ITKM_${t}}${d}" + "itk::Image< ${ITKT_${t}}, ${d} >, itk::Image< ${ITKT_${t}}, ${d} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Registration/RegistrationMethodsv4/wrapping/test/CMakeLists.txt b/Modules/Registration/RegistrationMethodsv4/wrapping/test/CMakeLists.txt index 2012c22814a..a919052f569 100644 --- a/Modules/Registration/RegistrationMethodsv4/wrapping/test/CMakeLists.txt +++ b/Modules/Registration/RegistrationMethodsv4/wrapping/test/CMakeLists.txt @@ -1,16 +1,31 @@ if(ITK_WRAP_PYTHON) - itk_python_expression_add_test(NAME itkBSplineSyNImageRegistrationMethodPythonTest - EXPRESSION "instance = itk.BSplineSyNImageRegistrationMethod.New()") + itk_python_expression_add_test( + NAME + itkBSplineSyNImageRegistrationMethodPythonTest + EXPRESSION + "instance = itk.BSplineSyNImageRegistrationMethod.New()") - itk_python_expression_add_test(NAME itkImageRegistrationMethodv4PythonTest - EXPRESSION "instance = itk.ImageRegistrationMethodv4.New()") + itk_python_expression_add_test( + NAME + itkImageRegistrationMethodv4PythonTest + EXPRESSION + "instance = itk.ImageRegistrationMethodv4.New()") - itk_python_expression_add_test(NAME itkSyNImageRegistrationMethodPythonTest - EXPRESSION "instance = itk.SyNImageRegistrationMethod.New()") + itk_python_expression_add_test( + NAME + itkSyNImageRegistrationMethodPythonTest + EXPRESSION + "instance = itk.SyNImageRegistrationMethod.New()") - itk_python_expression_add_test(NAME itkTimeVaryingBSplineVelocityFieldImageRegistrationMethodv4PythonTest - EXPRESSION "instance = itk.TimeVaryingBSplineVelocityFieldImageRegistrationMethod.New()") + itk_python_expression_add_test( + NAME + itkTimeVaryingBSplineVelocityFieldImageRegistrationMethodv4PythonTest + EXPRESSION + "instance = itk.TimeVaryingBSplineVelocityFieldImageRegistrationMethod.New()") - itk_python_expression_add_test(NAME itkTimeVaryingVelocityFieldImageRegistrationMethodv4PythonTest - EXPRESSION "instance = itk.TimeVaryingVelocityFieldImageRegistrationMethodv4.New()") + itk_python_expression_add_test( + NAME + itkTimeVaryingVelocityFieldImageRegistrationMethodv4PythonTest + EXPRESSION + "instance = itk.TimeVaryingVelocityFieldImageRegistrationMethodv4.New()") endif() diff --git a/Modules/Remote/AdaptiveDenoising.remote.cmake b/Modules/Remote/AdaptiveDenoising.remote.cmake index d179eb8d9a2..e257574dab5 100644 --- a/Modules/Remote/AdaptiveDenoising.remote.cmake +++ b/Modules/Remote/AdaptiveDenoising.remote.cmake @@ -41,7 +41,8 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(AdaptiveDenoising +itk_fetch_module( + AdaptiveDenoising "A spatially adaptive denoising image filter using non-local means. A patch-based framework for new ITK functionality: Joint fusion, denoising, and non-local super-resolution. @@ -54,7 +55,9 @@ itk_fetch_module(AdaptiveDenoising Insight Journal. https://insight-journal.org/browse/publication/979. " - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/ntustison/ITKAdaptiveDenoising.git - GIT_TAG 24825c8d246e941334f47968553f0ae388851f0c -) + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/ntustison/ITKAdaptiveDenoising.git + GIT_TAG + 24825c8d246e941334f47968553f0ae388851f0c) diff --git a/Modules/Remote/AnalyzeObjectLabelMap.remote.cmake b/Modules/Remote/AnalyzeObjectLabelMap.remote.cmake index 6f7149734fd..ad8db95d101 100644 --- a/Modules/Remote/AnalyzeObjectLabelMap.remote.cmake +++ b/Modules/Remote/AnalyzeObjectLabelMap.remote.cmake @@ -45,9 +45,12 @@ if(Module_AnalyzeObjectMapIO) message(STATUS "AnalyzeObjectMap has been renamed to AnalyzeObjectLabelMap") set(Module_AnalyzeObjectLabelMap ${Module_AnalyzeObjectMapIO}) endif() -itk_fetch_module(AnalyzeObjectLabelMap +itk_fetch_module( + AnalyzeObjectLabelMap "AnalyzeObjectLabelMap plugin for ITK. From Insight Journal article with handle: https://www.insight-journal.org/browse/publication/178" - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/itkAnalyzeObjectMap.git - GIT_TAG e6a8291f6066c4f0e732d422c3cdb0a5644f2ce6 - ) + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/itkAnalyzeObjectMap.git + GIT_TAG + e6a8291f6066c4f0e732d422c3cdb0a5644f2ce6) diff --git a/Modules/Remote/AnisotropicDiffusionLBR.remote.cmake b/Modules/Remote/AnisotropicDiffusionLBR.remote.cmake index 500576d625e..c5a101d0860 100644 --- a/Modules/Remote/AnisotropicDiffusionLBR.remote.cmake +++ b/Modules/Remote/AnisotropicDiffusionLBR.remote.cmake @@ -41,7 +41,8 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(AnisotropicDiffusionLBR +itk_fetch_module( + AnisotropicDiffusionLBR "Anisotropic Non-Linear Diffusion is a powerful image processing technique, which allows to simultaneously remove the noise and enhance sharp features in two or three dimensional images. Anisotropic Diffusion is understood here @@ -61,7 +62,9 @@ itk_fetch_module(AnisotropicDiffusionLBR The Insight Journal. 2014 January-December. https://insight-journal.org/browse/publication/953 " - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR.git - GIT_TAG d46aab0e0c8f02b89eaa0420e61970559177683f - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR.git + GIT_TAG + d46aab0e0c8f02b89eaa0420e61970559177683f) diff --git a/Modules/Remote/BSplineGradient.remote.cmake b/Modules/Remote/BSplineGradient.remote.cmake index 06a838eba1e..e3a7f384d54 100644 --- a/Modules/Remote/BSplineGradient.remote.cmake +++ b/Modules/Remote/BSplineGradient.remote.cmake @@ -41,9 +41,12 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(BSplineGradient +itk_fetch_module( + BSplineGradient "Approximate an image's gradient from a b-spline fit to its intensity." - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKBSplineGradient.git - GIT_TAG 827b708f912b57519e9b1eec3551aea837e0cf7a -) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKBSplineGradient.git + GIT_TAG + 827b708f912b57519e9b1eec3551aea837e0cf7a) diff --git a/Modules/Remote/BioCell.remote.cmake b/Modules/Remote/BioCell.remote.cmake index 417c333aa8e..0ebff25b67b 100644 --- a/Modules/Remote/BioCell.remote.cmake +++ b/Modules/Remote/BioCell.remote.cmake @@ -41,12 +41,15 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(BioCell -"This module contains classes related to segmentation of biological cells. +itk_fetch_module( + BioCell + "This module contains classes related to segmentation of biological cells. It has classes to represent cells' shape, color, and growth state. It also has classes to represent a cell genome, whose expression is modeled by differential equations." - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKBioCell.git - GIT_TAG 5a6ee6c0cef727d8a6c39b3333af0fced0611dee - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKBioCell.git + GIT_TAG + 5a6ee6c0cef727d8a6c39b3333af0fced0611dee) diff --git a/Modules/Remote/BoneEnhancement.remote.cmake b/Modules/Remote/BoneEnhancement.remote.cmake index 3b963afcb42..da75418b664 100644 --- a/Modules/Remote/BoneEnhancement.remote.cmake +++ b/Modules/Remote/BoneEnhancement.remote.cmake @@ -41,9 +41,12 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(BoneEnhancement +itk_fetch_module( + BoneEnhancement "Various filters for enhancing cortical bones in quantitative computed tomography." - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKBoneEnhancement.git - GIT_TAG 658b9cb31f7216f604dfd35b187bd1ae80fd7506 -) + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKBoneEnhancement.git + GIT_TAG + 658b9cb31f7216f604dfd35b187bd1ae80fd7506) diff --git a/Modules/Remote/BoneMorphometry.remote.cmake b/Modules/Remote/BoneMorphometry.remote.cmake index a18e26ebc3d..31464da6bcd 100644 --- a/Modules/Remote/BoneMorphometry.remote.cmake +++ b/Modules/Remote/BoneMorphometry.remote.cmake @@ -41,7 +41,8 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(BoneMorphometry +itk_fetch_module( + BoneMorphometry "An Insight Toolkit (ITK) based implementation for bone morphometry quantification from computed tomography (CT) images. A more detailed description can be found in the Insight Journal (IJ) article: Vimort J., McCormick M., Paniagua B. @@ -49,7 +50,9 @@ itk_fetch_module(BoneMorphometry The Insight Journal. January-December. 2017. https://www.insight-journal.org/browse/publication/988 " - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKBoneMorphometry.git - GIT_TAG 47b8f352fb2cb7204d7a8b332847da438f268b35 -) + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKBoneMorphometry.git + GIT_TAG + 47b8f352fb2cb7204d7a8b332847da438f268b35) diff --git a/Modules/Remote/CMakeLists.txt b/Modules/Remote/CMakeLists.txt index 71ab8a2dc8e..32ac7417435 100644 --- a/Modules/Remote/CMakeLists.txt +++ b/Modules/Remote/CMakeLists.txt @@ -1,8 +1,19 @@ # Functions to fetch remote modules. include(ITKModuleRemote) -set(ITK_MINIMUM_COMPLIANCE_LEVEL "3" CACHE STRING "Minimum compliance level [5,4,3,2,1,0] for selecting ITK modules.") -set_property(CACHE PROPERTY STRINGS ITK_MINIMUM_COMPLIANCE_LEVEL "5" "4" "3" "2" "1" "0") +set(ITK_MINIMUM_COMPLIANCE_LEVEL + "3" + CACHE STRING "Minimum compliance level [5,4,3,2,1,0] for selecting ITK modules.") +set_property( + CACHE + PROPERTY STRINGS + ITK_MINIMUM_COMPLIANCE_LEVEL + "5" + "4" + "3" + "2" + "1" + "0") mark_as_advanced(FORCE ITK_MINIMUM_COMPLIANCE_LEVEL) file(GLOB remotes "*.remote.cmake") @@ -20,7 +31,8 @@ if(Module_ITKDeprecated) endforeach() endif() -mark_as_advanced(FORCE +mark_as_advanced( + FORCE DEFAULT_API_VERSION HDF5_BATCH_H5DETECT HDF5_ENABLE_HDFS diff --git a/Modules/Remote/Cleaver.remote.cmake b/Modules/Remote/Cleaver.remote.cmake index fde98f67112..7156fb1e73f 100644 --- a/Modules/Remote/Cleaver.remote.cmake +++ b/Modules/Remote/Cleaver.remote.cmake @@ -42,9 +42,12 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Matt McCormick -itk_fetch_module(Cleaver +itk_fetch_module( + Cleaver "ITK module wrapping Cleaver functionalities used for MultiMaterial Tetrahedral Meshing." - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/SCIInstitute/ITKCleaver.git - GIT_TAG 0ece368f2e8a8b8d619abf0157d288b1dfd080ac - ) + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/SCIInstitute/ITKCleaver.git + GIT_TAG + 0ece368f2e8a8b8d619abf0157d288b1dfd080ac) diff --git a/Modules/Remote/Cuberille.remote.cmake b/Modules/Remote/Cuberille.remote.cmake index 6cb89593ed7..006c751ccb2 100644 --- a/Modules/Remote/Cuberille.remote.cmake +++ b/Modules/Remote/Cuberille.remote.cmake @@ -43,10 +43,10 @@ # 2020-05-25 Continuous integration and clang format linting now performed by Github Actions # 2020-05-25 Line coverage is 99.8%, function coverage is 98.0% - # Contact: Matt McCormick -itk_fetch_module(Cuberille -"This module implements cuberille implicit surface +itk_fetch_module( + Cuberille + "This module implements cuberille implicit surface polygonization for ITK. This method operates by diving the surface into a number of small cubes called cuberilles. Each cuberille is centered at a pixel lying on the iso-surface and then quadrilaterals are generated for each @@ -66,7 +66,9 @@ And the related: https://www.insight-journal.org/browse/publication/213 January-June, 2008. " - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKCuberille.git - GIT_TAG 2b8509ad31beab7314146c19404ff0b49dcba6dc - ) + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKCuberille.git + GIT_TAG + 2b8509ad31beab7314146c19404ff0b49dcba6dc) diff --git a/Modules/Remote/CudaCommon.remote.cmake b/Modules/Remote/CudaCommon.remote.cmake index 1ac903f88bc..f33f6fe90c8 100644 --- a/Modules/Remote/CudaCommon.remote.cmake +++ b/Modules/Remote/CudaCommon.remote.cmake @@ -37,9 +37,12 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(CudaCommon +itk_fetch_module( + CudaCommon "Framework for processing images with Cuda." - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/RTKConsortium/ITKCudaCommon.git - GIT_TAG cc772817b320f0055a7bc4025465bda5b5a55140 -) + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/RTKConsortium/ITKCudaCommon.git + GIT_TAG + cc772817b320f0055a7bc4025465bda5b5a55140) diff --git a/Modules/Remote/Deprecated/NeuralNetworks.remote.cmake b/Modules/Remote/Deprecated/NeuralNetworks.remote.cmake index c9d5017d705..a726704066e 100644 --- a/Modules/Remote/Deprecated/NeuralNetworks.remote.cmake +++ b/Modules/Remote/Deprecated/NeuralNetworks.remote.cmake @@ -38,21 +38,25 @@ # This module has not received updates or testing for many many years # Core developers should *NOT* expend energy or resources keeping this codebase consistent with ITK -if(NOT ITK_LEGACY_REMOVE AND ITKV4_COMPATIBILITY AND Module_ITKDeprecated) +if(NOT ITK_LEGACY_REMOVE + AND ITKV4_COMPATIBILITY + AND Module_ITKDeprecated) -itk_fetch_module(NeuralNetworks -"This deprecated remote module contains classes and support classes + itk_fetch_module( + NeuralNetworks + "This deprecated remote module contains classes and support classes for the calculation of artificial neural networks. This can be used, for instance, for image classification. This historical set of features is likely not appropriate for modern neural network implementations due to performance issues." - - MODULE_COMPLIANCE_LEVEL 0 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKNeuralNetworks.git - GIT_TAG c293e56699d6d102dcde567baf1cf5b704819c17 - ) + MODULE_COMPLIANCE_LEVEL + 0 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKNeuralNetworks.git + GIT_TAG + c293e56699d6d102dcde567baf1cf5b704819c17) if(NOT ITK_LEGACY_SILENT AND Module_NeuralNetworks) message(WARNING "NeuralNetworks remote module is deprecated. diff --git a/Modules/Remote/FPFH.remote.cmake b/Modules/Remote/FPFH.remote.cmake index acfa82fabd4..faab007c928 100644 --- a/Modules/Remote/FPFH.remote.cmake +++ b/Modules/Remote/FPFH.remote.cmake @@ -41,15 +41,18 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(FPFH -"An ITK-based implementation of FPFH (Fast Point Feature Histogram) used for point cloud feature calculation. +itk_fetch_module( + FPFH + "An ITK-based implementation of FPFH (Fast Point Feature Histogram) used for point cloud feature calculation. The feature points could be used obtain salient points while performing registration using RANSAC remote module. The class PointFeature is the main driver that takes a PointSet as argument. Please refer to the documentation upstream for a detailed description and sample usage: https://github.com/InsightSoftwareConsortium/ITKFPFH " - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKFPFH.git - GIT_TAG c2c86b2b1e457e1d99c038aec38e2dea9e67f2e9 -) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKFPFH.git + GIT_TAG + c2c86b2b1e457e1d99c038aec38e2dea9e67f2e9) diff --git a/Modules/Remote/FixedPointInverseDisplacementField.remote.cmake b/Modules/Remote/FixedPointInverseDisplacementField.remote.cmake index 37c5f3f5519..725534d296e 100644 --- a/Modules/Remote/FixedPointInverseDisplacementField.remote.cmake +++ b/Modules/Remote/FixedPointInverseDisplacementField.remote.cmake @@ -41,9 +41,12 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(FixedPointInverseDisplacementField +itk_fetch_module( + FixedPointInverseDisplacementField "Computes the inverse of a displacement field." - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKFixedPointInverseDisplacementField.git - GIT_TAG e38e8a3c5af0ffc6ee208e44b805b817d9836ab2 - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKFixedPointInverseDisplacementField.git + GIT_TAG + e38e8a3c5af0ffc6ee208e44b805b817d9836ab2) diff --git a/Modules/Remote/GenericLabelInterpolator.remote.cmake b/Modules/Remote/GenericLabelInterpolator.remote.cmake index 101af9a969e..8271383ccdc 100644 --- a/Modules/Remote/GenericLabelInterpolator.remote.cmake +++ b/Modules/Remote/GenericLabelInterpolator.remote.cmake @@ -41,9 +41,12 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(GenericLabelInterpolator +itk_fetch_module( + GenericLabelInterpolator "A generic interpolator for multi-label images." - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKGenericLabelInterpolator.git - GIT_TAG 35212939091e9a449e78cf4b811f8081e2d3f104 - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKGenericLabelInterpolator.git + GIT_TAG + 35212939091e9a449e78cf4b811f8081e2d3f104) diff --git a/Modules/Remote/GrowCut.remote.cmake b/Modules/Remote/GrowCut.remote.cmake index b61d2e57052..f0e83c159bd 100644 --- a/Modules/Remote/GrowCut.remote.cmake +++ b/Modules/Remote/GrowCut.remote.cmake @@ -42,9 +42,12 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Niels Dekker -itk_fetch_module(GrowCut -"ITKGrowCut segments a 3D image from user-provided foreground and background seeds." - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKGrowCut.git - GIT_TAG 21d982afd15047173108d39643adfba3ba7ca0a9 - ) +itk_fetch_module( + GrowCut + "ITKGrowCut segments a 3D image from user-provided foreground and background seeds." + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKGrowCut.git + GIT_TAG + 21d982afd15047173108d39643adfba3ba7ca0a9) diff --git a/Modules/Remote/HASI.remote.cmake b/Modules/Remote/HASI.remote.cmake index d329f6cc9f9..1f754cea39a 100644 --- a/Modules/Remote/HASI.remote.cmake +++ b/Modules/Remote/HASI.remote.cmake @@ -42,9 +42,12 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Dženan Zukić -itk_fetch_module(HASI -"High-throughput Applications for Skeletal Imaging." - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/HASI.git - GIT_TAG d58acf4cda836bdedd1b7531dddc8ca7b20b396a - ) +itk_fetch_module( + HASI + "High-throughput Applications for Skeletal Imaging." + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/KitwareMedical/HASI.git + GIT_TAG + d58acf4cda836bdedd1b7531dddc8ca7b20b396a) diff --git a/Modules/Remote/HigherOrderAccurateGradient.remote.cmake b/Modules/Remote/HigherOrderAccurateGradient.remote.cmake index 6d2a41a6e14..7b51898d1d3 100644 --- a/Modules/Remote/HigherOrderAccurateGradient.remote.cmake +++ b/Modules/Remote/HigherOrderAccurateGradient.remote.cmake @@ -42,12 +42,15 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Matt McCormick -itk_fetch_module(HigherOrderAccurateGradient +itk_fetch_module( + HigherOrderAccurateGradient "This module contains a filter to compute higher order accurate numerical derivatives and gradients from an input scalar image. Higher Order Accurate Derivative and Gradient Calculation in ITK https://www.insight-journal.org/browse/publication/775" - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKHigherOrderAccurateGradient.git - GIT_TAG f90bb7ec83c7842c03e4e68d58957b965870497e - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKHigherOrderAccurateGradient.git + GIT_TAG + f90bb7ec83c7842c03e4e68d58957b965870497e) diff --git a/Modules/Remote/IOFDF.remote.cmake b/Modules/Remote/IOFDF.remote.cmake index 71ea55e910f..dd1939d7989 100644 --- a/Modules/Remote/IOFDF.remote.cmake +++ b/Modules/Remote/IOFDF.remote.cmake @@ -41,9 +41,12 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(IOFDF +itk_fetch_module( + IOFDF "FDFImageIO plugin for ITK. Authors Gleen Pierce/Nick Tustison/Kent Williams" - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIOFDF.git - GIT_TAG 79695870f4d2416b257db733624a3e8bfc38391d - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIOFDF.git + GIT_TAG + 79695870f4d2416b257db733624a3e8bfc38391d) diff --git a/Modules/Remote/IOMeshSTL.remote.cmake b/Modules/Remote/IOMeshSTL.remote.cmake index 4280ca9b2f7..eab108c89a7 100644 --- a/Modules/Remote/IOMeshSTL.remote.cmake +++ b/Modules/Remote/IOMeshSTL.remote.cmake @@ -42,10 +42,13 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Luis Ibanez -itk_fetch_module(IOMeshSTL +itk_fetch_module( + IOMeshSTL "This module contains classes for reading and writing QuadEdgeMeshes using the STL (STereoLithography) file format. https://www.insight-journal.org/browse/publication/913" - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIOMeshSTL.git - GIT_TAG 31594eb088ef35897e7ce0f02077e8ce50454e01 - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIOMeshSTL.git + GIT_TAG + 31594eb088ef35897e7ce0f02077e8ce50454e01) diff --git a/Modules/Remote/IOMeshSWC.remote.cmake b/Modules/Remote/IOMeshSWC.remote.cmake index 23de004b7fa..643d5aa46da 100644 --- a/Modules/Remote/IOMeshSWC.remote.cmake +++ b/Modules/Remote/IOMeshSWC.remote.cmake @@ -42,9 +42,12 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Matt McCormick -itk_fetch_module(IOMeshSWC +itk_fetch_module( + IOMeshSWC "Read meshes from SWC files, a format for representing neuron morphology." - MODULE_COMPLIANCE_LEVEL 4 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIOMeshSWC.git - GIT_TAG 6375295e7802c6a064c90d11f48b3ea238ac8d76 - ) + MODULE_COMPLIANCE_LEVEL + 4 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIOMeshSWC.git + GIT_TAG + 6375295e7802c6a064c90d11f48b3ea238ac8d76) diff --git a/Modules/Remote/IOOpenSlide.remote.cmake b/Modules/Remote/IOOpenSlide.remote.cmake index c422e2f04a3..5d73162eb3a 100644 --- a/Modules/Remote/IOOpenSlide.remote.cmake +++ b/Modules/Remote/IOOpenSlide.remote.cmake @@ -41,9 +41,12 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(IOOpenSlide +itk_fetch_module( + IOOpenSlide "ITK ImageIO for OpenSlide library supported file formats. These are generally TIFF-based microscopy formats." - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIOOpenSlide.git - GIT_TAG fb654552e240e50bd4121d431d88536d2c84e937 - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIOOpenSlide.git + GIT_TAG + fb654552e240e50bd4121d431d88536d2c84e937) diff --git a/Modules/Remote/IOScanco.remote.cmake b/Modules/Remote/IOScanco.remote.cmake index fa5fc7d49c1..01976e93719 100644 --- a/Modules/Remote/IOScanco.remote.cmake +++ b/Modules/Remote/IOScanco.remote.cmake @@ -41,9 +41,12 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(IOScanco +itk_fetch_module( + IOScanco "An ITK module to read and write Scanco microCT .isq files." - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKIOScanco.git - GIT_TAG c7352ec1d5071968f64459e722335170de59bba4 -) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/KitwareMedical/ITKIOScanco.git + GIT_TAG + c7352ec1d5071968f64459e722335170de59bba4) diff --git a/Modules/Remote/IOTransformDCMTK.remote.cmake b/Modules/Remote/IOTransformDCMTK.remote.cmake index 9297f2bf50b..3c595cd46c5 100644 --- a/Modules/Remote/IOTransformDCMTK.remote.cmake +++ b/Modules/Remote/IOTransformDCMTK.remote.cmake @@ -42,10 +42,13 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Matt McCormick -itk_fetch_module(IOTransformDCMTK +itk_fetch_module( + IOTransformDCMTK "The modules contains classes for reading spatial transform from DICOM files. See https://www.insight-journal.org/browse/publication/923" - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIOTransformDCMTK.git - GIT_TAG e97e0e8c27809eea1834dd534a47fc06168e3e45 - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIOTransformDCMTK.git + GIT_TAG + e97e0e8c27809eea1834dd534a47fc06168e3e45) diff --git a/Modules/Remote/IsotropicWavelets.remote.cmake b/Modules/Remote/IsotropicWavelets.remote.cmake index 84a5c3d2e0d..001de7877b6 100644 --- a/Modules/Remote/IsotropicWavelets.remote.cmake +++ b/Modules/Remote/IsotropicWavelets.remote.cmake @@ -42,8 +42,9 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Pablo Hernandez-Cerdan -itk_fetch_module(IsotropicWavelets -"An ITK-based implementation of steerable isotropic wavelet transforms for multiscale phase analysis. +itk_fetch_module( + IsotropicWavelets + "An ITK-based implementation of steerable isotropic wavelet transforms for multiscale phase analysis. A more detailed description can be found in the Insight Journal article:: Cerdan, P.H. \"Steerable Isotropic Wavelets for Multiscale and Phase Analysis\". @@ -51,7 +52,9 @@ Cerdan, P.H. \"Steerable Isotropic Wavelets for Multiscale and Phase Analysis\". November, 2016. " # Upstream repository was transferred from phcerdan to InsightSoftwareConsortium - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIsotropicWavelets.git - GIT_TAG b63d8d55f146d194b665e3599d5a154054d052e9 -) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIsotropicWavelets.git + GIT_TAG + b63d8d55f146d194b665e3599d5a154054d052e9) diff --git a/Modules/Remote/LabelErodeDilate.remote.cmake b/Modules/Remote/LabelErodeDilate.remote.cmake index 054acada366..7d63b7da627 100644 --- a/Modules/Remote/LabelErodeDilate.remote.cmake +++ b/Modules/Remote/LabelErodeDilate.remote.cmake @@ -41,7 +41,8 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(LabelErodeDilate +itk_fetch_module( + LabelErodeDilate "Classes performing morphology efficiently on label images. Label collisions are consistently handled, and operations are efficient (approximately constant time wrt @@ -49,8 +50,10 @@ itk_fetch_module(LabelErodeDilate structuring elements are supported. https://www.insight-journal.org/browse/publication/886 https://www.insight-journal.org/browse/publication/228" - MODULE_COMPLIANCE_LEVEL 2 + MODULE_COMPLIANCE_LEVEL + 2 #UPSTREAM_GIT_REPOSITORY - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKLabelErodeDilate.git - GIT_TAG 7e23b12be913ff2bd935d9ffc2d10b573a923501 - ) + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKLabelErodeDilate.git + GIT_TAG + 7e23b12be913ff2bd935d9ffc2d10b573a923501) diff --git a/Modules/Remote/LesionSizingToolkit.remote.cmake b/Modules/Remote/LesionSizingToolkit.remote.cmake index 6cf59bacc64..7b7d3148ee2 100644 --- a/Modules/Remote/LesionSizingToolkit.remote.cmake +++ b/Modules/Remote/LesionSizingToolkit.remote.cmake @@ -41,9 +41,12 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(LesionSizingToolkit +itk_fetch_module( + LesionSizingToolkit "Framework for determining the sizes of lesions in medical images." - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/LesionSizingToolkit.git - GIT_TAG 58b95e8f54e8f270b2b221c519f7a49c2086bb11 - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/LesionSizingToolkit.git + GIT_TAG + 58b95e8f54e8f270b2b221c519f7a49c2086bb11) diff --git a/Modules/Remote/MGHIO.remote.cmake b/Modules/Remote/MGHIO.remote.cmake index 7d91c498b23..8d4e2ea0ee7 100644 --- a/Modules/Remote/MGHIO.remote.cmake +++ b/Modules/Remote/MGHIO.remote.cmake @@ -41,9 +41,12 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(MGHIO +itk_fetch_module( + MGHIO "MGHIO ImageIO plugin for ITK" - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/itkMGHImageIO.git - GIT_TAG 4b2e7bd514d3759b6903b75c71d593d061b6e6a3 - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/itkMGHImageIO.git + GIT_TAG + 4b2e7bd514d3759b6903b75c71d593d061b6e6a3) diff --git a/Modules/Remote/MeshNoise.remote.cmake b/Modules/Remote/MeshNoise.remote.cmake index fc0d6f2e507..d7d3a0f6471 100644 --- a/Modules/Remote/MeshNoise.remote.cmake +++ b/Modules/Remote/MeshNoise.remote.cmake @@ -42,13 +42,16 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Davis Marc Vigneault -itk_fetch_module(MeshNoise +itk_fetch_module( + MeshNoise "Perturb itk::Mesh and itk::QuadEdgeMesh coordinates with Gaussian noise. Please see the following Insight Journal article for an introduction to this module: Vigneault, DM. Perturbing Mesh Vertices with Additive Gaussian Noise. https://www.insight-journal.org/browse/publication/981 " - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKMeshNoise.git - GIT_TAG a01fae4f1d637eb6d4a183d940b9ce79970db14e - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKMeshNoise.git + GIT_TAG + a01fae4f1d637eb6d4a183d940b9ce79970db14e) diff --git a/Modules/Remote/MeshToPolyData.remote.cmake b/Modules/Remote/MeshToPolyData.remote.cmake index aa552d0aada..893ecefc792 100644 --- a/Modules/Remote/MeshToPolyData.remote.cmake +++ b/Modules/Remote/MeshToPolyData.remote.cmake @@ -42,9 +42,12 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Matt McCormick -itk_fetch_module(MeshToPolyData -"Convert an ITK Mesh to a data structure compatible with vtkPolyData." - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKMeshToPolyData.git - GIT_TAG 40e3e6cc6a0742382b8a7983c092f1b20da51c2e - ) +itk_fetch_module( + MeshToPolyData + "Convert an ITK Mesh to a data structure compatible with vtkPolyData." + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKMeshToPolyData.git + GIT_TAG + 40e3e6cc6a0742382b8a7983c092f1b20da51c2e) diff --git a/Modules/Remote/MinimalPathExtraction.remote.cmake b/Modules/Remote/MinimalPathExtraction.remote.cmake index 677ec802e44..91cb8775630 100644 --- a/Modules/Remote/MinimalPathExtraction.remote.cmake +++ b/Modules/Remote/MinimalPathExtraction.remote.cmake @@ -42,11 +42,14 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Arnaud Gelas -itk_fetch_module(MinimalPathExtraction - "https://www.insight-journal.org/browse/publication/213 +itk_fetch_module( + MinimalPathExtraction + "https://www.insight-journal.org/browse/publication/213 " - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKMinimalPathExtraction.git - GIT_TAG 35dd8e83b7df2059876e6835a5741eb3d45973bf - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKMinimalPathExtraction.git + GIT_TAG + 35dd8e83b7df2059876e6835a5741eb3d45973bf) # Release v1.2.6 diff --git a/Modules/Remote/Montage.remote.cmake b/Modules/Remote/Montage.remote.cmake index a845cc47710..fe2f38e6e96 100644 --- a/Modules/Remote/Montage.remote.cmake +++ b/Modules/Remote/Montage.remote.cmake @@ -42,9 +42,12 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Dženan Zukić -itk_fetch_module(Montage -"Reconstruction of 3D volumetric dataset from a collection of 2D slices" - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKMontage.git - GIT_TAG b91741f4f1746449dc70f08c7cc13c26cafa7d98 - ) +itk_fetch_module( + Montage + "Reconstruction of 3D volumetric dataset from a collection of 2D slices" + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKMontage.git + GIT_TAG + b91741f4f1746449dc70f08c7cc13c26cafa7d98) diff --git a/Modules/Remote/MorphologicalContourInterpolation.remote.cmake b/Modules/Remote/MorphologicalContourInterpolation.remote.cmake index 29c6f7e6ca5..2b1aee82d54 100644 --- a/Modules/Remote/MorphologicalContourInterpolation.remote.cmake +++ b/Modules/Remote/MorphologicalContourInterpolation.remote.cmake @@ -42,8 +42,9 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Dženan Zukić -itk_fetch_module(MorphologicalContourInterpolation -"nD morphological contour interpolation +itk_fetch_module( + MorphologicalContourInterpolation + "nD morphological contour interpolation Insight Journal article: https://www.insight-journal.org/browse/publication/977 @@ -55,7 +56,9 @@ IEEE Trans Biomed Eng. 2008 Aug;55(8):2022-38. doi: 10.1109/TBME.2008.921158. This work is supported by NIH grant R01 EB014346 'Continued development and maintenance of the ITK-SNAP 3D image segmentation software'." - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKMorphologicalContourInterpolation.git - GIT_TAG a31fbf768db9d51ad6d54d9dccd532c33cd4d720 - ) + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/KitwareMedical/ITKMorphologicalContourInterpolation.git + GIT_TAG + a31fbf768db9d51ad6d54d9dccd532c33cd4d720) diff --git a/Modules/Remote/MultipleImageIterator.remote.cmake b/Modules/Remote/MultipleImageIterator.remote.cmake index 568e157940c..5c2b1531284 100644 --- a/Modules/Remote/MultipleImageIterator.remote.cmake +++ b/Modules/Remote/MultipleImageIterator.remote.cmake @@ -41,8 +41,9 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(MultipleImageIterator -"Several applications such as multi-atlas segmentation +itk_fetch_module( + MultipleImageIterator + "Several applications such as multi-atlas segmentation require frequent iteration over multiple image volumes at the same time. Doing so with the regular ITK iterators is tedious and error prone as it requires updating each iterator at end of each iteration. @@ -54,7 +55,9 @@ Schaerer J. \"A MultipleImageIterator for iterating over multiple images simulta https://www.insight-journal.org/browse/publication/915 December, 2014. " - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/MultipleImageIterator.git - GIT_TAG 046e70f43f56ac1a0e32e083fb1fe1d1379a1f73 - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/KitwareMedical/MultipleImageIterator.git + GIT_TAG + 046e70f43f56ac1a0e32e083fb1fe1d1379a1f73) diff --git a/Modules/Remote/ParabolicMorphology.remote.cmake b/Modules/Remote/ParabolicMorphology.remote.cmake index 51e6033ccdc..da722f756ee 100644 --- a/Modules/Remote/ParabolicMorphology.remote.cmake +++ b/Modules/Remote/ParabolicMorphology.remote.cmake @@ -41,12 +41,15 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(ParabolicMorphology +itk_fetch_module( + ParabolicMorphology "Classes performing morphology using parabolic functions. Fast distance transforms and binary erosions/dilations/openings/closings by spheres, sharpenings and grayscale operations. https://www.insight-journal.org/browse/publication/228" - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKParabolicMorphology.git - GIT_TAG 4cfb99d9688184f579bf4fae4c8cf99ea61bb8e5 - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKParabolicMorphology.git + GIT_TAG + 4cfb99d9688184f579bf4fae4c8cf99ea61bb8e5) diff --git a/Modules/Remote/PerformanceBenchmarking.remote.cmake b/Modules/Remote/PerformanceBenchmarking.remote.cmake index 5348a1a6bf0..2685b8076ba 100644 --- a/Modules/Remote/PerformanceBenchmarking.remote.cmake +++ b/Modules/Remote/PerformanceBenchmarking.remote.cmake @@ -42,8 +42,9 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Matt McCormick -itk_fetch_module(PerformanceBenchmarking -"New classes increase operating system process priority to +itk_fetch_module( + PerformanceBenchmarking + "New classes increase operating system process priority to minimize the impact of other processes running on the system. These classes are used by a suite of example ITK benchmarks to @@ -56,7 +57,9 @@ For more information, see:: The Insight Journal. January-December. 2016. https://insight-journal.org/browse/publication/972 " - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKPerformanceBenchmarking.git - GIT_TAG 950921a642a720867c00c92c548312a4939da917 - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKPerformanceBenchmarking.git + GIT_TAG + 950921a642a720867c00c92c548312a4939da917) diff --git a/Modules/Remote/PhaseSymmetry.remote.cmake b/Modules/Remote/PhaseSymmetry.remote.cmake index 32c916c3e28..9f2490b3c41 100644 --- a/Modules/Remote/PhaseSymmetry.remote.cmake +++ b/Modules/Remote/PhaseSymmetry.remote.cmake @@ -42,8 +42,9 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Matt McCormick -itk_fetch_module(PhaseSymmetry -"Provides multi-scale steerable filters for computing phase symmetry. +itk_fetch_module( + PhaseSymmetry + "Provides multi-scale steerable filters for computing phase symmetry. For more information, see the Insight Journal article: @@ -52,7 +53,9 @@ Multi-scale Steerable Phase-Symmetry Filters for ITK The Insight Journal. July-December. 2011. https://www.insight-journal.org/browse/publication/846 " - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKPhaseSymmetry.git - GIT_TAG 4d9cba2d0529e29500c11fd25ac9c4c808a0279b - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/KitwareMedical/ITKPhaseSymmetry.git + GIT_TAG + 4d9cba2d0529e29500c11fd25ac9c4c808a0279b) diff --git a/Modules/Remote/PolarTransform.remote.cmake b/Modules/Remote/PolarTransform.remote.cmake index 6e4087c75b0..6a759742f1d 100644 --- a/Modules/Remote/PolarTransform.remote.cmake +++ b/Modules/Remote/PolarTransform.remote.cmake @@ -42,8 +42,9 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Matt McCormick -itk_fetch_module(PolarTransform -"This is a module to transform from cartesian to polar coordinate systems and back. +itk_fetch_module( + PolarTransform + "This is a module to transform from cartesian to polar coordinate systems and back. For more information, see the Insight Journal article: @@ -52,7 +53,9 @@ For more information, see the Insight Journal article: The Insight Journal. July-December. 2006. https://insight-journal.org/browse/publication/130 " - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKPolarTransform.git - GIT_TAG 930d44ac91d2994e4d604be67714f1ffb9cd065c - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKPolarTransform.git + GIT_TAG + 930d44ac91d2994e4d604be67714f1ffb9cd065c) diff --git a/Modules/Remote/PrincipalComponentsAnalysis.remote.cmake b/Modules/Remote/PrincipalComponentsAnalysis.remote.cmake index f0f1f6798bd..2d13b1db7b2 100644 --- a/Modules/Remote/PrincipalComponentsAnalysis.remote.cmake +++ b/Modules/Remote/PrincipalComponentsAnalysis.remote.cmake @@ -42,14 +42,17 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Johan Andruejol -itk_fetch_module(PrincipalComponentsAnalysis -"An ITK_-based implementation of principal components analysis. +itk_fetch_module( + PrincipalComponentsAnalysis + "An ITK_-based implementation of principal components analysis. A more detailed description can be found in the Insight Journal article: Bowers M., Younes L. ''Principal Components Analysis of Scalar, Vector, and Mesh Vertex Data.'' https://www.insight-journal.org/browse/publication/878 August, 2013. " - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKPrincipalComponentsAnalysis.git - GIT_TAG 2f8d8bffb37fca8875a674465af5e3d902432f30 - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKPrincipalComponentsAnalysis.git + GIT_TAG + 2f8d8bffb37fca8875a674465af5e3d902432f30) diff --git a/Modules/Remote/RANSAC.remote.cmake b/Modules/Remote/RANSAC.remote.cmake index e9ec75f59d4..197d6132693 100644 --- a/Modules/Remote/RANSAC.remote.cmake +++ b/Modules/Remote/RANSAC.remote.cmake @@ -41,15 +41,18 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(RANSAC -"An ITK-based implementation of RANSAC used for point cloud registration. +itk_fetch_module( + RANSAC + "An ITK-based implementation of RANSAC used for point cloud registration. It supports feature based registration and can be used along with the FPFH remote module. The class itkRANSAC is the main driver that takes an object of class itkLandmarkRegistrationEstimator as argument. Please refer to the documentation upstream for a detailed description and sample usage: https://github.com/InsightSoftwareConsortium/ITKRANSAC " - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKRANSAC.git - GIT_TAG ed350fbabaf82c81167f41c6996e779425e87de4 -) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKRANSAC.git + GIT_TAG + ed350fbabaf82c81167f41c6996e779425e87de4) diff --git a/Modules/Remote/RLEImage.remote.cmake b/Modules/Remote/RLEImage.remote.cmake index 66b6ed4d0f3..fccfa5b799d 100644 --- a/Modules/Remote/RLEImage.remote.cmake +++ b/Modules/Remote/RLEImage.remote.cmake @@ -42,15 +42,18 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Dženan Zukić -itk_fetch_module(RLEImage -"Run-length encoded memory compression scheme for an itk::Image. +itk_fetch_module( + RLEImage + "Run-length encoded memory compression scheme for an itk::Image. Insight Journal article: https://www.insight-journal.org/browse/publication/978 This work is supported by NIH grant R01 EB014346 'Continued development and maintenance of the ITK-SNAP 3D image segmentation software'." - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKRLEImage.git - GIT_TAG 070fef6b0cd6122d95b62913487c2348ba8f5189 - ) + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/KitwareMedical/ITKRLEImage.git + GIT_TAG + 070fef6b0cd6122d95b62913487c2348ba8f5189) diff --git a/Modules/Remote/RTK.remote.cmake b/Modules/Remote/RTK.remote.cmake index 87319efa444..19bb4c2166e 100644 --- a/Modules/Remote/RTK.remote.cmake +++ b/Modules/Remote/RTK.remote.cmake @@ -37,9 +37,12 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(RTK +itk_fetch_module( + RTK "Reconstruction Toolkit (RTK) https://www.openrtk.org/" - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/RTKConsortium/RTK.git - GIT_TAG ab08d7a61cb50301d0ed26287a507b856b013314 -) + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/RTKConsortium/RTK.git + GIT_TAG + ab08d7a61cb50301d0ed26287a507b856b013314) diff --git a/Modules/Remote/SCIFIO.remote.cmake b/Modules/Remote/SCIFIO.remote.cmake index 67bfd769868..7e651055eea 100644 --- a/Modules/Remote/SCIFIO.remote.cmake +++ b/Modules/Remote/SCIFIO.remote.cmake @@ -41,9 +41,12 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(SCIFIO +itk_fetch_module( + SCIFIO "SCIFIO (Bioformats) ImageIO plugin for ITK" - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/scifio/scifio-imageio.git - GIT_TAG 1054ece893ee072bdb8124c45ce207de00af280f - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/scifio/scifio-imageio.git + GIT_TAG + 1054ece893ee072bdb8124c45ce207de00af280f) diff --git a/Modules/Remote/Shape.remote.cmake b/Modules/Remote/Shape.remote.cmake index 2f2033a1e5e..9c411c8f00c 100644 --- a/Modules/Remote/Shape.remote.cmake +++ b/Modules/Remote/Shape.remote.cmake @@ -42,11 +42,14 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Matthew McCormick -itk_fetch_module(Shape +itk_fetch_module( + Shape "Shape analysis filters, e.g. Procrustes alignment for meshes. ITK external module for libraries originally developed in SPHARM-PDM 3D Slicer extension (https://github.com/NIRALUser/SPHARM-PDM)." - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/SlicerSALT/ITKShape.git - GIT_TAG eb38c9603e78f03e7ed085e3bdac450ad8000dcb -) + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/SlicerSALT/ITKShape.git + GIT_TAG + eb38c9603e78f03e7ed085e3bdac450ad8000dcb) diff --git a/Modules/Remote/SimpleITKFilters.remote.cmake b/Modules/Remote/SimpleITKFilters.remote.cmake index a2b00f98f87..042729a5b85 100644 --- a/Modules/Remote/SimpleITKFilters.remote.cmake +++ b/Modules/Remote/SimpleITKFilters.remote.cmake @@ -41,13 +41,16 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(SimpleITKFilters +itk_fetch_module( + SimpleITKFilters "A Collection of filters designed for SimpleITK. The filters in this module may be wrappers of composites ITK filters, adapters of existing ITK filters or alternative implementations designed for SimpleITK's requirements. Currently it contains a discrete hessian, and a composite filter to compute objectness." - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSimpleITKFilters.git - GIT_TAG bb896868fc6480835495d0da4356d5db009592a6 - ) + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSimpleITKFilters.git + GIT_TAG + bb896868fc6480835495d0da4356d5db009592a6) diff --git a/Modules/Remote/SkullStrip.remote.cmake b/Modules/Remote/SkullStrip.remote.cmake index f3e1c497d52..9a4d173861a 100644 --- a/Modules/Remote/SkullStrip.remote.cmake +++ b/Modules/Remote/SkullStrip.remote.cmake @@ -41,9 +41,12 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(SkullStrip +itk_fetch_module( + SkullStrip "A class to perform automatic skull-stripping for neuroimage analysis." - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSkullStrip.git - GIT_TAG da5821af3e2fe8f4c2d881d4fd961b17d0684b3e - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSkullStrip.git + GIT_TAG + da5821af3e2fe8f4c2d881d4fd961b17d0684b3e) diff --git a/Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake b/Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake index 5b50bdace11..13ceeb7f8d9 100644 --- a/Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake +++ b/Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake @@ -42,10 +42,13 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed #Contact: I. Vidal-Migallon -itk_fetch_module(SmoothingRecursiveYvvGaussianFilter +itk_fetch_module( + SmoothingRecursiveYvvGaussianFilter "GPU and CPU Young & Van Vliet Recursive Gaussian Smoothing Filter: https://www.insight-journal.org/browse/publication/896" - MODULE_COMPLIANCE_LEVEL 2 + MODULE_COMPLIANCE_LEVEL + 2 #UPSTREAM_REPO GIT_REPOSITORY ${git_protocol}://github.com/Inria-Asclepios/SmoothingRecursiveYvvGaussianFilter - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSmoothingRecursiveYvvGaussianFilter.git - GIT_TAG f6bd553266aa1c1c3cdebc9033fd3b21f1f734c4 - ) + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSmoothingRecursiveYvvGaussianFilter.git + GIT_TAG + f6bd553266aa1c1c3cdebc9033fd3b21f1f734c4) diff --git a/Modules/Remote/SphinxExamples.remote.cmake b/Modules/Remote/SphinxExamples.remote.cmake index 46a9feeda59..4ca7f719156 100644 --- a/Modules/Remote/SphinxExamples.remote.cmake +++ b/Modules/Remote/SphinxExamples.remote.cmake @@ -46,9 +46,12 @@ # # # Contact: Matt McCormick -itk_fetch_module(SphinxExamples +itk_fetch_module( + SphinxExamples "This module builds the examples found at https://itk.org/ITKExamples/" - MODULE_COMPLIANCE_LEVEL 5 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSphinxExamples.git - GIT_TAG 5fb149df7ba212771dee920141e5364344644c35 - ) + MODULE_COMPLIANCE_LEVEL + 5 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSphinxExamples.git + GIT_TAG + 5fb149df7ba212771dee920141e5364344644c35) diff --git a/Modules/Remote/SplitComponents.remote.cmake b/Modules/Remote/SplitComponents.remote.cmake index 93f4c4a6f0f..14b587e0ea6 100644 --- a/Modules/Remote/SplitComponents.remote.cmake +++ b/Modules/Remote/SplitComponents.remote.cmake @@ -42,12 +42,15 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Matt McCormick -itk_fetch_module(SplitComponents -"This module contains filter called +itk_fetch_module( + SplitComponents + "This module contains filter called itk::SplitComponentsImageFilter. This filter generates component images from an itk::Image of, for example, itk::Vector, itk::CovariantVector, or itk::SymmetricSecondRankTensor. https://www.insight-journal.org/browse/publication/774" - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSplitComponents.git - GIT_TAG 3030e1e3144b98c190e1d19d81233472b791811e - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSplitComponents.git + GIT_TAG + 3030e1e3144b98c190e1d19d81233472b791811e) diff --git a/Modules/Remote/Strain.remote.cmake b/Modules/Remote/Strain.remote.cmake index 635e427d3fa..20e79757690 100644 --- a/Modules/Remote/Strain.remote.cmake +++ b/Modules/Remote/Strain.remote.cmake @@ -42,8 +42,9 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Matt McCormick -itk_fetch_module(Strain -"Filters to estimate a strain tensor field from a displacement field or a +itk_fetch_module( + Strain + "Filters to estimate a strain tensor field from a displacement field or a spatial transformation. For more information, see: @@ -53,7 +54,9 @@ For more information, see: The Insight Journal. January-December. 2017. https://www.insight-journal.org/browse/publication/984 " - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKStrain.git - GIT_TAG 676882683516b4c1303fe81c1ba36ce472ca51ba - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/KitwareMedical/ITKStrain.git + GIT_TAG + 676882683516b4c1303fe81c1ba36ce472ca51ba) diff --git a/Modules/Remote/SubdivisionQuadEdgeMeshFilter.remote.cmake b/Modules/Remote/SubdivisionQuadEdgeMeshFilter.remote.cmake index ba4f7650fc7..8f9977c4bf5 100644 --- a/Modules/Remote/SubdivisionQuadEdgeMeshFilter.remote.cmake +++ b/Modules/Remote/SubdivisionQuadEdgeMeshFilter.remote.cmake @@ -41,14 +41,17 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(SubdivisionQuadEdgeMeshFilter -"Triangle and edge based QuadEdgeMesh subdivision filters. +itk_fetch_module( + SubdivisionQuadEdgeMeshFilter + "Triangle and edge based QuadEdgeMesh subdivision filters. See the following Insight Journal's publication: Wanlin Zhu, \"Triangle Mesh Subdivision\" https://www.insight-journal.org/browse/publication/831" - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/itkSubdivisionQuadEdgeMeshFilter - GIT_TAG 6e30c49f7ef9a5b4854bff39834f9d7e181130aa - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/itkSubdivisionQuadEdgeMeshFilter + GIT_TAG + 6e30c49f7ef9a5b4854bff39834f9d7e181130aa) diff --git a/Modules/Remote/TextureFeatures.remote.cmake b/Modules/Remote/TextureFeatures.remote.cmake index c1a28a61ce7..d8be59749c5 100644 --- a/Modules/Remote/TextureFeatures.remote.cmake +++ b/Modules/Remote/TextureFeatures.remote.cmake @@ -42,8 +42,9 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Jean-Baptiste VIMORT -itk_fetch_module(TextureFeatures -"Filters to estimate texture feature maps from N-dimensional grayscale +itk_fetch_module( + TextureFeatures + "Filters to estimate texture feature maps from N-dimensional grayscale images. This includes first-order texture features, grey level co-occurrence matrix (GLCM) features, and grey level run-length matrix (GLRLM) features. @@ -54,7 +55,9 @@ For more information, see: The Insight Journal. January-December. 2017. https://www.insight-journal.org/browse/publication/985 " - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTextureFeatures.git - GIT_TAG e8a9020eddc0310ed490dfe5afc61e065dc95831 - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTextureFeatures.git + GIT_TAG + e8a9020eddc0310ed490dfe5afc61e065dc95831) diff --git a/Modules/Remote/Thickness3D.remote.cmake b/Modules/Remote/Thickness3D.remote.cmake index 29993c7d659..4c99c5907f9 100644 --- a/Modules/Remote/Thickness3D.remote.cmake +++ b/Modules/Remote/Thickness3D.remote.cmake @@ -42,9 +42,12 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Thomas Janvier -itk_fetch_module(Thickness3D +itk_fetch_module( + Thickness3D "Tools for 3D thickness measurement" - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKThickness3D.git - GIT_TAG 36b2c7a229be70c5b5afbba1b7d65fe26c9cbaeb -) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKThickness3D.git + GIT_TAG + 36b2c7a229be70c5b5afbba1b7d65fe26c9cbaeb) diff --git a/Modules/Remote/TotalVariation.remote.cmake b/Modules/Remote/TotalVariation.remote.cmake index be75bb72d97..e5e4a54a584 100644 --- a/Modules/Remote/TotalVariation.remote.cmake +++ b/Modules/Remote/TotalVariation.remote.cmake @@ -41,15 +41,18 @@ #-- ### Please document here any justification for the criteria above # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed -itk_fetch_module(TotalVariation -"An ITK-based implementation of fast total variation methods used for image denoising, +itk_fetch_module( + TotalVariation + "An ITK-based implementation of fast total variation methods used for image denoising, image deconvolution, and other applications. The class itkProxTVImageFilter wraps the third party library proxTV for 2D and 3D images. Please refer to the documentation upstream for a detailed description: https://github.com/albarji/proxTV " - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTotalVariation.git - GIT_TAG 1dda823f15c8e190ddcd9354f388af01f8b07b08 -) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTotalVariation.git + GIT_TAG + 1dda823f15c8e190ddcd9354f388af01f8b07b08) diff --git a/Modules/Remote/TubeTK.remote.cmake b/Modules/Remote/TubeTK.remote.cmake index 61434a6b885..a71c9bb21cf 100644 --- a/Modules/Remote/TubeTK.remote.cmake +++ b/Modules/Remote/TubeTK.remote.cmake @@ -44,10 +44,13 @@ #-- and memcheck #-- # Contact: Stephen Aylward -itk_fetch_module(TubeTK +itk_fetch_module( + TubeTK "http://www.tubetk.org" - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTubeTK.git - GIT_TAG f1098f90282d4882940be81c00ccc7f73d34b44d - ) + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTubeTK.git + GIT_TAG + f1098f90282d4882940be81c00ccc7f73d34b44d) # Release v1.3.5 diff --git a/Modules/Remote/TwoProjectionRegistration.remote.cmake b/Modules/Remote/TwoProjectionRegistration.remote.cmake index c4bf1ea3957..c9dda123b59 100644 --- a/Modules/Remote/TwoProjectionRegistration.remote.cmake +++ b/Modules/Remote/TwoProjectionRegistration.remote.cmake @@ -42,8 +42,9 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Arnaud Gelas -itk_fetch_module(TwoProjectionRegistration -"An ITK-based implementation of intensity-based 2D/3D +itk_fetch_module( + TwoProjectionRegistration + "An ITK-based implementation of intensity-based 2D/3D rigid image registration for patient setup assessment in external beam radiotherapy. The registration framework was designed to simultaneously register two projection images to a 3D image volume. The projection geometry @@ -59,7 +60,9 @@ Wu, J. \"ITK-Based Implementation of Two-Projection 2D/3D Registration Method wi https://www.insight-journal.org/browse/publication/784 December, 2010. " - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTwoProjectionRegistration.git - GIT_TAG 2cf7d9522031c613a3edcdcd76aee2896536672e - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTwoProjectionRegistration.git + GIT_TAG + 2cf7d9522031c613a3edcdcd76aee2896536672e) diff --git a/Modules/Remote/Ultrasound.remote.cmake b/Modules/Remote/Ultrasound.remote.cmake index 826a3e8fb79..f1583c01e86 100644 --- a/Modules/Remote/Ultrasound.remote.cmake +++ b/Modules/Remote/Ultrasound.remote.cmake @@ -42,8 +42,9 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Dženan Zukić -itk_fetch_module(Ultrasound -"This module contains filters for use with the Insight Toolkit (ITK) that image formation and analysis of ultrasound images. +itk_fetch_module( + Ultrasound + "This module contains filters for use with the Insight Toolkit (ITK) that image formation and analysis of ultrasound images. McCormick, M. An Open Source, Fast Ultrasound B-Mode Implementation for Commodity Hardware. @@ -60,7 +61,9 @@ Ultrasound spectroscopy. Prague, Czech Republic. 1013-1016. 2016. https://dx.doi.org/10.1109/ISBI.2016.7493437 https://pdfs.semanticscholar.org/6bcd/1e7adbc24e15c928a7ad5af77bbd5da29c30.pdf" - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKUltrasound.git - GIT_TAG aeb838bdaeff596d2e3abed83a079e23f9b87e9f - ) + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/KitwareMedical/ITKUltrasound.git + GIT_TAG + aeb838bdaeff596d2e3abed83a079e23f9b87e9f) diff --git a/Modules/Remote/VariationalRegistration.remote.cmake b/Modules/Remote/VariationalRegistration.remote.cmake index 3a35c491505..0eaff460a22 100644 --- a/Modules/Remote/VariationalRegistration.remote.cmake +++ b/Modules/Remote/VariationalRegistration.remote.cmake @@ -45,9 +45,12 @@ # Contact: Alexander Schmidt-Richberg # Jan Ehrhardt # Rene Werner -itk_fetch_module(VariationalRegistration +itk_fetch_module( + VariationalRegistration "A module to perform variational image registration. https://www.insight-journal.org/browse/publication/917" - MODULE_COMPLIANCE_LEVEL 2 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKVariationalRegistration.git - GIT_TAG 7634013fa2b661eda81d79e52b804f669ec0ce79 - ) + MODULE_COMPLIANCE_LEVEL + 2 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKVariationalRegistration.git + GIT_TAG + 7634013fa2b661eda81d79e52b804f669ec0ce79) diff --git a/Modules/Remote/VkFFTBackend.remote.cmake b/Modules/Remote/VkFFTBackend.remote.cmake index 52acb674fa7..172dc94aab6 100644 --- a/Modules/Remote/VkFFTBackend.remote.cmake +++ b/Modules/Remote/VkFFTBackend.remote.cmake @@ -42,9 +42,12 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Tom Birdsong -itk_fetch_module(VkFFTBackend -"ITK FFT accelerated backends using the VkFFT library for Vulkan/CUDA/HIP/OpenCL compatibility." - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKVkFFTBackend.git - GIT_TAG 4574a6106f75c72146a2a358d0eea39e451de86b -) +itk_fetch_module( + VkFFTBackend + "ITK FFT accelerated backends using the VkFFT library for Vulkan/CUDA/HIP/OpenCL compatibility." + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/ITKVkFFTBackend.git + GIT_TAG + 4574a6106f75c72146a2a358d0eea39e451de86b) diff --git a/Modules/Remote/WebAssemblyInterface.remote.cmake b/Modules/Remote/WebAssemblyInterface.remote.cmake index 0eb986ca50e..d47a2948b18 100644 --- a/Modules/Remote/WebAssemblyInterface.remote.cmake +++ b/Modules/Remote/WebAssemblyInterface.remote.cmake @@ -42,9 +42,12 @@ # Code style enforced by clang-format on 2020-02-19, and clang-tidy modernizations completed # Contact: Matt McCormick -itk_fetch_module(WebAssemblyInterface +itk_fetch_module( + WebAssemblyInterface "The itk-wasm WebAssemblyInterface module provides tools to a) build C/C++ code to WebAssembly-compatible processing pipelines, b) bridge local filesystems, JavaScript/Typescript data structures, and traditional file formats, c) transfer data efficiently in and out of the WebAssembly runtime." - MODULE_COMPLIANCE_LEVEL 3 - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/itk-wasm.git - GIT_TAG d34c4b94b731d6dee36ad7e11473620f241370aa - ) + MODULE_COMPLIANCE_LEVEL + 3 + GIT_REPOSITORY + ${git_protocol}://github.com/InsightSoftwareConsortium/itk-wasm.git + GIT_TAG + d34c4b94b731d6dee36ad7e11473620f241370aa) diff --git a/Modules/Segmentation/Classifiers/itk-module.cmake b/Modules/Segmentation/Classifiers/itk-module.cmake index b69ddab5583..36c430aebd2 100644 --- a/Modules/Segmentation/Classifiers/itk-module.cmake +++ b/Modules/Segmentation/Classifiers/itk-module.cmake @@ -1,20 +1,21 @@ -set(DOCUMENTATION "This module contains algorithms to classify pixels in an +set(DOCUMENTATION + "This module contains algorithms to classify pixels in an image. It can be used, for example, to identify pixel membership within a set of tissue types. Different algorithms are available including Bayesian classification, Gaussian models, and K-means clustering. After tissue labels have been assigned, they can be modified and applied with the \\\\ref ITKLabelMap.") -itk_module(ITKClassifiers +itk_module( + ITKClassifiers DEPENDS - ITKImageGrid - ITKStatistics - ITKConnectedComponents + ITKImageGrid + ITKStatistics + ITKConnectedComponents TEST_DEPENDS - ITKTestKernel - ITKAnisotropicSmoothing + ITKTestKernel + ITKAnisotropicSmoothing DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") # Extra test dependency on ITKAnisotropicSmoothing is introduced by itkBayesianClassifierImageFilterTest. diff --git a/Modules/Segmentation/Classifiers/test/CMakeLists.txt b/Modules/Segmentation/Classifiers/test/CMakeLists.txt index 64e17c07035..44131b4297b 100644 --- a/Modules/Segmentation/Classifiers/test/CMakeLists.txt +++ b/Modules/Segmentation/Classifiers/test/CMakeLists.txt @@ -1,66 +1,143 @@ itk_module_test() set(ITKClassifiersTests -itkScalarImageKmeansImageFilterTest.cxx -itkSupervisedImageClassifierTest.cxx -itkBayesianClassifierImageFilterTest.cxx -itkKmeansModelEstimatorTest.cxx -itkImageClassifierFilterTest.cxx -itkSampleClassifierFilterTest1.cxx -itkSampleClassifierFilterTest2.cxx -itkSampleClassifierFilterTest3.cxx -itkSampleClassifierFilterTest4.cxx -itkSampleClassifierFilterTest5.cxx -itkSampleClassifierFilterTest6.cxx -itkSampleClassifierFilterTest7.cxx -itkScalarImageKmeansImageFilterTest.cxx -itkScalarImageKmeansImageFilter3DTest.cxx -) + itkScalarImageKmeansImageFilterTest.cxx + itkSupervisedImageClassifierTest.cxx + itkBayesianClassifierImageFilterTest.cxx + itkKmeansModelEstimatorTest.cxx + itkImageClassifierFilterTest.cxx + itkSampleClassifierFilterTest1.cxx + itkSampleClassifierFilterTest2.cxx + itkSampleClassifierFilterTest3.cxx + itkSampleClassifierFilterTest4.cxx + itkSampleClassifierFilterTest5.cxx + itkSampleClassifierFilterTest6.cxx + itkSampleClassifierFilterTest7.cxx + itkScalarImageKmeansImageFilterTest.cxx + itkScalarImageKmeansImageFilter3DTest.cxx) -CreateTestDriver(ITKClassifiers "${ITKClassifiers-Test_LIBRARIES}" "${ITKClassifiersTests}") +createtestdriver(ITKClassifiers "${ITKClassifiers-Test_LIBRARIES}" "${ITKClassifiersTests}") -itk_add_test(NAME itkBayesianClassifierImageFilterTest1 - COMMAND ITKClassifiersTestDriver - --compare DATA{Baseline/itkBayesianClassifierImageFilterTestLabelMapNoPriors.png} - ${ITK_TEST_OUTPUT_DIR}/itkBayesianClassifierImageFilterTestLabelMapNoPriors.png - itkBayesianClassifierImageFilterTest ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png - ${ITK_TEST_OUTPUT_DIR}/itkBayesianClassifierImageFilterTestLabelMapNoPriors.png 4 2 0) -itk_add_test(NAME itkBayesianClassifierImageFilterTest2 - COMMAND ITKClassifiersTestDriver - --compare DATA{Baseline/itkBayesianClassifierImageFilterTestLabelMapPriors.png} - ${ITK_TEST_OUTPUT_DIR}/itkBayesianClassifierImageFilterTestLabelMapPriors.png - itkBayesianClassifierImageFilterTest ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png - ${ITK_TEST_OUTPUT_DIR}/itkBayesianClassifierImageFilterTestLabelMapPriors.png 4 2 1) -itk_add_test(NAME itkKmeansModelEstimatorTest - COMMAND ITKClassifiersTestDriver itkKmeansModelEstimatorTest) -itk_add_test(NAME itkImageClassifierFilterTest - COMMAND ITKClassifiersTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Statistics/ImageClassifierFilterTestClassifiedImageTest.png} - ${ITK_TEST_OUTPUT_DIR}/ImageClassifierFilterTestClassifiedImage.png - itkImageClassifierFilterTest ${ITK_TEST_OUTPUT_DIR}/ImageClassifierFilterTestClassifiedImage.png) -itk_add_test(NAME itkSampleClassifierFilterTest1 - COMMAND ITKClassifiersTestDriver itkSampleClassifierFilterTest1) -itk_add_test(NAME itkSampleClassifierFilterTest2 - COMMAND ITKClassifiersTestDriver itkSampleClassifierFilterTest2) -itk_add_test(NAME itkSampleClassifierFilterTest3 - COMMAND ITKClassifiersTestDriver itkSampleClassifierFilterTest3) -itk_add_test(NAME itkSampleClassifierFilterTest4 - COMMAND ITKClassifiersTestDriver itkSampleClassifierFilterTest4) -itk_add_test(NAME itkSampleClassifierFilterTest5 - COMMAND ITKClassifiersTestDriver itkSampleClassifierFilterTest5) -itk_add_test(NAME itkSampleClassifierFilterTest6 - COMMAND ITKClassifiersTestDriver itkSampleClassifierFilterTest6) -itk_add_test(NAME itkSampleClassifierFilterTest7 - COMMAND ITKClassifiersTestDriver itkSampleClassifierFilterTest7 - DATA{${ITK_DATA_ROOT}/Input/Statistics/TwoDimensionTwoGaussian.dat} DATA{${ITK_DATA_ROOT}/Input/Statistics/TwoDimensionTwoGaussianTesting.dat}) -itk_add_test(NAME itkSupervisedImageClassifierTest - COMMAND ITKClassifiersTestDriver itkSupervisedImageClassifierTest) -itk_add_test(NAME itkScalarImageKmeansImageFilterTest - COMMAND ITKClassifiersTestDriver - --compare DATA{Baseline/itkScalarImageKmeansImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkScalarImageKmeansImageFilterTest.png - itkScalarImageKmeansImageFilterTest ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png ${ITK_TEST_OUTPUT_DIR}/itkScalarImageKmeansImageFilterTest.png 0 5 10 80 165 190 220) -itk_add_test(NAME itkScalarImageKmeansImageFilter3DTest - COMMAND ITKClassifiersTestDriver - --compare ${ITK_EXAMPLE_DATA_ROOT}/KmeansTest_T1KmeansPrelimSegmentation.nii.gz - ${ITK_TEST_OUTPUT_DIR}/KmeansTest_T1KmeansPrelimSegmentation.nii.gz - itkScalarImageKmeansImageFilter3DTest ${ITK_EXAMPLE_DATA_ROOT}/KmeansTest_T1UCharRaw.nii.gz ${ITK_EXAMPLE_DATA_ROOT}/KmeansTest_T1RawSkullStrip.nii.gz ${ITK_TEST_OUTPUT_DIR}/KmeansTest_T1KmeansPrelimSegmentation.nii.gz) +itk_add_test( + NAME + itkBayesianClassifierImageFilterTest1 + COMMAND + ITKClassifiersTestDriver + --compare + DATA{Baseline/itkBayesianClassifierImageFilterTestLabelMapNoPriors.png} + ${ITK_TEST_OUTPUT_DIR}/itkBayesianClassifierImageFilterTestLabelMapNoPriors.png + itkBayesianClassifierImageFilterTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png + ${ITK_TEST_OUTPUT_DIR}/itkBayesianClassifierImageFilterTestLabelMapNoPriors.png + 4 + 2 + 0) +itk_add_test( + NAME + itkBayesianClassifierImageFilterTest2 + COMMAND + ITKClassifiersTestDriver + --compare + DATA{Baseline/itkBayesianClassifierImageFilterTestLabelMapPriors.png} + ${ITK_TEST_OUTPUT_DIR}/itkBayesianClassifierImageFilterTestLabelMapPriors.png + itkBayesianClassifierImageFilterTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png + ${ITK_TEST_OUTPUT_DIR}/itkBayesianClassifierImageFilterTestLabelMapPriors.png + 4 + 2 + 1) +itk_add_test( + NAME + itkKmeansModelEstimatorTest + COMMAND + ITKClassifiersTestDriver + itkKmeansModelEstimatorTest) +itk_add_test( + NAME + itkImageClassifierFilterTest + COMMAND + ITKClassifiersTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Statistics/ImageClassifierFilterTestClassifiedImageTest.png} + ${ITK_TEST_OUTPUT_DIR}/ImageClassifierFilterTestClassifiedImage.png + itkImageClassifierFilterTest + ${ITK_TEST_OUTPUT_DIR}/ImageClassifierFilterTestClassifiedImage.png) +itk_add_test( + NAME + itkSampleClassifierFilterTest1 + COMMAND + ITKClassifiersTestDriver + itkSampleClassifierFilterTest1) +itk_add_test( + NAME + itkSampleClassifierFilterTest2 + COMMAND + ITKClassifiersTestDriver + itkSampleClassifierFilterTest2) +itk_add_test( + NAME + itkSampleClassifierFilterTest3 + COMMAND + ITKClassifiersTestDriver + itkSampleClassifierFilterTest3) +itk_add_test( + NAME + itkSampleClassifierFilterTest4 + COMMAND + ITKClassifiersTestDriver + itkSampleClassifierFilterTest4) +itk_add_test( + NAME + itkSampleClassifierFilterTest5 + COMMAND + ITKClassifiersTestDriver + itkSampleClassifierFilterTest5) +itk_add_test( + NAME + itkSampleClassifierFilterTest6 + COMMAND + ITKClassifiersTestDriver + itkSampleClassifierFilterTest6) +itk_add_test( + NAME + itkSampleClassifierFilterTest7 + COMMAND + ITKClassifiersTestDriver + itkSampleClassifierFilterTest7 + DATA{${ITK_DATA_ROOT}/Input/Statistics/TwoDimensionTwoGaussian.dat} + DATA{${ITK_DATA_ROOT}/Input/Statistics/TwoDimensionTwoGaussianTesting.dat}) +itk_add_test( + NAME + itkSupervisedImageClassifierTest + COMMAND + ITKClassifiersTestDriver + itkSupervisedImageClassifierTest) +itk_add_test( + NAME + itkScalarImageKmeansImageFilterTest + COMMAND + ITKClassifiersTestDriver + --compare + DATA{Baseline/itkScalarImageKmeansImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkScalarImageKmeansImageFilterTest.png + itkScalarImageKmeansImageFilterTest + ${ITK_EXAMPLE_DATA_ROOT}/BrainProtonDensitySlice.png + ${ITK_TEST_OUTPUT_DIR}/itkScalarImageKmeansImageFilterTest.png + 0 + 5 + 10 + 80 + 165 + 190 + 220) +itk_add_test( + NAME + itkScalarImageKmeansImageFilter3DTest + COMMAND + ITKClassifiersTestDriver + --compare + ${ITK_EXAMPLE_DATA_ROOT}/KmeansTest_T1KmeansPrelimSegmentation.nii.gz + ${ITK_TEST_OUTPUT_DIR}/KmeansTest_T1KmeansPrelimSegmentation.nii.gz + itkScalarImageKmeansImageFilter3DTest + ${ITK_EXAMPLE_DATA_ROOT}/KmeansTest_T1UCharRaw.nii.gz + ${ITK_EXAMPLE_DATA_ROOT}/KmeansTest_T1RawSkullStrip.nii.gz + ${ITK_TEST_OUTPUT_DIR}/KmeansTest_T1KmeansPrelimSegmentation.nii.gz) diff --git a/Modules/Segmentation/Classifiers/wrapping/itkBayesianClassifierImageFilter.wrap b/Modules/Segmentation/Classifiers/wrapping/itkBayesianClassifierImageFilter.wrap index ef4ec3a8ef6..644e7a16d11 100644 --- a/Modules/Segmentation/Classifiers/wrapping/itkBayesianClassifierImageFilter.wrap +++ b/Modules/Segmentation/Classifiers/wrapping/itkBayesianClassifierImageFilter.wrap @@ -1,11 +1,12 @@ itk_wrap_class("itk::BayesianClassifierImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - foreach(t2 ${WRAP_ITK_INT}) - foreach(t3 ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_VI${t}${d}}${ITKM_${t2}}${ITKM_${t3}}${ITKM_${t3}}" "${ITKT_VI${t}${d}}, ${ITKT_${t2}}, ${ITKT_${t3}}, ${ITKT_${t3}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + foreach(t2 ${WRAP_ITK_INT}) + foreach(t3 ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_VI${t}${d}}${ITKM_${t2}}${ITKM_${t3}}${ITKM_${t3}}" + "${ITKT_VI${t}${d}}, ${ITKT_${t2}}, ${ITKT_${t3}}, ${ITKT_${t3}}") endforeach() endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/Classifiers/wrapping/itkBayesianClassifierInitializationImageFilter.wrap b/Modules/Segmentation/Classifiers/wrapping/itkBayesianClassifierInitializationImageFilter.wrap index 462420a7caa..67d8317fa01 100644 --- a/Modules/Segmentation/Classifiers/wrapping/itkBayesianClassifierInitializationImageFilter.wrap +++ b/Modules/Segmentation/Classifiers/wrapping/itkBayesianClassifierInitializationImageFilter.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::BayesianClassifierInitializationImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - foreach(t3 ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_${t3}}" "${ITKT_I${t}${d}}, ${ITKT_${t3}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + foreach(t3 ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_${t3}}" "${ITKT_I${t}${d}}, ${ITKT_${t3}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/Classifiers/wrapping/itkScalarImageKmeansImageFilter.wrap b/Modules/Segmentation/Classifiers/wrapping/itkScalarImageKmeansImageFilter.wrap index 0a88ff809f7..a4c4c6fcc2b 100644 --- a/Modules/Segmentation/Classifiers/wrapping/itkScalarImageKmeansImageFilter.wrap +++ b/Modules/Segmentation/Classifiers/wrapping/itkScalarImageKmeansImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ScalarImageKmeansImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Segmentation/ConnectedComponents/itk-module.cmake b/Modules/Segmentation/ConnectedComponents/itk-module.cmake index 7d96acc314d..d318004a846 100644 --- a/Modules/Segmentation/ConnectedComponents/itk-module.cmake +++ b/Modules/Segmentation/ConnectedComponents/itk-module.cmake @@ -1,16 +1,17 @@ -set(DOCUMENTATION "This module contains modules to identify and modify connected +set(DOCUMENTATION + "This module contains modules to identify and modify connected components. Theses algorithms are commonly applied to binary or label map images. See also \\\\ref ITKClassifiers, \\\\ref ITKLabelMap, and \\\\ref ITKBinaryMathematicalMorphology.") -itk_module(ITKConnectedComponents +itk_module( + ITKConnectedComponents DEPENDS - ITKImageIntensity - ITKThresholding - ITKImageGrid - ITKImageLabel + ITKImageIntensity + ITKThresholding + ITKImageGrid + ITKImageLabel TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Segmentation/ConnectedComponents/test/CMakeLists.txt b/Modules/Segmentation/ConnectedComponents/test/CMakeLists.txt index 612e29c5f62..276063f169b 100644 --- a/Modules/Segmentation/ConnectedComponents/test/CMakeLists.txt +++ b/Modules/Segmentation/ConnectedComponents/test/CMakeLists.txt @@ -1,88 +1,179 @@ itk_module_test() set(ITKConnectedComponentsTests -itkRelabelComponentImageFilterTest.cxx -itkHardConnectedComponentImageFilterTest.cxx -itkConnectedComponentImageFilterTestRGB.cxx -itkConnectedComponentImageFilterTest.cxx -itkConnectedComponentImageFilterBackgroundTest.cxx -itkThresholdMaximumConnectedComponentsImageFilterTest.cxx -itkScalarConnectedComponentImageFilterTest.cxx -itkVectorConnectedComponentImageFilterTest.cxx -itkConnectedComponentImageFilterTooManyObjectsTest.cxx -itkMaskConnectedComponentImageFilterTest.cxx -) + itkRelabelComponentImageFilterTest.cxx + itkHardConnectedComponentImageFilterTest.cxx + itkConnectedComponentImageFilterTestRGB.cxx + itkConnectedComponentImageFilterTest.cxx + itkConnectedComponentImageFilterBackgroundTest.cxx + itkThresholdMaximumConnectedComponentsImageFilterTest.cxx + itkScalarConnectedComponentImageFilterTest.cxx + itkVectorConnectedComponentImageFilterTest.cxx + itkConnectedComponentImageFilterTooManyObjectsTest.cxx + itkMaskConnectedComponentImageFilterTest.cxx) -CreateTestDriver(ITKConnectedComponents "${ITKConnectedComponents-Test_LIBRARIES}" "${ITKConnectedComponentsTests}") +createtestdriver(ITKConnectedComponents "${ITKConnectedComponents-Test_LIBRARIES}" "${ITKConnectedComponentsTests}") -itk_add_test(NAME itkRelabelComponentImageFilterTest - COMMAND ITKConnectedComponentsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/RelabelComponentImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/RelabelComponentImageFilterTest.png - itkRelabelComponentImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/RelabelComponentImageFilterTest.png 130 145) -itk_add_test(NAME itkHardConnectedComponentImageFilterTest - COMMAND ITKConnectedComponentsTestDriver - --compare DATA{Baseline/HardConnectedComponentImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/HardConnectedComponentImageFilterTestUnsignedChar.png - --compare DATA{Baseline/HardConnectedComponentImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/HardConnectedComponentImageFilterTestUnsignedShort.png - itkHardConnectedComponentImageFilterTest - ${ITK_TEST_OUTPUT_DIR}/HardConnectedComponentImageFilterTest) -itk_add_test(NAME itkConnectedComponentImageFilterTestRGB - COMMAND ITKConnectedComponentsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ConnectedComponentImageFilterTest.png,:} - ${ITK_TEST_OUTPUT_DIR}/ConnectedComponentImageFilterTestRGB.png - itkConnectedComponentImageFilterTestRGB DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/ConnectedComponentImageFilterTestRGB.png 130 145) -itk_add_test(NAME itkConnectedComponentImageFilterTest - COMMAND ITKConnectedComponentsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ConnectedComponentImageFilterTest.png,:} - ${ITK_TEST_OUTPUT_DIR}/ConnectedComponentImageFilterTest.png - itkConnectedComponentImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/ConnectedComponentImageFilterTest.png 130 145) -itk_add_test(NAME itkConnectedComponentImageFilterTest2 - COMMAND ITKConnectedComponentsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ConnectedComponentImageFilterTest2.png,:} - ${ITK_TEST_OUTPUT_DIR}/ConnectedComponentImageFilterTest2.png - itkConnectedComponentImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Shapes.png} ${ITK_TEST_OUTPUT_DIR}/ConnectedComponentImageFilterTest2.png 128 255 0) -itk_add_test(NAME itkConnectedComponentImageFilterTest3 - COMMAND ITKConnectedComponentsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ConnectedComponentImageFilterTest3.png,:} - ${ITK_TEST_OUTPUT_DIR}/ConnectedComponentImageFilterTest3.png - itkConnectedComponentImageFilterTest DATA{${ITK_DATA_ROOT}/Input/Shapes.png} ${ITK_TEST_OUTPUT_DIR}/ConnectedComponentImageFilterTest3.png 128 255 1) -itk_add_test(NAME itkConnectedComponentImageFilterBackgroundTest1 - COMMAND ITKConnectedComponentsTestDriver - itkConnectedComponentImageFilterBackgroundTest 1) -itk_add_test(NAME itkConnectedComponentImageFilterBackgroundTest2 - COMMAND ITKConnectedComponentsTestDriver - itkConnectedComponentImageFilterBackgroundTest -1) -itk_add_test(NAME itkThresholdMaximumConnectedComponentsImageFilterTest1 - COMMAND ITKConnectedComponentsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/itkThresholdMaximumConnectedComponentsImageFilterTest1.png} - ${ITK_TEST_OUTPUT_DIR}/itkThresholdMaximumConnectedComponentsImageFilterTest1.png - itkThresholdMaximumConnectedComponentsImageFilterTest DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence1.png} ${ITK_TEST_OUTPUT_DIR}/itkThresholdMaximumConnectedComponentsImageFilterTest1.png 10) -itk_add_test(NAME itkThresholdMaximumConnectedComponentsImageFilterTest2 - COMMAND ITKConnectedComponentsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/itkThresholdMaximumConnectedComponentsImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/itkThresholdMaximumConnectedComponentsImageFilterTest2.png - itkThresholdMaximumConnectedComponentsImageFilterTest DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence2.png} ${ITK_TEST_OUTPUT_DIR}/itkThresholdMaximumConnectedComponentsImageFilterTest2.png 10) -itk_add_test(NAME itkScalarConnectedComponentImageFilterTest - COMMAND ITKConnectedComponentsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ScalarConnectedComponentImageFilterTest.png,:} - ${ITK_TEST_OUTPUT_DIR}/ScalarConnectedComponentImageFilterTest.png - itkScalarConnectedComponentImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/ScalarConnectedComponentImageFilterTest.png 20 1) -itk_add_test(NAME itkVectorConnectedComponentImageFilterTest - COMMAND ITKConnectedComponentsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/VectorConnectedComponentImageFilterTest.png,:} - ${ITK_TEST_OUTPUT_DIR}/VectorConnectedComponentImageFilterTest.png - itkVectorConnectedComponentImageFilterTest ${ITK_TEST_OUTPUT_DIR}/VectorConnectedComponentImageFilterTest.png) -itk_add_test(NAME itkConnectedComponentImageFilterTooManyObjectsTest - COMMAND ITKConnectedComponentsTestDriver itkConnectedComponentImageFilterTooManyObjectsTest) -itk_add_test(NAME itkMaskConnectedComponentImageFilterTest - COMMAND ITKConnectedComponentsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/MaskConnectedComponentImageFilterTest.png,:} - ${ITK_TEST_OUTPUT_DIR}/MaskConnectedComponentImageFilterTest.png - itkMaskConnectedComponentImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/MaskConnectedComponentImageFilterTest.png 130 145) +itk_add_test( + NAME + itkRelabelComponentImageFilterTest + COMMAND + ITKConnectedComponentsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/RelabelComponentImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/RelabelComponentImageFilterTest.png + itkRelabelComponentImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/RelabelComponentImageFilterTest.png + 130 + 145) +itk_add_test( + NAME + itkHardConnectedComponentImageFilterTest + COMMAND + ITKConnectedComponentsTestDriver + --compare + DATA{Baseline/HardConnectedComponentImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/HardConnectedComponentImageFilterTestUnsignedChar.png + --compare + DATA{Baseline/HardConnectedComponentImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/HardConnectedComponentImageFilterTestUnsignedShort.png + itkHardConnectedComponentImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/HardConnectedComponentImageFilterTest) +itk_add_test( + NAME + itkConnectedComponentImageFilterTestRGB + COMMAND + ITKConnectedComponentsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ConnectedComponentImageFilterTest.png,:} + ${ITK_TEST_OUTPUT_DIR}/ConnectedComponentImageFilterTestRGB.png + itkConnectedComponentImageFilterTestRGB + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/ConnectedComponentImageFilterTestRGB.png + 130 + 145) +itk_add_test( + NAME + itkConnectedComponentImageFilterTest + COMMAND + ITKConnectedComponentsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ConnectedComponentImageFilterTest.png,:} + ${ITK_TEST_OUTPUT_DIR}/ConnectedComponentImageFilterTest.png + itkConnectedComponentImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/ConnectedComponentImageFilterTest.png + 130 + 145) +itk_add_test( + NAME + itkConnectedComponentImageFilterTest2 + COMMAND + ITKConnectedComponentsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ConnectedComponentImageFilterTest2.png,:} + ${ITK_TEST_OUTPUT_DIR}/ConnectedComponentImageFilterTest2.png + itkConnectedComponentImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Shapes.png} + ${ITK_TEST_OUTPUT_DIR}/ConnectedComponentImageFilterTest2.png + 128 + 255 + 0) +itk_add_test( + NAME + itkConnectedComponentImageFilterTest3 + COMMAND + ITKConnectedComponentsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ConnectedComponentImageFilterTest3.png,:} + ${ITK_TEST_OUTPUT_DIR}/ConnectedComponentImageFilterTest3.png + itkConnectedComponentImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/Shapes.png} + ${ITK_TEST_OUTPUT_DIR}/ConnectedComponentImageFilterTest3.png + 128 + 255 + 1) +itk_add_test( + NAME + itkConnectedComponentImageFilterBackgroundTest1 + COMMAND + ITKConnectedComponentsTestDriver + itkConnectedComponentImageFilterBackgroundTest + 1) +itk_add_test( + NAME + itkConnectedComponentImageFilterBackgroundTest2 + COMMAND + ITKConnectedComponentsTestDriver + itkConnectedComponentImageFilterBackgroundTest + -1) +itk_add_test( + NAME + itkThresholdMaximumConnectedComponentsImageFilterTest1 + COMMAND + ITKConnectedComponentsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/itkThresholdMaximumConnectedComponentsImageFilterTest1.png} + ${ITK_TEST_OUTPUT_DIR}/itkThresholdMaximumConnectedComponentsImageFilterTest1.png + itkThresholdMaximumConnectedComponentsImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence1.png} + ${ITK_TEST_OUTPUT_DIR}/itkThresholdMaximumConnectedComponentsImageFilterTest1.png + 10) +itk_add_test( + NAME + itkThresholdMaximumConnectedComponentsImageFilterTest2 + COMMAND + ITKConnectedComponentsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/itkThresholdMaximumConnectedComponentsImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/itkThresholdMaximumConnectedComponentsImageFilterTest2.png + itkThresholdMaximumConnectedComponentsImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/CellsFluorescence2.png} + ${ITK_TEST_OUTPUT_DIR}/itkThresholdMaximumConnectedComponentsImageFilterTest2.png + 10) +itk_add_test( + NAME + itkScalarConnectedComponentImageFilterTest + COMMAND + ITKConnectedComponentsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ScalarConnectedComponentImageFilterTest.png,:} + ${ITK_TEST_OUTPUT_DIR}/ScalarConnectedComponentImageFilterTest.png + itkScalarConnectedComponentImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/ScalarConnectedComponentImageFilterTest.png + 20 + 1) +itk_add_test( + NAME + itkVectorConnectedComponentImageFilterTest + COMMAND + ITKConnectedComponentsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/VectorConnectedComponentImageFilterTest.png,:} + ${ITK_TEST_OUTPUT_DIR}/VectorConnectedComponentImageFilterTest.png + itkVectorConnectedComponentImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/VectorConnectedComponentImageFilterTest.png) +itk_add_test( + NAME + itkConnectedComponentImageFilterTooManyObjectsTest + COMMAND + ITKConnectedComponentsTestDriver + itkConnectedComponentImageFilterTooManyObjectsTest) +itk_add_test( + NAME + itkMaskConnectedComponentImageFilterTest + COMMAND + ITKConnectedComponentsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/MaskConnectedComponentImageFilterTest.png,:} + ${ITK_TEST_OUTPUT_DIR}/MaskConnectedComponentImageFilterTest.png + itkMaskConnectedComponentImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/MaskConnectedComponentImageFilterTest.png + 130 + 145) -set(ITKConnectedComponentsGTests - itkRelabelComponentImageFilterGTest.cxx - itkConnectedComponentImageFilterGTest.cxx - ) -CreateGoogleTestDriver(ITKConnectedComponents "${ITKConnectedComponents-Test_LIBRARIES}" "${ITKConnectedComponentsGTests}") +set(ITKConnectedComponentsGTests itkRelabelComponentImageFilterGTest.cxx itkConnectedComponentImageFilterGTest.cxx) +creategoogletestdriver(ITKConnectedComponents "${ITKConnectedComponents-Test_LIBRARIES}" + "${ITKConnectedComponentsGTests}") diff --git a/Modules/Segmentation/ConnectedComponents/wrapping/itkConnectedComponentImageFilter.wrap b/Modules/Segmentation/ConnectedComponents/wrapping/itkConnectedComponentImageFilter.wrap index 10a4c7ef0fe..f5cf77a8033 100644 --- a/Modules/Segmentation/ConnectedComponents/wrapping/itkConnectedComponentImageFilter.wrap +++ b/Modules/Segmentation/ConnectedComponents/wrapping/itkConnectedComponentImageFilter.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::ConnectedComponentImageFilter" POINTER) - # Create wrappers from every selected integral (signed and un) type to every - # selected unsigned type. Also force ulong output for the watershed filter. - UNIQUE(to_types "UL;${WRAP_ITK_INT}") - # Supports too few labels. - list(REMOVE_ITEM to_types "UC") - itk_wrap_image_filter_combinations("${WRAP_ITK_INT}" "${to_types}" 2+) - itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_INT}" 2+) +# Create wrappers from every selected integral (signed and un) type to every +# selected unsigned type. Also force ulong output for the watershed filter. +unique(to_types "UL;${WRAP_ITK_INT}") +# Supports too few labels. +list(REMOVE_ITEM to_types "UC") +itk_wrap_image_filter_combinations("${WRAP_ITK_INT}" "${to_types}" 2+) +itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_INT}" 2+) itk_end_wrap_class() diff --git a/Modules/Segmentation/ConnectedComponents/wrapping/itkHardConnectedComponentImageFilter.wrap b/Modules/Segmentation/ConnectedComponents/wrapping/itkHardConnectedComponentImageFilter.wrap index 1176d098628..c2b0996d901 100644 --- a/Modules/Segmentation/ConnectedComponents/wrapping/itkHardConnectedComponentImageFilter.wrap +++ b/Modules/Segmentation/ConnectedComponents/wrapping/itkHardConnectedComponentImageFilter.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::HardConnectedComponentImageFilter" POINTER) - # Create wrappers from every selected integral (signed and un) type to every - # selected unsigned type. Also force ulong output for the watershed filter. - UNIQUE(to_types "UL;${WRAP_ITK_INT}") - # Supports too few labels. - list(REMOVE_ITEM to_types "UC") - itk_wrap_image_filter_combinations("${WRAP_ITK_INT}" "${to_types}") +# Create wrappers from every selected integral (signed and un) type to every +# selected unsigned type. Also force ulong output for the watershed filter. +unique(to_types "UL;${WRAP_ITK_INT}") +# Supports too few labels. +list(REMOVE_ITEM to_types "UC") +itk_wrap_image_filter_combinations("${WRAP_ITK_INT}" "${to_types}") itk_end_wrap_class() diff --git a/Modules/Segmentation/ConnectedComponents/wrapping/itkRelabelComponentImageFilter.wrap b/Modules/Segmentation/ConnectedComponents/wrapping/itkRelabelComponentImageFilter.wrap index 6a783f8991d..62a4595fb76 100644 --- a/Modules/Segmentation/ConnectedComponents/wrapping/itkRelabelComponentImageFilter.wrap +++ b/Modules/Segmentation/ConnectedComponents/wrapping/itkRelabelComponentImageFilter.wrap @@ -1,9 +1,9 @@ itk_wrap_class("itk::RelabelComponentImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - # Wrap from ulong to other integral types, even if ulong isn't wrapped. This - # is needed to be able to use image from watershed image filter. - remove(types "${WRAP_ITK_INT}" ${ITKM_IT}) - itk_wrap_image_filter_combinations("${ITKM_IT}" "${types}") +# Wrap from ulong to other integral types, even if ulong isn't wrapped. This +# is needed to be able to use image from watershed image filter. +remove(types "${WRAP_ITK_INT}" ${ITKM_IT}) +itk_wrap_image_filter_combinations("${ITKM_IT}" "${types}") itk_end_wrap_class() diff --git a/Modules/Segmentation/ConnectedComponents/wrapping/itkScalarConnectedComponentImageFilter.wrap b/Modules/Segmentation/ConnectedComponents/wrapping/itkScalarConnectedComponentImageFilter.wrap index 43f3d61586b..af010ccd8fd 100644 --- a/Modules/Segmentation/ConnectedComponents/wrapping/itkScalarConnectedComponentImageFilter.wrap +++ b/Modules/Segmentation/ConnectedComponents/wrapping/itkScalarConnectedComponentImageFilter.wrap @@ -1,6 +1,6 @@ itk_wrap_class("itk::ScalarConnectedComponentImageFilter" POINTER_WITH_SUPERCLASS) - UNIQUE(to_types "UL;${WRAP_ITK_INT}") - # Supports too few labels. - list(REMOVE_ITEM to_types "UC") - itk_wrap_image_filter_combinations("${WRAP_ITK_INT}" "${to_types}" 2+) +unique(to_types "UL;${WRAP_ITK_INT}") +# Supports too few labels. +list(REMOVE_ITEM to_types "UC") +itk_wrap_image_filter_combinations("${WRAP_ITK_INT}" "${to_types}" 2+) itk_end_wrap_class() diff --git a/Modules/Segmentation/ConnectedComponents/wrapping/itkThresholdMaximumConnectedComponentsImageFilter.wrap b/Modules/Segmentation/ConnectedComponents/wrapping/itkThresholdMaximumConnectedComponentsImageFilter.wrap index c1f38f0c6a4..17cf42b9a30 100644 --- a/Modules/Segmentation/ConnectedComponents/wrapping/itkThresholdMaximumConnectedComponentsImageFilter.wrap +++ b/Modules/Segmentation/ConnectedComponents/wrapping/itkThresholdMaximumConnectedComponentsImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ThresholdMaximumConnectedComponentsImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) +itk_wrap_image_filter("${WRAP_ITK_INT}" 1 2+) itk_end_wrap_class() diff --git a/Modules/Segmentation/ConnectedComponents/wrapping/itkVectorConnectedComponentImageFilter.wrap b/Modules/Segmentation/ConnectedComponents/wrapping/itkVectorConnectedComponentImageFilter.wrap index cccab7170ea..35f00bdd275 100644 --- a/Modules/Segmentation/ConnectedComponents/wrapping/itkVectorConnectedComponentImageFilter.wrap +++ b/Modules/Segmentation/ConnectedComponents/wrapping/itkVectorConnectedComponentImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::VectorConnectedComponentImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_INT}" 2+) +itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_INT}" 2+) itk_end_wrap_class() diff --git a/Modules/Segmentation/DeformableMesh/itk-module.cmake b/Modules/Segmentation/DeformableMesh/itk-module.cmake index 92ac54a0d9c..9d9ec320013 100644 --- a/Modules/Segmentation/DeformableMesh/itk-module.cmake +++ b/Modules/Segmentation/DeformableMesh/itk-module.cmake @@ -1,16 +1,16 @@ set(DOCUMENTATION "This module contains classes to perform image segmentation by a deformable mesh that experiences a variety of forces.") -itk_module(ITKDeformableMesh +itk_module( + ITKDeformableMesh ENABLE_SHARED DEPENDS - ITKMesh - ITKImageIntensity - ITKThresholding - ITKImageFeature - ITKAnisotropicSmoothing + ITKMesh + ITKImageIntensity + ITKThresholding + ITKImageFeature + ITKAnisotropicSmoothing TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Segmentation/DeformableMesh/src/CMakeLists.txt b/Modules/Segmentation/DeformableMesh/src/CMakeLists.txt index 63af98ab017..cb42ade921d 100644 --- a/Modules/Segmentation/DeformableMesh/src/CMakeLists.txt +++ b/Modules/Segmentation/DeformableMesh/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKDeformableMesh_SRCS - itkDeformableSimplexMesh3DGradientConstraintForceFilter.cxx - ) +set(ITKDeformableMesh_SRCS itkDeformableSimplexMesh3DGradientConstraintForceFilter.cxx) itk_module_add_library(ITKDeformableMesh ${ITKDeformableMesh_SRCS}) diff --git a/Modules/Segmentation/DeformableMesh/test/CMakeLists.txt b/Modules/Segmentation/DeformableMesh/test/CMakeLists.txt index 2283b55dc45..9cd2b237801 100644 --- a/Modules/Segmentation/DeformableMesh/test/CMakeLists.txt +++ b/Modules/Segmentation/DeformableMesh/test/CMakeLists.txt @@ -1,18 +1,34 @@ itk_module_test() set(ITKDeformableMeshTests -itkDeformableSimplexMesh3DFilterTest.cxx -itkDeformableSimplexMesh3DBalloonForceFilterTest.cxx -itkDeformableSimplexMesh3DGradientConstraintForceFilterTest.cxx -itkSimplexMeshWithFloatCoordRepTest.cxx -) + itkDeformableSimplexMesh3DFilterTest.cxx + itkDeformableSimplexMesh3DBalloonForceFilterTest.cxx + itkDeformableSimplexMesh3DGradientConstraintForceFilterTest.cxx + itkSimplexMeshWithFloatCoordRepTest.cxx) -CreateTestDriver(ITKDeformableMesh "${ITKDeformableMesh-Test_LIBRARIES}" "${ITKDeformableMeshTests}") +createtestdriver(ITKDeformableMesh "${ITKDeformableMesh-Test_LIBRARIES}" "${ITKDeformableMeshTests}") -itk_add_test(NAME itkDeformableSimplexMesh3DFilterTest - COMMAND ITKDeformableMeshTestDriver itkDeformableSimplexMesh3DFilterTest) -itk_add_test(NAME itkDeformableSimplexMesh3DBalloonForceFilterTest - COMMAND ITKDeformableMeshTestDriver itkDeformableSimplexMesh3DBalloonForceFilterTest 0.01) -itk_add_test(NAME itkDeformableSimplexMesh3DGradientConstaintForceFilterTest - COMMAND ITKDeformableMeshTestDriver itkDeformableSimplexMesh3DGradientConstraintForceFilterTest) -itk_add_test(NAME itkSimplexMeshWithFloatCoordRepTest - COMMAND ITKDeformableMeshTestDriver itkSimplexMeshWithFloatCoordRepTest) +itk_add_test( + NAME + itkDeformableSimplexMesh3DFilterTest + COMMAND + ITKDeformableMeshTestDriver + itkDeformableSimplexMesh3DFilterTest) +itk_add_test( + NAME + itkDeformableSimplexMesh3DBalloonForceFilterTest + COMMAND + ITKDeformableMeshTestDriver + itkDeformableSimplexMesh3DBalloonForceFilterTest + 0.01) +itk_add_test( + NAME + itkDeformableSimplexMesh3DGradientConstaintForceFilterTest + COMMAND + ITKDeformableMeshTestDriver + itkDeformableSimplexMesh3DGradientConstraintForceFilterTest) +itk_add_test( + NAME + itkSimplexMeshWithFloatCoordRepTest + COMMAND + ITKDeformableMeshTestDriver + itkSimplexMeshWithFloatCoordRepTest) diff --git a/Modules/Segmentation/KLMRegionGrowing/itk-module.cmake b/Modules/Segmentation/KLMRegionGrowing/itk-module.cmake index f5de7ec486b..7a7ac9db74c 100644 --- a/Modules/Segmentation/KLMRegionGrowing/itk-module.cmake +++ b/Modules/Segmentation/KLMRegionGrowing/itk-module.cmake @@ -1,17 +1,18 @@ -set(DOCUMENTATION "This module contains classes to perform energy-based region +set(DOCUMENTATION + "This module contains classes to perform energy-based region growing for multiband images. Since this is based on G. Koepfler, C. Lopez and J. M. Morel's work, the acronym KLM is added to quality the region growing method. See also \\\\ref ITKRegionGrowing.") -itk_module(ITKKLMRegionGrowing +itk_module( + ITKKLMRegionGrowing ENABLE_SHARED DEPENDS - ITKCommon + ITKCommon TEST_DEPENDS - ITKTestKernel - ITKStatistics + ITKTestKernel + ITKStatistics DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") # Extra test dependency on ITKStatistics in introduced by itkRegionGrow2DTest. diff --git a/Modules/Segmentation/KLMRegionGrowing/src/CMakeLists.txt b/Modules/Segmentation/KLMRegionGrowing/src/CMakeLists.txt index 543a0d66e39..7e4653e6a74 100644 --- a/Modules/Segmentation/KLMRegionGrowing/src/CMakeLists.txt +++ b/Modules/Segmentation/KLMRegionGrowing/src/CMakeLists.txt @@ -1,8 +1,7 @@ set(ITKKLMRegionGrowing_SRCS - itkSegmentationRegion.cxx - itkKLMSegmentationRegion.cxx - itkSegmentationBorder.cxx - itkKLMSegmentationBorder.cxx - ) + itkSegmentationRegion.cxx + itkKLMSegmentationRegion.cxx + itkSegmentationBorder.cxx + itkKLMSegmentationBorder.cxx) itk_module_add_library(ITKKLMRegionGrowing ${ITKKLMRegionGrowing_SRCS}) diff --git a/Modules/Segmentation/KLMRegionGrowing/test/CMakeLists.txt b/Modules/Segmentation/KLMRegionGrowing/test/CMakeLists.txt index 9f835bca363..4692a14b3a4 100644 --- a/Modules/Segmentation/KLMRegionGrowing/test/CMakeLists.txt +++ b/Modules/Segmentation/KLMRegionGrowing/test/CMakeLists.txt @@ -1,15 +1,16 @@ itk_module_test() -set(ITKKLMRegionGrowingTests -itkRegionGrow2DTest.cxx -) +set(ITKKLMRegionGrowingTests itkRegionGrow2DTest.cxx) -CreateTestDriver(ITKKLMRegionGrowing "${ITKKLMRegionGrowing-Test_LIBRARIES}" "${ITKKLMRegionGrowingTests}") +createtestdriver(ITKKLMRegionGrowing "${ITKKLMRegionGrowing-Test_LIBRARIES}" "${ITKKLMRegionGrowingTests}") set(TEMP ${ITK_TEST_OUTPUT_DIR}) -itk_add_test(NAME itkRegionGrow2DTest - COMMAND ITKKLMRegionGrowingTestDriver - --redirectOutput ${TEMP}/itkRegionGrow2DTest.txt - itkRegionGrow2DTest) -set_tests_properties(itkRegionGrow2DTest PROPERTIES - ATTACHED_FILES_ON_FAIL ${TEMP}/itkRegionGrow2DTest.txt) +itk_add_test( + NAME + itkRegionGrow2DTest + COMMAND + ITKKLMRegionGrowingTestDriver + --redirectOutput + ${TEMP}/itkRegionGrow2DTest.txt + itkRegionGrow2DTest) +set_tests_properties(itkRegionGrow2DTest PROPERTIES ATTACHED_FILES_ON_FAIL ${TEMP}/itkRegionGrow2DTest.txt) diff --git a/Modules/Segmentation/LabelVoting/itk-module.cmake b/Modules/Segmentation/LabelVoting/itk-module.cmake index 405cc8e7572..8dfd7412f10 100644 --- a/Modules/Segmentation/LabelVoting/itk-module.cmake +++ b/Modules/Segmentation/LabelVoting/itk-module.cmake @@ -1,17 +1,18 @@ -set(DOCUMENTATION "This module contains filters that perform label voting, i.e. +set(DOCUMENTATION + "This module contains filters that perform label voting, i.e. they count the number of pixels with a given label within a neighborhood and determine the output pixel based on the count. The operations on label images are similar to filtering on scalar images. See also \\\\ref ITKBinaryMathematicalMorphology, \\\\ref ITKConnectedComponents, and \\\\ref ITKLabelMap.") -itk_module(ITKLabelVoting +itk_module( + ITKLabelVoting DEPENDS - ITKThresholding + ITKThresholding TEST_DEPENDS - ITKTestKernel - ITKMetaIO - ITKDoubleConversion + ITKTestKernel + ITKMetaIO + ITKDoubleConversion DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Segmentation/LabelVoting/test/CMakeLists.txt b/Modules/Segmentation/LabelVoting/test/CMakeLists.txt index 2fad128c9e4..79efc210db6 100644 --- a/Modules/Segmentation/LabelVoting/test/CMakeLists.txt +++ b/Modules/Segmentation/LabelVoting/test/CMakeLists.txt @@ -1,33 +1,74 @@ itk_module_test() set(ITKLabelVotingTests -itkVotingBinaryImageFilterTest.cxx -itkLabelVotingImageFilterTest.cxx -itkMultiLabelSTAPLEImageFilterTest.cxx -itkVotingBinaryIterativeHoleFillingImageFilterTest.cxx -itkBinaryMedianImageFilterTest.cxx -itkVotingBinaryHoleFillingImageFilterTest.cxx -) + itkVotingBinaryImageFilterTest.cxx + itkLabelVotingImageFilterTest.cxx + itkMultiLabelSTAPLEImageFilterTest.cxx + itkVotingBinaryIterativeHoleFillingImageFilterTest.cxx + itkBinaryMedianImageFilterTest.cxx + itkVotingBinaryHoleFillingImageFilterTest.cxx) -CreateTestDriver(ITKLabelVoting "${ITKLabelVoting-Test_LIBRARIES}" "${ITKLabelVotingTests}") +createtestdriver(ITKLabelVoting "${ITKLabelVoting-Test_LIBRARIES}" "${ITKLabelVotingTests}") -itk_add_test(NAME itkVotingBinaryImageFilterTest0 - COMMAND ITKLabelVotingTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkVotingBinaryImageFilterTest0.mha "5a20f8e1f4f15d3c6059842550d67d2f" - itkVotingBinaryImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1-bin.png} ${ITK_TEST_OUTPUT_DIR}/itkVotingBinaryImageFilterTest0.mha 5 255 0) -itk_add_test(NAME itkVotingBinaryImageFilterTest1 - COMMAND ITKLabelVotingTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkVotingBinaryImageFilterTest1.mha "5afdcc3ca5e4c6295a15391ca7cbfec0" - itkVotingBinaryImageFilterTest DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkVotingBinaryImageFilterTest1.mha 5 100 0) -itk_add_test(NAME itkLabelVotingImageFilterTest - COMMAND ITKLabelVotingTestDriver itkLabelVotingImageFilterTest) -itk_add_test(NAME itkVotingBinaryIterativeHoleFillingImageFilterTest - COMMAND ITKLabelVotingTestDriver itkVotingBinaryIterativeHoleFillingImageFilterTest) -itk_add_test(NAME itkBinaryMedianImageFilterTest - COMMAND ITKLabelVotingTestDriver itkBinaryMedianImageFilterTest) -itk_add_test(NAME itkVotingBinaryHoleFillingImageFilterTest - COMMAND ITKLabelVotingTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/itkVotingBinaryHoleFillingImageFilterTest.png - fd3bd75fc6270e3c416a3f0807a6e24b - itkVotingBinaryHoleFillingImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkVotingBinaryHoleFillingImageFilterTest.png) -itk_add_test(NAME itkMultiLabelSTAPLEImageFilterTest - COMMAND ITKLabelVotingTestDriver itkMultiLabelSTAPLEImageFilterTest) +itk_add_test( + NAME + itkVotingBinaryImageFilterTest0 + COMMAND + ITKLabelVotingTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkVotingBinaryImageFilterTest0.mha + "5a20f8e1f4f15d3c6059842550d67d2f" + itkVotingBinaryImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1-bin.png} + ${ITK_TEST_OUTPUT_DIR}/itkVotingBinaryImageFilterTest0.mha + 5 + 255 + 0) +itk_add_test( + NAME + itkVotingBinaryImageFilterTest1 + COMMAND + ITKLabelVotingTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkVotingBinaryImageFilterTest1.mha + "5afdcc3ca5e4c6295a15391ca7cbfec0" + itkVotingBinaryImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkVotingBinaryImageFilterTest1.mha + 5 + 100 + 0) +itk_add_test( + NAME + itkLabelVotingImageFilterTest + COMMAND + ITKLabelVotingTestDriver + itkLabelVotingImageFilterTest) +itk_add_test( + NAME + itkVotingBinaryIterativeHoleFillingImageFilterTest + COMMAND + ITKLabelVotingTestDriver + itkVotingBinaryIterativeHoleFillingImageFilterTest) +itk_add_test( + NAME + itkBinaryMedianImageFilterTest + COMMAND + ITKLabelVotingTestDriver + itkBinaryMedianImageFilterTest) +itk_add_test( + NAME + itkVotingBinaryHoleFillingImageFilterTest + COMMAND + ITKLabelVotingTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/itkVotingBinaryHoleFillingImageFilterTest.png + fd3bd75fc6270e3c416a3f0807a6e24b + itkVotingBinaryHoleFillingImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkVotingBinaryHoleFillingImageFilterTest.png) +itk_add_test( + NAME + itkMultiLabelSTAPLEImageFilterTest + COMMAND + ITKLabelVotingTestDriver + itkMultiLabelSTAPLEImageFilterTest) diff --git a/Modules/Segmentation/LabelVoting/wrapping/CMakeLists.txt b/Modules/Segmentation/LabelVoting/wrapping/CMakeLists.txt index 5be506e8809..1dcbcc89d6c 100644 --- a/Modules/Segmentation/LabelVoting/wrapping/CMakeLists.txt +++ b/Modules/Segmentation/LabelVoting/wrapping/CMakeLists.txt @@ -1,6 +1,4 @@ itk_wrap_module(ITKLabelVoting) -set(WRAPPER_SUBMODULE_ORDER - itkVotingBinaryImageFilter -) +set(WRAPPER_SUBMODULE_ORDER itkVotingBinaryImageFilter) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Segmentation/LabelVoting/wrapping/itkBinaryMedianImageFilter.wrap b/Modules/Segmentation/LabelVoting/wrapping/itkBinaryMedianImageFilter.wrap index 405a8297f61..82c00538c24 100644 --- a/Modules/Segmentation/LabelVoting/wrapping/itkBinaryMedianImageFilter.wrap +++ b/Modules/Segmentation/LabelVoting/wrapping/itkBinaryMedianImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::BinaryMedianImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Segmentation/LabelVoting/wrapping/itkLabelVotingImageFilter.wrap b/Modules/Segmentation/LabelVoting/wrapping/itkLabelVotingImageFilter.wrap index fb02d6bdaee..e4ddd541c31 100644 --- a/Modules/Segmentation/LabelVoting/wrapping/itkLabelVotingImageFilter.wrap +++ b/Modules/Segmentation/LabelVoting/wrapping/itkLabelVotingImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::LabelVotingImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) itk_end_wrap_class() diff --git a/Modules/Segmentation/LabelVoting/wrapping/itkVotingBinaryHoleFillingImageFilter.wrap b/Modules/Segmentation/LabelVoting/wrapping/itkVotingBinaryHoleFillingImageFilter.wrap index fd1268ae598..b7df6fca528 100644 --- a/Modules/Segmentation/LabelVoting/wrapping/itkVotingBinaryHoleFillingImageFilter.wrap +++ b/Modules/Segmentation/LabelVoting/wrapping/itkVotingBinaryHoleFillingImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::VotingBinaryHoleFillingImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) # itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Segmentation/LabelVoting/wrapping/itkVotingBinaryImageFilter.wrap b/Modules/Segmentation/LabelVoting/wrapping/itkVotingBinaryImageFilter.wrap index c65fc44ceea..41fb7c0b5cc 100644 --- a/Modules/Segmentation/LabelVoting/wrapping/itkVotingBinaryImageFilter.wrap +++ b/Modules/Segmentation/LabelVoting/wrapping/itkVotingBinaryImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::VotingBinaryImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Segmentation/LabelVoting/wrapping/itkVotingBinaryIterativeHoleFillingImageFilter.wrap b/Modules/Segmentation/LabelVoting/wrapping/itkVotingBinaryIterativeHoleFillingImageFilter.wrap index f9791fee2e6..63b3dc8ef2f 100644 --- a/Modules/Segmentation/LabelVoting/wrapping/itkVotingBinaryIterativeHoleFillingImageFilter.wrap +++ b/Modules/Segmentation/LabelVoting/wrapping/itkVotingBinaryIterativeHoleFillingImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::VotingBinaryIterativeHoleFillingImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 1) - itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 1) +itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 1) +itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 1) # itk_wrap_image_filter("${WRAP_ITK_REAL}" 1) itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/itk-module.cmake b/Modules/Segmentation/LevelSets/itk-module.cmake index 8689b33e785..85e1d9cddaa 100644 --- a/Modules/Segmentation/LevelSets/itk-module.cmake +++ b/Modules/Segmentation/LevelSets/itk-module.cmake @@ -1,26 +1,27 @@ -set(DOCUMENTATION "This module contains classes related to level-set +set(DOCUMENTATION + "This module contains classes related to level-set segmentation. In level-set segmentation, the segmentation contour is modeled as the zero level set of a higher dimensional level-set function. The level-set function evolves according to a differential equation based on image-based features and characteristics of the level-set function. The segmentation evolves from an initial value for the segmenting contour.") -itk_module(ITKLevelSets +itk_module( + ITKLevelSets DEPENDS - ITKImageFeature - ITKFiniteDifference - ITKDistanceMap - ITKSignedDistanceFunction - ITKAnisotropicSmoothing - ITKThresholding - ITKOptimizers - ITKImageCompare - ITKFastMarching - ITKNarrowBand + ITKImageFeature + ITKFiniteDifference + ITKDistanceMap + ITKSignedDistanceFunction + ITKAnisotropicSmoothing + ITKThresholding + ITKOptimizers + ITKImageCompare + ITKFastMarching + ITKNarrowBand COMPILE_DEPENDS - ITKIOImageBase + ITKIOImageBase TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Segmentation/LevelSets/test/CMakeLists.txt b/Modules/Segmentation/LevelSets/test/CMakeLists.txt index c9dd3a7f982..3f36d5090b8 100644 --- a/Modules/Segmentation/LevelSets/test/CMakeLists.txt +++ b/Modules/Segmentation/LevelSets/test/CMakeLists.txt @@ -1,100 +1,223 @@ itk_module_test() set(ITKLevelSetsTests -itkThresholdSegmentationLevelSetImageFilterTest.cxx -itkVectorThresholdSegmentationLevelSetImageFilterTest.cxx -itkAnisotropicFourthOrderLevelSetImageFilterTest.cxx -itkReinitializeLevelSetImageFilterTest.cxx -itkLevelSetVelocityNeighborhoodExtractorTest.cxx -itkIsotropicFourthOrderLevelSetImageFilterTest.cxx -itkGeodesicActiveContourLevelSetImageFilterTest.cxx -itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx -itkParallelSparseFieldLevelSetImageFilterTest.cxx -itkShapeDetectionLevelSetImageFilterTest.cxx -itkNarrowBandThresholdSegmentationLevelSetImageFilterTest.cxx -itkNarrowBandCurvesLevelSetImageFilterTest.cxx -itkCollidingFrontsImageFilterTest.cxx -itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx -itkLevelSetFunctionTest.cxx -itkExtensionVelocitiesImageFilterTest.cxx -itkCannySegmentationLevelSetImageFilterTest.cxx -itkLevelSetNeighborhoodExtractorTest.cxx -itkShapePriorMAPCostFunctionTest.cxx -itkImplicitManifoldNormalVectorFilterTest.cxx -itkSparseFieldFourthOrderLevelSetImageFilterTest.cxx -itkLaplacianSegmentationLevelSetImageFilterTest.cxx -itkShapePriorSegmentationLevelSetFunctionTest.cxx -itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest.cxx -itkUnsharpMaskLevelSetImageFilterTest.cxx -itkCurvesLevelSetImageFilterTest.cxx -itkCurvesLevelSetImageFilterZeroSigmaTest.cxx -itkBinaryMaskToNarrowBandPointSetFilterTest.cxx -) + itkThresholdSegmentationLevelSetImageFilterTest.cxx + itkVectorThresholdSegmentationLevelSetImageFilterTest.cxx + itkAnisotropicFourthOrderLevelSetImageFilterTest.cxx + itkReinitializeLevelSetImageFilterTest.cxx + itkLevelSetVelocityNeighborhoodExtractorTest.cxx + itkIsotropicFourthOrderLevelSetImageFilterTest.cxx + itkGeodesicActiveContourLevelSetImageFilterTest.cxx + itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx + itkParallelSparseFieldLevelSetImageFilterTest.cxx + itkShapeDetectionLevelSetImageFilterTest.cxx + itkNarrowBandThresholdSegmentationLevelSetImageFilterTest.cxx + itkNarrowBandCurvesLevelSetImageFilterTest.cxx + itkCollidingFrontsImageFilterTest.cxx + itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx + itkLevelSetFunctionTest.cxx + itkExtensionVelocitiesImageFilterTest.cxx + itkCannySegmentationLevelSetImageFilterTest.cxx + itkLevelSetNeighborhoodExtractorTest.cxx + itkShapePriorMAPCostFunctionTest.cxx + itkImplicitManifoldNormalVectorFilterTest.cxx + itkSparseFieldFourthOrderLevelSetImageFilterTest.cxx + itkLaplacianSegmentationLevelSetImageFilterTest.cxx + itkShapePriorSegmentationLevelSetFunctionTest.cxx + itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest.cxx + itkUnsharpMaskLevelSetImageFilterTest.cxx + itkCurvesLevelSetImageFilterTest.cxx + itkCurvesLevelSetImageFilterZeroSigmaTest.cxx + itkBinaryMaskToNarrowBandPointSetFilterTest.cxx) -CreateTestDriver(ITKLevelSets "${ITKLevelSets-Test_LIBRARIES}" "${ITKLevelSetsTests}") +createtestdriver(ITKLevelSets "${ITKLevelSets-Test_LIBRARIES}" "${ITKLevelSetsTests}") -itk_add_test(NAME itkThresholdSegmentationLevelSetImageFilterTest - COMMAND ITKLevelSetsTestDriver itkThresholdSegmentationLevelSetImageFilterTest) -itk_add_test(NAME itkVectorThresholdSegmentationLevelSetImageFilterTest - COMMAND ITKLevelSetsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/VectorThresholdSegmentationLevelSetImageFilterTest.png,:} - ${ITK_TEST_OUTPUT_DIR}/VectorThresholdSegmentationLevelSetImageFilterTest.png - --compareNumberOfPixelsTolerance 55 - itkVectorThresholdSegmentationLevelSetImageFilterTest DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSliceInitialLevelSet.png} DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} ${ITK_TEST_OUTPUT_DIR}/VectorThresholdSegmentationLevelSetImageFilterTest.png 5.0 50) -itk_add_test(NAME itkAnisotropicFourthOrderLevelSetImageFilterTest - COMMAND ITKLevelSetsTestDriver itkAnisotropicFourthOrderLevelSetImageFilterTest) -itk_add_test(NAME itkReinitializeLevelSetImageFilterTest - COMMAND ITKLevelSetsTestDriver itkReinitializeLevelSetImageFilterTest) -itk_add_test(NAME itkLevelSetVelocityNeighborhoodExtractorTest - COMMAND ITKLevelSetsTestDriver itkLevelSetVelocityNeighborhoodExtractorTest) -itk_add_test(NAME itkIsotropicFourthOrderLevelSetImageFilterTest - COMMAND ITKLevelSetsTestDriver itkIsotropicFourthOrderLevelSetImageFilterTest) -itk_add_test(NAME itkGeodesicActiveContourLevelSetImageFilterTest - COMMAND ITKLevelSetsTestDriver itkGeodesicActiveContourLevelSetImageFilterTest) -itk_add_test(NAME itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2 - COMMAND ITKLevelSetsTestDriver itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2) -itk_add_test(NAME itkParallelSparseFieldLevelSetImageFilterTest - COMMAND ITKLevelSetsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ParallelSparseFieldLevelSetImageFilterTest.mha} - ${ITK_TEST_OUTPUT_DIR}/ParallelSparseFieldLevelSetImageFilterTest.mha - itkParallelSparseFieldLevelSetImageFilterTest ${ITK_TEST_OUTPUT_DIR}/ParallelSparseFieldLevelSetImageFilterTest.mha) -itk_add_test(NAME itkShapeDetectionLevelSetImageFilterTest - COMMAND ITKLevelSetsTestDriver itkShapeDetectionLevelSetImageFilterTest) -itk_add_test(NAME itkNarrowBandThresholdSegmentationLevelSetImageFilterTest - COMMAND ITKLevelSetsTestDriver itkNarrowBandThresholdSegmentationLevelSetImageFilterTest) -itk_add_test(NAME itkNarrowBandCurvesLevelSetImageFilterTest1 - COMMAND ITKLevelSetsTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/itkNarrowBandCurvesLevelSetImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkNarrowBandCurvesLevelSetImageFilterTest.png - itkNarrowBandCurvesLevelSetImageFilterTest ${ITK_TEST_OUTPUT_DIR}/itkNarrowBandCurvesLevelSetImageFilterTest.png) -itk_add_test(NAME itkCollidingFrontsImageFilterTest - COMMAND ITKLevelSetsTestDriver itkCollidingFrontsImageFilterTest -1e-6 1 1) -itk_add_test(NAME itkGeodesicActiveContourShapePriorLevelSetImageFilterTest - COMMAND ITKLevelSetsTestDriver itkGeodesicActiveContourShapePriorLevelSetImageFilterTest) -itk_add_test(NAME itkLevelSetFunctionTest - COMMAND ITKLevelSetsTestDriver itkLevelSetFunctionTest) -itk_add_test(NAME itkExtensionVelocitiesImageFilterTest - COMMAND ITKLevelSetsTestDriver itkExtensionVelocitiesImageFilterTest) -itk_add_test(NAME itkCannySegmentationLevelSetImageFilterTest - COMMAND ITKLevelSetsTestDriver itkCannySegmentationLevelSetImageFilterTest) -itk_add_test(NAME itkLevelSetNeighborhoodExtractorTest - COMMAND ITKLevelSetsTestDriver itkLevelSetNeighborhoodExtractorTest) -itk_add_test(NAME itkShapePriorMAPCostFunctionTest - COMMAND ITKLevelSetsTestDriver itkShapePriorMAPCostFunctionTest) -itk_add_test(NAME itkImplicitManifoldNormalVectorFilterTest - COMMAND ITKLevelSetsTestDriver itkImplicitManifoldNormalVectorFilterTest) -itk_add_test(NAME itkSparseFieldFourthOrderLevelSetImageFilterTest - COMMAND ITKLevelSetsTestDriver itkSparseFieldFourthOrderLevelSetImageFilterTest) -itk_add_test(NAME itkLaplacianSegmentationLevelSetImageFilterTest - COMMAND ITKLevelSetsTestDriver itkLaplacianSegmentationLevelSetImageFilterTest) -itk_add_test(NAME itkShapePriorSegmentationLevelSetFunctionTest - COMMAND ITKLevelSetsTestDriver itkShapePriorSegmentationLevelSetFunctionTest) -itk_add_test(NAME itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest - COMMAND ITKLevelSetsTestDriver itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest) -itk_add_test(NAME itkUnsharpMaskLevelSetImageFilterTest - COMMAND ITKLevelSetsTestDriver itkUnsharpMaskLevelSetImageFilterTest) -itk_add_test(NAME itkCurvesLevelSetImageFilterTest - COMMAND ITKLevelSetsTestDriver itkCurvesLevelSetImageFilterTest) -itk_add_test(NAME itkCurvesLevelSetImageFilterZeroSigmaTest - COMMAND ITKLevelSetsTestDriver itkCurvesLevelSetImageFilterZeroSigmaTest) -itk_add_test(NAME itkBinaryMaskToNarrowBandPointSetFilterTest - COMMAND ITKLevelSetsTestDriver itkBinaryMaskToNarrowBandPointSetFilterTest 5.0) +itk_add_test( + NAME + itkThresholdSegmentationLevelSetImageFilterTest + COMMAND + ITKLevelSetsTestDriver + itkThresholdSegmentationLevelSetImageFilterTest) +itk_add_test( + NAME + itkVectorThresholdSegmentationLevelSetImageFilterTest + COMMAND + ITKLevelSetsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/VectorThresholdSegmentationLevelSetImageFilterTest.png,:} + ${ITK_TEST_OUTPUT_DIR}/VectorThresholdSegmentationLevelSetImageFilterTest.png + --compareNumberOfPixelsTolerance + 55 + itkVectorThresholdSegmentationLevelSetImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSliceInitialLevelSet.png} + DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} + ${ITK_TEST_OUTPUT_DIR}/VectorThresholdSegmentationLevelSetImageFilterTest.png + 5.0 + 50) +itk_add_test( + NAME + itkAnisotropicFourthOrderLevelSetImageFilterTest + COMMAND + ITKLevelSetsTestDriver + itkAnisotropicFourthOrderLevelSetImageFilterTest) +itk_add_test( + NAME + itkReinitializeLevelSetImageFilterTest + COMMAND + ITKLevelSetsTestDriver + itkReinitializeLevelSetImageFilterTest) +itk_add_test( + NAME + itkLevelSetVelocityNeighborhoodExtractorTest + COMMAND + ITKLevelSetsTestDriver + itkLevelSetVelocityNeighborhoodExtractorTest) +itk_add_test( + NAME + itkIsotropicFourthOrderLevelSetImageFilterTest + COMMAND + ITKLevelSetsTestDriver + itkIsotropicFourthOrderLevelSetImageFilterTest) +itk_add_test( + NAME + itkGeodesicActiveContourLevelSetImageFilterTest + COMMAND + ITKLevelSetsTestDriver + itkGeodesicActiveContourLevelSetImageFilterTest) +itk_add_test( + NAME + itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2 + COMMAND + ITKLevelSetsTestDriver + itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2) +itk_add_test( + NAME + itkParallelSparseFieldLevelSetImageFilterTest + COMMAND + ITKLevelSetsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ParallelSparseFieldLevelSetImageFilterTest.mha} + ${ITK_TEST_OUTPUT_DIR}/ParallelSparseFieldLevelSetImageFilterTest.mha + itkParallelSparseFieldLevelSetImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/ParallelSparseFieldLevelSetImageFilterTest.mha) +itk_add_test( + NAME + itkShapeDetectionLevelSetImageFilterTest + COMMAND + ITKLevelSetsTestDriver + itkShapeDetectionLevelSetImageFilterTest) +itk_add_test( + NAME + itkNarrowBandThresholdSegmentationLevelSetImageFilterTest + COMMAND + ITKLevelSetsTestDriver + itkNarrowBandThresholdSegmentationLevelSetImageFilterTest) +itk_add_test( + NAME + itkNarrowBandCurvesLevelSetImageFilterTest1 + COMMAND + ITKLevelSetsTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/itkNarrowBandCurvesLevelSetImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkNarrowBandCurvesLevelSetImageFilterTest.png + itkNarrowBandCurvesLevelSetImageFilterTest + ${ITK_TEST_OUTPUT_DIR}/itkNarrowBandCurvesLevelSetImageFilterTest.png) +itk_add_test( + NAME + itkCollidingFrontsImageFilterTest + COMMAND + ITKLevelSetsTestDriver + itkCollidingFrontsImageFilterTest + -1e-6 + 1 + 1) +itk_add_test( + NAME + itkGeodesicActiveContourShapePriorLevelSetImageFilterTest + COMMAND + ITKLevelSetsTestDriver + itkGeodesicActiveContourShapePriorLevelSetImageFilterTest) +itk_add_test( + NAME + itkLevelSetFunctionTest + COMMAND + ITKLevelSetsTestDriver + itkLevelSetFunctionTest) +itk_add_test( + NAME + itkExtensionVelocitiesImageFilterTest + COMMAND + ITKLevelSetsTestDriver + itkExtensionVelocitiesImageFilterTest) +itk_add_test( + NAME + itkCannySegmentationLevelSetImageFilterTest + COMMAND + ITKLevelSetsTestDriver + itkCannySegmentationLevelSetImageFilterTest) +itk_add_test( + NAME + itkLevelSetNeighborhoodExtractorTest + COMMAND + ITKLevelSetsTestDriver + itkLevelSetNeighborhoodExtractorTest) +itk_add_test( + NAME + itkShapePriorMAPCostFunctionTest + COMMAND + ITKLevelSetsTestDriver + itkShapePriorMAPCostFunctionTest) +itk_add_test( + NAME + itkImplicitManifoldNormalVectorFilterTest + COMMAND + ITKLevelSetsTestDriver + itkImplicitManifoldNormalVectorFilterTest) +itk_add_test( + NAME + itkSparseFieldFourthOrderLevelSetImageFilterTest + COMMAND + ITKLevelSetsTestDriver + itkSparseFieldFourthOrderLevelSetImageFilterTest) +itk_add_test( + NAME + itkLaplacianSegmentationLevelSetImageFilterTest + COMMAND + ITKLevelSetsTestDriver + itkLaplacianSegmentationLevelSetImageFilterTest) +itk_add_test( + NAME + itkShapePriorSegmentationLevelSetFunctionTest + COMMAND + ITKLevelSetsTestDriver + itkShapePriorSegmentationLevelSetFunctionTest) +itk_add_test( + NAME + itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest + COMMAND + ITKLevelSetsTestDriver + itkGeodesicActiveContourLevelSetImageFilterZeroSigmaTest) +itk_add_test( + NAME + itkUnsharpMaskLevelSetImageFilterTest + COMMAND + ITKLevelSetsTestDriver + itkUnsharpMaskLevelSetImageFilterTest) +itk_add_test( + NAME + itkCurvesLevelSetImageFilterTest + COMMAND + ITKLevelSetsTestDriver + itkCurvesLevelSetImageFilterTest) +itk_add_test( + NAME + itkCurvesLevelSetImageFilterZeroSigmaTest + COMMAND + ITKLevelSetsTestDriver + itkCurvesLevelSetImageFilterZeroSigmaTest) +itk_add_test( + NAME + itkBinaryMaskToNarrowBandPointSetFilterTest + COMMAND + ITKLevelSetsTestDriver + itkBinaryMaskToNarrowBandPointSetFilterTest + 5.0) diff --git a/Modules/Segmentation/LevelSets/wrapping/CMakeLists.txt b/Modules/Segmentation/LevelSets/wrapping/CMakeLists.txt index 23ac16a7730..f75c7813920 100644 --- a/Modules/Segmentation/LevelSets/wrapping/CMakeLists.txt +++ b/Modules/Segmentation/LevelSets/wrapping/CMakeLists.txt @@ -1,10 +1,9 @@ itk_wrap_module(ITKLevelSets) set(WRAPPER_SUBMODULE_ORDER - itkLevelSetFunction - itkSparseFieldLevelSetImageFilter - itkSparseFieldFourthOrderLevelSetImageFilter - itkSegmentationLevelSetImageFilter - itkShapePriorSegmentationLevelSetImageFilter -) + itkLevelSetFunction + itkSparseFieldLevelSetImageFilter + itkSparseFieldFourthOrderLevelSetImageFilter + itkSegmentationLevelSetImageFilter + itkShapePriorSegmentationLevelSetImageFilter) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkAnisotropicFourthOrderLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkAnisotropicFourthOrderLevelSetImageFilter.wrap index 1e6f3146a04..21ed6919527 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkAnisotropicFourthOrderLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkAnisotropicFourthOrderLevelSetImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::AnisotropicFourthOrderLevelSetImageFilter" POINTER) - # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +# itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +# itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkBinaryMaskToNarrowBandPointSetFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkBinaryMaskToNarrowBandPointSetFilter.wrap index 44d4184e904..26d79696876 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkBinaryMaskToNarrowBandPointSetFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkBinaryMaskToNarrowBandPointSetFilter.wrap @@ -1,13 +1,15 @@ itk_wrap_include("itkPointSet.h") itk_wrap_include("itkMesh.h") itk_wrap_class("itk::BinaryMaskToNarrowBandPointSetFilter" POINTER) - UNIQUE(mesh_types "${WRAP_ITK_SCALAR};D") - foreach(dim ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_INT}) - foreach(t2 ${mesh_types}) - itk_wrap_template("${ITKM_I${t}${dim}}PS${ITKM_${t2}}${dim}" "${ITKT_I${t}${dim}}, itk::PointSet< ${ITKT_${t2}},${dim} >") - itk_wrap_template("${ITKM_I${t}${dim}}M${ITKM_${t2}}${dim}" "${ITKT_I${t}${dim}}, itk::Mesh< ${ITKT_${t2}},${dim} >") - endforeach() +unique(mesh_types "${WRAP_ITK_SCALAR};D") +foreach(dim ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_INT}) + foreach(t2 ${mesh_types}) + itk_wrap_template("${ITKM_I${t}${dim}}PS${ITKM_${t2}}${dim}" + "${ITKT_I${t}${dim}}, itk::PointSet< ${ITKT_${t2}},${dim} >") + itk_wrap_template("${ITKM_I${t}${dim}}M${ITKM_${t2}}${dim}" + "${ITKT_I${t}${dim}}, itk::Mesh< ${ITKT_${t2}},${dim} >") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkCannySegmentationLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkCannySegmentationLevelSetImageFilter.wrap index c71121a4083..d12fb2d3fe7 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkCannySegmentationLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkCannySegmentationLevelSetImageFilter.wrap @@ -1,7 +1,8 @@ itk_wrap_class("itk::CannySegmentationLevelSetImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkCollidingFrontsImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkCollidingFrontsImageFilter.wrap index f6f26f9d757..398fb2c8617 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkCollidingFrontsImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkCollidingFrontsImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::CollidingFrontsImageFilter" POINTER) - # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +# itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +# itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkCurvesLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkCurvesLevelSetImageFilter.wrap index 95b69c6dbb4..26cd9337721 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkCurvesLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkCurvesLevelSetImageFilter.wrap @@ -1,8 +1,9 @@ itk_wrap_class("itk::CurvesLevelSetImageFilter" POINTER) - itk_wrap_filter_dims(dims 2+) - foreach(d ${dims}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") - endforeach() +itk_wrap_filter_dims(dims 2+) +foreach(d ${dims}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkGeodesicActiveContourLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkGeodesicActiveContourLevelSetImageFilter.wrap index 6a790292155..b945ad70827 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkGeodesicActiveContourLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkGeodesicActiveContourLevelSetImageFilter.wrap @@ -1,12 +1,13 @@ itk_wrap_class("itk::GeodesicActiveContourLevelSetImageFilter" POINTER) - # apply a filter to the dimensions... the code will not compile for dim<=1 - itk_wrap_filter_dims(ds 2+) +# apply a filter to the dimensions... the code will not compile for dim<=1 +itk_wrap_filter_dims(ds 2+) - foreach(d ${ds}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") - endforeach() +foreach(d ${ds}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkGeodesicActiveContourShapePriorLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkGeodesicActiveContourShapePriorLevelSetImageFilter.wrap index a221920b835..a6ccb3d7ade 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkGeodesicActiveContourShapePriorLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkGeodesicActiveContourShapePriorLevelSetImageFilter.wrap @@ -1,7 +1,8 @@ itk_wrap_class("itk::GeodesicActiveContourShapePriorLevelSetImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkIsotropicFourthOrderLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkIsotropicFourthOrderLevelSetImageFilter.wrap index bf50efd4924..f4347fc88e8 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkIsotropicFourthOrderLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkIsotropicFourthOrderLevelSetImageFilter.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::IsotropicFourthOrderLevelSetImageFilter" POINTER) - # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +# itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +# itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkLaplacianSegmentationLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkLaplacianSegmentationLevelSetImageFilter.wrap index 97b6da5f1c3..0def998aaee 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkLaplacianSegmentationLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkLaplacianSegmentationLevelSetImageFilter.wrap @@ -1,7 +1,8 @@ itk_wrap_class("itk::LaplacianSegmentationLevelSetImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkLevelSetFunction.wrap b/Modules/Segmentation/LevelSets/wrapping/itkLevelSetFunction.wrap index 1afd2aaae46..9180705123d 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkLevelSetFunction.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkLevelSetFunction.wrap @@ -1,5 +1,5 @@ itk_wrap_class("itk::LevelSetFunction" POINTER_WITH_EXPLICIT_SPECIALIZATION) - # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 1) - # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 1) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 1) +# itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 1) +# itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 1) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 1) itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkNarrowBandCurvesLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkNarrowBandCurvesLevelSetImageFilter.wrap index 54fbc608419..388df049bd8 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkNarrowBandCurvesLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkNarrowBandCurvesLevelSetImageFilter.wrap @@ -1,9 +1,10 @@ itk_wrap_class("itk::NarrowBandCurvesLevelSetImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkNarrowBandLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkNarrowBandLevelSetImageFilter.wrap index 223ca4e4a87..127abac9560 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkNarrowBandLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkNarrowBandLevelSetImageFilter.wrap @@ -1,9 +1,10 @@ itk_wrap_class("itk::NarrowBandLevelSetImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkNarrowBandThresholdSegmentationLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkNarrowBandThresholdSegmentationLevelSetImageFilter.wrap index 3dc35dad53d..699c8985cb2 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkNarrowBandThresholdSegmentationLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkNarrowBandThresholdSegmentationLevelSetImageFilter.wrap @@ -1,11 +1,12 @@ itk_wrap_class("itk::NarrowBandThresholdSegmentationLevelSetImageFilter" POINTER) - # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - # itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +# itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +# itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +# itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkParallelSparseFieldLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkParallelSparseFieldLevelSetImageFilter.wrap index da551b2cdaa..8428f43edc8 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkParallelSparseFieldLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkParallelSparseFieldLevelSetImageFilter.wrap @@ -1,21 +1,19 @@ itk_wrap_include("itkIndex.h") itk_wrap_class("itk::ParallelSparseFieldLevelSetImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() - set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_class("itk::ParallelSparseFieldLevelSetNode") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("I${d}" "itk::Index< ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("I${d}" "itk::Index< ${d} >") +endforeach() itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS ON) - itk_wrap_class("itk::SparseFieldLayer" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("PSFLSNI${d}" "itk::ParallelSparseFieldLevelSetNode< itk::Index< ${d} > >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("PSFLSNI${d}" "itk::ParallelSparseFieldLevelSetNode< itk::Index< ${d} > >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkReinitializeLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkReinitializeLevelSetImageFilter.wrap index a219f8cdc85..0ad0a2a09c0 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkReinitializeLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkReinitializeLevelSetImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ReinitializeLevelSetImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 1) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 1) itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkSegmentationLevelSetFunction.wrap b/Modules/Segmentation/LevelSets/wrapping/itkSegmentationLevelSetFunction.wrap index afb94c36080..23092489253 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkSegmentationLevelSetFunction.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkSegmentationLevelSetFunction.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::SegmentationLevelSetFunction" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkSegmentationLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkSegmentationLevelSetImageFilter.wrap index ec8fe7695a5..d4a99bed0fb 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkSegmentationLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkSegmentationLevelSetImageFilter.wrap @@ -2,20 +2,18 @@ itk_wrap_include("itkShapeDetectionLevelSetImageFilter.h") itk_wrap_class("itk::SegmentationLevelSetImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template( - "${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" - "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") - set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions - foreach(t2 ${WRAP_ITK_VECTOR_REAL}) - itk_wrap_template( - "${ITKM_I${t}${d}}${ITKM_I${t2}${vector_dim}${d}}${ITKM_${t}}" - "${ITKT_I${t}${d}},${ITKT_I${t2}${vector_dim}${d}},${ITKT_${t}}") - endforeach() + set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions + foreach(t2 ${WRAP_ITK_VECTOR_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t2}${vector_dim}${d}}${ITKM_${t}}" + "${ITKT_I${t}${d}},${ITKT_I${t2}${vector_dim}${d}},${ITKT_${t}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkShapeDetectionLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkShapeDetectionLevelSetImageFilter.wrap index 0262e4f5ab9..3f5fdef3255 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkShapeDetectionLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkShapeDetectionLevelSetImageFilter.wrap @@ -1,7 +1,8 @@ itk_wrap_class("itk::ShapeDetectionLevelSetImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkShapePriorMAPCostFunction.wrap b/Modules/Segmentation/LevelSets/wrapping/itkShapePriorMAPCostFunction.wrap index 3b36df3bd38..ebc8f3880e7 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkShapePriorMAPCostFunction.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkShapePriorMAPCostFunction.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::ShapePriorMAPCostFunction" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_${t}}" "${ITKT_I${t}${d}},${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_${t}}" "${ITKT_I${t}${d}},${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkShapePriorMAPCostFunctionBase.wrap b/Modules/Segmentation/LevelSets/wrapping/itkShapePriorMAPCostFunctionBase.wrap index 42526d8ee3e..8bdd26d7061 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkShapePriorMAPCostFunctionBase.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkShapePriorMAPCostFunctionBase.wrap @@ -1,7 +1,7 @@ itk_wrap_class("itk::ShapePriorMAPCostFunctionBase" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_${t}}" "${ITKT_I${t}${d}},${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_${t}}" "${ITKT_I${t}${d}},${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkShapePriorSegmentationLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkShapePriorSegmentationLevelSetImageFilter.wrap index b3ff629018c..5528ffd88b7 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkShapePriorSegmentationLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkShapePriorSegmentationLevelSetImageFilter.wrap @@ -1,7 +1,8 @@ itk_wrap_class("itk::ShapePriorSegmentationLevelSetImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkSparseFieldFourthOrderLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkSparseFieldFourthOrderLevelSetImageFilter.wrap index 4f0ab5cac0a..a3da50bc64b 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkSparseFieldFourthOrderLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkSparseFieldFourthOrderLevelSetImageFilter.wrap @@ -3,21 +3,21 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkSparseFieldFourthOrderLevelSetImageFilter.h") itk_wrap_class("itk::NormalBandNode") - itk_wrap_image_filter("${WRAP_ITK_REAL}" 1) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 1) itk_end_wrap_class() itk_wrap_class("itk::Image" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("NBN${ITKM_I${t}${d}}${d}" "itk::NormalBandNode< ${ITKT_I${t}${d}} >*, ${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("NBN${ITKM_I${t}${d}}${d}" "itk::NormalBandNode< ${ITKT_I${t}${d}} >*, ${d}") endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::SparseFieldFourthOrderLevelSetImageFilter" POINTER) - # itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) - # itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +# itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 2) +# itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() # itk::LevelSetFunctionWithRefitTerm< itk::Image< float, 2 >, itk::SparseImage< itk::NormalBandNode< itk::Image< float, 2 > >, 2 > > @@ -25,25 +25,26 @@ itk_end_wrap_class() # itk::SparseFieldLayer< itk::NormalBandNode< itk::Image< float, 2 > > > itk_wrap_class("itk::SparseImage" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("NBN${ITKM_I${t}${d}}${d}" "itk::NormalBandNode< ${ITKT_I${t}${d}} >, ${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("NBN${ITKM_I${t}${d}}${d}" "itk::NormalBandNode< ${ITKT_I${t}${d}} >, ${d}") endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::LevelSetFunctionWithRefitTerm" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}SINBN${ITKM_I${t}${d}}${d}" "${ITKT_I${t}${d}}, itk::SparseImage< itk::NormalBandNode< ${ITKT_I${t}${d}} >, ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}SINBN${ITKM_I${t}${d}}${d}" + "${ITKT_I${t}${d}}, itk::SparseImage< itk::NormalBandNode< ${ITKT_I${t}${d}} >, ${d} >") endforeach() +endforeach() itk_end_wrap_class() itk_wrap_class("itk::SparseFieldLayer" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("NBN${ITKM_I${t}${d}}" "itk::NormalBandNode< ${ITKT_I${t}${d}} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("NBN${ITKM_I${t}${d}}" "itk::NormalBandNode< ${ITKT_I${t}${d}} >") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkSparseFieldLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkSparseFieldLevelSetImageFilter.wrap index 3f283b9797f..0f197e42f5c 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkSparseFieldLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkSparseFieldLevelSetImageFilter.wrap @@ -1,19 +1,19 @@ itk_wrap_include("itkIndex.h") itk_wrap_class("itk::SparseFieldLevelSetImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_class("itk::SparseFieldLevelSetNode") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("I${d}" "itk::Index< ${d} >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("I${d}" "itk::Index< ${d} >") +endforeach() itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS ON) itk_wrap_class("itk::SparseFieldLayer" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("SFLSNI${d}" "itk::SparseFieldLevelSetNode< itk::Index< ${d} > >") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("SFLSNI${d}" "itk::SparseFieldLevelSetNode< itk::Index< ${d} > >") +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkThresholdSegmentationLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkThresholdSegmentationLevelSetImageFilter.wrap index 964fe4c7c6f..a3dd358ed63 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkThresholdSegmentationLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkThresholdSegmentationLevelSetImageFilter.wrap @@ -1,7 +1,8 @@ itk_wrap_class("itk::ThresholdSegmentationLevelSetImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_${t}}" + "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_${t}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkUnsharpMaskLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkUnsharpMaskLevelSetImageFilter.wrap index 2ab958505a4..9c71f166461 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkUnsharpMaskLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkUnsharpMaskLevelSetImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::UnsharpMaskLevelSetImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) +itk_wrap_image_filter("${WRAP_ITK_REAL}" 2) itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/itkVectorThresholdSegmentationLevelSetImageFilter.wrap b/Modules/Segmentation/LevelSets/wrapping/itkVectorThresholdSegmentationLevelSetImageFilter.wrap index 76b1905aad5..e4f718d9288 100644 --- a/Modules/Segmentation/LevelSets/wrapping/itkVectorThresholdSegmentationLevelSetImageFilter.wrap +++ b/Modules/Segmentation/LevelSets/wrapping/itkVectorThresholdSegmentationLevelSetImageFilter.wrap @@ -2,16 +2,15 @@ itk_wrap_include("itkShapeDetectionLevelSetImageFilter.h") itk_wrap_class("itk::VectorThresholdSegmentationLevelSetImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) +foreach(d ${ITK_WRAP_IMAGE_DIMS}) - set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions - foreach(t ${WRAP_ITK_REAL}) - foreach(t2 ${WRAP_ITK_VECTOR_REAL}) - itk_wrap_template( - "${ITKM_I${t}${d}}${ITKM_I${t2}${vector_dim}${d}}${ITKM_${t}}" - "${ITKT_I${t}${d}},${ITKT_I${t2}${vector_dim}${d}},${ITKT_${t}}") - endforeach() + set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions + foreach(t ${WRAP_ITK_REAL}) + foreach(t2 ${WRAP_ITK_VECTOR_REAL}) + itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t2}${vector_dim}${d}}${ITKM_${t}}" + "${ITKT_I${t}${d}},${ITKT_I${t2}${vector_dim}${d}},${ITKT_${t}}") endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/LevelSets/wrapping/test/CMakeLists.txt b/Modules/Segmentation/LevelSets/wrapping/test/CMakeLists.txt index aafd67a8e46..0ec9181661b 100644 --- a/Modules/Segmentation/LevelSets/wrapping/test/CMakeLists.txt +++ b/Modules/Segmentation/LevelSets/wrapping/test/CMakeLists.txt @@ -1,54 +1,94 @@ if(ITK_WRAP_PYTHON) set(test_input_dir ${itk-module_SOURCE_DIR}/test/Input) - itk_python_add_test(NAME PythonLazyLoadingImage COMMAND LazyLoadingImageTest.py) + itk_python_add_test( + NAME + PythonLazyLoadingImage + COMMAND + LazyLoadingImageTest.py) - list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) + list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) if(ITK_WRAP_float AND wrap_2_index GREATER -1) - # TODO: reenable the geodesic test once we get why the result is not the - # same than with c++ - # keep just one to be sure it run, but don't compare the images + # TODO: reenable the geodesic test once we get why the result is not the + # same than with c++ + # keep just one to be sure it run, but don't compare the images - itk_python_add_test(NAME PythonGeodesicActiveContourLeftVentricleTest - # --compare GeodesicActiveContourLeftVentricleTest.png - # DATA{${WrapITK_SOURCE_DIR}/images/GeodesicActiveContourLeftVentricleTest.png} - COMMAND GeodesicActiveContourImageFilterTest.py - DATA{${test_input_dir}/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/GeodesicActiveContourLeftVentricleTest.png - 81 114 5.0 1.0 -0.5 3.0 2.0 - ) + itk_python_add_test( + NAME + PythonGeodesicActiveContourLeftVentricleTest + # --compare GeodesicActiveContourLeftVentricleTest.png + # DATA{${WrapITK_SOURCE_DIR}/images/GeodesicActiveContourLeftVentricleTest.png} + COMMAND + GeodesicActiveContourImageFilterTest.py + DATA{${test_input_dir}/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/GeodesicActiveContourLeftVentricleTest.png + 81 + 114 + 5.0 + 1.0 + -0.5 + 3.0 + 2.0) - itk_python_add_test(NAME PythonThresholdSegmentationLevelSetVentricleTest + itk_python_add_test( + NAME + PythonThresholdSegmentationLevelSetVentricleTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonThresholdSegmentationLevelSetVentricleTest.png - DATA{Baseline/PythonThresholdSegmentationLevelSetVentricleTest.png} - COMMAND ThresholdSegmentationLevelSetImageFilterTest.py - DATA{${test_input_dir}/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/PythonThresholdSegmentationLevelSetVentricleTest.png - 81 112 5 210 250 - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonThresholdSegmentationLevelSetVentricleTest.png + DATA{Baseline/PythonThresholdSegmentationLevelSetVentricleTest.png} + COMMAND + ThresholdSegmentationLevelSetImageFilterTest.py + DATA{${test_input_dir}/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/PythonThresholdSegmentationLevelSetVentricleTest.png + 81 + 112 + 5 + 210 + 250) - itk_python_add_test(NAME PythonThresholdSegmentationLevelSetWhiteMatterTest + itk_python_add_test( + NAME + PythonThresholdSegmentationLevelSetWhiteMatterTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/ThresholdSegmentationLevelSetWhiteMatterTest.png - DATA{Baseline/PythonThresholdSegmentationLevelSetWhiteMatterTest.png} - COMMAND ThresholdSegmentationLevelSetImageFilterTest.py - DATA{${test_input_dir}/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/ThresholdSegmentationLevelSetWhiteMatterTest.png - 60 116 5 150 180 - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/ThresholdSegmentationLevelSetWhiteMatterTest.png + DATA{Baseline/PythonThresholdSegmentationLevelSetWhiteMatterTest.png} + COMMAND + ThresholdSegmentationLevelSetImageFilterTest.py + DATA{${test_input_dir}/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/ThresholdSegmentationLevelSetWhiteMatterTest.png + 60 + 116 + 5 + 150 + 180) - itk_python_add_test(NAME PythonThresholdSegmentationLevelSetGrayMatterTest + itk_python_add_test( + NAME + PythonThresholdSegmentationLevelSetGrayMatterTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonThresholdSegmentationLevelSetGrayMatterTest.png - DATA{Baseline/PythonThresholdSegmentationLevelSetGrayMatterTest.png} - COMMAND ThresholdSegmentationLevelSetImageFilterTest.py - DATA{${WrapITK_SOURCE_DIR}/images/BrainProtonDensitySlice.png} - ${ITK_TEST_OUTPUT_DIR}/PythonThresholdSegmentationLevelSetGrayMatterTest.png - 107 69 5 180 210 - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonThresholdSegmentationLevelSetGrayMatterTest.png + DATA{Baseline/PythonThresholdSegmentationLevelSetGrayMatterTest.png} + COMMAND + ThresholdSegmentationLevelSetImageFilterTest.py + DATA{${WrapITK_SOURCE_DIR}/images/BrainProtonDensitySlice.png} + ${ITK_TEST_OUTPUT_DIR}/PythonThresholdSegmentationLevelSetGrayMatterTest.png + 107 + 69 + 5 + 180 + 210) - itk_python_expression_add_test(NAME itkBinaryMaskToNarrowBandPointSetFilterPythonTest - EXPRESSION "filt = itk.BinaryMaskToNarrowBandPointSetFilter.New()") + itk_python_expression_add_test( + NAME + itkBinaryMaskToNarrowBandPointSetFilterPythonTest + EXPRESSION + "filt = itk.BinaryMaskToNarrowBandPointSetFilter.New()") endif() endif() diff --git a/Modules/Segmentation/LevelSetsv4/itk-module.cmake b/Modules/Segmentation/LevelSetsv4/itk-module.cmake index e1e02ae39ba..4ed3aeec07b 100644 --- a/Modules/Segmentation/LevelSetsv4/itk-module.cmake +++ b/Modules/Segmentation/LevelSetsv4/itk-module.cmake @@ -1,4 +1,5 @@ -set(DOCUMENTATION "This module contains classes related to level-set +set(DOCUMENTATION + "This module contains classes related to level-set segmentation (new level-set framework from the ITKv4 effort). In level-set segmentation, the segmentation contour is modeled as the zero level set of a higher dimensional level-set function. The level-set function evolves according @@ -7,30 +8,30 @@ of the level-set function. The segmentation evolves from an initial value for the segmenting contour.") if(LevelSetsv4_VIZ) - itk_module(ITKLevelSetsv4 + itk_module( + ITKLevelSetsv4 DEPENDS - ITKCommon - ITKLabelMap - ITKDistanceMap - ITKImageGradient - ITKVtkGlue + ITKCommon + ITKLabelMap + ITKDistanceMap + ITKImageGradient + ITKVtkGlue TEST_DEPENDS - ITKTestKernel - ITKFastMarching + ITKTestKernel + ITKFastMarching DESCRIPTION - "${DOCUMENTATION}" - ) + "${DOCUMENTATION}") else() - itk_module(ITKLevelSetsv4 + itk_module( + ITKLevelSetsv4 DEPENDS - ITKCommon - ITKLabelMap - ITKDistanceMap - ITKImageGradient + ITKCommon + ITKLabelMap + ITKDistanceMap + ITKImageGradient TEST_DEPENDS - ITKTestKernel - ITKFastMarching + ITKTestKernel + ITKFastMarching DESCRIPTION - "${DOCUMENTATION}" - ) + "${DOCUMENTATION}") endif() diff --git a/Modules/Segmentation/LevelSetsv4/test/CMakeLists.txt b/Modules/Segmentation/LevelSetsv4/test/CMakeLists.txt index 19b2d96b41a..932a8d07c8e 100644 --- a/Modules/Segmentation/LevelSetsv4/test/CMakeLists.txt +++ b/Modules/Segmentation/LevelSetsv4/test/CMakeLists.txt @@ -1,252 +1,400 @@ itk_module_test() set(ITKLevelSetsv4Tests -itkLevelSetDenseImageTest.cxx -itkWhitakerSparseLevelSetImageTest.cxx -itkShiSparseLevelSetImageTest.cxx -itkMalcolmSparseLevelSetImageTest.cxx -# binary image to sparse level set adaptors -itkBinaryImageToWhitakerSparseLevelSetAdaptorTest.cxx -itkBinaryImageToMalcolmSparseLevelSetAdaptorTest.cxx -itkBinaryImageToShiSparseLevelSetAdaptorTest.cxx -itkLevelSetEquationChanAndVeseExternalTermTest.cxx -itkLevelSetEquationChanAndVeseInternalTermTest.cxx -itkLevelSetEquationCurvatureTermTest.cxx -itkLevelSetEquationLaplacianTermTest.cxx -itkLevelSetEquationPropagationTermTest.cxx -itkLevelSetEquationBinaryMaskTermTest.cxx -itkLevelSetEquationOverlapPenaltyTermTest.cxx -itkLevelSetEquationRegionTermTest.cxx -itkLevelSetEquationTermBaseTest.cxx -itkLevelSetEquationTermContainerTest.cxx -# domain partition classes -itkLevelSetDomainPartitionBaseTest.cxx -itkLevelSetDomainPartitionImageTest.cxx -itkLevelSetDomainPartitionImageWithKdTreeTest.cxx -itkLevelSetDomainMapImageFilterTest.cxx -# level set container -itkDenseLevelSetContainerTest.cxx -itkSparseLevelSetContainerTest.cxx -# single level set -itkSingleLevelSetDenseImage2DTest.cxx -itkSingleLevelSetDenseAdvectionImage2DTest.cxx -itkSingleLevelSetWhitakerImage2DTest.cxx -itkSingleLevelSetMalcolmImage2DTest.cxx -itkSingleLevelSetShiImage2DTest.cxx -itkSingleLevelSetWhitakerImage2DWithCurvatureTest.cxx -itkSingleLevelSetWhitakerImage2DWithLaplacianTest.cxx -itkSingleLevelSetWhitakerImage2DWithPropagationTest.cxx -# two level set -itkTwoLevelSetDenseImage2DTest.cxx -itkTwoLevelSetWhitakerImage2DTest.cxx -itkTwoLevelSetMalcolmImage2DTest.cxx -itkTwoLevelSetShiImage2DTest.cxx -# multi level set -itkMultiLevelSetDenseImageTest.cxx -itkMultiLevelSetChanAndVeseInternalTermTest.cxx -itkMultiLevelSetEvolutionTest.cxx -itkMultiLevelSetDenseImageSubset2DTest.cxx -itkMultiLevelSetWhitakerImageSubset2DTest.cxx -itkMultiLevelSetShiImageSubset2DTest.cxx -itkMultiLevelSetMalcolmImageSubset2DTest.cxx -# stopping criterion -itkLevelSetEvolutionNumberOfIterationsStoppingCriterionTest.cxx -) + itkLevelSetDenseImageTest.cxx + itkWhitakerSparseLevelSetImageTest.cxx + itkShiSparseLevelSetImageTest.cxx + itkMalcolmSparseLevelSetImageTest.cxx + # binary image to sparse level set adaptors + itkBinaryImageToWhitakerSparseLevelSetAdaptorTest.cxx + itkBinaryImageToMalcolmSparseLevelSetAdaptorTest.cxx + itkBinaryImageToShiSparseLevelSetAdaptorTest.cxx + itkLevelSetEquationChanAndVeseExternalTermTest.cxx + itkLevelSetEquationChanAndVeseInternalTermTest.cxx + itkLevelSetEquationCurvatureTermTest.cxx + itkLevelSetEquationLaplacianTermTest.cxx + itkLevelSetEquationPropagationTermTest.cxx + itkLevelSetEquationBinaryMaskTermTest.cxx + itkLevelSetEquationOverlapPenaltyTermTest.cxx + itkLevelSetEquationRegionTermTest.cxx + itkLevelSetEquationTermBaseTest.cxx + itkLevelSetEquationTermContainerTest.cxx + # domain partition classes + itkLevelSetDomainPartitionBaseTest.cxx + itkLevelSetDomainPartitionImageTest.cxx + itkLevelSetDomainPartitionImageWithKdTreeTest.cxx + itkLevelSetDomainMapImageFilterTest.cxx + # level set container + itkDenseLevelSetContainerTest.cxx + itkSparseLevelSetContainerTest.cxx + # single level set + itkSingleLevelSetDenseImage2DTest.cxx + itkSingleLevelSetDenseAdvectionImage2DTest.cxx + itkSingleLevelSetWhitakerImage2DTest.cxx + itkSingleLevelSetMalcolmImage2DTest.cxx + itkSingleLevelSetShiImage2DTest.cxx + itkSingleLevelSetWhitakerImage2DWithCurvatureTest.cxx + itkSingleLevelSetWhitakerImage2DWithLaplacianTest.cxx + itkSingleLevelSetWhitakerImage2DWithPropagationTest.cxx + # two level set + itkTwoLevelSetDenseImage2DTest.cxx + itkTwoLevelSetWhitakerImage2DTest.cxx + itkTwoLevelSetMalcolmImage2DTest.cxx + itkTwoLevelSetShiImage2DTest.cxx + # multi level set + itkMultiLevelSetDenseImageTest.cxx + itkMultiLevelSetChanAndVeseInternalTermTest.cxx + itkMultiLevelSetEvolutionTest.cxx + itkMultiLevelSetDenseImageSubset2DTest.cxx + itkMultiLevelSetWhitakerImageSubset2DTest.cxx + itkMultiLevelSetShiImageSubset2DTest.cxx + itkMultiLevelSetMalcolmImageSubset2DTest.cxx + # stopping criterion + itkLevelSetEvolutionNumberOfIterationsStoppingCriterionTest.cxx) -CreateTestDriver(ITKLevelSetsv4 "${ITKLevelSetsv4-Test_LIBRARIES}" "${ITKLevelSetsv4Tests}") +createtestdriver(ITKLevelSetsv4 "${ITKLevelSetsv4-Test_LIBRARIES}" "${ITKLevelSetsv4Tests}") -itk_add_test(NAME itkLevelSetsv4EquationBinaryMaskTermTest - COMMAND ITKLevelSetsv4TestDriver itkLevelSetEquationBinaryMaskTermTest) -itk_add_test(NAME itkLevelSetsv4EquationOverlapPenaltyTermTest - COMMAND ITKLevelSetsv4TestDriver itkLevelSetEquationOverlapPenaltyTermTest) -itk_add_test(NAME itkLevelSetsv4DenseImageBaseTest - COMMAND ITKLevelSetsv4TestDriver itkLevelSetDenseImageTest) -itk_add_test(NAME itkWhitakerSparseLevelSetsv4BaseTest - COMMAND ITKLevelSetsv4TestDriver itkWhitakerSparseLevelSetImageTest) -itk_add_test(NAME itkShiSparseLevelSetsv4BaseTest - COMMAND ITKLevelSetsv4TestDriver itkShiSparseLevelSetImageTest) -itk_add_test(NAME itkMalcolmSparseLevelSetsv4BaseTest - COMMAND ITKLevelSetsv4TestDriver itkMalcolmSparseLevelSetImageTest) +itk_add_test( + NAME + itkLevelSetsv4EquationBinaryMaskTermTest + COMMAND + ITKLevelSetsv4TestDriver + itkLevelSetEquationBinaryMaskTermTest) +itk_add_test( + NAME + itkLevelSetsv4EquationOverlapPenaltyTermTest + COMMAND + ITKLevelSetsv4TestDriver + itkLevelSetEquationOverlapPenaltyTermTest) +itk_add_test( + NAME + itkLevelSetsv4DenseImageBaseTest + COMMAND + ITKLevelSetsv4TestDriver + itkLevelSetDenseImageTest) +itk_add_test( + NAME + itkWhitakerSparseLevelSetsv4BaseTest + COMMAND + ITKLevelSetsv4TestDriver + itkWhitakerSparseLevelSetImageTest) +itk_add_test( + NAME + itkShiSparseLevelSetsv4BaseTest + COMMAND + ITKLevelSetsv4TestDriver + itkShiSparseLevelSetImageTest) +itk_add_test( + NAME + itkMalcolmSparseLevelSetsv4BaseTest + COMMAND + ITKLevelSetsv4TestDriver + itkMalcolmSparseLevelSetImageTest) # binary image to sparse level set adaptors -itk_add_test(NAME itkBinaryImageToWhitakerSparseLevelSetsv4AdaptorTest - COMMAND ITKLevelSetsv4TestDriver - itkBinaryImageToWhitakerSparseLevelSetAdaptorTest - DATA{${ITK_DATA_ROOT}/Input/circle.png} - ${ITK_TEST_OUTPUT_DIR}/output_binary_whitaker_adaptor.mha - ${ITK_TEST_OUTPUT_DIR}/status_binary_whitaker_adaptor.mha - ) -itk_add_test(NAME itkBinaryImageToMalcolmSparseLevelSetsv4AdaptorTest - COMMAND ITKLevelSetsv4TestDriver - itkBinaryImageToMalcolmSparseLevelSetAdaptorTest - DATA{${ITK_DATA_ROOT}/Input/circle.png} - ${ITK_TEST_OUTPUT_DIR}/output_binary_malcolm_adaptor.mha - ) -itk_add_test(NAME itkBinaryImageToShiSparseLevelSetsv4AdaptorTest - COMMAND ITKLevelSetsv4TestDriver - itkBinaryImageToShiSparseLevelSetAdaptorTest - DATA{${ITK_DATA_ROOT}/Input/circle.png} - ${ITK_TEST_OUTPUT_DIR}/output_binary_shi_adaptor.mha - ) +itk_add_test( + NAME + itkBinaryImageToWhitakerSparseLevelSetsv4AdaptorTest + COMMAND + ITKLevelSetsv4TestDriver + itkBinaryImageToWhitakerSparseLevelSetAdaptorTest + DATA{${ITK_DATA_ROOT}/Input/circle.png} + ${ITK_TEST_OUTPUT_DIR}/output_binary_whitaker_adaptor.mha + ${ITK_TEST_OUTPUT_DIR}/status_binary_whitaker_adaptor.mha) +itk_add_test( + NAME + itkBinaryImageToMalcolmSparseLevelSetsv4AdaptorTest + COMMAND + ITKLevelSetsv4TestDriver + itkBinaryImageToMalcolmSparseLevelSetAdaptorTest + DATA{${ITK_DATA_ROOT}/Input/circle.png} + ${ITK_TEST_OUTPUT_DIR}/output_binary_malcolm_adaptor.mha) +itk_add_test( + NAME + itkBinaryImageToShiSparseLevelSetsv4AdaptorTest + COMMAND + ITKLevelSetsv4TestDriver + itkBinaryImageToShiSparseLevelSetAdaptorTest + DATA{${ITK_DATA_ROOT}/Input/circle.png} + ${ITK_TEST_OUTPUT_DIR}/output_binary_shi_adaptor.mha) # domain partition classes -itk_add_test(NAME itkLevelSetsv4DomainPartitionBaseTest - COMMAND ITKLevelSetsv4TestDriver itkLevelSetDomainPartitionBaseTest) -itk_add_test(NAME itkLevelSetsv4DomainPartitionImageTest - COMMAND ITKLevelSetsv4TestDriver itkLevelSetDomainPartitionImageTest) -itk_add_test(NAME itkLevelSetsv4DomainPartitionImageWithKdTreeTest - COMMAND ITKLevelSetsv4TestDriver itkLevelSetDomainPartitionImageWithKdTreeTest) -itk_add_test(NAME itkLevelSetsv4DomainMapImageFilterTest - COMMAND ITKLevelSetsv4TestDriver itkLevelSetDomainMapImageFilterTest) +itk_add_test( + NAME + itkLevelSetsv4DomainPartitionBaseTest + COMMAND + ITKLevelSetsv4TestDriver + itkLevelSetDomainPartitionBaseTest) +itk_add_test( + NAME + itkLevelSetsv4DomainPartitionImageTest + COMMAND + ITKLevelSetsv4TestDriver + itkLevelSetDomainPartitionImageTest) +itk_add_test( + NAME + itkLevelSetsv4DomainPartitionImageWithKdTreeTest + COMMAND + ITKLevelSetsv4TestDriver + itkLevelSetDomainPartitionImageWithKdTreeTest) +itk_add_test( + NAME + itkLevelSetsv4DomainMapImageFilterTest + COMMAND + ITKLevelSetsv4TestDriver + itkLevelSetDomainMapImageFilterTest) # level set container -itk_add_test(NAME itkLevelSetsv4SparseLevelSetContainerTest - COMMAND ITKLevelSetsv4TestDriver itkSparseLevelSetContainerTest) -itk_add_test(NAME itkLevelSetsv4DenseLevelSetContainerTest - COMMAND ITKLevelSetsv4TestDriver itkDenseLevelSetContainerTest) +itk_add_test( + NAME + itkLevelSetsv4SparseLevelSetContainerTest + COMMAND + ITKLevelSetsv4TestDriver + itkSparseLevelSetContainerTest) +itk_add_test( + NAME + itkLevelSetsv4DenseLevelSetContainerTest + COMMAND + ITKLevelSetsv4TestDriver + itkDenseLevelSetContainerTest) # single level set -itk_add_test(NAME itkSingleLevelSetsv4DenseImage2DTest - COMMAND ITKLevelSetsv4TestDriver - --compare DATA{Baseline/solution_whiteSpot_output_dense_single.mha} - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_single.mha - itkSingleLevelSetDenseImage2DTest - DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} 25 25 25 - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_single.mha -) - +itk_add_test( + NAME + itkSingleLevelSetsv4DenseImage2DTest + COMMAND + ITKLevelSetsv4TestDriver + --compare + DATA{Baseline/solution_whiteSpot_output_dense_single.mha} + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_single.mha + itkSingleLevelSetDenseImage2DTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + 25 + 25 + 25 + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_single.mha) -itk_add_test(NAME itkSingleLevelSetsv4DenseAdvectionImage2DTest_5 - COMMAND ITKLevelSetsv4TestDriver - # --compare DATA{Baseline/solution_whiteSpot_output_dense_single_5.mha} - # ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_advection_single_5.mha - itkSingleLevelSetDenseAdvectionImage2DTest - DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} 25 25 25 - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_advection_single_5.mha - 5 -) +itk_add_test( + NAME + itkSingleLevelSetsv4DenseAdvectionImage2DTest_5 + COMMAND + ITKLevelSetsv4TestDriver + # --compare DATA{Baseline/solution_whiteSpot_output_dense_single_5.mha} + # ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_advection_single_5.mha + itkSingleLevelSetDenseAdvectionImage2DTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + 25 + 25 + 25 + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_advection_single_5.mha + 5) -itk_add_test(NAME itkSingleLevelSetsv4WhitakerImage2DTest - COMMAND ITKLevelSetsv4TestDriver - --compare DATA{Baseline/solution_whiteSpot_output_sparse_single.mha} - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_single.mha - itkSingleLevelSetWhitakerImage2DTest - DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} - 50 - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_single.mha -) -itk_add_test(NAME itkSingleLevelSetsv4WhitakerImage2DTestThreads - COMMAND ITKLevelSetsv4TestDriver - --with-threads 16 - --compare DATA{Baseline/solution_whiteSpot_output_sparse_single.mha} - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_single_threads.mha - itkSingleLevelSetWhitakerImage2DTest - DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} - 50 - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_single_threads.mha -) +itk_add_test( + NAME + itkSingleLevelSetsv4WhitakerImage2DTest + COMMAND + ITKLevelSetsv4TestDriver + --compare + DATA{Baseline/solution_whiteSpot_output_sparse_single.mha} + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_single.mha + itkSingleLevelSetWhitakerImage2DTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + 50 + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_single.mha) +itk_add_test( + NAME + itkSingleLevelSetsv4WhitakerImage2DTestThreads + COMMAND + ITKLevelSetsv4TestDriver + --with-threads + 16 + --compare + DATA{Baseline/solution_whiteSpot_output_sparse_single.mha} + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_single_threads.mha + itkSingleLevelSetWhitakerImage2DTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + 50 + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_single_threads.mha) -itk_add_test(NAME itkSingleLevelSetsv4MalcolmImage2DTest - COMMAND ITKLevelSetsv4TestDriver - --compare DATA{Baseline/solution_whiteSpot_output_malcolm_single.mha} - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_malcolm_single.mha - itkSingleLevelSetMalcolmImage2DTest - DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} - 15 - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_malcolm_single.mha - ) -itk_add_test(NAME itkSingleLevelSetsv4ShiImage2DTest - COMMAND ITKLevelSetsv4TestDriver - --compare DATA{Baseline/solution_whiteSpot_output_shi_single.mha} - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_shi_single.mha - itkSingleLevelSetShiImage2DTest - DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} - 15 - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_shi_single.mha -) -itk_add_test(NAME itkSingleLevelSetsv4WhitakerImage2DWithCurvatureTest - COMMAND ITKLevelSetsv4TestDriver - itkSingleLevelSetWhitakerImage2DWithCurvatureTest - DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} -) -itk_add_test(NAME itkSingleLevelSetsv4WhitakerImage2DWithLaplacianTest - COMMAND ITKLevelSetsv4TestDriver - itkSingleLevelSetWhitakerImage2DWithLaplacianTest - DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} -) -itk_add_test(NAME itkSingleLevelSetsv4WhitakerImage2DWithPropagationTest - COMMAND ITKLevelSetsv4TestDriver - itkSingleLevelSetWhitakerImage2DWithPropagationTest - DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} -) +itk_add_test( + NAME + itkSingleLevelSetsv4MalcolmImage2DTest + COMMAND + ITKLevelSetsv4TestDriver + --compare + DATA{Baseline/solution_whiteSpot_output_malcolm_single.mha} + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_malcolm_single.mha + itkSingleLevelSetMalcolmImage2DTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + 15 + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_malcolm_single.mha) +itk_add_test( + NAME + itkSingleLevelSetsv4ShiImage2DTest + COMMAND + ITKLevelSetsv4TestDriver + --compare + DATA{Baseline/solution_whiteSpot_output_shi_single.mha} + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_shi_single.mha + itkSingleLevelSetShiImage2DTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + 15 + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_shi_single.mha) +itk_add_test( + NAME + itkSingleLevelSetsv4WhitakerImage2DWithCurvatureTest + COMMAND + ITKLevelSetsv4TestDriver + itkSingleLevelSetWhitakerImage2DWithCurvatureTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}) +itk_add_test( + NAME + itkSingleLevelSetsv4WhitakerImage2DWithLaplacianTest + COMMAND + ITKLevelSetsv4TestDriver + itkSingleLevelSetWhitakerImage2DWithLaplacianTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}) +itk_add_test( + NAME + itkSingleLevelSetsv4WhitakerImage2DWithPropagationTest + COMMAND + ITKLevelSetsv4TestDriver + itkSingleLevelSetWhitakerImage2DWithPropagationTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}) -itk_add_test(NAME itkLevelSetsv4EquationCurvatureTermTest - COMMAND ITKLevelSetsv4TestDriver itkLevelSetEquationCurvatureTermTest - DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}) +itk_add_test( + NAME + itkLevelSetsv4EquationCurvatureTermTest + COMMAND + ITKLevelSetsv4TestDriver + itkLevelSetEquationCurvatureTermTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}) -itk_add_test(NAME itkLevelSetsv4EquationPropagationTermTest - COMMAND ITKLevelSetsv4TestDriver itkLevelSetEquationPropagationTermTest - DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}) +itk_add_test( + NAME + itkLevelSetsv4EquationPropagationTermTest + COMMAND + ITKLevelSetsv4TestDriver + itkLevelSetEquationPropagationTermTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}) -itk_add_test(NAME itkLevelSetsv4EquationLaplacianTermTest - COMMAND ITKLevelSetsv4TestDriver itkLevelSetEquationLaplacianTermTest - DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}) +itk_add_test( + NAME + itkLevelSetsv4EquationLaplacianTermTest + COMMAND + ITKLevelSetsv4TestDriver + itkLevelSetEquationLaplacianTermTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}) # two level sets -itk_add_test(NAME itkTwoLevelSetsv4DenseImage2DTest - COMMAND ITKLevelSetsv4TestDriver - itkTwoLevelSetDenseImage2DTest - DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} 25 25 10 - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_two.mha -) +itk_add_test( + NAME + itkTwoLevelSetsv4DenseImage2DTest + COMMAND + ITKLevelSetsv4TestDriver + itkTwoLevelSetDenseImage2DTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + 25 + 25 + 10 + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_two.mha) -itk_add_test(NAME itkTwoLevelSetsv4WhitakerImage2DTest - COMMAND ITKLevelSetsv4TestDriver - --compare DATA{Baseline/solution_whiteSpot_output_sparse_two.mha} - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_two.mha - itkTwoLevelSetWhitakerImage2DTest - DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} - 1 - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_two.mha -) +itk_add_test( + NAME + itkTwoLevelSetsv4WhitakerImage2DTest + COMMAND + ITKLevelSetsv4TestDriver + --compare + DATA{Baseline/solution_whiteSpot_output_sparse_two.mha} + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_two.mha + itkTwoLevelSetWhitakerImage2DTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + 1 + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_two.mha) -itk_add_test(NAME itkTwoLevelSetsv4MalcolmImage2DTest - COMMAND ITKLevelSetsv4TestDriver - --compare DATA{Baseline/solution_whiteSpot_output_malcolm_two.mha} - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_malcolm_two.mha - itkTwoLevelSetMalcolmImage2DTest - DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} - 1 - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_malcolm_two.mha -) +itk_add_test( + NAME + itkTwoLevelSetsv4MalcolmImage2DTest + COMMAND + ITKLevelSetsv4TestDriver + --compare + DATA{Baseline/solution_whiteSpot_output_malcolm_two.mha} + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_malcolm_two.mha + itkTwoLevelSetMalcolmImage2DTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + 1 + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_malcolm_two.mha) -itk_add_test(NAME itkTwoLevelSetsv4ShiImage2DTest - COMMAND ITKLevelSetsv4TestDriver - --compare DATA{Baseline/solution_whiteSpot_output_shi_two.mha} - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_shi_two.mha - itkTwoLevelSetShiImage2DTest - DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} - 1 - ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_shi_two.mha -) +itk_add_test( + NAME + itkTwoLevelSetsv4ShiImage2DTest + COMMAND + ITKLevelSetsv4TestDriver + --compare + DATA{Baseline/solution_whiteSpot_output_shi_two.mha} + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_shi_two.mha + itkTwoLevelSetShiImage2DTest + DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} + 1 + ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_shi_two.mha) -itk_add_test(NAME itkLevelSetsv4EvolutionNumberOfIterationsStoppingCriterionTest - COMMAND ITKLevelSetsv4TestDriver itkLevelSetEvolutionNumberOfIterationsStoppingCriterionTest) -itk_add_test(NAME itkMultiLevelSetsv4DenseImageTest - COMMAND ITKLevelSetsv4TestDriver itkMultiLevelSetDenseImageTest) -itk_add_test(NAME itkMultiLevelSetsv4DenseImageTwoThreadsTest - COMMAND ITKLevelSetsv4TestDriver --with-threads 2 itkMultiLevelSetDenseImageTest) -itk_add_test(NAME itkMultiLevelSetsv4ChanAndVeseInternalTermTest - COMMAND ITKLevelSetsv4TestDriver itkMultiLevelSetChanAndVeseInternalTermTest) -itk_add_test(NAME itkMultiLevelSetsv4SetEvolutionTest - COMMAND ITKLevelSetsv4TestDriver itkMultiLevelSetEvolutionTest) -itk_add_test(NAME itkMultiLevelSetsv4SetEvolutionTwoThreadsTest - COMMAND ITKLevelSetsv4TestDriver --with-threads 2 itkMultiLevelSetEvolutionTest) -itk_add_test(NAME itkMultiLevelSetsv4DenseImageSubset2DTest - COMMAND ITKLevelSetsv4TestDriver itkMultiLevelSetDenseImageSubset2DTest -) -itk_add_test(NAME itkMultiLevelSetsv4WhitakerImageSubset2DTest - COMMAND ITKLevelSetsv4TestDriver itkMultiLevelSetWhitakerImageSubset2DTest -) -itk_add_test(NAME itkMultiLevelSetsv4ShiImageSubset2DTest - COMMAND ITKLevelSetsv4TestDriver itkMultiLevelSetShiImageSubset2DTest -) -itk_add_test(NAME itkMultiLevelSetsv4MalcolmImageSubset2DTest - COMMAND ITKLevelSetsv4TestDriver itkMultiLevelSetMalcolmImageSubset2DTest -) +itk_add_test( + NAME + itkLevelSetsv4EvolutionNumberOfIterationsStoppingCriterionTest + COMMAND + ITKLevelSetsv4TestDriver + itkLevelSetEvolutionNumberOfIterationsStoppingCriterionTest) +itk_add_test( + NAME + itkMultiLevelSetsv4DenseImageTest + COMMAND + ITKLevelSetsv4TestDriver + itkMultiLevelSetDenseImageTest) +itk_add_test( + NAME + itkMultiLevelSetsv4DenseImageTwoThreadsTest + COMMAND + ITKLevelSetsv4TestDriver + --with-threads + 2 + itkMultiLevelSetDenseImageTest) +itk_add_test( + NAME + itkMultiLevelSetsv4ChanAndVeseInternalTermTest + COMMAND + ITKLevelSetsv4TestDriver + itkMultiLevelSetChanAndVeseInternalTermTest) +itk_add_test( + NAME + itkMultiLevelSetsv4SetEvolutionTest + COMMAND + ITKLevelSetsv4TestDriver + itkMultiLevelSetEvolutionTest) +itk_add_test( + NAME + itkMultiLevelSetsv4SetEvolutionTwoThreadsTest + COMMAND + ITKLevelSetsv4TestDriver + --with-threads + 2 + itkMultiLevelSetEvolutionTest) +itk_add_test( + NAME + itkMultiLevelSetsv4DenseImageSubset2DTest + COMMAND + ITKLevelSetsv4TestDriver + itkMultiLevelSetDenseImageSubset2DTest) +itk_add_test( + NAME + itkMultiLevelSetsv4WhitakerImageSubset2DTest + COMMAND + ITKLevelSetsv4TestDriver + itkMultiLevelSetWhitakerImageSubset2DTest) +itk_add_test( + NAME + itkMultiLevelSetsv4ShiImageSubset2DTest + COMMAND + ITKLevelSetsv4TestDriver + itkMultiLevelSetShiImageSubset2DTest) +itk_add_test( + NAME + itkMultiLevelSetsv4MalcolmImageSubset2DTest + COMMAND + ITKLevelSetsv4TestDriver + itkMultiLevelSetMalcolmImageSubset2DTest) diff --git a/Modules/Segmentation/MarkovRandomFieldsClassifiers/itk-module.cmake b/Modules/Segmentation/MarkovRandomFieldsClassifiers/itk-module.cmake index 86569b02186..380703e3ac7 100644 --- a/Modules/Segmentation/MarkovRandomFieldsClassifiers/itk-module.cmake +++ b/Modules/Segmentation/MarkovRandomFieldsClassifiers/itk-module.cmake @@ -1,15 +1,16 @@ -set(DOCUMENTATION "This module contains classes to perform Markov Random Field +set(DOCUMENTATION + "This module contains classes to perform Markov Random Field classification of image pixels. An initial label image, perhaps generated by \\\\ref ITKClassifiers, is improved by iteratively accounting for the spatial coherence of the labels.") -itk_module(ITKMarkovRandomFieldsClassifiers +itk_module( + ITKMarkovRandomFieldsClassifiers ENABLE_SHARED DEPENDS - ITKStatistics - ITKClassifiers + ITKStatistics + ITKClassifiers TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Segmentation/MarkovRandomFieldsClassifiers/src/CMakeLists.txt b/Modules/Segmentation/MarkovRandomFieldsClassifiers/src/CMakeLists.txt index 400a8946de7..f7364c45763 100644 --- a/Modules/Segmentation/MarkovRandomFieldsClassifiers/src/CMakeLists.txt +++ b/Modules/Segmentation/MarkovRandomFieldsClassifiers/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKMarkovRandomFieldsClassifiers_SRCS - itkMRFImageFilter.cxx - ) +set(ITKMarkovRandomFieldsClassifiers_SRCS itkMRFImageFilter.cxx) itk_module_add_library(ITKMarkovRandomFieldsClassifiers ${ITKMarkovRandomFieldsClassifiers_SRCS}) diff --git a/Modules/Segmentation/MarkovRandomFieldsClassifiers/test/CMakeLists.txt b/Modules/Segmentation/MarkovRandomFieldsClassifiers/test/CMakeLists.txt index e7f41577b43..89b9666218e 100644 --- a/Modules/Segmentation/MarkovRandomFieldsClassifiers/test/CMakeLists.txt +++ b/Modules/Segmentation/MarkovRandomFieldsClassifiers/test/CMakeLists.txt @@ -1,12 +1,18 @@ itk_module_test() -set(ITKMarkovRandomFieldsClassifiersTests -itkMRFImageFilterTest.cxx -itkRGBGibbsPriorFilterTest.cxx -) +set(ITKMarkovRandomFieldsClassifiersTests itkMRFImageFilterTest.cxx itkRGBGibbsPriorFilterTest.cxx) -CreateTestDriver(ITKMarkovRandomFieldsClassifiers "${ITKMarkovRandomFieldsClassifiers-Test_LIBRARIES}" "${ITKMarkovRandomFieldsClassifiersTests}") +createtestdriver(ITKMarkovRandomFieldsClassifiers "${ITKMarkovRandomFieldsClassifiers-Test_LIBRARIES}" + "${ITKMarkovRandomFieldsClassifiersTests}") -itk_add_test(NAME itkMRFImageFilterTest - COMMAND ITKMarkovRandomFieldsClassifiersTestDriver itkMRFImageFilterTest) -itk_add_test(NAME itkRGBGibbsPriorFilterTest - COMMAND ITKMarkovRandomFieldsClassifiersTestDriver itkRGBGibbsPriorFilterTest) +itk_add_test( + NAME + itkMRFImageFilterTest + COMMAND + ITKMarkovRandomFieldsClassifiersTestDriver + itkMRFImageFilterTest) +itk_add_test( + NAME + itkRGBGibbsPriorFilterTest + COMMAND + ITKMarkovRandomFieldsClassifiersTestDriver + itkRGBGibbsPriorFilterTest) diff --git a/Modules/Segmentation/RegionGrowing/itk-module.cmake b/Modules/Segmentation/RegionGrowing/itk-module.cmake index 3e86ad9497f..0e127af493b 100644 --- a/Modules/Segmentation/RegionGrowing/itk-module.cmake +++ b/Modules/Segmentation/RegionGrowing/itk-module.cmake @@ -1,14 +1,15 @@ -set(DOCUMENTATION "This module contains classes to perform the region growing +set(DOCUMENTATION + "This module contains classes to perform the region growing approach to image segmentation. A seed pixel is iteratively propagated to a region identifying a tissue type by testing if connected pixels pass a criteria. See also \\\\ref ITKKLMRegionGrowing.") -itk_module(ITKRegionGrowing +itk_module( + ITKRegionGrowing ENABLE_SHARED DEPENDS - ITKThresholding + ITKThresholding TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Segmentation/RegionGrowing/src/CMakeLists.txt b/Modules/Segmentation/RegionGrowing/src/CMakeLists.txt index 43121c966c1..c5844418534 100644 --- a/Modules/Segmentation/RegionGrowing/src/CMakeLists.txt +++ b/Modules/Segmentation/RegionGrowing/src/CMakeLists.txt @@ -1,5 +1,3 @@ -set(ITKRegionGrowing_SRCS - itkConnectedThresholdImageFilter.cxx - ) +set(ITKRegionGrowing_SRCS itkConnectedThresholdImageFilter.cxx) itk_module_add_library(ITKRegionGrowing ${ITKRegionGrowing_SRCS}) diff --git a/Modules/Segmentation/RegionGrowing/test/CMakeLists.txt b/Modules/Segmentation/RegionGrowing/test/CMakeLists.txt index 61bb1ba51d7..556f0b56271 100644 --- a/Modules/Segmentation/RegionGrowing/test/CMakeLists.txt +++ b/Modules/Segmentation/RegionGrowing/test/CMakeLists.txt @@ -1,58 +1,150 @@ itk_module_test() set(ITKRegionGrowingTests -itkNeighborhoodConnectedImageFilterTest.cxx -itkIsolatedConnectedImageFilterTest.cxx -itkConfidenceConnectedImageFilterTest.cxx -itkVectorConfidenceConnectedImageFilterTest.cxx -itkConnectedThresholdImageFilterTest.cxx -) + itkNeighborhoodConnectedImageFilterTest.cxx + itkIsolatedConnectedImageFilterTest.cxx + itkConfidenceConnectedImageFilterTest.cxx + itkVectorConfidenceConnectedImageFilterTest.cxx + itkConnectedThresholdImageFilterTest.cxx) -CreateTestDriver(ITKRegionGrowing "${ITKRegionGrowing-Test_LIBRARIES}" "${ITKRegionGrowingTests}") +createtestdriver(ITKRegionGrowing "${ITKRegionGrowing-Test_LIBRARIES}" "${ITKRegionGrowingTests}") -itk_add_test(NAME itkNeighborhoodConnectedImageFilterTest - COMMAND ITKRegionGrowingTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/NeighborhoodConnectedImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/NeighborhoodConnectedImageFilterTest.png - itkNeighborhoodConnectedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/NeighborhoodConnectedImageFilterTest.png 146 167) -itk_add_test(NAME itkIsolatedConnectedImageFilterTest - COMMAND ITKRegionGrowingTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/IsolatedConnectedImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/IsolatedConnectedImageFilterTest.png - itkIsolatedConnectedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/IsolatedConnectedImageFilterTest.png 1 115 85 107 110) -itk_add_test(NAME itkIsolatedConnectedImageFilterTest2 - COMMAND ITKRegionGrowingTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/IsolatedConnectedImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/IsolatedConnectedImageFilterTest2.png - itkIsolatedConnectedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/IsolatedConnectedImageFilterTest2.png 0 175 125 100 170 176 125 101 170) -itk_add_test(NAME itkConfidenceConnectedImageFilterTest - COMMAND ITKRegionGrowingTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ConfidenceConnectedImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/ConfidenceConnectedImageFilterTest.png - itkConfidenceConnectedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/ConfidenceConnectedImageFilterTest.png 165 165) -itk_add_test(NAME itkConfidenceConnectedImageFilterTest2 - COMMAND ITKRegionGrowingTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/ConfidenceConnectedImageFilterTest2.png fcd6bcb56c1689fcef28b57c22475bad - itkConfidenceConnectedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/ConfidenceConnectedImageFilterTest2.png 9999 9999) -itk_add_test(NAME itkVectorConfidenceConnectedImageFilterTest - COMMAND ITKRegionGrowingTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/VectorConfidenceConnectedImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/VectorConfidenceConnectedImageFilterTest.png - itkVectorConfidenceConnectedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} ${ITK_TEST_OUTPUT_DIR}/VectorConfidenceConnectedImageFilterTest.png 72 44 23 67 5.0 6) -itk_add_test(NAME itkVectorConfidenceConnectedImageFilterTest2 - COMMAND ITKRegionGrowingTestDriver - --compare-MD5 ${ITK_TEST_OUTPUT_DIR}/VectorConfidenceConnectedImageFilterTest2.png 06aa8c7e4e2aeb3a3028d5b9d5fe6e27 - itkVectorConfidenceConnectedImageFilterTest - DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} - ${ITK_TEST_OUTPUT_DIR}/VectorConfidenceConnectedImageFilterTest2.png 9999 9999 9999 9999 5.0 6) -itk_add_test(NAME itkConnectedThresholdImageFilterTest - COMMAND ITKRegionGrowingTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ConnectedThresholdImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/ConnectedThresholdImageFilterTest.png - itkConnectedThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/ConnectedThresholdImageFilterTest.png 165 165 0 150) -itk_add_test(NAME itkConnectedThresholdImageFilterTest2 - COMMAND ITKRegionGrowingTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ConnectedThresholdImageFilterTest2.png} - ${ITK_TEST_OUTPUT_DIR}/ConnectedThresholdImageFilterTest2.png - itkConnectedThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/8ConnectedImage.bmp} - ${ITK_TEST_OUTPUT_DIR}/ConnectedThresholdImageFilterTest2.png - 29 47 200 255 1) +itk_add_test( + NAME + itkNeighborhoodConnectedImageFilterTest + COMMAND + ITKRegionGrowingTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/NeighborhoodConnectedImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/NeighborhoodConnectedImageFilterTest.png + itkNeighborhoodConnectedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/NeighborhoodConnectedImageFilterTest.png + 146 + 167) +itk_add_test( + NAME + itkIsolatedConnectedImageFilterTest + COMMAND + ITKRegionGrowingTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/IsolatedConnectedImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/IsolatedConnectedImageFilterTest.png + itkIsolatedConnectedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/IsolatedConnectedImageFilterTest.png + 1 + 115 + 85 + 107 + 110) +itk_add_test( + NAME + itkIsolatedConnectedImageFilterTest2 + COMMAND + ITKRegionGrowingTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/IsolatedConnectedImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/IsolatedConnectedImageFilterTest2.png + itkIsolatedConnectedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/IsolatedConnectedImageFilterTest2.png + 0 + 175 + 125 + 100 + 170 + 176 + 125 + 101 + 170) +itk_add_test( + NAME + itkConfidenceConnectedImageFilterTest + COMMAND + ITKRegionGrowingTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ConfidenceConnectedImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/ConfidenceConnectedImageFilterTest.png + itkConfidenceConnectedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/ConfidenceConnectedImageFilterTest.png + 165 + 165) +itk_add_test( + NAME + itkConfidenceConnectedImageFilterTest2 + COMMAND + ITKRegionGrowingTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/ConfidenceConnectedImageFilterTest2.png + fcd6bcb56c1689fcef28b57c22475bad + itkConfidenceConnectedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/ConfidenceConnectedImageFilterTest2.png + 9999 + 9999) +itk_add_test( + NAME + itkVectorConfidenceConnectedImageFilterTest + COMMAND + ITKRegionGrowingTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/VectorConfidenceConnectedImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/VectorConfidenceConnectedImageFilterTest.png + itkVectorConfidenceConnectedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} + ${ITK_TEST_OUTPUT_DIR}/VectorConfidenceConnectedImageFilterTest.png + 72 + 44 + 23 + 67 + 5.0 + 6) +itk_add_test( + NAME + itkVectorConfidenceConnectedImageFilterTest2 + COMMAND + ITKRegionGrowingTestDriver + --compare-MD5 + ${ITK_TEST_OUTPUT_DIR}/VectorConfidenceConnectedImageFilterTest2.png + 06aa8c7e4e2aeb3a3028d5b9d5fe6e27 + itkVectorConfidenceConnectedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/VisibleWomanEyeSlice.png} + ${ITK_TEST_OUTPUT_DIR}/VectorConfidenceConnectedImageFilterTest2.png + 9999 + 9999 + 9999 + 9999 + 5.0 + 6) +itk_add_test( + NAME + itkConnectedThresholdImageFilterTest + COMMAND + ITKRegionGrowingTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ConnectedThresholdImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/ConnectedThresholdImageFilterTest.png + itkConnectedThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/ConnectedThresholdImageFilterTest.png + 165 + 165 + 0 + 150) +itk_add_test( + NAME + itkConnectedThresholdImageFilterTest2 + COMMAND + ITKRegionGrowingTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/BasicFilters/ConnectedThresholdImageFilterTest2.png} + ${ITK_TEST_OUTPUT_DIR}/ConnectedThresholdImageFilterTest2.png + itkConnectedThresholdImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/8ConnectedImage.bmp} + ${ITK_TEST_OUTPUT_DIR}/ConnectedThresholdImageFilterTest2.png + 29 + 47 + 200 + 255 + 1) diff --git a/Modules/Segmentation/RegionGrowing/wrapping/itkConfidenceConnectedImageFilter.wrap b/Modules/Segmentation/RegionGrowing/wrapping/itkConfidenceConnectedImageFilter.wrap index 33f59ba2306..bb8a5f2e19a 100644 --- a/Modules/Segmentation/RegionGrowing/wrapping/itkConfidenceConnectedImageFilter.wrap +++ b/Modules/Segmentation/RegionGrowing/wrapping/itkConfidenceConnectedImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::ConfidenceConnectedImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Segmentation/RegionGrowing/wrapping/itkConnectedThresholdImageFilter.wrap b/Modules/Segmentation/RegionGrowing/wrapping/itkConnectedThresholdImageFilter.wrap index 8efbd27aa20..871ac16b221 100644 --- a/Modules/Segmentation/RegionGrowing/wrapping/itkConnectedThresholdImageFilter.wrap +++ b/Modules/Segmentation/RegionGrowing/wrapping/itkConnectedThresholdImageFilter.wrap @@ -2,5 +2,5 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkConnectedThresholdImageFilter.h") itk_wrap_simple_class("itk::ConnectedThresholdImageFilterEnums") itk_wrap_class("itk::ConnectedThresholdImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Segmentation/RegionGrowing/wrapping/itkIsolatedConnectedImageFilter.wrap b/Modules/Segmentation/RegionGrowing/wrapping/itkIsolatedConnectedImageFilter.wrap index 399d0b94bec..a2a2e6a8acb 100644 --- a/Modules/Segmentation/RegionGrowing/wrapping/itkIsolatedConnectedImageFilter.wrap +++ b/Modules/Segmentation/RegionGrowing/wrapping/itkIsolatedConnectedImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::IsolatedConnectedImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Segmentation/RegionGrowing/wrapping/itkNeighborhoodConnectedImageFilter.wrap b/Modules/Segmentation/RegionGrowing/wrapping/itkNeighborhoodConnectedImageFilter.wrap index 65506dc9d1f..8efa640781c 100644 --- a/Modules/Segmentation/RegionGrowing/wrapping/itkNeighborhoodConnectedImageFilter.wrap +++ b/Modules/Segmentation/RegionGrowing/wrapping/itkNeighborhoodConnectedImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::NeighborhoodConnectedImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Segmentation/RegionGrowing/wrapping/itkVectorConfidenceConnectedImageFilter.wrap b/Modules/Segmentation/RegionGrowing/wrapping/itkVectorConfidenceConnectedImageFilter.wrap index ee392780887..37144a6e491 100644 --- a/Modules/Segmentation/RegionGrowing/wrapping/itkVectorConfidenceConnectedImageFilter.wrap +++ b/Modules/Segmentation/RegionGrowing/wrapping/itkVectorConfidenceConnectedImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::VectorConfidenceConnectedImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_COLOR};${WRAP_ITK_VECTOR}" "${WRAP_ITK_INT}") +itk_wrap_image_filter_combinations("${WRAP_ITK_COLOR};${WRAP_ITK_VECTOR}" "${WRAP_ITK_INT}") itk_end_wrap_class() diff --git a/Modules/Segmentation/SignedDistanceFunction/itk-module.cmake b/Modules/Segmentation/SignedDistanceFunction/itk-module.cmake index 58611978503..0a92b322589 100644 --- a/Modules/Segmentation/SignedDistanceFunction/itk-module.cmake +++ b/Modules/Segmentation/SignedDistanceFunction/itk-module.cmake @@ -1,13 +1,14 @@ -set(DOCUMENTATION "This module contains classes for calculating signed distance +set(DOCUMENTATION + "This module contains classes for calculating signed distance images, i.e. images of the distance from a segmenting contour (the distance is zero on the contour, negative inside the contour, and positive outside the contour).") -itk_module(ITKSignedDistanceFunction +itk_module( + ITKSignedDistanceFunction DEPENDS - ITKImageFunction + ITKImageFunction TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Segmentation/SignedDistanceFunction/test/CMakeLists.txt b/Modules/Segmentation/SignedDistanceFunction/test/CMakeLists.txt index 4af67fa8c85..378e47f0c82 100644 --- a/Modules/Segmentation/SignedDistanceFunction/test/CMakeLists.txt +++ b/Modules/Segmentation/SignedDistanceFunction/test/CMakeLists.txt @@ -1,12 +1,18 @@ itk_module_test() -set(ITKSignedDistanceFunctionTests -itkSphereSignedDistanceFunctionTest.cxx -itkPCAShapeSignedDistanceFunctionTest.cxx -) +set(ITKSignedDistanceFunctionTests itkSphereSignedDistanceFunctionTest.cxx itkPCAShapeSignedDistanceFunctionTest.cxx) -CreateTestDriver(ITKSignedDistanceFunction "${ITKSignedDistanceFunction-Test_LIBRARIES}" "${ITKSignedDistanceFunctionTests}") +createtestdriver(ITKSignedDistanceFunction "${ITKSignedDistanceFunction-Test_LIBRARIES}" + "${ITKSignedDistanceFunctionTests}") -itk_add_test(NAME itkSphereSignedDistanceFunctionTest - COMMAND ITKSignedDistanceFunctionTestDriver itkSphereSignedDistanceFunctionTest) -itk_add_test(NAME itkPCAShapeSignedDistanceFunctionTest - COMMAND ITKSignedDistanceFunctionTestDriver itkPCAShapeSignedDistanceFunctionTest) +itk_add_test( + NAME + itkSphereSignedDistanceFunctionTest + COMMAND + ITKSignedDistanceFunctionTestDriver + itkSphereSignedDistanceFunctionTest) +itk_add_test( + NAME + itkPCAShapeSignedDistanceFunctionTest + COMMAND + ITKSignedDistanceFunctionTestDriver + itkPCAShapeSignedDistanceFunctionTest) diff --git a/Modules/Segmentation/SignedDistanceFunction/wrapping/CMakeLists.txt b/Modules/Segmentation/SignedDistanceFunction/wrapping/CMakeLists.txt index 0baddb949f6..168ce579232 100644 --- a/Modules/Segmentation/SignedDistanceFunction/wrapping/CMakeLists.txt +++ b/Modules/Segmentation/SignedDistanceFunction/wrapping/CMakeLists.txt @@ -1,8 +1,5 @@ itk_wrap_module(ITKSignedDistanceFunction) -set(WRAPPER_SUBMODULE_ORDER -itkShapeSignedDistanceFunction -itkPCAShapeSignedDistanceFunction -) +set(WRAPPER_SUBMODULE_ORDER itkShapeSignedDistanceFunction itkPCAShapeSignedDistanceFunction) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Segmentation/SignedDistanceFunction/wrapping/itkPCAShapeSignedDistanceFunction.wrap b/Modules/Segmentation/SignedDistanceFunction/wrapping/itkPCAShapeSignedDistanceFunction.wrap index fc39744e26b..b80a9a976a4 100644 --- a/Modules/Segmentation/SignedDistanceFunction/wrapping/itkPCAShapeSignedDistanceFunction.wrap +++ b/Modules/Segmentation/SignedDistanceFunction/wrapping/itkPCAShapeSignedDistanceFunction.wrap @@ -1,14 +1,14 @@ itk_wrap_class("itk::PCAShapeSignedDistanceFunction" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - # Force wrapping this filter for double images, in addition to other - # wrapped image types listed in the variable `WRAP_ITK_REAL`, as it - # is the default image template type of this class in C++. - UNIQUE(types "${WRAP_ITK_REAL};D") - # `TCoordRep` template parameter of this filter can only be wrapped for - # `double` because of OptimizerParameters is hardcoded as templated - # over `double` in parent class `ShapeSignedDistanceFunction`. - foreach(t ${types}) - itk_wrap_template("${ITKM_D}${d}${ITKM_I${t}${d}}" "${ITKT_D},${d},${ITKT_I${t}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + # Force wrapping this filter for double images, in addition to other + # wrapped image types listed in the variable `WRAP_ITK_REAL`, as it + # is the default image template type of this class in C++. + unique(types "${WRAP_ITK_REAL};D") + # `TCoordRep` template parameter of this filter can only be wrapped for + # `double` because of OptimizerParameters is hardcoded as templated + # over `double` in parent class `ShapeSignedDistanceFunction`. + foreach(t ${types}) + itk_wrap_template("${ITKM_D}${d}${ITKM_I${t}${d}}" "${ITKT_D},${d},${ITKT_I${t}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/SignedDistanceFunction/wrapping/itkShapeSignedDistanceFunction.wrap b/Modules/Segmentation/SignedDistanceFunction/wrapping/itkShapeSignedDistanceFunction.wrap index 7dfebb2304e..94e0fb7fd1b 100644 --- a/Modules/Segmentation/SignedDistanceFunction/wrapping/itkShapeSignedDistanceFunction.wrap +++ b/Modules/Segmentation/SignedDistanceFunction/wrapping/itkShapeSignedDistanceFunction.wrap @@ -1,7 +1,7 @@ itk_wrap_include("itkSpatialFunction.h") itk_wrap_class("itk::ShapeSignedDistanceFunction" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/SignedDistanceFunction/wrapping/test/CMakeLists.txt b/Modules/Segmentation/SignedDistanceFunction/wrapping/test/CMakeLists.txt index 90ef9adea50..98721a949a8 100644 --- a/Modules/Segmentation/SignedDistanceFunction/wrapping/test/CMakeLists.txt +++ b/Modules/Segmentation/SignedDistanceFunction/wrapping/test/CMakeLists.txt @@ -1,4 +1,7 @@ if(ITK_WRAP_PYTHON) - itk_python_add_test(NAME itkPCAShapeSignedDistanceFunctionPythonTest - COMMAND itkPCAShapeSignedDistanceFunction.py) + itk_python_add_test( + NAME + itkPCAShapeSignedDistanceFunctionPythonTest + COMMAND + itkPCAShapeSignedDistanceFunction.py) endif() diff --git a/Modules/Segmentation/SuperPixel/itk-module.cmake b/Modules/Segmentation/SuperPixel/itk-module.cmake index 7a408072c4c..4a2dbe1f120 100644 --- a/Modules/Segmentation/SuperPixel/itk-module.cmake +++ b/Modules/Segmentation/SuperPixel/itk-module.cmake @@ -1,19 +1,18 @@ set(DOCUMENTATTION "This modules contains classes related to superpixel segmentation and clustering algorithms.") - # define the dependencies of the include module and the tests -itk_module(ITKSuperPixel +itk_module( + ITKSuperPixel DEPENDS - ITKCommon - ITKStatistics - ITKImageGrid + ITKCommon + ITKStatistics + ITKImageGrid COMPILE_DEPENDS - ITKImageSources + ITKImageSources TEST_DEPENDS - ITKTestKernel - ITKGoogleTest - ITKMetaIO + ITKTestKernel + ITKGoogleTest + ITKMetaIO DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Segmentation/SuperPixel/test/CMakeLists.txt b/Modules/Segmentation/SuperPixel/test/CMakeLists.txt index b608785f91a..f8851c27508 100644 --- a/Modules/Segmentation/SuperPixel/test/CMakeLists.txt +++ b/Modules/Segmentation/SuperPixel/test/CMakeLists.txt @@ -3,41 +3,52 @@ itk_module_test() #${itk-module} will be the name of this module and will not need to be #changed when this module is renamed. -set(${itk-module}Tests - itkSLICImageFilterTest.cxx -) - -CreateTestDriver(${itk-module} "${${itk-module}-Test_LIBRARIES}" "${${itk-module}Tests}") - -itk_add_test(NAME itkSLICImageFilterTest1 - COMMAND ${itk-module}TestDriver - --compare "DATA{Data/Baseline/itkSLICImageFilterTest1.png,:}" - "${ITK_TEST_OUTPUT_DIR}/itkSLICImageFilterTestOutput1.png" - itkSLICImageFilterTest - "DATA{Data/Input/VM1111Shrink-RGB.png}" - "${ITK_TEST_OUTPUT_DIR}/itkSLICImageFilterTestOutput1.png" 25 0) - - -itk_add_test(NAME itkSLICImageFilterTest2 - COMMAND ${itk-module}TestDriver - --compare "DATA{Data/Baseline/itkSLICImageFilterTest2.png}" - "${ITK_TEST_OUTPUT_DIR}/itkSLICImageFilterTestOutput2.png" +set(${itk-module}Tests itkSLICImageFilterTest.cxx) + +createtestdriver(${itk-module} "${${itk-module}-Test_LIBRARIES}" "${${itk-module}Tests}") + +itk_add_test( + NAME + itkSLICImageFilterTest1 + COMMAND + ${itk-module}TestDriver + --compare + "DATA{Data/Baseline/itkSLICImageFilterTest1.png,:}" + "${ITK_TEST_OUTPUT_DIR}/itkSLICImageFilterTestOutput1.png" itkSLICImageFilterTest - "DATA{Data/Input/VM1111Shrink-LAB.mha}" - "${ITK_TEST_OUTPUT_DIR}/itkSLICImageFilterTestOutput2.png" 25 0) - - - -itk_add_test(NAME itkSLICImageFilterTest3 - COMMAND ${itk-module}TestDriver - --compare "DATA{Data/Baseline/itkSLICImageFilterTest3.png}" - "${ITK_TEST_OUTPUT_DIR}/itkSLICImageFilterTestOutput3.png" + "DATA{Data/Input/VM1111Shrink-RGB.png}" + "${ITK_TEST_OUTPUT_DIR}/itkSLICImageFilterTestOutput1.png" + 25 + 0) + +itk_add_test( + NAME + itkSLICImageFilterTest2 + COMMAND + ${itk-module}TestDriver + --compare + "DATA{Data/Baseline/itkSLICImageFilterTest2.png}" + "${ITK_TEST_OUTPUT_DIR}/itkSLICImageFilterTestOutput2.png" itkSLICImageFilterTest - "DATA{Data/Input/VM1111Shrink-LAB.mha}" - "${ITK_TEST_OUTPUT_DIR}/itkSLICImageFilterTestOutput3.png" 25 1) - + "DATA{Data/Input/VM1111Shrink-LAB.mha}" + "${ITK_TEST_OUTPUT_DIR}/itkSLICImageFilterTestOutput2.png" + 25 + 0) + +itk_add_test( + NAME + itkSLICImageFilterTest3 + COMMAND + ${itk-module}TestDriver + --compare + "DATA{Data/Baseline/itkSLICImageFilterTest3.png}" + "${ITK_TEST_OUTPUT_DIR}/itkSLICImageFilterTestOutput3.png" + itkSLICImageFilterTest + "DATA{Data/Input/VM1111Shrink-LAB.mha}" + "${ITK_TEST_OUTPUT_DIR}/itkSLICImageFilterTestOutput3.png" + 25 + 1) -set(${itk-module}GTests - itkSLICImageFilterGTest.cxx) +set(${itk-module}GTests itkSLICImageFilterGTest.cxx) -CreateGoogleTestDriver(${itk-module} "${${itk-module}-Test_LIBRARIES}" "${${itk-module}GTests}") +creategoogletestdriver(${itk-module} "${${itk-module}-Test_LIBRARIES}" "${${itk-module}GTests}") diff --git a/Modules/Segmentation/SuperPixel/wrapping/itkSLICImageFilter.wrap b/Modules/Segmentation/SuperPixel/wrapping/itkSLICImageFilter.wrap index 131f1bda4f9..022c5bf72fc 100644 --- a/Modules/Segmentation/SuperPixel/wrapping/itkSLICImageFilter.wrap +++ b/Modules/Segmentation/SuperPixel/wrapping/itkSLICImageFilter.wrap @@ -1,35 +1,38 @@ itk_wrap_class("itk::SLICImageFilter" POINTER_WITH_SUPERCLASS) - set(to_types "${ITKM_IT}") - if(ITK_WRAP_unsigned_short) - list(APPEND to_types "US") - endif() +set(to_types "${ITKM_IT}") +if(ITK_WRAP_unsigned_short) + list(APPEND to_types "US") +endif() - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${to_types}" 2+) +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${to_types}" 2+) - set(from_types "${WRAP_ITK_SCALAR}") +set(from_types "${WRAP_ITK_SCALAR}") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(f ${from_types}) - foreach(t ${to_types}) - if(ITKM_VI${f}${d} AND ITKT_VI${f}${d}) - # VectorImage as input - itk_wrap_template("${ITKM_VI${f}${d}}${ITKM_I${t}${d}}" "${ITKT_VI${f}${d}},${ITKT_I${t}${d}}") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(f ${from_types}) + foreach(t ${to_types}) + if(ITKM_VI${f}${d} AND ITKT_VI${f}${d}) + # VectorImage as input + itk_wrap_template("${ITKM_VI${f}${d}}${ITKM_I${t}${d}}" "${ITKT_VI${f}${d}},${ITKT_I${t}${d}}") + endif() + if(ITKM_I${ITKM_RGB${f}}${d} AND ITKT_I${ITKM_RGB${f}}${d}) + # Image of RGBPixel as input + itk_wrap_template("${ITKM_I${ITKM_RGB${f}}${d}}${ITKM_I${t}${d}}" + "${ITKT_I${ITKM_RGB${f}}${d}},${ITKT_I${t}${d}}") + endif() + foreach(c ${ITK_WRAP_VECTOR_COMPONENTS}) + if(ITKM_I${ITKM_V${f}${c}}${d} AND ITKT_I${ITKM_V${f}${c}}${d}) + # Image of Vector as input + itk_wrap_template("${ITKM_I${ITKM_V${f}${c}}${d}}${ITKM_I${t}${d}}" + "${ITKT_I${ITKM_V${f}${c}}${d}},${ITKT_I${t}${d}}") endif() - if(ITKM_I${ITKM_RGB${f}}${d} AND ITKT_I${ITKM_RGB${f}}${d}) - # Image of RGBPixel as input - itk_wrap_template("${ITKM_I${ITKM_RGB${f}}${d}}${ITKM_I${t}${d}}" "${ITKT_I${ITKM_RGB${f}}${d}},${ITKT_I${t}${d}}") + if(ITKM_I${ITKM_CV${f}${c}}${d} AND ITKT_I${ITKM_CV${f}${c}}${d}) + # Image of CovariantVector as input + itk_wrap_template("${ITKM_I${ITKM_CV${f}${c}}${d}}${ITKM_I${t}${d}}" + "${ITKT_I${ITKM_CV${f}${c}}${d}},${ITKT_I${t}${d}}") endif() - foreach(c ${ITK_WRAP_VECTOR_COMPONENTS}) - if(ITKM_I${ITKM_V${f}${c}}${d} AND ITKT_I${ITKM_V${f}${c}}${d}) - # Image of Vector as input - itk_wrap_template("${ITKM_I${ITKM_V${f}${c}}${d}}${ITKM_I${t}${d}}" "${ITKT_I${ITKM_V${f}${c}}${d}},${ITKT_I${t}${d}}") - endif() - if(ITKM_I${ITKM_CV${f}${c}}${d} AND ITKT_I${ITKM_CV${f}${c}}${d}) - # Image of CovariantVector as input - itk_wrap_template("${ITKM_I${ITKM_CV${f}${c}}${d}}${ITKM_I${t}${d}}" "${ITKT_I${ITKM_CV${f}${c}}${d}},${ITKT_I${t}${d}}") - endif() - endforeach() endforeach() endforeach() endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Segmentation/Voronoi/itk-module.cmake b/Modules/Segmentation/Voronoi/itk-module.cmake index e4f52e8d98d..00339503ef8 100644 --- a/Modules/Segmentation/Voronoi/itk-module.cmake +++ b/Modules/Segmentation/Voronoi/itk-module.cmake @@ -1,4 +1,5 @@ -set(DOCUMENTATION "This module provides classes to perform Voronoi segmentation +set(DOCUMENTATION + "This module provides classes to perform Voronoi segmentation on scalar or RGB images. Voronoi segmentation is a region based segmentation technique. A Voronoi diagram is created from a set of seed points in the image. Each resulting Voronoi cell is classified as internal or external to the @@ -6,17 +7,17 @@ structure of interest based on statistical classification criteria applied to its contents. The boundary of the internal-external regions are iteratively refined by adding seed points to the boundary regions.") -itk_module(ITKVoronoi +itk_module( + ITKVoronoi DEPENDS - ITKImageFilterBase - ITKMesh + ITKImageFilterBase + ITKMesh TEST_DEPENDS - ITKTestKernel - ITKSmoothing - ITKImageFusion - ITKIOMesh + ITKTestKernel + ITKSmoothing + ITKImageFusion + ITKIOMesh DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") # Extra dependency on Smoothing is introduced by itkVoronoiPartitioningImageFilterTest. diff --git a/Modules/Segmentation/Voronoi/test/CMakeLists.txt b/Modules/Segmentation/Voronoi/test/CMakeLists.txt index b8de9ca6884..944d3580a38 100644 --- a/Modules/Segmentation/Voronoi/test/CMakeLists.txt +++ b/Modules/Segmentation/Voronoi/test/CMakeLists.txt @@ -1,27 +1,62 @@ itk_module_test() set(ITKVoronoiTests -itkVoronoiSegmentationImageFilterTest.cxx -itkVoronoiSegmentationRGBImageFilterTest.cxx -itkVoronoiDiagram2DTest.cxx -itkVoronoiPartitioningImageFilterTest.cxx -) + itkVoronoiSegmentationImageFilterTest.cxx + itkVoronoiSegmentationRGBImageFilterTest.cxx + itkVoronoiDiagram2DTest.cxx + itkVoronoiPartitioningImageFilterTest.cxx) -CreateTestDriver(ITKVoronoi "${ITKVoronoi-Test_LIBRARIES}" "${ITKVoronoiTests}") +createtestdriver(ITKVoronoi "${ITKVoronoi-Test_LIBRARIES}" "${ITKVoronoiTests}") -itk_add_test(NAME itkVoronoiSegmentationImageFilterTest - COMMAND ITKVoronoiTestDriver itkVoronoiSegmentationImageFilterTest 520.0 20.0 10.0 20.0 400 5 0.1 1.5) -itk_add_test(NAME itkVoronoiSegmentationRGBImageFilterTest - COMMAND ITKVoronoiTestDriver itkVoronoiSegmentationRGBImageFilterTest) -itk_add_test(NAME itkVoronoiDiagram2DTest - COMMAND ITKVoronoiTestDriver itkVoronoiDiagram2DTest ${ITK_TEST_OUTPUT_DIR}/VoronoiDiagram2DTest.vtk) -itk_add_test(NAME itkVoronoiPartitioningImageFilterTest1 - COMMAND ITKVoronoiTestDriver - --compareNumberOfPixelsTolerance 20 - --compare DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/VoronoiPartioningImageFilterTest1.png,:} - ${ITK_TEST_OUTPUT_DIR}/VoronoiPartioningImageFilterTest1.png - itkVoronoiPartitioningImageFilterTest DATA{${ITK_DATA_ROOT}/Input/sf4.png} ${ITK_TEST_OUTPUT_DIR}/VoronoiPartioningImageFilterTest1.png 1) -itk_add_test(NAME itkVoronoiPartitioningImageFilterTest2 - COMMAND ITKVoronoiTestDriver - --compare DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/VoronoiPartioningImageFilterTest2.png,:} - ${ITK_TEST_OUTPUT_DIR}/VoronoiPartioningImageFilterTest2.png - itkVoronoiPartitioningImageFilterTest DATA{${ITK_DATA_ROOT}/Input/sf4.png} ${ITK_TEST_OUTPUT_DIR}/VoronoiPartioningImageFilterTest2.png 0) +itk_add_test( + NAME + itkVoronoiSegmentationImageFilterTest + COMMAND + ITKVoronoiTestDriver + itkVoronoiSegmentationImageFilterTest + 520.0 + 20.0 + 10.0 + 20.0 + 400 + 5 + 0.1 + 1.5) +itk_add_test( + NAME + itkVoronoiSegmentationRGBImageFilterTest + COMMAND + ITKVoronoiTestDriver + itkVoronoiSegmentationRGBImageFilterTest) +itk_add_test( + NAME + itkVoronoiDiagram2DTest + COMMAND + ITKVoronoiTestDriver + itkVoronoiDiagram2DTest + ${ITK_TEST_OUTPUT_DIR}/VoronoiDiagram2DTest.vtk) +itk_add_test( + NAME + itkVoronoiPartitioningImageFilterTest1 + COMMAND + ITKVoronoiTestDriver + --compareNumberOfPixelsTolerance + 20 + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/VoronoiPartioningImageFilterTest1.png,:} + ${ITK_TEST_OUTPUT_DIR}/VoronoiPartioningImageFilterTest1.png + itkVoronoiPartitioningImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/sf4.png} + ${ITK_TEST_OUTPUT_DIR}/VoronoiPartioningImageFilterTest1.png + 1) +itk_add_test( + NAME + itkVoronoiPartitioningImageFilterTest2 + COMMAND + ITKVoronoiTestDriver + --compare + DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/VoronoiPartioningImageFilterTest2.png,:} + ${ITK_TEST_OUTPUT_DIR}/VoronoiPartioningImageFilterTest2.png + itkVoronoiPartitioningImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/sf4.png} + ${ITK_TEST_OUTPUT_DIR}/VoronoiPartioningImageFilterTest2.png + 0) diff --git a/Modules/Segmentation/Voronoi/wrapping/itkVoronoiSegmentationImageFilter.wrap b/Modules/Segmentation/Voronoi/wrapping/itkVoronoiSegmentationImageFilter.wrap index 28488ade7db..a0d5c1bd9b7 100644 --- a/Modules/Segmentation/Voronoi/wrapping/itkVoronoiSegmentationImageFilter.wrap +++ b/Modules/Segmentation/Voronoi/wrapping/itkVoronoiSegmentationImageFilter.wrap @@ -1,9 +1,8 @@ - # build seems to succeed only with unsigned char # also, Superclass type alias is wrong in VoronoiSegmentationImageFilter # and so we can't use POINTER_WITH_SUPERCLASS to wrap # VoronoiSegmentationImageFilterBase itk_wrap_class("itk::VoronoiSegmentationImageFilter" POINTER_WITH_SUPERCLASS) - itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 3 2) +itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" 3 2) itk_end_wrap_class() diff --git a/Modules/Segmentation/Watersheds/itk-module.cmake b/Modules/Segmentation/Watersheds/itk-module.cmake index 7e87ec747ba..f54474a345d 100644 --- a/Modules/Segmentation/Watersheds/itk-module.cmake +++ b/Modules/Segmentation/Watersheds/itk-module.cmake @@ -1,4 +1,5 @@ -set(DOCUMENTATION "This module contains classes related to watershed +set(DOCUMENTATION + "This module contains classes related to watershed segmentation. The watershed algorithm proceeds in several steps. First, an initial classification of all points into catchment basin regions is done by tracing each point down its path of steepest descent to a local minima. Next, @@ -16,17 +17,17 @@ and new developments.\" The Insight Journal - 2006 January - June. https://www.insight-journal.org/browse/publication/92 ") -itk_module(ITKWatersheds +itk_module( + ITKWatersheds ENABLE_SHARED DEPENDS - ITKImageIntensity - ITKThresholding - ITKImageGradient - ITKSmoothing - ITKMathematicalMorphology + ITKImageIntensity + ITKThresholding + ITKImageGradient + ITKSmoothing + ITKMathematicalMorphology TEST_DEPENDS - ITKTestKernel - ITKImageFusion + ITKTestKernel + ITKImageFusion DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Segmentation/Watersheds/src/CMakeLists.txt b/Modules/Segmentation/Watersheds/src/CMakeLists.txt index 4d69b49f488..2f31c5b19b6 100644 --- a/Modules/Segmentation/Watersheds/src/CMakeLists.txt +++ b/Modules/Segmentation/Watersheds/src/CMakeLists.txt @@ -1,6 +1,3 @@ -set(ITKWatersheds_SRCS - itkWatershedMiniPipelineProgressCommand.cxx - itkOneWayEquivalencyTable.cxx - ) +set(ITKWatersheds_SRCS itkWatershedMiniPipelineProgressCommand.cxx itkOneWayEquivalencyTable.cxx) itk_module_add_library(ITKWatersheds ${ITKWatersheds_SRCS}) diff --git a/Modules/Segmentation/Watersheds/test/CMakeLists.txt b/Modules/Segmentation/Watersheds/test/CMakeLists.txt index c3c124e54cb..a3735d24a7c 100644 --- a/Modules/Segmentation/Watersheds/test/CMakeLists.txt +++ b/Modules/Segmentation/Watersheds/test/CMakeLists.txt @@ -1,163 +1,434 @@ itk_module_test() set(ITKWatershedsTests - itkTobogganImageFilterTest.cxx - itkIsolatedWatershedImageFilterTest.cxx - itkWatershedImageFilterTest.cxx - itkMorphologicalWatershedFromMarkersImageFilterTest.cxx - itkMorphologicalWatershedImageFilterTest.cxx - itkWatershedImageFilterBadValuesTest.cxx - ) + itkTobogganImageFilterTest.cxx + itkIsolatedWatershedImageFilterTest.cxx + itkWatershedImageFilterTest.cxx + itkMorphologicalWatershedFromMarkersImageFilterTest.cxx + itkMorphologicalWatershedImageFilterTest.cxx + itkWatershedImageFilterBadValuesTest.cxx) -CreateTestDriver(ITKWatersheds "${ITKWatersheds-Test_LIBRARIES}" "${ITKWatershedsTests}") +createtestdriver(ITKWatersheds "${ITKWatersheds-Test_LIBRARIES}" "${ITKWatershedsTests}") -itk_add_test(NAME itkWatershedImageFilterBadValuesTest - COMMAND ITKWatershedsTestDriver itkWatershedImageFilterBadValuesTest DATA{Input/watershed-test.tif}) -itk_add_test(NAME itkTobogganImageFilterTest - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkTobogganImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkTobogganImageFilterTest.png - itkTobogganImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkTobogganImageFilterTest.png) -itk_add_test(NAME itkIsolatedWatershedImageFilterTest - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkIsolatedWatershedImageFilterTest.png} - ${ITK_TEST_OUTPUT_DIR}/itkIsolatedWatershedImageFilterTest.png - itkIsolatedWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkIsolatedWatershedImageFilterTest.png 113 84 120 99 0.001 .0001) -itk_add_test(NAME itkIsolatedWatershedImageFilterTestCloseThresholds - COMMAND ITKWatershedsTestDriver - --compare-MD5 DATA{Baseline/itkIsolatedWatershedImageFilterTestCloseThresholds.png} - b53800712fb3b5a376c2f8234e1ebac5 - itkIsolatedWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/itkIsolatedWatershedImageFilterTestCloseThresholds.png 113 84 120 99 0.1 1.0) -itk_add_test(NAME itkWatershedImageFilterTest - COMMAND ITKWatershedsTestDriver itkWatershedImageFilterTest) +itk_add_test( + NAME + itkWatershedImageFilterBadValuesTest + COMMAND + ITKWatershedsTestDriver + itkWatershedImageFilterBadValuesTest + DATA{Input/watershed-test.tif}) +itk_add_test( + NAME + itkTobogganImageFilterTest + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkTobogganImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkTobogganImageFilterTest.png + itkTobogganImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkTobogganImageFilterTest.png) +itk_add_test( + NAME + itkIsolatedWatershedImageFilterTest + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkIsolatedWatershedImageFilterTest.png} + ${ITK_TEST_OUTPUT_DIR}/itkIsolatedWatershedImageFilterTest.png + itkIsolatedWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkIsolatedWatershedImageFilterTest.png + 113 + 84 + 120 + 99 + 0.001 + .0001) +itk_add_test( + NAME + itkIsolatedWatershedImageFilterTestCloseThresholds + COMMAND + ITKWatershedsTestDriver + --compare-MD5 + DATA{Baseline/itkIsolatedWatershedImageFilterTestCloseThresholds.png} + b53800712fb3b5a376c2f8234e1ebac5 + itkIsolatedWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/itkIsolatedWatershedImageFilterTestCloseThresholds.png + 113 + 84 + 120 + 99 + 0.1 + 1.0) +itk_add_test( + NAME + itkWatershedImageFilterTest + COMMAND + ITKWatershedsTestDriver + itkWatershedImageFilterTest) - -itk_add_test(NAME itkMorphologicalWatershedFromMarkersImageFilterTestM0F0 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedFromMarkersImageFilterTestM0F0.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedFromMarkersImageFilterTestM0F0.png - itkMorphologicalWatershedFromMarkersImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-markers.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedFromMarkersImageFilterTestM0F0.png 0 0) -itk_add_test(NAME itkMorphologicalWatershedFromMarkersImageFilterTestM0F1 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedFromMarkersImageFilterTestM0F1.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedFromMarkersImageFilterTestM0F1.png - itkMorphologicalWatershedFromMarkersImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-markers.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedFromMarkersImageFilterTestM0F1.png 0 1) -itk_add_test(NAME itkMorphologicalWatershedFromMarkersImageFilterTestM1F0 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedFromMarkersImageFilterTestM1F0.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedFromMarkersImageFilterTestM1F0.png - itkMorphologicalWatershedFromMarkersImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-markers.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedFromMarkersImageFilterTestM1F0.png 1 0) -itk_add_test(NAME itkMorphologicalWatershedFromMarkersImageFilterTestM1F1 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedFromMarkersImageFilterTestM1F1.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedFromMarkersImageFilterTestM1F1.png - itkMorphologicalWatershedFromMarkersImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} DATA{${ITK_DATA_ROOT}/Input/cthead1-markers.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedFromMarkersImageFilterTestM1F1.png 1 1) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestButtonHoleM0F0 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestButtonHoleM0F0.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestButtonHoleM0F0.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/button-hole.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestButtonHoleM0F0.png 0 0 0) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestPassValuesM0F0 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestPassValuesM0F0.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPassValuesM0F0.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/pass-values.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPassValuesM0F0.png 0 0 0) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestPlateauM0F0 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestPlateauM0F0.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPlateauM0F0.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/plateau.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPlateauM0F0.png 0 0 0) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestThickLinesM0F0 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestThickLinesM0F0.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestThickLinesM0F0.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/thick-lines.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestThickLinesM0F0.png 0 0 0) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestButtonHoleM0F1 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestButtonHoleM0F1.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestButtonHoleM0F1.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/button-hole.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestButtonHoleM0F1.png 0 1 0) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestPassValuesM0F1 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestPassValuesM0F1.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPassValuesM0F1.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/pass-values.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPassValuesM0F1.png 0 1 0) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestPlateauM0F1 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestPlateauM0F1.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPlateauM0F1.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/plateau.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPlateauM0F1.png 0 1 0) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestThickLinesM0F1 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestThickLinesM0F1.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestThickLinesM0F1.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/thick-lines.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestThickLinesM0F1.png 0 1 0) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestButtonHoleM1F0 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestButtonHoleM1F0.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestButtonHoleM1F0.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/button-hole.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestButtonHoleM1F0.png 1 0 0) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestPassValuesM1F0 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestPassValuesM1F0.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPassValuesM1F0.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/pass-values.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPassValuesM1F0.png 1 0 0) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestPlateauM1F0 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestPlateauM1F0.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPlateauM1F0.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/plateau.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPlateauM1F0.png 1 0 0) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestThickLinesM1F0 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestThickLinesM1F0.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestThickLinesM1F0.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/thick-lines.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestThickLinesM1F0.png 1 0 0) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestButtonHoleM1F1 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestButtonHoleM1F1.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestButtonHoleM1F1.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/button-hole.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestButtonHoleM1F1.png 1 1 0) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestPassValuesM1F1 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestPassValuesM1F1.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPassValuesM1F1.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/pass-values.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPassValuesM1F1.png 1 1 0) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestPlateauM1F1 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestPlateauM1F1.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPlateauM1F1.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/plateau.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPlateauM1F1.png 1 1 0) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestThickLinesM1F1 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestThickLinesM1F1.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestThickLinesM1F1.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/thick-lines.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestThickLinesM1F1.png 1 1 0) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestLevel00 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestLevel00.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel00.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/level.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel00.png 1 0 00) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestLevel10 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestLevel10.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel10.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/level.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel10.png 1 0 10) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestLevel20 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestLevel20.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel20.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/level.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel20.png 1 0 20) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestLevel30 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestLevel30.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel30.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/level.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel30.png 1 0 30) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestLevel40 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestLevel40.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel40.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/level.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel40.png 1 0 40) -itk_add_test(NAME itkMorphologicalWatershedImageFilterTestLevel50 - COMMAND ITKWatershedsTestDriver - --compare DATA{Baseline/itkMorphologicalWatershedImageFilterTestLevel50.png} - ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel50.png - itkMorphologicalWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/level.png} ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel50.png 1 0 50) +itk_add_test( + NAME + itkMorphologicalWatershedFromMarkersImageFilterTestM0F0 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedFromMarkersImageFilterTestM0F0.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedFromMarkersImageFilterTestM0F0.png + itkMorphologicalWatershedFromMarkersImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-markers.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedFromMarkersImageFilterTestM0F0.png + 0 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedFromMarkersImageFilterTestM0F1 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedFromMarkersImageFilterTestM0F1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedFromMarkersImageFilterTestM0F1.png + itkMorphologicalWatershedFromMarkersImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-markers.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedFromMarkersImageFilterTestM0F1.png + 0 + 1) +itk_add_test( + NAME + itkMorphologicalWatershedFromMarkersImageFilterTestM1F0 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedFromMarkersImageFilterTestM1F0.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedFromMarkersImageFilterTestM1F0.png + itkMorphologicalWatershedFromMarkersImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-markers.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedFromMarkersImageFilterTestM1F0.png + 1 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedFromMarkersImageFilterTestM1F1 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedFromMarkersImageFilterTestM1F1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedFromMarkersImageFilterTestM1F1.png + itkMorphologicalWatershedFromMarkersImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/cthead1.png} + DATA{${ITK_DATA_ROOT}/Input/cthead1-markers.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedFromMarkersImageFilterTestM1F1.png + 1 + 1) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestButtonHoleM0F0 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestButtonHoleM0F0.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestButtonHoleM0F0.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/button-hole.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestButtonHoleM0F0.png + 0 + 0 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestPassValuesM0F0 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestPassValuesM0F0.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPassValuesM0F0.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/pass-values.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPassValuesM0F0.png + 0 + 0 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestPlateauM0F0 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestPlateauM0F0.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPlateauM0F0.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/plateau.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPlateauM0F0.png + 0 + 0 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestThickLinesM0F0 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestThickLinesM0F0.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestThickLinesM0F0.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/thick-lines.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestThickLinesM0F0.png + 0 + 0 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestButtonHoleM0F1 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestButtonHoleM0F1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestButtonHoleM0F1.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/button-hole.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestButtonHoleM0F1.png + 0 + 1 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestPassValuesM0F1 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestPassValuesM0F1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPassValuesM0F1.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/pass-values.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPassValuesM0F1.png + 0 + 1 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestPlateauM0F1 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestPlateauM0F1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPlateauM0F1.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/plateau.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPlateauM0F1.png + 0 + 1 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestThickLinesM0F1 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestThickLinesM0F1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestThickLinesM0F1.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/thick-lines.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestThickLinesM0F1.png + 0 + 1 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestButtonHoleM1F0 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestButtonHoleM1F0.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestButtonHoleM1F0.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/button-hole.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestButtonHoleM1F0.png + 1 + 0 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestPassValuesM1F0 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestPassValuesM1F0.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPassValuesM1F0.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/pass-values.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPassValuesM1F0.png + 1 + 0 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestPlateauM1F0 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestPlateauM1F0.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPlateauM1F0.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/plateau.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPlateauM1F0.png + 1 + 0 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestThickLinesM1F0 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestThickLinesM1F0.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestThickLinesM1F0.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/thick-lines.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestThickLinesM1F0.png + 1 + 0 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestButtonHoleM1F1 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestButtonHoleM1F1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestButtonHoleM1F1.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/button-hole.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestButtonHoleM1F1.png + 1 + 1 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestPassValuesM1F1 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestPassValuesM1F1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPassValuesM1F1.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/pass-values.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPassValuesM1F1.png + 1 + 1 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestPlateauM1F1 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestPlateauM1F1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPlateauM1F1.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/plateau.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestPlateauM1F1.png + 1 + 1 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestThickLinesM1F1 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestThickLinesM1F1.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestThickLinesM1F1.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/thick-lines.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestThickLinesM1F1.png + 1 + 1 + 0) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestLevel00 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestLevel00.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel00.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/level.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel00.png + 1 + 0 + 00) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestLevel10 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestLevel10.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel10.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/level.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel10.png + 1 + 0 + 10) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestLevel20 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestLevel20.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel20.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/level.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel20.png + 1 + 0 + 20) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestLevel30 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestLevel30.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel30.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/level.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel30.png + 1 + 0 + 30) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestLevel40 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestLevel40.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel40.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/level.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel40.png + 1 + 0 + 40) +itk_add_test( + NAME + itkMorphologicalWatershedImageFilterTestLevel50 + COMMAND + ITKWatershedsTestDriver + --compare + DATA{Baseline/itkMorphologicalWatershedImageFilterTestLevel50.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel50.png + itkMorphologicalWatershedImageFilterTest + DATA{${ITK_DATA_ROOT}/Input/level.png} + ${ITK_TEST_OUTPUT_DIR}/itkMorphologicalWatershedImageFilterTestLevel50.png + 1 + 0 + 50) diff --git a/Modules/Segmentation/Watersheds/wrapping/itkIsolatedWatershedImageFilter.wrap b/Modules/Segmentation/Watersheds/wrapping/itkIsolatedWatershedImageFilter.wrap index 9a4443ea06d..b78f4adfe0e 100644 --- a/Modules/Segmentation/Watersheds/wrapping/itkIsolatedWatershedImageFilter.wrap +++ b/Modules/Segmentation/Watersheds/wrapping/itkIsolatedWatershedImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::IsolatedWatershedImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2) itk_end_wrap_class() diff --git a/Modules/Segmentation/Watersheds/wrapping/itkMorphologicalWatershedFromMarkersImageFilter.wrap b/Modules/Segmentation/Watersheds/wrapping/itkMorphologicalWatershedFromMarkersImageFilter.wrap index b1c562078a2..ca21f4bdaa5 100644 --- a/Modules/Segmentation/Watersheds/wrapping/itkMorphologicalWatershedFromMarkersImageFilter.wrap +++ b/Modules/Segmentation/Watersheds/wrapping/itkMorphologicalWatershedFromMarkersImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MorphologicalWatershedFromMarkersImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}" 2+) +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}" 2+) itk_end_wrap_class() diff --git a/Modules/Segmentation/Watersheds/wrapping/itkMorphologicalWatershedImageFilter.wrap b/Modules/Segmentation/Watersheds/wrapping/itkMorphologicalWatershedImageFilter.wrap index 8534ee372da..b3999eaa10a 100644 --- a/Modules/Segmentation/Watersheds/wrapping/itkMorphologicalWatershedImageFilter.wrap +++ b/Modules/Segmentation/Watersheds/wrapping/itkMorphologicalWatershedImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::MorphologicalWatershedImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}" 2+) +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_INT}" 2+) itk_end_wrap_class() diff --git a/Modules/Segmentation/Watersheds/wrapping/itkTobogganImageFilter.wrap b/Modules/Segmentation/Watersheds/wrapping/itkTobogganImageFilter.wrap index e570f045bda..2105a568a05 100644 --- a/Modules/Segmentation/Watersheds/wrapping/itkTobogganImageFilter.wrap +++ b/Modules/Segmentation/Watersheds/wrapping/itkTobogganImageFilter.wrap @@ -3,8 +3,8 @@ # enabled, is not wrapped in the supporting classes on Windows. The # WatershedImageFilter outputs an Image with itk::IdentifierType # pixels. -if(NOT WIN32 OR NOT ITK_USE_64BITS_IDS ) +if(NOT WIN32 OR NOT ITK_USE_64BITS_IDS) itk_wrap_class("itk::TobogganImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) + itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() endif() diff --git a/Modules/Segmentation/Watersheds/wrapping/itkWatershedImageFilter.wrap b/Modules/Segmentation/Watersheds/wrapping/itkWatershedImageFilter.wrap index 447c765916c..f6915f8711b 100644 --- a/Modules/Segmentation/Watersheds/wrapping/itkWatershedImageFilter.wrap +++ b/Modules/Segmentation/Watersheds/wrapping/itkWatershedImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::WatershedImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) +itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 1) itk_end_wrap_class() diff --git a/Modules/Segmentation/Watersheds/wrapping/test/CMakeLists.txt b/Modules/Segmentation/Watersheds/wrapping/test/CMakeLists.txt index 56910b25692..0b8b1f5cff9 100644 --- a/Modules/Segmentation/Watersheds/wrapping/test/CMakeLists.txt +++ b/Modules/Segmentation/Watersheds/wrapping/test/CMakeLists.txt @@ -1,14 +1,23 @@ set(test_input_dir ${itk-module_SOURCE_DIR}/test/Input) set(test_baseline_dir ${itk-module_SOURCE_DIR}/test/Baseline) -list(FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index) -if(ITK_WRAP_PYTHON AND ITK_WRAP_float AND wrap_2_index GREATER -1) - itk_python_add_test(NAME PythonWatershedSegmentation1Test +list( + FIND + ITK_WRAP_IMAGE_DIMS + 2 + wrap_2_index) +if(ITK_WRAP_PYTHON + AND ITK_WRAP_float + AND wrap_2_index GREATER -1) + itk_python_add_test( + NAME + PythonWatershedSegmentation1Test TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/PythonWatershedSegmentation1Test.png - DATA{${test_baseline_dir}/PythonWatershedSegmentation1Test.png} - COMMAND WatershedSegmentation1Test.py - DATA{${test_input_dir}/VisibleWomanEyeSlice.png} - ${ITK_TEST_OUTPUT_DIR}/PythonWatershedSegmentation1Test.png - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/PythonWatershedSegmentation1Test.png + DATA{${test_baseline_dir}/PythonWatershedSegmentation1Test.png} + COMMAND + WatershedSegmentation1Test.py + DATA{${test_input_dir}/VisibleWomanEyeSlice.png} + ${ITK_TEST_OUTPUT_DIR}/PythonWatershedSegmentation1Test.png) endif() diff --git a/Modules/Video/BridgeOpenCV/CMakeLists.txt b/Modules/Video/BridgeOpenCV/CMakeLists.txt index 9c7fb5cce06..85ebda97703 100644 --- a/Modules/Video/BridgeOpenCV/CMakeLists.txt +++ b/Modules/Video/BridgeOpenCV/CMakeLists.txt @@ -1,10 +1,11 @@ cmake_minimum_required(VERSION 3.16.3 FATAL_ERROR) -foreach(p - ## Only policies introduced after the cmake_minimum_required - ## version need to explicitly be set to NEW. - CMP0070 #3.10.0 Define ``file(GENERATE)`` behavior for relative paths. - CMP0071 #3.10.0 Let ``AUTOMOC`` and ``AUTOUIC`` process ``GENERATED`` files. - ) +foreach( + p + ## Only policies introduced after the cmake_minimum_required + ## version need to explicitly be set to NEW. + CMP0070 #3.10.0 Define ``file(GENERATE)`` behavior for relative paths. + CMP0071 #3.10.0 Let ``AUTOMOC`` and ``AUTOUIC`` process ``GENERATED`` files. +) if(POLICY ${p}) cmake_policy(SET ${p} NEW) endif() @@ -18,13 +19,15 @@ project(ITKVideoBridgeOpenCV) set(ITKVideoBridgeOpenCV_LIBRARIES ITKVideoBridgeOpenCV) # When this module is loaded by an app, load OpenCV too. -set(ITKVideoBridgeOpenCV_EXPORT_CODE_INSTALL " +set(ITKVideoBridgeOpenCV_EXPORT_CODE_INSTALL + " set(OpenCV_CUDA ${OpenCV_CUDA}) # Windows specific option set(OpenCV_STATIC ${OpenCV_STATIC}) # Windows specific option set(OpenCV_DIR \"${OpenCV_DIR}\") find_package(OpenCV REQUIRED) ") -set(ITKVideoBridgeOpenCV_EXPORT_CODE_BUILD " +set(ITKVideoBridgeOpenCV_EXPORT_CODE_BUILD + " if(NOT ITK_BINARY_DIR) set(OpenCV_CUDA ${OpenCV_CUDA}) # Windows specific option set(OpenCV_STATIC ${OpenCV_STATIC}) # Windows specific option diff --git a/Modules/Video/BridgeOpenCV/itk-module.cmake b/Modules/Video/BridgeOpenCV/itk-module.cmake index 9194bcdcf44..444ac10d806 100644 --- a/Modules/Video/BridgeOpenCV/itk-module.cmake +++ b/Modules/Video/BridgeOpenCV/itk-module.cmake @@ -1,14 +1,15 @@ -set(DOCUMENTATION "This module contains both I/O and bridging methods needed +set(DOCUMENTATION + "This module contains both I/O and bridging methods needed for interacting with and utilizing OpenCV within ITK. This includes symmetric bridges for both image data and video data.") -itk_module(ITKVideoBridgeOpenCV +itk_module( + ITKVideoBridgeOpenCV ENABLE_SHARED DEPENDS - ITKVideoIO + ITKVideoIO TEST_DEPENDS - ITKTestKernel + ITKTestKernel EXCLUDE_FROM_DEFAULT DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Video/BridgeOpenCV/src/CMakeLists.txt b/Modules/Video/BridgeOpenCV/src/CMakeLists.txt index 3f5a72e48a3..ac78a30904d 100644 --- a/Modules/Video/BridgeOpenCV/src/CMakeLists.txt +++ b/Modules/Video/BridgeOpenCV/src/CMakeLists.txt @@ -1,7 +1,4 @@ -set(ITKVideoBridgeOpenCV_SRC -itkOpenCVVideoIO.cxx -itkOpenCVVideoIOFactory.cxx -) +set(ITKVideoBridgeOpenCV_SRC itkOpenCVVideoIO.cxx itkOpenCVVideoIOFactory.cxx) add_library(ITKVideoBridgeOpenCV ${ITKVideoBridgeOpenCV_SRC}) itk_module_link_dependencies() diff --git a/Modules/Video/BridgeOpenCV/test/CMakeLists.txt b/Modules/Video/BridgeOpenCV/test/CMakeLists.txt index d54c9ebcc54..fb7fa31c4fb 100644 --- a/Modules/Video/BridgeOpenCV/test/CMakeLists.txt +++ b/Modules/Video/BridgeOpenCV/test/CMakeLists.txt @@ -1,95 +1,104 @@ itk_module_test() set(ITKVideoBridgeOpenCVTests - itkOpenCVVideoCaptureTest.cxx - itkOpenCVImageBridgeGrayScaleTest.cxx - itkOpenCVImageBridgeRGBTest.cxx - itkOpenCVVideoIOTest.cxx - itkOpenCVVideoIOFactoryTest.cxx - itkOpenCVBasicTypeBridgeTest.cxx -) + itkOpenCVVideoCaptureTest.cxx + itkOpenCVImageBridgeGrayScaleTest.cxx + itkOpenCVImageBridgeRGBTest.cxx + itkOpenCVVideoIOTest.cxx + itkOpenCVVideoIOFactoryTest.cxx + itkOpenCVBasicTypeBridgeTest.cxx) include_directories(${ITKVideoBridgeOpenCV_INCLUDE_DIRS}) -CreateTestDriver(ITKVideoBridgeOpenCV +createtestdriver( + ITKVideoBridgeOpenCV "${ITKVideoBridgeOpenCV-Test_LIBRARIES};${OpenCV_LIBS}" "${ITKVideoBridgeOpenCVTests}" - itkOpenCVTestHelper.cxx - ) + itkOpenCVTestHelper.cxx) # OpenCVVideoCapture: -itk_add_test(NAME +itk_add_test( + NAME OpenCVVideoCaptureTest - COMMAND ITKVideoBridgeOpenCVTestDriver - itkOpenCVVideoCaptureTest - # Video Input: - DATA{Input/inde-circulation_short.avi} - # Scalar Output: - ${ITK_TEST_OUTPUT_DIR}/OpenCVVideoCaptureTest_ScalarOut.avi - # RGB Output: - ${ITK_TEST_OUTPUT_DIR}/OpenCVVideoCaptureTest_RGBOut.avi - # Width Height - 320 240 - ) + COMMAND + ITKVideoBridgeOpenCVTestDriver + itkOpenCVVideoCaptureTest + # Video Input: + DATA{Input/inde-circulation_short.avi} + # Scalar Output: + ${ITK_TEST_OUTPUT_DIR}/OpenCVVideoCaptureTest_ScalarOut.avi + # RGB Output: + ${ITK_TEST_OUTPUT_DIR}/OpenCVVideoCaptureTest_RGBOut.avi + # Width Height + 320 + 240) # OpenCVImageBridge: # NOTE: For some reason, ITK reads jpg files slightly differently than # OpenCV, so we need both jpg and mha versions to guarantee consistency itk_add_test( - NAME OpenCVImageBridgeGrayScaleTest - COMMAND ITKVideoBridgeOpenCVTestDriver - itkOpenCVImageBridgeGrayScaleTest - # Input Grayscale Image jpg - DATA{Input/frame0_gray.jpg} - # Input Grayscale Image jpg 2, with odd pixel dimension - DATA{Input/peppers_513x512.jpg} - # Input Grayscale Image png, with two-byte pixels - DATA{Input/IM11.png} - ) + NAME + OpenCVImageBridgeGrayScaleTest + COMMAND + ITKVideoBridgeOpenCVTestDriver + itkOpenCVImageBridgeGrayScaleTest + # Input Grayscale Image jpg + DATA{Input/frame0_gray.jpg} + # Input Grayscale Image jpg 2, with odd pixel dimension + DATA{Input/peppers_513x512.jpg} + # Input Grayscale Image png, with two-byte pixels + DATA{Input/IM11.png}) itk_add_test( - NAME OpenCVImageBridgeRGBTest - COMMAND ITKVideoBridgeOpenCVTestDriver - itkOpenCVImageBridgeRGBTest - # Input RGB Image jpg: - DATA{Input/frame0.jpg} - # Input RGB Image mha: - DATA{Input/frame0.mha} - # Input RGB Image 513x512 - DATA{Input/peppers_513x512_rgb.png} - ) + NAME + OpenCVImageBridgeRGBTest + COMMAND + ITKVideoBridgeOpenCVTestDriver + itkOpenCVImageBridgeRGBTest + # Input RGB Image jpg: + DATA{Input/frame0.jpg} + # Input RGB Image mha: + DATA{Input/frame0.mha} + # Input RGB Image 513x512 + DATA{Input/peppers_513x512_rgb.png}) # OpenCVVideoIO: itk_add_test( - NAME OpenCVVideoIOTest - COMMAND ITKVideoBridgeOpenCVTestDriver - itkOpenCVVideoIOTest - # Video Input: - DATA{Input/inde-circulation_short.avi} - # Non-Video Input: - foo.txt - # Output: - ${ITK_TEST_OUTPUT_DIR}/OpenCVVideoIOTest_Out.avi - # Webcam Output: - ${ITK_TEST_OUTPUT_DIR}/OpenCVVideoIOTest_CameraOut.mha - # Width Height NumFrames FpS - 320 240 30 14.985 - ) + NAME + OpenCVVideoIOTest + COMMAND + ITKVideoBridgeOpenCVTestDriver + itkOpenCVVideoIOTest + # Video Input: + DATA{Input/inde-circulation_short.avi} + # Non-Video Input: + foo.txt + # Output: + ${ITK_TEST_OUTPUT_DIR}/OpenCVVideoIOTest_Out.avi + # Webcam Output: + ${ITK_TEST_OUTPUT_DIR}/OpenCVVideoIOTest_CameraOut.mha + # Width Height NumFrames FpS + 320 + 240 + 30 + 14.985) # OpenCVVideoIOFactory: itk_add_test( - NAME OpenCVVideoIOFactoryTest - COMMAND ITKVideoBridgeOpenCVTestDriver - itkOpenCVVideoIOFactoryTest - # Video Input: - DATA{Input/inde-circulation_short.avi} - # Output: - ${ITK_TEST_OUTPUT_DIR}/OpenCVVideoIOTest_Out.avi - # Webcam Number: - 0 - ) + NAME + OpenCVVideoIOFactoryTest + COMMAND + ITKVideoBridgeOpenCVTestDriver + itkOpenCVVideoIOFactoryTest + # Video Input: + DATA{Input/inde-circulation_short.avi} + # Output: + ${ITK_TEST_OUTPUT_DIR}/OpenCVVideoIOTest_Out.avi + # Webcam Number: + 0) # OpenCVBasicTypeBridgeTest itk_add_test( - NAME OpenCVBasicTypeBridgeTest - COMMAND ITKVideoBridgeOpenCVTestDriver - itkOpenCVBasicTypeBridgeTest -) + NAME + OpenCVBasicTypeBridgeTest + COMMAND + ITKVideoBridgeOpenCVTestDriver + itkOpenCVBasicTypeBridgeTest) diff --git a/Modules/Video/BridgeVXL/itk-module-init.cmake b/Modules/Video/BridgeVXL/itk-module-init.cmake index 6175777d69d..2d06de926e3 100644 --- a/Modules/Video/BridgeVXL/itk-module-init.cmake +++ b/Modules/Video/BridgeVXL/itk-module-init.cmake @@ -1,7 +1,7 @@ if(ITK_USE_SYSTEM_VXL) find_package(VXL 2.0.2 REQUIRED) - if (VXL_FOUND) + if(VXL_FOUND) include(${VXL_CMAKE_DIR}/UseVXL.cmake) message("ITK_USE_SYSTEM_VXL is ON; Use an outside build of VXL. ") endif() diff --git a/Modules/Video/BridgeVXL/itk-module.cmake b/Modules/Video/BridgeVXL/itk-module.cmake index 150d8423025..1878f679eea 100644 --- a/Modules/Video/BridgeVXL/itk-module.cmake +++ b/Modules/Video/BridgeVXL/itk-module.cmake @@ -1,13 +1,13 @@ set(DOCUMENTATION "This module contains both I/O and bridging methods needed for interacting with and utilizing VXL within ITK.") -itk_module(ITKVideoBridgeVXL +itk_module( + ITKVideoBridgeVXL ENABLE_SHARED DEPENDS - ITKVideoIO + ITKVideoIO TEST_DEPENDS - ITKTestKernel + ITKTestKernel EXCLUDE_FROM_DEFAULT DESCRIPTION - "${DOCUMENTATION}" - ) + "${DOCUMENTATION}") diff --git a/Modules/Video/BridgeVXL/src/CMakeLists.txt b/Modules/Video/BridgeVXL/src/CMakeLists.txt index a2bcc0ec658..e0ca1493bea 100644 --- a/Modules/Video/BridgeVXL/src/CMakeLists.txt +++ b/Modules/Video/BridgeVXL/src/CMakeLists.txt @@ -1,9 +1,10 @@ -set(ITKVideoBridgeVXL_SRC -itkVXLVideoIO.cxx -itkVXLVideoIOFactory.cxx -) +set(ITKVideoBridgeVXL_SRC itkVXLVideoIO.cxx itkVXLVideoIOFactory.cxx) add_library(ITKVideoBridgeVXL ${ITKVideoBridgeVXL_SRC}) itk_module_link_dependencies() -target_link_libraries(ITKVideoBridgeVXL LINK_PUBLIC vidl vul) +target_link_libraries( + ITKVideoBridgeVXL + LINK_PUBLIC + vidl + vul) itk_module_target(ITKVideoBridgeVXL) diff --git a/Modules/Video/BridgeVXL/test/CMakeLists.txt b/Modules/Video/BridgeVXL/test/CMakeLists.txt index c8c6b864ba6..69610cb14b6 100644 --- a/Modules/Video/BridgeVXL/test/CMakeLists.txt +++ b/Modules/Video/BridgeVXL/test/CMakeLists.txt @@ -1,17 +1,10 @@ itk_module_test() -set(ITKVideoBridgeVXLTests -itkVXLVideoIOFactoryTest.cxx -itkVXLVideoIOTest.cxx -vidl_itk_istreamTest.cxx -) +set(ITKVideoBridgeVXLTests itkVXLVideoIOFactoryTest.cxx itkVXLVideoIOTest.cxx vidl_itk_istreamTest.cxx) if(ITK_USE_SYSTEM_VXL) include(${VXL_CMAKE_DIR}/UseVXL.cmake) endif() -CreateTestDriver(ITKVideoBridgeVXL - "${ITKVideoBridgeVXL-Test_LIBRARIES};vul;vidl" - "${ITKVideoBridgeVXLTests}") - +createtestdriver(ITKVideoBridgeVXL "${ITKVideoBridgeVXL-Test_LIBRARIES};vul;vidl" "${ITKVideoBridgeVXLTests}") #Disable this test for now ( to avoid polluting the dashboard) # due to potential VXL ffmpeg (vidl_ffmpeg_ostream) related memoery leaks. @@ -31,21 +24,28 @@ CreateTestDriver(ITKVideoBridgeVXL # 320 240 1396 14.985 # ) -itk_add_test(NAME VXLVideoIOFactoryTest - COMMAND ITKVideoBridgeVXLTestDriver itkVXLVideoIOFactoryTest - # Video Input: - DATA{Input/inde-circulation.avi} - # Output: - ${ITK_TEST_OUTPUT_DIR}/VXLVideoIOTest_Out.avi - # Webcam Number: - 0 - ) -itk_add_test(NAME vidl_itk_istreamTest - COMMAND ITKVideoBridgeVXLTestDriver vidl_itk_istreamTest - # Video Input: - DATA{Input/inde-circulation_short.avi} - # Output: - ${ITK_TEST_OUTPUT_DIR}/vidl_itk_istreamTest_Out.avi - # Width Height - 320 240 - ) +itk_add_test( + NAME + VXLVideoIOFactoryTest + COMMAND + ITKVideoBridgeVXLTestDriver + itkVXLVideoIOFactoryTest + # Video Input: + DATA{Input/inde-circulation.avi} + # Output: + ${ITK_TEST_OUTPUT_DIR}/VXLVideoIOTest_Out.avi + # Webcam Number: + 0) +itk_add_test( + NAME + vidl_itk_istreamTest + COMMAND + ITKVideoBridgeVXLTestDriver + vidl_itk_istreamTest + # Video Input: + DATA{Input/inde-circulation_short.avi} + # Output: + ${ITK_TEST_OUTPUT_DIR}/vidl_itk_istreamTest_Out.avi + # Width Height + 320 + 240) diff --git a/Modules/Video/Core/itk-module.cmake b/Modules/Video/Core/itk-module.cmake index 09ff2fde6b7..bbba9fdefee 100644 --- a/Modules/Video/Core/itk-module.cmake +++ b/Modules/Video/Core/itk-module.cmake @@ -1,17 +1,18 @@ -set(DOCUMENTATION "This module contains base classes for processing data that +set(DOCUMENTATION + "This module contains base classes for processing data that possesses a temporal element. The classes contained in this module extend the traditional data object and process objects to handle time properly and also contain convenience classes for passing temporal regions and dealing with ITK images over time in the form of itk::VideoStream and itk::VideoToVideoFilter objects.") -itk_module(ITKVideoCore +itk_module( + ITKVideoCore ENABLE_SHARED DEPENDS - ITKCommon + ITKCommon TEST_DEPENDS - ITKTestKernel - ITKVideoIO + ITKTestKernel + ITKVideoIO DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Video/Core/src/CMakeLists.txt b/Modules/Video/Core/src/CMakeLists.txt index ec09436be69..7d6e3935f54 100644 --- a/Modules/Video/Core/src/CMakeLists.txt +++ b/Modules/Video/Core/src/CMakeLists.txt @@ -1,7 +1,3 @@ -set(ITKVideoCore_SRCS - itkTemporalRegion.cxx - itkTemporalDataObject.cxx - itkTemporalProcessObject.cxx - ) +set(ITKVideoCore_SRCS itkTemporalRegion.cxx itkTemporalDataObject.cxx itkTemporalProcessObject.cxx) itk_module_add_library(ITKVideoCore ${ITKVideoCore_SRCS}) diff --git a/Modules/Video/Core/test/CMakeLists.txt b/Modules/Video/Core/test/CMakeLists.txt index 50b5e00a6af..01273faf676 100644 --- a/Modules/Video/Core/test/CMakeLists.txt +++ b/Modules/Video/Core/test/CMakeLists.txt @@ -1,78 +1,97 @@ itk_module_test() set(ITKVideoCoreTests - itkImageToVideoFilterTest.cxx - itkRingBufferTest.cxx - itkTemporalRegionTest.cxx - itkTemporalDataObjectTest.cxx - itkTemporalProcessObjectTest.cxx - itkVectorImageToVideoTest.cxx - itkVideoStreamTest.cxx - itkVideoSourceTest.cxx - itkVideoToVideoFilterTest.cxx -) + itkImageToVideoFilterTest.cxx + itkRingBufferTest.cxx + itkTemporalRegionTest.cxx + itkTemporalDataObjectTest.cxx + itkTemporalProcessObjectTest.cxx + itkVectorImageToVideoTest.cxx + itkVideoStreamTest.cxx + itkVideoSourceTest.cxx + itkVideoToVideoFilterTest.cxx) -CreateTestDriver(ITKVideoCore "${ITKVideoCore-Test_LIBRARIES}" "${ITKVideoCoreTests}") +createtestdriver(ITKVideoCore "${ITKVideoCore-Test_LIBRARIES}" "${ITKVideoCoreTests}") # VideoToVideoFilterTest itk_add_test( - NAME VideoToVideoFilterTest - COMMAND ITKVideoCoreTestDriver - itkVideoToVideoFilterTest) + NAME + VideoToVideoFilterTest + COMMAND + ITKVideoCoreTestDriver + itkVideoToVideoFilterTest) # VideoSourceTest itk_add_test( - NAME VideoSourceTest - COMMAND ITKVideoCoreTestDriver - itkVideoSourceTest) + NAME + VideoSourceTest + COMMAND + ITKVideoCoreTestDriver + itkVideoSourceTest) # VideoStreamTest # This is failing for unknown reasons on some platforms. Disabling for now # for the dashboards sake until we have time to debug further. if(0) -itk_add_test( - NAME VideoStreamTest - COMMAND ITKVideoCoreTestDriver + itk_add_test( + NAME + VideoStreamTest + COMMAND + ITKVideoCoreTestDriver itkVideoStreamTest) endif() # TemporalProcessObjectTest itk_add_test( - NAME TemporalProcessObjectTest - COMMAND ITKVideoCoreTestDriver - itkTemporalProcessObjectTest) + NAME + TemporalProcessObjectTest + COMMAND + ITKVideoCoreTestDriver + itkTemporalProcessObjectTest) # RingBufferTest itk_add_test( - NAME RingBufferTest - COMMAND ITKVideoCoreTestDriver - itkRingBufferTest) + NAME + RingBufferTest + COMMAND + ITKVideoCoreTestDriver + itkRingBufferTest) # Testing Temporal Regions itk_add_test( - NAME TemporalRegionTest - COMMAND ITKVideoCoreTestDriver - itkTemporalRegionTest) + NAME + TemporalRegionTest + COMMAND + ITKVideoCoreTestDriver + itkTemporalRegionTest) # Testing Temporal Data Object itk_add_test( - NAME TemporalDataObjectTest - COMMAND ITKVideoCoreTestDriver - itkTemporalDataObjectTest) + NAME + TemporalDataObjectTest + COMMAND + ITKVideoCoreTestDriver + itkTemporalDataObjectTest) itk_add_test( - NAME ImageToVideoFilterTest - COMMAND ITKVideoCoreTestDriver - --compare DATA{Baseline/HeadMRVolume_Frame0.mha} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume_Frame0.mha - itkImageToVideoFilterTest - DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeCompressed.mha} - ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume_Frame0.mha) + NAME + ImageToVideoFilterTest + COMMAND + ITKVideoCoreTestDriver + --compare + DATA{Baseline/HeadMRVolume_Frame0.mha} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume_Frame0.mha + itkImageToVideoFilterTest + DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeCompressed.mha} + ${ITK_TEST_OUTPUT_DIR}/HeadMRVolume_Frame0.mha) itk_add_test( - NAME VectorImageToVideoTest - COMMAND ITKVideoCoreTestDriver - --compare DATA{Baseline/RGBTestImage_Slice0.png} - ${ITK_TEST_OUTPUT_DIR}/RGBTestImage_Slice0.png - itkVectorImageToVideoTest - DATA{${ITK_DATA_ROOT}/Input/RGBTestImage.tif} - ${ITK_TEST_OUTPUT_DIR}/RGBTestImage_Slice0.png) + NAME + VectorImageToVideoTest + COMMAND + ITKVideoCoreTestDriver + --compare + DATA{Baseline/RGBTestImage_Slice0.png} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImage_Slice0.png + itkVectorImageToVideoTest + DATA{${ITK_DATA_ROOT}/Input/RGBTestImage.tif} + ${ITK_TEST_OUTPUT_DIR}/RGBTestImage_Slice0.png) diff --git a/Modules/Video/Core/wrapping/CMakeLists.txt b/Modules/Video/Core/wrapping/CMakeLists.txt index 806e1897513..bf9d0c64e68 100644 --- a/Modules/Video/Core/wrapping/CMakeLists.txt +++ b/Modules/Video/Core/wrapping/CMakeLists.txt @@ -1,10 +1,9 @@ itk_wrap_module(ITKVideoCore) set(WRAPPER_SUBMODULE_ORDER - itkTemporalRegion - itkRingBuffer - itkTemporalDataObject - itkVideoStream -) + itkTemporalRegion + itkRingBuffer + itkTemporalDataObject + itkVideoStream) itk_auto_load_and_end_wrap_submodules() diff --git a/Modules/Video/Core/wrapping/itkImageToVideoFilter.wrap b/Modules/Video/Core/wrapping/itkImageToVideoFilter.wrap index c216f79e7f5..04e0449c1c4 100644 --- a/Modules/Video/Core/wrapping/itkImageToVideoFilter.wrap +++ b/Modules/Video/Core/wrapping/itkImageToVideoFilter.wrap @@ -6,20 +6,24 @@ itk_wrap_include("itkVideoStream.h") set(m_d "9999999") foreach(d ${ITK_WRAP_IMAGE_DIMS}) if(${d} LESS ${m_d}) - set(m_d ${d}) + set(m_d ${d}) endif() endforeach() -string(REPLACE ${m_d} "" INPUT_DIMS "${ITK_WRAP_IMAGE_DIMS}") +string( + REPLACE ${m_d} + "" + INPUT_DIMS + "${ITK_WRAP_IMAGE_DIMS}") itk_wrap_class("itk::ImageToVideoFilter" POINTER) - foreach(d ${INPUT_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("I${ITKM_${t}}${d}" "${ITKT_I${ITKM_${t}}${d}}") +foreach(d ${INPUT_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("I${ITKM_${t}}${d}" "${ITKT_I${ITKM_${t}}${d}}") - # Explicitly wrap vector image template arguments - DECREMENT(d2 ${d}) - itk_wrap_template("VI${ITKM_${t}}${d}VI${ITKM_${t}}${d2}" - "${ITKT_VI${ITKM_${t}}${d}}, itk::VideoStream<${ITKT_VI${ITKM_${t}}${d2}}>") - endforeach() + # Explicitly wrap vector image template arguments + decrement(d2 ${d}) + itk_wrap_template("VI${ITKM_${t}}${d}VI${ITKM_${t}}${d2}" + "${ITKT_VI${ITKM_${t}}${d}}, itk::VideoStream<${ITKT_VI${ITKM_${t}}${d2}}>") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Video/Core/wrapping/itkRingBuffer.wrap b/Modules/Video/Core/wrapping/itkRingBuffer.wrap index 5cb1f065bce..512685db3e2 100644 --- a/Modules/Video/Core/wrapping/itkRingBuffer.wrap +++ b/Modules/Video/Core/wrapping/itkRingBuffer.wrap @@ -1,10 +1,10 @@ itk_wrap_include("itkImage.h") itk_wrap_class("itk::RingBuffer" POINTER) - itk_wrap_template("DO" "itk::DataObject") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("I${ITKM_${t}}${d}" "itk::Image<${ITKT_${t}}, ${d}>") - endforeach() +itk_wrap_template("DO" "itk::DataObject") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("I${ITKM_${t}}${d}" "itk::Image<${ITKT_${t}}, ${d}>") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Video/Core/wrapping/itkVideoSource.wrap b/Modules/Video/Core/wrapping/itkVideoSource.wrap index 4711acfe8d7..319f6da472e 100644 --- a/Modules/Video/Core/wrapping/itkVideoSource.wrap +++ b/Modules/Video/Core/wrapping/itkVideoSource.wrap @@ -1,10 +1,10 @@ itk_wrap_include("itkVideoStream.h") itk_wrap_class("itk::VideoSource" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("VSI${ITKM_${t}}${d}" "itk::VideoStream<${ITKT_I${ITKM_${t}}${d}}>") - itk_wrap_template("VSVI${ITKM_${t}}${d}" "itk::VideoStream<${ITKT_VI${ITKM_${t}}${d}}>") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("VSI${ITKM_${t}}${d}" "itk::VideoStream<${ITKT_I${ITKM_${t}}${d}}>") + itk_wrap_template("VSVI${ITKM_${t}}${d}" "itk::VideoStream<${ITKT_VI${ITKM_${t}}${d}}>") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Video/Core/wrapping/itkVideoStream.wrap b/Modules/Video/Core/wrapping/itkVideoStream.wrap index db0b5ec7b64..1ac5148a835 100644 --- a/Modules/Video/Core/wrapping/itkVideoStream.wrap +++ b/Modules/Video/Core/wrapping/itkVideoStream.wrap @@ -1,8 +1,8 @@ itk_wrap_class("itk::VideoStream" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(t ${WRAP_ITK_SCALAR}) - itk_wrap_template("I${ITKM_${t}}${d}" "${ITKT_I${ITKM_${t}}${d}}") - itk_wrap_template("VI${ITKM_${t}}${d}" "${ITKT_VI${ITKM_${t}}${d}}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(t ${WRAP_ITK_SCALAR}) + itk_wrap_template("I${ITKM_${t}}${d}" "${ITKT_I${ITKM_${t}}${d}}") + itk_wrap_template("VI${ITKM_${t}}${d}" "${ITKT_VI${ITKM_${t}}${d}}") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Video/Filtering/itk-module.cmake b/Modules/Video/Filtering/itk-module.cmake index 498ffe4d6e2..d5dcbe15659 100644 --- a/Modules/Video/Filtering/itk-module.cmake +++ b/Modules/Video/Filtering/itk-module.cmake @@ -1,12 +1,12 @@ set(DOCUMENTATION "This module contains a group of basic video filtering classes.") -itk_module(ITKVideoFiltering +itk_module( + ITKVideoFiltering DEPENDS - ITKVideoCore + ITKVideoCore TEST_DEPENDS - ITKTestKernel - ITKVideoIO - ITKSmoothing + ITKTestKernel + ITKVideoIO + ITKSmoothing DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Video/Filtering/test/CMakeLists.txt b/Modules/Video/Filtering/test/CMakeLists.txt index 0aad71c841d..0f6b981b0d9 100644 --- a/Modules/Video/Filtering/test/CMakeLists.txt +++ b/Modules/Video/Filtering/test/CMakeLists.txt @@ -1,42 +1,54 @@ itk_module_test() set(ITKVideoFilteringTests - itkFrameAverageVideoFilterTest.cxx - itkDecimateFramesVideoFilterTest.cxx - itkImageFilterToVideoFilterWrapperTest.cxx - itkFrameDifferenceVideoFilterTest.cxx -) + itkFrameAverageVideoFilterTest.cxx + itkDecimateFramesVideoFilterTest.cxx + itkImageFilterToVideoFilterWrapperTest.cxx + itkFrameDifferenceVideoFilterTest.cxx) -CreateTestDriver(ITKVideoFiltering "${ITKVideoFiltering-Test_LIBRARIES}" "${ITKVideoFilteringTests}") +createtestdriver(ITKVideoFiltering "${ITKVideoFiltering-Test_LIBRARIES}" "${ITKVideoFilteringTests}") # FrameAverageVideoFilter -itk_add_test(NAME FrameAverageVideoFilterTest - COMMAND ITKVideoFilteringTestDriver itkFrameAverageVideoFilterTest - # Input - "DATA{Input/frame0.jpg},DATA{Input/frame1.jpg},DATA{Input/frame2.jpg},DATA{Input/frame3.jpg},DATA{Input/frame4.jpg}" -#,DATA{Input/frame2.jpg},DATA{Input/frame3.jpg},DATA{Input/frame4.jpg}" - # Output - "${ITK_TEST_OUTPUT_DIR}/avg_frame0.png,${ITK_TEST_OUTPUT_DIR}/avg_frame1.png,${ITK_TEST_OUTPUT_DIR}/avg_frame2.png" - ) +itk_add_test( + NAME + FrameAverageVideoFilterTest + COMMAND + ITKVideoFilteringTestDriver + itkFrameAverageVideoFilterTest + # Input + "DATA{Input/frame0.jpg},DATA{Input/frame1.jpg},DATA{Input/frame2.jpg},DATA{Input/frame3.jpg},DATA{Input/frame4.jpg}" + #,DATA{Input/frame2.jpg},DATA{Input/frame3.jpg},DATA{Input/frame4.jpg}" + # Output + "${ITK_TEST_OUTPUT_DIR}/avg_frame0.png,${ITK_TEST_OUTPUT_DIR}/avg_frame1.png,${ITK_TEST_OUTPUT_DIR}/avg_frame2.png") # DecimateFramesVideoFilter -itk_add_test(NAME DecimateFramesVideoFilterTest - COMMAND ITKVideoFilteringTestDriver itkDecimateFramesVideoFilterTest - # Input - "DATA{Input/frame0.jpg},DATA{Input/frame1.jpg},DATA{Input/frame2.jpg},DATA{Input/frame3.jpg},DATA{Input/frame4.jpg}" - # Output - "${ITK_TEST_OUTPUT_DIR}/dec_frame0.png,${ITK_TEST_OUTPUT_DIR}/dec_frame1.png" - ) +itk_add_test( + NAME + DecimateFramesVideoFilterTest + COMMAND + ITKVideoFilteringTestDriver + itkDecimateFramesVideoFilterTest + # Input + "DATA{Input/frame0.jpg},DATA{Input/frame1.jpg},DATA{Input/frame2.jpg},DATA{Input/frame3.jpg},DATA{Input/frame4.jpg}" + # Output + "${ITK_TEST_OUTPUT_DIR}/dec_frame0.png,${ITK_TEST_OUTPUT_DIR}/dec_frame1.png") # ImageFilterToVideoFilterWrapperTest -itk_add_test(NAME ImageFilterToVideoFilterWrapperTest - COMMAND ITKVideoFilteringTestDriver itkImageFilterToVideoFilterWrapperTest - # Input - "DATA{Input/frame0.jpg},DATA{Input/frame1.jpg},DATA{Input/frame2.jpg},DATA{Input/frame3.jpg},DATA{Input/frame4.jpg}" - # Output - "${ITK_TEST_OUTPUT_DIR}/wrapper_frame0.png,${ITK_TEST_OUTPUT_DIR}/wrapper_frame1.png,${ITK_TEST_OUTPUT_DIR}/wrapper_frame2.png,${ITK_TEST_OUTPUT_DIR}/wrapper_frame3.png,${ITK_TEST_OUTPUT_DIR}/wrapper_frame4.png" - ) +itk_add_test( + NAME + ImageFilterToVideoFilterWrapperTest + COMMAND + ITKVideoFilteringTestDriver + itkImageFilterToVideoFilterWrapperTest + # Input + "DATA{Input/frame0.jpg},DATA{Input/frame1.jpg},DATA{Input/frame2.jpg},DATA{Input/frame3.jpg},DATA{Input/frame4.jpg}" + # Output + "${ITK_TEST_OUTPUT_DIR}/wrapper_frame0.png,${ITK_TEST_OUTPUT_DIR}/wrapper_frame1.png,${ITK_TEST_OUTPUT_DIR}/wrapper_frame2.png,${ITK_TEST_OUTPUT_DIR}/wrapper_frame3.png,${ITK_TEST_OUTPUT_DIR}/wrapper_frame4.png" +) # FrameDifferenceVideoFilter -itk_add_test(NAME FrameDifferenceVideoFilterTest - COMMAND ITKVideoFilteringTestDriver itkFrameDifferenceVideoFilterTest - ) +itk_add_test( + NAME + FrameDifferenceVideoFilterTest + COMMAND + ITKVideoFilteringTestDriver + itkFrameDifferenceVideoFilterTest) diff --git a/Modules/Video/IO/itk-module.cmake b/Modules/Video/IO/itk-module.cmake index 72b52285f5a..21cf75f9d44 100644 --- a/Modules/Video/IO/itk-module.cmake +++ b/Modules/Video/IO/itk-module.cmake @@ -1,14 +1,15 @@ -set(DOCUMENTATION "This module contains the basic framework for Video IO as +set(DOCUMENTATION + "This module contains the basic framework for Video IO as well as the itk::FileListVideoIO mechanism that does not depend on any outside libraries.") -itk_module(ITKVideoIO +itk_module( + ITKVideoIO ENABLE_SHARED DEPENDS - ITKIOImageBase - ITKVideoCore + ITKIOImageBase + ITKVideoCore TEST_DEPENDS - ITKTestKernel + ITKTestKernel DESCRIPTION - "${DOCUMENTATION}" -) + "${DOCUMENTATION}") diff --git a/Modules/Video/IO/src/CMakeLists.txt b/Modules/Video/IO/src/CMakeLists.txt index 7d5295dc407..3d9e18f8251 100644 --- a/Modules/Video/IO/src/CMakeLists.txt +++ b/Modules/Video/IO/src/CMakeLists.txt @@ -1,8 +1,7 @@ set(ITKVideoIO_SRCS - itkFileListVideoIO.cxx - itkFileListVideoIOFactory.cxx - itkVideoIOBase.cxx - itkVideoIOFactory.cxx - ) + itkFileListVideoIO.cxx + itkFileListVideoIOFactory.cxx + itkVideoIOBase.cxx + itkVideoIOFactory.cxx) itk_module_add_library(ITKVideoIO ${ITKVideoIO_SRCS}) diff --git a/Modules/Video/IO/test/CMakeLists.txt b/Modules/Video/IO/test/CMakeLists.txt index ae057aecd48..861c4d204c4 100644 --- a/Modules/Video/IO/test/CMakeLists.txt +++ b/Modules/Video/IO/test/CMakeLists.txt @@ -1,56 +1,56 @@ itk_module_test() -set(ITKVideoIOTests - itkVideoFileReaderWriterTest.cxx - itkFileListVideoIOTest.cxx - itkFileListVideoIOFactoryTest.cxx -) +set(ITKVideoIOTests itkVideoFileReaderWriterTest.cxx itkFileListVideoIOTest.cxx itkFileListVideoIOFactoryTest.cxx) -CreateTestDriver(ITKVideoIO - "${ITKVideoIO-Test_LIBRARIES}" - "${ITKVideoIOTests}" -) +createtestdriver(ITKVideoIO "${ITKVideoIO-Test_LIBRARIES}" "${ITKVideoIOTests}") # VideoFileRederWriterTest: itk_add_test( - NAME VideoFileReaderWriterTest - COMMAND ITKVideoIOTestDriver - itkVideoFileReaderWriterTest - DATA{Input/frame0.jpg} - DATA{Input/frame1.jpg} - DATA{Input/frame2.jpg} - DATA{Input/frame3.jpg} - DATA{Input/frame4.jpg} - "${ITK_TEST_OUTPUT_DIR}/frame0.png,${ITK_TEST_OUTPUT_DIR}/frame1.png,${ITK_TEST_OUTPUT_DIR}/frame2.png,${ITK_TEST_OUTPUT_DIR}/frame3.png,${ITK_TEST_OUTPUT_DIR}/frame4.png" - 1 - 24 - MP42 - ) - + NAME + VideoFileReaderWriterTest + COMMAND + ITKVideoIOTestDriver + itkVideoFileReaderWriterTest + DATA{Input/frame0.jpg} + DATA{Input/frame1.jpg} + DATA{Input/frame2.jpg} + DATA{Input/frame3.jpg} + DATA{Input/frame4.jpg} + "${ITK_TEST_OUTPUT_DIR}/frame0.png,${ITK_TEST_OUTPUT_DIR}/frame1.png,${ITK_TEST_OUTPUT_DIR}/frame2.png,${ITK_TEST_OUTPUT_DIR}/frame3.png,${ITK_TEST_OUTPUT_DIR}/frame4.png" + 1 + 24 + MP42) # FileListVideoIO: itk_add_test( - NAME FileListVideoIOTest - COMMAND ITKVideoIOTestDriver - itkFileListVideoIOTest - DATA{Input/frame0.jpg} - DATA{Input/frame1.jpg} - DATA{Input/frame2.jpg} - DATA{Input/frame3.jpg} - DATA{Input/frame4.jpg} - ${ITKVideo_Data_DIR}/Input/TestParameters.txt - "${ITK_TEST_OUTPUT_DIR}/filelistvideoio_frame0.png,${ITK_TEST_OUTPUT_DIR}/filelistvideoio_frame1.png,${ITK_TEST_OUTPUT_DIR}/filelistvideoio_frame2.png,${ITK_TEST_OUTPUT_DIR}/filelistvideoio_frame3.png,${ITK_TEST_OUTPUT_DIR}/filelistvideoio_frame4.png" - ${ITK_TEST_OUTPUT_DIR}/FileListVideoIOTest_CameraOut.mha - 320 240 5 1) + NAME + FileListVideoIOTest + COMMAND + ITKVideoIOTestDriver + itkFileListVideoIOTest + DATA{Input/frame0.jpg} + DATA{Input/frame1.jpg} + DATA{Input/frame2.jpg} + DATA{Input/frame3.jpg} + DATA{Input/frame4.jpg} + ${ITKVideo_Data_DIR}/Input/TestParameters.txt + "${ITK_TEST_OUTPUT_DIR}/filelistvideoio_frame0.png,${ITK_TEST_OUTPUT_DIR}/filelistvideoio_frame1.png,${ITK_TEST_OUTPUT_DIR}/filelistvideoio_frame2.png,${ITK_TEST_OUTPUT_DIR}/filelistvideoio_frame3.png,${ITK_TEST_OUTPUT_DIR}/filelistvideoio_frame4.png" + ${ITK_TEST_OUTPUT_DIR}/FileListVideoIOTest_CameraOut.mha + 320 + 240 + 5 + 1) # FileListVideoIOFactory: itk_add_test( - NAME FileListVideoIOFactoryTest - COMMAND ITKVideoIOTestDriver - itkFileListVideoIOFactoryTest - DATA{Input/frame0.jpg} - DATA{Input/frame1.jpg} - DATA{Input/frame2.jpg} - DATA{Input/frame3.jpg} - DATA{Input/frame4.jpg} - "${ITK_TEST_OUTPUT_DIR}/filelistfactory_frame0.png,${ITK_TEST_OUTPUT_DIR}/filelistfactory_frame1.png,${ITK_TEST_OUTPUT_DIR}/filelistfactory_frame2.png,${ITK_TEST_OUTPUT_DIR}/filelistfactory_frame3.png,${ITK_TEST_OUTPUT_DIR}/filelistfactory_frame4.png" - 0) + NAME + FileListVideoIOFactoryTest + COMMAND + ITKVideoIOTestDriver + itkFileListVideoIOFactoryTest + DATA{Input/frame0.jpg} + DATA{Input/frame1.jpg} + DATA{Input/frame2.jpg} + DATA{Input/frame3.jpg} + DATA{Input/frame4.jpg} + "${ITK_TEST_OUTPUT_DIR}/filelistfactory_frame0.png,${ITK_TEST_OUTPUT_DIR}/filelistfactory_frame1.png,${ITK_TEST_OUTPUT_DIR}/filelistfactory_frame2.png,${ITK_TEST_OUTPUT_DIR}/filelistfactory_frame3.png,${ITK_TEST_OUTPUT_DIR}/filelistfactory_frame4.png" + 0) diff --git a/Modules/Video/IO/wrapping/itkVideoFileReader.wrap b/Modules/Video/IO/wrapping/itkVideoFileReader.wrap index bfc496253d9..e6a756e17ff 100644 --- a/Modules/Video/IO/wrapping/itkVideoFileReader.wrap +++ b/Modules/Video/IO/wrapping/itkVideoFileReader.wrap @@ -1,12 +1,11 @@ itk_wrap_include("itkImage.h") itk_wrap_include("itkVideoStream.h") -UNIQUE(image_types "UC;ULL;D;${WRAP_ITK_ALL_TYPES}") +unique(image_types "UC;ULL;D;${WRAP_ITK_ALL_TYPES}") itk_wrap_class("itk::VideoFileReader" POINTER) - foreach(t ${image_types}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("VSI${ITKM_${t}}${d}" - "itk::VideoStream>") - endforeach() +foreach(t ${image_types}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("VSI${ITKM_${t}}${d}" "itk::VideoStream>") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Modules/Video/IO/wrapping/itkVideoFileWriter.wrap b/Modules/Video/IO/wrapping/itkVideoFileWriter.wrap index af75092f674..2f1945fb796 100644 --- a/Modules/Video/IO/wrapping/itkVideoFileWriter.wrap +++ b/Modules/Video/IO/wrapping/itkVideoFileWriter.wrap @@ -1,12 +1,11 @@ itk_wrap_include("itkImage.h") itk_wrap_include("itkVideoStream.h") -UNIQUE(image_types "UC;ULL;D;${WRAP_ITK_ALL_TYPES}") +unique(image_types "UC;ULL;D;${WRAP_ITK_ALL_TYPES}") itk_wrap_class("itk::VideoFileWriter" POINTER) - foreach(t ${image_types}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("VSI${ITKM_${t}}${d}" - "itk::VideoStream>") - endforeach() +foreach(t ${image_types}) + foreach(d ${ITK_WRAP_IMAGE_DIMS}) + itk_wrap_template("VSI${ITKM_${t}}${d}" "itk::VideoStream>") endforeach() +endforeach() itk_end_wrap_class() diff --git a/Testing/TestExternal/CMakeLists.txt b/Testing/TestExternal/CMakeLists.txt index 47437f3ed0e..7ddc51f91e9 100644 --- a/Testing/TestExternal/CMakeLists.txt +++ b/Testing/TestExternal/CMakeLists.txt @@ -1,12 +1,13 @@ # This project builds the test directories from all ITK modules as a separate # project outside the main ITK build tree as if they were an application. cmake_minimum_required(VERSION 3.16.3 FATAL_ERROR) -foreach(p - ## Only policies introduced after the cmake_minimum_required - ## version need to explicitly be set to NEW. - CMP0070 #3.10.0 Define ``file(GENERATE)`` behavior for relative paths. - CMP0071 #3.10.0 Let ``AUTOMOC`` and ``AUTOUIC`` process ``GENERATED`` files. - ) +foreach( + p + ## Only policies introduced after the cmake_minimum_required + ## version need to explicitly be set to NEW. + CMP0070 #3.10.0 Define ``file(GENERATE)`` behavior for relative paths. + CMP0071 #3.10.0 Let ``AUTOMOC`` and ``AUTOUIC`` process ``GENERATED`` files. +) if(POLICY ${p}) cmake_policy(SET ${p} NEW) endif() @@ -50,17 +51,15 @@ if(WIN32 AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$") set(_INTEL_WINDOWS 1) endif() if(MSVC OR _INTEL_WINDOWS) - add_definitions( - -D_CRT_NONSTDC_NO_DEPRECATE - -D_CRT_SECURE_NO_DEPRECATE - -D_SCL_SECURE_NO_DEPRECATE - ) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE) endif() # Glob the set modules in the source tree. -file(GLOB meta RELATIVE "${ITK_TOP_DIR}" - "${ITK_TOP_DIR}/*/*/*/itk-module.cmake" # grouped modules - ) +file( + GLOB meta + RELATIVE "${ITK_TOP_DIR}" + "${ITK_TOP_DIR}/*/*/*/itk-module.cmake" # grouped modules +) # Identify the subset of modules that have tests. foreach(f ${meta}) get_filename_component(_base ${f} PATH) @@ -79,12 +78,10 @@ set(ITK_TEST_OUTPUT_DIR "${ITKTestExternal_BINARY_DIR}/Testing/Temporary") # Add the test directory for each enabled module that has tests. foreach(itk-module ${ITK_MODULES_ENABLED}) if(${itk-module}_TEST_DIR) - add_subdirectory(${ITK_TOP_DIR}/${${itk-module}_TEST_DIR} - ${ITKTestExternal_BINARY_DIR}/${${itk-module}_TEST_DIR}) + add_subdirectory(${ITK_TOP_DIR}/${${itk-module}_TEST_DIR} ${ITKTestExternal_BINARY_DIR}/${${itk-module}_TEST_DIR}) endif() endforeach() - # Create target to download data from the ITKData group. This must come after # all tests have been added that reference the group, so we put it last. -ExternalData_Add_Target(ITKData) +ExternalData_add_target(ITKData) diff --git a/Utilities/ClangFormat/DownloadClangFormat.cmake b/Utilities/ClangFormat/DownloadClangFormat.cmake index 1e46fcdafbe..d77e8e54123 100644 --- a/Utilities/ClangFormat/DownloadClangFormat.cmake +++ b/Utilities/ClangFormat/DownloadClangFormat.cmake @@ -11,15 +11,25 @@ set(_clang_format_hash) set(_clang_format_url) if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") set(_clang_format_hash - b14de32036c48f6c62998e2ebab509e71a0ae71464acb4616484e3a6eb941e1d9fac38559f5d27ea0cbbb512d590279ffb3015fae17779229e1090c2763ebcf3) + b14de32036c48f6c62998e2ebab509e71a0ae71464acb4616484e3a6eb941e1d9fac38559f5d27ea0cbbb512d590279ffb3015fae17779229e1090c2763ebcf3 + ) set(_clang_format_url "https://data.kitware.com/api/v1/file/hashsum/sha512/${_clang_format_hash}/download") -elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64" AND (NOT CMAKE_HOST_SYSTEM_VERSION VERSION_LESS "13.0.0")) +elseif( + CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin" + AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64" + AND (NOT + CMAKE_HOST_SYSTEM_VERSION + VERSION_LESS + "13.0.0" + )) set(_clang_format_hash - 97460f9eef556a27592ccd99d8fc894554e5b3196326df4e33bfcdecfcb7eda2b5c7488008abc4dd923d607f2cb47d61567b1da99df60f31f719195118c117a9) + 97460f9eef556a27592ccd99d8fc894554e5b3196326df4e33bfcdecfcb7eda2b5c7488008abc4dd923d607f2cb47d61567b1da99df60f31f719195118c117a9 + ) set(_clang_format_url "https://data.kitware.com/api/v1/file/hashsum/sha512/${_clang_format_hash}/download") elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Windows" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64") set(_clang_format_hash - e96dd15938fd9b1c57028a519189f138397774eb6b66971d114300d2a80248adda9f74b192985a3c91c7de52c4dbe21800bc6b3cc8201c4985fc39ecfc64fdbe) + e96dd15938fd9b1c57028a519189f138397774eb6b66971d114300d2a80248adda9f74b192985a3c91c7de52c4dbe21800bc6b3cc8201c4985fc39ecfc64fdbe + ) set(_clang_format_url "https://data.kitware.com/api/v1/file/hashsum/sha512/${_clang_format_hash}/download") else() # If desired, a compatible clang-format can be provided manually with @@ -34,7 +44,8 @@ if(ITK_FORBID_DOWNLOADS) message(SEND_ERROR "Attempted to download ClangFormat when ITK_FORBID_DOWNLOADS is ON") endif() if(NOT TARGET ClangFormat AND _clang_format_hash) - ExternalProject_add(ClangFormat + ExternalProject_Add( + ClangFormat URL ${_clang_format_url} URL_HASH SHA512=${_clang_format_hash} CONFIGURE_COMMAND "" @@ -45,6 +56,5 @@ if(NOT TARGET ClangFormat AND _clang_format_hash) LOG_BUILD 0 LOG_TEST 0 LOG_INSTALL 0 - INSTALL_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/ITKClangFormatConfig.cmake - ) + INSTALL_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/ITKClangFormatConfig.cmake) endif() diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt index 6385d64195a..05d96781209 100644 --- a/Utilities/Doxygen/CMakeLists.txt +++ b/Utilities/Doxygen/CMakeLists.txt @@ -9,7 +9,6 @@ if(ITK_BUILD_DOCUMENTATION) find_package(Wget) endif() - # ------------------------------------------------------------- # # Generate Doxygen configuration file in all configuration file @@ -36,7 +35,6 @@ list(APPEND DOXYGEN_TEST_DIRS "${ITK_SOURCE_DIR}/Examples") list(APPEND DOXYGEN_TEST_DIRS "${ITK_SOURCE_DIR}") list(APPEND DOXYGEN_TEST_DIRS "${ITK_SOURCE_DIR}/Modules/Remote") - # # Configure the script and the doxyfile, then add target # @@ -44,18 +42,64 @@ set(ITK_DOXYGEN_OUTPUT_DIR ${ITK_BINARY_DIR}/Utilities/Doxygen) set(ITK_DOXYGEN_DIAGRAMS YES) -cmake_dependent_option(ITK_DOXYGEN_HTML "Doxygen will generate HTML Output" ON "ITK_BUILD_DOCUMENTATION" OFF) -cmake_dependent_option(ITK_DOXYGEN_DOCSET "Doxygen will generate additional index files for Xcode 3" OFF "ITK_BUILD_DOCUMENTATION" OFF) -cmake_dependent_option(ITK_DOXYGEN_CHM "Doxygen will generate Microsoft HTML help" OFF "ITK_BUILD_DOCUMENTATION" OFF) -cmake_dependent_option(ITK_DOXYGEN_QHP "Doxygen will generate Qt Compressed Help" OFF "ITK_BUILD_DOCUMENTATION" OFF) -cmake_dependent_option(ITK_DOXYGEN_ECLIPSEHELP "Doxygen will generate Eclipse help plugin" OFF "ITK_BUILD_DOCUMENTATION" OFF) -cmake_dependent_option(ITK_DOXYGEN_LATEX "Doxygen will generate LaTeX output" OFF "ITK_BUILD_DOCUMENTATION" OFF) -cmake_dependent_option(ITK_DOXYGEN_RTF "Doxygen will generate RTF output optimized for Word 97" OFF "ITK_BUILD_DOCUMENTATION" OFF) -cmake_dependent_option(ITK_DOXYGEN_XML "Doxygen will generate XML output" OFF "ITK_BUILD_DOCUMENTATION" OFF) +cmake_dependent_option( + ITK_DOXYGEN_HTML + "Doxygen will generate HTML Output" + ON + "ITK_BUILD_DOCUMENTATION" + OFF) +cmake_dependent_option( + ITK_DOXYGEN_DOCSET + "Doxygen will generate additional index files for Xcode 3" + OFF + "ITK_BUILD_DOCUMENTATION" + OFF) +cmake_dependent_option( + ITK_DOXYGEN_CHM + "Doxygen will generate Microsoft HTML help" + OFF + "ITK_BUILD_DOCUMENTATION" + OFF) +cmake_dependent_option( + ITK_DOXYGEN_QHP + "Doxygen will generate Qt Compressed Help" + OFF + "ITK_BUILD_DOCUMENTATION" + OFF) +cmake_dependent_option( + ITK_DOXYGEN_ECLIPSEHELP + "Doxygen will generate Eclipse help plugin" + OFF + "ITK_BUILD_DOCUMENTATION" + OFF) +cmake_dependent_option( + ITK_DOXYGEN_LATEX + "Doxygen will generate LaTeX output" + OFF + "ITK_BUILD_DOCUMENTATION" + OFF) +cmake_dependent_option( + ITK_DOXYGEN_RTF + "Doxygen will generate RTF output optimized for Word 97" + OFF + "ITK_BUILD_DOCUMENTATION" + OFF) +cmake_dependent_option( + ITK_DOXYGEN_XML + "Doxygen will generate XML output" + OFF + "ITK_BUILD_DOCUMENTATION" + OFF) -cmake_dependent_option(ITK_DOXYGEN_SERVER_BASED_SEARCH "Doxygen HTML will use PHP server based search." ON ITK_DOXYGEN_HTML OFF) +cmake_dependent_option( + ITK_DOXYGEN_SERVER_BASED_SEARCH + "Doxygen HTML will use PHP server based search." + ON + ITK_DOXYGEN_HTML + OFF) -mark_as_advanced(ITK_DOXYGEN_HTML +mark_as_advanced( + ITK_DOXYGEN_HTML ITK_DOXYGEN_DOCSET ITK_DOXYGEN_CHM ITK_DOXYGEN_QHP @@ -63,24 +107,20 @@ mark_as_advanced(ITK_DOXYGEN_HTML ITK_DOXYGEN_LATEX ITK_DOXYGEN_RTF ITK_DOXYGEN_XML - ITK_DOXYGEN_SERVER_BASED_SEARCH - ) + ITK_DOXYGEN_SERVER_BASED_SEARCH) find_package(Perl) if(PERL_FOUND) - set(ITK_DOXYGEN_INPUT_FILTER - "${PERL_EXECUTABLE} ${ITK_BINARY_DIR}/Utilities/Doxygen/itkdoxygen.pl") + set(ITK_DOXYGEN_INPUT_FILTER "${PERL_EXECUTABLE} ${ITK_BINARY_DIR}/Utilities/Doxygen/itkdoxygen.pl") - configure_file(${ITK_SOURCE_DIR}/Utilities/Doxygen/itkdoxygen.pl.in - ${ITK_BINARY_DIR}/Utilities/Doxygen/itkdoxygen.pl) + configure_file(${ITK_SOURCE_DIR}/Utilities/Doxygen/itkdoxygen.pl.in ${ITK_BINARY_DIR}/Utilities/Doxygen/itkdoxygen.pl) else() set(ITK_DOXYGEN_INPUT_FILTER) endif() # ------------------------------------------------------------- -if (ITK_BUILD_DOCUMENTATION) - +if(ITK_BUILD_DOCUMENTATION) # When updating Doxygen versions, also re-run workbox-sw to regenerate the # service worker pre-cache. Do this by running: @@ -94,72 +134,69 @@ if (ITK_BUILD_DOCUMENTATION) # # If workbox has changed version, we also need to update workbox-sw.prod*.js # referenced below - file(COPY workbox-cli-config.js serviceWorker.js.in - DESTINATION ${ITK_BINARY_DIR}/Utilities/Doxygen/) + file(COPY workbox-cli-config.js serviceWorker.js.in DESTINATION ${ITK_BINARY_DIR}/Utilities/Doxygen/) - execute_process(COMMAND ${Python3_EXECUTABLE} "${CMAKE_CURRENT_LIST_DIR}/datetime.py" - RESULT_VARIABLE CMD_RESULT - OUTPUT_VARIABLE _DATETIME) + execute_process( + COMMAND ${Python3_EXECUTABLE} "${CMAKE_CURRENT_LIST_DIR}/datetime.py" + RESULT_VARIABLE CMD_RESULT + OUTPUT_VARIABLE _DATETIME) - if (CMD_RESULT) - message(FATAL_ERROR "Datetime failed!") - endif() + if(CMD_RESULT) + message(FATAL_ERROR "Datetime failed!") + endif() - configure_file(${CMAKE_CURRENT_LIST_DIR}/build_text.js.in - "${ITK_BINARY_DIR}/Utilities/Doxygen//html/build_text.js") + configure_file(${CMAKE_CURRENT_LIST_DIR}/build_text.js.in "${ITK_BINARY_DIR}/Utilities/Doxygen//html/build_text.js") find_package(LATEX) # Custom command to generate a examples page which include all ITK examples - add_custom_command(OUTPUT "${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox" - COMMAND ${CMAKE_COMMAND} -D "PROJECT_SOURCE_DIR:PATH=${ITK_SOURCE_DIR}" - -D "OUTPUT_FILE:PATH=${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox" - -P "${ITK_SOURCE_DIR}/Utilities/Doxygen/GenerateExamplesDox.cmake" + add_custom_command( + OUTPUT "${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox" + COMMAND + ${CMAKE_COMMAND} -D "PROJECT_SOURCE_DIR:PATH=${ITK_SOURCE_DIR}" -D + "OUTPUT_FILE:PATH=${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox" -P + "${ITK_SOURCE_DIR}/Utilities/Doxygen/GenerateExamplesDox.cmake" WORKING_DIRECTORY "${ITK_SOURCE_DIR}/Examples" - DEPENDS "${ITK_SOURCE_DIR}/Examples" "${ITK_SOURCE_DIR}/Utilities/Doxygen/GenerateExamplesDox.cmake" - ) - - set(ITK_DOXYGEN_INPUT ${DOXYGEN_INCLUDE_DIRS} - ${ITK_SOURCE_DIR}/Documentation/Doxygen - ${ITK_BINARY_DIR}/Documentation/Doxygen - ${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox - ${ITK_BINARY_DIR}/Utilities/Doxygen/Modules - ${ITK_DOXYGEN_INPUT} - ) + DEPENDS "${ITK_SOURCE_DIR}/Examples" "${ITK_SOURCE_DIR}/Utilities/Doxygen/GenerateExamplesDox.cmake") + + set(ITK_DOXYGEN_INPUT + ${DOXYGEN_INCLUDE_DIRS} + ${ITK_SOURCE_DIR}/Documentation/Doxygen + ${ITK_BINARY_DIR}/Documentation/Doxygen + ${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox + ${ITK_BINARY_DIR}/Utilities/Doxygen/Modules + ${ITK_DOXYGEN_INPUT}) list(REMOVE_DUPLICATES ITK_DOXYGEN_INPUT) # The DoxygenConfig.cmake is a replacement for configuring a doxygen.config.in file # https://cmake.org/cmake/help/v3.16/module/FindDoxygen.html include(${CMAKE_CURRENT_LIST_DIR}/DoxygenConfig.cmake) - doxygen_add_docs(Documentation - ${ITK_DOXYGEN_INPUT} - # -- Only build if 'Documentation' target is requested ALL - WORKING_DIRECTORY ${ITK_BINARY_DIR}/Utilities/Doxygen - # -- Some of the ITK_DOXYGEN_INPUT are directories, USE_STAMP_FILE requires only files be listed - COMMENT "-- Building ITK Doxygen." - ) + doxygen_add_docs( + Documentation ${ITK_DOXYGEN_INPUT} + # -- Only build if 'Documentation' target is requested ALL + WORKING_DIRECTORY ${ITK_BINARY_DIR}/Utilities/Doxygen + # -- Some of the ITK_DOXYGEN_INPUT are directories, USE_STAMP_FILE requires only files be listed + COMMENT "-- Building ITK Doxygen.") unset(ITK_DOXYGEN_INPUT) - # add_custom_target(Documentation ALL - # COMMAND ${DOXYGEN_EXECUTABLE} ${ITK_BINARY_DIR}/Utilities/Doxygen/doxygen.config - # MAIN_DEPENDENCY ${ITK_BINARY_DIR}/Utilities/Doxygen/doxygen.config - # DEPENDS ${ITK_BINARY_DIR}/Utilities/Doxygen/itkdoxygen.pl - # DEPENDS ${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox - # WORKING_DIRECTORY ${ITK_BINARY_DIR}/Utilities/Doxygen - # ) + # add_custom_target(Documentation ALL + # COMMAND ${DOXYGEN_EXECUTABLE} ${ITK_BINARY_DIR}/Utilities/Doxygen/doxygen.config + # MAIN_DEPENDENCY ${ITK_BINARY_DIR}/Utilities/Doxygen/doxygen.config + # DEPENDS ${ITK_BINARY_DIR}/Utilities/Doxygen/itkdoxygen.pl + # DEPENDS ${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox + # WORKING_DIRECTORY ${ITK_BINARY_DIR}/Utilities/Doxygen + # ) # Somehow the logo image is not copied into the html folder. # Here we ensure that the logo image ends up in the right directory # where html pages could find it. - add_custom_command(TARGET Documentation + add_custom_command( + TARGET Documentation POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy - ${ITK_SOURCE_DIR}/Documentation/Art/itkLogoSmall.png # logo - ${ITK_DOXYGEN_OUTPUT_DIR}/html # output doxygen directory - ) + COMMAND ${CMAKE_COMMAND} -E copy ${ITK_SOURCE_DIR}/Documentation/Art/itkLogoSmall.png # logo + ${ITK_DOXYGEN_OUTPUT_DIR}/html # output doxygen directory + ) - message(STATUS - "To generate Doxygen's documentation, you need to build the Documentation target" - ) + message(STATUS "To generate Doxygen's documentation, you need to build the Documentation target") -endif () +endif() diff --git a/Utilities/Doxygen/DoxygenConfig.cmake b/Utilities/Doxygen/DoxygenConfig.cmake index a4650c30dba..da0f5309427 100644 --- a/Utilities/Doxygen/DoxygenConfig.cmake +++ b/Utilities/Doxygen/DoxygenConfig.cmake @@ -9,14 +9,14 @@ set(DOXYGEN_BRIEF_MEMBER_DESC "NO") set(DOXYGEN_FULL_PATH_NAMES "NO") set(DOXYGEN_STRIP_FROM_PATH "${ITK_BINARY_DIR}/Utilities/") set(DOXYGEN_TAB_SIZE "2") -set(DOXYGEN_ALIASES "starteraliasnotused=@par not used" - "wiki=\\par Wiki Examples:
^^ \\li All Media Wiki Examples ^^" - "wikiexample{2}= \\li \\2 ^^" - "endwiki=^^ ^^ ^^" - "sphinx=\\par ITK Sphinx Examples:
^^ \\li All ITK Sphinx Examples ^^" - "sphinxexample{2}=\\li \\2 ^^" - "endsphinx=^^ ^^ ^^" - ) +set(DOXYGEN_ALIASES + "starteraliasnotused=@par not used" + "wiki=\\par Wiki Examples:
^^ \\li All Media Wiki Examples ^^" + "wikiexample{2}= \\li \\2 ^^" + "endwiki=^^ ^^ ^^" + "sphinx=\\par ITK Sphinx Examples:
^^ \\li All ITK Sphinx Examples ^^" + "sphinxexample{2}=\\li \\2 ^^" + "endsphinx=^^ ^^ ^^") set(DOXYGEN_TOC_INCLUDE_HEADINGS "0") set(DOXYGEN_BUILTIN_STL_SUPPORT "YES") set(DOXYGEN_DISTRIBUTE_GROUP_DOC "YES") @@ -29,30 +29,28 @@ set(DOXYGEN_LAYOUT_FILE "${ITK_SOURCE_DIR}/Documentation/Doxygen/DoxygenLayout.x # -- This value should be sent in as first argument of doxygen_add_docs set(DOXYGEN_INPUT "${ITK_WRAP_DOC_DOXYGEN_HEADERS_FORMATED}") set(DOXYGEN_FILE_PATTERNS "*.h" "*.dox") set(DOXYGEN_RECURSIVE "YES") -set(DOXYGEN_EXCLUDE "${ITK_SOURCE_DIR}/Modules/ThirdParty/" - "${ITK_SOURCE_DIR}/Modules/Core/Common/itkPixelTraits.h" - "${ITK_SOURCE_DIR}/Modules/Core/Common/itkNumericTraits.h" - "${ITK_SOURCE_DIR}/Modules/Core/Common/itkMathDetail.h" - "${ITK_SOURCE_DIR}/Modules/Core/IO/itkPixelData.h" - "${ITK_SOURCE_DIR}/Modules/Core/IO/itkAnalyzeDbh.h" - "${ITK_SOURCE_DIR}/Modules/Remote/" - ) -set(DOXYGEN_EXCLUDE_PATTERNS "*/vxl_copyright.h" - "*/vcl/*" - "*/dll.h" - "*/test*" - "*/example*" - "*config*" - "*/contrib/*" - "*/Templates/*" - "*_mocced.cxx" - ) +set(DOXYGEN_EXCLUDE + "${ITK_SOURCE_DIR}/Modules/ThirdParty/" + "${ITK_SOURCE_DIR}/Modules/Core/Common/itkPixelTraits.h" + "${ITK_SOURCE_DIR}/Modules/Core/Common/itkNumericTraits.h" + "${ITK_SOURCE_DIR}/Modules/Core/Common/itkMathDetail.h" + "${ITK_SOURCE_DIR}/Modules/Core/IO/itkPixelData.h" + "${ITK_SOURCE_DIR}/Modules/Core/IO/itkAnalyzeDbh.h" + "${ITK_SOURCE_DIR}/Modules/Remote/") +set(DOXYGEN_EXCLUDE_PATTERNS + "*/vxl_copyright.h" + "*/vcl/*" + "*/dll.h" + "*/test*" + "*/example*" + "*config*" + "*/contrib/*" + "*/Templates/*" + "*_mocced.cxx") set(DOXYGEN_EXAMPLE_PATH "${DOXYGEN_TEST_DIRS}") set(DOXYGEN_EXAMPLE_PATTERNS "*.cxx") set(DOXYGEN_EXAMPLE_RECURSIVE "YES") -set(DOXYGEN_IMAGE_PATH "${ITK_SOURCE_DIR}/Documentation/Art" - "${ITK_BINARY_DIR}/Utilities/Doxygen/Modules" - ) +set(DOXYGEN_IMAGE_PATH "${ITK_SOURCE_DIR}/Documentation/Art" "${ITK_BINARY_DIR}/Utilities/Doxygen/Modules") set(DOXYGEN_INPUT_FILTER "${ITK_DOXYGEN_INPUT_FILTER}") set(DOXYGEN_FILTER_SOURCE_FILES "YES") set(DOXYGEN_SOURCE_BROWSER "YES") @@ -62,8 +60,7 @@ set(DOXYGEN_HTML_HEADER "${ITK_SOURCE_DIR}/Documentation/Doxygen/DoxygenHeader.h set(DOXYGEN_HTML_FOOTER "${ITK_SOURCE_DIR}/Documentation/Doxygen/DoxygenFooter.html") set(DOXYGEN_HTML_EXTRA_STYLESHEET "${ITK_SOURCE_DIR}/Documentation/Doxygen/ITKDoxygenStyle.css") set(DOXYGEN_HTML_EXTRA_FILES "${ITK_SOURCE_DIR}/Utilities/Doxygen/serviceWorker.js" - "${ITK_SOURCE_DIR}/Utilities/Doxygen/workbox-sw.prod.v2.0.1.js" - ) + "${ITK_SOURCE_DIR}/Utilities/Doxygen/workbox-sw.prod.v2.0.1.js") set(DOXYGEN_HTML_TIMESTAMP "YES") set(DOXYGEN_HTML_DYNAMIC_SECTIONS "YES") set(DOXYGEN_DOCSET_FEEDNAME "ITK Doxygen generated documentation") @@ -74,7 +71,7 @@ set(DOXYGEN_ECLIPSE_DOC_ID "org.itk.ITK") set(DOXYGEN_ENUM_VALUES_PER_LINE "1") set(DOXYGEN_USE_MATHJAX "YES") set(DOXYGEN_MATHJAX_RELPATH "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/") -if (ITK_DOXYGEN_SERVER_BASED_SEARCH) +if(ITK_DOXYGEN_SERVER_BASED_SEARCH) set(DOXYGEN_SERVER_BASED_SEARCH "YES") else() set(DOXYGEN_SERVER_BASED_SEARCH "NO") @@ -86,92 +83,100 @@ set(DOXYGEN_LATEX_BATCHMODE "YES") set(DOXYGEN_MACRO_EXPANSION "YES") set(DOXYGEN_EXPAND_ONLY_PREDEF "YES") set(DOXYGEN_SEARCH_INCLUDES "NO") -set(DOXYGEN_PREDEFINED "itkNotUsed(x)=" - "itkStaticConstMacro(name,type,value)=static constexpr type name = value" - "itkSetInputMacro(name, type, number)= virtual void Set##name##Input(const type *_arg); virtual void SetInput##number(const type *_arg);" - "itkGetInputMacro(name, type, number)= virtual const type * Get##name##Input() const; virtual const type * GetInput##number() const;" - "itkSetMacro(name,type)= virtual void Set##name (type _arg);" - "itkGetMacro(name,type)= virtual type Get##name ();" - "itkGetConstMacro(name,type)= virtual type Get##name () const;" - "itkSetStringMacro(name)= virtual void Set##name (const char* _arg);" - "itkGetStringMacro(name)= virtual const char* Get##name () const;" - "itkSetClampMacro(name,type,min,max)= virtual void Set##name (type _arg);" - "itkSetObjectMacro(name,type)= virtual void Set##name (type* _arg);" - "itkSetConstObjectMacro(name,type)= virtual void Set##name ( const type* _arg);" - "itkGetConstObjectMacro(name,type)= virtual const type* Get##name () const;" - "itkGetModifiableObjectMacro(name,type)= virtual type* GetModifiable##name (); virtual const type* Get##name () const;" - "itkGetConstReferenceMacro(name,type)= virtual const type& Get##name () const;" - "itkSetEnumMacro(name,type)= virtual void Set##name (const type _arg);" - "itkGetEnumMacro(name,type)= virtual type Get##name () const;" - "itkGetConstReferenceObjectMacro(name,type)= virtual const type::Pointer& Get##name () const;" - "itkSetDecoratedInputMacro(name, type)= virtual void Set##name##Input(const SimpleDataObjectDecorator *_arg); virtual void Set##name(const type &_arg); void Set##name(const SimpleDataObjectDecorator< type > *_arg)" - "itkGetDecoratedInputMacro(name, type)= virtual const SimpleDataObjectDecorator< type > * Get##name##Input() const; virtual const type & Get##name() const;" - "itkSetGetDecoratedInputMacro(name, type)= virtual void Set##name##Input(const SimpleDataObjectDecorator< type > *_arg); virtual void Set##name(const type &_arg); virtual void Set##name(const SimpleDataObjectDecorator< type > *_arg); virtual const SimpleDataObjectDecorator< type > * Get##name##Input() const; virtual const type & Get##name() const;" - "itkSetDecoratedObjectInputMacro(name, type, number)= virtual void Set##name##Input(const DataObjectDecorator *_arg); virtual void SetInput##number(const DataObjectDecorator *_arg); virtual const DataObjectDecorator * Get##name##Input() const; virtual const DataObjectDecorator * GetInput##number() const; virtual void Set##name(const type *_arg);" - "itkGetDecoratedObjectInputMacro(name, type)= virtual const DataObjectDecorator< type > * Get##name##Input() const; virtual const type * Get##name() const;" - "itkSetGetDecoratedObjectInputMacro(name, type)= virtual void Set##name##Input(const DataObjectDecorator *_arg); virtual void SetInput##number(const DataObjectDecorator *_arg); virtual const DataObjectDecorator * Get##name##Input() const; virtual const DataObjectDecorator * GetInput##number() const; virtual void Set##name(const type *_arg); virtual const DataObjectDecorator< type > * Get##name##Input() const; virtual const type * Get##name() const;" - "itkSetDecoratedOutputMacro(name, type)= virtual void Set##name##Output(const SimpleDataObjectDecorator *_arg); virtual void Set##name(const type &_arg); void Set##name(const SimpleDataObjectDecorator< type > *_arg)" - "itkGetDecoratedOutputMacro(name, type)= virtual const SimpleDataObjectDecorator< type > * Get##name##Output() const; virtual const type & Get##name() const;" - "itkBooleanMacro(name)= virtual void name##On (); virtual void name##Off ();" - "itkSetVector2Macro(name,type)= virtual void Set##name (type _arg1, type _arg2) virtual void Set##name (type _arg[2]);" - "itkGetVector2Macro(name,type)= virtual type* Get##name () const; virtual void Get##name (type& _arg1, type& _arg2) const; virtual void Get##name (type _arg[2]) const;" - "itkSetVector3Macro(name,type)= virtual void Set##name (type _arg1, type _arg2, type _arg3) virtual void Set##name (type _arg[3]);" - "itkGetVector3Macro(name,type)= virtual type* Get##name () const; virtual void Get##name (type& _arg1, type& _arg2, type& _arg3) const; virtual void Get##name (type _arg[3]) const;" - "itkSetVector4Macro(name,type)= virtual void Set##name (type _arg1, type _arg2, type _arg3, type _arg4) virtual void Set##name (type _arg[4]);" - "itkGetVector4Macro(name,type)= virtual type* Get##name () const; virtual void Get##name (type& _arg1, type& _arg2, type& _arg3, type& _arg4) const; virtual void Get##name (type _arg[4]) const;" - "itkSetVector6Macro(name,type)= virtual void Set##name (type _arg1, type _arg2, type _arg3, type _arg4, type _arg5, type _arg6) virtual void Set##name (type _arg[6]);" - "itkGetVector6Macro(name,type)= virtual type* Get##name () const; virtual void Get##name (type& _arg1, type& _arg2, type& _arg3, type& _arg4, type& _arg5, type& _arg6) const; virtual void Get##name (type _arg[6]) const;" - "itkSetVectorMacro(name,type,count)= virtual void Set##name(type data[]);" - "itkGetVectorMacro(name,type,count)= virtual type* Get##name () const;" - "itkSetInputMacro(name,type)= virtual void Set##name(const type *input);" - "itkGetInputMacro(name,type)= virtual const type * Get##name() const;" - "itkNewMacro(type)= static Pointer New(); virtual::itk::LightObject::Pointer CreateAnother() const;" - "itkSimpleNewMacro(type)= static Pointer New();" - "itkCreateAnotherMacro(type)= virtual::itk::LightObject::Pointer CreateAnother() const;" - "itkFactorylessNewMacro(x)= static Pointer New(); virtual ::itk::LightObject::Pointer CreateAnother() const;" - "itkTypeMacro(thisClass,superclass)= virtual const char *GetNameOfClass() const;" - "itkEventMacro(thisClass,superclass)= class thisClass : public superclass {};" - "itkDeclareExceptionMacro(newexcp,parentexcp,whatmessage)= namespace itk { class newexcp : public parentexcp { public: newexcp(const char *file, unsigned int lineNumber) : parentexcp(file, lineNumber) { this->SetDescription(whatmessage); } newexcp(const std::string & file, unsigned int lineNumber) : parentexcp(file, lineNumber) { this->SetDescription(whatmessage); } itkTypeMacro(newexcp, , parentexcp); }; }" - "itkConceptMacro(thisName,thisConcept)= /* This class requires thisName in the form of thisConcept */" - "std::numeric_limits= std::numeric_limits" - "ITK_TYPENAME= typename" - "itkTemplateFloatingToIntegerMacro(name)= template name(TInput x)" - "FEM_ABSTRACT_CLASS(thisClass,parentClass)= public: /** Standard Self typedef.*/ typedef thisClass Self; /** Standard Superclass typedef. */ typedef parentClass Superclass; /** Pointer or SmartPointer to an object. */ typedef Self* Pointer; /** Const pointer or SmartPointer to an object. */ typedef const Self* ConstPointer; private:" - "FEM_CLASS(thisClass,parentClass)= FEM_ABSTRACT_CLASS(thisClass,parentClass) public: /** Create a new object from the existing one */ virtual Baseclass::Pointer Clone() const; /** Class ID for FEM object factory */ static const int CLID; /** Virtual function to access the class ID */ virtual int ClassID() const { return CLID; } /** Object creation in an itk compatible way */ static Self::Pointer New() { return new Self(); } private:" - "ERROR_CHECKING" - "VCL_USE_NATIVE_STL=1" - "VCL_USE_NATIVE_COMPLEX=1" - "VCL_HAS_BOOL=1" - "VXL_BIG_ENDIAN=1" - "VXL_LITTLE_ENDIAN=0" - "VNL_DLL_DATA=" - "size_t=vcl_size_t" - "ITK_USE_FFTWD" - "ITK_USE_FFTWF" - "ITK_USE_CONCEPT_CHECKING" - "itkMacro_h" - "ITK_LEGACY_REMOVE" - "ITK_FUTURE_LEGACY_REMOVE" - "ITKCommon_EXPORT_EXPLICIT" - "ITK_OVERRIDE= override" - "ITK_NULLPTR= nullptr" - "ITK_NOEXCEPT= noexcept" - "ITK_DISALLOW_COPY_AND_MOVE(type)=" - "ITK_DISALLOW_COPY_AND_ASSIGN(type)=" - "ITK_FORCE_EXPORT_MACRO(X)=" - ) +set(DOXYGEN_PREDEFINED + "itkNotUsed(x)=" + "itkStaticConstMacro(name,type,value)=static constexpr type name = value" + "itkSetInputMacro(name, type, number)= virtual void Set##name##Input(const type *_arg); virtual void SetInput##number(const type *_arg);" + "itkGetInputMacro(name, type, number)= virtual const type * Get##name##Input() const; virtual const type * GetInput##number() const;" + "itkSetMacro(name,type)= virtual void Set##name (type _arg);" + "itkGetMacro(name,type)= virtual type Get##name ();" + "itkGetConstMacro(name,type)= virtual type Get##name () const;" + "itkSetStringMacro(name)= virtual void Set##name (const char* _arg);" + "itkGetStringMacro(name)= virtual const char* Get##name () const;" + "itkSetClampMacro(name,type,min,max)= virtual void Set##name (type _arg);" + "itkSetObjectMacro(name,type)= virtual void Set##name (type* _arg);" + "itkSetConstObjectMacro(name,type)= virtual void Set##name ( const type* _arg);" + "itkGetConstObjectMacro(name,type)= virtual const type* Get##name () const;" + "itkGetModifiableObjectMacro(name,type)= virtual type* GetModifiable##name (); virtual const type* Get##name () const;" + "itkGetConstReferenceMacro(name,type)= virtual const type& Get##name () const;" + "itkSetEnumMacro(name,type)= virtual void Set##name (const type _arg);" + "itkGetEnumMacro(name,type)= virtual type Get##name () const;" + "itkGetConstReferenceObjectMacro(name,type)= virtual const type::Pointer& Get##name () const;" + "itkSetDecoratedInputMacro(name, type)= virtual void Set##name##Input(const SimpleDataObjectDecorator *_arg); virtual void Set##name(const type &_arg); void Set##name(const SimpleDataObjectDecorator< type > *_arg)" + "itkGetDecoratedInputMacro(name, type)= virtual const SimpleDataObjectDecorator< type > * Get##name##Input() const; virtual const type & Get##name() const;" + "itkSetGetDecoratedInputMacro(name, type)= virtual void Set##name##Input(const SimpleDataObjectDecorator< type > *_arg); virtual void Set##name(const type &_arg); virtual void Set##name(const SimpleDataObjectDecorator< type > *_arg); virtual const SimpleDataObjectDecorator< type > * Get##name##Input() const; virtual const type & Get##name() const;" + "itkSetDecoratedObjectInputMacro(name, type, number)= virtual void Set##name##Input(const DataObjectDecorator *_arg); virtual void SetInput##number(const DataObjectDecorator *_arg); virtual const DataObjectDecorator * Get##name##Input() const; virtual const DataObjectDecorator * GetInput##number() const; virtual void Set##name(const type *_arg);" + "itkGetDecoratedObjectInputMacro(name, type)= virtual const DataObjectDecorator< type > * Get##name##Input() const; virtual const type * Get##name() const;" + "itkSetGetDecoratedObjectInputMacro(name, type)= virtual void Set##name##Input(const DataObjectDecorator *_arg); virtual void SetInput##number(const DataObjectDecorator *_arg); virtual const DataObjectDecorator * Get##name##Input() const; virtual const DataObjectDecorator * GetInput##number() const; virtual void Set##name(const type *_arg); virtual const DataObjectDecorator< type > * Get##name##Input() const; virtual const type * Get##name() const;" + "itkSetDecoratedOutputMacro(name, type)= virtual void Set##name##Output(const SimpleDataObjectDecorator *_arg); virtual void Set##name(const type &_arg); void Set##name(const SimpleDataObjectDecorator< type > *_arg)" + "itkGetDecoratedOutputMacro(name, type)= virtual const SimpleDataObjectDecorator< type > * Get##name##Output() const; virtual const type & Get##name() const;" + "itkBooleanMacro(name)= virtual void name##On (); virtual void name##Off ();" + "itkSetVector2Macro(name,type)= virtual void Set##name (type _arg1, type _arg2) virtual void Set##name (type _arg[2]);" + "itkGetVector2Macro(name,type)= virtual type* Get##name () const; virtual void Get##name (type& _arg1, type& _arg2) const; virtual void Get##name (type _arg[2]) const;" + "itkSetVector3Macro(name,type)= virtual void Set##name (type _arg1, type _arg2, type _arg3) virtual void Set##name (type _arg[3]);" + "itkGetVector3Macro(name,type)= virtual type* Get##name () const; virtual void Get##name (type& _arg1, type& _arg2, type& _arg3) const; virtual void Get##name (type _arg[3]) const;" + "itkSetVector4Macro(name,type)= virtual void Set##name (type _arg1, type _arg2, type _arg3, type _arg4) virtual void Set##name (type _arg[4]);" + "itkGetVector4Macro(name,type)= virtual type* Get##name () const; virtual void Get##name (type& _arg1, type& _arg2, type& _arg3, type& _arg4) const; virtual void Get##name (type _arg[4]) const;" + "itkSetVector6Macro(name,type)= virtual void Set##name (type _arg1, type _arg2, type _arg3, type _arg4, type _arg5, type _arg6) virtual void Set##name (type _arg[6]);" + "itkGetVector6Macro(name,type)= virtual type* Get##name () const; virtual void Get##name (type& _arg1, type& _arg2, type& _arg3, type& _arg4, type& _arg5, type& _arg6) const; virtual void Get##name (type _arg[6]) const;" + "itkSetVectorMacro(name,type,count)= virtual void Set##name(type data[]);" + "itkGetVectorMacro(name,type,count)= virtual type* Get##name () const;" + "itkSetInputMacro(name,type)= virtual void Set##name(const type *input);" + "itkGetInputMacro(name,type)= virtual const type * Get##name() const;" + "itkNewMacro(type)= static Pointer New(); virtual::itk::LightObject::Pointer CreateAnother() const;" + "itkSimpleNewMacro(type)= static Pointer New();" + "itkCreateAnotherMacro(type)= virtual::itk::LightObject::Pointer CreateAnother() const;" + "itkFactorylessNewMacro(x)= static Pointer New(); virtual ::itk::LightObject::Pointer CreateAnother() const;" + "itkTypeMacro(thisClass,superclass)= virtual const char *GetNameOfClass() const;" + "itkEventMacro(thisClass,superclass)= class thisClass : public superclass {};" + "itkDeclareExceptionMacro(newexcp,parentexcp,whatmessage)= namespace itk { class newexcp : public parentexcp { public: newexcp(const char *file, unsigned int lineNumber) : parentexcp(file, lineNumber) { this->SetDescription(whatmessage); } newexcp(const std::string & file, unsigned int lineNumber) : parentexcp(file, lineNumber) { this->SetDescription(whatmessage); } itkTypeMacro(newexcp, , parentexcp); }; }" + "itkConceptMacro(thisName,thisConcept)= /* This class requires thisName in the form of thisConcept */" + "std::numeric_limits= std::numeric_limits" + "ITK_TYPENAME= typename" + "itkTemplateFloatingToIntegerMacro(name)= template name(TInput x)" + "FEM_ABSTRACT_CLASS(thisClass,parentClass)= public: /** Standard Self typedef.*/ typedef thisClass Self; /** Standard Superclass typedef. */ typedef parentClass Superclass; /** Pointer or SmartPointer to an object. */ typedef Self* Pointer; /** Const pointer or SmartPointer to an object. */ typedef const Self* ConstPointer; private:" + "FEM_CLASS(thisClass,parentClass)= FEM_ABSTRACT_CLASS(thisClass,parentClass) public: /** Create a new object from the existing one */ virtual Baseclass::Pointer Clone() const; /** Class ID for FEM object factory */ static const int CLID; /** Virtual function to access the class ID */ virtual int ClassID() const { return CLID; } /** Object creation in an itk compatible way */ static Self::Pointer New() { return new Self(); } private:" + "ERROR_CHECKING" + "VCL_USE_NATIVE_STL=1" + "VCL_USE_NATIVE_COMPLEX=1" + "VCL_HAS_BOOL=1" + "VXL_BIG_ENDIAN=1" + "VXL_LITTLE_ENDIAN=0" + "VNL_DLL_DATA=" + "size_t=vcl_size_t" + "ITK_USE_FFTWD" + "ITK_USE_FFTWF" + "ITK_USE_CONCEPT_CHECKING" + "itkMacro_h" + "ITK_LEGACY_REMOVE" + "ITK_FUTURE_LEGACY_REMOVE" + "ITKCommon_EXPORT_EXPLICIT" + "ITK_OVERRIDE= override" + "ITK_NULLPTR= nullptr" + "ITK_NOEXCEPT= noexcept" + "ITK_DISALLOW_COPY_AND_MOVE(type)=" + "ITK_DISALLOW_COPY_AND_ASSIGN(type)=" + "ITK_FORCE_EXPORT_MACRO(X)=") set(DOXYGEN_GENERATE_TAGFILE "${ITK_BINARY_DIR}/Utilities/Doxygen/InsightDoxygen.tag") set(DOXYGEN_GRAPHICAL_HIERARCHY "NO") set(DOXYGEN_DOT_IMAGE_FORMAT "svg") set(DOXYGEN_DOT_GRAPH_MAX_NODES "150") set(DOXYGEN_DOT_MULTI_TARGETS "YES") -foreach(_FORMAT IN ITEMS HTML DOCSET CHM QHP ECLIPSEHELP LATEX RTF - XML) +foreach( + _FORMAT IN + ITEMS HTML + DOCSET + CHM + QHP + ECLIPSEHELP + LATEX + RTF + XML) # map ON/OFF to YES/NO - if (ITK_DOXYGEN_${_FORMAT}) - set(DOXYGEN_GENERATE_${_FORMAT} "YES") - else() - set(DOXYGEN_GENERATE_${_FORMAT} "NO") + if(ITK_DOXYGEN_${_FORMAT}) + set(DOXYGEN_GENERATE_${_FORMAT} "YES") + else() + set(DOXYGEN_GENERATE_${_FORMAT} "NO") endif() endforeach() diff --git a/Utilities/Doxygen/GenerateExamplesDox.cmake b/Utilities/Doxygen/GenerateExamplesDox.cmake index 16594ec3ed8..18a0c8b1d15 100644 --- a/Utilities/Doxygen/GenerateExamplesDox.cmake +++ b/Utilities/Doxygen/GenerateExamplesDox.cmake @@ -10,28 +10,38 @@ # referenced files. # glob the examples for each language -file(GLOB_RECURSE examples_list_fullpath +file( + GLOB_RECURSE + examples_list_fullpath FOLLOW_SYMLINKS "${PROJECT_SOURCE_DIR}/Examples/*.cxx" "${PROJECT_SOURCE_DIR}/Examples/*.py" - "${PROJECT_SOURCE_DIR}/Examples/*.java" -) + "${PROJECT_SOURCE_DIR}/Examples/*.java") -file(GLOB_RECURSE sphinx_examples_list_fullpath +file( + GLOB_RECURSE + sphinx_examples_list_fullpath "${PROJECT_SOURCE_DIR}/Modules/Remote/SphinxExamples/src/*.cxx" - "${PROJECT_SOURCE_DIR}/Modules/Remote/SphinxExamples/src/*.py" -) + "${PROJECT_SOURCE_DIR}/Modules/Remote/SphinxExamples/src/*.py") # Use relative paths set(examples_list) string(LENGTH "${PROJECT_SOURCE_DIR}/" root_length) foreach(_example ${examples_list_fullpath}) - string(SUBSTRING ${_example} ${root_length} -1 example_relative) + string( + SUBSTRING ${_example} + ${root_length} + -1 + example_relative) list(APPEND examples_list ${example_relative}) endforeach() string(LENGTH "${PROJECT_SOURCE_DIR}/Modules/Remote/" root_length) foreach(_example ${sphinx_examples_list_fullpath}) - string(SUBSTRING ${_example} ${root_length} -1 example_relative) + string( + SUBSTRING ${_example} + ${root_length} + -1 + example_relative) list(APPEND examples_list ${example_relative}) endforeach() @@ -46,8 +56,8 @@ file(APPEND ${OUTPUT_FILE} "/**\n") file(APPEND ${OUTPUT_FILE} " \n") foreach(f IN LISTS examples_list) - file(APPEND ${OUTPUT_FILE} "\\example ${f}\n") + file(APPEND ${OUTPUT_FILE} "\\example ${f}\n") endforeach() # end comment -file(APPEND ${OUTPUT_FILE} "*/\n") +file(APPEND ${OUTPUT_FILE} "*/\n") diff --git a/Utilities/InstallTest/CMakeLists.txt b/Utilities/InstallTest/CMakeLists.txt index 8b05670f346..913b12f8e6b 100644 --- a/Utilities/InstallTest/CMakeLists.txt +++ b/Utilities/InstallTest/CMakeLists.txt @@ -1,8 +1,12 @@ # Test "make install" if("x${CMAKE_INSTALL_PREFIX}" STREQUAL "x${ITK_BINARY_DIR}/InstallTest") - itk_add_test(NAME Install - COMMAND ${CMAKE_COMMAND} -DCONFIGURATION=$ - -DITK_BINARY_DIR=${ITK_BINARY_DIR} - -P ${CMAKE_CURRENT_SOURCE_DIR}/InstallTest.cmake - ) + itk_add_test( + NAME + Install + COMMAND + ${CMAKE_COMMAND} + -DCONFIGURATION=$ + -DITK_BINARY_DIR=${ITK_BINARY_DIR} + -P + ${CMAKE_CURRENT_SOURCE_DIR}/InstallTest.cmake) endif() diff --git a/Utilities/InstallTest/InstallTest.cmake b/Utilities/InstallTest/InstallTest.cmake index 76f4afdab76..db808d876ea 100644 --- a/Utilities/InstallTest/InstallTest.cmake +++ b/Utilities/InstallTest/InstallTest.cmake @@ -7,12 +7,8 @@ endif() message(STATUS "Removing InstallTest directory...") file(REMOVE_RECURSE "${ITK_BINARY_DIR}/InstallTest") message(STATUS "Building 'install' target...") -execute_process( - COMMAND ${CMAKE_COMMAND} --build "${ITK_BINARY_DIR}" - --target install - --config "${CONFIGURATION}" - RESULT_VARIABLE failed - ) +execute_process(COMMAND ${CMAKE_COMMAND} --build "${ITK_BINARY_DIR}" --target install --config "${CONFIGURATION}" + RESULT_VARIABLE failed) if(failed) message(FATAL_ERROR "Installation failed: ${failed}") else() diff --git a/Utilities/KWStyle/BuildKWStyle.cmake b/Utilities/KWStyle/BuildKWStyle.cmake index b2f66be3e48..de8f322e3ae 100644 --- a/Utilities/KWStyle/BuildKWStyle.cmake +++ b/Utilities/KWStyle/BuildKWStyle.cmake @@ -8,8 +8,7 @@ if(CMAKE_BUILD_TYPE) set(_build_configuration_arg -DCMAKE_BUILD_TYPE=Release) endif() -configure_file("${ITK_CMAKE_DIR}/ITKKWStyleConfig.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/ITKKWStyleConfig.cmake" @ONLY) +configure_file("${ITK_CMAKE_DIR}/ITKKWStyleConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/ITKKWStyleConfig.cmake" @ONLY) # XXX Implementation of the itk_download_attempt_check macro copied from the # ITK main CMakeLists.txt. This allows external modules to use the logic @@ -21,32 +20,31 @@ endif() set(CMAKE_CXX_COMPILER_LAUNCHER_FLAG -DCMAKE_CXX_COMPILER_LAUNCHER:FILEPATH=${CMAKE_CXX_COMPILER_LAUNCHER}) set(CMAKE_C_COMPILER_LAUNCHER_FLAG -DCMAKE_C_COMPILER_LAUNCHER:FILEPATH=${CMAKE_C_COMPILER_LAUNCHER}) if(NOT TARGET KWStyle) -ExternalProject_add(KWStyle - GIT_REPOSITORY "${git_protocol}://github.com/Kitware/KWStyle.git" - GIT_TAG 1173206c0e7f4bc70dc3af641daf6e33f4042772 - UPDATE_COMMAND "" - DOWNLOAD_DIR ${KWStyle_SOURCE_DIR} - SOURCE_DIR ${KWStyle_SOURCE_DIR} - BINARY_DIR ${KWStyle_DIR} - INSTALL_DIR ${KWStyle_DIR} - LOG_DOWNLOAD 1 - LOG_UPDATE 0 - LOG_CONFIGURE 0 - LOG_BUILD 0 - LOG_TEST 0 - LOG_INSTALL 0 - CMAKE_GENERATOR ${gen} - CMAKE_ARGS - -DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_MAKE_PROGRAM} - -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER} - ${CMAKE_CXX_COMPILER_LAUNCHER_FLAG} - -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER} - ${CMAKE_C_COMPILER_LAUNCHER_FLAG} - -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} - -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} - ${_build_configuration_arg} - -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} - -DBUILD_TESTING:BOOL=OFF - INSTALL_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/ITKKWStyleConfig.cmake - ) + ExternalProject_Add( + KWStyle + GIT_REPOSITORY "${git_protocol}://github.com/Kitware/KWStyle.git" + GIT_TAG 1173206c0e7f4bc70dc3af641daf6e33f4042772 + UPDATE_COMMAND "" + DOWNLOAD_DIR ${KWStyle_SOURCE_DIR} + SOURCE_DIR ${KWStyle_SOURCE_DIR} + BINARY_DIR ${KWStyle_DIR} + INSTALL_DIR ${KWStyle_DIR} + LOG_DOWNLOAD 1 + LOG_UPDATE 0 + LOG_CONFIGURE 0 + LOG_BUILD 0 + LOG_TEST 0 + LOG_INSTALL 0 + CMAKE_GENERATOR ${gen} + CMAKE_ARGS -DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_MAKE_PROGRAM} + -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER} + ${CMAKE_CXX_COMPILER_LAUNCHER_FLAG} + -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER} + ${CMAKE_C_COMPILER_LAUNCHER_FLAG} + -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} + -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} + ${_build_configuration_arg} + -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} + -DBUILD_TESTING:BOOL=OFF + INSTALL_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/ITKKWStyleConfig.cmake) endif() diff --git a/Utilities/KWStyle/KWStyle.cmake b/Utilities/KWStyle/KWStyle.cmake index 281e0b97fa7..9b3706944e3 100644 --- a/Utilities/KWStyle/KWStyle.cmake +++ b/Utilities/KWStyle/KWStyle.cmake @@ -1,32 +1,17 @@ if(ITK_USE_KWSTYLE) # Define and configure configuration files - set(kwstyle_itk_configuration_file - ${ITK_SOURCE_DIR}/Utilities/KWStyle/ITK.kws.xml - ) - set(kwstyle_itk_examples_files_list_file - ${ITK_BINARY_DIR}/Utilities/KWStyle/ITKExamplesFiles.txt - ) + set(kwstyle_itk_configuration_file ${ITK_SOURCE_DIR}/Utilities/KWStyle/ITK.kws.xml) + set(kwstyle_itk_examples_files_list_file ${ITK_BINARY_DIR}/Utilities/KWStyle/ITKExamplesFiles.txt) configure_file(# KWStyle requires that the files list be absolute paths - ${ITK_SOURCE_DIR}/Utilities/KWStyle/ITKExamplesFiles.txt.in - ${kwstyle_itk_examples_files_list_file} - ) - set(kwstyle_itk_overwrite_file - ${ITK_SOURCE_DIR}/Utilities/KWStyle/ITKOverwrite.txt - ) + ${ITK_SOURCE_DIR}/Utilities/KWStyle/ITKExamplesFiles.txt.in ${kwstyle_itk_examples_files_list_file}) + set(kwstyle_itk_overwrite_file ${ITK_SOURCE_DIR}/Utilities/KWStyle/ITKOverwrite.txt) # Define formatting for error messages for output of build target - option(KWSTYLE_USE_VIM_FORMAT - "Set KWStyle to generate errors with a VIM-compatible format." - OFF - ) - option(KWSTYLE_USE_GCC_FORMAT - "Set KWStyle to generate errors with a GCC-compatible format." - OFF - ) - option(KWSTYLE_USE_MSVC_FORMAT - "Set KWStyle to generate errors with a VisualStudio-compatible format." - ${MSVC_IDE} # default to TRUE only with a Visual Studio IDE - ) + option(KWSTYLE_USE_VIM_FORMAT "Set KWStyle to generate errors with a VIM-compatible format." OFF) + option(KWSTYLE_USE_GCC_FORMAT "Set KWStyle to generate errors with a GCC-compatible format." OFF) + option(KWSTYLE_USE_MSVC_FORMAT "Set KWStyle to generate errors with a VisualStudio-compatible format." + ${MSVC_IDE} # default to TRUE only with a Visual Studio IDE + ) mark_as_advanced(KWSTYLE_USE_VIM_FORMAT) mark_as_advanced(KWSTYLE_USE_GCC_FORMAT) @@ -43,37 +28,38 @@ if(ITK_USE_KWSTYLE) list(APPEND kwstyle_editor_format -msvc) endif() - list(LENGTH - kwstyle_editor_format - kwstyle_editor_format_length - ) + list(LENGTH kwstyle_editor_format kwstyle_editor_format_length) if(kwstyle_editor_format_length GREATER 1) message(FATAL_ERROR "At most, only one of KWSTYLE_USE_*_FORMAT can be set to TRUE.") endif() # Add build target and CTest test set(kwstyle_common_arguments - -xml ${kwstyle_itk_configuration_file} - -v - -o ${kwstyle_itk_overwrite_file} - ) - add_custom_target(StyleCheckExamples - COMMAND ${KWSTYLE_EXECUTABLE} - ${kwstyle_common_arguments} - -D ${kwstyle_itk_examples_files_list_file} - ${kwstyle_editor_format} + -xml + ${kwstyle_itk_configuration_file} + -v + -o + ${kwstyle_itk_overwrite_file}) + add_custom_target( + StyleCheckExamples + COMMAND ${KWSTYLE_EXECUTABLE} ${kwstyle_common_arguments} -D ${kwstyle_itk_examples_files_list_file} + ${kwstyle_editor_format} COMMENT "Examples Style Checker" WORKING_DIRECTORY ${ITK_SOURCE_DIR} # the paths in kwstyle_itk_configuration_file are relative - ) + ) if(BUILD_TESTING) set(itk-module KWStyle) - itk_add_test(NAME KWStyleExamplesTest - COMMAND ${KWSTYLE_EXECUTABLE} - ${kwstyle_common_arguments} - -D ${kwstyle_itk_examples_files_list_file} - -gcc - WORKING_DIRECTORY ${ITK_SOURCE_DIR} - ) + itk_add_test( + NAME + KWStyleExamplesTest + COMMAND + ${KWSTYLE_EXECUTABLE} + ${kwstyle_common_arguments} + -D + ${kwstyle_itk_examples_files_list_file} + -gcc + WORKING_DIRECTORY + ${ITK_SOURCE_DIR}) endif() endif() diff --git a/Wrapping/CMakeLists.txt b/Wrapping/CMakeLists.txt index 345bfc4c4fc..77412f7521b 100644 --- a/Wrapping/CMakeLists.txt +++ b/Wrapping/CMakeLists.txt @@ -38,24 +38,37 @@ endif() ############################################################################### if(ITK_INSTALL_PACKAGE_DIR) - string(REGEX REPLACE "^/" "" path "${ITK_INSTALL_PACKAGE_DIR}/WrapITK/") + string( + REGEX + REPLACE "^/" + "" + path + "${ITK_INSTALL_PACKAGE_DIR}/WrapITK/") else() set(path "lib/InsightToolkit/WrapITK/") endif() -set(WRAP_ITK_INSTALL_PREFIX "${path}" CACHE INTERNAL "subpath where where most of WrapITK files will be installed") +set(WRAP_ITK_INSTALL_PREFIX + "${path}" + CACHE INTERNAL "subpath where where most of WrapITK files will be installed") # Output directories. set(WRAP_ITK_CONFIG_DIR "${WrapITK_SOURCE_DIR}/") set(WRAP_ITK_CMAKE_DIR "${WrapITK_SOURCE_DIR}") -set(WRAPPER_MASTER_INDEX_OUTPUT_DIR "${ITK_DIR}/Wrapping/Typedefs" CACHE INTERNAL "typedefs dir") +set(WRAPPER_MASTER_INDEX_OUTPUT_DIR + "${ITK_DIR}/Wrapping/Typedefs" + CACHE INTERNAL "typedefs dir") if(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY) # See ITK/CMakeLists.txt for rational for overwriting multi-config default behavior of appending $ - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "$<1:${WrapITK_BINARY_DIR}/lib>" CACHE INTERNAL "Single output directory for building all libraries.") + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY + "$<1:${WrapITK_BINARY_DIR}/lib>" + CACHE INTERNAL "Single output directory for building all libraries.") endif() if(NOT EXECUTABLE_OUTPUT_PATH) - set(EXECUTABLE_OUTPUT_PATH ${WrapITK_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.") + set(EXECUTABLE_OUTPUT_PATH + ${WrapITK_BINARY_DIR}/bin + CACHE INTERNAL "Single output directory for building all executables.") endif() # Set WRAP_ITK_INSTALL_COMPONENT_IDENTIFIER to a non-null value, like @@ -88,14 +101,18 @@ set(CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH}) # package use "itk-stubs" set(ITK_STUB_BASENAME "itk") # ITK_STUB_DIR: all stub files are stored in this directory -set(ITK_STUB_DIR "${ITK_DIR}/Wrapping/Generators/Python/${ITK_STUB_BASENAME}" CACHE INTERNAL "where python interface files are stored.") +set(ITK_STUB_DIR + "${ITK_DIR}/Wrapping/Generators/Python/${ITK_STUB_BASENAME}" + CACHE INTERNAL "where python interface files are stored.") file(MAKE_DIRECTORY ${ITK_STUB_DIR}) # ITK_PKL_DIR: all temporary pickled object AST representations stored here -set(ITK_PKL_DIR "${ITK_DIR}/Wrapping/Generators/Python/itk-pkl" CACHE INTERNAL "where temp pkl files are stored") +set(ITK_PKL_DIR + "${ITK_DIR}/Wrapping/Generators/Python/itk-pkl" + CACHE INTERNAL "where temp pkl files are stored") file(MAKE_DIRECTORY ${ITK_PKL_DIR}) set(WRAP_ITK_TYPEDEFS_DIRECTORY "${ITK_DIR}/Wrapping/Typedefs") -set(WRAP_ITK_LIB_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") +set(WRAP_ITK_LIB_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") ############################################################################### # Setup test driver @@ -121,7 +138,8 @@ if(ITK_SOURCE_DIR) if(EXISTS "${${_module_enabled}_SOURCE_DIR}/wrapping/CMakeLists.txt") list(APPEND WRAP_ITK_MODULES ${_module_enabled}) set(itk-module_SOURCE_DIR ${${_module_enabled}_SOURCE_DIR}) - add_subdirectory("${${_module_enabled}_SOURCE_DIR}/wrapping" ${CMAKE_CURRENT_BINARY_DIR}/Modules/${_module_enabled}) + add_subdirectory("${${_module_enabled}_SOURCE_DIR}/wrapping" + ${CMAKE_CURRENT_BINARY_DIR}/Modules/${_module_enabled}) unset(itk-module_SOURCE_DIR) endif() endforeach() @@ -136,7 +154,9 @@ else() # Building a module externally so itk-module variable must have been prev add_subdirectory("${${itk-module}_SOURCE_DIR}/wrapping" ${CMAKE_CURRENT_BINARY_DIR}/Modules/${itk-module}) endif() endif() -set(WRAP_ITK_MODULES ${WRAP_ITK_MODULES} CACHE INTERNAL "Internal library list.") +set(WRAP_ITK_MODULES + ${WRAP_ITK_MODULES} + CACHE INTERNAL "Internal library list.") ############################################################################### # let the different generators running some code after have parsed all the @@ -151,7 +171,6 @@ if(${module_prefix}_WRAP_PYTHON) endif() endif() - ############################################################################### # Generate Python typehints when wrapped ############################################################################### @@ -168,7 +187,7 @@ if(ITK_WRAP_PYTHON) # generating the Template and Proxy files for each class. In addition this file # generates the __init__.pyi and _proxies.pyi files used to interface between # the individual .pyi files. - set(PYI_GENERATOR "${CMAKE_CURRENT_SOURCE_DIR}/Generators/Python/itk/pyi_generator.py") + set(PYI_GENERATOR "${CMAKE_CURRENT_SOURCE_DIR}/Generators/Python/itk/pyi_generator.py") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/GlobalIdxFilesList.txt.in ${CMAKE_CURRENT_BINARY_DIR}/GlobalIdxFilesList.txt) @@ -177,19 +196,17 @@ if(ITK_WRAP_PYTHON) # ${GLOBAL_IdxFilesList}: is described within SwigInterface/CMakeLists.txt # The variable is passed to pyi_generator to make sure that the function only uses current index files # All index files found that are not in the given list are assumed to be outdated and are removed. - add_custom_target(itk-stub-files ALL - BYPRODUCTS "${ITK_STUB_DIR}/_proxies.pyi" "${ITK_STUB_DIR}/__init__.pyi" - COMMAND ${Python3_EXECUTABLE} ${PYI_GENERATOR} - --pyi_dir "${ITK_STUB_DIR}" - --pkl_dir "${ITK_PKL_DIR}" + add_custom_target( + itk-stub-files ALL + BYPRODUCTS "${ITK_STUB_DIR}/_proxies.pyi" "${ITK_STUB_DIR}/__init__.pyi" + COMMAND ${Python3_EXECUTABLE} ${PYI_GENERATOR} --pyi_dir "${ITK_STUB_DIR}" --pkl_dir "${ITK_PKL_DIR}" --index_list_file "${CMAKE_CURRENT_BINARY_DIR}/GlobalIdxFilesList.txt" - DEPENDS ${PYI_GENERATOR} ${GLOBAL_IdxFilesList} - COMMENT "Generating .pyi files for Python wrapper interface" - VERBATIM - ) + DEPENDS ${PYI_GENERATOR} ${GLOBAL_IdxFilesList} + COMMENT "Generating .pyi files for Python wrapper interface" + VERBATIM) # Add module dependencies to ensure .index.txt files have been generated - UNIQUE(WRAPPED_MODULE_LIST "${WRAP_ITK_MODULES};ITKPyUtils") + unique(WRAPPED_MODULE_LIST "${WRAP_ITK_MODULES};ITKPyUtils") foreach(WRAPPER_LIBRARY_NAME ${WRAPPED_MODULE_LIST}) list(LENGTH ${WRAPPER_LIBRARY_NAME}PyiIdxFiles ${WRAPPER_LIBRARY_NAME}PyiIdxFiles_Len) if(${WRAPPER_LIBRARY_NAME}PyiIdxFiles_Len GREATER 0) diff --git a/Wrapping/CMakeUtilityFunctions.cmake b/Wrapping/CMakeUtilityFunctions.cmake index 466d413e1c9..f432fc06960 100644 --- a/Wrapping/CMakeUtilityFunctions.cmake +++ b/Wrapping/CMakeUtilityFunctions.cmake @@ -13,7 +13,11 @@ macro(UNIQUE var_name list) list(REMOVE_DUPLICATES ${var_name}) endmacro() -macro(INTERSECTION var_name list1 list2) +macro( + INTERSECTION + var_name + list1 + list2) # Store the intersection between the two given lists in var_name. set(intersect_tmp "") foreach(l ${list1}) @@ -24,13 +28,16 @@ macro(INTERSECTION var_name list1 list2) set(${var_name} ${intersect_tmp}) endmacro() -macro(REMOVE var_name list1 list2) +macro( + REMOVE + var_name + list1 + list2) # Remove elements in list2 from list1 and store the result in var_name. set(${var_name} ${list1}) list(REMOVE_ITEM ${var_name} ${list2}) endmacro() - ################################################################################ # Simple arithmetic. ################################################################################ diff --git a/Wrapping/ConfigureWrapping.cmake b/Wrapping/ConfigureWrapping.cmake index f0393a84e03..a4671a36bfc 100644 --- a/Wrapping/ConfigureWrapping.cmake +++ b/Wrapping/ConfigureWrapping.cmake @@ -35,7 +35,6 @@ # only used by the macros defined in a given cmake file. ############################################################################### - ############################################################################### # Find Required Packages ############################################################################### @@ -75,7 +74,12 @@ if(CMAKE_SYSTEM MATCHES "IRIX.*") endif() if(CMAKE_COMPILER_IS_GNUCXX) - string(REGEX REPLACE "-Wcast-qual" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + string( + REGEX + REPLACE "-Wcast-qual" + "" + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS}") endif() if(UNIX) @@ -84,7 +88,6 @@ else() set(WRAP_ITK_LIBNAME_PREFIX "") endif() - ############################################################################### # Define install files macro. If we are building WrapITK, the generated files # and libraries will be installed into CMAKE_INSTALL_PREFIX, as usual. However, @@ -99,13 +102,12 @@ macro(WRAP_ITK_INSTALL path) if(WRAP_ITK_INSTALL_COMPONENT_PER_MODULE) set(_component_module "ITKCommon") endif() - install(FILES ${ARGN} + install( + FILES ${ARGN} DESTINATION "${WRAP_ITK_INSTALL_PREFIX}${path}" - COMPONENT ${_component_module}${WRAP_ITK_INSTALL_COMPONENT_IDENTIFIER}RuntimeLibraries - ) + COMPONENT ${_component_module}${WRAP_ITK_INSTALL_COMPONENT_IDENTIFIER}RuntimeLibraries) endmacro() - ############################################################################### # Macro to install the language bindings ############################################################################### @@ -113,10 +115,10 @@ macro(WRAP_ITK_BINDINGS_INSTALL path) if(WRAP_ITK_INSTALL_COMPONENT_PER_MODULE) message(WARNING "Option WRAP_ITK_INSTALL_COMPONENT_PER_MODULE is only supported for Python wrapping language") endif() - install(FILES ${ARGN} + install( + FILES ${ARGN} DESTINATION "${ITK_INSTALL_LIBRARY_DIR}/ITK-${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}${path}" - COMPONENT ${WRAP_ITK_INSTALL_COMPONENT_IDENTIFIER}RuntimeLibraries - ) + COMPONENT ${WRAP_ITK_INSTALL_COMPONENT_IDENTIFIER}RuntimeLibraries) endmacro() ############################################################################### diff --git a/Wrapping/DoxygenConfig.cmake b/Wrapping/DoxygenConfig.cmake index c372b7920db..66d6e91b667 100644 --- a/Wrapping/DoxygenConfig.cmake +++ b/Wrapping/DoxygenConfig.cmake @@ -9,14 +9,14 @@ set(DOXYGEN_BRIEF_MEMBER_DESC "NO") set(DOXYGEN_FULL_PATH_NAMES "NO") set(DOXYGEN_STRIP_FROM_PATH "${ITK_BINARY_DIR}/Utilities/") set(DOXYGEN_TAB_SIZE "2") -set(DOXYGEN_ALIASES "starteraliasnotused=@par not used" - "wiki=\\par Wiki Examples:
^^ \\li All Media Wiki Examples ^^" - "wikiexample{2}= \\li \\2 ^^" - "endwiki=^^ ^^ ^^" - "sphinx=\\par ITK Sphinx Examples:
^^ \\li All ITK Sphinx Examples ^^" - "sphinxexample{2}=\\li \\2 ^^" - "endsphinx=^^ ^^ ^^" - ) +set(DOXYGEN_ALIASES + "starteraliasnotused=@par not used" + "wiki=\\par Wiki Examples:
^^ \\li All Media Wiki Examples ^^" + "wikiexample{2}= \\li \\2 ^^" + "endwiki=^^ ^^ ^^" + "sphinx=\\par ITK Sphinx Examples:
^^ \\li All ITK Sphinx Examples ^^" + "sphinxexample{2}=\\li \\2 ^^" + "endsphinx=^^ ^^ ^^") set(DOXYGEN_TOC_INCLUDE_HEADINGS "0") set(DOXYGEN_BUILTIN_STL_SUPPORT "YES") set(DOXYGEN_DISTRIBUTE_GROUP_DOC "YES") @@ -29,30 +29,28 @@ set(DOXYGEN_LAYOUT_FILE "${ITK_SOURCE_DIR}/Documentation/Doxygen/DoxygenLayout.x # -- This value should be sent in as first argument of doxygen_add_docs set(DOXYGEN_INPUT "${ITK_WRAP_DOC_DOXYGEN_HEADERS_FORMATED}") set(DOXYGEN_FILE_PATTERNS "*.h" "*.dox") set(DOXYGEN_RECURSIVE "YES") -set(DOXYGEN_EXCLUDE "${ITK_SOURCE_DIR}/Modules/ThirdParty/" - "${ITK_SOURCE_DIR}/Modules/Core/Common/itkPixelTraits.h" - "${ITK_SOURCE_DIR}/Modules/Core/Common/itkNumericTraits.h" - "${ITK_SOURCE_DIR}/Modules/Core/Common/itkMathDetail.h" - "${ITK_SOURCE_DIR}/Modules/Core/IO/itkPixelData.h" - "${ITK_SOURCE_DIR}/Modules/Core/IO/itkAnalyzeDbh.h" - "${ITK_SOURCE_DIR}/Modules/Remote/" - ) -set(DOXYGEN_EXCLUDE_PATTERNS "*/vxl_copyright.h" - "*/vcl/*" - "*/dll.h" - "*/test*" - "*/example*" - "*config*" - "*/contrib/*" - "*/Templates/*" - "*_mocced.cxx" - ) +set(DOXYGEN_EXCLUDE + "${ITK_SOURCE_DIR}/Modules/ThirdParty/" + "${ITK_SOURCE_DIR}/Modules/Core/Common/itkPixelTraits.h" + "${ITK_SOURCE_DIR}/Modules/Core/Common/itkNumericTraits.h" + "${ITK_SOURCE_DIR}/Modules/Core/Common/itkMathDetail.h" + "${ITK_SOURCE_DIR}/Modules/Core/IO/itkPixelData.h" + "${ITK_SOURCE_DIR}/Modules/Core/IO/itkAnalyzeDbh.h" + "${ITK_SOURCE_DIR}/Modules/Remote/") +set(DOXYGEN_EXCLUDE_PATTERNS + "*/vxl_copyright.h" + "*/vcl/*" + "*/dll.h" + "*/test*" + "*/example*" + "*config*" + "*/contrib/*" + "*/Templates/*" + "*_mocced.cxx") set(DOXYGEN_EXAMPLE_PATH "${DOXYGEN_TEST_DIRS}") set(DOXYGEN_EXAMPLE_PATTERNS "*.cxx") set(DOXYGEN_EXAMPLE_RECURSIVE "YES") -set(DOXYGEN_IMAGE_PATH "${ITK_SOURCE_DIR}/Documentation/Art" - "${ITK_BINARY_DIR}/Utilities/Doxygen/Modules" - ) +set(DOXYGEN_IMAGE_PATH "${ITK_SOURCE_DIR}/Documentation/Art" "${ITK_BINARY_DIR}/Utilities/Doxygen/Modules") set(DOXYGEN_INPUT_FILTER "${ITK_DOXYGEN_INPUT_FILTER}") set(DOXYGEN_FILTER_SOURCE_FILES "YES") set(DOXYGEN_SOURCE_BROWSER "YES") @@ -62,8 +60,7 @@ set(DOXYGEN_HTML_HEADER "${ITK_SOURCE_DIR}/Documentation/Doxygen/DoxygenHeader.h set(DOXYGEN_HTML_FOOTER "${ITK_SOURCE_DIR}/Documentation/Doxygen/DoxygenFooter.html") set(DOXYGEN_HTML_EXTRA_STYLESHEET "${ITK_SOURCE_DIR}/Documentation/Doxygen/ITKDoxygenStyle.css") set(DOXYGEN_HTML_EXTRA_FILES "${ITK_SOURCE_DIR}/Utilities/Doxygen/serviceWorker.js" - "${ITK_SOURCE_DIR}/Utilities/Doxygen/workbox-sw.prod.v2.0.1.js" - ) + "${ITK_SOURCE_DIR}/Utilities/Doxygen/workbox-sw.prod.v2.0.1.js") set(DOXYGEN_HTML_TIMESTAMP "YES") set(DOXYGEN_HTML_DYNAMIC_SECTIONS "YES") set(DOXYGEN_DOCSET_FEEDNAME "ITK Doxygen generated documentation") @@ -82,80 +79,80 @@ set(DOXYGEN_LATEX_BATCHMODE "YES") set(DOXYGEN_MACRO_EXPANSION "YES") set(DOXYGEN_EXPAND_ONLY_PREDEF "YES") set(DOXYGEN_SEARCH_INCLUDES "NO") -set(DOXYGEN_PREDEFINED "itkNotUsed(x)=" - "itkStaticConstMacro(name,type,value)=static constexpr type name = value" - "itkSetInputMacro(name, type, number)= virtual void Set##name##Input(const type *_arg); virtual void SetInput##number(const type *_arg);" - "itkGetInputMacro(name, type, number)= virtual const type * Get##name##Input() const; virtual const type * GetInput##number() const;" - "itkSetMacro(name,type)= virtual void Set##name (type _arg);" - "itkGetMacro(name,type)= virtual type Get##name ();" - "itkGetConstMacro(name,type)= virtual type Get##name () const;" - "itkSetStringMacro(name)= virtual void Set##name (const char* _arg);" - "itkGetStringMacro(name)= virtual const char* Get##name () const;" - "itkSetClampMacro(name,type,min,max)= virtual void Set##name (type _arg);" - "itkSetObjectMacro(name,type)= virtual void Set##name (type* _arg);" - "itkSetConstObjectMacro(name,type)= virtual void Set##name ( const type* _arg);" - "itkGetConstObjectMacro(name,type)= virtual const type* Get##name () const;" - "itkGetModifiableObjectMacro(name,type)= virtual type* GetModifiable##name (); virtual const type* Get##name () const;" - "itkGetConstReferenceMacro(name,type)= virtual const type& Get##name () const;" - "itkSetEnumMacro(name,type)= virtual void Set##name (const type _arg);" - "itkGetEnumMacro(name,type)= virtual type Get##name () const;" - "itkGetConstReferenceObjectMacro(name,type)= virtual const type::Pointer& Get##name () const;" - "itkSetDecoratedInputMacro(name, type)= virtual void Set##name##Input(const SimpleDataObjectDecorator *_arg); virtual void Set##name(const type &_arg); void Set##name(const SimpleDataObjectDecorator< type > *_arg)" - "itkGetDecoratedInputMacro(name, type)= virtual const SimpleDataObjectDecorator< type > * Get##name##Input() const; virtual const type & Get##name() const;" - "itkSetGetDecoratedInputMacro(name, type)= virtual void Set##name##Input(const SimpleDataObjectDecorator< type > *_arg); virtual void Set##name(const type &_arg); virtual void Set##name(const SimpleDataObjectDecorator< type > *_arg); virtual const SimpleDataObjectDecorator< type > * Get##name##Input() const; virtual const type & Get##name() const;" - "itkSetDecoratedObjectInputMacro(name, type, number)= virtual void Set##name##Input(const DataObjectDecorator *_arg); virtual void SetInput##number(const DataObjectDecorator *_arg); virtual const DataObjectDecorator * Get##name##Input() const; virtual const DataObjectDecorator * GetInput##number() const; virtual void Set##name(const type *_arg);" - "itkGetDecoratedObjectInputMacro(name, type)= virtual const DataObjectDecorator< type > * Get##name##Input() const; virtual const type * Get##name() const;" - "itkSetGetDecoratedObjectInputMacro(name, type)= virtual void Set##name##Input(const DataObjectDecorator *_arg); virtual void SetInput##number(const DataObjectDecorator *_arg); virtual const DataObjectDecorator * Get##name##Input() const; virtual const DataObjectDecorator * GetInput##number() const; virtual void Set##name(const type *_arg); virtual const DataObjectDecorator< type > * Get##name##Input() const; virtual const type * Get##name() const;" - "itkSetDecoratedOutputMacro(name, type)= virtual void Set##name##Output(const SimpleDataObjectDecorator *_arg); virtual void Set##name(const type &_arg); void Set##name(const SimpleDataObjectDecorator< type > *_arg)" - "itkGetDecoratedOutputMacro(name, type)= virtual const SimpleDataObjectDecorator< type > * Get##name##Output() const; virtual const type & Get##name() const;" - "itkBooleanMacro(name)= virtual void name##On (); virtual void name##Off ();" - "itkSetVector2Macro(name,type)= virtual void Set##name (type _arg1, type _arg2) virtual void Set##name (type _arg[2]);" - "itkGetVector2Macro(name,type)= virtual type* Get##name () const; virtual void Get##name (type& _arg1, type& _arg2) const; virtual void Get##name (type _arg[2]) const;" - "itkSetVector3Macro(name,type)= virtual void Set##name (type _arg1, type _arg2, type _arg3) virtual void Set##name (type _arg[3]);" - "itkGetVector3Macro(name,type)= virtual type* Get##name () const; virtual void Get##name (type& _arg1, type& _arg2, type& _arg3) const; virtual void Get##name (type _arg[3]) const;" - "itkSetVector4Macro(name,type)= virtual void Set##name (type _arg1, type _arg2, type _arg3, type _arg4) virtual void Set##name (type _arg[4]);" - "itkGetVector4Macro(name,type)= virtual type* Get##name () const; virtual void Get##name (type& _arg1, type& _arg2, type& _arg3, type& _arg4) const; virtual void Get##name (type _arg[4]) const;" - "itkSetVector6Macro(name,type)= virtual void Set##name (type _arg1, type _arg2, type _arg3, type _arg4, type _arg5, type _arg6) virtual void Set##name (type _arg[6]);" - "itkGetVector6Macro(name,type)= virtual type* Get##name () const; virtual void Get##name (type& _arg1, type& _arg2, type& _arg3, type& _arg4, type& _arg5, type& _arg6) const; virtual void Get##name (type _arg[6]) const;" - "itkSetVectorMacro(name,type,count)= virtual void Set##name(type data[]);" - "itkGetVectorMacro(name,type,count)= virtual type* Get##name () const;" - "itkSetInputMacro(name,type)= virtual void Set##name(const type *input);" - "itkGetInputMacro(name,type)= virtual const type * Get##name() const;" - "itkNewMacro(type)= static Pointer New(); virtual::itk::LightObject::Pointer CreateAnother() const;" - "itkSimpleNewMacro(type)= static Pointer New();" - "itkCreateAnotherMacro(type)= virtual::itk::LightObject::Pointer CreateAnother() const;" - "itkFactorylessNewMacro(x)= static Pointer New(); virtual ::itk::LightObject::Pointer CreateAnother() const;" - "itkTypeMacro(thisClass,superclass)= virtual const char *GetNameOfClass() const;" - "itkEventMacro(thisClass,superclass)= class thisClass : public superclass {};" - "itkDeclareExceptionMacro(newexcp,parentexcp,whatmessage)= namespace itk { class newexcp : public parentexcp { public: newexcp(const char *file, unsigned int lineNumber) : parentexcp(file, lineNumber) { this->SetDescription(whatmessage); } newexcp(const std::string & file, unsigned int lineNumber) : parentexcp(file, lineNumber) { this->SetDescription(whatmessage); } itkTypeMacro(newexcp, , parentexcp); }; }" - "itkConceptMacro(thisName,thisConcept)= /* This class requires thisName in the form of thisConcept */" - "std::numeric_limits= std::numeric_limits" - "ITK_TYPENAME= typename" - "itkTemplateFloatingToIntegerMacro(name)= template name(TInput x)" - "FEM_ABSTRACT_CLASS(thisClass,parentClass)= public: /** Standard Self typedef.*/ typedef thisClass Self; /** Standard Superclass typedef. */ typedef parentClass Superclass; /** Pointer or SmartPointer to an object. */ typedef Self* Pointer; /** Const pointer or SmartPointer to an object. */ typedef const Self* ConstPointer; private:" - "FEM_CLASS(thisClass,parentClass)= FEM_ABSTRACT_CLASS(thisClass,parentClass) public: /** Create a new object from the existing one */ virtual Baseclass::Pointer Clone() const; /** Class ID for FEM object factory */ static const int CLID; /** Virtual function to access the class ID */ virtual int ClassID() const { return CLID; } /** Object creation in an itk compatible way */ static Self::Pointer New() { return new Self(); } private:" - "ERROR_CHECKING" - "VCL_USE_NATIVE_STL=1" - "VCL_USE_NATIVE_COMPLEX=1" - "VCL_HAS_BOOL=1" - "VXL_BIG_ENDIAN=1" - "VXL_LITTLE_ENDIAN=0" - "VNL_DLL_DATA=" - "size_t=vcl_size_t" - "ITK_USE_FFTWD" - "ITK_USE_FFTWF" - "ITK_USE_CONCEPT_CHECKING" - "itkMacro_h" - "ITK_LEGACY_REMOVE" - "ITK_FUTURE_LEGACY_REMOVE" - "ITKCommon_EXPORT_EXPLICIT" - "ITK_OVERRIDE= override" - "ITK_NULLPTR= nullptr" - "ITK_NOEXCEPT= noexcept" - "ITK_DISALLOW_COPY_AND_MOVE(type)=" - "ITK_DISALLOW_COPY_AND_ASSIGN(type)=" - "ITK_FORCE_EXPORT_MACRO(X)=" - ) +set(DOXYGEN_PREDEFINED + "itkNotUsed(x)=" + "itkStaticConstMacro(name,type,value)=static constexpr type name = value" + "itkSetInputMacro(name, type, number)= virtual void Set##name##Input(const type *_arg); virtual void SetInput##number(const type *_arg);" + "itkGetInputMacro(name, type, number)= virtual const type * Get##name##Input() const; virtual const type * GetInput##number() const;" + "itkSetMacro(name,type)= virtual void Set##name (type _arg);" + "itkGetMacro(name,type)= virtual type Get##name ();" + "itkGetConstMacro(name,type)= virtual type Get##name () const;" + "itkSetStringMacro(name)= virtual void Set##name (const char* _arg);" + "itkGetStringMacro(name)= virtual const char* Get##name () const;" + "itkSetClampMacro(name,type,min,max)= virtual void Set##name (type _arg);" + "itkSetObjectMacro(name,type)= virtual void Set##name (type* _arg);" + "itkSetConstObjectMacro(name,type)= virtual void Set##name ( const type* _arg);" + "itkGetConstObjectMacro(name,type)= virtual const type* Get##name () const;" + "itkGetModifiableObjectMacro(name,type)= virtual type* GetModifiable##name (); virtual const type* Get##name () const;" + "itkGetConstReferenceMacro(name,type)= virtual const type& Get##name () const;" + "itkSetEnumMacro(name,type)= virtual void Set##name (const type _arg);" + "itkGetEnumMacro(name,type)= virtual type Get##name () const;" + "itkGetConstReferenceObjectMacro(name,type)= virtual const type::Pointer& Get##name () const;" + "itkSetDecoratedInputMacro(name, type)= virtual void Set##name##Input(const SimpleDataObjectDecorator *_arg); virtual void Set##name(const type &_arg); void Set##name(const SimpleDataObjectDecorator< type > *_arg)" + "itkGetDecoratedInputMacro(name, type)= virtual const SimpleDataObjectDecorator< type > * Get##name##Input() const; virtual const type & Get##name() const;" + "itkSetGetDecoratedInputMacro(name, type)= virtual void Set##name##Input(const SimpleDataObjectDecorator< type > *_arg); virtual void Set##name(const type &_arg); virtual void Set##name(const SimpleDataObjectDecorator< type > *_arg); virtual const SimpleDataObjectDecorator< type > * Get##name##Input() const; virtual const type & Get##name() const;" + "itkSetDecoratedObjectInputMacro(name, type, number)= virtual void Set##name##Input(const DataObjectDecorator *_arg); virtual void SetInput##number(const DataObjectDecorator *_arg); virtual const DataObjectDecorator * Get##name##Input() const; virtual const DataObjectDecorator * GetInput##number() const; virtual void Set##name(const type *_arg);" + "itkGetDecoratedObjectInputMacro(name, type)= virtual const DataObjectDecorator< type > * Get##name##Input() const; virtual const type * Get##name() const;" + "itkSetGetDecoratedObjectInputMacro(name, type)= virtual void Set##name##Input(const DataObjectDecorator *_arg); virtual void SetInput##number(const DataObjectDecorator *_arg); virtual const DataObjectDecorator * Get##name##Input() const; virtual const DataObjectDecorator * GetInput##number() const; virtual void Set##name(const type *_arg); virtual const DataObjectDecorator< type > * Get##name##Input() const; virtual const type * Get##name() const;" + "itkSetDecoratedOutputMacro(name, type)= virtual void Set##name##Output(const SimpleDataObjectDecorator *_arg); virtual void Set##name(const type &_arg); void Set##name(const SimpleDataObjectDecorator< type > *_arg)" + "itkGetDecoratedOutputMacro(name, type)= virtual const SimpleDataObjectDecorator< type > * Get##name##Output() const; virtual const type & Get##name() const;" + "itkBooleanMacro(name)= virtual void name##On (); virtual void name##Off ();" + "itkSetVector2Macro(name,type)= virtual void Set##name (type _arg1, type _arg2) virtual void Set##name (type _arg[2]);" + "itkGetVector2Macro(name,type)= virtual type* Get##name () const; virtual void Get##name (type& _arg1, type& _arg2) const; virtual void Get##name (type _arg[2]) const;" + "itkSetVector3Macro(name,type)= virtual void Set##name (type _arg1, type _arg2, type _arg3) virtual void Set##name (type _arg[3]);" + "itkGetVector3Macro(name,type)= virtual type* Get##name () const; virtual void Get##name (type& _arg1, type& _arg2, type& _arg3) const; virtual void Get##name (type _arg[3]) const;" + "itkSetVector4Macro(name,type)= virtual void Set##name (type _arg1, type _arg2, type _arg3, type _arg4) virtual void Set##name (type _arg[4]);" + "itkGetVector4Macro(name,type)= virtual type* Get##name () const; virtual void Get##name (type& _arg1, type& _arg2, type& _arg3, type& _arg4) const; virtual void Get##name (type _arg[4]) const;" + "itkSetVector6Macro(name,type)= virtual void Set##name (type _arg1, type _arg2, type _arg3, type _arg4, type _arg5, type _arg6) virtual void Set##name (type _arg[6]);" + "itkGetVector6Macro(name,type)= virtual type* Get##name () const; virtual void Get##name (type& _arg1, type& _arg2, type& _arg3, type& _arg4, type& _arg5, type& _arg6) const; virtual void Get##name (type _arg[6]) const;" + "itkSetVectorMacro(name,type,count)= virtual void Set##name(type data[]);" + "itkGetVectorMacro(name,type,count)= virtual type* Get##name () const;" + "itkSetInputMacro(name,type)= virtual void Set##name(const type *input);" + "itkGetInputMacro(name,type)= virtual const type * Get##name() const;" + "itkNewMacro(type)= static Pointer New(); virtual::itk::LightObject::Pointer CreateAnother() const;" + "itkSimpleNewMacro(type)= static Pointer New();" + "itkCreateAnotherMacro(type)= virtual::itk::LightObject::Pointer CreateAnother() const;" + "itkFactorylessNewMacro(x)= static Pointer New(); virtual ::itk::LightObject::Pointer CreateAnother() const;" + "itkTypeMacro(thisClass,superclass)= virtual const char *GetNameOfClass() const;" + "itkEventMacro(thisClass,superclass)= class thisClass : public superclass {};" + "itkDeclareExceptionMacro(newexcp,parentexcp,whatmessage)= namespace itk { class newexcp : public parentexcp { public: newexcp(const char *file, unsigned int lineNumber) : parentexcp(file, lineNumber) { this->SetDescription(whatmessage); } newexcp(const std::string & file, unsigned int lineNumber) : parentexcp(file, lineNumber) { this->SetDescription(whatmessage); } itkTypeMacro(newexcp, , parentexcp); }; }" + "itkConceptMacro(thisName,thisConcept)= /* This class requires thisName in the form of thisConcept */" + "std::numeric_limits= std::numeric_limits" + "ITK_TYPENAME= typename" + "itkTemplateFloatingToIntegerMacro(name)= template name(TInput x)" + "FEM_ABSTRACT_CLASS(thisClass,parentClass)= public: /** Standard Self typedef.*/ typedef thisClass Self; /** Standard Superclass typedef. */ typedef parentClass Superclass; /** Pointer or SmartPointer to an object. */ typedef Self* Pointer; /** Const pointer or SmartPointer to an object. */ typedef const Self* ConstPointer; private:" + "FEM_CLASS(thisClass,parentClass)= FEM_ABSTRACT_CLASS(thisClass,parentClass) public: /** Create a new object from the existing one */ virtual Baseclass::Pointer Clone() const; /** Class ID for FEM object factory */ static const int CLID; /** Virtual function to access the class ID */ virtual int ClassID() const { return CLID; } /** Object creation in an itk compatible way */ static Self::Pointer New() { return new Self(); } private:" + "ERROR_CHECKING" + "VCL_USE_NATIVE_STL=1" + "VCL_USE_NATIVE_COMPLEX=1" + "VCL_HAS_BOOL=1" + "VXL_BIG_ENDIAN=1" + "VXL_LITTLE_ENDIAN=0" + "VNL_DLL_DATA=" + "size_t=vcl_size_t" + "ITK_USE_FFTWD" + "ITK_USE_FFTWF" + "ITK_USE_CONCEPT_CHECKING" + "itkMacro_h" + "ITK_LEGACY_REMOVE" + "ITK_FUTURE_LEGACY_REMOVE" + "ITKCommon_EXPORT_EXPLICIT" + "ITK_OVERRIDE= override" + "ITK_NULLPTR= nullptr" + "ITK_NOEXCEPT= noexcept" + "ITK_DISALLOW_COPY_AND_MOVE(type)=" + "ITK_DISALLOW_COPY_AND_ASSIGN(type)=" + "ITK_FORCE_EXPORT_MACRO(X)=") set(DOXYGEN_GENERATE_TAGFILE "${ITK_BINARY_DIR}/Utilities/Doxygen/InsightDoxygen.tag") set(DOXYGEN_GRAPHICAL_HIERARCHY "NO") set(DOXYGEN_DOT_IMAGE_FORMAT "svg") diff --git a/Wrapping/Generators/CMakeLists.txt b/Wrapping/Generators/CMakeLists.txt index ef9a2fe9ce7..6849a43513c 100644 --- a/Wrapping/Generators/CMakeLists.txt +++ b/Wrapping/Generators/CMakeLists.txt @@ -1,18 +1,22 @@ ############################################################################### # the macros in charge of dispatching to the language specific macros - - ############################################################################### # ccache management. This option is shared by most of generators, so put it here. -cmake_dependent_option(ITK_USE_CCACHE "Use ccache to cache swig/castxml/... output and speedup the rebuild." OFF ITK_WRAP_PYTHON OFF) +cmake_dependent_option( + ITK_USE_CCACHE + "Use ccache to cache swig/castxml/... output and speedup the rebuild." + OFF + ITK_WRAP_PYTHON + OFF) mark_as_advanced(ITK_USE_CCACHE) if(ITK_USE_CCACHE) - find_program(CCACHE_EXECUTABLE NAMES ccache-swig ccache DOC "ccache executable.") + find_program( + CCACHE_EXECUTABLE + NAMES ccache-swig ccache + DOC "ccache executable.") endif() - - if(DEFINED ITK_WRAP_GCCXML) message(FATAL_ERROR "ITK_WRAP_GCCXML is deprecated. Use ${module_prefix}_WRAP_CASTXML instead.") endif() @@ -21,8 +25,18 @@ endif() if(EXTERNAL_WRAP_ITK_PROJECT) # generators there have been turned on while building wrapitk else() - cmake_dependent_option(${module_prefix}_WRAP_CASTXML "Build xml files." ON ITK_WRAP_PYTHON OFF) - cmake_dependent_option(${module_prefix}_WRAP_SWIGINTERFACE "Build swig interfaces." ON ITK_WRAP_PYTHON OFF) + cmake_dependent_option( + ${module_prefix}_WRAP_CASTXML + "Build xml files." + ON + ITK_WRAP_PYTHON + OFF) + cmake_dependent_option( + ${module_prefix}_WRAP_SWIGINTERFACE + "Build swig interfaces." + ON + ITK_WRAP_PYTHON + OFF) mark_as_advanced(${module_prefix}_WRAP_CASTXML ${module_prefix}_WRAP_SWIGINTERFACE) endif() if(NOT ${module_prefix}_WRAP_CASTXML) @@ -32,19 +46,27 @@ if(NOT ${module_prefix}_WRAP_SWIGINTERFACE) message(FATAL_ERROR "${module_prefix}_WRAP_SWIGINTERFACE is required to be on for wrapping python") endif() - set(WRAP_ITK_GENERATORS CACHE INTERNAL "Internal generators list.") set(WRAP_ITK_UNUSED_GENERATORS CACHE INTERNAL "Internal unused generators list.") # The following list of directories int the "ITK/Wrapping/Generators -set(_candidate_generators "SwigInterface" "Doc" "CastXML" "Python") +set(_candidate_generators + "SwigInterface" + "Doc" + "CastXML" + "Python") foreach(lang ${_candidate_generators}) string(TOUPPER "${lang}" lang_upper) # add the language to the options if(NOT DEFINED ${module_prefix}_WRAP_${lang_upper}) - cmake_dependent_option(${module_prefix}_WRAP_${lang_upper} "Build swig ${lang} wrapper support." OFF ITK_WRAP_PYTHON OFF) + cmake_dependent_option( + ${module_prefix}_WRAP_${lang_upper} + "Build swig ${lang} wrapper support." + OFF + ITK_WRAP_PYTHON + OFF) endif() # add the language to the list, if the user have turn it on, and include # the subdirectory @@ -56,8 +78,12 @@ foreach(lang ${_candidate_generators}) endif() endforeach() mark_as_advanced(${module_prefix}_WRAP_DOC) -set(WRAP_ITK_GENERATORS ${WRAP_ITK_GENERATORS} CACHE INTERNAL "Internal generators list.") -set(WRAP_ITK_UNUSED_GENERATORS ${WRAP_ITK_UNUSED_GENERATORS} CACHE INTERNAL "Internal unused generators list.") +set(WRAP_ITK_GENERATORS + ${WRAP_ITK_GENERATORS} + CACHE INTERNAL "Internal generators list.") +set(WRAP_ITK_UNUSED_GENERATORS + ${WRAP_ITK_UNUSED_GENERATORS} + CACHE INTERNAL "Internal unused generators list.") # The include_directories are added here to be used by Wrapping/ConfigureWrapping.cmake foreach(lang ${_candidate_generators}) diff --git a/Wrapping/Generators/CastXML/CMakeLists.txt b/Wrapping/Generators/CastXML/CMakeLists.txt index 614e17e52ed..301fb1807b3 100644 --- a/Wrapping/Generators/CastXML/CMakeLists.txt +++ b/Wrapping/Generators/CastXML/CMakeLists.txt @@ -26,43 +26,65 @@ else() # If 64 bit Linux build host, use the CastXML binary if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") - set(_castxml_hash c8d57ee92078dd8e98cb6f1ec43618c5ed137cb3c3790352f99ca78ee3caa3918387293e20dc3f84661f0937d78989844c58ca985e840a772d9256c6626607f4) + set(_castxml_hash + c8d57ee92078dd8e98cb6f1ec43618c5ed137cb3c3790352f99ca78ee3caa3918387293e20dc3f84661f0937d78989844c58ca985e840a772d9256c6626607f4 + ) set(_castxml_url - "https://github.com/CastXML/CastXMLSuperbuild/releases/download/v${_castxml_version}/castxml-linux.tar.gz") + "https://github.com/CastXML/CastXMLSuperbuild/releases/download/v${_castxml_version}/castxml-linux.tar.gz") set(_download_castxml_binaries 1) elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64") - set(_castxml_hash d0bfdfba48a21b665a8267e56f4cd3d00810d17510eb4905e2bd0f2c045d264c03b624448ba5262d3cd8ae9be6546fc2b86f69b0f146777afc208aadd025334c) + set(_castxml_hash + d0bfdfba48a21b665a8267e56f4cd3d00810d17510eb4905e2bd0f2c045d264c03b624448ba5262d3cd8ae9be6546fc2b86f69b0f146777afc208aadd025334c + ) set(_castxml_url - "https://github.com/CastXML/CastXMLSuperbuild/releases/download/v${_castxml_version}/castxml-linux-aarch64.tar.gz") + "https://github.com/CastXML/CastXMLSuperbuild/releases/download/v${_castxml_version}/castxml-linux-aarch64.tar.gz" + ) set(_download_castxml_binaries 1) - # If 64 bit Windows build host, use the CastXML binary + # If 64 bit Windows build host, use the CastXML binary elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Windows" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64") if(CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 10.0.19044) set(_castxml_hash - 4f6e352a0c7dd2c52386de6af7fee04660ba2cc05fd73f94a2843858f761729a7bea96debf16e51ae52b95b87142f311a08857b852162bf0d204bde9bdc99555) - set(_castxml_url "https://github.com/CastXML/CastXMLSuperbuild/releases/download/v${_castxml_version}/castxml-windows-win11.zip") + 4f6e352a0c7dd2c52386de6af7fee04660ba2cc05fd73f94a2843858f761729a7bea96debf16e51ae52b95b87142f311a08857b852162bf0d204bde9bdc99555 + ) + set(_castxml_url + "https://github.com/CastXML/CastXMLSuperbuild/releases/download/v${_castxml_version}/castxml-windows-win11.zip" + ) set(_download_castxml_binaries 1) else() - set(_castxml_hash 5ad9e16bd2aadefff408e53d8b733597757788256640f9614393205713890dca881b490674c28866f79ca49aba7a42482f1e0fd30f90fead8abe852ef9d10f4f) - set(_castxml_url "https://github.com/CastXML/CastXMLSuperbuild/releases/download/v${_castxml_version}/castxml-windows.zip") + set(_castxml_hash + 5ad9e16bd2aadefff408e53d8b733597757788256640f9614393205713890dca881b490674c28866f79ca49aba7a42482f1e0fd30f90fead8abe852ef9d10f4f + ) + set(_castxml_url + "https://github.com/CastXML/CastXMLSuperbuild/releases/download/v${_castxml_version}/castxml-windows.zip") set(_download_castxml_binaries 1) endif() - # If 64 bit Mac OS X build host ( >= 10.9, Mavericks), use the CastXML binary - elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64" AND (NOT CMAKE_HOST_SYSTEM_VERSION VERSION_LESS "13.0.0")) + # If 64 bit Mac OS X build host ( >= 10.9, Mavericks), use the CastXML binary + elseif( + CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin" + AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64" + AND (NOT + CMAKE_HOST_SYSTEM_VERSION + VERSION_LESS + "13.0.0" + )) - set(_castxml_hash 0ff979f0659581534c7e53aa0a99ec9f0b541b160a8d664ce2f289d590517f2d8180376ccb98dfc75a3e718eb62831385dd32d48b83299e3b16414d1794b7c53) + set(_castxml_hash + 0ff979f0659581534c7e53aa0a99ec9f0b541b160a8d664ce2f289d590517f2d8180376ccb98dfc75a3e718eb62831385dd32d48b83299e3b16414d1794b7c53 + ) set(_castxml_url - "https://github.com/CastXML/CastXMLSuperbuild/releases/download/v${_castxml_version}/castxml-macosx.tar.gz") + "https://github.com/CastXML/CastXMLSuperbuild/releases/download/v${_castxml_version}/castxml-macosx.tar.gz") set(_download_castxml_binaries 1) elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64") - set(_castxml_hash f9a1fd33c20327b9542c1c34b5e005b02c1515a038257fb6db8dc9add998d53c36035f85f419f78e74ca0d33b3a2a6cf45a9a6eb995377d7f64910a525d6e737) + set(_castxml_hash + f9a1fd33c20327b9542c1c34b5e005b02c1515a038257fb6db8dc9add998d53c36035f85f419f78e74ca0d33b3a2a6cf45a9a6eb995377d7f64910a525d6e737 + ) set(_castxml_url - "https://github.com/CastXML/CastXMLSuperbuild/releases/download/v${_castxml_version}/castxml-macos-arm.tar.gz") + "https://github.com/CastXML/CastXMLSuperbuild/releases/download/v${_castxml_version}/castxml-macos-arm.tar.gz") set(_download_castxml_binaries 1) endif() @@ -79,30 +101,32 @@ else() if(POLICY CMP0135) cmake_policy(SET CMP0135 NEW) endif() - ExternalProject_Add(castxml + ExternalProject_Add( + castxml URL ${_castxml_url} URL_HASH SHA512=${_castxml_hash} CONFIGURE_COMMAND "" BUILD_COMMAND "" - INSTALL_COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_BINARY_DIR}/castxml-prefix/src/castxml" "${CMAKE_CURRENT_BINARY_DIR}/castxml" - ) + INSTALL_COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_BINARY_DIR}/castxml-prefix/src/castxml" + "${CMAKE_CURRENT_BINARY_DIR}/castxml") cmake_policy(POP) set(CASTXML_EXECUTABLE ${castxml_ep}) - set(CASTXML_EXECUTABLE ${castxml_ep} CACHE FILEPATH "castxml executable." FORCE) - # Build from source + set(CASTXML_EXECUTABLE + ${castxml_ep} + CACHE FILEPATH "castxml executable." FORCE) + # Build from source elseif(NOT TARGET castxml) set(compiler_information) if(NOT CMAKE_CROSSCOMPILING) set(CMAKE_CXX_COMPILER_LAUNCHER_FLAG -DCMAKE_CXX_COMPILER_LAUNCHER:FILEPATH=${CMAKE_CXX_COMPILER_LAUNCHER}) set(CMAKE_C_COMPILER_LAUNCHER_FLAG -DCMAKE_C_COMPILER_LAUNCHER:FILEPATH=${CMAKE_C_COMPILER_LAUNCHER}) set(compiler_information - -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} - ${CMAKE_CXX_COMPILER_LAUNCHER_FLAG} - "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} -w" - -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} - ${CMAKE_C_COMPILER_LAUNCHER_FLAG} - "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} -w" - ) + -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} + ${CMAKE_CXX_COMPILER_LAUNCHER_FLAG} + "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} -w" + -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} + ${CMAKE_C_COMPILER_LAUNCHER_FLAG} + "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} -w") endif() # might be set to on by default when llvm/clang 3.6 are released # option(ITK_USE_SYSTEM_LLVM "Use system llvm and clang. If OFF, llvm and clang are built as external projects." ON) @@ -112,8 +136,9 @@ else() set(castxml_deps) else() # check the version of clang compiler - if(APPLE AND (((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.2") OR - ((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0"))) + if(APPLE + AND (((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.2") + OR ((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0"))) message(FATAL_ERROR "Mac OS X 10.9 (Mavericks) or newer is required to wrap ITK.") endif() # If we are building ITK @@ -124,7 +149,8 @@ else() set(llvm_version 11.1.0) set(llvm_folder ${llvm_version}) set(llvm_md5 69bc06661ce8f1872e27b40ff96002b2) - ExternalProject_Add(llvm + ExternalProject_Add( + llvm URL "https://github.com/llvm/llvm-project/releases/download/llvmorg-${llvm_folder}/llvm-${llvm_version}.src.tar.xz" URL_MD5 ${llvm_md5} SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/llvm-${llvm_version} @@ -138,10 +164,10 @@ else() -DLLVM_INCLUDE_TESTS:BOOL=OFF -DLLVM_INCLUDE_EXAMPLES:BOOL=OFF -DLLVM_INCLUDE_DOCS:BOOL=OFF - INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/llvm - ) + INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/llvm) set(clang_md5 133c6719e22bfded74fcaf1d3092e979) - ExternalProject_Add(clang + ExternalProject_Add( + clang URL https://github.com/llvm/llvm-project/releases/download/llvmorg-${llvm_folder}/clang-${llvm_version}.src.tar.xz URL_MD5 ${clang_md5} DEPENDS llvm @@ -155,8 +181,7 @@ else() -DCLANG_INCLUDE_DOCS:BOOL=OFF -DCLANG_INCLUDE_TESTS:BOOL=OFF -DLLVM_CONFIG:PATH=${CMAKE_CURRENT_BINARY_DIR}/llvm/bin/llvm-config${exe} - INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/llvm - ) + INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/llvm) set(LLVM_DIR ${CMAKE_CURRENT_BINARY_DIR}/llvm/lib/cmake/llvm/) set(castxml_deps llvm clang) endif() @@ -165,7 +190,8 @@ else() if(ITK_BINARY_DIR) itk_download_attempt_check(CastXML) endif() - ExternalProject_Add(castxml + ExternalProject_Add( + castxml GIT_REPOSITORY ${git_protocol}://github.com/CastXML/CastXML.git GIT_TAG v${_castxml_version} UPDATE_COMMAND "" @@ -177,14 +203,17 @@ else() -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH= -DLLVM_DIR:PATH=${LLVM_DIR} - INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/castxml - ) + INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/castxml) set(CASTXML_EXECUTABLE ${castxml_ep}) - set(CASTXML_EXECUTABLE ${castxml_ep} CACHE FILEPATH "castxml executable." FORCE) + set(CASTXML_EXECUTABLE + ${castxml_ep} + CACHE FILEPATH "castxml executable." FORCE) endif() endif() mark_as_advanced(CASTXML_EXECUTABLE) ############################################################################### # store the current dir, so it can be reused later -set(ITK_WRAP_CASTXML_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "castxml source dir") +set(ITK_WRAP_CASTXML_SOURCE_DIR + "${CMAKE_CURRENT_SOURCE_DIR}" + CACHE INTERNAL "castxml source dir") diff --git a/Wrapping/Generators/Doc/CMakeLists.txt b/Wrapping/Generators/Doc/CMakeLists.txt index 6030e6142fa..2b70c6c231b 100644 --- a/Wrapping/Generators/Doc/CMakeLists.txt +++ b/Wrapping/Generators/Doc/CMakeLists.txt @@ -2,5 +2,9 @@ find_package(Doxygen REQUIRED OPTIONAL_COMPONENTS dot) ############################################################################### # store the current dir, so it can be reused later -set(ITK_WRAP_DOC_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "doc source dir") -set(ITK_WRAP_DOC_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}" CACHE INTERNAL "doc binary dir") +set(ITK_WRAP_DOC_SOURCE_DIR + "${CMAKE_CURRENT_SOURCE_DIR}" + CACHE INTERNAL "doc source dir") +set(ITK_WRAP_DOC_BINARY_DIR + "${CMAKE_CURRENT_BINARY_DIR}" + CACHE INTERNAL "doc binary dir") diff --git a/Wrapping/Generators/Python/CMakeLists.txt b/Wrapping/Generators/Python/CMakeLists.txt index 93214f78a94..e3b7a429d7c 100644 --- a/Wrapping/Generators/Python/CMakeLists.txt +++ b/Wrapping/Generators/Python/CMakeLists.txt @@ -25,36 +25,48 @@ include(itkTargetLinkLibrariesWithDynamicLookup) ############################################################################### # store the current dir, so it can be reused later -set(ITK_WRAP_PYTHON_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "python source dir") - +set(ITK_WRAP_PYTHON_SOURCE_DIR + "${CMAKE_CURRENT_SOURCE_DIR}" + CACHE INTERNAL "python source dir") ############################################################################### # create the python directory in the classindex dir file(MAKE_DIRECTORY ${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python) - ############################################################################### # Configure Python wrapping installation if(Python3_EXECUTABLE AND NOT PY_SITE_PACKAGES_PATH) set(python_check "try:\n import sysconfig\n print(sysconfig.get_path('platlib'))\nexcept:\n pass") file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/detect_site_package_path.py ${python_check}) - execute_process(COMMAND "${Python3_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/detect_site_package_path.py" + execute_process( + COMMAND "${Python3_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/detect_site_package_path.py" OUTPUT_VARIABLE py_spp - ERROR_VARIABLE py_spp - ) + ERROR_VARIABLE py_spp) - execute_process(COMMAND "${Python3_EXECUTABLE}" -c "import sys\nprint(sys.prefix)" + execute_process( + COMMAND "${Python3_EXECUTABLE}" -c "import sys\nprint(sys.prefix)" OUTPUT_VARIABLE py_prefix ERROR_VARIABLE py_prefix - OUTPUT_STRIP_TRAILING_WHITESPACE + OUTPUT_STRIP_TRAILING_WHITESPACE) + if(NOT + "${CMAKE_INSTALL_PREFIX}" + STREQUAL + "${py_prefix}") + install( + CODE "message(WARNING \"CMAKE_INSTALL_PREFIX, ${CMAKE_INSTALL_PREFIX}, does not match Python's prefix, ${py_prefix}\")" ) - if(NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "${py_prefix}") - install(CODE "message(WARNING \"CMAKE_INSTALL_PREFIX, ${CMAKE_INSTALL_PREFIX}, does not match Python's prefix, ${py_prefix}\")") endif() - string(REGEX REPLACE "\n" "" py_spp_no_newline "${py_spp}") + string( + REGEX + REPLACE "\n" + "" + py_spp_no_newline + "${py_spp}") file(TO_CMAKE_PATH "${py_spp_no_newline}" py_spp_nobackslashes) - set(PY_SITE_PACKAGES_PATH "${py_spp_nobackslashes}" CACHE STRING "Python site-packages directory to install Python bindings.") + set(PY_SITE_PACKAGES_PATH + "${py_spp_nobackslashes}" + CACHE STRING "Python site-packages directory to install Python bindings.") mark_as_advanced(PY_SITE_PACKAGES_PATH) endif() @@ -71,14 +83,13 @@ macro(WRAP_ITK_PYTHON_BINDINGS_INSTALL path wrapper_library_name) set(_component_module "${wrapper_library_name}") endif() endif() - install(FILES ${ARGN} + install( + FILES ${ARGN} DESTINATION "${PY_SITE_PACKAGES_PATH}/${path}" - COMPONENT ${_component_module}${WRAP_ITK_INSTALL_COMPONENT_IDENTIFIER}RuntimeLibraries - ) + COMPONENT ${_component_module}${WRAP_ITK_INSTALL_COMPONENT_IDENTIFIER}RuntimeLibraries) unset(_component_module) endmacro() - ############################################################################### # Configure the path-dependent itkConfig.py @@ -113,50 +124,62 @@ if(NOT EXTERNAL_WRAP_ITK_PROJECT) list(APPEND ITK_WRAP_PYTHON_COMPLEX_REAL ${ITKT_${t}}) endforeach() - file(RELATIVE_PATH CONFIG_PYTHON_CONFIGPY_DIR ${ITK_WRAP_PYTHON_ROOT_BINARY_DIR} ${ITK_WRAP_PYTHON_SWIG_CONFIGURATION_DIR}) - file(RELATIVE_PATH CONFIG_PYTHON_SWIGPY_DIR ${ITK_WRAP_PYTHON_ROOT_BINARY_DIR} ${ITK_PYTHON_PACKAGE_DIR}) - file(RELATIVE_PATH CONFIG_PYTHON_SWIGLIB_DIR ${ITK_WRAP_PYTHON_ROOT_BINARY_DIR} ${ITK_PYTHON_PACKAGE_DIR}) - - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/itkConfig.py.in" - "${ITK_WRAP_PYTHON_ROOT_BINARY_DIR}/itkConfig.py" - @ONLY) - - WRAP_ITK_PYTHON_BINDINGS_INSTALL(/ "ITKCommon" "${ITK_WRAP_PYTHON_ROOT_BINARY_DIR}/itkConfig.py") + file( + RELATIVE_PATH + CONFIG_PYTHON_CONFIGPY_DIR + ${ITK_WRAP_PYTHON_ROOT_BINARY_DIR} + ${ITK_WRAP_PYTHON_SWIG_CONFIGURATION_DIR}) + file( + RELATIVE_PATH + CONFIG_PYTHON_SWIGPY_DIR + ${ITK_WRAP_PYTHON_ROOT_BINARY_DIR} + ${ITK_PYTHON_PACKAGE_DIR}) + file( + RELATIVE_PATH + CONFIG_PYTHON_SWIGLIB_DIR + ${ITK_WRAP_PYTHON_ROOT_BINARY_DIR} + ${ITK_PYTHON_PACKAGE_DIR}) + + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/itkConfig.py.in" "${ITK_WRAP_PYTHON_ROOT_BINARY_DIR}/itkConfig.py" @ONLY) + + wrap_itk_python_bindings_install(/ "ITKCommon" "${ITK_WRAP_PYTHON_ROOT_BINARY_DIR}/itkConfig.py") endif() - ############################################################################### # Copy python files for out-of-source builds, and set up install of same. if(NOT EXTERNAL_WRAP_ITK_PROJECT) set(ITK_PYTHON_SUPPORT_MODULES - support/base - support/template_class - support/types - support/extras - support/xarray - support/lazy - support/helpers - support/init_helpers - support/build_options - ) + support/base + support/template_class + support/types + support/extras + support/xarray + support/lazy + support/helpers + support/init_helpers + support/build_options) set(ITK_INIT_MODULE "${CMAKE_CURRENT_SOURCE_DIR}/itk/__init__.py") set(ITK_CONFIGURATION_INIT_MODULE "${ITK_PYTHON_PACKAGE_DIR}/Configuration/__init__.py") # Done listing files. # Now copy these files if necessary. # If not an in-source build - if(NOT "${WrapITK_BINARY_DIR}" MATCHES "^${WrapITK_SOURCE_DIR}$") + if(NOT + "${WrapITK_BINARY_DIR}" + MATCHES + "^${WrapITK_SOURCE_DIR}$") set(ITK_WRAP_PYTHON_FILES) foreach(_file ${ITK_PYTHON_SUPPORT_MODULES}) set(src "${CMAKE_CURRENT_SOURCE_DIR}/itk/${_file}.py") - set(copy_tgt "${ITK_PYTHON_PACKAGE_DIR}/${_file}.py") + set(copy_tgt "${ITK_PYTHON_PACKAGE_DIR}/${_file}.py") list(APPEND ITK_WRAP_PYTHON_FILES "${copy_tgt}") # In a multi-config build, libraries are generated in config subdirectories to keep them separate # We must copy those separate files to a common python compatible tree. # NOTE: THE LAST RUN Build Config will overwrite the current files in the python package tree. - add_custom_command(OUTPUT ${copy_tgt} + add_custom_command( + OUTPUT ${copy_tgt} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${copy_tgt} DEPENDS ${src} COMMENT "Copying ${_file}.py to ${copy_tgt}.") @@ -164,7 +187,8 @@ if(NOT EXTERNAL_WRAP_ITK_PROJECT) set(src "${ITK_INIT_MODULE}") set(copy_tgt "${ITK_PYTHON_PACKAGE_DIR}/__init__.py") list(APPEND ITK_WRAP_PYTHON_FILES "${copy_tgt}") - add_custom_command(OUTPUT ${copy_tgt} + add_custom_command( + OUTPUT ${copy_tgt} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${copy_tgt} DEPENDS ${src} COMMENT "Copying __init__.py to ${copy_tgt}.") @@ -176,26 +200,34 @@ if(NOT EXTERNAL_WRAP_ITK_PROJECT) set(ITK_WRAP_PYTHON_FILES) foreach(_file ${ITK_PYTHON_SUPPORT_MODULES}) set(install_tgt "${CMAKE_CURRENT_SOURCE_DIR}/itk/${_file}.py") - list(APPEND ITK_WRAP_PYTHON_FILES ${ITK_WRAP_PYTHON_FILES} "${install_tgt}") + list( + APPEND + ITK_WRAP_PYTHON_FILES + ${ITK_WRAP_PYTHON_FILES} + "${install_tgt}") endforeach() - WRAP_ITK_PYTHON_BINDINGS_INSTALL(/itk/support "ITKCommon" ${ITK_WRAP_PYTHON_FILES}) - WRAP_ITK_PYTHON_BINDINGS_INSTALL(/itk/Configuration "ITKCommon" "${ITK_CONFIGURATION_INIT_MODULE}") - WRAP_ITK_PYTHON_BINDINGS_INSTALL(/itk "ITKCommon" ${ITK_INIT_MODULE}) + wrap_itk_python_bindings_install(/itk/support "ITKCommon" ${ITK_WRAP_PYTHON_FILES}) + wrap_itk_python_bindings_install(/itk/Configuration "ITKCommon" "${ITK_CONFIGURATION_INIT_MODULE}") + wrap_itk_python_bindings_install(/itk "ITKCommon" ${ITK_INIT_MODULE}) install(DIRECTORY ${ITK_STUB_DIR}/ DESTINATION ${PY_SITE_PACKAGES_PATH}/${ITK_STUB_BASENAME}) endif() - ############################################################################### # Configure and install the custom python .pth files -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/WrapITK.pth.in" - "${ITK_WRAP_PYTHON_ROOT_BINARY_DIR}/WrapITK.pth" - @ONLY) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/WrapITK.pth.in" "${ITK_WRAP_PYTHON_ROOT_BINARY_DIR}/WrapITK.pth" @ONLY) ############################################################################### # Define the wrapping macros -macro(itk_setup_swig_python type base_name interface_file python_file cpp_file doc_file) +macro( + itk_setup_swig_python + type + base_name + interface_file + python_file + cpp_file + doc_file) ############################################################################# # Runs swig to produce the *Python.cpp and the *Python.py file @@ -214,74 +246,64 @@ macro(itk_setup_swig_python type base_name interface_file python_file cpp_file d set(_swig_depend swig) endif() - set(dependencies - "${DEPS}" - "${interface_file}" - "${_swig_depend}") + set(dependencies "${DEPS}" "${interface_file}" "${_swig_depend}") unset(_swig_depend) if(NOT EXTERNAL_WRAP_ITK_PROJECT) - configure_file(${WrapITK_SOURCE_DIR}/Generators/Python/PyBase/pyBase.i - "${WRAP_ITK_TYPEDEFS_DIRECTORY}" COPYONLY) + configure_file(${WrapITK_SOURCE_DIR}/Generators/Python/PyBase/pyBase.i "${WRAP_ITK_TYPEDEFS_DIRECTORY}" COPYONLY) list(APPEND dependencies "${WRAP_ITK_TYPEDEFS_DIRECTORY}/pyBase.i") endif() if("${type}" STREQUAL "Module") # Module - list(APPEND dependencies + list( + APPEND + dependencies "${ITK_WRAP_PYTHON_LIBRARY_DEPS}" "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/${WRAPPER_LIBRARY_NAME}_ext.i") else() # Submodule - list(APPEND dependencies + list( + APPEND + dependencies "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/${base_name}_ext.i" "${doc_file}") endif() add_custom_command( OUTPUT ${cpp_file} ${python_file} - COMMAND ${swig_command} -c++ -python -O -features autodoc=2 - -py3 - -doxygen - -Werror - -w302 # Identifier 'name' redefined (ignored) - -w303 # %extend defined for an undeclared class 'name' (to avoid warning about customization in pyBase.i) - -w312 # Unnamed nested class not currently supported (ignored) - -w314 # 'identifier' is a lang keyword - -w361 # operator! ignored - -w362 # operator= ignored - -w350 # operator new ignored - -w383 # operator++ ignored - -w384 # operator-- ignored - -w389 # operator[] ignored - -w394 # operator new[] ignored - -w395 # operator delete[] ignored - -w467 # Overloaded declaration not supported (no type checking rule for 'type') - -w508 # Declaration of 'name' shadows declaration accessible via operator->(), previous declaration of'declaration' - -w509 # Overloaded method declaration effectively ignored, as it is shadowed by declaration - -o ${cpp_file} - # The order of this include folder and the next one matters as otherwise the following exception is thrown: - # "This version of exception.i should not be used" - -I${SWIG_DIR}/python - -I${SWIG_DIR} - -I${WRAP_ITK_CMAKE_DIR}/Generators - -I${WRAP_ITK_TYPEDEFS_DIRECTORY}/python - -I${WRAP_ITK_TYPEDEFS_DIRECTORY} - ${WRAP_ITK_SWIG_ARGS_PYTHON} - -outdir ${ITK_PYTHON_PACKAGE_DIR} - ${interface_file} + COMMAND + ${swig_command} -c++ -python -O -features autodoc=2 -py3 -doxygen -Werror + -w302 # Identifier 'name' redefined (ignored) + -w303 # %extend defined for an undeclared class 'name' (to avoid warning about customization in pyBase.i) + -w312 # Unnamed nested class not currently supported (ignored) + -w314 # 'identifier' is a lang keyword + -w361 # operator! ignored + -w362 # operator= ignored + -w350 # operator new ignored + -w383 # operator++ ignored + -w384 # operator-- ignored + -w389 # operator[] ignored + -w394 # operator new[] ignored + -w395 # operator delete[] ignored + -w467 # Overloaded declaration not supported (no type checking rule for 'type') + -w508 # Declaration of 'name' shadows declaration accessible via operator->(), previous declaration of'declaration' + -w509 # Overloaded method declaration effectively ignored, as it is shadowed by declaration + -o ${cpp_file} + # The order of this include folder and the next one matters as otherwise the following exception is thrown: + # "This version of exception.i should not be used" + -I${SWIG_DIR}/python -I${SWIG_DIR} -I${WRAP_ITK_CMAKE_DIR}/Generators -I${WRAP_ITK_TYPEDEFS_DIRECTORY}/python + -I${WRAP_ITK_TYPEDEFS_DIRECTORY} ${WRAP_ITK_SWIG_ARGS_PYTHON} -outdir ${ITK_PYTHON_PACKAGE_DIR} ${interface_file} WORKING_DIRECTORY ${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python - DEPENDS ${dependencies} - ) + DEPENDS ${dependencies}) - WRAP_ITK_PYTHON_BINDINGS_INSTALL(/itk "${WRAPPER_LIBRARY_NAME}" "${python_file}") + wrap_itk_python_bindings_install(/itk "${WRAPPER_LIBRARY_NAME}" "${python_file}") unset(dependencies) unset(swig_command) endmacro() - macro(itk_end_wrap_submodule_python group_name) # base_name may be used in other macros @@ -291,16 +313,28 @@ macro(itk_end_wrap_submodule_python group_name) # add a template definition for the superclass which is not in ITK set(text) foreach(d ${ITK_WRAP_IMAGE_DIMS}) - set(text "${text}%template(mapULitkQuadEdgeMeshPointF${d}) std::map< unsigned long, itkQuadEdgeMeshPointF${d}, std::less< unsigned long > >;\n") - ADD_PYTHON_CONFIG_TEMPLATE("map" "std::map" "mapULitkQuadEdgeMeshPointF${d}" "unsigned long, itk::QuadEdgeMeshPoint< float, ${d} >") + set(text + "${text}%template(mapULitkQuadEdgeMeshPointF${d}) std::map< unsigned long, itkQuadEdgeMeshPointF${d}, std::less< unsigned long > >;\n" + ) + add_python_config_template( + "map" + "std::map" + "mapULitkQuadEdgeMeshPointF${d}" + "unsigned long, itk::QuadEdgeMeshPoint< float, ${d} >") # set(text "${text}%template(itkMapContainerMD${d}QBAIUL_Superclass) std::map< itkMeshD${d}Q::BoundaryAssignmentIdentifier, unsigned long, std::less< itkMeshD${d}Q::BoundaryAssignmentIdentifier > >;\n") # ADD_PYTHON_CONFIG_TEMPLATE("map" "std::map" "itkMapContainerMD${d}QBAIUL_Superclass" "itk::Mesh >::BoundaryAssignmentIdentifier, unsigned long") set(text "${text}%traits_swigtype(itkCellInterfaceDQEMCTI${d});\n") set(text "${text}%fragment(SWIG_Traits_frag(itkCellInterfaceDQEMCTI${d}));\n") - set(text "${text}%template(mapULitkCellInterfaceDQEMCTI${d}) std::map< unsigned long, itkCellInterfaceDQEMCTI${d} *, std::less< unsigned long > >;\n") - ADD_PYTHON_CONFIG_TEMPLATE("map" "std::map" "mapULitkCellInterfaceDQEMCTI${d}" "unsigned long, itk::CellInterface< double, itk::QuadEdgeMeshCellTraitsInfo< ${d} > >*") + set(text + "${text}%template(mapULitkCellInterfaceDQEMCTI${d}) std::map< unsigned long, itkCellInterfaceDQEMCTI${d} *, std::less< unsigned long > >;\n" + ) + add_python_config_template( + "map" + "std::map" + "mapULitkCellInterfaceDQEMCTI${d}" + "unsigned long, itk::CellInterface< double, itk::QuadEdgeMeshCellTraitsInfo< ${d} > >*") endforeach() string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "${text}") @@ -330,8 +364,7 @@ macro(itk_end_wrap_submodule_python group_name) # create the python customization for that wrap_*.cmake file. configure_file("${ITK_WRAP_PYTHON_SOURCE_DIR}/module_ext.i.in" - "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/${base_name}_ext.i" - @ONLY) + "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/${base_name}_ext.i" @ONLY) # prepare dependencies set(DEPS) # Used in itk_setup_swig_python macro (passed as global variable) @@ -340,7 +373,13 @@ macro(itk_end_wrap_submodule_python group_name) endforeach() # Run swig to produce the *Python.cpp and the *Python.py file - itk_setup_swig_python("Submodule" ${base_name} ${interface_file} ${python_file} ${cpp_file} "${doc_file}") + itk_setup_swig_python( + "Submodule" + ${base_name} + ${interface_file} + ${python_file} + ${cpp_file} + "${doc_file}") # add the c++ files which will be generated by the swig command to the # list of python related c++ files, so they can be built at the end @@ -349,12 +388,18 @@ macro(itk_end_wrap_submodule_python group_name) list(APPEND ITK_WRAP_PYTHON_FILES ${python_file}) # add needed files to the deps list - list(APPEND ITK_WRAP_PYTHON_LIBRARY_DEPS "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/${base_name}_ext.i" "${cpp_file}") + list( + APPEND + ITK_WRAP_PYTHON_LIBRARY_DEPS + "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/${base_name}_ext.i" + "${cpp_file}") # add this wrap_*.cmake stuff to the list of modules to init in the main module. # first the extern c declaration and then the call of the extern function - set(ITK_WRAP_PYTHON_LIBRARY_DECLS "${ITK_WRAP_PYTHON_LIBRARY_DECLS} extern \"C\" PyMODINIT_FUNC PyInit__${base_name}Python();\n") - set(ITK_WRAP_PYTHON_LIBRARY_CALLS "${ITK_WRAP_PYTHON_LIBRARY_CALLS} + set(ITK_WRAP_PYTHON_LIBRARY_DECLS + "${ITK_WRAP_PYTHON_LIBRARY_DECLS} extern \"C\" PyMODINIT_FUNC PyInit__${base_name}Python();\n") + set(ITK_WRAP_PYTHON_LIBRARY_CALLS + "${ITK_WRAP_PYTHON_LIBRARY_CALLS} PyObject * ${base_name}AlreadyImported = PyDict_GetItemString(sysModules, \"itk._${base_name}Python\"); if(${base_name}AlreadyImported == NULL) { @@ -371,44 +416,63 @@ macro(itk_end_wrap_submodule_python group_name) unset(python_file) endmacro() - -macro(ADD_PYTHON_CONFIG_TEMPLATE base_name wrap_class swig_name template_params) +macro( + ADD_PYTHON_CONFIG_TEMPLATE + base_name + wrap_class + swig_name + template_params) # Find if a header file corresponding to 'base_name' can be found in the current include directory - set(_include ${${WRAPPER_LIBRARY_NAME}_SOURCE_DIR}/include/itk${base_name}.h) - if(EXISTS ${_include}) - set(class_in_module "True") - else() - set(class_in_module "False") - endif() + set(_include ${${WRAPPER_LIBRARY_NAME}_SOURCE_DIR}/include/itk${base_name}.h) + if(EXISTS ${_include}) + set(class_in_module "True") + else() + set(class_in_module "False") + endif() # build the name - type association list used in *Config.py if("${template_params}" STREQUAL "") - set(ITK_WRAP_PYTHON_CONFIGURATION_TEMPLATES "${ITK_WRAP_PYTHON_CONFIGURATION_TEMPLATES} ('${base_name}', '${wrap_class}', '${swig_name}', ${class_in_module}),\n") + set(ITK_WRAP_PYTHON_CONFIGURATION_TEMPLATES + "${ITK_WRAP_PYTHON_CONFIGURATION_TEMPLATES} ('${base_name}', '${wrap_class}', '${swig_name}', ${class_in_module}),\n" + ) else() - set(ITK_WRAP_PYTHON_CONFIGURATION_TEMPLATES "${ITK_WRAP_PYTHON_CONFIGURATION_TEMPLATES} ('${base_name}', '${wrap_class}', '${swig_name}', ${class_in_module}, '${template_params}'),\n") + set(ITK_WRAP_PYTHON_CONFIGURATION_TEMPLATES + "${ITK_WRAP_PYTHON_CONFIGURATION_TEMPLATES} ('${base_name}', '${wrap_class}', '${swig_name}', ${class_in_module}, '${template_params}'),\n" + ) endif() unset(class_in_module) unset(_include) endmacro() - macro(ADD_PYTHON_OUTPUT_RETURN_BY_VALUE_CLASS type function) string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYTHON_OUTPUT_RETURN_BY_VALUE_CLASS(${type}, ${function})\n") endmacro() - macro(ADD_PYTHON_SEQ_TYPEMAP swig_name dim) string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYTHON_SEQ_TYPEMAP(${swig_name}, ${dim})\n") endmacro() - macro(ADD_PYTHON_VEC_TYPEMAP swig_name template_params) - string(REGEX REPLACE "(.*),(.*)" "\\1" type "${template_params}") - string(REGEX REPLACE "(.*),(.*)" "\\2" dim "${template_params}") + string( + REGEX + REPLACE "(.*),(.*)" + "\\1" + type + "${template_params}") + string( + REGEX + REPLACE "(.*),(.*)" + "\\2" + dim + "${template_params}") # Black listing all types that contain a comma which would create issues # in C/C++ macros - string(REGEX MATCH "(.*,.*)" isTemplate "${type}") + string( + REGEX MATCH + "(.*,.*)" + isTemplate + "${type}") if(NOT isTemplate) string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYTHON_VEC_TYPEMAP(${swig_name}, ${type}, ${dim})\n") endif() @@ -418,7 +482,6 @@ macro(ADD_PYTHON_VARIABLE_LENGTH_SEQ_TYPEMAP type value_type) string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYTHON_VARLEN_SEQ_TYPEMAP(${type}, ${value_type})\n") endmacro() - macro(ADD_PYTHON_POINTER_TYPEMAP typemap_name) set(text "DECLARE_REF_COUNT_CLASS(${typemap_name})\n") @@ -427,6 +490,8 @@ endmacro() ############################################################################### # Add the Python tests -if(BUILD_TESTING AND ITK_SOURCE_DIR AND NOT EXTERNAL_WRAP_ITK_PROJECT) +if(BUILD_TESTING + AND ITK_SOURCE_DIR + AND NOT EXTERNAL_WRAP_ITK_PROJECT) add_subdirectory(Tests) endif() diff --git a/Wrapping/Generators/Python/PyBase/CMakeLists.txt b/Wrapping/Generators/Python/PyBase/CMakeLists.txt index 7c412a0ab0f..5b6bce6d8c5 100644 --- a/Wrapping/Generators/Python/PyBase/CMakeLists.txt +++ b/Wrapping/Generators/Python/PyBase/CMakeLists.txt @@ -1,44 +1,154 @@ itk_wrap_module("ITKPyBase" Python) - set(WRAPPER_LIBRARY_DEPENDS) - set(WRAPPER_LIBRARY_LINK_LIBRARIES) +set(WRAPPER_LIBRARY_DEPENDS) +set(WRAPPER_LIBRARY_LINK_LIBRARIES) - set(WRAPPER_LIBRARY_SWIG_INPUTS "${CMAKE_CURRENT_SOURCE_DIR}/pyBase.i") +set(WRAPPER_LIBRARY_SWIG_INPUTS "${CMAKE_CURRENT_SOURCE_DIR}/pyBase.i") - ADD_PYTHON_CONFIG_TEMPLATE("cerr" "std::cerr" "cerr" "") - ADD_PYTHON_CONFIG_TEMPLATE("cin" "std::cin" "cin" "") - ADD_PYTHON_CONFIG_TEMPLATE("clog" "std::clog" "clog" "") - ADD_PYTHON_CONFIG_TEMPLATE("cout" "std::cout" "cout" "") - ADD_PYTHON_CONFIG_TEMPLATE("cvar" "std::cvar" "cvar" "") - ADD_PYTHON_CONFIG_TEMPLATE("endl" "std::endl" "endl" "") - ADD_PYTHON_CONFIG_TEMPLATE("ends" "std::ends" "ends" "") - ADD_PYTHON_CONFIG_TEMPLATE("flush" "std::flush" "flush" "") - ADD_PYTHON_CONFIG_TEMPLATE("ios" "std::ios" "ios" "") - ADD_PYTHON_CONFIG_TEMPLATE("ios_base" "std::ios_base" "ios_base" "") - ADD_PYTHON_CONFIG_TEMPLATE("ios_base_sync_with_stdio" "std::ios_base_sync_with_stdio" "ios_base_sync_with_stdio" "") - ADD_PYTHON_CONFIG_TEMPLATE("ios_base_xalloc" "std::ios_base_xalloc" "ios_base_xalloc" "") - ADD_PYTHON_CONFIG_TEMPLATE("iostream" "std::iostream" "iostream" "") - ADD_PYTHON_CONFIG_TEMPLATE("istream" "std::istream" "istream" "") +add_python_config_template( + "cerr" + "std::cerr" + "cerr" + "") +add_python_config_template( + "cin" + "std::cin" + "cin" + "") +add_python_config_template( + "clog" + "std::clog" + "clog" + "") +add_python_config_template( + "cout" + "std::cout" + "cout" + "") +add_python_config_template( + "cvar" + "std::cvar" + "cvar" + "") +add_python_config_template( + "endl" + "std::endl" + "endl" + "") +add_python_config_template( + "ends" + "std::ends" + "ends" + "") +add_python_config_template( + "flush" + "std::flush" + "flush" + "") +add_python_config_template( + "ios" + "std::ios" + "ios" + "") +add_python_config_template( + "ios_base" + "std::ios_base" + "ios_base" + "") +add_python_config_template( + "ios_base_sync_with_stdio" + "std::ios_base_sync_with_stdio" + "ios_base_sync_with_stdio" + "") +add_python_config_template( + "ios_base_xalloc" + "std::ios_base_xalloc" + "ios_base_xalloc" + "") +add_python_config_template( + "iostream" + "std::iostream" + "iostream" + "") +add_python_config_template( + "istream" + "std::istream" + "istream" + "") # ADD_PYTHON_CONFIG_TEMPLATE("istringstream" "std::istringstream" "istringstream" "") - ADD_PYTHON_CONFIG_TEMPLATE("ostream" "std::ostream" "ostream" "") +add_python_config_template( + "ostream" + "std::ostream" + "ostream" + "") # ADD_PYTHON_CONFIG_TEMPLATE("ostringstream" "std::ostringstream" "ostringstream" "") # ADD_PYTHON_CONFIG_TEMPLATE("streambuf" "std::streambuf" "streambuf" "") - ADD_PYTHON_CONFIG_TEMPLATE("string" "std::string" "str" "") +add_python_config_template( + "string" + "std::string" + "str" + "") # ADD_PYTHON_CONFIG_TEMPLATE("stringstream" "std::stringstream" "stringstream" "") - foreach(t B UC US UL SC SS SL F D) - ADD_PYTHON_CONFIG_TEMPLATE("map" "std::map" "map${t}${t}" "${ITKT_${t}}, ${ITKT_${t}}") - ADD_PYTHON_CONFIG_TEMPLATE("list" "std::list" "list${t}" "${ITKT_${t}}") - ADD_PYTHON_CONFIG_TEMPLATE("set" "std::set" "set${t}" "${ITKT_${t}}") - ADD_PYTHON_CONFIG_TEMPLATE("vector" "std::vector" "vector${t}" "${ITKT_${t}}") - ADD_PYTHON_CONFIG_TEMPLATE("vector" "std::vector" "vectorvector${t}" "std::vector< ${ITKT_${t}} >") - endforeach() - foreach(t ULL SLL) - ADD_PYTHON_CONFIG_TEMPLATE("set" "std::set" "set${t}" "${ITKT_${t}}") - endforeach() +foreach( + t + B + UC + US + UL + SC + SS + SL + F + D) + add_python_config_template( + "map" + "std::map" + "map${t}${t}" + "${ITKT_${t}}, ${ITKT_${t}}") + add_python_config_template( + "list" + "std::list" + "list${t}" + "${ITKT_${t}}") + add_python_config_template( + "set" + "std::set" + "set${t}" + "${ITKT_${t}}") + add_python_config_template( + "vector" + "std::vector" + "vector${t}" + "${ITKT_${t}}") + add_python_config_template( + "vector" + "std::vector" + "vectorvector${t}" + "std::vector< ${ITKT_${t}} >") +endforeach() +foreach(t ULL SLL) + add_python_config_template( + "set" + "std::set" + "set${t}" + "${ITKT_${t}}") +endforeach() - ADD_PYTHON_CONFIG_TEMPLATE("map" "std::map" "mapULD" "unsigned long, double") - ADD_PYTHON_CONFIG_TEMPLATE("vector" "std::vector" "vectorsetUL" "std::set< unsigned long >") - ADD_PYTHON_CONFIG_TEMPLATE("map" "std::map" "mapsetUL" "unsigned long, std::set< unsigned long >") +add_python_config_template( + "map" + "std::map" + "mapULD" + "unsigned long, double") +add_python_config_template( + "vector" + "std::vector" + "vectorsetUL" + "std::set< unsigned long >") +add_python_config_template( + "map" + "std::map" + "mapsetUL" + "unsigned long, std::set< unsigned long >") itk_end_wrap_module() diff --git a/Wrapping/Generators/Python/PyUtils/CMakeLists.txt b/Wrapping/Generators/Python/PyUtils/CMakeLists.txt index 6caa2d26784..3223e1c8142 100644 --- a/Wrapping/Generators/Python/PyUtils/CMakeLists.txt +++ b/Wrapping/Generators/Python/PyUtils/CMakeLists.txt @@ -3,9 +3,9 @@ itk_wrap_module("ITKPyUtils" Python) - set(WRAPPER_LIBRARY_DEPENDS ITKCommon) - set(WRAPPER_LIBRARY_LINK_LIBRARIES ${ITK_LIBRARIES}) +set(WRAPPER_LIBRARY_DEPENDS ITKCommon) +set(WRAPPER_LIBRARY_LINK_LIBRARIES ${ITK_LIBRARIES}) - set(WRAPPER_LIBRARY_CXX_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/itkPyCommand.cxx") +set(WRAPPER_LIBRARY_CXX_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/itkPyCommand.cxx") - itk_auto_load_and_end_wrap_submodules() +itk_auto_load_and_end_wrap_submodules() diff --git a/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.wrap b/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.wrap index 38b255bb8d2..1d9d69c4f84 100644 --- a/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.wrap +++ b/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.wrap @@ -1,3 +1,3 @@ itk_wrap_class("itk::PyImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_SCALAR}") +itk_wrap_image_filter_combinations("${WRAP_ITK_SCALAR}" "${WRAP_ITK_SCALAR}") itk_end_wrap_class() diff --git a/Wrapping/Generators/Python/Tests/CMakeLists.txt b/Wrapping/Generators/Python/Tests/CMakeLists.txt index b1789c8b688..3e19c0f0cc5 100644 --- a/Wrapping/Generators/Python/Tests/CMakeLists.txt +++ b/Wrapping/Generators/Python/Tests/CMakeLists.txt @@ -1,110 +1,253 @@ # TODO: drop -E option once all filters/spatial objects/cost functions are actually wrapped -itk_python_add_test(NAME NonBlockingPythonFilterCoverage COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/wrappingCoverage.py -E -b Filter -e ${CMAKE_CURRENT_SOURCE_DIR}/exclude-filters.txt ${ITK_INCLUDE_DIRS}) -itk_python_add_test(NAME NonBlockingPythonSpatialObjectCoverage COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/wrappingCoverage.py -E -b SpatialObject ${ITK_INCLUDE_DIRS}) +itk_python_add_test( + NAME + NonBlockingPythonFilterCoverage + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/wrappingCoverage.py + -E + -b + Filter + -e + ${CMAKE_CURRENT_SOURCE_DIR}/exclude-filters.txt + ${ITK_INCLUDE_DIRS}) +itk_python_add_test( + NAME + NonBlockingPythonSpatialObjectCoverage + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/wrappingCoverage.py + -E + -b + SpatialObject + ${ITK_INCLUDE_DIRS}) if(ITK_BUILD_DEFAULT_MODULES) - itk_python_add_test(NAME NonBlockingPythonCostFunctionCoverage COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/wrappingCoverage.py -E -b CostFunction ${ITK_INCLUDE_DIRS}) - itk_python_add_test(NAME PythonOptimizerCoverage COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/wrappingCoverage.py -b Optimizer ${ITK_INCLUDE_DIRS}) + itk_python_add_test( + NAME + NonBlockingPythonCostFunctionCoverage + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/wrappingCoverage.py + -E + -b + CostFunction + ${ITK_INCLUDE_DIRS}) + itk_python_add_test( + NAME + PythonOptimizerCoverage + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/wrappingCoverage.py + -b + Optimizer + ${ITK_INCLUDE_DIRS}) endif() -itk_python_add_test(NAME PythonImageIOCoverage COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/wrappingCoverage.py -b ImageIO -e ${CMAKE_CURRENT_SOURCE_DIR}/exclude-imageio.txt ${ITK_INCLUDE_DIRS}) -itk_python_add_test(NAME PythonTransformCoverage COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/wrappingCoverage.py -b Transform -e ${CMAKE_CURRENT_SOURCE_DIR}/exclude-transform.txt ${ITK_INCLUDE_DIRS}) +itk_python_add_test( + NAME + PythonImageIOCoverage + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/wrappingCoverage.py + -b + ImageIO + -e + ${CMAKE_CURRENT_SOURCE_DIR}/exclude-imageio.txt + ${ITK_INCLUDE_DIRS}) +itk_python_add_test( + NAME + PythonTransformCoverage + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/wrappingCoverage.py + -b + Transform + -e + ${CMAKE_CURRENT_SOURCE_DIR}/exclude-transform.txt + ${ITK_INCLUDE_DIRS}) -itk_python_add_test(NAME PythonFindEmptyClasses COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/findEmptyClasses.py) -itk_python_add_test(NAME PythonGetNameOfClass COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/getNameOfClass.py) -itk_python_add_test(NAME PythonTiming COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/timing.py) -itk_python_add_test(NAME PythonBuildOptions COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build_options.py) -itk_python_add_test(NAME PythonVerifyGetOutputAPIConsistency COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/verifyGetOutputAPIConsistency.py) -itk_python_add_test(NAME PythonVerifyTTypeAPIConsistency COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/verifyTTypeAPIConsistency.py) -itk_python_add_test(NAME PythonTypeTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/PythonTypeTest.py) -itk_python_add_test(NAME PythonComplex COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/complex.py) -itk_python_add_test(NAME PythonHelperFunctions COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/helpers.py) -itk_python_add_test(NAME PythonLazyModule COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lazy.py) -itk_python_add_test(NAME PythonNoLazyModule COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/nolazy.py) -itk_python_add_test(NAME PythonNoDefaultFactories COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/nodefaultfactories.py) -itk_python_add_test(NAME PythonDICOMSeries COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/dicomSeries.py - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0075.dcm} - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0076.dcm} - DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0077.dcm}) -itk_python_add_test(NAME PyImageFilterTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/PyImageFilterTest.py) -itk_python_add_test(NAME PythonConvertMetaData COMMAND +itk_python_add_test( + NAME + PythonFindEmptyClasses + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/findEmptyClasses.py) +itk_python_add_test( + NAME + PythonGetNameOfClass + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/getNameOfClass.py) +itk_python_add_test( + NAME + PythonTiming + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/timing.py) +itk_python_add_test( + NAME + PythonBuildOptions + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/build_options.py) +itk_python_add_test( + NAME + PythonVerifyGetOutputAPIConsistency + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/verifyGetOutputAPIConsistency.py) +itk_python_add_test( + NAME + PythonVerifyTTypeAPIConsistency + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/verifyTTypeAPIConsistency.py) +itk_python_add_test( + NAME + PythonTypeTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/PythonTypeTest.py) +itk_python_add_test( + NAME + PythonComplex + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/complex.py) +itk_python_add_test( + NAME + PythonHelperFunctions + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/helpers.py) +itk_python_add_test( + NAME + PythonLazyModule + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/lazy.py) +itk_python_add_test( + NAME + PythonNoLazyModule + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/nolazy.py) +itk_python_add_test( + NAME + PythonNoDefaultFactories + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/nodefaultfactories.py) +itk_python_add_test( + NAME + PythonDICOMSeries + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/dicomSeries.py + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0075.dcm} + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0076.dcm} + DATA{${ITK_DATA_ROOT}/Input/DicomSeries/Image0077.dcm}) +itk_python_add_test( + NAME + PyImageFilterTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/PyImageFilterTest.py) +itk_python_add_test( + NAME + PythonConvertMetaData + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/test_metadata.py DATA{${WrapITK_SOURCE_DIR}/images/r16slice.nii.gz} DATA{${WrapITK_SOURCE_DIR}/images/sourceImage.nii.gz} DATA{${WrapITK_SOURCE_DIR}/images/warp2D.nii.gz} - DATA{${WrapITK_SOURCE_DIR}/images/warp3D.nii.gz} - ) + DATA{${WrapITK_SOURCE_DIR}/images/warp3D.nii.gz}) # some tests will fail if dim=2 and unsigned short are not wrapped -INTERSECTION(WRAP_2 2 "${ITK_WRAP_IMAGE_DIMS}") +intersection(WRAP_2 2 "${ITK_WRAP_IMAGE_DIMS}") if(ITK_WRAP_unsigned_char AND WRAP_2) if(ITK_BUILD_DEFAULT_MODULES) - itk_python_add_test(NAME PythonTypemapsTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/PythonTypemapsTest.py) - itk_python_add_test(NAME PythonTemplateTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/PythonTemplateTest.py) - itk_python_add_test(NAME PythonModifiedTimeTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ModifiedTime.py) - itk_python_add_test(NAME PythonTemplatedPipelineTest + itk_python_add_test( + NAME + PythonTypemapsTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/PythonTypemapsTest.py) + itk_python_add_test( + NAME + PythonTemplateTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/PythonTemplateTest.py) + itk_python_add_test( + NAME + PythonModifiedTimeTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/ModifiedTime.py) + itk_python_add_test( + NAME + PythonTemplatedPipelineTest TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/templated_pipeline.png DATA{${WrapITK_SOURCE_DIR}/images/templated_pipeline.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/templated_pipeline.py - DATA{${WrapITK_SOURCE_DIR}/images/2th_cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/templated_pipeline.png - 10 - ) - itk_python_add_test(NAME PythonModuleToModuleTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/module2module.py - DATA{${WrapITK_SOURCE_DIR}/images/cthead1.png} - 5 - ) - itk_python_add_test(NAME PythonExtrasTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/extras.py - DATA{${WrapITK_SOURCE_DIR}/images/cthead1.png} - DATA{../../../../Testing/Data/Input/mushroom.vtk} - DATA{../../../../Testing/Data/Input/LinearTransform.h5} - ${ITK_TEST_OUTPUT_DIR}/out.png - ${ITK_TEST_OUTPUT_DIR}/extras-mushroom.vtk - ${ITK_TEST_OUTPUT_DIR} - ${ITK_TEST_OUTPUT_DIR}/LinearTransformWritten.h5 - ${ExternalData_BINARY_ROOT}/Testing/Data/Input/DicomSeries - ) - set_tests_properties( PythonExtrasTest PROPERTIES DEPENDS - PythonDICOMSeries - ) - itk_python_add_test(NAME PythonXarrayTest - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/test_xarray.py - DATA{${WrapITK_SOURCE_DIR}/images/cthead1.png} - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/templated_pipeline.png + DATA{${WrapITK_SOURCE_DIR}/images/templated_pipeline.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/templated_pipeline.py + DATA{${WrapITK_SOURCE_DIR}/images/2th_cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/templated_pipeline.png + 10) + itk_python_add_test( + NAME + PythonModuleToModuleTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/module2module.py + DATA{${WrapITK_SOURCE_DIR}/images/cthead1.png} + 5) + itk_python_add_test( + NAME + PythonExtrasTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/extras.py + DATA{${WrapITK_SOURCE_DIR}/images/cthead1.png} + DATA{../../../../Testing/Data/Input/mushroom.vtk} + DATA{../../../../Testing/Data/Input/LinearTransform.h5} + ${ITK_TEST_OUTPUT_DIR}/out.png + ${ITK_TEST_OUTPUT_DIR}/extras-mushroom.vtk + ${ITK_TEST_OUTPUT_DIR} + ${ITK_TEST_OUTPUT_DIR}/LinearTransformWritten.h5 + ${ExternalData_BINARY_ROOT}/Testing/Data/Input/DicomSeries) + set_tests_properties(PythonExtrasTest PROPERTIES DEPENDS PythonDICOMSeries) + itk_python_add_test( + NAME + PythonXarrayTest + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/test_xarray.py + DATA{${WrapITK_SOURCE_DIR}/images/cthead1.png}) endif() endif() -UNIQUE(types "${WRAP_ITK_SCALAR};UC") +unique(types "${WRAP_ITK_SCALAR};UC") # signed char can't be used to store an image with values up to 255 list(REMOVE_ITEM types SC) foreach(d ${ITK_WRAP_IMAGE_DIMS}) foreach(t ${types}) - itk_python_add_test(NAME PythonSimplePipeline${t}${d} + itk_python_add_test( + NAME + PythonSimplePipeline${t}${d} TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/simple_pipeline${t}${d}.nrrd DATA{${WrapITK_SOURCE_DIR}/images/cthead1.png} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/simple_pipeline.py - ${t} - ${d} - DATA{${WrapITK_SOURCE_DIR}/images/cthead1.png} - ${ITK_TEST_OUTPUT_DIR}/simple_pipeline${t}${d}.nrrd - ) + --compare + ${ITK_TEST_OUTPUT_DIR}/simple_pipeline${t}${d}.nrrd + DATA{${WrapITK_SOURCE_DIR}/images/cthead1.png} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/simple_pipeline.py + ${t} + ${d} + DATA{${WrapITK_SOURCE_DIR}/images/cthead1.png} + ${ITK_TEST_OUTPUT_DIR}/simple_pipeline${t}${d}.nrrd) endforeach() endforeach() - # Test the lazyloading in a multiprocessing environment -itk_python_add_test(NAME PythonMultiprocessLazyLoad - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/multiprocess_lazy_loading.py - DATA{${WrapITK_SOURCE_DIR}/images/cthead1.png} DATA{${WrapITK_SOURCE_DIR}/images/templated_pipeline.png} DATA{${WrapITK_SOURCE_DIR}/images/2th_cthead1.png} - ) +itk_python_add_test( + NAME + PythonMultiprocessLazyLoad + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/multiprocess_lazy_loading.py + DATA{${WrapITK_SOURCE_DIR}/images/cthead1.png} + DATA{${WrapITK_SOURCE_DIR}/images/templated_pipeline.png} + DATA{${WrapITK_SOURCE_DIR}/images/2th_cthead1.png}) # Test proper reading and writing of VariableLengthVector -itk_python_add_test(NAME PythonVLVReadWriteTest - TEST_DRIVER_ARGS - --compare ${ITK_TEST_OUTPUT_DIR}/TestVLV.seg.nrrd DATA{${WrapITK_SOURCE_DIR}/images/TestVLV.seg.nrrd} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/readWriteVLV.py - DATA{${WrapITK_SOURCE_DIR}/images/TestVLV.seg.nrrd} - ${ITK_TEST_OUTPUT_DIR}/TestVLV.seg.nrrd - 59 85 58 5 - ) +itk_python_add_test( + NAME + PythonVLVReadWriteTest + TEST_DRIVER_ARGS + --compare + ${ITK_TEST_OUTPUT_DIR}/TestVLV.seg.nrrd + DATA{${WrapITK_SOURCE_DIR}/images/TestVLV.seg.nrrd} + COMMAND + ${CMAKE_CURRENT_SOURCE_DIR}/readWriteVLV.py + DATA{${WrapITK_SOURCE_DIR}/images/TestVLV.seg.nrrd} + ${ITK_TEST_OUTPUT_DIR}/TestVLV.seg.nrrd + 59 + 85 + 58 + 5) diff --git a/Wrapping/Generators/SwigInterface/CMakeLists.txt b/Wrapping/Generators/SwigInterface/CMakeLists.txt index 18c8cad0953..4d1e18a5cba 100644 --- a/Wrapping/Generators/SwigInterface/CMakeLists.txt +++ b/Wrapping/Generators/SwigInterface/CMakeLists.txt @@ -16,18 +16,24 @@ mark_as_advanced(ITK_USE_SYSTEM_SWIG) if(WIN32) set(swig_version_min 4.0.2) set(ITK_SWIG_VERSION 4.0.2) - set(swigwin_hash "b8f105f9b9db6acc1f6e3741990915b533cd1bc206eb9645fd6836457fd30789b7229d2e3219d8e35f2390605ade0fbca493ae162ec3b4bc4e428b57155db03d") - set(swigwin_cid "bafybeifxmwvuck7gda6inwgl24cslv4m34uv3dgedvv2b62ctpbwz6sfoy") + set(swigwin_hash + "b8f105f9b9db6acc1f6e3741990915b533cd1bc206eb9645fd6836457fd30789b7229d2e3219d8e35f2390605ade0fbca493ae162ec3b4bc4e428b57155db03d" + ) + set(swigwin_cid "bafybeifxmwvuck7gda6inwgl24cslv4m34uv3dgedvv2b62ctpbwz6sfoy") elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") set(swig_version_min 4.0.2) set(ITK_SWIG_VERSION 4.0.2) - set(swiglinux_hash "811a96b1223ef062e93c82d9848d74ae4b9dd42edeb2b32292aaa0be357ebabc2c2ba71ec5ee3fda83fb892e9b21266a249469aa66c23e2339dbd07bb48ad6c6") - set(swiglinux_cid "bafybeihacajysw4jwrfkffuzvnlv4ees4eqoydl7ftw2o2nmciru6wky6e") + set(swiglinux_hash + "811a96b1223ef062e93c82d9848d74ae4b9dd42edeb2b32292aaa0be357ebabc2c2ba71ec5ee3fda83fb892e9b21266a249469aa66c23e2339dbd07bb48ad6c6" + ) + set(swiglinux_cid "bafybeihacajysw4jwrfkffuzvnlv4ees4eqoydl7ftw2o2nmciru6wky6e") else() set(ITK_SWIG_VERSION 4.0.2) set(swig_version_min 4.0.2) - set(swig_hash "05e7da70ce6d9a733b96c0bcfa3c1b82765bd859f48c74759bbf4bb1467acb1809caa310cba5e2b3280cd704fca249eaa0624821dffae1d2a75097c7f55d14ed") - set(swig_cid "bafybeihguuzirrzzfkwzln42dbq34fare5cnlmpigvyfqitiw3rshwsjie") + set(swig_hash + "05e7da70ce6d9a733b96c0bcfa3c1b82765bd859f48c74759bbf4bb1467acb1809caa310cba5e2b3280cd704fca249eaa0624821dffae1d2a75097c7f55d14ed" + ) + set(swig_cid "bafybeihguuzirrzzfkwzln42dbq34fare5cnlmpigvyfqitiw3rshwsjie") endif() if(WIN32) @@ -36,10 +42,10 @@ elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" AND CMAKE_HOST_SYSTEM_PROCESSOR ST set(swig_ep "${CMAKE_CURRENT_BINARY_DIR}/swiglinux-${ITK_SWIG_VERSION}/bin/swig") else() - # follow the standard EP_PREFIX locations - set(swig_binary_dir ${CMAKE_CURRENT_BINARY_DIR}/swig-prefix/src/swig-build) - set(swig_source_dir ${CMAKE_CURRENT_BINARY_DIR}/swig-prefix/src/swig) - set(swig_install_dir ${CMAKE_CURRENT_BINARY_DIR}/swig) + # follow the standard EP_PREFIX locations + set(swig_binary_dir ${CMAKE_CURRENT_BINARY_DIR}/swig-prefix/src/swig-build) + set(swig_source_dir ${CMAKE_CURRENT_BINARY_DIR}/swig-prefix/src/swig) + set(swig_install_dir ${CMAKE_CURRENT_BINARY_DIR}/swig) set(swig_ep "${swig_install_dir}/bin/swig") endif() @@ -82,7 +88,8 @@ else() if(ITK_BINARY_DIR) itk_download_attempt_check(SWIG) endif() - ExternalProject_Add(swig + ExternalProject_Add( + swig URL "https://data.kitware.com/api/v1/file/hashsum/sha512/${swigwin_hash}/download" "https://dweb.link/ipfs/${swigwin_cid}/swigwin-4.0.2.zip" "https://itk.mypinata.cloud/ipfs/${swigwin_cid}/swigwin-4.0.2.zip" @@ -91,16 +98,15 @@ else() SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/swigwin-${SWIG_VERSION} CONFIGURE_COMMAND "" BUILD_COMMAND "" - INSTALL_COMMAND "" - ${download_extract_timestamp_flag} - ) + INSTALL_COMMAND "" ${download_extract_timestamp_flag}) set(SWIG_DIR ${CMAKE_CURRENT_BINARY_DIR}/swigwin-${SWIG_VERSION}) elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") # If we are building ITK if(ITK_BINARY_DIR) itk_download_attempt_check(SWIG) endif() - ExternalProject_Add(swig + ExternalProject_Add( + swig URL "https://data.kitware.com/api/v1/file/hashsum/sha512/${swiglinux_hash}/download" "https://dweb.link/ipfs/${swiglinux_cid}/swiglinux-4.0.2.tar.gz" "https://itk.mypinata.cloud/ipfs/${swiglinux_cid}/swiglinux-4.0.2.tar.gz" @@ -109,10 +115,10 @@ else() SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/swiglinux-${SWIG_VERSION} CONFIGURE_COMMAND "" BUILD_COMMAND "" - INSTALL_COMMAND "" - ${download_extract_timestamp_flag} - ) - set(SWIG_DIR ${CMAKE_CURRENT_BINARY_DIR}/swiglinux-${SWIG_VERSION}/share/swig/${SWIG_VERSION} CACHE FILEPATH "swig directory.") + INSTALL_COMMAND "" ${download_extract_timestamp_flag}) + set(SWIG_DIR + ${CMAKE_CURRENT_BINARY_DIR}/swiglinux-${SWIG_VERSION}/share/swig/${SWIG_VERSION} + CACHE FILEPATH "swig directory.") else() # From PCRE configure # Some influential environment variables: @@ -137,7 +143,7 @@ else() set(pcre_env) if(NOT CMAKE_CROSSCOMPILING) set(pcre_env - env + env "AR=${CMAKE_AR}" "CC=${CMAKE_C_COMPILER_LAUNCHER} ${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE} -w" @@ -147,61 +153,57 @@ else() "CXX=${CMAKE_CXX_COMPILER_LAUNCHER} ${CMAKE_CXX_COMPILER}" "CXXFLAGS=${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -w" "CPP=$ENV{CPP}" - "CXXPP=$ENV{CXXPP}" - ) + "CXXPP=$ENV{CXXPP}") if(APPLE) # If building on OS X, the compiler must know what version of the OS X SDK to use # without SDKROOT set, configuring PCRE fails. The deployment target is set to # ensure the built library is compatible with the correct OS X version. This may # not be strictly necessary for configure, but the compiler determines which # header files to use based on both of these settings. Adding it for safety. - set(pcre_env ${pcre_env} - "SDKROOT=${CMAKE_OSX_SYSROOT}" - "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}" - ) + set(pcre_env ${pcre_env} "SDKROOT=${CMAKE_OSX_SYSROOT}" + "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}") endif() endif() set(extra_external_project_commands) if(APPLE) # If building on OS X, we have to set the SDKROOT and DEPOLYMENT_TARGET environment variables # so that XCode's compilers know which version of the OS X SDK to use. - list(APPEND extra_external_project_commands + list( + APPEND + extra_external_project_commands BUILD_COMMAND - env - "SDKROOT=${CMAKE_OSX_SYSROOT}" - "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}" - make + env + "SDKROOT=${CMAKE_OSX_SYSROOT}" + "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}" + make INSTALL_COMMAND - env - "SDKROOT=${CMAKE_OSX_SYSROOT}" - "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}" - make - install - ) + env + "SDKROOT=${CMAKE_OSX_SYSROOT}" + "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}" + make + install) endif() - set(pcre_hash "abac4c4f9df9e61d7d7761a9c50843882611752e1df0842a54318f358c28f5953025eba2d78997d21ee690756b56cc9f1c04a5ed591dd60654cc78ba16d9ecfb") + set(pcre_hash + "abac4c4f9df9e61d7d7761a9c50843882611752e1df0842a54318f358c28f5953025eba2d78997d21ee690756b56cc9f1c04a5ed591dd60654cc78ba16d9ecfb" + ) set(pcre_cid "bafybeibat55kr3wwfytqx5qser3jhej67fek4wpeypdy5ybxfa3zjbvx3a") - ExternalProject_Add(PCRE + ExternalProject_Add( + PCRE URL "https://data.kitware.com/api/v1/file/hashsum/sha512/${pcre_hash}/download" "https://dweb.link/ipfs/${pcre_cid}/pcre-8.44.tar.gz" "https://itk.pinata.cloud/ipfs/${pcre_cid}/pcre-8.44.tar.gz" "https://w3s.link/ipfs/${pcre_cid}/pcre-8.44.tar.gz" URL_HASH SHA512=${pcre_hash} - CONFIGURE_COMMAND - ${pcre_env} - ../PCRE/configure - --prefix=${CMAKE_CURRENT_BINARY_DIR}/PCRE - --enable-shared=no - ${extra_external_project_commands} - ${download_extract_timestamp_flag} - ) + CONFIGURE_COMMAND ${pcre_env} ../PCRE/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/PCRE --enable-shared=no + ${extra_external_project_commands} ${download_extract_timestamp_flag}) # swig uses bison find it by cmake and pass it down find_package(BISON) - set(BISON_FLAGS "" CACHE STRING "Flags used by bison") + set(BISON_FLAGS + "" + CACHE STRING "Flags used by bison") mark_as_advanced(BISON_FLAGS) - # From SWIG configure # Some influential environment variables: # CC C compiler command @@ -233,7 +235,7 @@ else() set(swig_env) if(NOT CMAKE_CROSSCOMPILING) set(swig_env -" + " set(ENV{CC} \"${CMAKE_C_COMPILER_LAUNCHER} ${CMAKE_C_COMPILER}\") set(ENV{CFLAGS} \"${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE} -w\") set(ENV{LDFLAGS} \"$ENV{LDFLAGS}\") @@ -244,11 +246,12 @@ set(ENV{CXXFLAGS} \"${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -w\") set(ENV{CPP} \"$ENV{CPP}\") set(ENV{YACC} \"${BISON_EXECUTABLE}\") set(ENV{YFLAGS} \"${BISON_FLAGS}\") -" - ) +") endif() set(_swig_configure_script ${CMAKE_CURRENT_BINARY_DIR}/swig_configure_step.cmake) - file(WRITE ${_swig_configure_script} " + file( + WRITE ${_swig_configure_script} + " ${swig_env} execute_process(COMMAND ../swig/configure \"--prefix=${CMAKE_CURRENT_BINARY_DIR}/swig\" @@ -279,46 +282,56 @@ message(STATUS \"Swig configure successfully completed.\") # ensure the built library is compatible with the correct OS X version. This may # not be strictly necessary for configure, but the compiler determines which # header files to use based on both of these settings. Adding it for safety. - list(APPEND extra_swig_configure_env + list( + APPEND + extra_swig_configure_env env - "SDKROOT=${CMAKE_OSX_SYSROOT}" - "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}" - ) + "SDKROOT=${CMAKE_OSX_SYSROOT}" + "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}") endif() - ExternalProject_Add(swig + ExternalProject_Add( + swig URL "https://data.kitware.com/api/v1/file/hashsum/sha512/${swig_hash}/download" "https://dweb.link/ipfs/${swig_cid}/swig-4.0.2.tar.gz" "https://itk.pinata.cloud/ipfs/${swig_cid}/swig-4.0.2.tar.gz" "https://w3s.link/ipfs/${swig_cid}/swig-4.0.2.tar.gz" URL_HASH SHA512=${swig_hash} - CONFIGURE_COMMAND - ${extra_swig_configure_env} ${CMAKE_COMMAND} -P "${_swig_configure_script}" - ${extra_external_project_commands} - DEPENDS PCRE - ${download_extract_timestamp_flag} - ) + CONFIGURE_COMMAND ${extra_swig_configure_env} ${CMAKE_COMMAND} -P "${_swig_configure_script}" + ${extra_external_project_commands} + DEPENDS PCRE ${download_extract_timestamp_flag}) endif() - set(SWIG_DIR ${CMAKE_CURRENT_BINARY_DIR}/swig/share/swig/${SWIG_VERSION} CACHE FILEPATH "swig directory.") + set(SWIG_DIR + ${CMAKE_CURRENT_BINARY_DIR}/swig/share/swig/${SWIG_VERSION} + CACHE FILEPATH "swig directory.") mark_as_advanced(SWIG_DIR) - set(SWIG_EXECUTABLE ${swig_ep} CACHE FILEPATH "swig executable." FORCE) + set(SWIG_EXECUTABLE + ${swig_ep} + CACHE FILEPATH "swig executable." FORCE) endif() mark_as_advanced(SWIG_EXECUTABLE) endif() - -set(PYGCCXML_DIR ${ITK_CMAKE_DIR}/../Modules/ThirdParty/pygccxml/src CACHE INTERNAL "pygccxml path") - +set(PYGCCXML_DIR + ${ITK_CMAKE_DIR}/../Modules/ThirdParty/pygccxml/src + CACHE INTERNAL "pygccxml path") ############################################################################### # store the current dir, so it can be reused later -set(ITK_WRAP_SWIGINTERFACE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "swig interface source dir") -set(ITK_WRAP_SWIGINTERFACE_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}" CACHE INTERNAL "swig interface binary dir") - -set(WRAPPER_MASTER_INDEX_OUTPUT_DIR "${ITK_DIR}/Wrapping/Typedefs" CACHE INTERNAL "typedefs dir") -set(IGENERATOR "${CMAKE_CURRENT_SOURCE_DIR}/igenerator.py" CACHE INTERNAL "igenerator.py path" FORCE) - +set(ITK_WRAP_SWIGINTERFACE_SOURCE_DIR + "${CMAKE_CURRENT_SOURCE_DIR}" + CACHE INTERNAL "swig interface source dir") +set(ITK_WRAP_SWIGINTERFACE_BINARY_DIR + "${CMAKE_CURRENT_BINARY_DIR}" + CACHE INTERNAL "swig interface binary dir") + +set(WRAPPER_MASTER_INDEX_OUTPUT_DIR + "${ITK_DIR}/Wrapping/Typedefs" + CACHE INTERNAL "typedefs dir") +set(IGENERATOR + "${CMAKE_CURRENT_SOURCE_DIR}/igenerator.py" + CACHE INTERNAL "igenerator.py path" FORCE) macro(itk_wrap_simple_type_swig_interface wrap_class swig_name) string(APPEND SWIG_INTERFACE_TYPEDEFS "using ${swig_name} = ${wrap_class};\n") diff --git a/Wrapping/TypedefMacros.cmake b/Wrapping/TypedefMacros.cmake index 27dd3b7be4d..5b5931f0d3d 100644 --- a/Wrapping/TypedefMacros.cmake +++ b/Wrapping/TypedefMacros.cmake @@ -17,41 +17,64 @@ set(DO_DEBUG_MACROS OFF) function(dump_cmake_variables output_var_name this_module_name) if(DO_DEBUG_MACROS) - if(this_module_name STREQUAL "itkEuler3DTransform") - get_cmake_property(_variableNames VARIABLES) - list (FILTER _variableNames EXCLUDE REGEX "itk_auto_load_submodules.*") - list (FILTER _variableNames EXCLUDE REGEX "^ARG.*") - list (FILTER _variableNames EXCLUDE REGEX "^CMAKE_MATCH.*") - list (SORT _variableNames) - foreach (_variableName ${_variableNames}) - list(APPEND output_equalities "^^${_variableName}=${${_variableName}}\n-----------------------------------------\n") - endforeach() - set(${output_var_name} ${output_equalities} PARENT_SCOPE) - #message(STATUS "AAA\n:${output_var_name}===:${_variableNames}:\n\n") - unset(output_var_name) - endif() + if(this_module_name STREQUAL "itkEuler3DTransform") + get_cmake_property(_variableNames VARIABLES) + list( + FILTER + _variableNames + EXCLUDE + REGEX + "itk_auto_load_submodules.*") + list( + FILTER + _variableNames + EXCLUDE + REGEX + "^ARG.*") + list( + FILTER + _variableNames + EXCLUDE + REGEX + "^CMAKE_MATCH.*") + list(SORT _variableNames) + foreach(_variableName ${_variableNames}) + list(APPEND output_equalities + "^^${_variableName}=${${_variableName}}\n-----------------------------------------\n") + endforeach() + set(${output_var_name} + ${output_equalities} + PARENT_SCOPE) + #message(STATUS "AAA\n:${output_var_name}===:${_variableNames}:\n\n") + unset(output_var_name) + endif() endif() endfunction() -function(write_changed_cmake_variables_to_file output_filename pre_list post_list this_module_name) +function( + write_changed_cmake_variables_to_file + output_filename + pre_list + post_list + this_module_name) if(DO_DEBUG_MACROS) - if(this_module_name STREQUAL "itkEuler3DTransform") - #message(STATUS "\n\n\nXXX PRE : ${pre_list}") - #message(STATUS "\nYYYPOST : ${itk_auto_load_submodules_${WRAPPER_LIBRARY_NAME}_post}") - set(changed_post_list ${post_list}) - #message(STATUS "YYY\n:${changed_post_list}:\n\n") - #message(STATUS "\nYYYPOST : ${itk_auto_load_submodules_${WRAPPER_LIBRARY_NAME}_post}") - foreach (pre_list_item ${pre_list}) - list(REMOVE_ITEM changed_post_list "${pre_list_item}") - endforeach() - set(write_string "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n") - message(STATUS "ZZZ\n:${changed_post_list}:${this_module_name}\n\n") - foreach(changed_post_list_item ${changed_post_list}) - set(write_string "${write_string}${changed_post_list_item}") - endforeach() - file(WRITE ${output_filename} ${write_string}) - unset(write_string) - endif() + if(this_module_name STREQUAL "itkEuler3DTransform") + #message(STATUS "\n\n\nXXX PRE : ${pre_list}") + #message(STATUS "\nYYYPOST : ${itk_auto_load_submodules_${WRAPPER_LIBRARY_NAME}_post}") + set(changed_post_list ${post_list}) + #message(STATUS "YYY\n:${changed_post_list}:\n\n") + #message(STATUS "\nYYYPOST : ${itk_auto_load_submodules_${WRAPPER_LIBRARY_NAME}_post}") + foreach(pre_list_item ${pre_list}) + list(REMOVE_ITEM changed_post_list "${pre_list_item}") + endforeach() + set(write_string "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n") + message(STATUS "ZZZ\n:${changed_post_list}:${this_module_name}\n\n") + foreach(changed_post_list_item ${changed_post_list}) + set(write_string "${write_string}${changed_post_list_item}") + endforeach() + file(WRITE ${output_filename} ${write_string}) + unset(write_string) + endif() endif() endfunction() @@ -64,11 +87,12 @@ macro(itk_wrap_submodule_python submodule module) string(PREPEND ITK_WRAP_PYTHON_LIBRARY_IMPORTS "from itk.${submodule}Python import *\n") endmacro() - # Support for additional include directories of each module # WARNING: Each module must set this variable BEFORE calling itk_wrap_module # TODO: is this the place place for this? -set(WRAPPER_LIBRARY_INCLUDE_DIRECTORIES "" CACHE INTERNAL "additional include directories for each module") +set(WRAPPER_LIBRARY_INCLUDE_DIRECTORIES + "" + CACHE INTERNAL "additional include directories for each module") ############################################################################### # Define fundamental wrapping macro which sets up the global variables used @@ -115,7 +139,7 @@ macro(itk_wrap_module library_name) # WRAPPER_LIBRARY_DEPENDS. List of names of other wrapper libraries that # define symbols used by this wrapper library. - INTERSECTION(WRAPPER_LIBRARY_DEPENDS "${ITK_MODULE_${library_name}_DEPENDS}" "${WRAP_ITK_MODULES}") + intersection(WRAPPER_LIBRARY_DEPENDS "${ITK_MODULE_${library_name}_DEPENDS}" "${WRAP_ITK_MODULES}") # WRAPPER_LIBRARY_LINK_LIBRARIES. List of other libraries that should # be linked to the wrapper library. @@ -151,9 +175,9 @@ macro(itk_wrap_module library_name) unset(SWIG_INTERFACE_MODULES) if(${module_prefix}_WRAP_DOC) - unset(ITK_WRAP_DOC_DOXYGEN_HEADERS) # doxygen headers to process in this lib - unset(ITK_WRAP_DOC_DOXYGEN_XML_FILES) # xml files produced by doxygen in this lib - unset(ITK_WRAP_DOC_DOCSTRING_FILES) # swig docstring files produced by doxygen in this lib + unset(ITK_WRAP_DOC_DOXYGEN_HEADERS) # doxygen headers to process in this lib + unset(ITK_WRAP_DOC_DOXYGEN_XML_FILES) # xml files produced by doxygen in this lib + unset(ITK_WRAP_DOC_DOCSTRING_FILES) # swig docstring files produced by doxygen in this lib endif() unset(ITK_WRAP_PYTHON_CONFIGURATION_TEMPLATES) @@ -197,9 +221,24 @@ macro(itk_wrap_class class) # drop the namespace prefix if("${class}" MATCHES "::") # there's at least one namespace in the name - string(REGEX REPLACE ".*::" "" base_name "${class}") - string(REGEX REPLACE "^([^:]*::)?.+" "\\1" top_namespace "${class}") - string(REGEX REPLACE "::" "" top_namespace "${top_namespace}") # drop the :: from the namespace + string( + REGEX + REPLACE ".*::" + "" + base_name + "${class}") + string( + REGEX + REPLACE "^([^:]*::)?.+" + "\\1" + top_namespace + "${class}") + string( + REGEX + REPLACE "::" + "" + top_namespace + "${top_namespace}") # drop the :: from the namespace set(swig_name "${top_namespace}${base_name}") else() # no namespaces @@ -255,9 +294,21 @@ macro(itk_wrap_named_class class swig_name) if("${ARGC}" EQUAL 3) set(WRAPPER_WRAP_METHOD "${ARGV2}") - set(VALID_WRAP_METHODS POINTER POINTER_WITH_CONST_POINTER POINTER_WITH_SUPERCLASS POINTER_WITH_2_SUPERCLASSES EXPLICIT_SPECIALIZATION POINTER_WITH_EXPLICIT_SPECIALIZATION ENUM AUTOPOINTER) - if(NOT "${WRAPPER_WRAP_METHOD}" IN_LIST VALID_WRAP_METHODS) - message(SEND_ERROR "itk_wrap_class: Invalid option '${WRAPPER_WRAP_METHOD}'. Possible values are ${VALID_WRAP_METHODS}") + set(VALID_WRAP_METHODS + POINTER + POINTER_WITH_CONST_POINTER + POINTER_WITH_SUPERCLASS + POINTER_WITH_2_SUPERCLASSES + EXPLICIT_SPECIALIZATION + POINTER_WITH_EXPLICIT_SPECIALIZATION + ENUM + AUTOPOINTER) + if(NOT + "${WRAPPER_WRAP_METHOD}" + IN_LIST + VALID_WRAP_METHODS) + message( + SEND_ERROR "itk_wrap_class: Invalid option '${WRAPPER_WRAP_METHOD}'. Possible values are ${VALID_WRAP_METHODS}") endif() unset(VALID_WRAP_METHODS) endif() @@ -293,17 +344,37 @@ macro(itk_wrap_named_class class swig_name) # store the header list(APPEND ITK_WRAP_DOC_DOXYGEN_HEADERS "${doc_path}") # and the produced file - string(REPLACE "::" "_" base_name "${class}") + string( + REPLACE "::" + "_" + base_name + "${class}") # some simple computations to find the xml file produced for this class - string(REGEX REPLACE "([A-Z])" "\\1" xmlname ${class}) - string(REGEX REPLACE ":" "_1" xmlname ${xmlname}) + string( + REGEX + REPLACE "([A-Z])" + "\\1" + xmlname + ${class}) + string( + REGEX + REPLACE ":" + "_1" + xmlname + ${xmlname}) # Converts camel case names to snake case. - string(REGEX REPLACE "([A-Z])" "_\\1" xmlname ${xmlname}) - string(TOLOWER ${xmlname} xmlname) + string( + REGEX + REPLACE "([A-Z])" + "_\\1" + xmlname + ${xmlname}) + string(TOLOWER ${xmlname} xmlname) list(APPEND ITK_WRAP_DOC_DOXYGEN_XML_FILES "${CMAKE_CURRENT_BINARY_DIR}/Doc/xml/class${xmlname}.xml") # the doxy2swig input - set(ITK_WRAP_DOC_DOXY2SWIG_INPUT "${ITK_WRAP_DOC_DOXY2SWIG_INPUT}\n${CMAKE_CURRENT_BINARY_DIR}/Doc/xml/class${xmlname}.xml\t${class}") + set(ITK_WRAP_DOC_DOXY2SWIG_INPUT + "${ITK_WRAP_DOC_DOXY2SWIG_INPUT}\n${CMAKE_CURRENT_BINARY_DIR}/Doc/xml/class${xmlname}.xml\t${class}") set(ITK_WRAP_DOC_GENERATE_DOXY2SWIG_INPUT ON) unset(xmlname) unset(doc_path) @@ -330,7 +401,6 @@ macro(itk_wrap_simple_class class) itk_end_wrap_class() endmacro() - macro(itk_wrap_named_simple_class class swig_name) # Similar to itk_wrap_named_class in that it generates typedefs for Swig input. # However, since no templates need to be declared, there's no need for @@ -347,19 +417,21 @@ macro(itk_wrap_named_simple_class class swig_name) itk_wrap_one_type("${WRAPPER_WRAP_METHOD}" "${WRAPPER_CLASS}" "${WRAPPER_SWIG_NAME}") endmacro() - macro(itk_wrap_include include_file) # Add a header file to the WRAPPER_INCLUDE_FILES list of files # WRAPPER_INCLUDE_FILES is used for both SWIG and CASTXML # Global vars modified: WRAPPER_INCLUDE_FILES - list(FIND WRAPPER_INCLUDE_FILES "${include_file}" _index) - if (${_index} EQUAL -1) + list( + FIND + WRAPPER_INCLUDE_FILES + "${include_file}" + _index) + if(${_index} EQUAL -1) # include order IS important. Default values must be before the other ones list(APPEND WRAPPER_INCLUDE_FILES ${include_file}) endif() endmacro() - macro(itk_end_wrap_class) # Parse through the list of WRAPPER_TEMPLATES set up by the macros at the bottom # of this file, turning them into proper C++ type definitions suitable for @@ -369,12 +441,29 @@ macro(itk_end_wrap_class) # Global vars modified: WRAPPER_TYPEDEFS # the regexp used to get the values separated by a # - if(NOT "${WRAPPER_TEMPLATES}" STREQUAL "") + if(NOT + "${WRAPPER_TEMPLATES}" + STREQUAL + "") set(sharp_regexp "([0-9A-Za-z_]*)[ ]*#[ ]*(.*)") foreach(wrap ${WRAPPER_TEMPLATES}) - string(REGEX REPLACE "${sharp_regexp}" "\\1" mangled_suffix "${wrap}") - string(REGEX REPLACE "${sharp_regexp}" "\\2" template_parameters "${wrap}") - itk_wrap_one_type("${WRAPPER_WRAP_METHOD}" "${WRAPPER_CLASS}" "${WRAPPER_SWIG_NAME}${mangled_suffix}" "${template_parameters}") + string( + REGEX + REPLACE "${sharp_regexp}" + "\\1" + mangled_suffix + "${wrap}") + string( + REGEX + REPLACE "${sharp_regexp}" + "\\2" + template_parameters + "${wrap}") + itk_wrap_one_type( + "${WRAPPER_WRAP_METHOD}" + "${WRAPPER_CLASS}" + "${WRAPPER_SWIG_NAME}${mangled_suffix}" + "${template_parameters}") endforeach() unset(template_parameters) unset(mangled_suffix) @@ -387,7 +476,6 @@ macro(itk_end_wrap_class) endif() endmacro() - macro(itk_wrap_simple_type wrap_class swig_name) # Add a typedef, without support for any option # CASTXML_TYPEDEFS Is input and output modified by this function @@ -398,30 +486,69 @@ macro(itk_wrap_simple_type wrap_class swig_name) # split the class name and the template parameters if("${wrap_class}" MATCHES "<.*>") - string(REGEX REPLACE "^([^<]+)< *(.+) *>([^>]*)$" "\\1" cpp_name "${wrap_class}") - string(REGEX REPLACE "^([^<]+)< *(.+) *>([^>]*)$" "\\2" template_params "${wrap_class}") - string(REGEX REPLACE "^([^<]+)< *(.+) *>([^>]*)$" "\\3" ext_def "${wrap_class}") + string( + REGEX + REPLACE "^([^<]+)< *(.+) *>([^>]*)$" + "\\1" + cpp_name + "${wrap_class}") + string( + REGEX + REPLACE "^([^<]+)< *(.+) *>([^>]*)$" + "\\2" + template_params + "${wrap_class}") + string( + REGEX + REPLACE "^([^<]+)< *(.+) *>([^>]*)$" + "\\3" + ext_def + "${wrap_class}") else() set(cpp_name "${wrap_class}") set(template_params NO_TEMPLATE) set(ext_def "") endif() - string(REGEX REPLACE ".*::" "" simple_name "${cpp_name}") + string( + REGEX + REPLACE ".*::" + "" + simple_name + "${cpp_name}") # must be done first so the typemap are used in the %template commands if("${swig_name}" MATCHES "_Pointer$") - string(REGEX REPLACE "_Pointer$" "" smart_pointed "${swig_name}") - string(REGEX REPLACE "(.)([A-Z][a-z]+)" "\\1_\\2" snake_name "${simple_name}") - string(REGEX REPLACE "([a-z0-9])([A-Z])" "\\1_\\2" snake_name "${snake_name}") - string(REGEX REPLACE "__" "_" snake_name "${snake_name}") + string( + REGEX + REPLACE "_Pointer$" + "" + smart_pointed + "${swig_name}") + string( + REGEX + REPLACE "(.)([A-Z][a-z]+)" + "\\1_\\2" + snake_name + "${simple_name}") + string( + REGEX + REPLACE "([a-z0-9])([A-Z])" + "\\1_\\2" + snake_name + "${snake_name}") + string( + REGEX + REPLACE "__" + "_" + snake_name + "${snake_name}") string(TOLOWER "${snake_name}" snake_name) - ADD_PYTHON_POINTER_TYPEMAP("${smart_pointed}" ${simple_name} ${snake_name}) + add_python_pointer_typemap("${smart_pointed}" ${simple_name} ${snake_name}) unset(snake_name) unset(smart_pointed) unset(simple_name) endif() - # and now, generate the typemaps and other customizations if("${cpp_name}" STREQUAL "itk::Matrix") string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYTHON_ITK_MATRIX(${swig_name})\n") @@ -433,12 +560,17 @@ macro(itk_wrap_simple_type wrap_class swig_name) if("${swig_name}" STREQUAL "itkLightObject") string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "%template(listitkLightObject) std::list< itkLightObject_Pointer >;\n\n") - ADD_PYTHON_CONFIG_TEMPLATE("list" "std::list" "listitkLightObject" "itk::LightObject") + add_python_config_template( + "list" + "std::list" + "listitkLightObject" + "itk::LightObject") endif() if("${cpp_name}" STREQUAL "itk::VariableLengthVector") if(NOT ("${template_params}" MATCHES "std::complex")) # TODO cover complex types - string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYTHON_VARIABLELENGTHVECTOR_CLASS(${swig_name}, ${template_params})\n") + string(APPEND ITK_WRAP_PYTHON_SWIG_EXT + "DECL_PYTHON_VARIABLELENGTHVECTOR_CLASS(${swig_name}, ${template_params})\n") endif() endif() @@ -452,17 +584,30 @@ macro(itk_wrap_simple_type wrap_class swig_name) if("${swig_name}" STREQUAL "itkDataObject") string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "%template(vectoritkDataObject) std::vector< itkDataObject_Pointer >;\n") - ADD_PYTHON_CONFIG_TEMPLATE("vector" "std::vector" "vectoritkDataObject" "itk::DataObject") + add_python_config_template( + "vector" + "std::vector" + "vectoritkDataObject" + "itk::DataObject") endif() if("${swig_name}" STREQUAL "itkObjectFactoryBase") string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "%template(listitkObjectFactoryBase) std::list< itkObjectFactoryBase * >;\n") - ADD_PYTHON_CONFIG_TEMPLATE("list" "std::list" "listitkObjectFactoryBase" "itk::ObjectFactoryBase") + add_python_config_template( + "list" + "std::list" + "listitkObjectFactoryBase" + "itk::ObjectFactoryBase") endif() if("${swig_name}" STREQUAL "itkMetaDataDictionary") - string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "%template(vectoritkMetaDataDictionary) std::vector< itkMetaDataDictionary * >;\n") - ADD_PYTHON_CONFIG_TEMPLATE("vector" "std::vector" "vectoritkMetaDataDictionary" "itk::MetaDataDictionary") + string(APPEND ITK_WRAP_PYTHON_SWIG_EXT + "%template(vectoritkMetaDataDictionary) std::vector< itkMetaDataDictionary * >;\n") + add_python_config_template( + "vector" + "std::vector" + "vectoritkMetaDataDictionary" + "itk::MetaDataDictionary") endif() if("${swig_name}" STREQUAL "itkCommand") @@ -470,12 +615,16 @@ macro(itk_wrap_simple_type wrap_class swig_name) string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "%feature(\"director\") itkCommand;\n") endif() - if("${cpp_name}" STREQUAL "itk::ImageBase" AND NOT "${swig_name}" MATCHES "Pointer$") + if("${cpp_name}" STREQUAL "itk::ImageBase" + AND NOT + "${swig_name}" + MATCHES + "Pointer$") # add the templated method non seen by gccxml, in a more python-friendly way # than the c++ version - ADD_PYTHON_OUTPUT_RETURN_BY_VALUE_CLASS("${swig_name}" "GetBufferedRegion") - ADD_PYTHON_OUTPUT_RETURN_BY_VALUE_CLASS("${swig_name}" "GetLargestPossibleRegion") - ADD_PYTHON_OUTPUT_RETURN_BY_VALUE_CLASS("${swig_name}" "GetRequestedRegion") + add_python_output_return_by_value_class("${swig_name}" "GetBufferedRegion") + add_python_output_return_by_value_class("${swig_name}" "GetLargestPossibleRegion") + add_python_output_return_by_value_class("${swig_name}" "GetRequestedRegion") string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYTHON_IMAGEBASE_CLASS(${swig_name}, ${template_params})\n") string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "%inline %{\n") string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "#include \"itkContinuousIndexSwigInterface.h\"\n") @@ -498,42 +647,85 @@ macro(itk_wrap_simple_type wrap_class swig_name) string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYTHON_TRANSFORMBASETEMPLATE_CLASS(${swig_name})\n\n") endif() - if("${cpp_name}" STREQUAL "itk::PyImageFilter" AND NOT "${swig_name}" MATCHES "Pointer$") + if("${cpp_name}" STREQUAL "itk::PyImageFilter" + AND NOT + "${swig_name}" + MATCHES + "Pointer$") string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYIMAGEFILTER_CLASS(${swig_name})\n\n") endif() - if("${cpp_name}" STREQUAL "itk::StatisticsLabelObject" AND NOT "${swig_name}" MATCHES "Pointer$") - string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "%template(map${swig_name}) std::map< unsigned long, ${swig_name}_Pointer, std::less< unsigned long > >;\n") - ADD_PYTHON_CONFIG_TEMPLATE("map" "std::map" "map${swig_name}" "unsigned long, ${cpp_name}< ${template_params} >") + if("${cpp_name}" STREQUAL "itk::StatisticsLabelObject" + AND NOT + "${swig_name}" + MATCHES + "Pointer$") + string(APPEND ITK_WRAP_PYTHON_SWIG_EXT + "%template(map${swig_name}) std::map< unsigned long, ${swig_name}_Pointer, std::less< unsigned long > >;\n") + add_python_config_template( + "map" + "std::map" + "map${swig_name}" + "unsigned long, ${cpp_name}< ${template_params} >") string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "%template(vector${swig_name}) std::vector< ${swig_name}_Pointer >;\n") - ADD_PYTHON_CONFIG_TEMPLATE("vector" "std::vector" "vector${swig_name}" "${cpp_name}< ${template_params} >") - endif() - - if("${cpp_name}" STREQUAL "itk::LabelMap" AND NOT "${swig_name}" MATCHES "Pointer$") + add_python_config_template( + "vector" + "std::vector" + "vector${swig_name}" + "${cpp_name}< ${template_params} >") + endif() + + if("${cpp_name}" STREQUAL "itk::LabelMap" + AND NOT + "${swig_name}" + MATCHES + "Pointer$") string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYTHON_LABELMAP_CLASS(${swig_name})\n") endif() if("${cpp_name}" STREQUAL "itk::ComponentTreeNode") string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "%template(list${swig_name}) std::list< ${swig_name}* >;\n") - ADD_PYTHON_CONFIG_TEMPLATE("list" "std::list" "list${swig_name}" "${cpp_name}< ${template_params} > *") + add_python_config_template( + "list" + "std::list" + "list${swig_name}" + "${cpp_name}< ${template_params} > *") endif() if("${cpp_name}" STREQUAL "itk::ImageRegion") - ADD_PYTHON_OUTPUT_RETURN_BY_VALUE_CLASS("${swig_name}" "GetIndex") - ADD_PYTHON_OUTPUT_RETURN_BY_VALUE_CLASS("${swig_name}" "GetModifiableIndex") - ADD_PYTHON_OUTPUT_RETURN_BY_VALUE_CLASS("${swig_name}" "GetSize") - ADD_PYTHON_OUTPUT_RETURN_BY_VALUE_CLASS("${swig_name}" "GetModifiableSize") - string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYTHON_IMAGEREGION_CLASS(${swig_name})%template(vector${swig_name}) std::vector< ${swig_name} >;\n") - ADD_PYTHON_CONFIG_TEMPLATE("vector" "std::vector" "vector${swig_name}" "${cpp_name}< ${template_params} >") - endif() - - if("${cpp_name}" STREQUAL "itk::Image" AND NOT "${swig_name}" MATCHES "Pointer$") - string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYTHON_STD_VEC_RAW_TO_SMARTPTR_TYPEMAP(${swig_name}, ${swig_name}_Pointer)\n") + add_python_output_return_by_value_class("${swig_name}" "GetIndex") + add_python_output_return_by_value_class("${swig_name}" "GetModifiableIndex") + add_python_output_return_by_value_class("${swig_name}" "GetSize") + add_python_output_return_by_value_class("${swig_name}" "GetModifiableSize") + string(APPEND ITK_WRAP_PYTHON_SWIG_EXT + "DECL_PYTHON_IMAGEREGION_CLASS(${swig_name})%template(vector${swig_name}) std::vector< ${swig_name} >;\n") + add_python_config_template( + "vector" + "std::vector" + "vector${swig_name}" + "${cpp_name}< ${template_params} >") + endif() + + if("${cpp_name}" STREQUAL "itk::Image" + AND NOT + "${swig_name}" + MATCHES + "Pointer$") + string(APPEND ITK_WRAP_PYTHON_SWIG_EXT + "DECL_PYTHON_STD_VEC_RAW_TO_SMARTPTR_TYPEMAP(${swig_name}, ${swig_name}_Pointer)\n") string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "%template(vector${swig_name}) std::vector< ${swig_name}_Pointer >;\n") - ADD_PYTHON_CONFIG_TEMPLATE("vector" "std::vector" "vector${swig_name}" "${cpp_name}< ${template_params} > ") + add_python_config_template( + "vector" + "std::vector" + "vector${swig_name}" + "${cpp_name}< ${template_params} > ") endif() - if("${cpp_name}" STREQUAL "itk::PCAShapeSignedDistanceFunction" AND NOT "${swig_name}" MATCHES "Pointer$") + if("${cpp_name}" STREQUAL "itk::PCAShapeSignedDistanceFunction" + AND NOT + "${swig_name}" + MATCHES + "Pointer$") set(import_text "%include ${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/itkImage_ext.i\n") string(FIND ${ITK_WRAP_PYTHON_SWIG_EXT} ${import_text} pos) @@ -543,84 +735,117 @@ macro(itk_wrap_simple_type wrap_class swig_name) unset(import_text) endif() - if("${cpp_name}" STREQUAL "itk::Index") - ADD_PYTHON_SEQ_TYPEMAP("${swig_name}" "${template_params}") + add_python_seq_typemap("${swig_name}" "${template_params}") endif() if("${cpp_name}" STREQUAL "itk::Size") - ADD_PYTHON_SEQ_TYPEMAP("${swig_name}" "${template_params}") + add_python_seq_typemap("${swig_name}" "${template_params}") endif() if("${cpp_name}" STREQUAL "itk::RGBPixel") # number of elements is not in the template parameters so use the # macro which get it with Size() instead - ADD_PYTHON_VARIABLE_LENGTH_SEQ_TYPEMAP("${swig_name}" "${template_params}") + add_python_variable_length_seq_typemap("${swig_name}" "${template_params}") endif() if("${cpp_name}" STREQUAL "itk::RGBAPixel") # number of elements is not in the template parameters so use the # macro which get it with Size() instead - ADD_PYTHON_VARIABLE_LENGTH_SEQ_TYPEMAP("${swig_name}" "${template_params}") + add_python_variable_length_seq_typemap("${swig_name}" "${template_params}") endif() if("${cpp_name}" STREQUAL "itk::Offset") - ADD_PYTHON_SEQ_TYPEMAP("${swig_name}" "${template_params}") + add_python_seq_typemap("${swig_name}" "${template_params}") endif() if("${cpp_name}" STREQUAL "itk::FixedArray") - ADD_PYTHON_VEC_TYPEMAP("${swig_name}" "${template_params}") + add_python_vec_typemap("${swig_name}" "${template_params}") endif() if("${cpp_name}" STREQUAL "itk::Vector") - ADD_PYTHON_VEC_TYPEMAP("${swig_name}" "${template_params}") + add_python_vec_typemap("${swig_name}" "${template_params}") endif() if("${cpp_name}" STREQUAL "itk::CovariantVector") - ADD_PYTHON_VEC_TYPEMAP("${swig_name}" "${template_params}") + add_python_vec_typemap("${swig_name}" "${template_params}") endif() if("${cpp_name}" STREQUAL "itk::Point") - ADD_PYTHON_VEC_TYPEMAP("${swig_name}" "${template_params}") + add_python_vec_typemap("${swig_name}" "${template_params}") string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "%template(vector${swig_name}) std::vector< ${swig_name} >;\n") - ADD_PYTHON_CONFIG_TEMPLATE("vector" "std::vector" "vector${swig_name}" "${cpp_name}< ${template_params} >") + add_python_config_template( + "vector" + "std::vector" + "vector${swig_name}" + "${cpp_name}< ${template_params} >") endif() if("${cpp_name}" STREQUAL "itk::ContinuousIndex") - ADD_PYTHON_VEC_TYPEMAP("${swig_name}" "${template_params}") + add_python_vec_typemap("${swig_name}" "${template_params}") endif() if("${cpp_name}" STREQUAL "itk::Array") - ADD_PYTHON_VARIABLE_LENGTH_SEQ_TYPEMAP("${swig_name}" "${template_params}") + add_python_variable_length_seq_typemap("${swig_name}" "${template_params}") endif() - if("${cpp_name}" STREQUAL "itk::TransformBaseTemplate" AND NOT "${ext_def}" MATCHES "Pointer") + if("${cpp_name}" STREQUAL "itk::TransformBaseTemplate" + AND NOT + "${ext_def}" + MATCHES + "Pointer") string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "%template(list${swig_name}_Pointer) std::list< ${swig_name}_Pointer >;\n") - ADD_PYTHON_CONFIG_TEMPLATE("list" "std::list" "list${swig_name}_Pointer" "${cpp_name}< ${template_params} >") + add_python_config_template( + "list" + "std::list" + "list${swig_name}_Pointer" + "${cpp_name}< ${template_params} >") endif() if("${cpp_name}" STREQUAL "itk::SpatialObjectPoint") - string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYTHON_SPATIALOBJECTPPOINT_CLASS(${swig_name})%template(vector${swig_name}) std::vector< ${swig_name} >;\n") - ADD_PYTHON_CONFIG_TEMPLATE("vector" "std::vector" "vector${swig_name}" "${cpp_name}< ${template_params} >") - endif() - - foreach(sopClassName IN ITEMS "itk::ContourSpatialObjectPoint" + string( + APPEND ITK_WRAP_PYTHON_SWIG_EXT + "DECL_PYTHON_SPATIALOBJECTPPOINT_CLASS(${swig_name})%template(vector${swig_name}) std::vector< ${swig_name} >;\n") + add_python_config_template( + "vector" + "std::vector" + "vector${swig_name}" + "${cpp_name}< ${template_params} >") + endif() + + foreach( + sopClassName IN + ITEMS "itk::ContourSpatialObjectPoint" "itk::DTITubeSpatialObjectPoint" "itk::LineSpatialObjectPoint" "itk::SurfaceSpatialObjectPoint" "itk::TubeSpatialObjectPoint") if("${cpp_name}" STREQUAL "${sopClassName}") string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "%template(vector${swig_name}) std::vector< ${swig_name} >;\n") - ADD_PYTHON_CONFIG_TEMPLATE("vector" "std::vector" "vector${swig_name}" "${cpp_name}< ${template_params} >") + add_python_config_template( + "vector" + "std::vector" + "vector${swig_name}" + "${cpp_name}< ${template_params} >") endif() endforeach() - if("${cpp_name}" STREQUAL "itk::SpatialObject" AND NOT "${ext_def}" MATCHES "Pointer") + if("${cpp_name}" STREQUAL "itk::SpatialObject" + AND NOT + "${ext_def}" + MATCHES + "Pointer") string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "%template(list${swig_name}_Pointer) std::list< ${swig_name}_Pointer >;\n") - ADD_PYTHON_CONFIG_TEMPLATE("list" "std::list" "list${swig_name}_Pointer" "${cpp_name}< ${template_params} >") + add_python_config_template( + "list" + "std::list" + "list${swig_name}_Pointer" + "${cpp_name}< ${template_params} >") endif() - foreach(soClassName IN ITEMS "itk::ArrowSpatialObjectPoint" + foreach( + soClassName IN + ITEMS "itk::ArrowSpatialObjectPoint" "itk::BlogSpatialObject" "itk::BoxSpatialObject" "itk::ContourSpatialObject" @@ -635,9 +860,17 @@ macro(itk_wrap_simple_type wrap_class swig_name) "itk::PolygonSpatialObject" "itk::SurfaceSpatialObject" "itk::TubeSpatialObject") - if("${cpp_name}" STREQUAL "${soClassName}" AND NOT "${ext_def}" MATCHES "Pointer") + if("${cpp_name}" STREQUAL "${soClassName}" + AND NOT + "${ext_def}" + MATCHES + "Pointer") string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "%template(list${swig_name}_Pointer) std::list< ${swig_name}_Pointer >;\n") - ADD_PYTHON_CONFIG_TEMPLATE("list" "std::list" "list${swig_name}_Pointer" "${cpp_name}< ${template_params} >") + add_python_config_template( + "list" + "std::list" + "list${swig_name}_Pointer" + "${cpp_name}< ${template_params} >") endif() endforeach() unset(ext_def) @@ -645,8 +878,11 @@ macro(itk_wrap_simple_type wrap_class swig_name) unset(cpp_name) endmacro() - -macro(itk_wrap_one_type wrap_method wrap_class swig_name) +macro( + itk_wrap_one_type + wrap_method + wrap_class + swig_name) # Add one typedef to WRAPPER_TYPEDEFS # 'wrap_method' is the one of the valid WRAPPER_WRAP_METHODS from itk_wrap_class, # 'wrap_class' is the fully-qualified C++ name of the class @@ -659,7 +895,12 @@ macro(itk_wrap_one_type wrap_method wrap_class swig_name) # Global vars modified: WRAPPER_TYPEDEFS # get the base C++ class name (no namespaces) from wrap_class: - string(REGEX REPLACE "(.*::)" "" base_name "${wrap_class}") + string( + REGEX + REPLACE "(.*::)" + "" + base_name + "${wrap_class}") set(template_parameters "${ARGV3}") if(template_parameters) @@ -673,8 +914,10 @@ macro(itk_wrap_one_type wrap_method wrap_class swig_name) # for gccxml typedefs if("${wrap_method}" MATCHES "2_SUPERCLASSES") - itk_wrap_simple_type_swig_interface("${full_class_name}::Superclass::Superclass" "${swig_name}_Superclass_Superclass") - itk_wrap_simple_type_swig_interface("${full_class_name}::Superclass::Superclass::Pointer" "${swig_name}_Superclass_Superclass_Pointer") + itk_wrap_simple_type_swig_interface("${full_class_name}::Superclass::Superclass" + "${swig_name}_Superclass_Superclass") + itk_wrap_simple_type_swig_interface("${full_class_name}::Superclass::Superclass::Pointer" + "${swig_name}_Superclass_Superclass_Pointer") endif() if("${wrap_method}" MATCHES "SUPERCLASS") @@ -705,8 +948,19 @@ macro(itk_wrap_one_type wrap_method wrap_class swig_name) endif() endif() - if(NOT "${wrap_class}" STREQUAL "MetaEvent" AND NOT "${wrap_method}" MATCHES "ENUM") - ADD_PYTHON_CONFIG_TEMPLATE("${base_name}" "${wrap_class}" "${swig_name}" "${template_parameters}") + if(NOT + "${wrap_class}" + STREQUAL + "MetaEvent" + AND NOT + "${wrap_method}" + MATCHES + "ENUM") + add_python_config_template( + "${base_name}" + "${wrap_class}" + "${swig_name}" + "${template_parameters}") endif() unset(template_parameters) @@ -718,7 +972,8 @@ macro(itk_wrap_one_type wrap_method wrap_class swig_name) if("${wrap_method}" MATCHES "2_SUPERCLASSES") itk_wrap_simple_type("${full_class_name}::Superclass::Superclass" "${swig_name}_Superclass_Superclass") - itk_wrap_simple_type("${full_class_name}::Superclass::Superclass::Pointer" "${swig_name}_Superclass_Superclass_Pointer") + itk_wrap_simple_type("${full_class_name}::Superclass::Superclass::Pointer" + "${swig_name}_Superclass_Superclass_Pointer") endif() if("${wrap_method}" MATCHES "SUPERCLASS") @@ -746,8 +1001,6 @@ macro(itk_wrap_one_type wrap_method wrap_class swig_name) unset(base_name) endmacro() - - ################################################################################ # Macros which cause one or more template instantiations to be added to the # WRAPPER_TEMPLATES list. This list is initialized by the macro itk_wrap_class above, @@ -770,9 +1023,13 @@ macro(itk_wrap_template name types) # Global vars used: WRAPPER_TEMPLATES # Global vars modified: WRAPPER_TEMPLATES -# list(APPEND WRAPPER_TEMPLATES "${name} # ${types}") + # list(APPEND WRAPPER_TEMPLATES "${name} # ${types}") set(WRAPPER_WARN_ABOUT_NO_TEMPLATE OFF) - itk_wrap_one_type("${WRAPPER_WRAP_METHOD}" "${WRAPPER_CLASS}" "${WRAPPER_SWIG_NAME}${name}" "${types}") + itk_wrap_one_type( + "${WRAPPER_WRAP_METHOD}" + "${WRAPPER_CLASS}" + "${WRAPPER_SWIG_NAME}${name}" + "${types}") if("${ITK_WRAP_PYTHON_CURRENT_CLASS}" STREQUAL "itk::ImageSource") # generate the typemap which let pass an ImageSource instead of an Image @@ -783,7 +1040,11 @@ macro(itk_wrap_template name types) # modules to redefine those missing types if they use it internally. if(image STREQUAL "") # Replace the mangled type I with itkImage - string(REPLACE "I" "itkImage" imageTemplate ${name}) + string( + REPLACE "I" + "itkImage" + imageTemplate + ${name}) set(image ${imageTemplate}) endif() @@ -792,7 +1053,9 @@ macro(itk_wrap_template name types) # set(text "${text} // ======================\n") set(text "${text} ${image_source} * imgsrc;\n") set(text "${text} ${image} * img;\n") - set(text "${text} if($input != Py_None && SWIG_ConvertPtr($input,(void **)(&imgsrc),\$descriptor(${image_source} *), 0) == 0)\n") + set(text + "${text} if($input != Py_None && SWIG_ConvertPtr($input,(void **)(&imgsrc),\$descriptor(${image_source} *), 0) == 0)\n" + ) set(text "${text} {\n") set(text "${text} \$1 = imgsrc->GetOutput(0);\n") set(text "${text} }\n") @@ -802,7 +1065,8 @@ macro(itk_wrap_template name types) set(text "${text} }\n") set(text "${text} else\n") set(text "${text} {\n") - set(text "${text} PyErr_SetString(PyExc_TypeError, \"Expecting argument of type ${image} or ${image_source}.\");\n") + set(text + "${text} PyErr_SetString(PyExc_TypeError, \"Expecting argument of type ${image} or ${image_source}.\");\n") set(text "${text} SWIG_fail;\n") set(text "${text} }\n") set(text "${text}}\n") @@ -812,7 +1076,9 @@ macro(itk_wrap_template name types) # set(text "${text} // //////////////////////////\n") set(text "${text} ${image_source} * imgsrc;\n") set(text "${text} ${image} * img;\n") - set(text "${text} if($input != Py_None && SWIG_ConvertPtr($input,(void **)(&imgsrc),\$descriptor(${image_source} *), 0) == 0)\n") + set(text + "${text} if($input != Py_None && SWIG_ConvertPtr($input,(void **)(&imgsrc),\$descriptor(${image_source} *), 0) == 0)\n" + ) set(text "${text} {\n") set(text "${text} \$1 = 1;\n") set(text "${text} }\n") @@ -860,7 +1126,10 @@ macro(itk_wrap_image_filter param_types param_count) # of the filter for every pixel type that the user has selected. set(have_dim_cond OFF) - if(NOT "${ARGN}" STREQUAL "") + if(NOT + "${ARGN}" + STREQUAL + "") set(have_dim_cond ON) endif() @@ -903,7 +1172,7 @@ macro(itk_wrap_image_filter_combinations) set(arg7 ${ARGV7}) set(arg8 ${ARGV8}) set(arg9 ${ARGV9}) - DECREMENT(last_arg_number ${ARGC}) + decrement(last_arg_number ${ARGC}) # Now see if we have a dimension condition, and if so, note it and remove it # from the list of args that we will process later @@ -912,7 +1181,7 @@ macro(itk_wrap_image_filter_combinations) if("${last_arg}" MATCHES "^[0-9]") # We have a dimensionality condition set(have_dim_cond ON) - DECREMENT(last_arg_number ${last_arg_number}) + decrement(last_arg_number ${last_arg_number}) endif() # Build up a list of all of the combinations of all of the elements in each @@ -946,7 +1215,11 @@ macro(itk_wrap_image_filter_combinations) # Each param_set is a #-delimited list of pixel types. First thing, we unpack # param_set back to a CMake list (;-delimited). Then we instantiate the filter # for that combination of image pixel types. - string(REPLACE "#" ";" param_list "${param_set}") + string( + REPLACE "#" + ";" + param_list + "${param_set}") if(have_dim_cond) itk_wrap_image_filter_types(${param_list} "${last_arg}") else() @@ -956,7 +1229,6 @@ macro(itk_wrap_image_filter_combinations) endif() endmacro() - macro(itk_wrap_image_filter_types) # itk_wrap_image_filter_types creates template instantiations of the current image # filter, for all the selected dimensions (or dimensions that meet the optional @@ -978,13 +1250,13 @@ macro(itk_wrap_image_filter_types) set(arg7 ${ARGV7}) set(arg8 ${ARGV8}) set(arg9 ${ARGV9}) - DECREMENT(last_arg_number ${ARGC}) + decrement(last_arg_number ${ARGC}) set(last_arg "${arg${last_arg_number}}") if("${last_arg}" MATCHES "^[0-9]") # We have a dimensionality condition itk_wrap_filter_dims(dims "${last_arg}") - DECREMENT(last_arg_number ${last_arg_number}) + decrement(last_arg_number ${last_arg_number}) else() set(dims ${ITK_WRAP_IMAGE_DIMS}) endif() @@ -1025,7 +1297,6 @@ macro(itk_wrap_image_filter_types) endforeach() endmacro() - macro(itk_wrap_filter_dims var_name dimension_condition) # itk_wrap_filter_dims processes a dimension_condition and returns a list of the dimensions # that (a) meet the condition, and (b) were selected to be wrapped. Recall @@ -1035,8 +1306,13 @@ macro(itk_wrap_filter_dims var_name dimension_condition) if("${dimension_condition}" MATCHES "^[0-9]+\\+$") # The condition is of the form "n+". Make a list of the # selected wrapping dims that are >= that number. - string(REGEX REPLACE "^([0-9]+)\\+$" "\\1" min_dim "${dimension_condition}") - DECREMENT(max_disallowed ${min_dim}) + string( + REGEX + REPLACE "^([0-9]+)\\+$" + "\\1" + min_dim + "${dimension_condition}") + decrement(max_disallowed ${min_dim}) set(${var_name} "") foreach(d ${ITK_WRAP_IMAGE_DIMS}) if("${d}" GREATER "${max_disallowed}") @@ -1046,7 +1322,7 @@ macro(itk_wrap_filter_dims var_name dimension_condition) else() # The condition is just a list of dims. Return the intersection of these # dims with the selected ones. - INTERSECTION(${var_name} "${dimension_condition}" "${ITK_WRAP_IMAGE_DIMS}") + intersection(${var_name} "${dimension_condition}" "${ITK_WRAP_IMAGE_DIMS}") endif() endmacro() diff --git a/Wrapping/WrapBasicTypes.cmake b/Wrapping/WrapBasicTypes.cmake index dae07ea11b2..639877ffbf7 100644 --- a/Wrapping/WrapBasicTypes.cmake +++ b/Wrapping/WrapBasicTypes.cmake @@ -3,47 +3,47 @@ # basic types. ############################################################################### -set(ITKT_UC "unsigned char") # Type -set(ITKM_UC "UC") # Mangle +set(ITKT_UC "unsigned char") # Type +set(ITKM_UC "UC") # Mangle set(ITKT_US "unsigned short") # Type -set(ITKM_US "US") # Mangle +set(ITKM_US "US") # Mangle -set(ITKT_UI "unsigned int") # Type -set(ITKM_UI "UI") # Mangle +set(ITKT_UI "unsigned int") # Type +set(ITKM_UI "UI") # Mangle -set(ITKT_UL "unsigned long") # Type -set(ITKM_UL "UL") # Mangle +set(ITKT_UL "unsigned long") # Type +set(ITKM_UL "UL") # Mangle set(ITKT_ULL "unsigned long long") # Type -set(ITKM_ULL "ULL") # Mangle +set(ITKM_ULL "ULL") # Mangle -set(ITKT_SC "signed char") # Type -set(ITKM_SC "SC") # Mangle +set(ITKT_SC "signed char") # Type +set(ITKM_SC "SC") # Mangle -set(ITKT_SS "signed short") # Type -set(ITKM_SS "SS") # Mangle +set(ITKT_SS "signed short") # Type +set(ITKM_SS "SS") # Mangle -set(ITKT_SI "signed int") # Type -set(ITKM_SI "SI") # Mangle +set(ITKT_SI "signed int") # Type +set(ITKM_SI "SI") # Mangle -set(ITKT_SL "signed long") # Type -set(ITKM_SL "SL") # Mangle +set(ITKT_SL "signed long") # Type +set(ITKM_SL "SL") # Mangle set(ITKT_SLL "signed long long") # Type -set(ITKM_SLL "SLL") # Mangle +set(ITKM_SLL "SLL") # Mangle -set(ITKT_F "float") # Type -set(ITKM_F "F") # Mangle +set(ITKT_F "float") # Type +set(ITKM_F "F") # Mangle -set(ITKT_D "double") # Type -set(ITKM_D "D") # Mangle +set(ITKT_D "double") # Type +set(ITKM_D "D") # Mangle -set(ITKT_LD "long double") # Type -set(ITKM_LD "LD") # Mangle +set(ITKT_LD "long double") # Type +set(ITKM_LD "LD") # Mangle -set(ITKT_B "bool") # Type -set(ITKM_B "B") # Mangle +set(ITKT_B "bool") # Type +set(ITKM_B "B") # Mangle ############################################################################### # A list of the union of ${ITK_WRAP_IMAGE_DIMS} and incremented ITK_WRAP_IMAGE_DIMS. This @@ -52,24 +52,34 @@ set(ITKM_B "B") # Mangle set(ITK_WRAP_IMAGE_DIMS_INCREMENTED "") foreach(d ${ITK_WRAP_IMAGE_DIMS}) # For VelocityFieldTranform - INCREMENT(d_inc ${d}) - list(APPEND ITK_WRAP_IMAGE_DIMS_INCREMENTED ${d} ${d_inc}) + increment(d_inc ${d}) + list( + APPEND + ITK_WRAP_IMAGE_DIMS_INCREMENTED + ${d} + ${d_inc}) endforeach() list(REMOVE_DUPLICATES ITK_WRAP_IMAGE_DIMS_INCREMENTED) # Needed for itkMatrix, itkPoint, ... set(ITK_WRAP_VECTOR_COMPONENTS_INCREMENTED "") foreach(d ${ITK_WRAP_VECTOR_COMPONENTS}) - INCREMENT(d_inc ${d}) - list(APPEND ITK_WRAP_VECTOR_COMPONENTS_INCREMENTED ${d} ${d_inc}) + increment(d_inc ${d}) + list( + APPEND + ITK_WRAP_VECTOR_COMPONENTS_INCREMENTED + ${d} + ${d_inc}) endforeach() list(REMOVE_DUPLICATES ITK_WRAP_VECTOR_COMPONENTS_INCREMENTED) -INTERSECTION(_vector_dims_intersection "${ITK_WRAP_VECTOR_COMPONENTS}" - "${ITK_WRAP_IMAGE_DIMS}") +intersection(_vector_dims_intersection "${ITK_WRAP_VECTOR_COMPONENTS}" "${ITK_WRAP_IMAGE_DIMS}") list(LENGTH ITK_WRAP_IMAGE_DIMS _num_dims) list(LENGTH _vector_dims_intersection _num_vector_dims_intersection) -if(NOT _num_dims EQUAL _num_vector_dims_intersection) +if(NOT + _num_dims + EQUAL + _num_vector_dims_intersection) message(FATAL_ERROR "ITK_WRAP_VECTOR_COMPONENTS must include ITK_WRAP_IMAGE_DIMS") endif() @@ -156,7 +166,12 @@ set(WRAP_ITK_INT ${WRAP_ITK_SIGN_INT} ${WRAP_ITK_USIGN_INT}) set(WRAP_ITK_SCALAR ${WRAP_ITK_INT} ${WRAP_ITK_REAL}) set(WRAP_ITK_VECTOR ${WRAP_ITK_VECTOR_REAL} ${WRAP_ITK_COV_VECTOR_REAL}) set(WRAP_ITK_COLOR ${WRAP_ITK_RGB} ${WRAP_ITK_RGBA}) -set(WRAP_ITK_ALL_TYPES ${WRAP_ITK_RGB} ${WRAP_ITK_RGBA} ${WRAP_ITK_VECTOR} ${WRAP_ITK_SCALAR} ${WRAP_ITK_COMPLEX_REAL}) +set(WRAP_ITK_ALL_TYPES + ${WRAP_ITK_RGB} + ${WRAP_ITK_RGBA} + ${WRAP_ITK_VECTOR} + ${WRAP_ITK_SCALAR} + ${WRAP_ITK_COMPLEX_REAL}) # Make a list of all the RGB Pixel types which are wrapped. set(WRAP_ITK_RGB_PIXEL_TYPES "D;F") @@ -177,14 +192,14 @@ if(ITK_WRAP_rgba_unsigned_short) endif() # Make a list of all selected types "smaller than" a given type -INTERSECTION(SMALLER_THAN_D "F;UL;US;UC;SL;SS;SC" "${WRAP_ITK_SCALAR}") -INTERSECTION(SMALLER_THAN_F "UL;US;UC;SL;SS;SC" "${WRAP_ITK_SCALAR}") -INTERSECTION(SMALLER_THAN_UL "US;UC;SL;SS;SC" "${WRAP_ITK_INT}") -INTERSECTION(SMALLER_THAN_ULL "US;UC;SL;SS;SC" "${WRAP_ITK_INT}") -INTERSECTION(SMALLER_THAN_US "UC;SC" "${WRAP_ITK_INT}") -INTERSECTION(SMALLER_THAN_SL "US;UC;SS;SC" "${WRAP_ITK_INT}") -INTERSECTION(SMALLER_THAN_SLL "US;UC;SS;SC" "${WRAP_ITK_INT}") -INTERSECTION(SMALLER_THAN_SS "UC;SC" "${WRAP_ITK_INT}") +intersection(SMALLER_THAN_D "F;UL;US;UC;SL;SS;SC" "${WRAP_ITK_SCALAR}") +intersection(SMALLER_THAN_F "UL;US;UC;SL;SS;SC" "${WRAP_ITK_SCALAR}") +intersection(SMALLER_THAN_UL "US;UC;SL;SS;SC" "${WRAP_ITK_INT}") +intersection(SMALLER_THAN_ULL "US;UC;SL;SS;SC" "${WRAP_ITK_INT}") +intersection(SMALLER_THAN_US "UC;SC" "${WRAP_ITK_INT}") +intersection(SMALLER_THAN_SL "US;UC;SS;SC" "${WRAP_ITK_INT}") +intersection(SMALLER_THAN_SLL "US;UC;SS;SC" "${WRAP_ITK_INT}") +intersection(SMALLER_THAN_SS "UC;SC" "${WRAP_ITK_INT}") # Types that correspond itk::SizeValueType, itk::IdentifierType, and itk::OffsetValueType if(WIN32 AND ITK_USE_64BITS_IDS) diff --git a/Wrapping/WrapITKTypes.cmake b/Wrapping/WrapITKTypes.cmake index 0531db4410a..ac2347a9e65 100644 --- a/Wrapping/WrapITKTypes.cmake +++ b/Wrapping/WrapITKTypes.cmake @@ -2,368 +2,399 @@ # set the default include files for the generated wrapper files # itk::Command has to be available in all ITK wrapped files -set(WRAPPER_DEFAULT_INCLUDE - itkCommand.h -) +set(WRAPPER_DEFAULT_INCLUDE itkCommand.h) # define some macro to help creation of types vars macro(WRAP_TYPE class prefix) - # begin the creation of a type vars - # call to this macro should be followed by one or several call to ADD_TEMPLATE() - # and one call to END_WRAP_TYPE to really create the vars - set(WRAPPER_TEMPLATES "") - set(itk_Wrap_Prefix "${prefix}") - set(itk_Wrap_Class "${class}") - - # Add any include's specified in ARGN to WRAPPER_DEFAULT_INCLUDE - if(NOT "${ARGN}" STREQUAL "") - list(APPEND WRAPPER_DEFAULT_INCLUDE ${ARGN}) - endif() + # begin the creation of a type vars + # call to this macro should be followed by one or several call to ADD_TEMPLATE() + # and one call to END_WRAP_TYPE to really create the vars + set(WRAPPER_TEMPLATES "") + set(itk_Wrap_Prefix "${prefix}") + set(itk_Wrap_Class "${class}") + + # Add any include's specified in ARGN to WRAPPER_DEFAULT_INCLUDE + if(NOT + "${ARGN}" + STREQUAL + "") + list(APPEND WRAPPER_DEFAULT_INCLUDE ${ARGN}) + endif() endmacro() macro(END_WRAP_TYPE) - # create the type vars. - # must be called after END_WRAP_TYPE - # Create the vars used to design types in all the cmake - # files. This method ensure all the type names are constructed - # with the same method. - foreach(wrap ${WRAPPER_TEMPLATES}) - string(REGEX REPLACE "([0-9A-Za-z]*)[ ]*#[ ]*(.*)" "\\1" wrapTpl "${wrap}") - string(REGEX REPLACE "([0-9A-Za-z]*)[ ]*#[ ]*(.*)" "\\2" wrapType "${wrap}") - if("${itk_Wrap_Class}" MATCHES "::") - # there's at least one namespace in the name - string(REGEX REPLACE ".*::" "" base_name "${itk_Wrap_Class}") - string(REGEX REPLACE "^([^:]*::)?.+" "\\1" top_namespace "${itk_Wrap_Class}") - string(REGEX REPLACE "::" "" top_namespace "${top_namespace}") # drop the :: from the namespace - set(swig_name "${top_namespace}${base_name}") - else() - # no namespaces - set(swig_name "${itk_Wrap_Class}") - endif() - set(ITKT_${itk_Wrap_Prefix}${wrapTpl} "${itk_Wrap_Class}< ${wrapType} >") - set(ITKM_${itk_Wrap_Prefix}${wrapTpl} "${itk_Wrap_Prefix}${wrapTpl}") - set(ITKN_${itk_Wrap_Prefix}${wrapTpl} "${swig_name}${wrapTpl}") - endforeach() + # create the type vars. + # must be called after END_WRAP_TYPE + # Create the vars used to design types in all the cmake + # files. This method ensure all the type names are constructed + # with the same method. + foreach(wrap ${WRAPPER_TEMPLATES}) + string( + REGEX + REPLACE "([0-9A-Za-z]*)[ ]*#[ ]*(.*)" + "\\1" + wrapTpl + "${wrap}") + string( + REGEX + REPLACE "([0-9A-Za-z]*)[ ]*#[ ]*(.*)" + "\\2" + wrapType + "${wrap}") + if("${itk_Wrap_Class}" MATCHES "::") + # there's at least one namespace in the name + string( + REGEX + REPLACE ".*::" + "" + base_name + "${itk_Wrap_Class}") + string( + REGEX + REPLACE "^([^:]*::)?.+" + "\\1" + top_namespace + "${itk_Wrap_Class}") + string( + REGEX + REPLACE "::" + "" + top_namespace + "${top_namespace}") # drop the :: from the namespace + set(swig_name "${top_namespace}${base_name}") + else() + # no namespaces + set(swig_name "${itk_Wrap_Class}") + endif() + set(ITKT_${itk_Wrap_Prefix}${wrapTpl} "${itk_Wrap_Class}< ${wrapType} >") + set(ITKM_${itk_Wrap_Prefix}${wrapTpl} "${itk_Wrap_Prefix}${wrapTpl}") + set(ITKN_${itk_Wrap_Prefix}${wrapTpl} "${swig_name}${wrapTpl}") + endforeach() endmacro() macro(ADD_TEMPLATE name types) list(APPEND WRAPPER_TEMPLATES "${name} # ${types}") endmacro() - #------------------------------------------------------------------------------ # now, define types vars # the result is stored in itk_Wrap_XXX where XXX is the name of the class # to be wrapped in their own file, most of the time in Common. - -WRAP_TYPE("itk::Offset" "O" "itkOffset.h") - UNIQUE(dims "${ITK_WRAP_IMAGE_DIMS_INCREMENTED};1;2") - foreach(d ${dims}) - ADD_TEMPLATE("${d}" "${d}") - endforeach() -END_WRAP_TYPE() +wrap_type("itk::Offset" "O" "itkOffset.h") +unique(dims "${ITK_WRAP_IMAGE_DIMS_INCREMENTED};1;2") +foreach(d ${dims}) + add_template("${d}" "${d}") +endforeach() +end_wrap_type() set(itk_Wrap_Offset ${WRAPPER_TEMPLATES}) -WRAP_TYPE("itk::Vector" "V" "itkVector.h") - # dim 6 is used by ScaleSkewVersor3DTransform - UNIQUE(vector_dims "1;${ITK_WRAP_VECTOR_COMPONENTS_INCREMENTED};6") - UNIQUE(vector_types "UC;F;D;${WRAP_ITK_SCALAR}") - foreach(vector_dim ${vector_dims}) - foreach(t ${vector_types}) - ADD_TEMPLATE( - "${ITKM_${t}}${vector_dim}" - "${ITKT_${t}},${vector_dim}") - endforeach() +wrap_type("itk::Vector" "V" "itkVector.h") +# dim 6 is used by ScaleSkewVersor3DTransform +unique(vector_dims "1;${ITK_WRAP_VECTOR_COMPONENTS_INCREMENTED};6") +unique(vector_types "UC;F;D;${WRAP_ITK_SCALAR}") +foreach(vector_dim ${vector_dims}) + foreach(t ${vector_types}) + add_template("${ITKM_${t}}${vector_dim}" "${ITKT_${t}},${vector_dim}") endforeach() -END_WRAP_TYPE() +endforeach() +end_wrap_type() set(itk_Wrap_Vector ${WRAPPER_TEMPLATES}) -WRAP_TYPE("itk::CovariantVector" "CV" "itkCovariantVector.h") - foreach(vector_dim ${ITK_WRAP_VECTOR_COMPONENTS_INCREMENTED}) - ADD_TEMPLATE( - "${ITKM_F}${vector_dim}" - "${ITKT_F},${vector_dim}") - ADD_TEMPLATE( - "${ITKM_D}${vector_dim}" - "${ITKT_D},${vector_dim}") - endforeach() -END_WRAP_TYPE() +wrap_type("itk::CovariantVector" "CV" "itkCovariantVector.h") +foreach(vector_dim ${ITK_WRAP_VECTOR_COMPONENTS_INCREMENTED}) + add_template("${ITKM_F}${vector_dim}" "${ITKT_F},${vector_dim}") + add_template("${ITKM_D}${vector_dim}" "${ITKT_D},${vector_dim}") +endforeach() +end_wrap_type() set(itk_Wrap_CovariantVector ${WRAPPER_TEMPLATES}) -WRAP_TYPE("itk::ContinuousIndex" "CI" "itkContinuousIndex.h") +wrap_type("itk::ContinuousIndex" "CI" "itkContinuousIndex.h") foreach(d ${ITK_WRAP_IMAGE_DIMS_INCREMENTED}) - ADD_TEMPLATE("${ITKM_F}${d}" "${ITKT_F},${d}") - ADD_TEMPLATE("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() -END_WRAP_TYPE() + add_template("${ITKM_F}${d}" "${ITKT_F},${d}") + add_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() +end_wrap_type() set(itk_Wrap_ContinuousIndex ${WRAPPER_TEMPLATES}) -WRAP_TYPE("itk::Array" "A" "itkArray.h") - ADD_TEMPLATE("${ITKM_D}" "${ITKT_D}") - ADD_TEMPLATE("${ITKM_F}" "${ITKT_F}") - ADD_TEMPLATE("${ITKM_UL}" "${ITKT_UL}") - ADD_TEMPLATE("${ITKM_ULL}" "${ITKT_ULL}") - ADD_TEMPLATE("${ITKM_SL}" "${ITKT_SL}") - ADD_TEMPLATE("${ITKM_SLL}" "${ITKT_SLL}") - ADD_TEMPLATE("${ITKM_UI}" "${ITKT_UI}") -END_WRAP_TYPE() +wrap_type("itk::Array" "A" "itkArray.h") +add_template("${ITKM_D}" "${ITKT_D}") +add_template("${ITKM_F}" "${ITKT_F}") +add_template("${ITKM_UL}" "${ITKT_UL}") +add_template("${ITKM_ULL}" "${ITKT_ULL}") +add_template("${ITKM_SL}" "${ITKT_SL}") +add_template("${ITKM_SLL}" "${ITKT_SLL}") +add_template("${ITKM_UI}" "${ITKT_UI}") +end_wrap_type() set(itk_Wrap_Array ${WRAPPER_TEMPLATES}) -WRAP_TYPE("itk::FixedArray" "FA" "itkFixedArray.h") - - set(dims ${ITK_WRAP_IMAGE_DIMS_INCREMENTED}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - math(EXPR d2 "${d} * 2") - # for itk::SymmetricSecondRankTensor - math(EXPR d3 "${d} * (${d} + 1) / 2") - list(APPEND dims ${d2} ${d3}) - endforeach() +wrap_type("itk::FixedArray" "FA" "itkFixedArray.h") + +set(dims ${ITK_WRAP_IMAGE_DIMS_INCREMENTED}) +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + math(EXPR d2 "${d} * 2") + # for itk::SymmetricSecondRankTensor + math(EXPR d3 "${d} * (${d} + 1) / 2") + list( + APPEND + dims + ${d2} + ${d3}) +endforeach() - # FixedArray can be used with dimensions describing - # image dimensions or vector components. Therefore it - # needs to have defined sizes for: - # - ITK_WRAP_IMAGE_DIMS_INCREMENTED - # - ITK_WRAP_VECTOR_COMPONENTS_INCREMENTED - # Dimensions 1;2;3;4;6 should always be wrapped. - - UNIQUE(array_sizes "${dims};1;2;3;4;6;${ITK_WRAP_VECTOR_COMPONENTS_INCREMENTED}") - - # 3-D FixedArrays are required as superclass of rgb pixels - # TODO: Do we need fixed arrays for all of these types? For just the selected - # pixel types plus some few basic cases? Or just for a basic set of types? - foreach(d ${array_sizes}) - ADD_TEMPLATE("${ITKM_D}${d}" "${ITKT_D},${d}") - ADD_TEMPLATE("${ITKM_F}${d}" "${ITKT_F},${d}") - ADD_TEMPLATE("${ITKM_UL}${d}" "${ITKT_UL},${d}") - ADD_TEMPLATE("${ITKM_ULL}${d}" "${ITKT_ULL},${d}") - ADD_TEMPLATE("${ITKM_US}${d}" "${ITKT_US},${d}") - ADD_TEMPLATE("${ITKM_UC}${d}" "${ITKT_UC},${d}") - ADD_TEMPLATE("${ITKM_UI}${d}" "${ITKT_UI},${d}") - ADD_TEMPLATE("${ITKM_SL}${d}" "${ITKT_SL},${d}") - ADD_TEMPLATE("${ITKM_SLL}${d}" "${ITKT_SLL},${d}") - ADD_TEMPLATE("${ITKM_SS}${d}" "${ITKT_SS},${d}") - ADD_TEMPLATE("${ITKM_SC}${d}" "${ITKT_SC},${d}") - ADD_TEMPLATE("${ITKM_B}${d}" "${ITKT_B},${d}") - endforeach() +# FixedArray can be used with dimensions describing +# image dimensions or vector components. Therefore it +# needs to have defined sizes for: +# - ITK_WRAP_IMAGE_DIMS_INCREMENTED +# - ITK_WRAP_VECTOR_COMPONENTS_INCREMENTED +# Dimensions 1;2;3;4;6 should always be wrapped. + +unique(array_sizes "${dims};1;2;3;4;6;${ITK_WRAP_VECTOR_COMPONENTS_INCREMENTED}") + +# 3-D FixedArrays are required as superclass of rgb pixels +# TODO: Do we need fixed arrays for all of these types? For just the selected +# pixel types plus some few basic cases? Or just for a basic set of types? +foreach(d ${array_sizes}) + add_template("${ITKM_D}${d}" "${ITKT_D},${d}") + add_template("${ITKM_F}${d}" "${ITKT_F},${d}") + add_template("${ITKM_UL}${d}" "${ITKT_UL},${d}") + add_template("${ITKM_ULL}${d}" "${ITKT_ULL},${d}") + add_template("${ITKM_US}${d}" "${ITKT_US},${d}") + add_template("${ITKM_UC}${d}" "${ITKT_UC},${d}") + add_template("${ITKM_UI}${d}" "${ITKT_UI},${d}") + add_template("${ITKM_SL}${d}" "${ITKT_SL},${d}") + add_template("${ITKM_SLL}${d}" "${ITKT_SLL},${d}") + add_template("${ITKM_SS}${d}" "${ITKT_SS},${d}") + add_template("${ITKM_SC}${d}" "${ITKT_SC},${d}") + add_template("${ITKM_B}${d}" "${ITKT_B},${d}") +endforeach() - # Wrap FixedArray for BSplineInterpolationWeightFunction: - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - # Wrapping for spline order 3, components = (SplineOrder + 1)^SpaceDimension - set(comp 1) - foreach(i RANGE 1 ${d}) - math(EXPR comp "${comp}*4") - endforeach() - ADD_TEMPLATE("${ITKM_D}${comp}" "${ITKT_D},${comp}") - ADD_TEMPLATE("${ITKM_UL}${comp}" "${ITKT_UL},${comp}") +# Wrap FixedArray for BSplineInterpolationWeightFunction: +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + # Wrapping for spline order 3, components = (SplineOrder + 1)^SpaceDimension + set(comp 1) + foreach(i RANGE 1 ${d}) + math(EXPR comp "${comp}*4") endforeach() -END_WRAP_TYPE() + add_template("${ITKM_D}${comp}" "${ITKT_D},${comp}") + add_template("${ITKM_UL}${comp}" "${ITKT_UL},${comp}") +endforeach() +end_wrap_type() set(itk_Wrap_FixedArray ${WRAPPER_TEMPLATES}) -WRAP_TYPE("itk::RGBPixel" "RGB" "itkRGBPixel.h") +wrap_type("itk::RGBPixel" "RGB" "itkRGBPixel.h") - # Required by InterpolateImageFunction - ADD_TEMPLATE("${ITKM_D}" "${ITKT_D}") +# Required by InterpolateImageFunction +add_template("${ITKM_D}" "${ITKT_D}") - ADD_TEMPLATE("${ITKM_F}" "${ITKT_F}") +add_template("${ITKM_F}" "${ITKT_F}") - ADD_TEMPLATE("${ITKM_UC}" "${ITKT_UC}") +add_template("${ITKM_UC}" "${ITKT_UC}") - # Required by itkTIFFImageIO - ADD_TEMPLATE("${ITKM_US}" "${ITKT_US}") +# Required by itkTIFFImageIO +add_template("${ITKM_US}" "${ITKT_US}") -END_WRAP_TYPE() +end_wrap_type() set(itk_Wrap_RGBPixel ${WRAPPER_TEMPLATES}) -WRAP_TYPE("itk::RGBAPixel" "RGBA" "itkRGBAPixel.h") +wrap_type("itk::RGBAPixel" "RGBA" "itkRGBAPixel.h") - # Required by InterpolateImageFunction - ADD_TEMPLATE("${ITKM_D}" "${ITKT_D}") +# Required by InterpolateImageFunction +add_template("${ITKM_D}" "${ITKT_D}") - # Required by spatial objects - ADD_TEMPLATE("${ITKM_F}" "${ITKT_F}") +# Required by spatial objects +add_template("${ITKM_F}" "${ITKT_F}") - ADD_TEMPLATE("${ITKM_UC}" "${ITKT_UC}") +add_template("${ITKM_UC}" "${ITKT_UC}") - if(ITK_WRAP_rgba_unsigned_short) - ADD_TEMPLATE("${ITKM_US}" "${ITKT_US}") - endif() +if(ITK_WRAP_rgba_unsigned_short) + add_template("${ITKM_US}" "${ITKT_US}") +endif() -END_WRAP_TYPE() +end_wrap_type() set(itk_Wrap_RGBAPixel ${WRAPPER_TEMPLATES}) -WRAP_TYPE("std::complex" "C" "complex") - ADD_TEMPLATE("${ITKM_F}" "${ITKT_F}") - ADD_TEMPLATE("${ITKM_D}" "${ITKT_D}") -END_WRAP_TYPE() +wrap_type("std::complex" "C" "complex") +add_template("${ITKM_F}" "${ITKT_F}") +add_template("${ITKM_D}" "${ITKT_D}") +end_wrap_type() set(itk_Wrap_std_complex ${WRAPPER_TEMPLATES}) -WRAP_TYPE("itk::SymmetricSecondRankTensor" "SSRT" "itkSymmetricSecondRankTensor.h") - # itkDiffusionTensor3D always needs SymmetricSecondRankTensor with dim 2 and 3 - UNIQUE(image_dims "${ITK_WRAP_IMAGE_DIMS};2;3") - foreach(d ${image_dims}) - ADD_TEMPLATE("${ITKM_D}${d}" "${ITKT_D}, ${d}") - ADD_TEMPLATE("${ITKM_F}${d}" "${ITKT_F}, ${d}") - endforeach() -END_WRAP_TYPE() +wrap_type("itk::SymmetricSecondRankTensor" "SSRT" "itkSymmetricSecondRankTensor.h") +# itkDiffusionTensor3D always needs SymmetricSecondRankTensor with dim 2 and 3 +unique(image_dims "${ITK_WRAP_IMAGE_DIMS};2;3") +foreach(d ${image_dims}) + add_template("${ITKM_D}${d}" "${ITKT_D}, ${d}") + add_template("${ITKM_F}${d}" "${ITKT_F}, ${d}") +endforeach() +end_wrap_type() set(itk_Wrap_SymmetricSecondRankTensor ${WRAPPER_TEMPLATES}) -WRAP_TYPE("itk::Image" "I" "itkImage.h") - # Make a list of all of the selected image pixel types and also double (for - # BSplineDeformableTransform), uchar (for 8-bit image output), ulong - # (for the watershed and relabel filters), bool for (FlatStructuringElement) - # unsigned int and signed int for IO. - - # Wrap from ulong to other integral types, even if ulong isn't wrapped. This - # is needed for the relabel components image filter. - UNIQUE(WRAP_ITK_SCALAR_IMAGE_PIXEL_TYPES "${WRAP_ITK_SCALAR};D;UC;SI;UI;UL;ULL;B;${ITKM_IT}") - UNIQUE(wrap_image_types "${WRAP_ITK_ALL_TYPES};RGBUC;RGBAUC;VD;${WRAP_ITK_SCALAR_IMAGE_PIXEL_TYPES}") - - set(defined_vector_list) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - - foreach(type ${wrap_image_types}) - - if("VF;VD;CVF;CVD" MATCHES "(^|;)${type}(;|$)") - - # Vectorial types - set(orig_type ${type}) - foreach(vec_dim ${ITK_WRAP_VECTOR_COMPONENTS}) - set(type "${orig_type}${vec_dim}") - ADD_TEMPLATE("${ITKM_${type}}${d}" "${ITKT_${type}},${d}") - # Make a list of all defined vector/covariantvector image types. - list(APPEND defined_vector_list ${ITKM_${type}}${d}) - endforeach() - - else() - # Scalar types - ADD_TEMPLATE("${ITKM_${type}}${d}" "${ITKT_${type}},${d}") - endif() - endforeach() - - # FixedArray types required by level set filters - if(ITK_WRAP_float) - ADD_TEMPLATE("${ITKM_FAF${d}}${d}" "${ITKT_FAF${d}},${d}") - endif() - if(ITK_WRAP_double) - ADD_TEMPLATE("${ITKM_FAD${d}}${d}" "${ITKT_FAD${d}},${d}") - endif() +wrap_type("itk::Image" "I" "itkImage.h") +# Make a list of all of the selected image pixel types and also double (for +# BSplineDeformableTransform), uchar (for 8-bit image output), ulong +# (for the watershed and relabel filters), bool for (FlatStructuringElement) +# unsigned int and signed int for IO. - # Offset, used by Danielsson's filter - ADD_TEMPLATE("${ITKM_O${d}}${d}" "${ITKT_O${d}},${d}") +# Wrap from ulong to other integral types, even if ulong isn't wrapped. This +# is needed for the relabel components image filter. +unique(WRAP_ITK_SCALAR_IMAGE_PIXEL_TYPES "${WRAP_ITK_SCALAR};D;UC;SI;UI;UL;ULL;B;${ITKM_IT}") +unique(wrap_image_types "${WRAP_ITK_ALL_TYPES};RGBUC;RGBAUC;VD;${WRAP_ITK_SCALAR_IMAGE_PIXEL_TYPES}") - # SymmetricSecondRankTensor types required by level set filters - ADD_TEMPLATE("${ITKM_SSRT${ITKM_D}${d}}${d}" "${ITKT_SSRT${ITKM_D}${d}}, ${d}") - if(ITK_WRAP_float) - ADD_TEMPLATE("${ITKM_SSRT${ITKM_F}${d}}${d}" "${ITKT_SSRT${ITKM_F}${d}}, ${d}") - endif() +set(defined_vector_list) +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + + foreach(type ${wrap_image_types}) + + if("VF;VD;CVF;CVD" MATCHES "(^|;)${type}(;|$)") + # Vectorial types + set(orig_type ${type}) + foreach(vec_dim ${ITK_WRAP_VECTOR_COMPONENTS}) + set(type "${orig_type}${vec_dim}") + add_template("${ITKM_${type}}${d}" "${ITKT_${type}},${d}") + # Make a list of all defined vector/covariantvector image types. + list(APPEND defined_vector_list ${ITKM_${type}}${d}) + endforeach() + + else() + # Scalar types + add_template("${ITKM_${type}}${d}" "${ITKT_${type}},${d}") + endif() endforeach() - # The next templates need to be always present, but should not be - # defined two times; so we check if they are already defined or not - # using the defined_vector_list. - - # Vector types required by VelocityFieldTranform classes. - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - INCREMENT(d_inc ${d}) - foreach(vector_dim ${ITK_WRAP_VECTOR_COMPONENTS}) - if(NOT "${ITKM_VD${vector_dim}}${d_inc}" IN_LIST defined_vector_list) - ADD_TEMPLATE("${ITKM_VD${vector_dim}}${d_inc}" "${ITKT_VD${vector_dim}},${d_inc}") - endif() - endforeach() - # For N4BiasFieldCorrectionImageFilter - if(NOT "${ITKM_VF1}${d}" IN_LIST defined_vector_list) - ADD_TEMPLATE("${ITKM_VF1}${d}" "${ITKT_VF1},${d}") + # FixedArray types required by level set filters + if(ITK_WRAP_float) + add_template("${ITKM_FAF${d}}${d}" "${ITKT_FAF${d}},${d}") + endif() + if(ITK_WRAP_double) + add_template("${ITKM_FAD${d}}${d}" "${ITKT_FAD${d}},${d}") + endif() + + # Offset, used by Danielsson's filter + add_template("${ITKM_O${d}}${d}" "${ITKT_O${d}},${d}") + + # SymmetricSecondRankTensor types required by level set filters + add_template("${ITKM_SSRT${ITKM_D}${d}}${d}" "${ITKT_SSRT${ITKM_D}${d}}, ${d}") + if(ITK_WRAP_float) + add_template("${ITKM_SSRT${ITKM_F}${d}}${d}" "${ITKT_SSRT${ITKM_F}${d}}, ${d}") + endif() + +endforeach() + +# The next templates need to be always present, but should not be +# defined two times; so we check if they are already defined or not +# using the defined_vector_list. + +# Vector types required by VelocityFieldTranform classes. +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + increment(d_inc ${d}) + foreach(vector_dim ${ITK_WRAP_VECTOR_COMPONENTS}) + if(NOT + "${ITKM_VD${vector_dim}}${d_inc}" + IN_LIST + defined_vector_list) + add_template("${ITKM_VD${vector_dim}}${d_inc}" "${ITKT_VD${vector_dim}},${d_inc}") endif() endforeach() + # For N4BiasFieldCorrectionImageFilter + if(NOT + "${ITKM_VF1}${d}" + IN_LIST + defined_vector_list) + add_template("${ITKM_VF1}${d}" "${ITKT_VF1},${d}") + endif() +endforeach() - # CovariantVector types required by ImageToImageMetric class - # for the ITKRegistration module. - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(vector_dim ${ITK_WRAP_VECTOR_COMPONENTS}) - if(NOT "${ITKM_CVD${vector_dim}}${d}" IN_LIST defined_vector_list) - ADD_TEMPLATE("${ITKM_CVD${vector_dim}}${d}" "${ITKT_CVD${vector_dim}},${d}") - endif() - endforeach() +# CovariantVector types required by ImageToImageMetric class +# for the ITKRegistration module. +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(vector_dim ${ITK_WRAP_VECTOR_COMPONENTS}) + if(NOT + "${ITKM_CVD${vector_dim}}${d}" + IN_LIST + defined_vector_list) + add_template("${ITKM_CVD${vector_dim}}${d}" "${ITKT_CVD${vector_dim}},${d}") + endif() endforeach() +endforeach() -END_WRAP_TYPE() +end_wrap_type() set(itk_Wrap_Image ${WRAPPER_TEMPLATES}) -WRAP_TYPE("itk::VectorImage" "VI" "itkVectorImage.h") - # Make a list of all of the selected image pixel types and also uchar - # (for 8-bit image output) - UNIQUE(wrap_image_types "${WRAP_ITK_COMPLEX_REAL};${WRAP_ITK_SCALAR};UC;D") +wrap_type("itk::VectorImage" "VI" "itkVectorImage.h") +# Make a list of all of the selected image pixel types and also uchar +# (for 8-bit image output) +unique(wrap_image_types "${WRAP_ITK_COMPLEX_REAL};${WRAP_ITK_SCALAR};UC;D") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(type ${wrap_image_types}) - ADD_TEMPLATE("${ITKM_${type}}${d}" "${ITKT_${type}},${d}") - endforeach() +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(type ${wrap_image_types}) + add_template("${ITKM_${type}}${d}" "${ITKT_${type}},${d}") endforeach() -END_WRAP_TYPE() +endforeach() +end_wrap_type() set(itk_Wrap_VectorImage ${WRAPPER_TEMPLATES}) -WRAP_TYPE("itk::VariableLengthVector" "VLV" "itkVariableLengthVector.h") - # Make a list of all of the selected image pixel types and also uchar - # (for 8-bit image output) - UNIQUE(wrap_image_types "${WRAP_ITK_COMPLEX_REAL};${WRAP_ITK_SCALAR};UC;D") +wrap_type("itk::VariableLengthVector" "VLV" "itkVariableLengthVector.h") +# Make a list of all of the selected image pixel types and also uchar +# (for 8-bit image output) +unique(wrap_image_types "${WRAP_ITK_COMPLEX_REAL};${WRAP_ITK_SCALAR};UC;D") - foreach(type ${wrap_image_types}) - ADD_TEMPLATE("${ITKM_${type}}" "${ITKT_${type}}") - endforeach() -END_WRAP_TYPE() +foreach(type ${wrap_image_types}) + add_template("${ITKM_${type}}" "${ITKT_${type}}") +endforeach() +end_wrap_type() set(itk_Wrap_VariableLengthVector ${WRAPPER_TEMPLATES}) -WRAP_TYPE("itk::Point" "P" "itkPoint.h") - UNIQUE(dims "${ITK_WRAP_IMAGE_DIMS_INCREMENTED};6") - foreach(d ${dims}) - ADD_TEMPLATE("${ITKM_F}${d}" "${ITKT_F},${d}") - ADD_TEMPLATE("${ITKM_D}${d}" "${ITKT_D},${d}") - endforeach() -END_WRAP_TYPE() +wrap_type("itk::Point" "P" "itkPoint.h") +unique(dims "${ITK_WRAP_IMAGE_DIMS_INCREMENTED};6") +foreach(d ${dims}) + add_template("${ITKM_F}${d}" "${ITKT_F},${d}") + add_template("${ITKM_D}${d}" "${ITKT_D},${d}") +endforeach() +end_wrap_type() set(itk_Wrap_Point ${WRAPPER_TEMPLATES}) # Needed by Modules/Filtering/FastMarching/wrapping/itkLevelSetNode.wrap -WRAP_TYPE("itk::LevelSetNode" "LSN") - # Only make level set nodes for the selected image pixel types - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - foreach(type ${WRAP_ITK_SCALAR}) - ADD_TEMPLATE("${ITKM_${type}}${d}" "${ITKT_${type}},${d}") - endforeach() +wrap_type("itk::LevelSetNode" "LSN") +# Only make level set nodes for the selected image pixel types +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(type ${WRAP_ITK_SCALAR}) + add_template("${ITKM_${type}}${d}" "${ITKT_${type}},${d}") endforeach() -END_WRAP_TYPE() +endforeach() +end_wrap_type() set(itk_Wrap_LevelSetNode ${WRAPPER_TEMPLATES}) # Needed by Modules/Filtering/MathematicalMorphology/wrapping/itkFlatStructuringElement.wrap -WRAP_TYPE("itk::FlatStructuringElement" "SE") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - ADD_TEMPLATE("${d}" "${d}") - endforeach() -END_WRAP_TYPE() +wrap_type("itk::FlatStructuringElement" "SE") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + add_template("${d}" "${d}") +endforeach() +end_wrap_type() set(itk_Wrap_StructuringElement ${WRAPPER_TEMPLATES}) -WRAP_TYPE("itk::SpatialObject" "SO") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - ADD_TEMPLATE("${d}" "${d}") - endforeach() -END_WRAP_TYPE() +wrap_type("itk::SpatialObject" "SO") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + add_template("${d}" "${d}") +endforeach() +end_wrap_type() set(itk_Wrap_SpatialObject ${WRAPPER_TEMPLATES}) -WRAP_TYPE("itk::Statistics::Histogram" "H") - ADD_TEMPLATE("${ITKM_F}" "${ITKT_F}") - ADD_TEMPLATE("${ITKM_D}" "${ITKT_D}") -END_WRAP_TYPE() +wrap_type("itk::Statistics::Histogram" "H") +add_template("${ITKM_F}" "${ITKT_F}") +add_template("${ITKM_D}" "${ITKT_D}") +end_wrap_type() set(itk_Wrap_Histogram ${WRAPPER_TEMPLATES}) # Needed by Modules/Filtering/LabelMap/wrapping/ITKLabelMapBase.wrap -WRAP_TYPE("itk::LabelMap" "LM") - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - ADD_TEMPLATE("${d}" "itk::StatisticsLabelObject< ${ITKT_UL}, ${d} >") +wrap_type("itk::LabelMap" "LM") +foreach(d ${ITK_WRAP_IMAGE_DIMS}) + add_template("${d}" "itk::StatisticsLabelObject< ${ITKT_UL}, ${d} >") endforeach() -END_WRAP_TYPE() +end_wrap_type() set(itk_Wrap_LabelMap ${WRAPPER_TEMPLATES}) #------------------------------------------------------------------------------ diff --git a/Wrapping/WrappingOptions.cmake b/Wrapping/WrappingOptions.cmake index 4f64c65c78e..6a629508a85 100644 --- a/Wrapping/WrappingOptions.cmake +++ b/Wrapping/WrappingOptions.cmake @@ -8,46 +8,150 @@ if(ITK_WRAP_PYTHON) endif() # ITK_WRAPPING is an internal variable that is always the same value as ITK_WRAP_PYTHON # since python is the only valid wrapped language - set(ITK_WRAPPING ON CACHE INTERNAL "Build external languages support" FORCE) + set(ITK_WRAPPING + ON + CACHE INTERNAL "Build external languages support" FORCE) else() - set(ITK_WRAPPING OFF CACHE INTERNAL "Build external languages support" FORCE) + set(ITK_WRAPPING + OFF + CACHE INTERNAL "Build external languages support" FORCE) endif() -cmake_dependent_option(ITK_WRAP_unsigned_char "Wrap unsigned char type" ON "ITK_WRAPPING" OFF) -cmake_dependent_option(ITK_WRAP_unsigned_short "Wrap unsigned short type" OFF "ITK_WRAPPING" OFF) -cmake_dependent_option(ITK_WRAP_unsigned_long "Wrap unsigned long type" OFF "ITK_WRAPPING" OFF) +cmake_dependent_option( + ITK_WRAP_unsigned_char + "Wrap unsigned char type" + ON + "ITK_WRAPPING" + OFF) +cmake_dependent_option( + ITK_WRAP_unsigned_short + "Wrap unsigned short type" + OFF + "ITK_WRAPPING" + OFF) +cmake_dependent_option( + ITK_WRAP_unsigned_long + "Wrap unsigned long type" + OFF + "ITK_WRAPPING" + OFF) mark_as_advanced(ITK_WRAP_unsigned_long) if(ITK_WRAP_unsigned_long) message(WARNING "ITK_WRAP_unsigned_long is deprecated. Please use ITK_WRAP_unsigned_long_long instead.") endif() -cmake_dependent_option(ITK_WRAP_unsigned_long_long "Wrap unsigned long long type" OFF "ITK_WRAPPING" OFF) - -cmake_dependent_option(ITK_WRAP_signed_char "Wrap signed char type" OFF "ITK_WRAPPING" OFF) -cmake_dependent_option(ITK_WRAP_signed_short "Wrap signed short type" ON "ITK_WRAPPING" OFF) -cmake_dependent_option(ITK_WRAP_signed_long "Wrap signed long type" OFF "ITK_WRAPPING" OFF) +cmake_dependent_option( + ITK_WRAP_unsigned_long_long + "Wrap unsigned long long type" + OFF + "ITK_WRAPPING" + OFF) + +cmake_dependent_option( + ITK_WRAP_signed_char + "Wrap signed char type" + OFF + "ITK_WRAPPING" + OFF) +cmake_dependent_option( + ITK_WRAP_signed_short + "Wrap signed short type" + ON + "ITK_WRAPPING" + OFF) +cmake_dependent_option( + ITK_WRAP_signed_long + "Wrap signed long type" + OFF + "ITK_WRAPPING" + OFF) mark_as_advanced(ITK_WRAP_signed_long) if(ITK_WRAP_signed_long) message(WARNING "ITK_WRAP_signed_long is deprecated. Please use ITK_WRAP_signed_long_long instead.") endif() -cmake_dependent_option(ITK_WRAP_signed_long_long "Wrap signed long long type" OFF "ITK_WRAPPING" OFF) - -cmake_dependent_option(ITK_WRAP_float "Wrap float type" ON "ITK_WRAPPING" OFF) -cmake_dependent_option(ITK_WRAP_double "Wrap double type" OFF "ITK_WRAPPING" OFF) - -cmake_dependent_option(ITK_WRAP_vector_float "Wrap vector float type" ON "ITK_WRAPPING" OFF) -cmake_dependent_option(ITK_WRAP_vector_double "Wrap vector double type" OFF "ITK_WRAPPING" OFF) - -cmake_dependent_option(ITK_WRAP_covariant_vector_float "Wrap covariant vector float type" ON "ITK_WRAPPING" OFF) -cmake_dependent_option(ITK_WRAP_covariant_vector_double "Wrap covariant vector double type" OFF "ITK_WRAPPING" OFF) - -cmake_dependent_option(ITK_WRAP_rgb_unsigned_char "Wrap RGB< unsigned char > type" ON "ITK_WRAPPING" OFF) -cmake_dependent_option(ITK_WRAP_rgb_unsigned_short "Wrap RGB< unsigned short > type" OFF "ITK_WRAPPING" OFF) - -cmake_dependent_option(ITK_WRAP_rgba_unsigned_char "Wrap RGBA< unsigned char > type" ON "ITK_WRAPPING" OFF) -cmake_dependent_option(ITK_WRAP_rgba_unsigned_short "Wrap RGBA< unsigned short > type" OFF "ITK_WRAPPING" OFF) - -cmake_dependent_option(ITK_WRAP_complex_float "Wrap complex< float > type" ON "ITK_WRAPPING" OFF) -cmake_dependent_option(ITK_WRAP_complex_double "Wrap complex< double > type" OFF "ITK_WRAPPING" OFF) +cmake_dependent_option( + ITK_WRAP_signed_long_long + "Wrap signed long long type" + OFF + "ITK_WRAPPING" + OFF) + +cmake_dependent_option( + ITK_WRAP_float + "Wrap float type" + ON + "ITK_WRAPPING" + OFF) +cmake_dependent_option( + ITK_WRAP_double + "Wrap double type" + OFF + "ITK_WRAPPING" + OFF) + +cmake_dependent_option( + ITK_WRAP_vector_float + "Wrap vector float type" + ON + "ITK_WRAPPING" + OFF) +cmake_dependent_option( + ITK_WRAP_vector_double + "Wrap vector double type" + OFF + "ITK_WRAPPING" + OFF) + +cmake_dependent_option( + ITK_WRAP_covariant_vector_float + "Wrap covariant vector float type" + ON + "ITK_WRAPPING" + OFF) +cmake_dependent_option( + ITK_WRAP_covariant_vector_double + "Wrap covariant vector double type" + OFF + "ITK_WRAPPING" + OFF) + +cmake_dependent_option( + ITK_WRAP_rgb_unsigned_char + "Wrap RGB< unsigned char > type" + ON + "ITK_WRAPPING" + OFF) +cmake_dependent_option( + ITK_WRAP_rgb_unsigned_short + "Wrap RGB< unsigned short > type" + OFF + "ITK_WRAPPING" + OFF) + +cmake_dependent_option( + ITK_WRAP_rgba_unsigned_char + "Wrap RGBA< unsigned char > type" + ON + "ITK_WRAPPING" + OFF) +cmake_dependent_option( + ITK_WRAP_rgba_unsigned_short + "Wrap RGBA< unsigned short > type" + OFF + "ITK_WRAPPING" + OFF) + +cmake_dependent_option( + ITK_WRAP_complex_float + "Wrap complex< float > type" + ON + "ITK_WRAPPING" + OFF) +cmake_dependent_option( + ITK_WRAP_complex_double + "Wrap complex< double > type" + OFF + "ITK_WRAPPING" + OFF) if(ITK_WRAPPING) # Check for type conditions that need to be fulfilled. @@ -80,14 +184,20 @@ if(ITK_WRAPPING) if(DEFINED ITK_WRAP_DIMS) # Keep ITK_WRAP_DIMS for backward compatibility. - set(ITK_WRAP_IMAGE_DIMS "${ITK_WRAP_DIMS}" CACHE STRING "Dimensions available separated by semicolons (;)") + set(ITK_WRAP_IMAGE_DIMS + "${ITK_WRAP_DIMS}" + CACHE STRING "Dimensions available separated by semicolons (;)") else() - set(ITK_WRAP_IMAGE_DIMS "2;3" CACHE STRING "Dimensions available separated by semicolons (;)") + set(ITK_WRAP_IMAGE_DIMS + "2;3" + CACHE STRING "Dimensions available separated by semicolons (;)") # Keep ITK_WRAP_DIMS for extra modules developed outside of ITK. set(ITK_WRAP_DIMS "${ITK_WRAP_IMAGE_DIMS}") endif() - UNIQUE(vector_components "${ITK_WRAP_IMAGE_DIMS};4") - set(ITK_WRAP_VECTOR_COMPONENTS "${vector_components}" CACHE STRING "Number of vector components available separated by semicolons (;)") + unique(vector_components "${ITK_WRAP_IMAGE_DIMS};4") + set(ITK_WRAP_VECTOR_COMPONENTS + "${vector_components}" + CACHE STRING "Number of vector components available separated by semicolons (;)") else() # Hide options that are not relevant when no wrapping is requested if(ITK_WRAP_IMAGE_DIMS) diff --git a/Wrapping/macro_files/itk_auto_load_submodules.cmake b/Wrapping/macro_files/itk_auto_load_submodules.cmake index 81873300b63..25d6e1cfece 100644 --- a/Wrapping/macro_files/itk_auto_load_submodules.cmake +++ b/Wrapping/macro_files/itk_auto_load_submodules.cmake @@ -1,336 +1,338 @@ - function(generate_castxml_commandline_flags) - # this function sets up all the command line arguments needed - # to successfully run castxml to generate the xml. - - # Before this function is run, the variables @CASTXML_INCLUDES@, @WRAPPER_MODULE_NAME@, @CASTXML_TYPEDEFS@, @CASTXML_FORCE_INSTANTIATE@ - # need to have been set so that the they can be expanded into the cxx file that is used - # for generating the xml AST from the cxx_file. - - - ## = Setup standard compiler flags=========================== - if(NOT ITK_USE_SYSTEM_CASTXML) - # ExternalProject target for CastXML. - set(_castxml_depends castxml) + # this function sets up all the command line arguments needed + # to successfully run castxml to generate the xml. + + # Before this function is run, the variables @CASTXML_INCLUDES@, @WRAPPER_MODULE_NAME@, @CASTXML_TYPEDEFS@, @CASTXML_FORCE_INSTANTIATE@ + # need to have been set so that the they can be expanded into the cxx file that is used + # for generating the xml AST from the cxx_file. + + ## = Setup standard compiler flags=========================== + if(NOT ITK_USE_SYSTEM_CASTXML) + # ExternalProject target for CastXML. + set(_castxml_depends castxml) + endif() + + unset(_ccache_cmd) + if(ITK_USE_CCACHE) + set(_ccache_cmd ${CCACHE_EXECUTABLE}) + endif() + + # Avoid missing omp.h include + set(_castxml_cc_flags ${CMAKE_CXX_FLAGS}) + if(CMAKE_CXX_EXTENSIONS) + set(_castxml_cc_flags "${_castxml_cc_flags} ${CMAKE_CXX17_EXTENSION_COMPILE_OPTION}") + else() + set(_castxml_cc_flags "${_castxml_cc_flags} ${CMAKE_CXX17_STANDARD_COMPILE_OPTION}") + endif() + + # Aggressive optimization flags cause cast_xml to give invalid error conditions + set(INVALID_OPTIMIZATION_FLAGS "-fopenmp;-march=[a-zA-Z0-9\-]*;-mtune=[a-zA-Z0-9\-]*;-mfma") + foreach(rmmatch ${INVALID_OPTIMIZATION_FLAGS}) + string( + REGEX + REPLACE ${rmmatch} + "" + _castxml_cc_flags + "${_castxml_cc_flags}") + endforeach() + unset(INVALID_OPTIMIZATION_FLAGS) + + # Configure the internal Clang preprocessor and target platform to match that of the given compiler command. + separate_arguments(_castxml_cc_flags) + unset(_castxml_cc) + if(MSVC) + set(_castxml_cc --castxml-cc-msvc ("${CMAKE_CXX_COMPILER}" ${_castxml_cc_flags}) -fexceptions) + if(MSVC90) + # needed for VS2008 64 bit + set(_castxml_cc ${_castxml_cc} "-D_HAS_TR1=0") endif() - - unset(_ccache_cmd) - if(ITK_USE_CCACHE) - set(_ccache_cmd ${CCACHE_EXECUTABLE}) + else() + set(_castxml_cc --castxml-cc-gnu ("${CMAKE_CXX_COMPILER}" ${_castxml_cc_flags})) + endif() + + # Override castxml target platform when cross compiling + unset(_target) + if(CMAKE_CROSSCOMPILING) + if(NOT CMAKE_CXX_COMPILER_TARGET) + message(FATAL_ERROR "Set the target triple in CMAKE_CXX_COMPILER_TARGET " + " as described in https://clang.llvm.org/docs/CrossCompilation.html") endif() - - # Avoid missing omp.h include - set(_castxml_cc_flags ${CMAKE_CXX_FLAGS}) - if(CMAKE_CXX_EXTENSIONS) - set(_castxml_cc_flags "${_castxml_cc_flags} ${CMAKE_CXX17_EXTENSION_COMPILE_OPTION}") + set(_target "--target=${CMAKE_CXX_COMPILER_TARGET}") + endif() + + unset(_build_env) + if(APPLE) + # If building on OS X, make sure that CastXML's calls to the compiler have the + # settings that the output files will be compiled with. This prevents headers + # from one version of OS X from being used when building for another version. + list( + APPEND + _build_env + env + "SDKROOT=${CMAKE_OSX_SYSROOT}" + "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}") + endif() + ## ============================ + + # create the files used to pass the file to include to castxml + get_directory_property(include_dir_list INCLUDE_DIRECTORIES) + list(REMOVE_DUPLICATES include_dir_list) + + # CONFIG_CASTXML_INC_CONTENTS - variable used for building contents to write with configure_file() + unset(CONFIG_CASTXML_INC_CONTENTS) + foreach(dir ${include_dir_list}) + set(CONFIG_CASTXML_INC_CONTENTS "${CONFIG_CASTXML_INC_CONTENTS}\"-I${dir}\"\n") + endforeach() + unset(include_dir_list) + + set(CONFIG_CASTXML_INC_CONTENTS "${CONFIG_CASTXML_INC_CONTENTS}-Qunused-arguments\n") + set(CONFIG_CASTXML_INC_CONTENTS "${CONFIG_CASTXML_INC_CONTENTS}-DITK_WRAPPING_PARSER\n") + set(CONFIG_CASTXML_INC_CONTENTS "${CONFIG_CASTXML_INC_CONTENTS}-DITK_MANUAL_INSTANTIATION\n") + + # Get the compile_definitions of the module added with add_compile_definitions + # From the wrapping folder (current) + get_directory_property(compile_definition_list COMPILE_DEFINITIONS) + # And from the top module folder + set(module_folder "${WRAPPER_LIBRARY_SOURCE_DIR}/..") + get_directory_property(compile_definition_list_at_module DIRECTORY "${module_folder}" COMPILE_DEFINITIONS) + unset(module_folder) + # Merge and remove duplicates + list(APPEND compile_definition_list ${compile_definition_list_at_module}) + unset(compile_definition_list_at_module) + list(REMOVE_DUPLICATES compile_definition_list) + + foreach(def ${compile_definition_list}) + set(CONFIG_CASTXML_INC_CONTENTS "${CONFIG_CASTXML_INC_CONTENTS}\"-D${def}\"\n") + endforeach() + unset(compile_definition_list) + foreach(include_file ${WRAPPER_INCLUDE_FILES}) + if("${include_file}" MATCHES "<.*>") + string(APPEND CASTXML_INCLUDES "#include ${include_file}\n") else() - set(_castxml_cc_flags "${_castxml_cc_flags} ${CMAKE_CXX17_STANDARD_COMPILE_OPTION}") + string(APPEND CASTXML_INCLUDES "#include \"${include_file}\"\n") endif() - - # Aggressive optimization flags cause cast_xml to give invalid error conditions - set(INVALID_OPTIMIZATION_FLAGS "-fopenmp;-march=[a-zA-Z0-9\-]*;-mtune=[a-zA-Z0-9\-]*;-mfma") - foreach(rmmatch ${INVALID_OPTIMIZATION_FLAGS}) - string(REGEX REPLACE ${rmmatch} "" _castxml_cc_flags "${_castxml_cc_flags}") - endforeach() - unset(INVALID_OPTIMIZATION_FLAGS) - - # Configure the internal Clang preprocessor and target platform to match that of the given compiler command. - separate_arguments(_castxml_cc_flags) - unset(_castxml_cc) - if(MSVC) - set(_castxml_cc --castxml-cc-msvc ( "${CMAKE_CXX_COMPILER}" ${_castxml_cc_flags}) -fexceptions) - if(MSVC90) - # needed for VS2008 64 bit - set(_castxml_cc ${_castxml_cc} "-D_HAS_TR1=0") - endif() - else() - set(_castxml_cc --castxml-cc-gnu ( "${CMAKE_CXX_COMPILER}" ${_castxml_cc_flags})) - endif() - - # Override castxml target platform when cross compiling - unset(_target) - if(CMAKE_CROSSCOMPILING) - if(NOT CMAKE_CXX_COMPILER_TARGET) - message(FATAL_ERROR "Set the target triple in CMAKE_CXX_COMPILER_TARGET " - " as described in https://clang.llvm.org/docs/CrossCompilation.html") - endif() - set(_target "--target=${CMAKE_CXX_COMPILER_TARGET}") - endif() - - unset(_build_env) - if(APPLE) - # If building on OS X, make sure that CastXML's calls to the compiler have the - # settings that the output files will be compiled with. This prevents headers - # from one version of OS X from being used when building for another version. - list(APPEND _build_env - env - "SDKROOT=${CMAKE_OSX_SYSROOT}" - "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}" - ) - endif() - ## ============================ - - # create the files used to pass the file to include to castxml - get_directory_property(include_dir_list INCLUDE_DIRECTORIES) - list(REMOVE_DUPLICATES include_dir_list) - - # CONFIG_CASTXML_INC_CONTENTS - variable used for building contents to write with configure_file() - unset(CONFIG_CASTXML_INC_CONTENTS) - foreach(dir ${include_dir_list}) - set(CONFIG_CASTXML_INC_CONTENTS "${CONFIG_CASTXML_INC_CONTENTS}\"-I${dir}\"\n") - endforeach() - unset(include_dir_list) - - set(CONFIG_CASTXML_INC_CONTENTS "${CONFIG_CASTXML_INC_CONTENTS}-Qunused-arguments\n") - set(CONFIG_CASTXML_INC_CONTENTS "${CONFIG_CASTXML_INC_CONTENTS}-DITK_WRAPPING_PARSER\n") - set(CONFIG_CASTXML_INC_CONTENTS "${CONFIG_CASTXML_INC_CONTENTS}-DITK_MANUAL_INSTANTIATION\n") - - # Get the compile_definitions of the module added with add_compile_definitions - # From the wrapping folder (current) - get_directory_property(compile_definition_list COMPILE_DEFINITIONS) - # And from the top module folder - set(module_folder "${WRAPPER_LIBRARY_SOURCE_DIR}/..") - get_directory_property(compile_definition_list_at_module - DIRECTORY "${module_folder}" - COMPILE_DEFINITIONS) - unset(module_folder) - # Merge and remove duplicates - list(APPEND compile_definition_list ${compile_definition_list_at_module}) - unset(compile_definition_list_at_module) - list(REMOVE_DUPLICATES compile_definition_list) - - foreach(def ${compile_definition_list}) - set(CONFIG_CASTXML_INC_CONTENTS "${CONFIG_CASTXML_INC_CONTENTS}\"-D${def}\"\n") - endforeach() - unset(compile_definition_list) - foreach(include_file ${WRAPPER_INCLUDE_FILES}) - if("${include_file}" MATCHES "<.*>") - string(APPEND CASTXML_INCLUDES "#include ${include_file}\n") - else() - string(APPEND CASTXML_INCLUDES "#include \"${include_file}\"\n") - endif() - endforeach() - - #Write compile definitions and include paths to file. @CONFIG_CASTXML_INC_CONTENTS@ expanded in configure_file - set(castxml_inc_file "${WRAPPER_LIBRARY_OUTPUT_DIR}/castxml_inputs/${library_name}.castxml.inc") - configure_file("${ITK_WRAP_CASTXML_SOURCE_DIR}/cast_xml.inc.in" "${castxml_inc_file}" @ONLY) - unset(CONFIG_CASTXML_INC_CONTENTS) - - # write the wrap_*.cxx file - # Create the cxx file which will be given to castxml. - set(cxx_file "${WRAPPER_LIBRARY_OUTPUT_DIR}/castxml_inputs/${_each_submodule_this_module}.cxx") - - # The wrap_.cxx.in file expands the following variables: - # @CASTXML_INCLUDES@, @WRAPPER_MODULE_NAME@, @CASTXML_TYPEDEFS@, @CASTXML_FORCE_INSTANTIATE@ - configure_file("${ITK_WRAP_CASTXML_SOURCE_DIR}/wrap_.cxx.in" "${cxx_file}" @ONLY) - unset(CASTXML_INCLUDES) - - # ====== Get list of include files that may trigger needing a re-write of castxml files - set(_include ${${WRAPPER_LIBRARY_NAME}_SOURCE_DIR}/include) - if(EXISTS ${_include}) - file(GLOB_RECURSE glob_hdrs ${_include}/*.h) + endforeach() + + #Write compile definitions and include paths to file. @CONFIG_CASTXML_INC_CONTENTS@ expanded in configure_file + set(castxml_inc_file "${WRAPPER_LIBRARY_OUTPUT_DIR}/castxml_inputs/${library_name}.castxml.inc") + configure_file("${ITK_WRAP_CASTXML_SOURCE_DIR}/cast_xml.inc.in" "${castxml_inc_file}" @ONLY) + unset(CONFIG_CASTXML_INC_CONTENTS) + + # write the wrap_*.cxx file + # Create the cxx file which will be given to castxml. + set(cxx_file "${WRAPPER_LIBRARY_OUTPUT_DIR}/castxml_inputs/${_each_submodule_this_module}.cxx") + + # The wrap_.cxx.in file expands the following variables: + # @CASTXML_INCLUDES@, @WRAPPER_MODULE_NAME@, @CASTXML_TYPEDEFS@, @CASTXML_FORCE_INSTANTIATE@ + configure_file("${ITK_WRAP_CASTXML_SOURCE_DIR}/wrap_.cxx.in" "${cxx_file}" @ONLY) + unset(CASTXML_INCLUDES) + + # ====== Get list of include files that may trigger needing a re-write of castxml files + set(_include ${${WRAPPER_LIBRARY_NAME}_SOURCE_DIR}/include) + if(EXISTS ${_include}) + file(GLOB_RECURSE glob_hdrs ${_include}/*.h) + endif() + foreach(header IN LISTS glob_hdrs) + get_filename_component(header_name ${header} NAME) + if(${header_name} IN_LIST WRAPPER_INCLUDE_FILES) + list(APPEND _hdrs ${header}) endif() - foreach(header IN LISTS glob_hdrs) - get_filename_component(header_name ${header} NAME) - if(${header_name} IN_LIST WRAPPER_INCLUDE_FILES) - list(APPEND _hdrs ${header}) - endif() - endforeach() - - # ===== Run the castxml command - add_custom_command( - OUTPUT ${xml_file} - COMMAND ${_build_env} ${_ccache_cmd} ${CASTXML_EXECUTABLE} - -o ${xml_file} - --castxml-gccxml - ${_target} - --castxml-start _wrapping_ - ${_castxml_cc} - -w - -c # needed for ccache to think we are not calling for link - @${castxml_inc_file} + endforeach() + + # ===== Run the castxml command + add_custom_command( + OUTPUT ${xml_file} + COMMAND + ${_build_env} ${_ccache_cmd} ${CASTXML_EXECUTABLE} -o ${xml_file} --castxml-gccxml ${_target} --castxml-start + _wrapping_ ${_castxml_cc} -w -c # needed for ccache to think we are not calling for link + @${castxml_inc_file} ${cxx_file} + VERBATIM + DEPENDS ${_castxml_depends} ${cxx_file} - VERBATIM - DEPENDS ${_castxml_depends} ${cxx_file} ${castxml_inc_file} ${_hdrs} - ) - unset(cxx_file) - unset(castxml_inc_file) - unset(_build_env) - unset(_target) - unset(_castxml_cc) - unset(_castxml_cc_flags) - unset(_ccache_cmd) - unset(_castxml_depends) + ${castxml_inc_file} + ${_hdrs}) + unset(cxx_file) + unset(castxml_inc_file) + unset(_build_env) + unset(_target) + unset(_castxml_cc) + unset(_castxml_cc_flags) + unset(_ccache_cmd) + unset(_castxml_depends) endfunction() function(test_lib_module_names_different) - # We run into some trouble if there's a module with the same name as the - # wrapper library. Fix this. - string(TOUPPER "${_each_submodule_this_module}" upper_module) - string(TOUPPER "${WRAPPER_LIBRARY_NAME}" upper_lib) - if("${upper_module}" STREQUAL "${upper_lib}") - message(FATAL_ERROR "The module ${_each_submodule_this_module} can't have the same name as its library. Note that the names are not case sensitive.") - endif() - unset(upper_lib) - unset(upper_module) - ## RETURN VALUES TO PARENT SCOPE - set(WRAPPER_INCLUDE_FILES "${WRAPPER_INCLUDE_FILES}" PARENT_SCOPE) + # We run into some trouble if there's a module with the same name as the + # wrapper library. Fix this. + string(TOUPPER "${_each_submodule_this_module}" upper_module) + string(TOUPPER "${WRAPPER_LIBRARY_NAME}" upper_lib) + if("${upper_module}" STREQUAL "${upper_lib}") + message( + FATAL_ERROR + "The module ${_each_submodule_this_module} can't have the same name as its library. Note that the names are not case sensitive." + ) + endif() + unset(upper_lib) + unset(upper_module) + ## RETURN VALUES TO PARENT SCOPE + set(WRAPPER_INCLUDE_FILES + "${WRAPPER_INCLUDE_FILES}" + PARENT_SCOPE) endfunction() - function(generate_swig_interface_in_file) - # Uses global variables WRAPPER_INCLUDE_FILES, SWIG_INTERFACE_TYPEDEFS - # store the content of the SwigInterface.h files - a set of #includes for that module - foreach(include_file ${WRAPPER_INCLUDE_FILES}) - list(APPEND _SWIG_INTERFACE_INCLUDES ${include_file}) + # Uses global variables WRAPPER_INCLUDE_FILES, SWIG_INTERFACE_TYPEDEFS + # store the content of the SwigInterface.h files - a set of #includes for that module + foreach(include_file ${WRAPPER_INCLUDE_FILES}) + list(APPEND _SWIG_INTERFACE_INCLUDES ${include_file}) + endforeach() + + if(_SWIG_INTERFACE_INCLUDES) + list(REMOVE_DUPLICATES _SWIG_INTERFACE_INCLUDES) + foreach(include_file ${_SWIG_INTERFACE_INCLUDES}) + if("${include_file}" MATCHES "<.*>") + string(APPEND SWIG_INTERFACE_INCLUDES_CONTENT "#include ${include_file}\n") + else() + string(APPEND SWIG_INTERFACE_INCLUDES_CONTENT "#include \"${include_file}\"\n") + endif() endforeach() + endif() - if(_SWIG_INTERFACE_INCLUDES) - list(REMOVE_DUPLICATES _SWIG_INTERFACE_INCLUDES) - foreach(include_file ${_SWIG_INTERFACE_INCLUDES}) - if("${include_file}" MATCHES "<.*>") - string(APPEND SWIG_INTERFACE_INCLUDES_CONTENT "#include ${include_file}\n") - else() - string(APPEND SWIG_INTERFACE_INCLUDES_CONTENT "#include \"${include_file}\"\n") - endif() - endforeach() - endif() - - # create the file which stores all of the includes - set(_includes_file "${WRAPPER_LIBRARY_OUTPUT_DIR}/castxml_inputs/${_each_submodule_this_module}SwigInterface.h.in") - # module.includes.in expands cmake variables: @SWIG_INTERFACE_INCLUDES_CONTENT@ #@SWIG_INTERFACE_TYPEDEFS@ - configure_file("${ITK_WRAP_SWIGINTERFACE_SOURCE_DIR}/module.includes.in" - ${_includes_file} - @ONLY) + # create the file which stores all of the includes + set(_includes_file "${WRAPPER_LIBRARY_OUTPUT_DIR}/castxml_inputs/${_each_submodule_this_module}SwigInterface.h.in") + # module.includes.in expands cmake variables: @SWIG_INTERFACE_INCLUDES_CONTENT@ #@SWIG_INTERFACE_TYPEDEFS@ + configure_file("${ITK_WRAP_SWIGINTERFACE_SOURCE_DIR}/module.includes.in" ${_includes_file} @ONLY) endfunction() - function(generate_wrap_doc) - set(_doxy2swig_config_file ${CMAKE_CURRENT_BINARY_DIR}/Doc/${_each_submodule_this_module}.conf) - configure_file("${ITK_WRAP_DOC_SOURCE_DIR}/itk_doxy2swig.conf.in" - "${_doxy2swig_config_file}" - @ONLY) - # run itk_doxy2swig - set(_itk_doxy2swig_py "${ITK_WRAP_DOC_SOURCE_DIR}/itk_doxy2swig.py") - add_custom_command( - OUTPUT ${swig_doc_interface_file} - COMMAND ${Python3_EXECUTABLE} ${_itk_doxy2swig_py} ${_doxy2swig_config_file} ${swig_doc_interface_file} - #DEPENDS ${ITK_WRAP_DOC_DOXYGEN_XML_FILES} ${_doxy2swig_config_file} ${_itk_doxy2swig_py} - DEPENDS ${WRAPPER_LIBRARY_NAME}Doxygen ${_doxy2swig_config_file} ${_itk_doxy2swig_py} - # COMMENT "-- Wrapping library ${_each_submodule_this_module}: Generating swig interface for inline documentation." - ) + set(_doxy2swig_config_file ${CMAKE_CURRENT_BINARY_DIR}/Doc/${_each_submodule_this_module}.conf) + configure_file("${ITK_WRAP_DOC_SOURCE_DIR}/itk_doxy2swig.conf.in" "${_doxy2swig_config_file}" @ONLY) + # run itk_doxy2swig + set(_itk_doxy2swig_py "${ITK_WRAP_DOC_SOURCE_DIR}/itk_doxy2swig.py") + add_custom_command( + OUTPUT ${swig_doc_interface_file} + COMMAND ${Python3_EXECUTABLE} ${_itk_doxy2swig_py} ${_doxy2swig_config_file} ${swig_doc_interface_file} + #DEPENDS ${ITK_WRAP_DOC_DOXYGEN_XML_FILES} ${_doxy2swig_config_file} ${_itk_doxy2swig_py} + DEPENDS ${WRAPPER_LIBRARY_NAME}Doxygen ${_doxy2swig_config_file} ${_itk_doxy2swig_py} + # COMMENT "-- Wrapping library ${_each_submodule_this_module}: Generating swig interface for inline documentation." + ) endfunction() - macro(itk_auto_load_submodules) - # Global vars used: WRAPPER_LIBRARY_NAME WRAPPER_DEFAULT_INCLUDE - # WRAPPER_LIBRARY_SOURCE_DIR WRAPPER_LIBRARY_OUTPUT_DIR - # WRAPPER_SUBMODULE_ORDER -- order specified for this submodule, unset after use in this module - # Global vars modified: WRAPPER_TYPEDEFS - # WRAPPER_INCLUDE_FILES -- - # WRAPPER_AUTO_INCLUDE_HEADERS - # SWIG_INTERFACE_MDX_CONTENT -- - - # Include the *.wrap files in WRAPPER_LIBRARY_SOURCE_DIR. This causes - # corresponding wrap_*.cxx files to be generated WRAPPER_LIBRARY_OUTPUT_DIR, - # and added to the WRAPPER_LIBRARY_SWIG_INPUTS list. - # In addition, this causes the other required wrap_*.cxx files for the entire - # library and each wrapper language to be created. - # This macro causes the language support files for the templates and - # library here defined to be created. - - # Now search for other *.wrap files to include - file(GLOB _wrap_cmake_files "${WRAPPER_LIBRARY_SOURCE_DIR}/*.wrap") - # sort the list of files so we are sure to always get the same order on all system - # and for all builds. That's important for several reasons: - # - the order is important for the order of creation of python template - # - the typemaps files are always the same, and the rebuild can be avoided - list(SORT _wrap_cmake_files) - set(THIS_MODULE_SUBMODULE_ORDER ${WRAPPER_SUBMODULE_ORDER}) - unset(WRAPPER_SUBMODULE_ORDER) - - foreach(_file ${_wrap_cmake_files}) - # get the module name from module.wrap - get_filename_component(_module_from_file "${_file}" NAME_WE) - # append found implied modules to end of proscribed ordering - list(APPEND THIS_MODULE_SUBMODULE_ORDER "${_module_from_file}") + # Global vars used: WRAPPER_LIBRARY_NAME WRAPPER_DEFAULT_INCLUDE + # WRAPPER_LIBRARY_SOURCE_DIR WRAPPER_LIBRARY_OUTPUT_DIR + # WRAPPER_SUBMODULE_ORDER -- order specified for this submodule, unset after use in this module + # Global vars modified: WRAPPER_TYPEDEFS + # WRAPPER_INCLUDE_FILES -- + # WRAPPER_AUTO_INCLUDE_HEADERS + # SWIG_INTERFACE_MDX_CONTENT -- + + # Include the *.wrap files in WRAPPER_LIBRARY_SOURCE_DIR. This causes + # corresponding wrap_*.cxx files to be generated WRAPPER_LIBRARY_OUTPUT_DIR, + # and added to the WRAPPER_LIBRARY_SWIG_INPUTS list. + # In addition, this causes the other required wrap_*.cxx files for the entire + # library and each wrapper language to be created. + # This macro causes the language support files for the templates and + # library here defined to be created. + + # Now search for other *.wrap files to include + file(GLOB _wrap_cmake_files "${WRAPPER_LIBRARY_SOURCE_DIR}/*.wrap") + # sort the list of files so we are sure to always get the same order on all system + # and for all builds. That's important for several reasons: + # - the order is important for the order of creation of python template + # - the typemaps files are always the same, and the rebuild can be avoided + list(SORT _wrap_cmake_files) + set(THIS_MODULE_SUBMODULE_ORDER ${WRAPPER_SUBMODULE_ORDER}) + unset(WRAPPER_SUBMODULE_ORDER) + + foreach(_file ${_wrap_cmake_files}) + # get the module name from module.wrap + get_filename_component(_module_from_file "${_file}" NAME_WE) + # append found implied modules to end of proscribed ordering + list(APPEND THIS_MODULE_SUBMODULE_ORDER "${_module_from_file}") + endforeach() + unset(_wrap_cmake_files) + unset(_file) + list(REMOVE_DUPLICATES THIS_MODULE_SUBMODULE_ORDER) + foreach(_each_submodule_this_module ${THIS_MODULE_SUBMODULE_ORDER}) + # include a cmake module file and generate the associated wrap_*.cxx file. + # This basically sets the global vars that will be added to or modified + # by the commands in the included *.wrap module. + message(STATUS "${WRAPPER_LIBRARY_NAME}: Creating ${_each_submodule_this_module} submodule.") + + test_lib_module_names_different() + + # call generator specific logic to set several associated global variables + # clear the typedefs and the includes + unset(CASTXML_TYPEDEFS) + unset(CASTXML_FORCE_INSTANTIATE) + + # typedefs for swig + unset(SWIG_INTERFACE_TYPEDEFS) + + unset(ITK_WRAP_DOC_DOXY2SWIG_INPUT) # the c++ name - swig names definitions + + # WRAPPER_INCLUDE_FILES: contains a list of all files to include in the final cxx file + unset(WRAPPER_INCLUDE_FILES) + + # Add WRAPPER_DEFAULT_INCLUDE to the list of files in WRAPPER_INCLUDE_FILES + # to be #included in the final cxx file + foreach(inc ${WRAPPER_DEFAULT_INCLUDE}) + # MODIFIES WRAPPER_INCLUDE_FILES + itk_wrap_include("${inc}") endforeach() - unset(_wrap_cmake_files) - unset(_file) - list(REMOVE_DUPLICATES THIS_MODULE_SUBMODULE_ORDER) - foreach(_each_submodule_this_module ${THIS_MODULE_SUBMODULE_ORDER}) - # include a cmake module file and generate the associated wrap_*.cxx file. - # This basically sets the global vars that will be added to or modified - # by the commands in the included *.wrap module. - message(STATUS "${WRAPPER_LIBRARY_NAME}: Creating ${_each_submodule_this_module} submodule.") - - test_lib_module_names_different() - - # call generator specific logic to set several associated global variables - # clear the typedefs and the includes - unset(CASTXML_TYPEDEFS) - unset(CASTXML_FORCE_INSTANTIATE) - - # typedefs for swig - unset(SWIG_INTERFACE_TYPEDEFS) - - unset(ITK_WRAP_DOC_DOXY2SWIG_INPUT) # the c++ name - swig names definitions - - - # WRAPPER_INCLUDE_FILES: contains a list of all files to include in the final cxx file - unset(WRAPPER_INCLUDE_FILES) - - # Add WRAPPER_DEFAULT_INCLUDE to the list of files in WRAPPER_INCLUDE_FILES - # to be #included in the final cxx file - foreach(inc ${WRAPPER_DEFAULT_INCLUDE}) - # MODIFIES WRAPPER_INCLUDE_FILES - itk_wrap_include("${inc}") - endforeach() - - #MODIFIES ITK_WRAP_PYTHON_SWIG_EXT ITK_WRAP_PYTHON_LIBRARY_IMPORTS - itk_wrap_submodule_python("${_each_submodule_this_module}" "${WRAPPER_LIBRARY_NAME}") - - dump_cmake_variables("prelogger_${_each_submodule_this_module}" "${_each_submodule_this_module}") - # Indicates that the appropriate itk header for this class will be automatically included - # in later stages of the wrapping process - set(WRAPPER_AUTO_INCLUDE_HEADERS ON) - - # Now include the .wrap file, and read manually requested types needed - # to build lists of items to be wrapped for both CASTXML and SWIG - if(EXISTS "${WRAPPER_LIBRARY_SOURCE_DIR}/${_each_submodule_this_module}.wrap") - include("${WRAPPER_LIBRARY_SOURCE_DIR}/${_each_submodule_this_module}.wrap") - else() - # for backward compatibility, to be removed in ITKv6 - if(EXISTS "${WRAPPER_LIBRARY_SOURCE_DIR}/wrap_${_each_submodule_this_module}.cmake") - message(FATAL_ERROR "INCORRECT FILE NAME PATTERN: ${WRAPPER_LIBRARY_SOURCE_DIR}/wrap_${_each_submodule_this_module}.cmake should be named ${WRAPPER_LIBRARY_SOURCE_DIR}/${_each_submodule_this_module}.cmake") - endif() - message(SEND_ERROR "Module ${WRAPPER_LIBRARY_SOURCE_DIR}/${_each_submodule_this_module}.wrap not found.") - endif() - - dump_cmake_variables("postlogger_${_each_submodule_this_module}" "${_each_submodule_this_module}") - write_changed_cmake_variables_to_file("${WRAPPER_LIBRARY_OUTPUT_DIR}/diff_${_each_submodule_this_module}.diff" "${prelogger_${_each_submodule_this_module}}" "${postlogger_${_each_submodule_this_module}}" "${_each_submodule_this_module}") - - # ======== RUN COMMANDS FOR GENERATING XML AST information - # write the module.xml file using castxml the xml file to be generated - set(xml_file "${WRAPPER_LIBRARY_OUTPUT_DIR}/castxml_inputs/${_each_submodule_this_module}.xml") - ## @CASTXML_INCLUDES@, @WRAPPER_MODULE_NAME@, @CASTXML_TYPEDEFS@, @CASTXML_FORCE_INSTANTIATE@ - generate_castxml_commandline_flags() - list(APPEND CastXML_OUTPUT_FILES ${xml_file}) - unset(xml_file) - - # store the path of the idx file to store it in the mdx file - string(APPEND SWIG_INTERFACE_MDX_CONTENT "${_each_submodule_this_module}.idx\n") - string(APPEND SWIG_INTERFACE_MODULE_CONTENT "%import ${_each_submodule_this_module}.i\n") - generate_swig_interface_in_file() - - itk_end_wrap_submodule_python("${_each_submodule_this_module}") - if(${module_prefix}_WRAP_DOC) - set(swig_doc_interface_file ${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${_each_submodule_this_module}_doc.i) - generate_wrap_doc() - list(APPEND ITK_WRAP_DOC_DOCSTRING_FILES ${swig_doc_interface_file}) - unset(swig_doc_interface_file) - endif() - endforeach() - unset(_each_submodule_this_module) + #MODIFIES ITK_WRAP_PYTHON_SWIG_EXT ITK_WRAP_PYTHON_LIBRARY_IMPORTS + itk_wrap_submodule_python("${_each_submodule_this_module}" "${WRAPPER_LIBRARY_NAME}") + + dump_cmake_variables("prelogger_${_each_submodule_this_module}" "${_each_submodule_this_module}") + # Indicates that the appropriate itk header for this class will be automatically included + # in later stages of the wrapping process + set(WRAPPER_AUTO_INCLUDE_HEADERS ON) + + # Now include the .wrap file, and read manually requested types needed + # to build lists of items to be wrapped for both CASTXML and SWIG + if(EXISTS "${WRAPPER_LIBRARY_SOURCE_DIR}/${_each_submodule_this_module}.wrap") + include("${WRAPPER_LIBRARY_SOURCE_DIR}/${_each_submodule_this_module}.wrap") + else() + # for backward compatibility, to be removed in ITKv6 + if(EXISTS "${WRAPPER_LIBRARY_SOURCE_DIR}/wrap_${_each_submodule_this_module}.cmake") + message( + FATAL_ERROR + "INCORRECT FILE NAME PATTERN: ${WRAPPER_LIBRARY_SOURCE_DIR}/wrap_${_each_submodule_this_module}.cmake should be named ${WRAPPER_LIBRARY_SOURCE_DIR}/${_each_submodule_this_module}.cmake" + ) + endif() + message(SEND_ERROR "Module ${WRAPPER_LIBRARY_SOURCE_DIR}/${_each_submodule_this_module}.wrap not found.") + endif() + + dump_cmake_variables("postlogger_${_each_submodule_this_module}" "${_each_submodule_this_module}") + write_changed_cmake_variables_to_file( + "${WRAPPER_LIBRARY_OUTPUT_DIR}/diff_${_each_submodule_this_module}.diff" + "${prelogger_${_each_submodule_this_module}}" + "${postlogger_${_each_submodule_this_module}}" + "${_each_submodule_this_module}") + + # ======== RUN COMMANDS FOR GENERATING XML AST information + # write the module.xml file using castxml the xml file to be generated + set(xml_file "${WRAPPER_LIBRARY_OUTPUT_DIR}/castxml_inputs/${_each_submodule_this_module}.xml") + ## @CASTXML_INCLUDES@, @WRAPPER_MODULE_NAME@, @CASTXML_TYPEDEFS@, @CASTXML_FORCE_INSTANTIATE@ + generate_castxml_commandline_flags() + list(APPEND CastXML_OUTPUT_FILES ${xml_file}) + unset(xml_file) + + # store the path of the idx file to store it in the mdx file + string(APPEND SWIG_INTERFACE_MDX_CONTENT "${_each_submodule_this_module}.idx\n") + string(APPEND SWIG_INTERFACE_MODULE_CONTENT "%import ${_each_submodule_this_module}.i\n") + generate_swig_interface_in_file() + + itk_end_wrap_submodule_python("${_each_submodule_this_module}") + if(${module_prefix}_WRAP_DOC) + set(swig_doc_interface_file ${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${_each_submodule_this_module}_doc.i) + generate_wrap_doc() + list(APPEND ITK_WRAP_DOC_DOCSTRING_FILES ${swig_doc_interface_file}) + unset(swig_doc_interface_file) + endif() + + endforeach() + unset(_each_submodule_this_module) endmacro() diff --git a/Wrapping/macro_files/itk_end_wrap_module.cmake b/Wrapping/macro_files/itk_end_wrap_module.cmake index b754771cbbd..bfa2f98840b 100644 --- a/Wrapping/macro_files/itk_end_wrap_module.cmake +++ b/Wrapping/macro_files/itk_end_wrap_module.cmake @@ -1,275 +1,292 @@ macro(itk_end_wrap_module) - ######## The code that follows was previously encapsulated in the itk_end_wrap_module - # INPUTS: - # ${WRAPPER_LIBRARY_NAME} - # ${module_prefix} - # ${WRAPPER_LIBRARY_NAME}CastXML - # ${CastXML_OUTPUT_FILES} - # ${WRAPPER_LIBRARY_SWIG_INPUTS} - # ${WRAPPER_MASTER_INDEX_OUTPUT_DIR} - # ${WRAPPER_SWIG_LIBRARY_FILES} - # ${module_prefix}_WRAP_PYTHON - # ${THIS_MODULE_SUBMODULE_ORDER} - - if(NOT TARGET ${WRAPPER_LIBRARY_NAME}CastXML) - add_custom_target(${WRAPPER_LIBRARY_NAME}CastXML DEPENDS ${CastXML_OUTPUT_FILES}) - set(${WRAPPER_LIBRARY_NAME}XmlFiles ${CastXML_OUTPUT_FILES} CACHE INTERNAL "Internal ${WRAPPER_LIBRARY_NAME}Xml file list.") - endif() - - # Loop over the extra swig input files and copy them to the Typedefs directory - foreach(source ${WRAPPER_LIBRARY_SWIG_INPUTS}) - file(COPY "${source}" - DESTINATION "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}") - endforeach() - unset(basename) - - # prepare dependencies - foreach(_dep ${WRAPPER_LIBRARY_DEPENDS}) - string(PREPEND SWIG_INTERFACE_MDX_CONTENT "${_dep}.mdx\n") - endforeach() - unset(_dep) - - # add some libs required by this module - foreach(swig_lib ${WRAPPER_SWIG_LIBRARY_FILES}) - get_filename_component(basename ${swig_lib} NAME) - list(APPEND swig_libs --swig-include ${basename}) - file(COPY "${swig_lib}" - DESTINATION "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}") - endforeach() - unset(basename) - unset(swig_lib) - - # the list of files generated for the module - unset(i_files) - - unset(idx_files) - unset(typedef_in_files) - unset(typedef_files) - set(mdx_file "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${WRAPPER_LIBRARY_NAME}.mdx") - set(module_interface_file "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${WRAPPER_LIBRARY_NAME}.i") - + ######## The code that follows was previously encapsulated in the itk_end_wrap_module + # INPUTS: + # ${WRAPPER_LIBRARY_NAME} + # ${module_prefix} + # ${WRAPPER_LIBRARY_NAME}CastXML + # ${CastXML_OUTPUT_FILES} + # ${WRAPPER_LIBRARY_SWIG_INPUTS} + # ${WRAPPER_MASTER_INDEX_OUTPUT_DIR} + # ${WRAPPER_SWIG_LIBRARY_FILES} + # ${module_prefix}_WRAP_PYTHON + # ${THIS_MODULE_SUBMODULE_ORDER} + + if(NOT TARGET ${WRAPPER_LIBRARY_NAME}CastXML) + add_custom_target(${WRAPPER_LIBRARY_NAME}CastXML DEPENDS ${CastXML_OUTPUT_FILES}) + set(${WRAPPER_LIBRARY_NAME}XmlFiles + ${CastXML_OUTPUT_FILES} + CACHE INTERNAL "Internal ${WRAPPER_LIBRARY_NAME}Xml file list.") + endif() + + # Loop over the extra swig input files and copy them to the Typedefs directory + foreach(source ${WRAPPER_LIBRARY_SWIG_INPUTS}) + file(COPY "${source}" DESTINATION "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}") + endforeach() + unset(basename) + + # prepare dependencies + foreach(_dep ${WRAPPER_LIBRARY_DEPENDS}) + string(PREPEND SWIG_INTERFACE_MDX_CONTENT "${_dep}.mdx\n") + endforeach() + unset(_dep) + + # add some libs required by this module + foreach(swig_lib ${WRAPPER_SWIG_LIBRARY_FILES}) + get_filename_component(basename ${swig_lib} NAME) + list( + APPEND + swig_libs + --swig-include + ${basename}) + file(COPY "${swig_lib}" DESTINATION "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}") + endforeach() + unset(basename) + unset(swig_lib) + + # the list of files generated for the module + unset(i_files) + + unset(idx_files) + unset(typedef_in_files) + unset(typedef_files) + set(mdx_file "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${WRAPPER_LIBRARY_NAME}.mdx") + set(module_interface_file "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${WRAPPER_LIBRARY_NAME}.i") + + # ITK_PYI_INDEX_FILES: A list of the index files generated for a specific submodule + # Used to generate a complete list of index files generated which should be used as a + # dependency in the final pyi_generator step. + unset(ITK_PYI_INDEX_FILES) + unset(${WRAPPER_LIBRARY_NAME}PyiIdxFiles CACHE) + + foreach(_module ${THIS_MODULE_SUBMODULE_ORDER}) + # create the swig interface + list(APPEND typedef_in_files "${WRAPPER_LIBRARY_OUTPUT_DIR}/castxml_inputs/${_module}SwigInterface.h.in") + list(APPEND i_files "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${_module}.i") + list(APPEND idx_files "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${_module}.idx") + list(APPEND typedef_files "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${_module}SwigInterface.h") # ITK_PYI_INDEX_FILES: A list of the index files generated for a specific submodule # Used to generate a complete list of index files generated which should be used as a - # dependency in the final pyi_generator step. - unset(ITK_PYI_INDEX_FILES) - unset(${WRAPPER_LIBRARY_NAME}PyiIdxFiles CACHE) - - foreach(_module ${THIS_MODULE_SUBMODULE_ORDER}) - # create the swig interface - list(APPEND typedef_in_files "${WRAPPER_LIBRARY_OUTPUT_DIR}/castxml_inputs/${_module}SwigInterface.h.in") - list(APPEND i_files "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${_module}.i") - list(APPEND idx_files "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${_module}.idx") - list(APPEND typedef_files "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${_module}SwigInterface.h") - - # ITK_PYI_INDEX_FILES: A list of the index files generated for a specific submodule - # Used to generate a complete list of index files generated which should be used as a - # dependency in the final pyi_generator step. (duplicate comment from above) - if(_module STREQUAL "stdcomplex" OR _module STREQUAL "stdnumeric_limits") - # Skip classes that require specialized wrapping behavior, see igenerator.py comments - # for ["stdcomplex", "stdnumeric_limits"] - else() - set(THIS_MODULE_PYI_INDEX_FILE "${ITK_PKL_DIR}/${_module}.index.txt") - list(APPEND ITK_PYI_INDEX_FILES "${THIS_MODULE_PYI_INDEX_FILE}") - unset(THIS_MODULE_PYI_INDEX_FILE) - endif() - endforeach() - - # the master idx file (mdx file) - unset(mdx_files) - unset(mdx_opts) - unset(deps_imports) - - list(APPEND mdx_files "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${WRAPPER_LIBRARY_NAME}.mdx") - foreach(dep ${WRAPPER_LIBRARY_DEPENDS}) - list(APPEND mdx_files "${WRAP_ITK_TYPEDEFS_DIRECTORY}/${dep}.mdx") - list(APPEND deps_imports "%import ${dep}.i\n") - endforeach() - - foreach(mdx_file ${mdx_files}) - list(APPEND mdx_opts --mdx ${mdx_file}) - endforeach() - - set(CONFIG_INDEX_FILE_CONTENT "${SWIG_INTERFACE_MDX_CONTENT}") - # ONLY 1 variable @CONFIG_INDEX_FILE_CONTENT@" - configure_file("${ITK_WRAP_SWIGINTERFACE_SOURCE_DIR}/Master.mdx.in" "${mdx_file}" @ONLY) - unset(CONFIG_INDEX_FILE_CONTENT) - - unset(CONFIG_MODULE_INTERFACE_CONTENT) #"${deps_imports}${SWIG_INTERFACE_MODULE_CONTENT}") - #@WRAPPER_LIBRARY_NAME@ @CONFIG_MODULE_INTERFACE_INCLUDES@ CONFIG_MODULE_INTERFACE_INCLUDES@ - configure_file("${ITK_WRAP_SWIGINTERFACE_SOURCE_DIR}/module.i.in" "${module_interface_file}" - @ONLY) - unset(deps_imports) - unset(module_interface_file) - - set(WRAPPING_CONFIG_WORKING_DIR "${ITK_DIR}/Wrapping/WorkingDirectory") - list(LENGTH i_files number_interface_files) - if(number_interface_files GREATER 0) - - FILE(MAKE_DIRECTORY "${WRAPPING_CONFIG_WORKING_DIR}") - - # NOTE: snake_case_config_file is both an input and an output to this command. - # the ${IGENERATOR} script appends to this file. - # NOTE: The Configuration files should be placed in the itk package directory. - set(ITK_WRAP_PYTHON_SNAKE_CONFIG_DIR - "${WRAPPER_LIBRARY_OUTPUT_DIR}/Generators/Python/itk/Configuration" - ) - set(snake_case_config_file - "${ITK_WRAP_PYTHON_SNAKE_CONFIG_DIR}/${WRAPPER_LIBRARY_NAME}_snake_case.py") - unset(ITK_WRAP_PYTHON_SNAKE_CONFIG_DIR) - - # Set up outputs and byproducts for custom command - set(igenerator_outputs "") - set(igenerator_byproducts "") - - list(APPEND igenerator_outputs "${i_files}") # Typedefs/.i - list(APPEND igenerator_outputs "${typedef_files}") # Typedefs/SwigInterface.h - list(APPEND igenerator_outputs "${idx_files}") # Typedefs/.idx - list(APPEND igenerator_outputs "${snake_case_config_file}") # Generators/Python/itk/Configuration/_snake_case.py - if(CMAKE_GENERATOR STREQUAL "Ninja") - # Ninja generator requires byproduct for correct dependency handling - # See https://cmake.org/cmake/help/latest/policy/CMP0058.html - list(APPEND igenerator_byproducts "${ITK_PYI_INDEX_FILES}") # Generators/Python/itk-pkl/.index.txt - else() - list(APPEND igenerator_outputs "${ITK_PYI_INDEX_FILES}") # Generators/Python/itk-pkl/.index.txt - endif() - - # Generate custom wrapping files via igenerator.py - add_custom_command( - OUTPUT ${igenerator_outputs} - BYPRODUCTS ${igenerator_byproducts} - COMMAND ${Python3_EXECUTABLE} ${IGENERATOR} - ${mdx_opts} - ${swig_libs} - -w1 -w3 -w51 -w52 -w53 -w54 - -A protected -A private - -p ${PYGCCXML_DIR} - -g ${CASTXML_EXECUTABLE} - --snake-case-file "${snake_case_config_file}" - --interface-output-dir "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}" - --library-output-dir "${WRAPPER_LIBRARY_OUTPUT_DIR}" - --submodule-order "${THIS_MODULE_SUBMODULE_ORDER}" - --pyi_index_list "${ITK_PYI_INDEX_FILES}" - --pyi_dir "${ITK_STUB_DIR}" - --pkl_dir "${ITK_PKL_DIR}" - DEPENDS ${IGENERATOR} - ${ITK_WRAP_DOC_DOCSTRING_FILES} - ${CastXML_OUTPUT_FILES} - ${typedef_in_files} - ${mdx_files} - ${WRAPPER_SWIG_LIBRARY_FILES} - WORKING_DIRECTORY "${WRAPPING_CONFIG_WORKING_DIR}" # Arguments to WORKING_DIRECTORY may use generator expressions - COMMENT "Run igenerator.py for ${WRAPPER_LIBRARY_NAME}" - VERBATIM - ) - - unset(snake_case_config_file) + # dependency in the final pyi_generator step. (duplicate comment from above) + if(_module STREQUAL "stdcomplex" OR _module STREQUAL "stdnumeric_limits") + # Skip classes that require specialized wrapping behavior, see igenerator.py comments + # for ["stdcomplex", "stdnumeric_limits"] else() - #message(FATAL_ERROR "Number of interface files is 0 :${WRAPPER_LIBRARY_NAME}:") - message(STATUS "Number of interface files is 0 :${WRAPPER_LIBRARY_NAME}:") - endif() - unset(number_interface_files) - unset(WRAPPING_CONFIG_WORKING_DIR) - unset(typedef_in_files) - unset(swig_libs) - unset(mdx_opts) - unset(igenerator_byproducts) - unset(igenerator_outputs) - - # the ${WRAPPER_LIBRARY_NAME}Swig target will run igenerator.py if files do not already exist - if(NOT TARGET ${WRAPPER_LIBRARY_NAME}Swig) - add_custom_target(${WRAPPER_LIBRARY_NAME}Swig DEPENDS ${mdx_file} ${i_files} ${typedef_files} ${idx_files}) - add_dependencies(${WRAPPER_LIBRARY_NAME}Swig ${WRAPPER_LIBRARY_NAME}CastXML) - endif() - unset(typedef_files) - unset(mdx_file) - unset(i_files) - - if(NOT EXTERNAL_WRAP_ITK_PROJECT) - # don't depend on the targets from wrapitk in external projects - foreach(dep ${WRAPPER_LIBRARY_DEPENDS}) - add_dependencies(${WRAPPER_LIBRARY_NAME}Swig ${dep}Swig) - endforeach() + set(THIS_MODULE_PYI_INDEX_FILE "${ITK_PKL_DIR}/${_module}.index.txt") + list(APPEND ITK_PYI_INDEX_FILES "${THIS_MODULE_PYI_INDEX_FILE}") + unset(THIS_MODULE_PYI_INDEX_FILE) endif() - unset(ITK_STUB_PYI_FILES) - - list(APPEND GLOBAL_IdxFilesList ${ITK_PYI_INDEX_FILES}) - list(REMOVE_DUPLICATES GLOBAL_IdxFilesList) - - set(GLOBAL_IdxFilesList ${GLOBAL_IdxFilesList} CACHE INTERNAL "Master list of all idx files") - set(${WRAPPER_LIBRARY_NAME}PyiIdxFiles ${ITK_PYI_INDEX_FILES} CACHE INTERNAL "Internal ${WRAPPER_LIBRARY_NAME} .index.txt file list") - set(${WRAPPER_LIBRARY_NAME}IdxFiles ${idx_files} CACHE INTERNAL "Internal ${WRAPPER_LIBRARY_NAME}Idx file list.") - set(${WRAPPER_LIBRARY_NAME}SwigFiles ${i_files} CACHE INTERNAL "Internal ${WRAPPER_LIBRARY_NAME}Swig file list.") - - unset(idx_files) - unset(ITK_PYI_INDEX_FILES) - - # Loop over the extra swig input files and add them to the generated files - # lists. Guess that the generated cxx output will have the same name as - # the .i input file. - set(ITK_WRAP_PYTHON_PROCESS_SWIG_INPUTS ON) - foreach(source ${WRAPPER_LIBRARY_SWIG_INPUTS}) - get_filename_component(base_name ${source} NAME_WE) - itk_wrap_submodule_python("${base_name}" "${WRAPPER_LIBRARY_NAME}") - itk_end_wrap_submodule_python("${base_name}") - endforeach() - set(ITK_WRAP_PYTHON_PROCESS_SWIG_INPUTS OFF) - - # create the python config file - # this file store all the name - type association and a dependencies list for the modules - # - # first build the dependency list - set(ITK_WRAP_PYTHON_CONFIGURATION_DEPENDS "") - - foreach(dep ${WRAPPER_LIBRARY_DEPENDS}) - string(PREPEND ITK_WRAP_PYTHON_CONFIGURATION_DEPENDS "'${dep}', ") - string(PREPEND ITK_WRAP_PYTHON_LIBRARY_IMPORTS "import itk.${dep}Python\n") - endforeach() - - # ITKPyBase is always included, excepted ITKPyBase itself - if(NOT "${WRAPPER_LIBRARY_NAME}" STREQUAL "ITKPyBase") - string(PREPEND ITK_WRAP_PYTHON_CONFIGURATION_DEPENDS "'ITKPyBase', ") - string(PREPEND ITK_WRAP_PYTHON_LIBRARY_IMPORTS "import itk.ITKPyBasePython\n") - set(ITK_WRAP_PYTHON_SNAKE_CASE "${ITK_WRAP_PYTHON_ROOT_BINARY_DIR}/itk/Configuration/${WRAPPER_LIBRARY_NAME}_snake_case.py") + endforeach() + + # the master idx file (mdx file) + unset(mdx_files) + unset(mdx_opts) + unset(deps_imports) + + list(APPEND mdx_files "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${WRAPPER_LIBRARY_NAME}.mdx") + foreach(dep ${WRAPPER_LIBRARY_DEPENDS}) + list(APPEND mdx_files "${WRAP_ITK_TYPEDEFS_DIRECTORY}/${dep}.mdx") + list(APPEND deps_imports "%import ${dep}.i\n") + endforeach() + + foreach(mdx_file ${mdx_files}) + list( + APPEND + mdx_opts + --mdx + ${mdx_file}) + endforeach() + + set(CONFIG_INDEX_FILE_CONTENT "${SWIG_INTERFACE_MDX_CONTENT}") + # ONLY 1 variable @CONFIG_INDEX_FILE_CONTENT@" + configure_file("${ITK_WRAP_SWIGINTERFACE_SOURCE_DIR}/Master.mdx.in" "${mdx_file}" @ONLY) + unset(CONFIG_INDEX_FILE_CONTENT) + + unset(CONFIG_MODULE_INTERFACE_CONTENT) #"${deps_imports}${SWIG_INTERFACE_MODULE_CONTENT}") + #@WRAPPER_LIBRARY_NAME@ @CONFIG_MODULE_INTERFACE_INCLUDES@ CONFIG_MODULE_INTERFACE_INCLUDES@ + configure_file("${ITK_WRAP_SWIGINTERFACE_SOURCE_DIR}/module.i.in" "${module_interface_file}" @ONLY) + unset(deps_imports) + unset(module_interface_file) + + set(WRAPPING_CONFIG_WORKING_DIR "${ITK_DIR}/Wrapping/WorkingDirectory") + list(LENGTH i_files number_interface_files) + if(number_interface_files GREATER 0) + + file(MAKE_DIRECTORY "${WRAPPING_CONFIG_WORKING_DIR}") + + # NOTE: snake_case_config_file is both an input and an output to this command. + # the ${IGENERATOR} script appends to this file. + # NOTE: The Configuration files should be placed in the itk package directory. + set(ITK_WRAP_PYTHON_SNAKE_CONFIG_DIR "${WRAPPER_LIBRARY_OUTPUT_DIR}/Generators/Python/itk/Configuration") + set(snake_case_config_file "${ITK_WRAP_PYTHON_SNAKE_CONFIG_DIR}/${WRAPPER_LIBRARY_NAME}_snake_case.py") + unset(ITK_WRAP_PYTHON_SNAKE_CONFIG_DIR) + + # Set up outputs and byproducts for custom command + set(igenerator_outputs "") + set(igenerator_byproducts "") + + list(APPEND igenerator_outputs "${i_files}") # Typedefs/.i + list(APPEND igenerator_outputs "${typedef_files}") # Typedefs/SwigInterface.h + list(APPEND igenerator_outputs "${idx_files}") # Typedefs/.idx + list(APPEND igenerator_outputs "${snake_case_config_file}" + )# Generators/Python/itk/Configuration/_snake_case.py + if(CMAKE_GENERATOR STREQUAL "Ninja") + # Ninja generator requires byproduct for correct dependency handling + # See https://cmake.org/cmake/help/latest/policy/CMP0058.html + list(APPEND igenerator_byproducts "${ITK_PYI_INDEX_FILES}") # Generators/Python/itk-pkl/.index.txt else() - unset(ITK_WRAP_PYTHON_SNAKE_CASE) + list(APPEND igenerator_outputs "${ITK_PYI_INDEX_FILES}") # Generators/Python/itk-pkl/.index.txt endif() - set(ITK_WRAP_PYTHON_LIBRARY_CONFIG_FILE "${ITK_WRAP_PYTHON_ROOT_BINARY_DIR}/itk/Configuration/${WRAPPER_LIBRARY_NAME}Config.py") - # Pass module factory names into module configuration - set(ITK_WRAP_PYTHON_CONFIGURATION_FACTORIES) - foreach(factory IN LISTS ITK_MODULE_${WRAPPER_LIBRARY_NAME}_FACTORY_NAMES) - string(REPLACE "::" "\",\"" factory_list ${factory}) - string(APPEND ITK_WRAP_PYTHON_CONFIGURATION_FACTORIES "(\"${factory_list}\"),") + # Generate custom wrapping files via igenerator.py + add_custom_command( + OUTPUT ${igenerator_outputs} + BYPRODUCTS ${igenerator_byproducts} + COMMAND + ${Python3_EXECUTABLE} ${IGENERATOR} ${mdx_opts} ${swig_libs} -w1 -w3 -w51 -w52 -w53 -w54 -A protected -A private + -p ${PYGCCXML_DIR} -g ${CASTXML_EXECUTABLE} --snake-case-file "${snake_case_config_file}" --interface-output-dir + "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}" --library-output-dir "${WRAPPER_LIBRARY_OUTPUT_DIR}" --submodule-order + "${THIS_MODULE_SUBMODULE_ORDER}" --pyi_index_list "${ITK_PYI_INDEX_FILES}" --pyi_dir "${ITK_STUB_DIR}" --pkl_dir + "${ITK_PKL_DIR}" + DEPENDS ${IGENERATOR} + ${ITK_WRAP_DOC_DOCSTRING_FILES} + ${CastXML_OUTPUT_FILES} + ${typedef_in_files} + ${mdx_files} + ${WRAPPER_SWIG_LIBRARY_FILES} + WORKING_DIRECTORY "${WRAPPING_CONFIG_WORKING_DIR}" # Arguments to WORKING_DIRECTORY may use generator expressions + COMMENT "Run igenerator.py for ${WRAPPER_LIBRARY_NAME}" + VERBATIM) + + unset(snake_case_config_file) + else() + #message(FATAL_ERROR "Number of interface files is 0 :${WRAPPER_LIBRARY_NAME}:") + message(STATUS "Number of interface files is 0 :${WRAPPER_LIBRARY_NAME}:") + endif() + unset(number_interface_files) + unset(WRAPPING_CONFIG_WORKING_DIR) + unset(typedef_in_files) + unset(swig_libs) + unset(mdx_opts) + unset(igenerator_byproducts) + unset(igenerator_outputs) + + # the ${WRAPPER_LIBRARY_NAME}Swig target will run igenerator.py if files do not already exist + if(NOT TARGET ${WRAPPER_LIBRARY_NAME}Swig) + add_custom_target( + ${WRAPPER_LIBRARY_NAME}Swig + DEPENDS ${mdx_file} + ${i_files} + ${typedef_files} + ${idx_files}) + add_dependencies(${WRAPPER_LIBRARY_NAME}Swig ${WRAPPER_LIBRARY_NAME}CastXML) + endif() + unset(typedef_files) + unset(mdx_file) + unset(i_files) + + if(NOT EXTERNAL_WRAP_ITK_PROJECT) + # don't depend on the targets from wrapitk in external projects + foreach(dep ${WRAPPER_LIBRARY_DEPENDS}) + add_dependencies(${WRAPPER_LIBRARY_NAME}Swig ${dep}Swig) endforeach() - - # and create the file, with the var ITK_WRAP_PYTHON_CONFIGURATION_TEMPLATES and - # ITK_WRAP_PYTHON_CONFIGURATION_DEPENDS created earlier - configure_file("${ITK_WRAP_PYTHON_SOURCE_DIR}/itk/support/ModuleConfig.py.in" - "${ITK_WRAP_PYTHON_LIBRARY_CONFIG_FILE}" - @ONLY) - unset(ITK_WRAP_PYTHON_CONFIGURATION_DEPENDS) - unset(ITK_WRAP_PYTHON_CONFIGURATION_TEMPLATES) - - WRAP_ITK_PYTHON_BINDINGS_INSTALL(/itk/Configuration - "${WRAPPER_LIBRARY_NAME}" - "${ITK_WRAP_PYTHON_LIBRARY_CONFIG_FILE}" - "${ITK_WRAP_PYTHON_SNAKE_CASE}" - ) - unset(ITK_WRAP_PYTHON_LIBRARY_CONFIG_FILE) + endif() + unset(ITK_STUB_PYI_FILES) + + list(APPEND GLOBAL_IdxFilesList ${ITK_PYI_INDEX_FILES}) + list(REMOVE_DUPLICATES GLOBAL_IdxFilesList) + + set(GLOBAL_IdxFilesList + ${GLOBAL_IdxFilesList} + CACHE INTERNAL "Master list of all idx files") + set(${WRAPPER_LIBRARY_NAME}PyiIdxFiles + ${ITK_PYI_INDEX_FILES} + CACHE INTERNAL "Internal ${WRAPPER_LIBRARY_NAME} .index.txt file list") + set(${WRAPPER_LIBRARY_NAME}IdxFiles + ${idx_files} + CACHE INTERNAL "Internal ${WRAPPER_LIBRARY_NAME}Idx file list.") + set(${WRAPPER_LIBRARY_NAME}SwigFiles + ${i_files} + CACHE INTERNAL "Internal ${WRAPPER_LIBRARY_NAME}Swig file list.") + + unset(idx_files) + unset(ITK_PYI_INDEX_FILES) + + # Loop over the extra swig input files and add them to the generated files + # lists. Guess that the generated cxx output will have the same name as + # the .i input file. + set(ITK_WRAP_PYTHON_PROCESS_SWIG_INPUTS ON) + foreach(source ${WRAPPER_LIBRARY_SWIG_INPUTS}) + get_filename_component(base_name ${source} NAME_WE) + itk_wrap_submodule_python("${base_name}" "${WRAPPER_LIBRARY_NAME}") + itk_end_wrap_submodule_python("${base_name}") + endforeach() + set(ITK_WRAP_PYTHON_PROCESS_SWIG_INPUTS OFF) + + # create the python config file + # this file store all the name - type association and a dependencies list for the modules + # + # first build the dependency list + set(ITK_WRAP_PYTHON_CONFIGURATION_DEPENDS "") + + foreach(dep ${WRAPPER_LIBRARY_DEPENDS}) + string(PREPEND ITK_WRAP_PYTHON_CONFIGURATION_DEPENDS "'${dep}', ") + string(PREPEND ITK_WRAP_PYTHON_LIBRARY_IMPORTS "import itk.${dep}Python\n") + endforeach() + + # ITKPyBase is always included, excepted ITKPyBase itself + if(NOT + "${WRAPPER_LIBRARY_NAME}" + STREQUAL + "ITKPyBase") + string(PREPEND ITK_WRAP_PYTHON_CONFIGURATION_DEPENDS "'ITKPyBase', ") + string(PREPEND ITK_WRAP_PYTHON_LIBRARY_IMPORTS "import itk.ITKPyBasePython\n") + set(ITK_WRAP_PYTHON_SNAKE_CASE + "${ITK_WRAP_PYTHON_ROOT_BINARY_DIR}/itk/Configuration/${WRAPPER_LIBRARY_NAME}_snake_case.py") + else() unset(ITK_WRAP_PYTHON_SNAKE_CASE) - - unset(ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_DECLS) - unset(ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_CALLS) - if(NOT BUILD_SHARED_LIBS) - if(WRAPPER_LIBRARY_NAME STREQUAL "ITKCommon") - - if(WIN32) - set(DO_NOT_WAIT_FOR_THREADS_DECLS "#include \"itkThreadPool.h\"") - set(DO_NOT_WAIT_FOR_THREADS_CALLS "itk::ThreadPool::SetDoNotWaitForThreads(true);") - endif() - - set(ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_DECLS " + endif() + set(ITK_WRAP_PYTHON_LIBRARY_CONFIG_FILE + "${ITK_WRAP_PYTHON_ROOT_BINARY_DIR}/itk/Configuration/${WRAPPER_LIBRARY_NAME}Config.py") + + # Pass module factory names into module configuration + set(ITK_WRAP_PYTHON_CONFIGURATION_FACTORIES) + foreach(factory IN LISTS ITK_MODULE_${WRAPPER_LIBRARY_NAME}_FACTORY_NAMES) + string( + REPLACE "::" + "\",\"" + factory_list + ${factory}) + string(APPEND ITK_WRAP_PYTHON_CONFIGURATION_FACTORIES "(\"${factory_list}\"),") + endforeach() + + # and create the file, with the var ITK_WRAP_PYTHON_CONFIGURATION_TEMPLATES and + # ITK_WRAP_PYTHON_CONFIGURATION_DEPENDS created earlier + configure_file("${ITK_WRAP_PYTHON_SOURCE_DIR}/itk/support/ModuleConfig.py.in" + "${ITK_WRAP_PYTHON_LIBRARY_CONFIG_FILE}" @ONLY) + unset(ITK_WRAP_PYTHON_CONFIGURATION_DEPENDS) + unset(ITK_WRAP_PYTHON_CONFIGURATION_TEMPLATES) + + wrap_itk_python_bindings_install( + /itk/Configuration + "${WRAPPER_LIBRARY_NAME}" + "${ITK_WRAP_PYTHON_LIBRARY_CONFIG_FILE}" + "${ITK_WRAP_PYTHON_SNAKE_CASE}") + unset(ITK_WRAP_PYTHON_LIBRARY_CONFIG_FILE) + unset(ITK_WRAP_PYTHON_SNAKE_CASE) + + unset(ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_DECLS) + unset(ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_CALLS) + if(NOT BUILD_SHARED_LIBS) + if(WRAPPER_LIBRARY_NAME STREQUAL "ITKCommon") + + if(WIN32) + set(DO_NOT_WAIT_FOR_THREADS_DECLS "#include \"itkThreadPool.h\"") + set(DO_NOT_WAIT_FOR_THREADS_CALLS "itk::ThreadPool::SetDoNotWaitForThreads(true);") + endif() + + set(ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_DECLS + " #define _ITKCommonPython_MODULE #include \"itkPyITKCommonCAPI.h\" ${DO_NOT_WAIT_FOR_THREADS_DECLS} @@ -285,7 +302,8 @@ return itk::SingletonIndex::GetInstance(); ") - set(ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_CALLS " + set(ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_CALLS + " static void * _ITKCommonPython_API[_ITKCommonPython_API_pointers]; /* Initialize the C API pointer array */ @@ -301,12 +319,14 @@ PyModule_AddObject(m, \"_C_API\", cAPIObject); } ${DO_NOT_WAIT_FOR_THREADS_CALLS} ") - elseif("ITKCommon" IN_LIST WRAPPER_LIBRARY_LINK_LIBRARIES) - set(ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_DECLS " + elseif("ITKCommon" IN_LIST WRAPPER_LIBRARY_LINK_LIBRARIES) + set(ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_DECLS + " #include \"itkPyITKCommonCAPI.h\" ${DO_NOT_WAIT_FOR_THREADS_DECLS} ") - set(ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_CALLS " + set(ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_CALLS + " if(import__ITKCommonPython() < 0) { #if PY_VERSION_HEX >= 0x03000000 @@ -319,177 +339,186 @@ itk::SingletonIndex::SetInstance(_ITKCommonPython_GetGlobalSingletonIndex()); itk::ObjectFactoryBase::Initialize(); ${DO_NOT_WAIT_FOR_THREADS_CALLS} ") - endif() endif() - - # Create the Python customization stuff in the main module - # It allows to group the python submodules in a single shared lib (.so), - # by loading the init functions of the module. - # The objects from the submodules are also loaded in the main module. - # - # It uses: - # ITK_WRAP_PYTHON_LIBRARY_DECLS, ITK_WRAP_PYTHON_LIBRARY_CALLS, - # ITK_WRAP_PYTHON_LIBRARY_IMPORTS, - # ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_CALLS, ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_DECLS - configure_file("${ITK_WRAP_PYTHON_SOURCE_DIR}/main_module_ext.i.in" - "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/${WRAPPER_LIBRARY_NAME}_ext.i" - @ONLY) - - unset(ITK_WRAP_PYTHON_LIBRARY_DECLS) - unset(ITK_WRAP_PYTHON_LIBRARY_CALLS) - unset(ITK_WRAP_PYTHON_LIBRARY_IMPORTS) - unset(ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_CALLS) - unset(ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_DECLS) - unset(DO_NOT_WAIT_FOR_THREADS_CALLS) - unset(DO_NOT_WAIT_FOR_THREADS_DECLS) - - # set some var reused later - set(interface_file "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${WRAPPER_LIBRARY_NAME}.i") - set(_swig_python_suffix "Python") - set(lib ${WRAPPER_LIBRARY_NAME}${_swig_python_suffix}) - set(python_file "${ITK_PYTHON_PACKAGE_DIR}/${WRAPPER_LIBRARY_NAME}${_swig_python_suffix}.py") - set(cpp_file "${CMAKE_CURRENT_BINARY_DIR}/${WRAPPER_LIBRARY_NAME}${_swig_python_suffix}.cpp") - unset(_swig_python_suffix) - - # if this is for an external library, let the user add extra swig args - if(EXTERNAL_WRAP_ITK_PROJECT) - set(WRAP_ITK_SWIG_ARGS_PYTHON "" CACHE STRING "Extra user-defined swig arguments to be to the swig executable.") - mark_as_advanced(WRAP_ITK_SWIG_ARGS_PYTHON) + endif() + + # Create the Python customization stuff in the main module + # It allows to group the python submodules in a single shared lib (.so), + # by loading the init functions of the module. + # The objects from the submodules are also loaded in the main module. + # + # It uses: + # ITK_WRAP_PYTHON_LIBRARY_DECLS, ITK_WRAP_PYTHON_LIBRARY_CALLS, + # ITK_WRAP_PYTHON_LIBRARY_IMPORTS, + # ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_CALLS, ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_DECLS + configure_file("${ITK_WRAP_PYTHON_SOURCE_DIR}/main_module_ext.i.in" + "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/${WRAPPER_LIBRARY_NAME}_ext.i" @ONLY) + + unset(ITK_WRAP_PYTHON_LIBRARY_DECLS) + unset(ITK_WRAP_PYTHON_LIBRARY_CALLS) + unset(ITK_WRAP_PYTHON_LIBRARY_IMPORTS) + unset(ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_CALLS) + unset(ITK_WRAP_PYTHON_GLOBAL_TIMESTAMP_DECLS) + unset(DO_NOT_WAIT_FOR_THREADS_CALLS) + unset(DO_NOT_WAIT_FOR_THREADS_DECLS) + + # set some var reused later + set(interface_file "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${WRAPPER_LIBRARY_NAME}.i") + set(_swig_python_suffix "Python") + set(lib ${WRAPPER_LIBRARY_NAME}${_swig_python_suffix}) + set(python_file "${ITK_PYTHON_PACKAGE_DIR}/${WRAPPER_LIBRARY_NAME}${_swig_python_suffix}.py") + set(cpp_file "${CMAKE_CURRENT_BINARY_DIR}/${WRAPPER_LIBRARY_NAME}${_swig_python_suffix}.cpp") + unset(_swig_python_suffix) + + # if this is for an external library, let the user add extra swig args + if(EXTERNAL_WRAP_ITK_PROJECT) + set(WRAP_ITK_SWIG_ARGS_PYTHON + "" + CACHE STRING "Extra user-defined swig arguments to be to the swig executable.") + mark_as_advanced(WRAP_ITK_SWIG_ARGS_PYTHON) + endif() + + # Run swig to produce the *Python.cpp and the *Python.py file + itk_setup_swig_python( + "Module" + ${base_name} + ${interface_file} + ${python_file} + ${cpp_file} + "") + + # build all the c++ files from this module in a common lib + if(NOT TARGET ${lib}) + add_library(${lib} MODULE ${cpp_file} ${ITK_WRAP_PYTHON_CXX_FILES} ${WRAPPER_LIBRARY_CXX_SOURCES}) + set_target_properties(${lib} PROPERTIES PREFIX "_") + + # gcc 4.4 complains a lot without this flag when building in release mode + if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + set_target_properties(${lib} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -w") + endif() + # extension is not the same on windows + if(WIN32) + # normally need *.pyd + # python_d requires libraries named *_d.pyd + set_target_properties(${lib} PROPERTIES SUFFIX .pyd) + set_target_properties(${lib} PROPERTIES DEBUG_POSTFIX "_d") + + if(MSVC) + # Disables 'conversion from 'type1' to 'type2', possible loss of data warnings + set_target_properties(${lib} PROPERTIES COMPILE_FLAGS "/wd4244") + endif() + endif() + if(NOT MSVC) + include(CheckIPOSupported) + check_ipo_supported(RESULT ipo_is_supported) + if(ipo_is_supported) + set_property(TARGET ${lib} PROPERTY INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE) + endif() + unset(ipo_is_supported) endif() - # Run swig to produce the *Python.cpp and the *Python.py file - itk_setup_swig_python("Module" ${base_name} ${interface_file} ${python_file} ${cpp_file} "") - - # build all the c++ files from this module in a common lib - if(NOT TARGET ${lib}) - add_library(${lib} MODULE ${cpp_file} ${ITK_WRAP_PYTHON_CXX_FILES} ${WRAPPER_LIBRARY_CXX_SOURCES}) - set_target_properties(${lib} PROPERTIES PREFIX "_") - - # gcc 4.4 complains a lot without this flag when building in release mode - if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") - set_target_properties(${lib} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -w") - endif() - # extension is not the same on windows - if(WIN32) - # normally need *.pyd - # python_d requires libraries named *_d.pyd - set_target_properties(${lib} PROPERTIES SUFFIX .pyd) - set_target_properties(${lib} PROPERTIES DEBUG_POSTFIX "_d") - - if(MSVC) - # Disables 'conversion from 'type1' to 'type2', possible loss of data warnings - set_target_properties(${lib} PROPERTIES COMPILE_FLAGS "/wd4244") - endif() - endif() - if (NOT MSVC) - include(CheckIPOSupported) - check_ipo_supported(RESULT ipo_is_supported) - if (ipo_is_supported) - set_property(TARGET ${lib} PROPERTY INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE) - endif() - unset(ipo_is_supported) - endif() + # Link the modules together + target_link_libraries(${lib} LINK_PUBLIC ${WRAPPER_LIBRARY_LINK_LIBRARIES}) + itk_target_link_libraries_with_dynamic_lookup(${lib} LINK_PUBLIC ${Python3_LIBRARIES}) - # Link the modules together - target_link_libraries(${lib} LINK_PUBLIC ${WRAPPER_LIBRARY_LINK_LIBRARIES}) - itk_target_link_libraries_with_dynamic_lookup(${lib} LINK_PUBLIC ${Python3_LIBRARIES}) + if(USE_COMPILER_HIDDEN_VISIBILITY) + # Prefer to use target properties supported by newer cmake + set_target_properties(${lib} PROPERTIES CXX_VISIBILITY_PRESET hidden) + set_target_properties(${lib} PROPERTIES C_VISIBILITY_PRESET hidden) + set_target_properties(${lib} PROPERTIES VISIBILITY_INLINES_HIDDEN 1) + endif() - if(USE_COMPILER_HIDDEN_VISIBILITY) - # Prefer to use target properties supported by newer cmake - set_target_properties(${lib} PROPERTIES CXX_VISIBILITY_PRESET hidden) - set_target_properties(${lib} PROPERTIES C_VISIBILITY_PRESET hidden) - set_target_properties(${lib} PROPERTIES VISIBILITY_INLINES_HIDDEN 1) - endif() + add_dependencies(${lib} ${WRAPPER_LIBRARY_NAME}Swig) + if(${module_prefix}_WRAP_DOC) + add_dependencies(${lib} ${WRAPPER_LIBRARY_NAME}Doxygen) + endif() + set(_component_module "") + if(WRAP_ITK_INSTALL_COMPONENT_PER_MODULE) + if("${WRAPPER_LIBRARY_NAME}" MATCHES "^ITK(PyUtils|PyBase)$") + set(_component_module "ITKCommon") + else() + set(_component_module "${WRAPPER_LIBRARY_NAME}") + endif() + endif() + install( + TARGETS "${lib}" + DESTINATION "${PY_SITE_PACKAGES_PATH}/itk" + COMPONENT ${_component_module}${WRAP_ITK_INSTALL_COMPONENT_IDENTIFIER}RuntimeLibraries) + unset(_component_module) - add_dependencies(${lib} ${WRAPPER_LIBRARY_NAME}Swig) + if(NOT EXTERNAL_WRAP_ITK_PROJECT) + # don't depends on the targets from wrapitk in external projects + foreach(dep ${WRAPPER_LIBRARY_DEPENDS}) + add_dependencies(${lib} ${dep}Swig) if(${module_prefix}_WRAP_DOC) - add_dependencies(${lib} ${WRAPPER_LIBRARY_NAME}Doxygen) - endif() - set(_component_module "") - if(WRAP_ITK_INSTALL_COMPONENT_PER_MODULE) - if("${WRAPPER_LIBRARY_NAME}" MATCHES "^ITK(PyUtils|PyBase)$") - set(_component_module "ITKCommon") - else() - set(_component_module "${WRAPPER_LIBRARY_NAME}") - endif() - endif() - install(TARGETS "${lib}" - DESTINATION "${PY_SITE_PACKAGES_PATH}/itk" - COMPONENT ${_component_module}${WRAP_ITK_INSTALL_COMPONENT_IDENTIFIER}RuntimeLibraries - ) - unset(_component_module) - - if(NOT EXTERNAL_WRAP_ITK_PROJECT) - # don't depends on the targets from wrapitk in external projects - foreach(dep ${WRAPPER_LIBRARY_DEPENDS}) - add_dependencies(${lib} ${dep}Swig) - if(${module_prefix}_WRAP_DOC) - add_dependencies(${lib} ${dep}Doxygen) - endif() - endforeach() + add_dependencies(${lib} ${dep}Doxygen) endif() + endforeach() endif() - - if(${module_prefix}_WRAP_DOC) - # be sure to not include a header several times - if(NOT "${ITK_WRAP_DOC_DOXYGEN_HEADERS}" STREQUAL "") - list(REMOVE_DUPLICATES ITK_WRAP_DOC_DOXYGEN_HEADERS) - endif() - - # which files are produced? - set(outputs ${ITK_WRAP_DOC_DOXYGEN_XML_FILES}) - - # run doxygen - - # create the target doc dir - set(ITK_WRAP_DOC_LIBRARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/Doc") # Library documentation interface files building directory - # TODO: direct name of the library dir? - file(MAKE_DIRECTORY ${ITK_WRAP_DOC_LIBRARY_DIR}) - - # The DoxygenConfig.cmake is a replacement for configuring a doxygen.config.in file - # https://cmake.org/cmake/help/v3.16/module/FindDoxygen.html - include(${WRAP_ITK_CMAKE_DIR}/DoxygenConfig.cmake) - doxygen_add_docs(${WRAPPER_LIBRARY_NAME}Doxygen - ${ITK_WRAP_DOC_DOXYGEN_HEADERS} - ALL - WORKING_DIRECTORY ${ITK_WRAP_DOC_LIBRARY_DIR} - USE_STAMP_FILE - COMMENT "-- Wrapping library ${WRAPPER_LIBRARY_NAME}: Constructing documentation xml structure.") - add_dependencies(${lib} ${WRAPPER_LIBRARY_NAME}Doxygen) - unset(ITK_WRAP_DOC_LIBRARY_DIR) + endif() + + if(${module_prefix}_WRAP_DOC) + # be sure to not include a header several times + if(NOT + "${ITK_WRAP_DOC_DOXYGEN_HEADERS}" + STREQUAL + "") + list(REMOVE_DUPLICATES ITK_WRAP_DOC_DOXYGEN_HEADERS) endif() - # Add testing - set(wrapping_test_directory ${CMAKE_CURRENT_SOURCE_DIR}/test) - if(BUILD_TESTING AND EXISTS ${wrapping_test_directory}/CMakeLists.txt) - add_subdirectory(${wrapping_test_directory}) - endif() - unset(wrapping_test_directory) - unset(cpp_file) - unset(python_file) - unset(interface_file) - unset(lib) - - ### - # These variable are only used inside this function - - unset(CASTXML_FORCE_INSTANTIATE) - unset(CastXML_OUTPUT_FILES) - unset(CASTXML_TYPEDEFS) - unset(ITK_WRAP_DOC_DOXY2SWIG_INPUT) # the c++ name - swig names definitions - unset(ITK_WRAP_PYTHON_CONFIGURATION_TEMPLATES) - unset(ITK_WRAP_PYTHON_CURRENT_CLASS) - unset(ITK_WRAP_PYTHON_CURRENT_SWIG_NAME) - unset(ITK_WRAP_PYTHON_CXX_FILES) - unset(ITK_WRAP_PYTHON_FILES) - unset(ITK_WRAP_PYTHON_LIBRARY_DECLS) - unset(ITK_WRAP_PYTHON_LIBRARY_DEPS) - unset(ITK_WRAP_PYTHON_LIBRARY_IMPORTS) - unset(ITK_WRAP_PYTHON_SWIG_EXT) - unset(PixelType) - unset(SWIG_INTERFACE_MDX_CONTENT) - unset(SWIG_INTERFACE_MODULE_CONTENT) - unset(SWIG_INTERFACE_TYPEDEFS) - unset(WRAPPER_CLASS) - unset(WRAPPER_INCLUDE_FILES) + # which files are produced? + set(outputs ${ITK_WRAP_DOC_DOXYGEN_XML_FILES}) + + # run doxygen + + # create the target doc dir + set(ITK_WRAP_DOC_LIBRARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/Doc" + )# Library documentation interface files building directory + # TODO: direct name of the library dir? + file(MAKE_DIRECTORY ${ITK_WRAP_DOC_LIBRARY_DIR}) + + # The DoxygenConfig.cmake is a replacement for configuring a doxygen.config.in file + # https://cmake.org/cmake/help/v3.16/module/FindDoxygen.html + include(${WRAP_ITK_CMAKE_DIR}/DoxygenConfig.cmake) + doxygen_add_docs( + ${WRAPPER_LIBRARY_NAME}Doxygen ${ITK_WRAP_DOC_DOXYGEN_HEADERS} ALL + WORKING_DIRECTORY ${ITK_WRAP_DOC_LIBRARY_DIR} USE_STAMP_FILE + COMMENT "-- Wrapping library ${WRAPPER_LIBRARY_NAME}: Constructing documentation xml structure.") + add_dependencies(${lib} ${WRAPPER_LIBRARY_NAME}Doxygen) + unset(ITK_WRAP_DOC_LIBRARY_DIR) + endif() + + # Add testing + set(wrapping_test_directory ${CMAKE_CURRENT_SOURCE_DIR}/test) + if(BUILD_TESTING AND EXISTS ${wrapping_test_directory}/CMakeLists.txt) + add_subdirectory(${wrapping_test_directory}) + endif() + unset(wrapping_test_directory) + unset(cpp_file) + unset(python_file) + unset(interface_file) + unset(lib) + + ### + # These variable are only used inside this function + + unset(CASTXML_FORCE_INSTANTIATE) + unset(CastXML_OUTPUT_FILES) + unset(CASTXML_TYPEDEFS) + unset(ITK_WRAP_DOC_DOXY2SWIG_INPUT) # the c++ name - swig names definitions + unset(ITK_WRAP_PYTHON_CONFIGURATION_TEMPLATES) + unset(ITK_WRAP_PYTHON_CURRENT_CLASS) + unset(ITK_WRAP_PYTHON_CURRENT_SWIG_NAME) + unset(ITK_WRAP_PYTHON_CXX_FILES) + unset(ITK_WRAP_PYTHON_FILES) + unset(ITK_WRAP_PYTHON_LIBRARY_DECLS) + unset(ITK_WRAP_PYTHON_LIBRARY_DEPS) + unset(ITK_WRAP_PYTHON_LIBRARY_IMPORTS) + unset(ITK_WRAP_PYTHON_SWIG_EXT) + unset(PixelType) + unset(SWIG_INTERFACE_MDX_CONTENT) + unset(SWIG_INTERFACE_MODULE_CONTENT) + unset(SWIG_INTERFACE_TYPEDEFS) + unset(WRAPPER_CLASS) + unset(WRAPPER_INCLUDE_FILES) endmacro() # itk_end_wrap_module