How to store double values

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

How to store double values

ebocher
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.
Reply | Threaded
Open this post in threaded view
|

Re: How to store double values

seb-7
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 ?

Hi Erwan,
I don't know how to solve your problem, but here is an explanation:
I think you want 64-bit (double) floating values, but here you have only
32-bit floats (simple).
Using simple floats you therefore have about 6 "exact" digits, instead
of 15 digits with 64-bit floats.
I don't think we have 64-bit TIFF_DOUBLE in ImageJ, but I think you can
use 64-bit Raw files and the FITS_Reader also supports the
"GRAY64_FLOAT" type.
http://fits.gsfc.nasa.gov/fits_intro.html#Description
So maybe you need to use fits instead of tiff for your high-accuracy
matrix storage.
Regards,
sebastien
Reply | Threaded
Open this post in threaded view
|

Re: How to store double values

Michael Schmid
In reply to this post by ebocher
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.
Reply | Threaded
Open this post in threaded view
|

FilterTester

Gabriel Landini
Michael,

Is there a "FilterTesterTasklist.txt" sample file available to run the
FilterTester macro:
http://rsb.info.nih.gov/ij/macros/FilterTester.txt

From the info in the macro, I do not get how to use it.
Thanks!

G.
Reply | Threaded
Open this post in threaded view
|

Re: FilterTester

Wayne Rasband
> Is there a "FilterTesterTasklist.txt" sample file available to run the
> FilterTester macro:
> http://rsb.info.nih.gov/ij/macros/FilterTester.txt
>
> From the info in the macro, I do not get how to use it.

The "FilterTesterTasklist.txt" file is in the same folder as
"FilterTester.txt", so the URL is

      fttp://rsb.info.nih.gov/ij/macros/FilterTesterTasklist.txt

The easiest way to find out about new macros is to go to

      http://rsb.info.nih.gov/ij/macros/

and click twice on the "Last modified" column heading. This morning you
will see there is a new version of the FilterTester, dated 15 March.

-wayne
Reply | Threaded
Open this post in threaded view
|

Problem with X-axis rotating Max Intensity 3D Projections

Bill Mohler
I have noticed this problem for several years/versions now, but have
forgotten to report it until now.

Using the Maximum Intensity selection for 3D Project, I get
dramatically different results for rotation around the X and Y axes.
In brief, Y axis looks correct like a MIP should, and X axis looks
wrong, as though it were "Nearest", or "Minimum" (or something other).

Has anyone else noticed this?

Bill
--
-----------------
William A. Mohler
Associate Professor
Dept. of Genetics and Developmental Biology
University of Connecticut Health Center
MC-3301
263 Farmington Ave.
Farmington, CT   06030-3301

[hidden email]
Office: (860) 679-1833, room E2056
Lab: (860) 679-1834, room E2052
Mobile: (860) 985-2719
Fax: (860) 760-6140
G&DB dept. ofc.: (860) 679-8350
G&DB dept. fax : (860) 679-8345
http://genetics.uchc.edu/Faculty/Mohler/Mohler.html
Reply | Threaded
Open this post in threaded view
|

Re: Problem with X-axis rotating Max Intensity 3D Projections

Jeff Hardin
Hi Bill,

I've had the same problem; the only solution was to roll my own  
plugins/macros that do a rotation of the whole stack prior to its  
projection. Note, however, that this makes for problems with red/cyan  
or red/green anaglyphs. The pixel registration, after rotating back,  
isn't quite right. :-(

Cheers,

Jeff
----------------------------------------------
Jeff Hardin
Professor, Department of Zoology
Director, Biology Core Curriculum
University of Wisconsin
1117 W. Johnson St.
Madison, WI 53706
voice: (608) 262-9634
fax: (608) 262-7319
email: [hidden email]


On Mar 15, 2007, at 11:00 PM, IMAGEJ automatic digest system wrote:

