Login  Register

Re: unit issues since updating to version 1.51h

Posted by Wayne Rasband-2 on Jun 08, 2017; 3:42pm
URL: http://imagej.273.s1.nabble.com/unit-issues-since-updating-to-version-1-51h-tp5018865p5018869.html

> 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