BioImager  3.6.0
A .NET microscopy imaging library. Supports various microscopes by using imported libraries & GUI automation. Supported libraries include PriorĀ® & ZeissĀ® & all devices supported by Micromanager 2.0 and python-microscope.
Loading...
Searching...
No Matches
microscope.gui Namespace Reference

Classes

class  _DataQueue
 
class  _Imager
 
class  CameraWidget
 
class  ControllerWidget
 
class  DeformableMirrorWidget
 
class  DeviceSettingsWidget
 
class  FilterWheelWidget
 
class  LightSourceWidget
 
class  MainWindow
 
class  StageWidget
 

Functions

int main (typing.Sequence[str] argv)
 

Variables

 SERIALIZER
 

Function Documentation

◆ main()

int microscope.gui.main ( typing.Sequence[str]  argv)

Definition at line 487 of file gui.py.

487def main(argv: typing.Sequence[str]) -> int:
488 app = QtWidgets.QApplication(argv)
489 app.setApplicationName("Microscope GUI")
490 app.setOrganizationDomain("python-microscope.org")
491
492 type_to_widget = {
493 "Camera": CameraWidget,
494 "Controller": ControllerWidget,
495 "DeformableMirror": DeformableMirrorWidget,
496 "DeviceSettings": DeviceSettingsWidget,
497 "FilterWheel": FilterWheelWidget,
498 "LightSourceWidget": LightSourceWidget,
499 "Stage": StageWidget,
500 }
501
502 parser = argparse.ArgumentParser(prog="microscope-gui")
503
504 # Although we have a function that can guess the device type from
505 # the attributes on the proxy this is still useful. For example,
506 # to display the device settings instead of the device UI. Or
507 # maybe we're dealing with a device that implements more than one
508 # interface (earlier iterations of aurox Clarity were both a
509 # camera and a filterwheel). This option provides a way to force
510 # a specific widget.
511 parser.add_argument(
512 "type",
513 action="store",
514 type=str,
515 metavar="DEVICE-TYPE",
516 choices=type_to_widget.keys(),
517 help="Type of device/widget to show",
518 )
519
520 parser.add_argument(
521 "uri",
522 action="store",
523 type=str,
524 metavar="DEVICE-URI",
525 help="URI for device",
526 )
527 args = parser.parse_args(app.arguments()[1:])
528
529 device = Pyro4.Proxy(args.uri)
530 widget_cls = type_to_widget[args.type]
531 widget = widget_cls(device)
532 window = MainWindow(widget)
533 window.show()
534
535 return app.exec_()
536
537

Variable Documentation

◆ SERIALIZER

microscope.gui.SERIALIZER

Definition at line 53 of file gui.py.