imagej / ImageJ

Public domain software for processing and analyzing scientific images
http://imagej.org
Other
513 stars 218 forks source link

support tiff tags for image origin #213

Closed jangarrevoet closed 1 year ago

jangarrevoet commented 1 year ago

Hi, It seems that imagej is ignoring the origin tags (286 and 287) included in the tiff file. I had at a file which had the origin added via Image --> Adjust --> Coordinates, but this writes the values away in the tags 270, 50838, and 50839. It even overwrites some standard tags like 296, which is the unit. I would prefer to stick to writing the tiff standard instead of writing metadata to the tiffs that can only be read by imagej and is, as far I have found, largely undocumented. Is there a possibility to incorporate this? Thanks in advance, Jan

rasband commented 1 year ago

The image origin is saved in the image description tag (270), where is can be easily retrieved. I generated the following tiff header dump by enabling debug mode and opening the file.

Screenshot

jangarrevoet commented 1 year ago

I have seen this, but this is not the question, the question is to support the tiff tags that are meant for this, namely 286 and 287. I have to support multiple tiff viewers and would thus like to stick to the tiff standard and not the standard of imagej.

rasband commented 1 year ago

You could ask the Bio-Formats team to add support for tiff tags 286 and 287.

jangarrevoet commented 1 year ago

I don't understand why it can not simply be supported natively. There is already native support for the pixel size, then why not simply add support for the origin as well?