From 79eeb48ca1856f093cf5a72f26d437b11f4a0c15 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Thu, 8 Mar 2018 11:50:19 +0000 Subject: Simple Demo uses the updated VolumeData and SinogramData --- Wrappers/Python/wip/simple_demo.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Wrappers') diff --git a/Wrappers/Python/wip/simple_demo.py b/Wrappers/Python/wip/simple_demo.py index a970b3e..de2cc99 100644 --- a/Wrappers/Python/wip/simple_demo.py +++ b/Wrappers/Python/wip/simple_demo.py @@ -18,17 +18,16 @@ test_case = 1 # 1=parallel2D, 2=cone2D # Set up phantom N = 128 -x = np.zeros((N,N)) +vg = VolumeGeometry(voxel_num_x=N,voxel_num_y=N) +Phantom = VolumeData(geometry=vg) + +x = Phantom.as_array() x[round(N/4):round(3*N/4),round(N/4):round(3*N/4)] = 1.0 x[round(N/8):round(7*N/8),round(3*N/8):round(5*N/8)] = 2.0 plt.imshow(x) plt.show() -vg = VolumeGeometry(N,N,None, 1,1,None) - -Phantom = VolumeData(x,geometry=vg) - # Set up measurement geometry angles_num = 20; # angles number -- cgit v1.2.3