unit issues since updating to version 1.51h

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

unit issues since updating to version 1.51h

Stephan Collins
Dear all,
1- we are having issues since applying an imageJ update:
In the 1.51h update,
"Thanks to Thorsten Wagner, TIFF files with cm units are now converted to µm units if the pixel width is less than 0.0001 cm."

As a result of this, Our scale is now switched by default to um rather than cm, and all the outputs (length, areas...).

We need to revert to cm units regardless since all our data collected thus far are in cm . Is there any way to deactivate this functionality or simply write in some sort of preferences file that we want all our data in cm  ?

2- Second problem
pressing Ctrl+M gives us 9 decimals, if we indicate 9 digits in set measurments, in the measures window but extracting these values using the "getResult("Length", 0);" command during a Macro for example, results in data which are inconsistently 4 to 8 decimals.
Any idea why ?

Many thanks
S

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unit issues since updating to version 1.51h

Wayne Rasband-2
> On Jun 8, 2017, at 8:06 AM, Stephan Collins <[hidden email]> wrote:
>
> Dear all,
> 1- we are having issues since applying an imageJ update:
> In the 1.51h update,
> "Thanks to Thorsten Wagner, TIFF files with cm units are now converted to µm units if the pixel width is less than 0.0001 cm."
>
> As a result of this, Our scale is now switched by default to um rather than cm, and all the outputs (length, areas...).
>
> We need to revert to cm units regardless since all our data collected thus far are in cm . Is there any way to deactivate this functionality or simply write in some sort of preferences file that we want all our data in cm  ?

In the latest daily build (1.51p1), you can deactivate this feature by adding

   setOption("ConvertToMicrons",false);

to the Edit>Options>Startup dialog box. Update to the daily build by using the Help>Update ImageJ command and selecting “daily build” from the drop down menu.

> 2- Second problem
> pressing Ctrl+M gives us 9 decimals, if we indicate 9 digits in set measurments, in the measures window but extracting these values using the "getResult("Length", 0);" command during a Macro for example, results in data which are inconsistently 4 to 8 decimals.
> Any idea why ?

The print() macro function defaults to 4 decimal places. You can override this default by using the d2s() function. For example, this macro

   run("Blobs (25K)");
   run("Measure");
   mean = getResult("Mean");
   print("mean="+d2s(mean,9));

outputs

   mean=103.268577756

-wayne

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unit issues since updating to version 1.51h

Stephan Collins
great thank you ! Inded it works and saves me a few lines of script


---------- Forwarded message ----------
From: Wayne Rasband <[hidden email]>
Date: 2017-06-08 17:42 GMT+02:00
Subject: Re: unit issues since updating to version 1.51h
To: [hidden email]


> On Jun 8, 2017, at 8:06 AM, Stephan Collins <[hidden email]>
wrote:
>
> Dear all,
> 1- we are having issues since applying an imageJ update:
> In the 1.51h update,
> "Thanks to Thorsten Wagner, TIFF files with cm units are now converted to
µm units if the pixel width is less than 0.0001 cm."
>
> As a result of this, Our scale is now switched by default to um rather
than cm, and all the outputs (length, areas...).
>
> We need to revert to cm units regardless since all our data collected
thus far are in cm . Is there any way to deactivate this functionality or
simply write in some sort of preferences file that we want all our data in
cm  ?

In the latest daily build (1.51p1), you can deactivate this feature by
adding

   setOption("ConvertToMicrons",false);

to the Edit>Options>Startup dialog box. Update to the daily build by using
the Help>Update ImageJ command and selecting “daily build” from the drop
down menu.

> 2- Second problem
> pressing Ctrl+M gives us 9 decimals, if we indicate 9 digits in set
measurments, in the measures window but extracting these values using the
"getResult("Length", 0);" command during a Macro for example, results in
data which are inconsistently 4 to 8 decimals.
> Any idea why ?

The print() macro function defaults to 4 decimal places. You can override
this default by using the d2s() function. For example, this macro

   run("Blobs (25K)");
   run("Measure");
   mean = getResult("Mean");
   print("mean="+d2s(mean,9));

outputs

   mean=103.268577756

-wayne

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html



--
Dr Stephan Collins
MCF - lecturer

IGBMC, CBI
room 3014
1 Rue Laurent Fries, 67400 Illkirch-Graffenstaden
Tel: 036948 5131

Université de Bourgogne
CSGA
9E Boulevard Jeanne d'Arc 21000 Dijon

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Loading...