summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2018-03-14 15:23:41 +0000
committerEdoardo Pasca <edo.paskino@gmail.com>2018-03-14 15:23:41 +0000
commit6b0f7ec43aa623faa7c2497929890bf1098f774c (patch)
treef40e636fba828b962e79d4adb0122fb61f8bac43 /Wrappers/Python
parent98bf31eaa4b2d46a53dd4520114f84a914606f6d (diff)
downloadframework-6b0f7ec43aa623faa7c2497929890bf1098f774c.tar.gz
framework-6b0f7ec43aa623faa7c2497929890bf1098f774c.tar.bz2
framework-6b0f7ec43aa623faa7c2497929890bf1098f774c.tar.xz
framework-6b0f7ec43aa623faa7c2497929890bf1098f774c.zip
changed naming
Diffstat (limited to 'Wrappers/Python')
-rw-r--r--Wrappers/Python/wip/simple_demo.py12
-rwxr-xr-xWrappers/Python/wip/simple_mc_demo.py2
2 files changed, 5 insertions, 9 deletions
diff --git a/Wrappers/Python/wip/simple_demo.py b/Wrappers/Python/wip/simple_demo.py
index 655b68d..b183794 100644
--- a/Wrappers/Python/wip/simple_demo.py
+++ b/Wrappers/Python/wip/simple_demo.py
@@ -1,11 +1,10 @@
#import sys
#sys.path.append("..")
-from ccpi.framework import ImageData , VolumeGeometry, SinogramGeometry
+from ccpi.framework import ImageData , ImageGeometry, AcquisitionGeometry
from ccpi.reconstruction.algs import FISTA, FBPD, CGLS
-from ccpi.reconstruction.funcs import Norm2sq, Norm1
+from ccpi.reconstruction.funcs import Norm2sq, Norm1 , TV2D
from ccpi.astra.astra_ops import AstraProjectorSimple
-from ccpi.reconstruction.geoms import
import numpy as np
import matplotlib.pyplot as plt
@@ -17,7 +16,7 @@ N = 128
vg = ImageGeometry(voxel_num_x=N,voxel_num_y=N)
-Phantom = VolumeData(geometry=vg)
+Phantom = ImageData(geometry=vg)
x = Phantom.as_array()
x[round(N/4):round(3*N/4),round(N/4):round(3*N/4)] = 1.0
@@ -148,11 +147,8 @@ fig = plt.figure()
# projections row
a=fig.add_subplot(rows,cols,current)
a.set_title('phantom {0}'.format(np.shape(Phantom.as_array())))
-<<<<<<< HEAD
-imgplot = plt.imshow(Phantom.as_array())
-=======
+
imgplot = plt.imshow(Phantom.as_array(),vmin=clims[0],vmax=clims[1])
->>>>>>> origin
current = current + 1
a=fig.add_subplot(rows,cols,current)
diff --git a/Wrappers/Python/wip/simple_mc_demo.py b/Wrappers/Python/wip/simple_mc_demo.py
index bb74c09..f15e704 100755
--- a/Wrappers/Python/wip/simple_mc_demo.py
+++ b/Wrappers/Python/wip/simple_mc_demo.py
@@ -18,7 +18,7 @@ M = 100
numchannels = 3
vg = ImageGeometry(voxel_num_x=N,voxel_num_y=N,channels=numchannels)
-Phantom = VolumeData(geometry=vg)
+Phantom = ImageData(geometry=vg)
x = Phantom.as_array()
x[0 , round(N/4):round(3*N/4) , round(N/4):round(3*N/4) ] = 1.0