Can't Change Brightness/Contrast on GRAY scale Snap Image

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

Can't Change Brightness/Contrast on GRAY scale Snap Image

Mahesh Kakuturu
Hi All,

I am having hard time on adjusting Brightness/Contrast on GRAY images.
I took a Snap from MM and opened ImageJ Brightness/Contrast window. Trying to change the values through scroll bar. Seems it's trying to change but immediately coming back to the original image. I can observe the change in a fraction of second before the original image appears.
I am able to perform the same functionality successfully after saving the image and open from ImageJ open functionality but not on window opened from MM. is this a bug? or Am I doing anything wrong here. This functionality is working properly on color images(RGB) though. I am only seeing the problem on GRAY images.

--
Best Regards,
Mahesh Kakuturu
Sr. Software Engineer
Angstrom Science, Inc.

------------------------------------------------------------------------------
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: Can't Change Brightness/Contrast on GRAY scale Snap Image

Nico Stuurman-2
Hi Mahesh,

> I am having hard time on adjusting Brightness/Contrast on GRAY images.
> I took a Snap from MM and opened ImageJ Brightness/Contrast window.
> Trying to change the values through scroll bar. Seems it's trying to
> change but immediately coming back to the original image. I can
> observe the change in a fraction of second before the original image
> appears.

Micro-Manager display windows were not designed to be controlled from
ImageJ (i.e. this is not a bug, it is a feature).  Why don't you use the
Micro-Manager brightness/contrast controls (which imho are much nicer
than the ImageJ ones)?  If you insist on using the ImageJ controls,
duplicate your image to an ImageJ window.

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: Can't Change Brightness/Contrast on GRAY scale Snap Image

Mahesh Kakuturu
Hi Nico,

Thanks for the reply. I don't mind using MM controls for Brightness/Contrast functionality. Where is this functionality existed in Micro-Manager?

Regards,
Mahesh

On Wed, Oct 11, 2017 at 2:14 PM, Nico Stuurman <[hidden email]> wrote:
Hi Mahesh,

I am having hard time on adjusting Brightness/Contrast on GRAY images.
I took a Snap from MM and opened ImageJ Brightness/Contrast window. Trying to change the values through scroll bar. Seems it's trying to change but immediately coming back to the original image. I can observe the change in a fraction of second before the original image appears.

Micro-Manager display windows were not designed to be controlled from ImageJ (i.e. this is not a bug, it is a feature).  Why don't you use the Micro-Manager brightness/contrast controls (which imho are much nicer than the ImageJ ones)?  If you insist on using the ImageJ controls, duplicate your image to an ImageJ window.

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



--
Best Regards,
Mahesh Kakuturu
Sr. Software Engineer
Angstrom Science, Inc.

------------------------------------------------------------------------------
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: Can't Change Brightness/Contrast on GRAY scale Snap Image

Mahesh Kakuturu
HI Nico,

Little googling helped me to figure out changing Brightness/Contrast from Micro-Manager.
Unfortunately, I don't have a histogram for 32 bit GRAY scale image. Is there  an other way I can adjust like through a plugin.
Or I have to live with adjusting from ImageJ controls on Duplicate window.
Thanks for your suggestion though.

On Wed, Oct 11, 2017 at 2:31 PM, Mahesh Kakuturu <[hidden email]> wrote:
Hi Nico,

Thanks for the reply. I don't mind using MM controls for Brightness/Contrast functionality. Where is this functionality existed in Micro-Manager?

Regards,
Mahesh

On Wed, Oct 11, 2017 at 2:14 PM, Nico Stuurman <[hidden email]> wrote:
Hi Mahesh,

I am having hard time on adjusting Brightness/Contrast on GRAY images.
I took a Snap from MM and opened ImageJ Brightness/Contrast window. Trying to change the values through scroll bar. Seems it's trying to change but immediately coming back to the original image. I can observe the change in a fraction of second before the original image appears.

Micro-Manager display windows were not designed to be controlled from ImageJ (i.e. this is not a bug, it is a feature).  Why don't you use the Micro-Manager brightness/contrast controls (which imho are much nicer than the ImageJ ones)?  If you insist on using the ImageJ controls, duplicate your image to an ImageJ window.

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



--
Best Regards,
Mahesh Kakuturu
Sr. Software Engineer
Angstrom Science, Inc.



--
Best Regards,
Mahesh Kakuturu
Sr. Software Engineer
Angstrom Science, Inc.

------------------------------------------------------------------------------
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: Can't Change Brightness/Contrast on GRAY scale Snap Image

Nico Stuurman-2
Reorganized this post a little bit so that it is actually readable top
to bottom.  For my reply, just scroll to the bottom.  In general, this
is how I like it, and I may not respond to top-posted emails on this list...

On 10/11/17 11:50 AM, Mahesh Kakuturu wrote:

>     I am having hard time on adjusting Brightness/Contrast on GRAY images.
>
>         I took a Snap from MM and opened ImageJ Brightness/Contrast
>         window. Trying to change the values through scroll bar. Seems
>         it's trying to change but immediately coming back to the
>         original image. I can observe the change in a fraction of
>         second before the original image appears.
>
>
>     Micro-Manager display windows were not designed to be controlled
>     from ImageJ (i.e. this is not a bug, it is a feature).  Why don't
>     you use the Micro-Manager brightness/contrast controls (which imho
>     are much nicer than the ImageJ ones)?  If you insist on using the
>     ImageJ controls, duplicate your image to an ImageJ window.


> Little googling helped me to figure out changing Brightness/Contrast
> from Micro-Manager.

Not much googling needed:
https://micro-manager.org/wiki/Micro-Manager_User%27s_Guide#Histogram.2C_Brightness_and_Contrast

Sorry to ask, but how can you can see this when working with Micro-Manager?

> Unfortunately, I don't have a histogram for 32 bit GRAY scale image.

Why not?  That makes 32-bit Gray scale support pretty useless.  If you
really want 32-bit Gray scale support, then I would figure out what is
going wrong and fix it.


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: Can't Change Brightness/Contrast on GRAY scale Snap Image

Mahesh Kakuturu
Hi Nico,

I must use the 32 bit GRAY scale images for the AFM controller that I implemented using Micro-Manager.
ImageJ library has not implemented histogram calculation for FloatProcessor(32 bit). It returns null.

From the file SingleChannelHistogram.java
int[] rawHistogram = img_.getProcessor().getHistogram(); returns null.

I also asked ImageJ community about this, They have not responded.
The solution is to either fix it in ImageJ or overwrite this function in Micro-Manager for 32bit GRAY scale.



On Wed, Oct 11, 2017 at 4:45 PM, Nico Stuurman <[hidden email]> wrote:
Reorganized this post a little bit so that it is actually readable top to bottom.  For my reply, just scroll to the bottom.  In general, this is how I like it, and I may not respond to top-posted emails on this list...

On 10/11/17 11:50 AM, Mahesh Kakuturu wrote:

    I am having hard time on adjusting Brightness/Contrast on GRAY images.

        I took a Snap from MM and opened ImageJ Brightness/Contrast
        window. Trying to change the values through scroll bar. Seems
        it's trying to change but immediately coming back to the
        original image. I can observe the change in a fraction of
        second before the original image appears.


    Micro-Manager display windows were not designed to be controlled
    from ImageJ (i.e. this is not a bug, it is a feature).  Why don't
    you use the Micro-Manager brightness/contrast controls (which imho
    are much nicer than the ImageJ ones)?  If you insist on using the
    ImageJ controls, duplicate your image to an ImageJ window.


Little googling helped me to figure out changing Brightness/Contrast from Micro-Manager.

Not much googling needed: https://micro-manager.org/wiki/Micro-Manager_User%27s_Guide#Histogram.2C_Brightness_and_Contrast

Sorry to ask, but how can you can see this when working with Micro-Manager?

Unfortunately, I don't have a histogram for 32 bit GRAY scale image.

Why not?  That makes 32-bit Gray scale support pretty useless.  If you really want 32-bit Gray scale support, then I would figure out what is going wrong and fix it.



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



--
Best Regards,
Mahesh Kakuturu
Sr. Software Engineer
Angstrom Science, Inc.

------------------------------------------------------------------------------
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: Can't Change Brightness/Contrast on GRAY scale Snap Image

PEARSON Matthew
In reply to this post by Mahesh Kakuturu
Hi Mahesh,

