Closed tlnagy closed 4 years ago
This isn't that straight-forward because it looks like UUIDs aren't actually required.
Any update?
None. I would be happy to review a PR if you want to give it a stab.
If you're trying it on a single file OME-TIFF and getting that error then it might be caused by this line:
https://github.com/tlnagy/OMETIFF.jl/blob/60c3c80534f465309ff8010c493520872fbd4b97/src/files.jl#L139
Replacing that line with TiffFile(open(filepath))
instead will bypass the error message, potentially. I haven't tested that though.
More generally, the flexibility of the OMETIFF file spec hurts us here because UUIDs and filepaths are both optional. I think the longer term strategy is to update the TiffFile constructor with the logic from here:
The FileName attribute of the UUID is optional, but strongly recommended—otherwise, the OME-TIFF reader must scan OME-TIFF files in the working directory looking for matching UUID signatures.
So I believe the approach should be to scan the directory of the filepath and load each ome.tif
and check its XML to see if the UUID matches the reference.
It is a long holiday with big chunk time next week, then I will attempt to follow your advice.
It ended up being a little more difficult than anticipated but it should be resolved by #62.
The one exception that still needs to be resolved is if you have a multiple file OME-TIFF that you've renamed one or multiple files.
OMETIFF v0.3.6 has these fixes
It works smoothly.
I believe this logic here should be updated:
https://github.com/tlnagy/OMETIFF.jl/blob/b1b763752396dbaf076264c9df79d391301cbe9c/src/files.jl#L30-L31