![]() |
BioImager
3.9.1
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.
|
Public Member Functions | |
| None | __init__ (self) |
| None | __del__ (self) |
| bool | get_is_enabled (self) |
| None | disable (self) |
| None | enable (self) |
| None | initialize (self) |
| None | shutdown (self) |
| None | add_setting (self, name, dtype, get_func, set_func, values, typing.Optional[typing.Callable[[], bool]] readonly=None) |
| def | get_setting (self, str name) |
| def | get_all_settings (self) |
| None | set_setting (self, str name, value) |
| def | describe_setting (self, str name) |
| def | describe_settings (self) |
| def | update_settings (self, incoming, bool init=False) |
Public Attributes | |
| enabled | |
| None microscope.abc.Device.__init__ | ( | self | ) |
Reimplemented in microscope.abc.Camera, microscope.simulators.SimulatedCamera, microscope.stages.linkam._LinkamBase, microscope.testsuite.devices.TestCamera, microscope.cameras.picam.PiCamera, microscope.filterwheels.thorlabs.ThorlabsFW102C, microscope.filterwheels.thorlabs.ThorlabsFW212C, microscope.filterwheels.thorlabs.ThorlabsFilterWheel, microscope.abc.DataDevice, microscope.simulators.stage_aware_camera.StageAwareCamera, microscope.cameras.ximea.XimeaCamera, and microscope.stages.linkam.LinkamCMS.
Definition at line 288 of file abc.py.
| None microscope.abc.Device.__del__ | ( | self | ) |
Reimplemented in microscope.stages.linkam._LinkamBase.
Definition at line 292 of file abc.py.
| None microscope.abc.Device.add_setting | ( | self, | |
| name, | |||
| dtype, | |||
| get_func, | |||
| set_func, | |||
| values, | |||
| typing.Optional[typing.Callable[[], bool]] | readonly = None |
||
| ) |
Add a setting definition.
Args:
name: the setting's name.
dtype: a data type from `"int"`, `"float"`, `"bool"`,
`"enum"`, or `"str"` (see `DTYPES`).
get_func: a function to get the current value.
set_func: a function to set the value.
values: a description of allowed values dependent on
dtype, or function that returns a description.
readonly: an optional function to indicate if the setting
is readonly. A setting may be readonly temporarily,
so this function will return `True` or `False` to
indicate its current state. If set to no `None`
(default), then its value will be dependent on the
value of `set_func`.
A client needs some way of knowing a setting name and data
type, retrieving the current value and, if settable, a way to
retrieve allowable values, and set the value. We store this
info in a dictionary. I considered having a `Setting1 class
with getter, setter, etc., and adding `Setting` instances as
device attributes, but Pyro does not support dot notation to
access the functions we need (e.g. `Device.some_setting.set`),
so I'd have to write access functions, anyway.
Definition at line 399 of file abc.py.
References microscope.simulators.stage_aware_camera.StageAwareCamera._settings.
Referenced by microscope.abc.Camera.__init__(), microscope.simulators.SimulatedCamera.__init__(), microscope.testsuite.devices.TestCamera.__init__(), microscope.cameras.picam.PiCamera.__init__(), microscope.simulators.stage_aware_camera.StageAwareCamera.__init__(), microscope.cameras.ximea.XimeaCamera.__init__(), microscope.stages.linkam.LinkamCMS.__init__(), microscope.cameras.andorsdk3.AndorSDK3.initialize(), microscope.cameras.atmcd.AndorAtmcd.initialize(), microscope.cameras.pvcam.PVCamera.initialize(), and microscope.cameras.ximea.XimeaCamera.initialize().
| def microscope.abc.Device.describe_setting | ( | self, | |
| str | name | ||
| ) |
Return ordered setting descriptions as a list of dicts.
Definition at line 476 of file abc.py.
References microscope.simulators.stage_aware_camera.StageAwareCamera._settings.
| def microscope.abc.Device.describe_settings | ( | self | ) |
Return ordered setting descriptions as a list of dicts.
Definition at line 480 of file abc.py.
References microscope.simulators.stage_aware_camera.StageAwareCamera._settings.
| None microscope.abc.Device.disable | ( | self | ) |
Disable the device for a short period for inactivity.
Reimplemented in microscope.abc.DataDevice, microscope.controllers.coolled._CoolLEDChannel, microscope.controllers.lumencor._SpectraIIILightChannel, microscope.lights.cobolt.CoboltLaser, microscope.lights.sapphire.SapphireLaser, and microscope.lights.toptica.TopticaiBeam.
Definition at line 307 of file abc.py.
References microscope.abc.Device._do_disable(), microscope.cameras.andorsdk3.AndorSDK3._do_disable(), microscope.cameras.atmcd.AndorAtmcd._do_disable(), microscope.cameras.picam.PiCamera._do_disable(), microscope.cameras.pvcam.PVCamera._do_disable(), microscope.cameras.ximea.XimeaCamera._do_disable(), microscope.controllers.toptica._iChromeLaser._do_disable(), microscope.controllers.zaber._ZaberLED._do_disable(), microscope.filterwheels.aurox.Clarity._do_disable(), microscope.lights.deepstar.DeepstarLaser._do_disable(), microscope.lights.obis.ObisLaser._do_disable(), microscope.simulators.SimulatedCamera._do_disable(), microscope.simulators.SimulatedLightSource._do_disable(), microscope.abc.Device.enabled, microscope.abc.DataDevice.enabled, and microscope.testsuite.devices.DummySLM.enabled.
Referenced by microscope.abc.DataDevice.__init__(), microscope.lights.cobolt.CoboltLaser.get_status(), microscope.lights.deepstar.DeepstarLaser.get_status(), microscope.lights.obis.ObisLaser.get_status(), and microscope.abc.Device.shutdown().
| None microscope.abc.Device.enable | ( | self | ) |
Enable the device.
Reimplemented in microscope.abc.DataDevice, microscope.controllers.coolled._CoolLEDChannel, microscope.controllers.lumencor._SpectraIIILightChannel, and microscope.lights.toptica.TopticaiBeam.
Definition at line 321 of file abc.py.
References microscope.abc.Device._do_enable(), microscope.cameras.andorsdk3.AndorSDK3._do_enable(), microscope.cameras.atmcd.AndorAtmcd._do_enable(), microscope.cameras.picam.PiCamera._do_enable(), microscope.cameras.pvcam.PVCamera._do_enable(), microscope.cameras.ximea.XimeaCamera._do_enable(), microscope.controllers.toptica._iChromeLaser._do_enable(), microscope.controllers.zaber._ZaberStage._do_enable(), microscope.controllers.zaber._ZaberLED._do_enable(), microscope.filterwheels.aurox.Clarity._do_enable(), microscope.lights.cobolt.CoboltLaser._do_enable(), microscope.lights.deepstar.DeepstarLaser._do_enable(), microscope.lights.obis.ObisLaser._do_enable(), microscope.lights.sapphire.SapphireLaser._do_enable(), microscope.simulators.SimulatedCamera._do_enable(), microscope.simulators.SimulatedLightSource._do_enable(), microscope.stages.ludl._LudlStage._do_enable(), microscope.abc.Device.enabled, microscope.abc.DataDevice.enabled, and microscope.testsuite.devices.DummySLM.enabled.
| def microscope.abc.Device.get_all_settings | ( | self | ) |
Return ordered settings as a list of dicts.
Definition at line 455 of file abc.py.
References microscope.simulators.stage_aware_camera.StageAwareCamera._settings.
| bool microscope.abc.Device.get_is_enabled | ( | self | ) |
| def microscope.abc.Device.get_setting | ( | self, | |
| str | name | ||
| ) |
Return the current value of a setting.
Definition at line 447 of file abc.py.
References microscope.simulators.stage_aware_camera.StageAwareCamera._settings.
Referenced by microscope.cameras.atmcd.AndorAtmcd.get_id(), microscope.cameras.atmcd.AndorAtmcd.soft_trigger(), and microscope.abc.Device.update_settings().
| None microscope.abc.Device.initialize | ( | self | ) |
Initialize the device. If devices have this method (not required, and many don't), then they should call it as part of the initialisation, i.e., they should call it on their `__init__` method.
Reimplemented in microscope.cameras.andorsdk3.AndorSDK3, microscope.cameras.atmcd.AndorAtmcd, microscope.cameras.picam.PiCamera, microscope.cameras.pvcam.PVCamera, microscope.cameras.ximea.XimeaCamera, microscope.lights.cobolt.CoboltLaser, microscope.lights.obis.ObisLaser, microscope.lights.sapphire.SapphireLaser, and microscope.testsuite.devices.TestFloatingDevice.
Definition at line 339 of file abc.py.
Referenced by microscope.cameras.picam.PiCamera.__init__(), microscope.cameras.ximea.XimeaCamera.__init__(), and microscope.cameras.picam.PiCamera.initialize().
| None microscope.abc.Device.set_setting | ( | self, | |
| str | name, | ||
| value | |||
| ) |
Set a setting.
Definition at line 468 of file abc.py.
References microscope.simulators.stage_aware_camera.StageAwareCamera._settings.
Referenced by microscope.cameras.atmcd.AndorAtmcd.initialize(), and microscope.cameras.atmcd.AndorAtmcd.set_trigger().
| None microscope.abc.Device.shutdown | ( | self | ) |
Shutdown the device.
Disable and disconnect the device. This method should be
called before destructing the device object, to ensure that
the device is actually shutdown.
After `shutdown`, the device object is no longer usable and
calling any other method is undefined behaviour. The only
exception `shutdown` itself which can be called consecutively,
and after the first time will have no effect.
A device object that has been shutdown can't be reinitialised.
Instead of reusing the object, a new one should be created
instead. This means that `shutdown` will leave the device in
a state that it can be reconnected.
.. code-block:: python
device = SomeDevice()
device.shutdown()
# Multiple calls to shutdown are OK
device.shutdown()
device.shutdown()
# After shutdown, everything else is undefined behaviour.
device.enable() # undefined behaviour
device.get_setting("speed") # undefined behaviour
# To reinitialise the device, construct a new instance.
device = SomeDevice()
.. note::
While `__del__` calls `shutdown`, one should not rely on
it. Python does not guarante that `__del__` will be
called when the interpreter exits so if `shutdown` is not
called explicitely, the devices might not be shutdown.
Definition at line 349 of file abc.py.
References microscope.abc.Device._do_shutdown(), microscope.abc.Controller._do_shutdown(), microscope.cameras.andorsdk3.AndorSDK3._do_shutdown(), microscope.cameras.atmcd.AndorAtmcd._do_shutdown(), microscope.cameras.picam.PiCamera._do_shutdown(), microscope.cameras.pvcam.PVCamera._do_shutdown(), microscope.cameras.ximea.XimeaCamera._do_shutdown(), microscope.controllers.coolled._CoolLEDChannel._do_shutdown(), microscope.controllers.lumencor._SpectraIIILightChannel._do_shutdown(), microscope.controllers.prior._ProScanIIIFilterWheel._do_shutdown(), microscope.controllers.toptica._iChromeLaser._do_shutdown(), microscope.controllers.zaber._ZaberStage._do_shutdown(), microscope.controllers.zaber._ZaberFilterWheel._do_shutdown(), microscope.controllers.zaber._ZaberLED._do_shutdown(), microscope.filterwheels.aurox.Clarity._do_shutdown(), microscope.filterwheels.thorlabs.ThorlabsFilterWheel._do_shutdown(), microscope.lights.cobolt.CoboltLaser._do_shutdown(), microscope.lights.deepstar.DeepstarLaser._do_shutdown(), microscope.lights.obis.ObisLaser._do_shutdown(), microscope.lights.sapphire.SapphireLaser._do_shutdown(), microscope.lights.toptica.TopticaiBeam._do_shutdown(), microscope.mirror.alpao.AlpaoDeformableMirror._do_shutdown(), microscope.mirror.bmc.BMCDeformableMirror._do_shutdown(), microscope.mirror.mirao52e.Mirao52e._do_shutdown(), microscope.simulators.SimulatedCamera._do_shutdown(), microscope.simulators.SimulatedFilterWheel._do_shutdown(), microscope.simulators.SimulatedLightSource._do_shutdown(), microscope.simulators.SimulatedDeformableMirror._do_shutdown(), microscope.simulators.SimulatedStage._do_shutdown(), microscope.stages.linkam._LinkamBase._do_shutdown(), microscope.stages.ludl._LudlStage._do_shutdown(), microscope.testsuite.devices.DummySLM._do_shutdown(), microscope.testsuite.devices.DummyDSP._do_shutdown(), microscope.testsuite.devices.TestFloatingDevice._do_shutdown(), microscope.testsuite.test_device_server.ExposePIDDevice._do_shutdown(), microscope.testsuite.test_device_server.DeviceWithPort._do_shutdown(), microscope.abc.Device.disable(), microscope.abc.DataDevice.disable(), microscope.controllers.coolled._CoolLEDChannel.disable(), microscope.controllers.lumencor._SpectraIIILightChannel.disable(), microscope.lights.cobolt.CoboltLaser.disable(), microscope.lights.sapphire.SapphireLaser.disable(), and microscope.lights.toptica.TopticaiBeam.disable().
| def microscope.abc.Device.update_settings | ( | self, | |
| incoming, | |||
| bool | init = False |
||
| ) |
Update settings based on dict of settings and values.
Reimplemented in microscope.abc.DataDevice.
Definition at line 484 of file abc.py.
References microscope.abc.DataDevice._acquiring, microscope.cameras.andorsdk3.AndorSDK3._acquiring(), microscope.cameras.atmcd.AndorAtmcd._acquiring(), microscope.cameras.picam.PiCamera._acquiring, microscope.cameras.pvcam.PVCamera._acquiring, microscope.cameras.ximea.XimeaCamera._acquiring, microscope.simulators.SimulatedCamera._acquiring, microscope.abc.Device._do_enable(), microscope.cameras.andorsdk3.AndorSDK3._do_enable(), microscope.cameras.atmcd.AndorAtmcd._do_enable(), microscope.cameras.picam.PiCamera._do_enable(), microscope.cameras.pvcam.PVCamera._do_enable(), microscope.cameras.ximea.XimeaCamera._do_enable(), microscope.controllers.toptica._iChromeLaser._do_enable(), microscope.controllers.zaber._ZaberStage._do_enable(), microscope.controllers.zaber._ZaberLED._do_enable(), microscope.filterwheels.aurox.Clarity._do_enable(), microscope.lights.cobolt.CoboltLaser._do_enable(), microscope.lights.deepstar.DeepstarLaser._do_enable(), microscope.lights.obis.ObisLaser._do_enable(), microscope.lights.sapphire.SapphireLaser._do_enable(), microscope.simulators.SimulatedCamera._do_enable(), microscope.simulators.SimulatedLightSource._do_enable(), microscope.stages.ludl._LudlStage._do_enable(), microscope.simulators.stage_aware_camera.StageAwareCamera._settings, microscope.abc.DataDevice.abort(), microscope.cameras.andorsdk3.AndorSDK3.abort(), microscope.cameras.atmcd.AndorAtmcd.abort(), microscope.cameras.picam.PiCamera.abort(), microscope.cameras.pvcam.PVCamera.abort(), microscope.cameras.ximea.XimeaCamera.abort(), microscope.simulators.SimulatedCamera.abort(), and microscope.abc.Device.get_setting().
| microscope.abc.Device.enabled |
Definition at line 289 of file abc.py.
Referenced by microscope.abc.Device.disable(), microscope.abc.DataDevice.disable(), microscope.abc.Device.enable(), microscope.abc.DataDevice.enable(), and microscope.abc.DataDevice.grab_next_data().