Skip to content

Overview#

pymmcore-widgets (github) is a library of PyQt/PySide widgets that can be used in combination with pymmcore-plus (github) to create custom Graphical User Interfaces (GUIs) for the Micro-Manager software in a pure python/C++ environment.

all_widgets

Installation#

pip install pymmcore-widgets

This package does NOT include a PyQt/PySide backend, you must install one yourself (e.g. pip install PyQt6).

It also requires the Micro-Manager device adapters and C++ core provided by mmCoreAndDevices.

For a more detailed description on how to install the package, see the Getting Started section.

Usage#

As a quick example, let's create a simple Qt Application that:

  • creates a Micro-Manager core instance so that all the widgets can control the same core.

  • loads the default Micro-Manager system configuration.

  • creates and shows a PropertyBrowser widget. You can use this widget to view and modify the properties of any of the loaded devices.

# import the necessary packages
from qtpy.QtWidgets import QApplication
from pymmcore_plus import CMMCorePlus
from pymmcore_widgets import PropertyBrowser

# create a QApplication
app = QApplication([])

# create a CMMCorePlus instance
mmc = CMMCorePlus.instance()

# load the default Micro-Manager system configuration. To load a specific 
# configuration, provide the "path/to/config.cfg" file as an argument.
mmc.loadSystemConfiguration()

# create a PropertyBrowser widget. By default, this widget will use the active
# Micro-Manager core instance.
pb_widget = PropertyBrowser()

# show the created widget
pb_widget.show()

app.exec_()

The code above will create a Qt Application that looks like this:

PropertyBrowser

A more detailed description on how to use the pymmcore-widgets package is explained in the Getting Started section.

For a pre-made user interface, see napari-micromanager (github).

Widgets#

For a complete list of widgets offered by this package, see the Widgets List.