Virtual Scanner: MRI on a Browser

Magnetic Resonance Imaging (MRI) is a medical imaging modality that provides excellent soft tissue contrast with high diagnostic value (Brown, Semelka, & Dale, 2015; McRobbie, Moore, Graves, & Prince, 2017; Rao, Venkatesan, & Geethanath, 2015; Webb & Kagadis, 2003). System simulators are important because of the inherent complexity of MRI. However, most existing MRI simulators are proprietary to manufacturing companies. In addition, typical existing open-source simulators do not support both system-wide simulation and pulse sequence deployment on multiple vendors (Supplementary table S1, Ravi et al. (2018)). An open-source, integrated, and vendor-neutral webtool will help MRI researchers around the world develop and share new methodology. Vendor-neutrality allows imaging methods to be applied on scanners from multiple companies and streamlines multi-site repeatability studies. This software should provide functionalities for rapidly prototyping MR methods, services for sharing computational resources, and educational features for under-served areas to develop their own MRI expertise (Obungoloch, 2019).


Summary
Magnetic Resonance Imaging (MRI) is a medical imaging modality that provides excellent soft tissue contrast with high diagnostic value (Brown, Semelka, & Dale, 2015;McRobbie, Moore, Graves, & Prince, 2017;Rao, Venkatesan, & Geethanath, 2015;Webb & Kagadis, 2003). System simulators are important because of the inherent complexity of MRI. However, most existing MRI simulators are proprietary to manufacturing companies. In addition, typical existing open-source simulators do not support both system-wide simulation and pulse sequence deployment on multiple vendors (Supplementary table S1, Ravi et al. (2018)). An open-source, integrated, and vendor-neutral webtool will help MRI researchers around the world develop and share new methodology. Vendor-neutrality allows imaging methods to be applied on scanners from multiple companies and streamlines multi-site repeatability studies. This software should provide functionalities for rapidly prototyping MR methods, services for sharing computational resources, and educational features for under-served areas to develop their own MRI expertise (Obungoloch, 2019).
To fulfill this need, we designed Virtual Scanner with three main characteristics in mind: • Modular: Virtual Scanner consists of modules corresponding to steps in the MRI signal chain (Webb, 2016). Since modern MRI systems contain multiple levels of hardware and software, it is important for researchers to select the appropriate steps for simulation when developing acquisition paradigms, analysis methods, or hardware components. Students may also choose to focus on individual aspects of the experiment.
• Zero-footprint: Virtual Scanner was implemented as a web application using the FLASK framework (Pallets, n.d.) with backend code in Python. The local server can be set up by running a script or using the command line. Once the server is up, one can access it on a browser without additional steps for installing any software packages.
• Open-source: existing tools in the MRI community are incorporated for effective creation and sharing of resources. Pulseq, a multi-vendor MRI pulse sequence format (Layton et al., 2017;Ravi et al., 2018), can be directly fed into the simulator. Since translating from simulation to experiments on a real scanner is a key step in MRI methods development, being able to deploy the same sequence file can help streamline this process.

Standard Mode
The Standard Mode mimics a real scanner console and enables the user to perform custom MRI experiments. This mode may be used by MRI technicians as practice for scanner console operation without requiring expensive scanner hours and can help increase access to education (Geethanath & Vaughan Jr, 2019).
The virtual experiments are simulated with a discrete event approach using the Bloch equation (Kose & Kose, 2017). The backend code may be employed by researchers with custom sequences and phantoms that are straightforward to set up and test.
The Graphical User Interface (GUI) consists of three pages: • Register: similar to patient registration, this page currently allows selection of a numerical phantom. Details such as weight and age are included for MRI safety evaluation and future inclusion of human anatomy.
• Acquire: this page allows setting parameters for standard MRI sequences such as Spin Echo (SE), Gradient Recalled Echo (GRE), and Inversion Recovery Spin Echo (IRSE) and applying them on the phantom to obtain MRI images. A pulse sequence library script, powered by a Python implementation of Pulseq (Ravi et al., 2018), custom-generates the sequences as standardized objects and files.
• Analyze: this page obtains relaxation time (T1 and T2) maps from series of images with different acquisition parameters using curve-fitting (Brown, Cheng, Haacke, Thompson, & Venkatesan, 2014). T1 and T2 are two main sources of contrast in anatomical MRI images, and their quantitative estimation can help distinguish finer differences between tissue types.

Advanced Mode
The Advanced Mode is envisioned to be a system-wide MRI simulator. At this moment, RF Transmission (Tx) and RF Reception (Rx) have been implemented.
• Tx: Specific Absorption Rate (SAR) over time is calculated directly from pulse sequences (Graesslin et al., 2012) in the Pulseq format (Ravi et al., 2018). This measure ensures patient safety from RF heating, and is a useful check for custom sequences.
• Rx: time-domain MRI signals are generated from the spatial frequency domain of grayscale images and put through demodulation, ADC sampling, and reconstruction steps that consist the MRI receive chain.

Roadmap
More features are undergoing active development for both modes. For Standard Mode, a human brain phantom will be added, as well as additional pulse sequences including Echo Planar Imaging (EPI) (Mansfield, 1977;Stehling, Turner, & Mansfield, 1991) and Magnetization Prepared RApid Gradient Echo (MPRAGE) (Mugler III & Brookeman, 1990), oblique spatial encoding, and interactive plotting of parameter maps. For Advanced Mode, a Pulse Sequence Diagram (PSD) viewer, RF modeling, and B0 map will be included. Furthermore, we plan to accelerate the simulator, include more physical effects, and unlock advanced reconstruction methods by incorporating existing open source tools such as JEMRIS (Stöcker, Vahedipour, Pflugfelder, & Shah, 2010), GPI (Zwart & Pipe, 2015), and BART (Uecker et al., 2015).

Projected Usage
• Tool: Virtual Scanner is expected to boost the efficiency of developing novel MRI acquisition methods. We have found it helpful for prototyping and checking the validity of Pulseq sequences and plan to use it as the simulator for an in-house project of developing an accessible MRI scanner.
• Service: in the near future, we aim to provide Virtual Scanner as a free online service for sharing computational methods and resources to the MRI community. Examples include advanced iterative or machine learning based image reconstruction, SAR calculation, and custom sequence simulation.
• Education: we plan to deploy Virtual Scanner for an MRI course at Mbarara University in Uganda starting from September 2019 for disseminating MRI knowledge.