Misaki Masaya, Bodurka Jerzy, Paulus Martin P
Laureate Institute for Brain Research, Tulsa, OK, United States.
Front Neurosci. 2022 Mar 11;16:834827. doi: 10.3389/fnins.2022.834827. eCollection 2022.
Real-time fMRI (rtfMRI) has enormous potential for both mechanistic brain imaging studies or treatment-oriented neuromodulation. However, the adaption of rtfMRI has been limited due to technical difficulties in implementing an efficient computational framework. Here, we introduce a python library for real-time fMRI (rtfMRI) data processing systems, Real-Time Processing System in python (RTPSpy), to provide building blocks for a custom rtfMRI application with extensive and advanced functionalities. RTPSpy is a library package including (1) a fast, comprehensive, and flexible online fMRI image processing modules comparable to offline denoising, (2) utilities for fast and accurate anatomical image processing to define an anatomical target region, (3) a simulation system of online fMRI processing to optimize a pipeline and target signal calculation, (4) simple interface to an external application for feedback presentation, and (5) a boilerplate graphical user interface (GUI) integrating operations with RTPSpy library. The fast and accurate anatomical image processing utility wraps external tools, including FastSurfer, ANTs, and AFNI, to make tissue segmentation and region of interest masks. We confirmed that the quality of the output masks was comparable with FreeSurfer, and the anatomical image processing could complete in a few minutes. The modular nature of RTPSpy provides the ability to use it for a simulation analysis to optimize a processing pipeline and target signal calculation. We present a sample script for building a real-time processing pipeline and running a simulation using RTPSpy. The library also offers a simple signal exchange mechanism with an external application using a TCP/IP socket. While the main components of the RTPSpy are the library modules, we also provide a GUI class for easy access to the RTPSpy functions. The boilerplate GUI application provided with the package allows users to develop a customized rtfMRI application with minimum scripting labor. The limitations of the package as it relates to environment-specific implementations are discussed. These library components can be customized and can be used in parts. Taken together, RTPSpy is an efficient and adaptable option for developing rtfMRI applications. https://github.com/mamisaki/RTPSpy.
实时功能磁共振成像(rtfMRI)在机制性脑成像研究或面向治疗的神经调节方面都具有巨大潜力。然而,由于在实现高效计算框架方面存在技术困难,rtfMRI的应用受到了限制。在此,我们介绍一个用于实时功能磁共振成像(rtfMRI)数据处理系统的Python库,即Python中的实时处理系统(RTPSpy),为具有广泛和先进功能的自定义rtfMRI应用程序提供构建模块。RTPSpy是一个库包,包括:(1)一个快速、全面且灵活的在线功能磁共振成像图像处理模块,可与离线去噪相媲美;(2)用于快速准确的解剖图像处理以定义解剖目标区域的实用工具;(3)在线功能磁共振成像处理的模拟系统,用于优化处理流程和目标信号计算;(4)与外部应用程序进行反馈呈现的简单接口;(5)一个集成了与RTPSpy库操作的样板图形用户界面(GUI)。快速准确的解剖图像处理实用工具封装了外部工具,包括FastSurfer、ANTs和AFNI,以进行组织分割和感兴趣区域掩码制作。我们证实,输出掩码的质量与FreeSurfer相当,并且解剖图像处理可以在几分钟内完成。RTPSpy的模块化性质使其能够用于模拟分析,以优化处理流程和目标信号计算。我们展示了一个使用RTPSpy构建实时处理流程并运行模拟的示例脚本。该库还提供了一种使用TCP/IP套接字与外部应用程序进行简单信号交换的机制。虽然RTPSpy的主要组件是库模块,但我们也提供了一个GUI类,以便轻松访问RTPSpy函数。该包提供的样板GUI应用程序允许用户以最少的脚本编写工作开发自定义的rtfMRI应用程序。讨论了该包与特定环境实现相关的局限性。这些库组件可以定制并可部分使用。综上所述,RTPSpy是开发rtfMRI应用程序的一个高效且适应性强的选择。https://github.com/mamisaki/RTPSpy。