summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python/ccpi
diff options
context:
space:
mode:
authorDaniil Kazantsev <dkazanc3@googlemail.com>2018-04-17 13:18:49 +0100
committerGitHub <noreply@github.com>2018-04-17 13:18:49 +0100
commitcbe38cf8874ca3b74e25ce64d61bbb2edeb3a9c1 (patch)
tree530f73d52c3142b023673f2041ac451bfcab576b /Wrappers/Python/ccpi
parent7e556922a60e052d24c1e467df13423904729357 (diff)
parentec9b5742e243c60f2f7d31f38cd3d561c3ae3394 (diff)
downloadregularization-cbe38cf8874ca3b74e25ce64d61bbb2edeb3a9c1.tar.gz
regularization-cbe38cf8874ca3b74e25ce64d61bbb2edeb3a9c1.tar.bz2
regularization-cbe38cf8874ca3b74e25ce64d61bbb2edeb3a9c1.tar.xz
regularization-cbe38cf8874ca3b74e25ce64d61bbb2edeb3a9c1.zip
Merge pull request #51 from vais-ral/TNV
Total Nuclear Variation (TNV) module
Diffstat (limited to 'Wrappers/Python/ccpi')
-rw-r--r--Wrappers/Python/ccpi/filters/regularisers.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Wrappers/Python/ccpi/filters/regularisers.py b/Wrappers/Python/ccpi/filters/regularisers.py
index 50c4374..e6814e8 100644
--- a/Wrappers/Python/ccpi/filters/regularisers.py
+++ b/Wrappers/Python/ccpi/filters/regularisers.py
@@ -2,7 +2,7 @@
script which assigns a proper device core function based on a flag ('cpu' or 'gpu')
"""
-from ccpi.filters.cpu_regularisers_cython import TV_ROF_CPU, TV_FGP_CPU, TV_SB_CPU, dTV_FGP_CPU
+from ccpi.filters.cpu_regularisers_cython import TV_ROF_CPU, TV_FGP_CPU, TV_SB_CPU, dTV_FGP_CPU, TNV_CPU
from ccpi.filters.gpu_regularisers import TV_ROF_GPU, TV_FGP_GPU, TV_SB_GPU, dTV_FGP_GPU
def ROF_TV(inputData, regularisation_parameter, iterations,
@@ -86,3 +86,8 @@ def FGP_dTV(inputData, refdata, regularisation_parameter, iterations,
else:
raise ValueError('Unknown device {0}. Expecting gpu or cpu'\
.format(device))
+def TNV(inputData, regularisation_parameter, iterations, tolerance_param):
+ return TNV_CPU(inputData,
+ regularisation_parameter,
+ iterations,
+ tolerance_param)