Open hadim opened 10 years ago
By the OME-TIFF specification the OME-TIFF format must end in ome.tif
or ome.tiff
, so we can not add more suffix checking to this Format.
If it's some variant of .tif
or .tiff
it will likely come down to reading IFDs, as you mentioned, which has to be left up to the individual TIFF format (though a TIFFService would allow us to parse the IFD once and then pass it around, instead of reparsing for each TIFF flavor).
Ok. Thanks !
@hinerm: While it is true that the OME-TIFF specification mandates the use of .ome.tif
or .ome.tiff
extension, that was not always the case. So there are unfortunately older OME-TIFF files in the wild with extension .tif
and .tiff
and Bio-Formats makes an effort to support them. SCIFIO will need to do the same.
However, simply adding .tif
to the list of suffixes of OMETIFFFormat
is probably not the right answer. The Bio-Formats library currently sets suffixNecessary
and suffixSufficient
to false
to handle this case.
Anyway, I'm going to reopen this issue to make sure that TIFF files without .ome.tif
extension are still handled properly as OME-TIFFs, at least to the extent feasible.
Don't you think Tiff files should be checked even if they only have .tiff or .tif extension ?
In OMETIFFFormat.java:
could become
Now I don't know at which point it's computer heavy to test for OME Tiff format.
According to
isFormat
inChecker
(line 463), false is returned pretty quickly if xml string is not detected (see line 490). So between line 466 and line 485, it's all about reading the first IFD, which should has been done anyway.