summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python/ccpi
diff options
context:
space:
mode:
authorDaniil Kazantsev <dkazanc@hotmail.com>2018-05-11 15:42:35 +0100
committerDaniil Kazantsev <dkazanc@hotmail.com>2018-05-11 15:42:35 +0100
commitcfd675c4dcc9ca090e6401f70c68bdc34da004db (patch)
treedba4ed6ea4cfb31161a2e6931e86c159281a3646 /Wrappers/Python/ccpi
parent0dd1cadcfead9a2a5f225e1500c97cc00a8068d6 (diff)
downloadframework-plugins-cfd675c4dcc9ca090e6401f70c68bdc34da004db.tar.gz
framework-plugins-cfd675c4dcc9ca090e6401f70c68bdc34da004db.tar.bz2
framework-plugins-cfd675c4dcc9ca090e6401f70c68bdc34da004db.tar.xz
framework-plugins-cfd675c4dcc9ca090e6401f70c68bdc34da004db.zip
further corrections, SB-TV added
Diffstat (limited to 'Wrappers/Python/ccpi')
-rw-r--r--Wrappers/Python/ccpi/plugins/regularisers.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Wrappers/Python/ccpi/plugins/regularisers.py b/Wrappers/Python/ccpi/plugins/regularisers.py
index 6d865cc..9f4d3fc 100644
--- a/Wrappers/Python/ccpi/plugins/regularisers.py
+++ b/Wrappers/Python/ccpi/plugins/regularisers.py
@@ -32,10 +32,10 @@ class _ROF_TV_(Operator):
self.iterationsTV = iterationsTV
self.time_marchstep = time_marchstep
self.device = device # string for 'cpu' or 'gpu'
- def __call__(self,x,x1,typeEnergy):
+ def __call__(self,x):
# evaluate objective function of TV gradient
# typeEnergy is either 1 (LS + TV for denoising) or 2 (just TV fidelity)
- EnergyValTV = TV_ENERGY(np.asarray(x.as_array(), dtype=np.float32), np.asarray(x1.as_array(), dtype=np.float32), self.lambdaReg, typeEnergy)
+ EnergyValTV = TV_ENERGY(np.asarray(x.as_array(), dtype=np.float32), np.asarray(x.as_array(), dtype=np.float32), self.lambdaReg, 2)
return EnergyValTV
def prox(self,x,Lipshitz):
pars = {'algorithm' : ROF_TV, \
@@ -60,10 +60,10 @@ class _FGP_TV_(Operator):
self.nonnegativity = nonnegativity
self.printing = printing
self.device = device # string for 'cpu' or 'gpu'
- def __call__(self,x,x1,typeEnergy):
+ def __call__(self,x):
# evaluate objective function of TV gradient
# typeEnergy is either 1 (LS + TV for denoising) or 2 (just TV fidelity)
- EnergyValTV = TV_ENERGY(np.asarray(x.as_array(), dtype=np.float32), np.asarray(x1.as_array(), dtype=np.float32), self.lambdaReg, typeEnergy)
+ EnergyValTV = TV_ENERGY(np.asarray(x.as_array(), dtype=np.float32), np.asarray(x.as_array(), dtype=np.float32), self.lambdaReg, 2)
return EnergyValTV
def prox(self,x,Lipshitz):
pars = {'algorithm' : FGP_TV, \
@@ -94,10 +94,10 @@ class _SB_TV_(Operator):
self.methodTV = methodTV
self.printing = printing
self.device = device # string for 'cpu' or 'gpu'
- def __call__(self,x,typeEnergy):
+ def __call__(self,x):
# evaluate objective function of TV gradient
# typeEnergy is either 1 (LS + TV for denoising) or 2 (just TV fidelity)
- EnergyValTV = TV_ENERGY(np.asarray(x.as_array(), dtype=np.float32), np.asarray(x.as_array(), dtype=np.float32), self.lambdaReg, typeEnergy)
+ EnergyValTV = TV_ENERGY(np.asarray(x.as_array(), dtype=np.float32), np.asarray(x.as_array(), dtype=np.float32), self.lambdaReg, 2)
return EnergyValTV
def prox(self,x,Lipshitz):
pars = {'algorithm' : SB_TV, \