Login  Register

Re: Calibrate function for 32bits images

Posted by Wayne Rasband-2 on Jul 11, 2019; 2:33am
URL: http://imagej.273.s1.nabble.com/Calibrate-function-for-32bits-images-tp5022314p5022317.html

> On Jul 10, 2019, at 4:25 AM, François Gannier <[hidden email]> wrote:
>
> Dear all (probably mostly Wayne)
>
> When I use  Analyse/calibrate in menu, I can set the unit for the value
> of a 32bits image.
> With the macro recorder, I obtain:
>             run("Calibrate...", "function=None"); \

Upgrade to the latest daily build (1.52q20) and you will get

    run("Calibrate...", "function=None unit=ms");

> the way the unit was set isn't shown and this isn't working in a macro.
>
> In a macro, I tried:
>             run("Calibrate...", "unit=ms");
> but this isn't working.

It will work if you upgrade to the daily build.

> More when you save the image, with the unit set, this isn't saved.

The unit is saved with the image.

> So, is It possible to add a way to set this unit in a macro for 32bits
> image and add this in the imageinfo just something like that:
> Calibration function: None
>   Unit: “ms"

Upgrade to the daily build, set the unit using

    run("Calibrate...", "function=None unit=ms”);

and the following information will be added to Image>Show Info window:

   Calibration function: None
     Unit: “ms"

This macro reproduces the problem:

   newImage("Untitled", "32-bit noise", 512, 512, 1);
   run("Calibrate...", "function=None unit=ms");
   run("Show Info...”);

-wayne

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