thunder-project / thunder

scalable analysis of images and time series
http://thunder-project.org
Apache License 2.0
814 stars 184 forks source link

Adds tiff files when using images.fromtif default 'tif extension #357

Closed boazmohar closed 8 years ago

boazmohar commented 8 years ago

Solves #341 @freeman-lab What is a good default behavior as this is implemented now, it will not enable you to select either tif or tiff from your folders. I could change the default ext='tif' to `'ext='tifs' to make it possible, What do you think? Also didn't test with s3, any thoughts as to how?

freeman-lab commented 8 years ago

Cool @boazmohar ! I agree this would be good to support, another idea might be to just say if either tif or tiff is specified, we look for both of them? In other words, make it symmetric, whereas what you have only handles one of the cases. What do you think about that?

freeman-lab commented 8 years ago

For testing on s3, you could at least make sure thunder.images.fromexample('fish') works for you after this change, that loads tif files from s3 with the default settings. BTW we don't include that one in the test suits because it takes extra time and requires a network connection.

boazmohar commented 8 years ago

@freeman-lab Sure I can make it symmetric but what about a case where someone wants only tif or only tiff files. If you are OK without these options I am too. I thought to have a default of 'tifs' and that would be 'symmetric' as it will include tif and tiff. Specifying another extension will work as expected. Tell me what you prefer, I don't have a strong opinion either way.

boazmohar commented 8 years ago

@freeman-lab fish example is working. Thanks.

freeman-lab commented 8 years ago

Ah, totally see where you were coming from, I think my call would be to just make it symmetric, as both extensions really do fundamentally specify the same format (see e.g. http://superuser.com/questions/287776/differences-between-tiff-tif-tiff-tif), and it seems very unusual for people to have both in the same location.

boazmohar commented 8 years ago

@freeman-lab Thanks for the feedback, ready to merge in my opinion.

freeman-lab commented 8 years ago

ok great @boazmohar , merging this in!