Skip to content

compatibility with nibabel 5.0 #5833

@wyli

Description

@wyli

Is your feature request related to a problem? Please describe.
there are some failing tests, for example https://github.com/Project-MONAI/MONAI/actions/runs/3875667497/jobs/6608523107:

======================================================================
ERROR: test_shape_0 (tests.test_cachedataset.TestCacheDataset)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/parameterized/parameterized.py", line 533, in standalone_func
    return func(*(a + p.args), **p.kwargs)
  File "/tmp/tmp.q5iAVDMv0l/tests/test_cachedataset.py", line 42, in test_shape
    test_image = nib.Nifti1Image(np.random.randint(0, 2, size=[128, 128, 128]), np.eye(4))
  File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/nibabel/nifti1.py", line 1838, in __init__
    alert_future_error(
  File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/nibabel/deprecated.py", line 118, in alert_future_error
    raise error_class(f'{msg} {error_rec}'.strip())
ValueError: Image data has type int64, which may cause incompatibilities with other tools. To use this type, pass an explicit header or dtype argument to Nifti1Image().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions