diff options
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | Core/CMakeLists.txt | 2 | ||||
-rwxr-xr-x | Core/regularisers_GPU/TV_FGP_GPU_core.h | 9 | ||||
-rwxr-xr-x | Core/regularisers_GPU/TV_SB_GPU_core.h | 10 | ||||
-rw-r--r-- | Core/regularisers_GPU/dTV_FGP_GPU_core.h | 9 | ||||
-rw-r--r-- | Readme.md | 6 | ||||
-rw-r--r-- | Wrappers/Python/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Wrappers/Python/conda-recipe/build.sh | 1 | ||||
-rw-r--r-- | Wrappers/Python/conda-recipe/meta.yaml | 4 | ||||
-rwxr-xr-x | build/jenkins-build.sh | 44 | ||||
-rw-r--r-- | recipes/regularisers/build.sh | 2 |
11 files changed, 31 insertions, 63 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 550b896..b95107a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,10 @@ set (CIL_VERSION_MAJOR 0) set (CIL_VERSION_MINOR 10) set (CIL_VERSION_PATCH 2) -set (CIL_VERSION '${CIL_VERSION_MAJOR}.${CIL_VERSION_MINOR}.${CIL_VERSION_PATCH}' CACHE INTERNAL "Core Imaging Library version" FORCE) +# set (CIL_VERSION '${CIL_VERSION_MAJOR}.${CIL_VERSION_MINOR}.${CIL_VERSION_PATCH}' CACHE INTERNAL "Core Imaging Library version" FORCE) +# get CIL_VERSION from environment variable and set it in cmake +set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) +message(STATUS "CIL_VERSION set to " ${CIL_VERSION}) # set the Python variables for the Conda environment #include(${CMAKE_SOURCE_DIR}/CMake/FindAnacondaEnvironment.cmake) diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt index d92db82..b3c0dfb 100644 --- a/Core/CMakeLists.txt +++ b/Core/CMakeLists.txt @@ -6,7 +6,7 @@ project(RGL_core) # The version number. -#set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) +set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) # conda orchestrated build message("CIL_VERSION ${CIL_VERSION}") diff --git a/Core/regularisers_GPU/TV_FGP_GPU_core.h b/Core/regularisers_GPU/TV_FGP_GPU_core.h index b28cdf3..bf13508 100755 --- a/Core/regularisers_GPU/TV_FGP_GPU_core.h +++ b/Core/regularisers_GPU/TV_FGP_GPU_core.h @@ -1,10 +1,9 @@ -#include <stdio.h> -#include <stdlib.h> -#include <memory.h> - #ifndef _TV_FGP_GPU_ #define _TV_FGP_GPU_ -extern "C" int TV_FGP_GPU_main(float *Input, float *Output, float lambdaPar, int iter, float epsil, int methodTV, int nonneg, int printM, int dimX, int dimY, int dimZ); +#include "CCPiDefines.h" +#include <memory.h> + +extern "C" CCPI_EXPORT int TV_FGP_GPU_main(float *Input, float *Output, float lambdaPar, int iter, float epsil, int methodTV, int nonneg, int printM, int dimX, int dimY, int dimZ); #endif diff --git a/Core/regularisers_GPU/TV_SB_GPU_core.h b/Core/regularisers_GPU/TV_SB_GPU_core.h index d44ab77..901b90f 100755 --- a/Core/regularisers_GPU/TV_SB_GPU_core.h +++ b/Core/regularisers_GPU/TV_SB_GPU_core.h @@ -1,10 +1,10 @@ -#include <stdio.h> -#include <stdlib.h> -#include <memory.h> - #ifndef _SB_TV_GPU_ #define _SB_TV_GPU_ -extern "C" int TV_SB_GPU_main(float *Input, float *Output, float mu, int iter, float epsil, int methodTV, int printM, int dimX, int dimY, int dimZ); +#include "CCPiDefines.h" +#include <memory.h> + + +extern "C" CCPI_EXPORT int TV_SB_GPU_main(float *Input, float *Output, float mu, int iter, float epsil, int methodTV, int printM, int dimX, int dimY, int dimZ); #endif diff --git a/Core/regularisers_GPU/dTV_FGP_GPU_core.h b/Core/regularisers_GPU/dTV_FGP_GPU_core.h index 9020b1a..f9281e8 100644 --- a/Core/regularisers_GPU/dTV_FGP_GPU_core.h +++ b/Core/regularisers_GPU/dTV_FGP_GPU_core.h @@ -1,10 +1,9 @@ -#include <stdio.h> -#include <stdlib.h> -#include <memory.h> - #ifndef _dTV_FGP_GPU_ #define _dTV_FGP_GPU_ -extern "C" int dTV_FGP_GPU_main(float *Input, float *InputRef, float *Output, float lambdaPar, int iter, float epsil, float eta, int methodTV, int nonneg, int printM, int dimX, int dimY, int dimZ); +#include "CCPiDefines.h" +#include <memory.h> + +extern "C" CCPI_EXPORT int dTV_FGP_GPU_main(float *Input, float *InputRef, float *Output, float lambdaPar, int iter, float epsil, float eta, int methodTV, int nonneg, int printM, int dimX, int dimY, int dimZ); #endif @@ -1,5 +1,11 @@ # CCPi-Regularisation Toolkit (CCPi-RGL) + + +| Master | Development | +|--------|-------------| +| [![Build Status](https://anvil.softeng-support.ac.uk/jenkins/buildStatus/icon?job=CILsingle/CCPi-Regularisation-Toolkit)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit/) | [![Build Status](https://anvil.softeng-support.ac.uk/jenkins/buildStatus/icon?job=CILsingle/CCPi-Regularisation-Toolkit-dev)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit-dev/) | + **Iterative image reconstruction (IIR) methods normally require regularisation to stabilise the convergence and make the reconstruction problem (inverse problem) more well-posed. The CCPi-RGL software provides 2D/3D and multi-channel regularisation strategies to ensure better performance of IIR methods. The regularisation modules are well-suited to use with [splitting algorithms](https://en.wikipedia.org/wiki/Augmented_Lagrangian_method#Alternating_direction_method_of_multipliers), such as, [ADMM](https://github.com/dkazanc/ADMM-tomo) and [FISTA](https://github.com/dkazanc/FISTA-tomo). Furthermore, the toolkit can be used for simpler inversion tasks, such as, image denoising, inpaiting, deconvolution etc. The core modules are written in C-OMP and CUDA languages and wrappers for Matlab and Python are provided.** <div align="center"> diff --git a/Wrappers/Python/CMakeLists.txt b/Wrappers/Python/CMakeLists.txt index d86d0ea..c2ef855 100644 --- a/Wrappers/Python/CMakeLists.txt +++ b/Wrappers/Python/CMakeLists.txt @@ -9,7 +9,7 @@ project(regulariserPython) #set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) # conda orchestrated build -message("CIL_VERSION ${CIL_VERSION}") +message("CIL_VERSION: ${CIL_VERSION}") #include (GenerateExportHeader) find_package(PythonInterp REQUIRED) diff --git a/Wrappers/Python/conda-recipe/build.sh b/Wrappers/Python/conda-recipe/build.sh index eec7c2f..39c0f2c 100644 --- a/Wrappers/Python/conda-recipe/build.sh +++ b/Wrappers/Python/conda-recipe/build.sh @@ -5,6 +5,7 @@ cp -rv "$RECIPE_DIR/../../../Core" "$SRC_DIR/Core" cd $SRC_DIR ##cuda=off + cmake -G "Unix Makefiles" $RECIPE_DIR/../../../ -DBUILD_PYTHON_WRAPPER=ON -DCONDA_BUILD=ON -DBUILD_CUDA=ON -DCMAKE_BUILD_TYPE="Release" -DLIBRARY_LIB=$CONDA_PREFIX/lib -DLIBRARY_INC=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=$PREFIX diff --git a/Wrappers/Python/conda-recipe/meta.yaml b/Wrappers/Python/conda-recipe/meta.yaml index e3258ff..9dd5544 100644 --- a/Wrappers/Python/conda-recipe/meta.yaml +++ b/Wrappers/Python/conda-recipe/meta.yaml @@ -5,12 +5,14 @@ package: build: preserve_egg_dir: False number: 0 + script_env: + - CIL_VERSION test: files: - lena_gray_512.tif requires: - - pillow + - pillow=4.1.1 requirements: build: diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 6da2c56..5b6c9ce 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -1,44 +1,2 @@ #!/usr/bin/env bash -if [[ -n ${CIL_VERSION} ]] -then - echo Using defined version: $CIL_VERSION -else - export CIL_VERSION=0.10.4 - echo Defining version: $CIL_VERSION -fi -# Script to builds source code in Jenkins environment -# module try-load conda - -# install miniconda if the module is not present -if hash conda 2>/dev/null; then - echo using conda -else - if [ ! -f Miniconda3-latest-Linux-x86_64.sh ]; then - wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh - chmod +x Miniconda3-latest-Linux-x86_64.sh - fi - ./Miniconda3-latest-Linux-x86_64.sh -u -b -p . - PATH=$PATH:./bin -fi - -# presume that git clone is done before this script is launched, if not, uncomment -# git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit -conda install -y conda-build -#cd CCPi-Regularisation-Toolkit # already there by jenkins -# need to call first build -conda build Wrappers/Python/conda-recipe -# then need to call the same with --output -#- otherwise no build is done :-(, just fake file names are generated -export REG_FILES=`conda build Wrappers/Python/conda-recipe --output` -# REG_FILES variable should contain output files -echo files created: $REG_FILES -#upload to anaconda -if [[ -n ${CCPI_CONDA_TOKEN} ]] -then - conda install anaconda-client - while read -r outfile; do - anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev - done <<< "$REG_FILES" -else - echo CCPI_CONDA_TOKEN not defined, will not upload to anaconda. -fi +bash <(curl -L https://raw.githubusercontent.com/vais-ral/CCPi-VirtualMachine/master/scripts/jenkins-build.sh) diff --git a/recipes/regularisers/build.sh b/recipes/regularisers/build.sh index 0b8bce2..eaa778e 100644 --- a/recipes/regularisers/build.sh +++ b/recipes/regularisers/build.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -echo $CIL_VERSION +echo build.sh CIL_VERSION: $CIL_VERSION #if [ -z "$CIL_VERSION" ]; then # echo "Need to set CIL_VERSION" # exit 1 |