diff options
author | Edoardo Pasca <edo.paskino@gmail.com> | 2017-10-27 12:40:53 +0100 |
---|---|---|
committer | Edoardo Pasca <edo.paskino@gmail.com> | 2017-10-27 12:40:53 +0100 |
commit | a9ee40156a7ad6ae4fcb9e07aea99914f6c7f7ff (patch) | |
tree | f56f689bc15de7e61bb080795453a850d194c711 /src | |
parent | 45ce9d604f2fe6f58318c8103f3f6125af9cb9bc (diff) | |
download | regularization-a9ee40156a7ad6ae4fcb9e07aea99914f6c7f7ff.tar.gz regularization-a9ee40156a7ad6ae4fcb9e07aea99914f6c7f7ff.tar.bz2 regularization-a9ee40156a7ad6ae4fcb9e07aea99914f6c7f7ff.tar.xz regularization-a9ee40156a7ad6ae4fcb9e07aea99914f6c7f7ff.zip |
handles correctly the slicing
Diffstat (limited to 'src')
-rw-r--r-- | src/Python/ccpi/imaging/Regularizer.py | 6 |
1 files changed, 3 insertions, 3 deletions
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)): |