From 22f6e22cbe6db04c6bbe8d259ce761e3748d7102 Mon Sep 17 00:00:00 2001 From: algol Date: Thu, 12 Apr 2018 11:56:54 +0100 Subject: dTV some bugs in cython --- Wrappers/Python/demos/demo_cpu_regularisers.py | 9 ++++++--- Wrappers/Python/demos/demo_cpu_vs_gpu_regularisers.py | 2 ++ Wrappers/Python/demos/demo_gpu_regularisers.py | 8 +++++--- 3 files changed, 13 insertions(+), 6 deletions(-) (limited to 'Wrappers/Python/demos') diff --git a/Wrappers/Python/demos/demo_cpu_regularisers.py b/Wrappers/Python/demos/demo_cpu_regularisers.py index fd3050c..00beb0b 100644 --- a/Wrappers/Python/demos/demo_cpu_regularisers.py +++ b/Wrappers/Python/demos/demo_cpu_regularisers.py @@ -22,6 +22,8 @@ def printParametersToString(pars): txt += "{0} = {1}".format(key, value.__name__) elif key == 'input': txt += "{0} = {1}".format(key, np.shape(value)) + elif key == 'refdata': + txt += "{0} = {1}".format(key, np.shape(value)) else: txt += "{0} = {1}".format(key, value) txt += '\n' @@ -196,7 +198,7 @@ plt.title('{}'.format('CPU results')) # Uncomment to test 3D regularisation performance #%% - +""" N = 512 slices = 20 @@ -318,8 +320,8 @@ a.set_title('Noisy Image') imgplot = plt.imshow(noisyVol[10,:,:],cmap="gray") # set parameters -pars = {'algorithm' : FGP_dTV, \ - 'input' : noisyVol,\ +pars = {'algorithm' : FGP_dTV,\ + 'input' : noisyVol,\ 'refdata' : noisyRef,\ 'regularisation_parameter':0.04, \ 'number_of_iterations' :300 ,\ @@ -358,4 +360,5 @@ a.text(0.15, 0.25, txtstr, transform=a.transAxes, fontsize=14, verticalalignment='top', bbox=props) imgplot = plt.imshow(fgp_dTV_cpu3D[10,:,:], cmap="gray") plt.title('{}'.format('Recovered volume on the CPU using FGP-dTV')) +""" #%% diff --git a/Wrappers/Python/demos/demo_cpu_vs_gpu_regularisers.py b/Wrappers/Python/demos/demo_cpu_vs_gpu_regularisers.py index aa1f865..310cf75 100644 --- a/Wrappers/Python/demos/demo_cpu_vs_gpu_regularisers.py +++ b/Wrappers/Python/demos/demo_cpu_vs_gpu_regularisers.py @@ -22,6 +22,8 @@ def printParametersToString(pars): txt += "{0} = {1}".format(key, value.__name__) elif key == 'input': txt += "{0} = {1}".format(key, np.shape(value)) + elif key == 'refdata': + txt += "{0} = {1}".format(key, np.shape(value)) else: txt += "{0} = {1}".format(key, value) txt += '\n' diff --git a/Wrappers/Python/demos/demo_gpu_regularisers.py b/Wrappers/Python/demos/demo_gpu_regularisers.py index 4759cc3..24a3c88 100644 --- a/Wrappers/Python/demos/demo_gpu_regularisers.py +++ b/Wrappers/Python/demos/demo_gpu_regularisers.py @@ -22,6 +22,8 @@ def printParametersToString(pars): txt += "{0} = {1}".format(key, value.__name__) elif key == 'input': txt += "{0} = {1}".format(key, np.shape(value)) + elif key == 'refdata': + txt += "{0} = {1}".format(key, np.shape(value)) else: txt += "{0} = {1}".format(key, value) txt += '\n' @@ -192,7 +194,7 @@ plt.title('{}'.format('GPU results')) # Uncomment to test 3D regularisation performance #%% - +""" N = 512 slices = 20 @@ -314,7 +316,7 @@ imgplot = plt.imshow(noisyVol[10,:,:],cmap="gray") # set parameters pars = {'algorithm' : FGP_dTV, \ - 'input' : noisyVol,\ + 'input' : noisyVol,\ 'refdata' : noisyRef,\ 'regularisation_parameter':0.04, \ 'number_of_iterations' :300 ,\ @@ -352,5 +354,5 @@ a.text(0.15, 0.25, txtstr, transform=a.transAxes, fontsize=14, verticalalignment='top', bbox=props) imgplot = plt.imshow(fgp_dTV_gpu3D[10,:,:], cmap="gray") plt.title('{}'.format('Recovered volume on the GPU using FGP-dTV')) - +""" #%% -- cgit v1.2.3