From b79143152345bc0e2c49320bc1d7607cedda51cc Mon Sep 17 00:00:00 2001 From: Vaggelis Papoutsellis <22398586+epapoutsellis@users.noreply.github.com> Date: Thu, 25 Apr 2019 11:21:08 +0100 Subject: Delete sinogram_demo_tomography2D.npy --- .../Python/wip/Demos/sinogram_demo_tomography2D.npy | Bin 60128 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Wrappers/Python/wip/Demos/sinogram_demo_tomography2D.npy (limited to 'Wrappers/Python') diff --git a/Wrappers/Python/wip/Demos/sinogram_demo_tomography2D.npy b/Wrappers/Python/wip/Demos/sinogram_demo_tomography2D.npy deleted file mode 100644 index f37fd4b..0000000 Binary files a/Wrappers/Python/wip/Demos/sinogram_demo_tomography2D.npy and /dev/null differ -- cgit v1.2.3 From d8cbae5c0ed33ea0c30f1e0f3518e2e97c0a86ba Mon Sep 17 00:00:00 2001 From: Vaggelis Papoutsellis <22398586+epapoutsellis@users.noreply.github.com> Date: Thu, 25 Apr 2019 11:21:24 +0100 Subject: Delete untitled4.py --- Wrappers/Python/wip/Demos/untitled4.py | 87 ---------------------------------- 1 file changed, 87 deletions(-) delete mode 100644 Wrappers/Python/wip/Demos/untitled4.py (limited to 'Wrappers/Python') diff --git a/Wrappers/Python/wip/Demos/untitled4.py b/Wrappers/Python/wip/Demos/untitled4.py deleted file mode 100644 index 0cacbd7..0000000 --- a/Wrappers/Python/wip/Demos/untitled4.py +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -""" -Created on Wed Apr 24 14:21:08 2019 - -@author: evangelos -""" - -from ccpi.framework import ImageData, ImageGeometry, AcquisitionGeometry, AcquisitionData -import numpy -import numpy as np -import matplotlib.pyplot as plt - -from ccpi.optimisation.algorithms import PDHG, PDHG_old - -from ccpi.optimisation.operators import BlockOperator, Gradient -from ccpi.optimisation.functions import ZeroFunction, L2NormSquared, \ - MixedL21Norm, BlockFunction - -from ccpi.astra.ops import AstraProjectorSimple, AstraProjector3DSimple -from skimage.util import random_noise -from timeit import default_timer as timer - -#N = 75 -#x = np.zeros((N,N)) -#x[round(N/4):round(3*N/4),round(N/4):round(3*N/4)] = 0.5 -#x[round(N/8):round(7*N/8),round(3*N/8):round(5*N/8)] = 1 - -#data = ImageData(x) - -N = 75 -#x = np.zeros((N,N)) - -vert = 4 -ig = ImageGeometry(voxel_num_x = N, voxel_num_y = N, voxel_num_z=vert) -data = ig.allocate() -Phantom = data -# Populate image data by looping over and filling slices -i = 0 -while i < vert: - if vert > 1: - x = Phantom.subset(vertical=i).array - else: - x = Phantom.array - x[round(N/4):round(3*N/4),round(N/4):round(3*N/4)] = 0.5 - x[round(N/8):round(7*N/8),round(3*N/8):round(5*N/8)] = 0.98 - if vert > 1 : - Phantom.fill(x, vertical=i) - i += 1 - -angles_num = 100 -det_w = 1.0 -det_num = N - -angles = np.linspace(0,np.pi,angles_num,endpoint=False,dtype=np.float32)*\ - 180/np.pi - -# Inputs: Geometry, 2D or 3D, angles, horz detector pixel count, -# horz detector pixel size, vert detector pixel count, -# vert detector pixel size. -ag = AcquisitionGeometry('parallel', - '3D', - angles, - N, - det_w, - vert, - det_w) - -sino = numpy.load("sinogram_demo_tomography2D.npy", mmap_mode='r') -plt.imshow(sino) -plt.title('Sinogram CCPi') -plt.colorbar() -plt.show() - -#%% -Aop = AstraProjector3DSimple(ig, ag) -sin = Aop.direct(data) - -plt.imshow(sin.as_array()) - -plt.title('Sinogram Astra') -plt.colorbar() -plt.show() - - - -#%% \ No newline at end of file -- cgit v1.2.3