From a9ee40156a7ad6ae4fcb9e07aea99914f6c7f7ff Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 27 Oct 2017 12:40:53 +0100 Subject: handles correctly the slicing --- src/Python/ccpi/imaging/Regularizer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Python') diff --git a/src/Python/ccpi/imaging/Regularizer.py b/src/Python/ccpi/imaging/Regularizer.py index fb9ae08..8ab6c6a 100644 --- a/src/Python/ccpi/imaging/Regularizer.py +++ b/src/Python/ccpi/imaging/Regularizer.py @@ -216,13 +216,13 @@ class Regularizer(): #assuming it's 3D # run independent calls on each slice out3d = input.copy() - for i in range(np.shape(input)[2]): - out = self.algorithm(input, regularization_parameter, + for i in range(np.shape(input)[0]): + out = self.algorithm(input[i], regularization_parameter, self.pars['first_order_term'] , self.pars['second_order_term'] , self.pars['number_of_iterations']) # copy the result in the 3D image - out3d.T[i] = out[0].copy() + out3d[i] = out[0].copy() # append the rest of the info that the algorithm returns output = [out3d] for i in range(1,len(out)): -- cgit v1.2.3