[SyneRBI/SIRF] The return value of `sirf.Reg.ImageData.asarray()` is wrong. (Issue #1375)

0 views
Skip to first unread message

Evgueni Ovtchinnikov

unread,
Feb 16, 2026, 12:15:22 PM (6 days ago) Feb 16
to SyneRBI/SIRF, Subscribed
evgueni-ovtchinnikov created an issue (SyneRBI/SIRF#1375)

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.Message ID: <SyneRBI/SIRF/issues/1375@github.com>

Reply all
Reply to author
Forward
0 new messages