} PrecisionWarning
ITK-SNAP Logo

Latest News:
04/22/24: ITK-SNAP 4.2.0 has been released!

ITK-SNAP Precision Warning

Sometimes, when you load an image, ITK-SNAP issues a warning about numerical precision. This page provides additional explanation of the warning and how it may affect your work.

To conserve memory, ITK-SNAP represents images internally using 16-bit integers. A 16-bit integer takes values between 0 and 65535. Most medical images have intensity values that are integers and fall in this range. But some images have intensity values that can not be represented by 16-bit integers. For example, images may have floating point intensity values, such as 0.45, or they may have values outside of the range [0, 65535].

You can still work with these images in ITK-SNAP. However, it is important to be aware that internally, these images are still represented by 16-bit integers. For example, if you load an image with intensities in the range [0.0 1.0], ITK-SNAP will linearly remap this intensity range to the range [0, 65535], so the value 0.0 will be represented internally by the integer 0, and value 1.0 will be represented by integer 65535. Suppose that a certain voxel has intensity 0.12345. ITK-SNAP will remap this voxel's intensity to the integer 8091 (i.e., 0.123456 * 65535, rounded to the nearest integer). When you place your cursor on this voxel, ITK-SNAP will remap the integer 8091 back to the range [0.0 1.0] in order to report an intensity value consistent with the image that you loaded. Thus, ITK-SNAP will report that the intensity value at this voxel is 0.123461 (i.e., 8091/65535), which is slightly different from the voxel's true intensity. Such a small error in precision may not be important for some users, but for others it may be of concern. For this reason, ITK-SNAP issues a warning when you load images with greater than 16-bit integer precision.

When this warning is issued, you should be cautious when saving the grayscale image to an image file. If you override the image you loaded originally, you will lose the numerical precision that was present in the image. For example, the voxel from the example above will be stored with the intensity value 0.123461.

If you want to know the precise intensity value at a voxel in ITK-SNAP, you can use the companion tool Convert3D. First, find out the coordinates of the voxel under the cursor by selecting "Tools->Image Info..." from the ITK-SNAP menu and looking for "Voxel Coordinates." Suppose the coordinates are 100,120,140. Then issue the following Convert3D command:

c3d myimage.nii -probe 100x120x140vox

This command will report the intensity value at the voxel under the cursor in full 64 bit double precision.

Page last modified on October 13, 2010, at 04:28 PM

    SourceForge.net Logo   Valid XHTML 1.0 Transitional