Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

accept list to define spacing in torchio.Resample #599

Closed
romainVala opened this issue Jul 8, 2021 · 1 comment
Closed

accept list to define spacing in torchio.Resample #599

romainVala opened this issue Jul 8, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@romainVala
Copy link
Contributor

馃殌 Feature
today only tuple are acceptable
t = torchio.Resample((1,2,3))
but
t = torchio.Resample([1,2,3])
raise an error
Motivation

I use a json file to configure my torchio transform, and the tuple does not exist, so I can only specify list

Pitch

the change is very easy to do
I just change

if isinstance(spacing, tuple) and len(spacing) == 3:

by

        if ( isinstance(spacing, tuple) or isinstance(spacing, list) )  and len(spacing) == 3:

Alternatives

after my json parsing, I could transform list to tuple, but ... I do not see the point to restrict to tuple here ... ?

Additional context

@romainVala romainVala added the enhancement New feature or request label Jul 8, 2021
@fepegar fepegar closed this as completed in bbe157f Jul 8, 2021
@fepegar
Copy link
Owner

fepegar commented Jul 8, 2021

Thanks, @romainVala. Fixed in v0.18.44.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants