![]() |
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, str name, str dtype, typing.Optional[typing.Callable[[], typing.Any]] get_func, typing.Optional[typing.Callable[[typing.Any], None]] set_func=None, typing.Any values=None, typing.Optional[typing.Callable[[], bool]] readonly=None) |
| def | describe (self) |
| def | get (self) |
| bool | readonly (self) |
| None | set (self, value) |
| def | values (self) |
Public Attributes | |
| name | |
| dtype | |
Create a setting.
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.
Setters and getters accept or return:
* the setting value for int, float, bool and str;
* the setting index into a list, dict or Enum type for enum.
.. todo::
refactor into subclasses to avoid if isinstance .. elif
.. else. Settings classes should be private: devices should
use a factory method rather than instantiate settings
directly; most already use add_setting for this.
| None microscope.abc._Setting.__init__ | ( | self, | |
| str | name, | ||
| str | dtype, | ||
| typing.Optional[typing.Callable[[], typing.Any]] | get_func, | ||
| typing.Optional[typing.Callable[[typing.Any], None]] | set_func = None, |
||
| typing.Any | values = None, |
||
| typing.Optional[typing.Callable[[], bool]] | readonly = None |
||
| ) |
Definition at line 99 of file abc.py.
| def microscope.abc._Setting.describe | ( | self | ) |
| def microscope.abc._Setting.get | ( | self | ) |
| bool microscope.abc._Setting.readonly | ( | self | ) |
| None microscope.abc._Setting.set | ( | self, | |
| value | |||
| ) |
Set a setting.
Definition at line 164 of file abc.py.
References microscope.abc._Setting._set, microscope.abc._Setting._values, microscope.abc._Setting.dtype, and microscope.cameras.pvcam.PVParam.dtype.
| def microscope.abc._Setting.values | ( | self | ) |
Definition at line 173 of file abc.py.
Referenced by microscope.cameras.pvcam.PVEnumParam.set_value().
| microscope.abc._Setting.dtype |
Definition at line 116 of file abc.py.
Referenced by microscope.cameras.pvcam.PVParam.factory(), and microscope.abc._Setting.set().
| microscope.abc._Setting.name |
Definition at line 108 of file abc.py.
Referenced by microscope.cameras.pvcam.PVParam.factory(), microscope.cameras.pvcam.PVParam.set_value(), and microscope.cameras.pvcam.PVEnumParam.set_value().