Simple Selection¶
The quickest way to browse and select one or more images from OMERO.
from PyQt6.QtWidgets import QApplication
from omero_browser_qt import OmeroGateway, OmeroBrowserDialog
app = QApplication([])
gw = OmeroGateway()
# Login dialog → browser dialog → returns selected ImageWrappers
images = OmeroBrowserDialog.select_images(gateway=gw)
for img in images:
print(f"{img.getName()} (id={img.getId()})")
gw.disconnect()
select_images() is a blocking class method that:
- Opens the login dialog (if not already connected)
- Opens the browser dialog
- Returns a
listof OMEROImageWrapperobjects when the user clicks Import - Returns an empty list if the user cancels
Using an existing gateway¶
If your application already has a connected gateway, pass it in to skip the login dialog:
Lower-level control¶
For finer control over dialog lifetime, instantiate the dialog directly: