From d7daee3a30e7550e5220040736c96d088beef644 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 4 Apr 2018 12:17:37 +0100 Subject: removed unused include --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b2aca9..e39dacd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ set (CIL_VERSION_PATCH 1) set (CIL_VERSION '${CIL_VERSION_MAJOR}.${CIL_VERSION_MINOR}.${CIL_VERSION_PATCH}' CACHE INTERNAL "Core Imaging Library version" FORCE) # set the Python variables for the Conda environment -include(${CMAKE_SOURCE_DIR}/CMake/FindAnacondaEnvironment.cmake) +#include(${CMAKE_SOURCE_DIR}/CMake/FindAnacondaEnvironment.cmake) add_subdirectory(Core) add_subdirectory(Wrappers) -- cgit v1.2.3 From 5cf5f284a8fe001c08cdbffb466130dfe4e22882 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 4 Apr 2018 12:18:32 +0100 Subject: Fixed GPU regularizer includes, remove boost dependency --- Core/CMakeLists.txt | 24 +++++++++++------------- Wrappers/Python/setup-regularizers.py.in | 20 +------------------- 2 files changed, 12 insertions(+), 32 deletions(-) diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt index 4e85002..3f1087c 100644 --- a/Core/CMakeLists.txt +++ b/Core/CMakeLists.txt @@ -24,15 +24,15 @@ if (PYTHONINTERP_FOUND) endif() endif() -find_package(Boost REQUIRED - COMPONENTS ${BOOST_PYTHON} ${BOOST_NUMPY}) - -if (Boost_FOUND) - message("Boost version " ${Boost_VERSION}) - message("Boost include dir " ${Boost_INCLUDE_DIRS}) - message("Boost library dir " ${Boost_LIBRARY_DIRS}) - message("Boost libraries " ${Boost_LIBRARIES}) -endif() +#find_package(Boost REQUIRED +# COMPONENTS ${BOOST_PYTHON} ${BOOST_NUMPY}) +# +#if (Boost_FOUND) +# message("Boost version " ${Boost_VERSION}) +# message("Boost include dir " ${Boost_INCLUDE_DIRS}) +# message("Boost library dir " ${Boost_LIBRARY_DIRS}) +# message("Boost libraries " ${Boost_LIBRARIES}) +#endif() find_package(OpenMP) if (OPENMP_FOUND) @@ -55,7 +55,7 @@ if(WIN32) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:MSVCRT.lib") set (EXTRA_LIBRARIES - ${Boost_LIBRARIES} + #${Boost_LIBRARIES} #"tiff" ) @@ -67,7 +67,7 @@ elseif(UNIX) set (CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} ${FLAGS}") set (EXTRA_LIBRARIES - ${Boost_LIBRARIES} + #${Boost_LIBRARIES} #"tiff" "gomp" "m" @@ -127,8 +127,6 @@ if (CUDA_FOUND) set(CUDA_NVCC_FLAGS "-Xcompiler -fPIC -shared -D_FORCE_INLINES") message("CUDA FLAGS ${CUDA_NVCC_FLAGS}") CUDA_ADD_LIBRARY(cilregcuda SHARED - ${CMAKE_CURRENT_SOURCE_DIR}/regularizers_GPU/Diffus_HO/Diff4th_GPU_kernel.cu - ${CMAKE_CURRENT_SOURCE_DIR}/regularizers_GPU/NL_Regul/NLM_GPU_kernel.cu ${CMAKE_CURRENT_SOURCE_DIR}/regularizers_GPU/TV_ROF/TV_ROF_GPU_core.cu ${CMAKE_CURRENT_SOURCE_DIR}/regularizers_GPU/TV_FGP/TV_FGP_GPU_core.cu ) diff --git a/Wrappers/Python/setup-regularizers.py.in b/Wrappers/Python/setup-regularizers.py.in index 8655a2e..6e27e08 100644 --- a/Wrappers/Python/setup-regularizers.py.in +++ b/Wrappers/Python/setup-regularizers.py.in @@ -34,8 +34,7 @@ extra_libraries = ['cilreg'] extra_include_dirs += [os.path.join(".." , ".." , "Core"), os.path.join(".." , ".." , "Core", "regularizers_CPU"), - os.path.join(".." , ".." , "Core", "regularizers_GPU" , "Diffus_HO" ) , - os.path.join(".." , ".." , "Core", "regularizers_GPU" , "NL_Regul" ) , + os.path.join(".." , ".." , "Core", "regularizers_GPU" , "TV_FGP" ) , os.path.join(".." , ".." , "Core", "regularizers_GPU" , "TV_ROF" ) , "."] @@ -48,23 +47,6 @@ else: extra_libraries += ["@BOOST_PYTHON_LIB@", "@BOOST_NUMPY_LIB@"] -setup( - name='ccpi', - description='CCPi Core Imaging Library - Image Regularizers', - version=cil_version, - cmdclass = {'build_ext': build_ext}, - ext_modules = [Extension("ccpi.filters.cpu_regularizers_boost", - sources=[os.path.join("." , "src", "cpu_regularizers.cpp" )], - include_dirs=extra_include_dirs, - library_dirs=extra_library_dirs, - extra_compile_args=extra_compile_args, - libraries=extra_libraries ), - - ], - zip_safe = False, - packages = {'ccpi','ccpi.filters'}, -) - setup( name='ccpi', description='CCPi Core Imaging Library - Image Regularizers', -- cgit v1.2.3 From 7b65c486bf2b78f03e956d4002cb0fe4a0e0860b Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 4 Apr 2018 12:19:51 +0100 Subject: removed boost dependency --- Wrappers/Python/conda-recipe/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Wrappers/Python/conda-recipe/meta.yaml b/Wrappers/Python/conda-recipe/meta.yaml index fb88ab8..f4cb471 100644 --- a/Wrappers/Python/conda-recipe/meta.yaml +++ b/Wrappers/Python/conda-recipe/meta.yaml @@ -14,8 +14,8 @@ requirements: - python - numpy x.x - setuptools - - boost ==1.64.0 - - boost-cpp ==1.64.0 + #- boost ==1.64.0 + #- boost-cpp ==1.64.0 - cython - cil_regularizer - vc 14 # [win and py35] @@ -25,7 +25,7 @@ requirements: run: - python - numpy x.x - - boost ==1.64 + #- boost ==1.64 - cil_regularizer - vc 14 # [win and py35] - vc 9 # [win and py27] -- cgit v1.2.3 From c41d90f309e367850dbccf8682ae7008c515c03f Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 4 Apr 2018 12:28:37 +0100 Subject: removed unavailable code --- Core/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt index 3f1087c..f31454d 100644 --- a/Core/CMakeLists.txt +++ b/Core/CMakeLists.txt @@ -84,10 +84,10 @@ message("Adding regularizers as shared library") #set(CMAKE_C_FLAGS "-acc -Minfo -ta=multicore -openmp -fPIC") add_library(cilreg SHARED ${CMAKE_CURRENT_SOURCE_DIR}/regularizers_CPU/FGP_TV_core.c - ${CMAKE_CURRENT_SOURCE_DIR}/regularizers_CPU/LLT_model_core.c - ${CMAKE_CURRENT_SOURCE_DIR}/regularizers_CPU/PatchBased_Regul_core.c - ${CMAKE_CURRENT_SOURCE_DIR}/regularizers_CPU/SplitBregman_TV_core.c - ${CMAKE_CURRENT_SOURCE_DIR}/regularizers_CPU/TGV_PD_core.c + #${CMAKE_CURRENT_SOURCE_DIR}/regularizers_CPU/LLT_model_core.c + #${CMAKE_CURRENT_SOURCE_DIR}/regularizers_CPU/PatchBased_Regul_core.c + #${CMAKE_CURRENT_SOURCE_DIR}/regularizers_CPU/SplitBregman_TV_core.c + #${CMAKE_CURRENT_SOURCE_DIR}/regularizers_CPU/TGV_PD_core.c ${CMAKE_CURRENT_SOURCE_DIR}/regularizers_CPU/ROF_TV_core.c ${CMAKE_CURRENT_SOURCE_DIR}/regularizers_CPU/utils.c ) -- cgit v1.2.3 From d7d7d844590b62ed8a1119a1d10142548f8c6795 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 6 Apr 2018 09:32:24 +0100 Subject: removed findBoost --- Wrappers/Python/CMakeLists.txt | 36 ++------------------------------ Wrappers/Python/setup-regularizers.py.in | 3 --- 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/Wrappers/Python/CMakeLists.txt b/Wrappers/Python/CMakeLists.txt index 16a2137..eb3bac7 100644 --- a/Wrappers/Python/CMakeLists.txt +++ b/Wrappers/Python/CMakeLists.txt @@ -24,15 +24,6 @@ if (PYTHONINTERP_FOUND) endif() endif() -find_package(Boost REQUIRED - COMPONENTS ${BOOST_PYTHON} ${BOOST_NUMPY}) - -if (Boost_FOUND) - message("Boost version " ${Boost_VERSION}) - message("Boost include dir " ${Boost_INCLUDE_DIRS}) - message("Boost library dir " ${Boost_LIBRARY_DIRS}) - message("Boost libraries " ${Boost_LIBRARIES}) -endif() ## Build the regularizers package as a library message("Creating Regularizers as shared library") @@ -46,7 +37,7 @@ if(WIN32) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:MSVCRT.lib") set (EXTRA_LIBRARIES - ${Boost_LIBRARIES} + #${Boost_LIBRARIES} #"tiff" ) @@ -55,35 +46,12 @@ if(WIN32) elseif(UNIX) set (FLAGS "-fopenmp -O2 -funsigned-char -Wall -Wl,--no-undefined -DCCPiReconstructionIterative_EXPORTS -std=c++0x") set (EXTRA_LIBRARIES - ${Boost_LIBRARIES} + #${Boost_LIBRARIES} #"tiff" "gomp" ) endif() - -if (WIN32) - list(GET Boost_LIBRARIES 0 place ) - get_filename_component(BOOST_PYTHON_LIB ${place} NAME_WE ) - list(GET Boost_LIBRARIES 1 place ) - get_filename_component(BOOST_NUMPY_LIB ${place} NAME_WE ) -else() - # on linux the library looks like libboost_numpy3.so: - # we need to get rid of the lib at the beginning - list(GET Boost_LIBRARIES 0 place ) - get_filename_component(place2 ${place} NAME_WE ) - string(REGEX REPLACE "^lib(.*)" "\\1" BOOST_PYTHON_LIB "${place2}") - - list(GET Boost_LIBRARIES 1 place ) - get_filename_component(place2 ${place} NAME_WE ) - string(REGEX REPLACE "^lib(.*)" "\\1" BOOST_NUMPY_LIB "${place2}") -endif() - -message ("found " ${BOOST_PYTHON_LIB}) -message ("found " ${BOOST_NUMPY_LIB}) - - - # GPU Regularizers find_package(CUDA) diff --git a/Wrappers/Python/setup-regularizers.py.in b/Wrappers/Python/setup-regularizers.py.in index 6e27e08..0811372 100644 --- a/Wrappers/Python/setup-regularizers.py.in +++ b/Wrappers/Python/setup-regularizers.py.in @@ -44,9 +44,6 @@ else: extra_compile_args = ['-fopenmp','-O2', '-funsigned-char', '-Wall', '-std=c++0x'] extra_libraries += [@EXTRA_OMP_LIB@] -extra_libraries += ["@BOOST_PYTHON_LIB@", "@BOOST_NUMPY_LIB@"] - - setup( name='ccpi', description='CCPi Core Imaging Library - Image Regularizers', -- cgit v1.2.3 From 99d84e408cdf0905996fb3632b7d006c6e6da805 Mon Sep 17 00:00:00 2001 From: Daniil Kazantsev Date: Fri, 6 Apr 2018 11:03:54 +0100 Subject: readme upd5 --- Readme.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Readme.md b/Readme.md index b5759a8..d91e420 100644 --- a/Readme.md +++ b/Readme.md @@ -1,7 +1,7 @@ -# CCPi-Regularisation Toolkit (CCPi-RUT) +# CCPi-Regularisation Toolkit (CCPi-RGL) **Iterative image reconstruction (IIR) methods normally require regularisation to stabilise convergence and make the reconstruction problem more well-posed. -CCPi-RUT software consist of 2D/3D regularisation modules which frequently used for IIR. +CCPi-RGL software consist of 2D/3D regularisation modules which frequently used for IIR. The core modules are written in C-OMP and CUDA languages and wrappers for Matlab and Python are provided.** ## Prerequisites: @@ -13,14 +13,21 @@ The core modules are written in C-OMP and CUDA languages and wrappers for Matlab ## Package modules (regularisers): -1. Rudin-Osher-Fatemi Total Variation (explicit PDE minimisation scheme) [2D/3D GPU/CPU] (1) -2. Fast-Gradient-Projection Total Variation [2D/3D GPU/CPU] (2) +1. Rudin-Osher-Fatemi Total Variation (explicit PDE minimisation scheme) [2D/3D GPU/CPU] +2. Fast-Gradient-Projection Total Variation [2D/3D GPU/CPU] ### Installation: #### Python (conda-build) ``` - export CIL_VERSION=0.9.2 + export CIL_VERSION=0.9.2 + conda build recipes/regularizers --numpy 1.12 --python 3.5 + conda install cil_regularizer=0.9.2 --use-local --force + cd Wrappers/Python + conda build conda-recipe --numpy 1.12 --python 3.5 + conda install ccpi-regularizer=0.9.2 --use-local --force + cd test/ + python test_cpu_vs_gpu_regularizers.py ``` #### Matlab @@ -33,5 +40,5 @@ The core modules are written in C-OMP and CUDA languages and wrappers for Matlab [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) ### Acknowledgments: -CCPi-RUT software is a product of the [CCPi](https://www.ccpi.ac.uk/) group and STFC SCD software developers. Any relevant questions/comments can be e-mailed to Daniil Kazantsev at dkazanc@hotmail.com +CCPi-RGL software is a product of the [CCPi](https://www.ccpi.ac.uk/) group and STFC SCD software developers. Any relevant questions/comments can be e-mailed to Daniil Kazantsev at dkazanc@hotmail.com -- cgit v1.2.3