> Date:    Thu, 15 Mar 2007 20:49:33 -0400
> From:    Bill Mohler <[hidden email]>
> Subject: Problem with X-axis rotating Max Intensity 3D Projections
>
> I have noticed this problem for several years/versions now, but have
> forgotten to report it until now.
>
> Using the Maximum Intensity selection for 3D Project, I get
> dramatically different results for rotation around the X and Y axes.
> In brief, Y axis looks correct like a MIP should, and X axis looks
> wrong, as though it were "Nearest", or "Minimum" (or something other).
>
> Has anyone else noticed this?
>
> Bill
> --
> -----------------
> William A. Mohler
> Associate Professor
> Dept. of Genetics and Developmental Biology
> University of Connecticut Health Center
> MC-3301
> 263 Farmington Ave.
> Farmington, CT   06030-3301
Reply | Threaded
Open this post in threaded view
|

Re: Problem with X-axis rotating Max Intensity 3D Projections

Bill Mohler
In reply to this post by Bill Mohler
Thanks, Jeff-

Actually it looks like Wayne has fixeb the problem early this morning in version 1.38m!

We've been you using your trick, too...

Bill
-----Original Message-----

From:  Jeff Hardin <[hidden email]>
Subj:  Re: Problem with X-axis rotating Max Intensity 3D Projections
Date:  Fri Mar 16, 2007 8:41 am
Size:  1K
To:  [hidden email]

Hi Bill,

I've had the same problem; the only solution was to roll my own  
plugins/macros that do a rotation of the whole stack prior to its  
projection. Note, however, that this makes for problems with red/cyan  
or red/green anaglyphs. The pixel registration, after rotating back,  
isn't quite right. :-(

Cheers,

Jeff
----------------------------------------------
Jeff Hardin
Professor, Department of Zoology
Director, Biology Core Curriculum
University of Wisconsin
1117 W. Johnson St.
Madison, WI 53706
voice: (608) 262-9634
fax: (608) 262-7319
email: [hidden email]


On Mar 15, 2007, at 11:00 PM, IMAGEJ automatic digest system wrote:

> Date:    Thu, 15 Mar 2007 20:49:33 -0400
> From:    Bill Mohler <[hidden email]>
> Subject: Problem with X-axis rotating Max Intensity 3D Projections
>
> I have noticed this problem for several years/versions now, but have
> forgotten to report it until now.
>
> Using the Maximum Intensity selection for 3D Project, I get
> dramatically different results for rotation around the X and Y axes.
> In brief, Y axis looks correct like a MIP should, and X axis looks
> wrong, as though it were "Nearest", or "Minimum" (or something other).
>
> Has anyone else noticed this?
>
> Bill
> --
> -----------------
> William A. Mohler
> Associate Professor
> Dept. of Genetics and Developmental Biology

--- message truncated ---


William A. Mohler
Dept. Genetics & DevBio
UConn Health Center
p: 860-679-1833
c: 860-985-2719
Reply | Threaded
Open this post in threaded view
|

Re: Problem with X-axis rotating Max Intensity 3D Projections

Michael Doube-2
In reply to this post by Bill Mohler
Hi Bill,

I had noticed in the past that max projections didn't look quite right,
but hadn't realised there was a difference between x and y axis
rotations. The bug is present in ImageJ v. 1.38j, Java 1.6.0, WinXP SP2.

FYI, I've been getting good surface projection results using the 3D
Volume Viewer plugin: http://rsb.info.nih.gov/ij/plugins/volume-viewer.html

which I animate with a macro that I wrote this week:
http://doube.net/macros.html#volslice

Mike

Bill Mohler wrote:

> I have noticed this problem for several years/versions now, but have
> forgotten to report it until now.
>
> Using the Maximum Intensity selection for 3D Project, I get
> dramatically different results for rotation around the X and Y axes.
> In brief, Y axis looks correct like a MIP should, and X axis looks
> wrong, as though it were "Nearest", or "Minimum" (or something other).
>
> Has anyone else noticed this?
>