Skip to content

Commit

Permalink
Issue #86 (#85): removed matlab dependent tests. Added a new one with…
Browse files Browse the repository at this point in the history
… Catch2 as a dependency
  • Loading branch information
mmodat committed Jul 28, 2022
1 parent dd0f983 commit c0d5599
Show file tree
Hide file tree
Showing 75 changed files with 162 additions and 17,646 deletions.
2 changes: 1 addition & 1 deletion niftyreg_build_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
73
74
2 changes: 2 additions & 0 deletions reg-lib/AladinContent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ void AladinContent::AllocateDeformationField(size_t bytes)

this->CurrentDeformationField = nifti_copy_nim_info(this->CurrentReference);
this->CurrentDeformationField->dim[0] = this->CurrentDeformationField->ndim = 5;
if (this->CurrentReference->dim[0] == 2)
this->CurrentDeformationField->dim[3] = this->CurrentDeformationField->nz = 1;
this->CurrentDeformationField->dim[4] = this->CurrentDeformationField->nt = 1;
this->CurrentDeformationField->pixdim[4] = this->CurrentDeformationField->dt = 1.0;
if (this->CurrentReference->nz == 1)
Expand Down
22 changes: 10 additions & 12 deletions reg-lib/cl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
#-----------------------------------------------------------------------------
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
#-----------------------------------------------------------------------------
# Find the OpenCL package
find_package(OPENCL REQUIRED)
if(NOT OPENCL_FOUND)
set(USE_OPENCL OFF CACHE BOOL "To use the OpenCL platform" FORCE)
message(SEND_ERROR "OpenCL not found. The USE_OPENCL flag is turned OFF")
find_package(OpenCL REQUIRED)
if(NOT OpenCL_FOUND)
set(USE_OpenCL OFF CACHE BOOL "To use the OpenCL platform" FORCE)
message(SEND_ERROR "OpenCL not found. The USE_OpenCL flag is turned OFF")
return()
else(NOT OPENCL_FOUND)
else(NOT OpenCL_FOUND)
message(STATUS "Found OpenCL")
endif(NOT OPENCL_FOUND)
endif(NOT OpenCL_FOUND)
#-----------------------------------------------------------------------------
set(SOURCE_PATH ${CMAKE_BINARY_DIR})
#-----------------------------------------------------------------------------
configure_file(config.h.in ${CMAKE_BINARY_DIR}/config.h IMMEDIATE)
mark_as_advanced(_OPENCL_CPP_INCLUDE_DIRS)
mark_as_advanced(_OpenCL_CPP_INCLUDE_DIRS)
#-----------------------------------------------------------------------------
include_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/reg-lib/cl)
include_directories(${OPENCL_INCLUDE_DIRS})
include_directories(${OpenCL_INCLUDE_DIRS})
#-----------------------------------------------------------------------------
# Build the _reg_opencl_kernels library
set(NAME _reg_opencl_kernels)
Expand All @@ -34,7 +32,7 @@ add_library(${NAME} ${NIFTYREG_LIBRARY_TYPE}
../AladinContent.cpp
../Platform.cpp
)
target_link_libraries(${NAME} ${OPENCL_LIBRARIES})
target_link_libraries(${NAME} ${OpenCL_LIBRARIES})
install(TARGETS ${NAME}
RUNTIME DESTINATION lib
LIBRARY DESTINATION lib
Expand All @@ -53,7 +51,7 @@ install(FILES resampleKernel.cl affineDeformationKernel.cl blockMatchingKernel.c
#-----------------------------------------------------------------------------
set(NAME _reg_openclinfo)
add_library(${NAME} ${NIFTYREG_LIBRARY_TYPE} ${NAME}.cpp ${NAME}.h InfoDevice.h CLContextSingletton.cpp)
target_link_libraries(${NAME} ${OPENCL_LIBRARIES})
target_link_libraries(${NAME} ${OpenCL_LIBRARIES})
install(TARGETS ${NAME}
RUNTIME DESTINATION lib
LIBRARY DESTINATION lib
Expand Down
317 changes: 19 additions & 298 deletions reg-test/CMakeLists.txt

Large diffs are not rendered by default.

83 changes: 0 additions & 83 deletions reg-test/matlab_tests/LSaffine.m

This file was deleted.

61 changes: 0 additions & 61 deletions reg-test/matlab_tests/LSrigid.m

This file was deleted.

40 changes: 0 additions & 40 deletions reg-test/matlab_tests/LTS_test.m

This file was deleted.

71 changes: 0 additions & 71 deletions reg-test/matlab_tests/LTSrigid_affine.m

This file was deleted.

Loading

0 comments on commit c0d5599

Please sign in to comment.