The following code
data_path = examples_data_path('Registration')
image = reg.ImageData(os.path.join(data_path, 'test2.nii.gz'))
x = image/image.norm()
x_a = x.as_array()
xa = x.asarray()
s = x.norm()
t = numpy.linalg.norm(x_a)
u = numpy.linalg.norm(xa)
v = numpy.linalg.norm(xa - x_a)
print(s, t, u, v)
produces this output:
0.9999999403953552 0.99999917 0.9999992 0.9608586
instead of expected
0.9999999403953552 0.99999917 0.9999992 0.0
Since all tests for reg.ImageData.as_array() method run ok, the return value of reg.ImageData.asarray() must be wrong.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()