Exposure Property in main window

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

Exposure Property in main window

Matthew Milford
Hi folks,

I'm trying to fix/enhance the functionality of the Andor device adapter, specifically I'm looking at exposure times.  In some modes, with some settings applied, enforces a lower bound on the exposure time, e.g. turning frame transfer on on an iXon camera forces a minimum exposure time.  

For this I am trying to change the functionality of the device adapter to update the actual exposure time by polling the camera for the new value.  If I call OnPropertyChanged(EXPOSUREKEYWORD, exposureFromCam) I can update the property with the new value.  However this only updates the exposure in the Device/Property window not the main GUI.  

Should the Exposure in the main window update or do I have to call OnPropertiesChanged() and update all properties?

Calling OnPropertiesChanged() is proving to be problematic since it's very easy to make micro-manager hang by calling this fucntion.  

Regards,
Matt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exposure Property in main window

Nico Stuurman
Administrator
Hi Matt,

> I'm trying to fix/enhance the functionality of the Andor device adapter,
> specifically I'm looking at exposure times.  In some modes, with some
> settings applied, enforces a lower bound on the exposure time, e.g. turning
> frame transfer on on an iXon camera forces a minimum exposure time.  
>
> For this I am trying to change the functionality of the device adapter to
> update the actual exposure time by polling the camera for the new value.  If
> I call OnPropertyChanged(EXPOSUREKEYWORD, exposureFromCam) I can update the
> property with the new value.  However this only updates the exposure in the
> Device/Property window not the main GUI.  

Very good point!

To facilitate this issue, I created a callback "OnExposureChanged". Using the very latest code, you can call it using the signature:

GetCoreCallback()->OnExposureChanged(this, newExposure);

This will update the exposure time displayed in the GUI.  It is probably the best strategy to only call this callback when the exposure time is changed by the device adapter itself, i.e. not when the exposure time is changed through the API call "SetExposure".  We will need to think that issue through a bit (mainly to avoid setting the display twice, which does not seem to be a big deal performance-wise anyways).



Best,

Nico




------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exposure Property in main window

Matthew Milford
Nico,

Thanks for this, I'll let you know how I get on implementing this.

Regards,
Matt
Loading...