[论文解读] Modern Microscopy with the Web of Things: The OpenFlexure Microscope Software Stack
本文提出了一套符合 Web of Things (WoT) 标准的软件堆栈,用于 OpenFlexure 显微镜,通过标准化的 HTTP API 实现图形化和基于脚本的控制。通过采用 W3C WoT 标准解耦客户端与服务器应用程序,该系统支持多语言脚本、远程访问、同时连接多个客户端,并具备可扩展性,从而为多样化研究环境中的自动化显微镜提供了一个稳健、互操作且用户友好的控制框架。
Automated and computerised control of scientific instrumentation is almost ubiquitous in the modern laboratory. Most instrumentation is controlled over decades old communication busses or is accessed via proprietary system libraries. This limits which languages and operating systems can be used to control instruments, and poses a significant problem when interfacing multiple instruments into the same experiment. Here we present the OpenFlexure Microscope software stack as an example of how a scientific instrument can be controlled using existing, cross-platform, language-independent, industry-supported standards. We split the control code into client and server applications interfaced via a web API that conforms to the W3C Web of Things standard. This enables simple control of the microscope from multiple languages, provides a modern graphical control interface, and minimises duplicated code. Network control also makes the software stack more robust, allows multiple microscopes to be controlled by one computer, and facilitates sharing of equipment between local or remote users. Using a Web of Things approach in research laboratories has the potential to solve many of the key challenges of experiment integration, using technology that is already well established.
研究动机与目标
- 为解决在操作开源自动化显微镜时,同时满足新手和专家用户多样化技术需求的挑战。
- 实现图形界面与多编程语言及平台的程序化控制之间的无缝集成。
- 通过采用标准化网络协议而非专有或语言特定的解决方案,提升仪器互操作性并减少代码重复。
- 在分布式或协作研究环境中,支持显微镜的远程、网络化及多设备控制。
- 构建模块化、可扩展的软件架构,以支持未来新硬件和自动化工作流程的集成。
提出的方法
- 将控制堆栈分解为一个独立运行在 Raspberry Pi 上的服务器应用程序,暴露符合 W3C Web of Things (WoT) 架构的标准化 HTTP API。
- 使用 Vue.js 实现基于网页的图形化客户端,可通过标准网页浏览器访问,或打包为 Electron 桌面应用程序以实现跨平台使用。
- 为 Python 和 MATLAB 开发语言无关的客户端,使用标准 HTTP 请求,实现在任何具备网络访问能力的系统上进行脚本化自动化。
- 使用 OpenAPI 规范自动生成客户端库和文档,确保一致性并减少实现错误。
- 通过基于图像的反馈实现校准流程,将载物台坐标映射到相机坐标,实现闭环运动控制,显著减少机械误差。
- 通过插件机制设计可扩展性,允许用户在不修改核心代码的情况下添加新的硬件控制或自动化流程。
实验结果
研究问题
- RQ1如何设计一个统一的软件堆栈,以同时支持开源显微镜的交互式图形化控制和程序化脚本?
- RQ2标准化网络协议在科学仪器控制软件中能在多大程度上提升互操作性并减少代码重复?
- RQ3基于网络、API 优先的架构是否能够在不牺牲性能或可用性的情况下,实现远程、多用户及多显微镜的控制?
- RQ4如何利用实时图像反馈校正自动化显微镜中的机械误差(如反向间隙和漂移)?
- RQ5哪些架构模式能够实现开源科学软件的可扩展性和长期可维护性?
主要发现
- 符合 WoT 的 HTTP API 允许任何支持 HTTP 的编程语言(包括 Python 和 MATLAB)控制 OpenFlexure 显微镜,而无需自定义库或框架。
- 多个客户端(图形化、脚本化、远程)可同时连接到同一台显微镜,实现实验的实时监控与自动化协议的并行运行。
- 使用基于图像的反馈进行载物台校准和闭环运动控制,显著减少了机械误差,并防止了大范围扫描过程中的累积漂移。
- 该软件堆栈完全开源,采用宽松许可协议发布,所有源代码和文档托管于 GitLab 和 GitHub,包括归档版本。
- 核心软件组件(如 LabThings Python 库)可跨显微镜应用复用,并设计用于支持其他符合 WoT 的科学仪器。
- 采用 OpenAPI 和 Thing Description 标准可自动生成文档和客户端代码,降低开发开销并提升可维护性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。