Login  Register

Re: How to store double values

Posted by Michael Schmid on Mar 15, 2007; 11:35am
URL: http://imagej.273.s1.nabble.com/How-to-store-double-values-tp3700031p3700032.html

Hi Erwan,

the 32-bit images of ImageJ use the Java float type, which has
about 7 digits accuracy. See
   http://en.wikipedia.org/wiki/IEEE_754

There is no image type in ImageJ that uses double-precision 64 bit.

So, if you want to use your data as an image in ImageJ, you
cannot get more than about 7 digits accuracy, even if there are
formats that could store images with higher accuracy (FITS).
Also TIFF could be used to store 64 bit images by setting the
"BitsPerSample" tag to 64.

Michael

On 15 Mar 2007, at 08:18, erwan bocher wrote:

> Hi list,
>
> I use ImageJ to read a text image and store it into a tiff file.
>
> For example, I have this matrix :
>
> 1 1.123456789 2.123456789
> 2 2 2
> 11 3.12345678
>
> When I save my text image in TIFF, ImageJ trim the decimal values.  
> (Note I
> have modified the precision to 10 in the IJ_Prefs.txt file ).
> My new values :
>
> 1.000000000    1.123456836    2.123456716
> 2.000000000    2.000000000    2.000000000
> 1.000000000    1.000000000    3.123456716
>
> Have you got any idea ?
>
> Thanks.
>
> R1.