summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniil Kazantsev <dkazanc3@googlemail.com>2018-04-06 11:08:52 +0100
committerGitHub <noreply@github.com>2018-04-06 11:08:52 +0100
commit2e9d7e5df33c3c042b2a55ae4c9fe23b15f95019 (patch)
treeec24c21edd374246f2fa762337fa7f612d158885
parent1f30c56fa1de2f38ded54d3c2bd988645cdb2ea5 (diff)
parent99d84e408cdf0905996fb3632b7d006c6e6da805 (diff)
downloadregularization-2e9d7e5df33c3c042b2a55ae4c9fe23b15f95019.tar.gz
regularization-2e9d7e5df33c3c042b2a55ae4c9fe23b15f95019.tar.bz2
regularization-2e9d7e5df33c3c042b2a55ae4c9fe23b15f95019.tar.xz
regularization-2e9d7e5df33c3c042b2a55ae4c9fe23b15f95019.zip
Merge pull request #45 from vais-ral/remove_boost
Remove boost
-rw-r--r--CMakeLists.txt2
-rw-r--r--Core/CMakeLists.txt32
-rw-r--r--Readme.md19
-rw-r--r--Wrappers/Python/CMakeLists.txt36
-rw-r--r--Wrappers/Python/conda-recipe/meta.yaml6
-rw-r--r--Wrappers/Python/setup-regularizers.py.in23
6 files changed, 35 insertions, 83 deletions
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)
diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt
index 4e85002..f31454d 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"
@@ -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
)
@@ -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/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
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/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]
diff --git a/Wrappers/Python/setup-regularizers.py.in b/Wrappers/Python/setup-regularizers.py.in
index 8655a2e..0811372 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" ) ,
"."]
@@ -45,26 +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',
- 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',