""" FBP reconstruction example for simulated Skull CT data """ import numpy as np import adutils # Discretization reco_space = adutils.get_discretization() # Forward operator (in the form of a broadcast operator) A = adutils.get_ray_trafo(reco_space, use_subset=True) # Define fbp fbp = adutils.get_fbp(A) # Data rhs = adutils.get_data(A, use_subset=True) # Reconstruct x = fbp(rhs) # Show result x.show(coords=[None, 0, None]) x.show(coords=[0, None, None]) x.show(coords=[None, None, 90]) # Save saveReco = False if saveReco: saveName = '/home/user/Simulated/120kV/reco/Reco_HelicalSkullCT_70100644Phantom_no_bed_Dose150mGy_FBP.npy'
""" TGV reconstruction example for simulated Skull CT data """ import odl import numpy as np import adutils # Discretization reco_space = adutils.get_discretization(use_2D=True) # Forward operator (in the form of a broadcast operator) ray_trafo = adutils.get_ray_trafo(reco_space, use_2D=True) # Data data = adutils.get_data(ray_trafo, use_2D=True) # --- Set up the inverse problem --- # # Initialize gradient operator gradient = odl.Gradient(reco_space, method='forward') gradient_back = odl.Gradient(reco_space, method='backward') eps = odl.DiagonalOperator(gradient_back, reco_space.ndim) # Create the domain of the problem, given by the reconstruction space and the # range of the gradient on the reconstruction space. domain = odl.ProductSpace(reco_space, gradient.range)
""" FBP reconstruction example for simulated Skull CT data using rebinned data """ import numpy as np import adutils # Define phantom name (or use default '70100644') phantom_number = '70100644' rebin_factor = 10 adutils.rebin_data(rebin_factor, phantom_number=phantom_number) # Discretization reco_space = adutils.get_discretization(phantom_number=phantom_number) # Forward operator (in the form of a broadcast operator) A = adutils.get_ray_trafo(reco_space, phantom_number=phantom_number, use_rebin=True, rebin_factor=rebin_factor) # Define fbp fbp = adutils.get_fbp(A) # Data rhs = adutils.get_data(A, phantom_number=phantom_number, use_rebin=True, rebin_factor=rebin_factor)