Image viewers

By default data acquired by pycromanager is displayed in the Java-based NDViewer.

Screenshot of NDViewer

The viewer may be turned off as follows:

with Acquisition(..., show_display=False) as acq:

    acq.acquire(events)

Properties of the NDViewer may also be modified through a handle of the java object provided by get_viewer:

with Acquisition(..., show_display=True) as acq:

    acq.acquire(events)  # start data acquisition
    viewer = acq.get_viewer()  # get handle of the NDViewer

    # modify viewer properties as needed

viewer.close()  # viewer may be closed at the end of the acquisition

Alternatively, acquired data may be displayed in napari:

Screenshot of napari viewer
# launch napari viewer
viewer = napari.Viewer()

# connect napari viewer to Acquisition class and start data acquisition
acq = Acquisition(..., napari_viewer=viewer)
acq.acquire(events)
acq.mark_finished()

# start monitoring for acquired data
napari.run()

# clean up acquisition once napari window is closed
acq.await_completion()