summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python/demos
diff options
context:
space:
mode:
authordkazanc <dkazanc@hotmail.com>2019-02-07 10:02:11 +0000
committerdkazanc <dkazanc@hotmail.com>2019-02-07 10:02:11 +0000
commit88a818c093749538f4412249d5006f4c9fece268 (patch)
treeff9a0b4c63ca8ad609b57da454ea857f32d4c0fa /Wrappers/Python/demos
parent49b2f869dd71943ee75855e5f14225075d7b94f8 (diff)
downloadregularization-88a818c093749538f4412249d5006f4c9fece268.tar.gz
regularization-88a818c093749538f4412249d5006f4c9fece268.tar.bz2
regularization-88a818c093749538f4412249d5006f4c9fece268.tar.xz
regularization-88a818c093749538f4412249d5006f4c9fece268.zip
Demos fixed for Diff4th
Diffstat (limited to 'Wrappers/Python/demos')
-rw-r--r--Wrappers/Python/demos/demo_cpu_regularisers.py10
-rw-r--r--Wrappers/Python/demos/demo_cpu_regularisers3D.py8
-rw-r--r--Wrappers/Python/demos/demo_cpu_vs_gpu_regularisers.py10
-rw-r--r--Wrappers/Python/demos/demo_gpu_regularisers.py8
-rw-r--r--Wrappers/Python/demos/demo_gpu_regularisers3D.py6
5 files changed, 21 insertions, 21 deletions
diff --git a/Wrappers/Python/demos/demo_cpu_regularisers.py b/Wrappers/Python/demos/demo_cpu_regularisers.py
index 78e9aff..859b633 100644
--- a/Wrappers/Python/demos/demo_cpu_regularisers.py
+++ b/Wrappers/Python/demos/demo_cpu_regularisers.py
@@ -12,7 +12,7 @@ import matplotlib.pyplot as plt
import numpy as np
import os
import timeit
-from ccpi.filters.regularisers import ROF_TV, FGP_TV, SB_TV, TGV, LLT_ROF, FGP_dTV, TNV, NDF, DIFF4th
+from ccpi.filters.regularisers import ROF_TV, FGP_TV, SB_TV, TGV, LLT_ROF, FGP_dTV, TNV, NDF, Diff4th
from ccpi.filters.regularisers import PatchSelect, NLTV
from qualitymetrics import rmse
###############################################################################
@@ -358,13 +358,13 @@ print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
## plot
fig = plt.figure()
-plt.suptitle('Performance of DIFF4th regulariser using the CPU')
+plt.suptitle('Performance of Diff4th regulariser using the CPU')
a=fig.add_subplot(1,2,1)
a.set_title('Noisy Image')
imgplot = plt.imshow(u0,cmap="gray")
# set parameters
-pars = {'algorithm' : DIFF4th, \
+pars = {'algorithm' : Diff4th, \
'input' : u0,\
'regularisation_parameter':3.5, \
'edge_parameter':0.02,\
@@ -372,9 +372,9 @@ pars = {'algorithm' : DIFF4th, \
'time_marching_parameter':0.0015
}
-print ("#############DIFF4th CPU################")
+print ("#############Diff4th CPU################")
start_time = timeit.default_timer()
-diff4_cpu = DIFF4th(pars['input'],
+diff4_cpu = Diff4th(pars['input'],
pars['regularisation_parameter'],
pars['edge_parameter'],
pars['number_of_iterations'],
diff --git a/Wrappers/Python/demos/demo_cpu_regularisers3D.py b/Wrappers/Python/demos/demo_cpu_regularisers3D.py
index 9c28de1..c42c37b 100644
--- a/Wrappers/Python/demos/demo_cpu_regularisers3D.py
+++ b/Wrappers/Python/demos/demo_cpu_regularisers3D.py
@@ -12,7 +12,7 @@ import matplotlib.pyplot as plt
import numpy as np
import os
import timeit
-from ccpi.filters.regularisers import ROF_TV, FGP_TV, SB_TV, LLT_ROF, FGP_dTV, NDF, DIFF4th
+from ccpi.filters.regularisers import ROF_TV, FGP_TV, SB_TV, LLT_ROF, FGP_dTV, NDF, Diff4th
from qualitymetrics import rmse
###############################################################################
def printParametersToString(pars):
@@ -322,7 +322,7 @@ a.set_title('Noisy volume')
imgplot = plt.imshow(noisyVol[10,:,:],cmap="gray")
# set parameters
-pars = {'algorithm' : DIFF4th, \
+pars = {'algorithm' : Diff4th, \
'input' : noisyVol,\
'regularisation_parameter':3.5, \
'edge_parameter':0.02,\
@@ -330,9 +330,9 @@ pars = {'algorithm' : DIFF4th, \
'time_marching_parameter':0.0015
}
-print ("#############DIFF4th CPU################")
+print ("#############Diff4th CPU################")
start_time = timeit.default_timer()
-diff4th_cpu3D = DIFF4th(pars['input'],
+diff4th_cpu3D = Diff4th(pars['input'],
pars['regularisation_parameter'],
pars['edge_parameter'],
pars['number_of_iterations'],
diff --git a/Wrappers/Python/demos/demo_cpu_vs_gpu_regularisers.py b/Wrappers/Python/demos/demo_cpu_vs_gpu_regularisers.py
index 6529b5c..275e844 100644
--- a/Wrappers/Python/demos/demo_cpu_vs_gpu_regularisers.py
+++ b/Wrappers/Python/demos/demo_cpu_vs_gpu_regularisers.py
@@ -12,7 +12,7 @@ import matplotlib.pyplot as plt
import numpy as np
import os
import timeit
-from ccpi.filters.regularisers import ROF_TV, FGP_TV, SB_TV, TGV, LLT_ROF, FGP_dTV, NDF, DIFF4th
+from ccpi.filters.regularisers import ROF_TV, FGP_TV, SB_TV, TGV, LLT_ROF, FGP_dTV, NDF, Diff4th
from ccpi.filters.regularisers import PatchSelect
from qualitymetrics import rmse
###############################################################################
@@ -570,7 +570,7 @@ a.set_title('Noisy Image')
imgplot = plt.imshow(u0,cmap="gray")
# set parameters
-pars = {'algorithm' : DIFF4th, \
+pars = {'algorithm' : Diff4th, \
'input' : u0,\
'regularisation_parameter':3.5, \
'edge_parameter':0.02,\
@@ -580,7 +580,7 @@ pars = {'algorithm' : DIFF4th, \
print ("#############Diff4th CPU####################")
start_time = timeit.default_timer()
-diff4th_cpu = DIFF4th(pars['input'],
+diff4th_cpu = Diff4th(pars['input'],
pars['regularisation_parameter'],
pars['edge_parameter'],
pars['number_of_iterations'],
@@ -604,7 +604,7 @@ plt.title('{}'.format('CPU results'))
print ("##############Diff4th GPU##################")
start_time = timeit.default_timer()
-diff4th_gpu = DIFF4th(pars['input'],
+diff4th_gpu = Diff4th(pars['input'],
pars['regularisation_parameter'],
pars['edge_parameter'],
pars['number_of_iterations'],
@@ -612,7 +612,7 @@ diff4th_gpu = DIFF4th(pars['input'],
rms = rmse(Im, diff4th_gpu)
pars['rmse'] = rms
-pars['algorithm'] = DIFF4th
+pars['algorithm'] = Diff4th
txtstr = printParametersToString(pars)
txtstr += "%s = %.3fs" % ('elapsed time',timeit.default_timer() - start_time)
print (txtstr)
diff --git a/Wrappers/Python/demos/demo_gpu_regularisers.py b/Wrappers/Python/demos/demo_gpu_regularisers.py
index 2ada559..9115494 100644
--- a/Wrappers/Python/demos/demo_gpu_regularisers.py
+++ b/Wrappers/Python/demos/demo_gpu_regularisers.py
@@ -12,7 +12,7 @@ import matplotlib.pyplot as plt
import numpy as np
import os
import timeit
-from ccpi.filters.regularisers import ROF_TV, FGP_TV, SB_TV, TGV, LLT_ROF, FGP_dTV, NDF, DIFF4th
+from ccpi.filters.regularisers import ROF_TV, FGP_TV, SB_TV, TGV, LLT_ROF, FGP_dTV, NDF, Diff4th
from ccpi.filters.regularisers import PatchSelect, NLTV
from qualitymetrics import rmse
###############################################################################
@@ -355,13 +355,13 @@ print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
## plot
fig = plt.figure()
-plt.suptitle('Performance of DIFF4th regulariser using the GPU')
+plt.suptitle('Performance of Diff4th regulariser using the GPU')
a=fig.add_subplot(1,2,1)
a.set_title('Noisy Image')
imgplot = plt.imshow(u0,cmap="gray")
# set parameters
-pars = {'algorithm' : DIFF4th, \
+pars = {'algorithm' : Diff4th, \
'input' : u0,\
'regularisation_parameter':3.5, \
'edge_parameter':0.02,\
@@ -371,7 +371,7 @@ pars = {'algorithm' : DIFF4th, \
print ("#############DIFF4th CPU################")
start_time = timeit.default_timer()
-diff4_gpu = DIFF4th(pars['input'],
+diff4_gpu = Diff4th(pars['input'],
pars['regularisation_parameter'],
pars['edge_parameter'],
pars['number_of_iterations'],
diff --git a/Wrappers/Python/demos/demo_gpu_regularisers3D.py b/Wrappers/Python/demos/demo_gpu_regularisers3D.py
index d5f9a39..cda2847 100644
--- a/Wrappers/Python/demos/demo_gpu_regularisers3D.py
+++ b/Wrappers/Python/demos/demo_gpu_regularisers3D.py
@@ -12,7 +12,7 @@ import matplotlib.pyplot as plt
import numpy as np
import os
import timeit
-from ccpi.filters.regularisers import ROF_TV, FGP_TV, SB_TV, LLT_ROF, FGP_dTV, NDF, DIFF4th
+from ccpi.filters.regularisers import ROF_TV, FGP_TV, SB_TV, LLT_ROF, FGP_dTV, NDF, Diff4th
from qualitymetrics import rmse
###############################################################################
def printParametersToString(pars):
@@ -326,7 +326,7 @@ a.set_title('Noisy Image')
imgplot = plt.imshow(noisyVol[10,:,:],cmap="gray")
# set parameters
-pars = {'algorithm' : DIFF4th, \
+pars = {'algorithm' : Diff4th, \
'input' : noisyVol,\
'regularisation_parameter':3.5, \
'edge_parameter':0.02,\
@@ -336,7 +336,7 @@ pars = {'algorithm' : DIFF4th, \
print ("#############DIFF4th CPU################")
start_time = timeit.default_timer()
-diff4_gpu3D = DIFF4th(pars['input'],
+diff4_gpu3D = Diff4th(pars['input'],
pars['regularisation_parameter'],
pars['edge_parameter'],
pars['number_of_iterations'],