Posted by
Michael Schmid on
Oct 16, 2017; 11:28am
URL: http://imagej.273.s1.nabble.com/Writing-Pixel-Calibration-to-Tiff-File-tp5019543p5019550.html
Hi Cameron,
you get more information about a tiff file if you select 'Debug mode' in
Edit>Options>Misc and open a tiff file.
Then you will see that there is an 'Image Description' which is plain
text and stored under the tiff tag 270, IMAGEDESCRIPTION
Example 'Image Description' (for an image with x, y units 'nm' and pixel
value units 'pm':
ImageJ=1.51p unit=nm vunit=pm min=-136.18 max=274.05
From the JavaDoc of ij.io.TiffDecoder.java:
/** Save the image description in the specified FileInfo. ImageJ
saves spatial and density calibration data in this string. For
stacks, it also saves the number of images to avoid having to
decode an IFD for each image. */
public void saveImageDescription
ImageJ will interpret the 'Image Description' only for files written by
ImageJ.
For writing tiffs by other software, I would recommend to set a
calibration in centimeters. You can then use the
setOption("ConvertToMicrons",boolean) macro function in your
StartupMacros. When this option is set, units in TIFF images are
converted to microns if the pixel width is less than 0.0001 cm.
Michael
________________________________________________________________
On 16/10/2017 11:15, Cameron Nowell wrote:
> Howdy,
>
> I have been hunting around and generally getting more confused.
>
> Does anyone know where/how the calibration info is saved into a tiff file
> from either outside imagej or within? The tiff standard doesn't seem to
> allow a micron calibration yet it obviously works.
>
> Would like to get some custom hardware and software writing out properly
> calibrated tiff images.
>
> Thanks
>
> Cam
>
>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html