Tiff writing/reading should support metadata #177
Certain image metadata does not make the roundtrip from save to disk to load from disk with Imglib/Scifio's Tiff support. For instance the X, Y, Z, and T calibrations are set before disk write. However our tiff writing code cannot save Z or T because there are not baseline tiff tags that save that data. So saving and then loading a tiff results in Z & T as NaNs. (Side note: ImgOpener could at least default them to 1.0 rather than NaN).
We need to somehow maintain Z & T and other metadata. IJ1 takes the approach of writing its own variant of Tiff and reading that same variant. We could use that variant but that may be too limiting. We could use ome-tiff but adopting ome-tiff may alienate users who are not associated with microscopy. Or we could define our own variant.
One thing to check is if we can extend IJ1's variant and still have IJ1 read the data. There is the case where IJ1 will handle it and the case where IJ1 run from within Ij2 (and using Javassist if needed) will handle it. We don't necessarily need to support the first case.
In the shortest term using libtiff utils or imagemagiack we should play with header changes of IJ1 tiff files and see how IJ1 handles it.
After enabling SCIFIO in ImageJ2 for the first time (2.0.0 rc6), I find that the XResolution & YResolution tiff tags no longer set the ImageJ scale of a TIFF that is read. I have a proprietary example image that shows this. I couldn't find a good example image in File->Open Samples.
Without SCIFIO, the image subtitle of my particular example reads:
With SCIFIO, the subtitle reads:
I'm not sure if this belongs in this issue or if it is a new issue. I'll write it up as a separate issue if you like.