diff options
author | epapoutsellis <epapoutsellis@gmail.com> | 2019-04-15 11:23:28 +0100 |
---|---|---|
committer | epapoutsellis <epapoutsellis@gmail.com> | 2019-04-15 11:23:28 +0100 |
commit | c6e217a527170c80933db0ec9247722a62221374 (patch) | |
tree | 376581c02c12f7b120847a4456e30303b01409a1 /Wrappers/Python | |
parent | 7f4b6dea68b5249e4e17f12b3a4215e06e630d43 (diff) | |
download | astra-wrapper-c6e217a527170c80933db0ec9247722a62221374.tar.gz astra-wrapper-c6e217a527170c80933db0ec9247722a62221374.tar.bz2 astra-wrapper-c6e217a527170c80933db0ec9247722a62221374.tar.xz astra-wrapper-c6e217a527170c80933db0ec9247722a62221374.zip |
add out in direct/adjoint
Diffstat (limited to 'Wrappers/Python')
-rwxr-xr-x | Wrappers/Python/ccpi/astra/ops.py | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/Wrappers/Python/ccpi/astra/ops.py b/Wrappers/Python/ccpi/astra/ops.py index 87b24bd..009439f 100755 --- a/Wrappers/Python/ccpi/astra/ops.py +++ b/Wrappers/Python/ccpi/astra/ops.py @@ -44,16 +44,34 @@ class AstraProjectorSimple(LinearOperator): # Initialise empty for singular value. self.s1 = None - - def direct(self, IM): + + def direct(self, IM, out=None): self.fp.set_input(IM) - out = self.fp.get_output() - return out + + if out is None: + return self.fp.get_output() + else: + out.fill(self.fp.get_output()) - def adjoint(self, DATA): + def adjoint(self, DATA, out=None): self.bp.set_input(DATA) - out = self.bp.get_output() - return out + + if out is None: + return self.bp.get_output() + else: + out.fill(self.bp.get_output()) + + + +# def direct(self, IM): +# self.fp.set_input(IM) +# out = self.fp.get_output() +# return out +# +# def adjoint(self, DATA): +# self.bp.set_input(DATA) +# out = self.bp.get_output() +# return out #def delete(self): # astra.data2d.delete(self.proj_id) @@ -194,9 +212,9 @@ class AstraProjectorMC(Operator): inputsize[0], inputsize[1])) - def allocate_direct(self): - return self.create_image_data()def domain_geometry(self): - return self.volume_geometry +# def allocate_direct(self): +# return self.create_image_data()def domain_geometry(self): +# return self.volume_geometry def domain_geometry(self): return self.volume_geometry |