summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2017-10-27 12:40:53 +0100
committerEdoardo Pasca <edo.paskino@gmail.com>2018-01-19 14:26:06 +0000
commit42ebac43aca279c5e6e9ba7fe8946e69ccc53c09 (patch)
tree07d8fc796cb6b6160feaa9684631c8f5e2121162
parent34e00beb5c35068083fc4ecd5da5b93a504d62bf (diff)
downloadregularization-42ebac43aca279c5e6e9ba7fe8946e69ccc53c09.tar.gz
regularization-42ebac43aca279c5e6e9ba7fe8946e69ccc53c09.tar.bz2
regularization-42ebac43aca279c5e6e9ba7fe8946e69ccc53c09.tar.xz
regularization-42ebac43aca279c5e6e9ba7fe8946e69ccc53c09.zip
handles correctly the slicing
-rw-r--r--src/Python/ccpi/imaging/Regularizer.py6
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)):