summaryrefslogtreecommitdiffstats
path: root/src/Python/ccpi
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2017-10-20 17:04:26 +0100
committerEdoardo Pasca <edo.paskino@gmail.com>2017-10-20 17:04:26 +0100
commit903175ed67f7645fa35edf4623b27999d6cb990f (patch)
tree17da596ffa3e4d139af15fb9454719ceac875734 /src/Python/ccpi
parentd2ce1b74b4ecad5cdecb29207181e09ef0f6013a (diff)
downloadregularization-903175ed67f7645fa35edf4623b27999d6cb990f.tar.gz
regularization-903175ed67f7645fa35edf4623b27999d6cb990f.tar.bz2
regularization-903175ed67f7645fa35edf4623b27999d6cb990f.tar.xz
regularization-903175ed67f7645fa35edf4623b27999d6cb990f.zip
Further development
Diffstat (limited to 'src/Python/ccpi')
-rw-r--r--src/Python/ccpi/fista/FISTAReconstructor.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Python/ccpi/fista/FISTAReconstructor.py b/src/Python/ccpi/fista/FISTAReconstructor.py
index fda9cf0..85bfac5 100644
--- a/src/Python/ccpi/fista/FISTAReconstructor.py
+++ b/src/Python/ccpi/fista/FISTAReconstructor.py
@@ -583,3 +583,27 @@ class FISTAReconstructor():
string = 'Iteration Number {0} | RMS Error {1} | Objective {2} \n'
print (string.format(i,Resid_error[i], self.objective[i]))
return (X , X_t, t)
+
+ def os_iterate(self, Xin=None):
+ print ("FISTA Reconstructor: iterate")
+
+ if Xin is None:
+ if self.getParameter('initialize'):
+ X = self.initialize()
+ else:
+ N = vol_geom['GridColCount']
+ X = numpy.zeros((N,N,SlicesZ), dtype=numpy.float)
+ else:
+ # copy by reference
+ X = Xin
+ # store the output volume in the parameters
+ self.setParameter(output_volume=X)
+ X_t = X.copy()
+
+ # some useful constants
+ proj_geom , vol_geom, sino , \
+ SlicesZ, weights , alpha_ring ,
+ lambdaR_L1 , L_const = self.getParameter(
+ ['projector_geometry' , 'output_geometry',
+ 'input_sinogram', 'SlicesZ' , 'weights', 'ring_alpha' ,
+ 'ring_lambda_R_L1', 'Lipschitz_constant'])