My question is whether I can optimally determine the distance between the source and the center of rotation and the distance between the center of rotation and the detector array for a given image and projection geometry. By optimal I mean that the number of zero entries of the measurement vector is minimized.
In the following code snippet I used the Astra toolbox with which we simulate our 2D tomography.
from skimage.io import imread
from astra import creators, optomo
import numpy as np
# load some 400x400 pixel image
image = imread("/path/to/image.png, as_gray=True)"
# create geometries and projector
# proj_geom = astra_create_proj_geom('fanflat', det_width, det_count, angles, source_origin, origin_det)
proj_geom = creators.create_proj_geom('fanflat', 1.0, 400, np.linspace(0,np.pi,180), 1500.0, 500.0);
vol_geom = creators.create_vol_geom(400,400)
proj_id = creators.create_projector('line_fanflat', proj_geom, vol_geom)
# create forward projection
# fp is our measurement vector
W = optomo.OpTomo(proj_id)
fp = W*image
In my example if I use np.linspace(0,np.pi,180)
the number of zero-entries of fp
are 1108
, if I use np.linspace(0,np.pi/180,180)
instead the number increases to 5133
which makes me believe that the values 1500.0
and 500.0
are not well chosen.