// 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); print (tag); i0 = indexOf(tag, "PixelWidth="); if (i0==-1) exit ("Scale information not found"); i1 = indexOf(tag, "=", i0); i2 = indexOf(tag, " ", i1); pixelSize = 1E6*substring(tag,i1+1,i2); setVoxelSize(pixelSize, pixelSize, 1, "micron"); -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html