def test_discrete_phantom_uniform():
"""The uniform discrete phantom is the same after rotating 90 degrees."""
d0 = discrete_phantom(p, 100, ratio=10, prop='mass_atten')
p.rotate(theta=np.pi/2, point=Point([0.5, 0.5]))
d1 = np.rot90(discrete_phantom(p, 100, ratio=10, prop='mass_atten'))
# plot rotated phantom
plot_phantom(p)
# plot the error
plt.figure()
plt.imshow(d1-d0, interpolation=None)
plt.colorbar()
# plt.show(block=True)
# assert_allclose(d0, d1)
评论列表
文章目录