BioImager  5.0.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.
Loading...
Searching...
No Matches
mirao52e.py
Go to the documentation of this file.
1#!/usr/bin/env python3
2
3
19
20"""Wrapper to the Imagine Optic Mirao 52-e API.
21"""
22
23import ctypes
24
25
26# Vendor only supports Windows
27SDK = ctypes.WinDLL("mirao52e")
28
29
30TRUE = 1 # TRUE MroBoolean value
31FALSE = 0 # FALSE MroBoolean value
32
33# Number of values of a mirao 52-e command (the number of actuators
34# is a define on the library header)
35NB_COMMAND_VALUES = 52
36
37# Error code defines
38OK = 0
39
40
41Boolean = ctypes.c_char
42Command = ctypes.POINTER(ctypes.c_double)
43
44
45def prototype(name, argtypes, restype=Boolean):
46 func = getattr(SDK, name)
47 # All functions have 'int *' as the last argument for status.
48 func.argtypes = argtypes + [ctypes.POINTER(ctypes.c_int)]
49 func.restype = restype
50 return func
51
52
53open = prototype("mro_open", [])
54close = prototype("mro_close", [])
55
56applyCommand = prototype("mro_applyCommand", [Command, Boolean])
prototype(name, argtypes, restype=Boolean)
Definition mirao52e.py:45