Arcadia-Science / readlif

Leica Image Format (LIF) file reader for Python
GNU General Public License v3.0
32 stars 13 forks source link

Integer dims #4

Closed pedropgusmao closed 4 years ago

pedropgusmao commented 4 years ago

Hello, Thanks for sharing the code. I was wondering if it would be better if the dims inside the info dictionary could a tuple of integers instead of strings. Thanks

nimne commented 4 years ago

Hi, thanks for taking the time to write some feedback on this package!

The reason this happened in the first place is that all of the data in the info dictionary (except scale, which is calculated) is pulled straight from the embedded XML without type conversion.

However, I think it is probably a good idea to more clearly define what the possible of values are. At the moment, the info dictionary has dims, path, name, channels, and scale. For image data, both dims and channels will always be integers unless something goes wrong - in which case, it would be an invalid file anyway. I think it's a good idea to change this! I'm happy to take a look at a pull request, or I'll have time to update this later this week.

nimne commented 4 years ago

Fixed in #6