atlab / scanreader

Python TIFF Stack Reader for ScanImage 5 scans (including multiROI).
MIT License
9 stars 11 forks source link

Added support for ScanImage 2020 #12

Closed horsto closed 3 years ago

horsto commented 3 years ago

The latest scanimage tifs ran into an error (see https://github.com/atlab/scanreader/issues/11). The problem seemed to have been that the version string is no longer encoded as string but as integer value in the header of the tif, such that the version search itself ran into a problem in scanreader.

I have updated the version matching such that it is backwards compatible and did a quick test on the recorded sample (see issue linked above) and older tifs. It seems to work fine, but I did not do an in depth validation (unit tests would be highly valuable I think).

Some fields seem to be missing (e.g. powerLimits) and others might have been added. However, the core functionality seems to be intact.

The fix follows previous PRs, for example https://github.com/atlab/scanreader/pull/10

ecobost commented 3 years ago

Hi @horsto thanks for fixing these, I ended up solving it in a slightly simpler way (by modifying the regular expression, see https://github.com/atlab/scanreader/commit/723ce4a61d9df017f7f33194638d8ded45ea66e7). I think that's a bit cleaner.

horsto commented 3 years ago

Thanks @ecobost, great that it is closed and thanks for fixing the regex!