Open dietzc opened 8 years ago
I am pretty new to SCIFIO but I think you probably mean these lines in the TIFFFormat.Writer class (around line 1640)
ifd.put(IFD.RESOLUTION_UNIT, 3);
ifd.put(IFD.X_RESOLUTION, new TiffRational((long) (physicalSizeX * 1000 * 10000), 1000));
ifd.put(IFD.Y_RESOLUTION, new TiffRational((long) (physicalSizeY * 1000 * 10000), 1000));
The resolution is set without considering what unit the calibrated axes do really have and the 10000 leads me to the assumption the unit is always considered in µm and therefore the resolution is transferred into cm?
Writing an
ImgPlus
with calibrated axis astiff
orome.tiff
and reading it back in with theImgOpener
does not preserve calibration of the source image.