top bar

Version 2.0 API Events

Revision as of 11:29, 30 March 2020 by Nico (Talk | contribs)

This page documents the various events that the 2.0 API exposes, and what you need to subscribe to to access those events.

Global events

These events are posted to the EventManager. You can subscribe to them via The full list of Events can be found here. Some examples:

  • DatastoreClosingEvent: a Datastore was closed.
  • DisplayAboutToShowEvent: a DisplayWindow is just about to show its GUI, which happens once there's at least one image for it to display.
  • NewDisplayEvent: a new DisplayWindow was created. This is posted before that display's GUI becomes available.
  • LiveModeEvent: Live mode was started or stopped

In addition to the above, the various events made available in 1.4 are still present:

  • PropertiesChangedEvent: A Device Adapter has notified the core that at least one device property has changed. Note that not all property changes result in notifications; the adapter must be specifically coded to send them.
  • PropertyChangedEvent: As above, but for a specific property.
  • ConfigGroupChangedEvent: a config group has changed which preset it is using.
  • SystemConfigurationLoadedEvent: a new config file has been loaded.
  • PixelSizeChangedEvent: the pixel size has changed.
  • StagePositionChangedEvent: a Z positioner has moved.
  • XYStagePositionChangedEvent: an XY positioner has moved.
  • ExposureChangedEvent: the exposure time has changed.
  • SLMExposureChangedEvent: the exposure time of an SLM device has changed.

Display events

These events are specific to a single DisplayWindow, and can be accessed via DisplayWindow.registerForEvents. If you do register for a DisplayWindow's events, then you should remember to call DisplayWindow.unregisterForEvents if the object that is registered is discarded; otherwise, the DisplayWindow will keep a reference to your object, and errors may occur when the window attempts to send events to it. DisplayWindow events can be found here.

  • DisplayDidShowImageEvent: A new image was shown in this display
  • DisplayPositionChangedEvent: ?
  • DisplaySettingsChangedEvent: Display settings (such as brightness/contrast) were changed

Datastore events

These events are specific to a single Datastore, and can be accessed via Datastore.registerForEvents. As with DisplayWindows, if you have an object listening to Datastore events, and that object is discarded, you should make certain to unregister it first.

  • DatastoreFrozenEvent: the Datastore's freeze method has been called, and the contents of the Datastore may no longer be modified.
  • DatastoreSavedEvent: the Datastore has been saved to disk in some format.
  • NewImageEvent: a new Image has been added to the Datastore.
  • NewSummaryMetadataEvent: new SummaryMetadata has been set for the Datastore.

© Micro-Manager : Vale Lab, UCSF 2006-2011 | All Rights Reserved | Contact