Reputation: 31
I load a .tif file from a microscopy experiment into ImageJ, and it tells me the dimensions of the field of view of the microscope (424.27x424.27 microns). To access this in ImageJ, I go to the Image tab, then 'show info', and then scroll to the bottom to find this data:microscopy metadata in imageJ
How can I access this data in python? My aim is to show microscopy data in python, which I have already done, but I want to have the x and y axes of the figure going up to 424.27 microns.
Thanks!
Upvotes: 0
Views: 1439
Reputation: 114
I think the data may be related to the tiff tag x_resolution and y_resolution. See the link for more details about some baseline tiff tags: https://www.awaresystems.be/imaging/tiff/tifftags/baseline.html
tifffile may be helpful. Install and import it, I think the code sample on its website is what you want.
with TiffFile('temp.tif') as tif:
... tag = tif.pages[0].tags['XResolution']
Upvotes: 1