[MM2] Correct pixel size not set for ImageJ

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[MM2] Correct pixel size not set for ImageJ

Jerome Mutterer
Hi,
From an ImageJ macro, getVoxelSize from Snap/Live window always return the same value, regardless of the actual pixel size.

getVoxelSize(x,y,z,unit);
print(x,y,z,unit);
// always return:
// 1 1 1 µm

Likewise, if you duplicate the Snap/Live window (ImageJ>Image>Duplicate...), the result image has always the same (1x1x1µm) calibration.

Jerome.


 
--
Jerome Mutterer
CNRS - Institut de biologie moléculaire des plantes
12, rue du Général Zimmer
67084 Strasbourg Cedex

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: [MM2] Correct pixel size not set for ImageJ

Nico Stuurman-2
Hi Jerome,


On 4/6/17 7:48 AM, Jerome Mutterer wrote:
> From an ImageJ macro, getVoxelSize from Snap/Live window always return
> the same value, regardless of the actual pixel size.
>
> getVoxelSize(x,y,z,unit);
> print(x,y,z,unit);
> // always return:
> // 1 1 1 µm
Using MM 2.0.x dev (equivalent to a recent nightly build) and the demo
configuration with the 40x objective, I snapped an image and run your
ImageJ macro.  The Log window shows:

0.25 0.25 1 µm

> Likewise, if you duplicate the Snap/Live window
> (ImageJ>Image>Duplicate...), the result image has always the same
> (1x1x1µm) calibration.

I get the expected 0.25 x 0.25 x 1 micron calibration.


You may be using another version of MM 2.0, or the behavior you observe
is caused by using another locale.  Would be great to check the logs for
information.

Best,

Nico


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: [MM2] Correct pixel size not set for ImageJ

Jerome Mutterer
Hi Nico,
Thanks for looking into this.
Actually, I get two different behaviours depending on whether I first snap an image or change the objective.

Both with Micro-Manager-2.0.0-beta3-20170405 mac version.

1- start MM2 with demo config
change objective to 40x
snap an image
run the test macro => 0.25 0.25 1 µm (correct)

2- start MM2 with demo config
snap an image at default 10x
change objective to 40x
snap an image
run the test macro => 1 1 1 µm  (not correct)

Attached is a screenshot of the second situation and the log file of this session.

Thanks !

Jerome.


Images intégrées 1

2017-04-06 19:26 GMT+02:00 Nico Stuurman <[hidden email]>:
Hi Jerome,


On 4/6/17 7:48 AM, Jerome Mutterer wrote:
> From an ImageJ macro, getVoxelSize from Snap/Live window always return
> the same value, regardless of the actual pixel size.
>
> getVoxelSize(x,y,z,unit);
> print(x,y,z,unit);
> // always return:
> // 1 1 1 µm
Using MM 2.0.x dev (equivalent to a recent nightly build) and the demo
configuration with the 40x objective, I snapped an image and run your
ImageJ macro.  The Log window shows:

0.25 0.25 1 µm

> Likewise, if you duplicate the Snap/Live window
> (ImageJ>Image>Duplicate...), the result image has always the same
> (1x1x1µm) calibration.

I get the expected 0.25 x 0.25 x 1 micron calibration.


You may be using another version of MM 2.0, or the behavior you observe
is caused by using another locale.  Would be great to check the logs for
information.

Best,

Nico


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general



--
Jerome Mutterer
CNRS - Institut de biologie moléculaire des plantes
12, rue du Général Zimmer
67084 Strasbourg Cedex

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

CoreLog20170406T213148_pid3301.txt (48K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [MM2] Correct pixel size not set for ImageJ

Nico Stuurman-2
Hi Jerome,


> Thanks for looking into this.
> Actually, I get two different behaviours depending on whether I first
> snap an image or change the objective.
>
> Both with Micro-Manager-2.0.0-beta3-20170405 mac version.
>
> 1- start MM2 with demo config
> change objective to 40x
> snap an image
> run the test macro => 0.25 0.25 1 µm (correct)
>
> 2- start MM2 with demo config
> snap an image at default 10x
> change objective to 40x
> snap an image
> run the test macro => 1 1 1 µm (not correct)

I agree that is a bug (would be useful to report on the github issue
page: https://github.com/micro-manager/micro-manager), however, you can
easily work around it by closing the Snap/live window after you switch
objectives.  The new Snap/Live window will have the correct information
(even in ImageJ).

Best,

Nico


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: [MM2] Correct pixel size not set for ImageJ

mutterer
Hi Nico. 
Thanks for the workaround, this actually works.

For the record, I filed the issue here:

Best. 
Jerome. 

Le 7 avr. 2017 2:25 AM, "Nico Stuurman" <[hidden email]> a écrit :
Hi Jerome,


> Thanks for looking into this.
> Actually, I get two different behaviours depending on whether I first
> snap an image or change the objective.
>
> Both with Micro-Manager-2.0.0-beta3-20170405 mac version.
>
> 1- start MM2 with demo config
> change objective to 40x
> snap an image
> run the test macro => 0.25 0.25 1 µm (correct)
>
> 2- start MM2 with demo config
> snap an image at default 10x
> change objective to 40x
> snap an image
> run the test macro => 1 1 1 µm (not correct)

I agree that is a bug (would be useful to report on the github issue
page: https://github.com/micro-manager/micro-manager), however, you can
easily work around it by closing the Snap/live window after you switch
objectives.  The new Snap/Live window will have the correct information
(even in ImageJ).

Best,

Nico


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general