![]() |
BioImager
4.9.0
A .NET microscopy imaging application based on Bio library. Supports various microscopes by using imported libraries & GUI automation. Supports XInput game controllers to move stage, take images, run ImageJ macros on images or Bio C# scripts.
|
Public Member Functions | |
| None | __init__ (self, int buffer_length=0, **kwargs) |
| __del__ (self) | |
| None | abort (self) |
| None | enable (self) |
| None | disable (self) |
| None | set_client (self, new_client) |
| None | update_settings (self, settings, bool init=False) |
| None | receiveClient (self, str client_uri) |
| grab_next_data (self, bool soft_trigger=True) | |
| None | receiveData (self, data, timestamp) |
Public Member Functions inherited from microscope.abc.Device | |
| bool | get_is_enabled (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) |
| get_setting (self, str name) | |
| get_all_settings (self) | |
| None | set_setting (self, str name, value) |
| describe_setting (self, str name) | |
| describe_settings (self) | |
Public Attributes | |
| bool | enabled = False |
| bool | _fetch_thread = True |
| bool | _dispatch_thread = True |
| None | _fetch_thread_run = self._fetch_data() |
Public Attributes inherited from microscope.abc.Device | |
| bool | enabled = False |
Static Public Attributes | |
| set_setting = keep_acquiring(Device.set_setting) | |
Protected Member Functions | |
| None | _fetch_data (self) |
| _process_data (self, data) | |
| _send_data (self, client, data, timestamp) | |
| None | _dispatch_loop (self) |
| None | _fetch_loop (self) |
| _client (self) | |
| _client (self, val) | |
| None | _put (self, data, timestamp) |
Protected Member Functions inherited from microscope.abc.Device | |
| _do_disable (self) | |
| _do_enable (self) | |
| None | _do_shutdown (self) |
Protected Attributes | |
| _fetch_thread = None | |
| bool | _fetch_thread_run = False |
| bool | _using_callback = False |
| list | _clientStack = [] |
| _liveClients = set() | |
| _dispatch_thread = None | |
| _dispatch_buffer = queue.Queue(maxsize=buffer_length) | |
| bool | _acquiring = False |
| _new_data_condition = threading.Condition() | |
| _client = None | |
| tuple | _new_data = (data, timestamp) |
Protected Attributes inherited from microscope.abc.Device | |
| dict | _settings = {} |
A data capture device. This class handles a thread to fetch data from a device and dispatch it to a client. The client is set using set_client(uri) or (legacy) receiveClient(uri). Derived classed should implement:: * :meth:`abort` (required) * :meth:`_fetch_data` (required) * :meth:`_process_data` (optional) Derived classes may override `__init__`, `enable` and `disable`, but must ensure to call this class's implementations as indicated in the docstrings.
| None microscope.abc.DataDevice.__init__ | ( | self, | |
| int | buffer_length = 0, | ||
| ** | kwargs ) |
Derived.__init__ must call this at some point.
Reimplemented from microscope.abc.Device.
Reimplemented in microscope.abc.Camera, microscope.cameras.picam.PiCamera, microscope.cameras.ximea.XimeaCamera, microscope.simulators.SimulatedCamera, microscope.simulators.stage_aware_camera.StageAwareCamera, and microscope.testsuite.devices.TestCamera.
Definition at line 558 of file abc.py.
| microscope.abc.DataDevice.__del__ | ( | self | ) |
Reimplemented from microscope.abc.Device.
Definition at line 580 of file abc.py.
|
protected |
|
protected |
Push or pop a client from the _clientStack.
Definition at line 737 of file abc.py.
|
protected |
Process data and send results to any client.
Definition at line 684 of file abc.py.
|
protected |
Poll for data and return it, with minimal processing. If the device uses buffering in software, this function should copy the data from the buffer, release or recycle the buffer, then return a reference to the copy. Otherwise, if the SDK returns a data object that will not be written to again, this function can just return a reference to the object. If no data is available, return `None`.
Reimplemented in microscope.cameras.andorsdk3.AndorSDK3, microscope.cameras.atmcd.AndorAtmcd, microscope.cameras.picam.PiCamera, microscope.cameras.pvcam.PVCamera, microscope.cameras.ximea.XimeaCamera, microscope.simulators.SimulatedCamera, and microscope.simulators.stage_aware_camera.StageAwareCamera.
Definition at line 643 of file abc.py.
|
protected |
Poll source for data and put it into dispatch buffer.
Definition at line 710 of file abc.py.
|
protected |
Do any data processing and return data.
Reimplemented in microscope.abc.Camera.
Definition at line 656 of file abc.py.
|
protected |
Put data and timestamp into dispatch buffer with target dispatch client.
Definition at line 745 of file abc.py.
|
protected |
Dispatch data to the client.
Definition at line 660 of file abc.py.
| None microscope.abc.DataDevice.abort | ( | self | ) |
Stop acquisition as soon as possible.
Reimplemented in microscope.cameras.andorsdk3.AndorSDK3, microscope.cameras.atmcd.AndorAtmcd, microscope.cameras.picam.PiCamera, microscope.cameras.pvcam.PVCamera, microscope.cameras.ximea.XimeaCamera, and microscope.simulators.SimulatedCamera.
Definition at line 588 of file abc.py.
| None microscope.abc.DataDevice.disable | ( | self | ) |
Disable the data capture device. Implement device-specific code in `_do_disable`.
Reimplemented from microscope.abc.Device.
Definition at line 629 of file abc.py.
| None microscope.abc.DataDevice.enable | ( | self | ) |
Enable the data capture device. Ensures that a data handling threads are running. Implement device specific code in `_do_enable`.
Reimplemented from microscope.abc.Device.
Definition at line 592 of file abc.py.
| microscope.abc.DataDevice.grab_next_data | ( | self, | |
| bool | soft_trigger = True ) |
Returns results from next trigger via a direct call.
Args:
soft_trigger: calls :meth:`trigger` if `True`, waits for
hardware trigger if `False`.
Definition at line 789 of file abc.py.
| None microscope.abc.DataDevice.receiveClient | ( | self, | |
| str | client_uri ) |
| None microscope.abc.DataDevice.receiveData | ( | self, | |
| data, | |||
| timestamp ) |
Unblocks grab_next_frame so it can return.
Definition at line 812 of file abc.py.
| None microscope.abc.DataDevice.set_client | ( | self, | |
| new_client ) |
Set up a connection to our client.
Clients now sit in a stack so that a single device may send
different data to multiple clients in a single experiment.
The usage is currently::
device.set_client(client) # Add client to top of stack
# do stuff, send triggers, receive data
device.set_client(None) # Pop top client off stack.
There is a risk that some other client calls ``None`` before
the current client is finished. Avoiding this will require
rework here to identify the caller and remove only that caller
from the client stack.
Definition at line 749 of file abc.py.
| None microscope.abc.DataDevice.update_settings | ( | self, | |
| settings, | |||
| bool | init = False ) |
Update settings, toggling acquisition if necessary.
Reimplemented from microscope.abc.Device.
Definition at line 780 of file abc.py.
|
protected |
Reimplemented in microscope.cameras.atmcd.AndorAtmcd.
|
protected |
|
protected |
| None microscope.abc.DataDevice._fetch_thread_run = self._fetch_data() |
|
protected |
|
protected |
|
protected |
|
static |