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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make io.ImageCollection cross-platform compatible for same path specifier #3258

Open
stefanv opened this issue Jul 9, 2018 · 8 comments
Open
Labels
⏩ type: Enhancement Improve existing features

Comments

@stefanv
Copy link
Member

stefanv commented Jul 9, 2018

Currently, different path separators have to be used on Windows and Linux.

@jni
Copy link
Member

jni commented Jul 9, 2018

to be clear, ImageCollection('*.png:*.jpg') works on *NIX, while ImageCollection('*.png;*.jpg') works on Windows. We should do a find and replace on the input string based on platform. However we have to be careful because : is a valid filename character in *NIX.

@hmaarrfk
Copy link
Member

hmaarrfk commented Aug 7, 2018

Maybe the solution is to take in a list? ['*.jpg', '*.png']

@stefanv
Copy link
Member Author

stefanv commented Feb 13, 2019

@hmaarrfk That would be a good solution. @jni If ':' is a valid filename in Unix, our current implementation is already broken. Are semi-colons acceptable in Unix filenames? Or are colons acceptable in Windows filenames? Any of these options allow us to make a fix. But Mark's suggestion is a better long-term solution, I think.

@jni
Copy link
Member

jni commented Feb 17, 2019

@stefanv

 $ ls -l
total 192
-rw-r--r--   1 jni  staff     0B 18 Feb 10:47 ;.txt

=P

I vote for Mark's suggestion. But honestly I agree with the first commenter that it's not a bug, and we should continue using os.pathsep even after we implement lists. It is an internally consistent solution.

@stefanv
Copy link
Member Author

stefanv commented Feb 18, 2019 via email

@jni
Copy link
Member

jni commented Feb 18, 2019

I agree 100% (see my comment about our low dynamic range warnings), but I don't think the solution is to break the os.pathsep convention. Mark's suggestion is easy to remember and unambiguous.

@stefanv
Copy link
Member Author

stefanv commented Feb 18, 2019 via email

@scikit-image scikit-image locked and limited conversation to collaborators Oct 18, 2021
@grlee77 grlee77 added the ⏩ type: Enhancement Improve existing features label Mar 30, 2022
@scikit-image scikit-image unlocked this conversation Mar 30, 2022
@grlee77 grlee77 reopened this Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⏩ type: Enhancement Improve existing features
Projects
None yet
Development

No branches or pull requests

5 participants