I don't have a solution for you but we have experienced this also.  It seems to be that the brightness adjustment in Micro-Manager competes with the adjustments you try to make from the imageJ menu because the window is associated with Micro-Manager and so the mapping function there seems to have priority over anything you do in the ImageJ menu.  As soon as you dissociate the image from micro-maneger i.e. close the MM window and then open the image through imageJ directly, Micro-manager knows nothing of this image window and so no longer tries to override brightness adjustments. 

I wasn't aware that Micro-Manager generated RGB images by default.  With our colour cameras the image is 3 16bit images displayed as a composite to give colour and i would expect the same behaviour there so odd that it's different.  Unless you have a camera that actually generates 24bit colour images by default.

Thanks,

Matt 

--
Matt Pearson
Microscopy Facility
MRC Human Genetics Unit
Institute of Genetics and Molecular Medicine (IGMM)
University of Edinburgh
Crewe Road
EH4 2XU




On 11 Oct 2017, at 16:01, Mahesh Kakuturu <[hidden email]> wrote:

Hi All,

I am having hard time on adjusting Brightness/Contrast on GRAY images.
I took a Snap from MM and opened ImageJ Brightness/Contrast window. Trying to change the values through scroll bar. Seems it's trying to change but immediately coming back to the original image. I can observe the change in a fraction of second before the original image appears.
I am able to perform the same functionality successfully after saving the image and open from ImageJ open functionality but not on window opened from MM. is this a bug? or Am I doing anything wrong here. This functionality is working properly on color images(RGB) though. I am only seeing the problem on GRAY images.

--
Best Regards,
Mahesh Kakuturu
Sr. Software Engineer
Angstrom Science, Inc.
------------------------------------------------------------------------------
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


The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

------------------------------------------------------------------------------
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: Can't Change Brightness/Contrast on GRAY scale Snap Image

Mahesh Kakuturu
Hi Matt,

Thanks for your detailed information. Seems like Image updated event from ImageJ is trying to calculate new histogram and reset the brightness/contrast.
If I can spend some time on debugging this I might fix. But, I have other important priorities. I might look into this later.
Now I reached my goal of adjusting Contrast/Brightness from Micro-manager itself for 32 bit GRAY scale images. It just took me 30 minutes to implement Histogram calculation for float data in ImageJ and everything in place now. I don't know why ImageJ community left this functionality. Anyway, I got my functionality working and I am on track.
Thank you all for your help.


On Thu, Oct 12, 2017 at 6:26 AM, PEARSON Matthew <[hidden email]> wrote:
Hi Mahesh,

I don't have a solution for you but we have experienced this also.  It seems to be that the brightness adjustment in Micro-Manager competes with the adjustments you try to make from the imageJ menu because the window is associated with Micro-Manager and so the mapping function there seems to have priority over anything you do in the ImageJ menu.  As soon as you dissociate the image from micro-maneger i.e. close the MM window and then open the image through imageJ directly, Micro-manager knows nothing of this image window and so no longer tries to override brightness adjustments. 

I wasn't aware that Micro-Manager generated RGB images by default.  With our colour cameras the image is 3 16bit images displayed as a composite to give colour and i would expect the same behaviour there so odd that it's different.  Unless you have a camera that actually generates 24bit colour images by default.

Thanks,

Matt 

--
Matt Pearson
Microscopy Facility
MRC Human Genetics Unit
Institute of Genetics and Molecular Medicine (IGMM)
University of Edinburgh
Crewe Road
EH4 2XU




On 11 Oct 2017, at 16:01, Mahesh Kakuturu <[hidden email]> wrote:

Hi All,

I am having hard time on adjusting Brightness/Contrast on GRAY images.
I took a Snap from MM and opened ImageJ Brightness/Contrast window. Trying to change the values through scroll bar. Seems it's trying to change but immediately coming back to the original image. I can observe the change in a fraction of second before the original image appears.
I am able to perform the same functionality successfully after saving the image and open from ImageJ open functionality but not on window opened from MM. is this a bug? or Am I doing anything wrong here. This functionality is working properly on color images(RGB) though. I am only seeing the problem on GRAY images.

--
Best Regards,
Mahesh Kakuturu
Sr. Software Engineer
Angstrom Science, Inc.
------------------------------------------------------------------------------
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


The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

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




--
Best Regards,
Mahesh Kakuturu
Sr. Software Engineer
Angstrom Science, Inc.

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