odlgroup / odl

Operator Discretization Library https://odlgroup.github.io/odl/
Mozilla Public License 2.0
375 stars 105 forks source link

#a problem about rayTransform #1588

Open mimeng123 opened 3 years ago

mimeng123 commented 3 years ago

Deer,I have a problem when I make a rayTransform in a single angle.I use the method of .adjoint to achieve the backend in a single ,I can't get the correct results every time.My code and my different result is shown as follows.I didn't change the code in different result.

i =9 angle_num = 120 angle_partition = odl.uniform_partition((np.pi/angle_num)no_order, (np.pi/angle_num)(no_order+1), 1) geometry = odl.tomo.Parallel2dGeometry(angle_partition, detector_partition) ray_trafo = odl.tomo.RayTransform(reco_space, geometry)

discr_phantom = odl.phantom.shepp_logan(space, modified=True) data = ray_trafo(phantom) temp_img = ray_trafo.adjoint(data)

plt.figure(1) plt.subplot(2, 2, 2) plt.imshow(temp_img.data, cmap='gray') plt.subplot(2, 2, 4) plt.imshow(extend_show(data.data), cmap='gray') plt.show()

微信图片_20201209102206 微信图片_20201209102158

adler-j commented 3 years ago

Could you post the full code used to generate these images?