> Here's a much better version of the macro that transfers the metadata to the standard ImageJ metadata info location, so that further saving of the image in Tif preserves the metadata.
> Also, I'm using a list object constructed from the metadata, so that it's very easy to retrieve any other value.
>
>
> // retrieves the calibration info from tiff tag 34682
> // uses
https://imagej.nih.gov/ij/plugins/tiff-tags.html> // adapted from
https://imagej.nih.gov/ij/macros/SetScaleFromTiffTag.txt>
> tagnum=34682;
> path = getDirectory("image");
> if (path=="") exit ("path not available");
> name = getInfo("image.filename");
> if (name=="") exit ("name not available");
> path = path + name;
> tag = call("TIFF_Tags.getTag", path, tagnum);
> tag = replace(tag, " ", "\n");
> setMetadata("Info", tag);
> List.setList(tag);
> pixelSize = 1E6*List.getValue('PixelWidth');
> setVoxelSize(pixelSize, pixelSize, 1, "micron");
> // print (List.get("SystemType"));
>