TheDeanLab / navigate

navigate - open source light-sheet microscope controls
https://thedeanlab.github.io/navigate/
Other
32 stars 7 forks source link

Communicating from model to controller #951

Closed annie-xd-wang closed 4 months ago

annie-xd-wang commented 4 months ago

Register a custom event in a controller or plugin_controller in the following way:

@property
def custom_events(self):
    return {
        "autofocus": self.display_plot
    }

Send data back in a feature to the controller:

  self.model.event_queue.put(("autofocus", [fit_data, True, False]))

You can read model/features/autofocus.py and controller/sub_controllers/autofocus.py as an example.