Skip to content

Conversation

@emmanuel-ferdman
Copy link
Contributor

Description
This small PR throws an error on wrong files shape.

Checklist

  • I have read the CONTRIBUTING docs and have a developer setup ready
  • Changes are
    • Non-breaking (would not break existing functionality)
    • Breaking (would cause existing functionality to change)
  • Tests added or modified to cover the changes
  • In-line docstrings updated
  • Documentation updated
  • This pull request is ready to be reviewed

Signed-off-by: Emmanuel Ferdman <[email protected]>
@fepegar
Copy link
Member

fepegar commented Aug 3, 2025

Thanks, @emmanuel-ferdman. Could you please also add this test or a similar one in test_image.py?

    def test_different_shape(self):
        path_1 = self.get_image_path('im_shape1', shape=(5, 5, 5))
        path_2 = self.get_image_path('im_shape2', shape=(7, 5, 5))

        with pytest.raises(RuntimeError):
            tio.ScalarImage([path_1, path_2])

Signed-off-by: Emmanuel Ferdman <[email protected]>
@fepegar
Copy link
Member

fepegar commented Aug 5, 2025

Thanks for fixing the test 😅

@fepegar fepegar merged commit bad8e6b into TorchIO-project:main Aug 8, 2025
22 checks passed
@fepegar
Copy link
Member

fepegar commented Aug 8, 2025

@allcontributors please add @emmanuel-ferdman for bug

@allcontributors
Copy link
Contributor

@fepegar

I've put up a pull request to add @emmanuel-ferdman! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants