mrftools: A research framework for integrated design, simulation, acquisition, and reconstruction of Magnetic Resonance Fingerprinting (MRF)
Andrew Dupuis1, Reid Bolding2, Jessie EP Sun1, Yong Chen3, Rasim Boyacioglu3, and Mark A Griswold1,2,3
1Biomedical Engineering, Case Western Reserve University, Cleveland, OH, United States, 2Physics, Case Western Reserve University, Cleveland, OH, United States, 3Radiology, School of Medicine, Case Western Reserve University, Cleveland, OH, United States

Synopsis

Motivation: Developing robust MRF acquisitions and reconstructions requires meticulous manual tracking of parameters and dependencies, as well as integration of diverse tools. Increasing ease of development and use, regardless of research or clinical purposes, would help with broader adoption and understanding of MRF.

Goal(s): Improve tooling to increase MRF research flexibility while maximizing traceability of acquisitions and reconstructions.

Approach: Develop a unified Python framework, mrftools, supporting MRF-specific modular sequence abstraction, integration of reconstruction dependencies, and online reconstruction.

Results: Built-in support for many common techniques and high extensibility for research use is demonstrated for both sequence and reconstruction development.

Impact: By providing a unified framework for sequence development and reconstruction, mrftools streamlines workflow, ensuring traceability and repeatability of MRF for research or clinical usage. Key contributions lie in MRF-specific modular sequence design, the integration of reconstruction dependencies, and online reconstruction.

Introduction

We developed an end-to-end framework for designing and using Magnetic Resonance Fingerprinting (MRF) [1] sequences, prioritizing research flexibility, while ensuring complete traceability and repeatability of acquisitions and reconstructions in a deployment setting. The mrftools framework introduces MRF-specific abstraction blocks for sequence definition and simulation. mrftools supplies a modular approach to creation, modification, and combination of sequence elements without needing to recompile sequences or reconstruction environments. Additionally, mrftools fully integrates MRF reconstruction dependencies, such as timing and trajectory information, into the raw data stream.

Methods

A cross-platform Python toolkit was developed leveraging PyTorch [2] and the ISMRM-RD [3] ecosystem. SequenceModules and ReconstructionModules provide the basis for abstraction of MRF sequence execution, dictionary simulation, and image reconstruction. All SequenceModules and ReconstructionModules are members of class inheritance trees, through which parameters, simulation approaches, serialization schemes, and sequence runtime implementations are shared. Making use of these modules, the mrftools framework consists of four primary structural containers:

  • SequenceParameters: A sequential schedule of abstracted SequenceModules fully specifying the acquisition parameters for execution of a specific sequence on a scanner.
  • DictionaryParameters: A collection of tissue property combinations that specify a unique MRF tissue dictionary in T1/T2 space, with support for additional named dimensions such as B1.
  • Simulations: A pair of SequenceParameters and DictionaryParameters objects, as well as necessary settings to specify a unique MRF dictionary simulation and SVD time-domain compression, if desired
  • ReconstructionParameters: A sequential schedule of abstracted ReconstructionModules fully specifying the reconstruction parameters for a specific sequence.

In addition to the standard loop counters normally encoded alongside raw data in vendor-specific or neutral raw data formats such as ISMRM-RD, the framework requires that Repetition Time (TR), Echo Time (TE), Requested Flip Angle (FAr), Applied Flip Angle (FAa), RF Phase (PH), Trajectory Readout ID (ID), and Preparation ID (PR) are added to all acquisition headers. Unit specifiers for both time and angle, as well as an mrftools version specifier must be added to the dataset measurement header.

If all required header fields are populated by the acquisition environment, reconstruction can be performed offline from ISMRM-RD raw data files as well as online via Gadgetron [4] or an ISMRM-RD python server [3,5]. Regardless of environment, all necessary dependencies are embedded within the ISMRM-RD file, allowing an mrftools compatible reconstruction pipeline to reconstitute the SequenceParameters used for a specific measurement allowing online Simulation lookup or execution, SVD compression, and pattern matching during map generation.

Similar to SequenceModules, all ReconstructionModules are designed as modular subclasses that share access to the SequenceParameters and Simulation results associated with a dataset. Specific functionality of ReconstructionModules can be overridden for research purposes via class inheritance without impacting serialization or pipeline modularity. A full list of reconstruction capabilities currently provided within mrftools is included in Figure 1. While many commonly-used functions for MRF research are already available, such as SVD compression, CG iterative reconstruction, and pattern matching, additional modules can be added at runtime or via extension of the mrftools package.

Reconstructed images are returned in ISMRM-RD format along with a MetaAttribute XML set that encodes the ReconstructionParameters applied to generate a specific set of images, including the unique hash of the Simulation used during reconstruction.

Results

mrftools focuses on ease of use in research and clinical settings. Figure 1 enumerates the current capabilities of the framework, including the available SequenceModules and ReconstructionModules. Figure 2 demonstrates an example design and simulation process for a simple single-inversion FISP MRF experiment, including the source Python code and simulation results in the time, readout, and truncated SVD domains. Figure 3 demonstrates the programmatic configuration of an iterative reconstruction and pattern matching pipeline, as well as exporting of the configuration for deployment and the resulting online-reconstructed maps. Figure 4 demonstrates an entirely different use of the flexible architecture, in which SequenceParameters, dictionary simulations, and partial volume maps are generated directly from an mrftools-compatible ISMRM-RD raw dataset.

Discussion

The mrftools framework introduces a valuable resource for MRF both in research and in clinical applications. This framework prioritizes flexibility, enabling researchers and clinicians alike to design, simulate, and reconstruct MRF sequences easily, while also allowing for highly granular customization to support advanced acquisition and reconstruction technical development. Its key contributions lie in the abstraction of MRF-specific elements, modular sequence design, and the integration of reconstruction dependencies. mrftools streamlines the workflow through a unified framework for sequence development and reconstruction, ensuring traceability and repeatability in diverse acquisition settings. Furthermore, the framework's compatibility with ubiquitous data formats and inclusion of essential header fields within the raw data stream supports data accessibility and compatibility.

Acknowledgements

No acknowledgement found.

References

[1] Ma, D., Gulani, V., Seiberlich, N., Liu, K., Sunshine, J. L., Duerk, J. L., & Griswold, M. A. (2013). Magnetic resonance fingerprinting. Nature, 495(7440), 187-192.
[2] Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., … Chintala, S. (2019). PyTorch: An Imperative Style, High-Performance Deep Learning Library. In Advances in Neural Information Processing Systems 32 (pp. 8024–8035).
[3] Inati, S. J., Naegele, J. D., Zwart, N. R., Roopchansingh, V., Lizak, M. J., Hansen, D. C., ... & Hansen, M. S. (2017). ISMRM Raw data format: A proposed standard for MRI raw datasets. Magnetic resonance in medicine, 77(1), 411-421.
[4] Hansen, M. S., & Sørensen, T. S. (2013). Gadgetron: an open source framework for medical image reconstruction. Magnetic resonance in medicine, 69(6), 1768-1776.
[5] Chow, K. Python ISMRM-RD Server (2021), Github repository, https://github.com/kspaceKelvin/python-ismrmrd-server
[6] Deshmane, A., McGivney, D. F., Ma, D., Jiang, Y., Badve, C., Gulani, V., Griswold, M. A. (2019). Partial volume mapping using magnetic resonance fingerprinting. NMR in Biomedicine, 32(5), e4082.

Figures

Figure 1: A high-level overview of the mrftools framework. Sequences are designed with a high-level SDK in Python that allows SequenceDefinitions to be 1) designed by chaining together SequenceModules and 2) exported to JSON, HDF5, or hash-controlled BIN files for either interpretation at runtime by a vendor-specific interpreter or conversion to PulseSeq. During acquisition, data is tagged with additional headers, tehn stored to ISMRM-RD or sent for online reconstruction. ReconstructionPipelines are flexible, and can make use of included modules or custom injected user modules

Figure 2: Example pulse sequence design and simulation process for a simple single-inversion FISP MRF experiment showing a.) the source Python code and simulation results in the b.) time, c.) readout, and d.) truncated SVD domains. Note that various utilities are provided for generation of commonly-used sequence elements and patterns. Simulation and SVD calculation for the above example was performed in 8 seconds on an Intel Core i3-1215U with 8GB of RAM available.

Figure 3: Sample configuration code of an iterative reconstruction and pattern matching pipeline. In this example, a pipeline is preconfigured for a deployment environment, with pre-prepared trajectory and density objects as well as predefined dictionaries and reconstruction parameters. The resulting configuration is then exported to JSON, and the sample online-reconstructed maps are shown.

Figure 4: Sample use of the flexible architecture demonstrating runtime-configuration of a sequence, dictionary, and simulation directly from an mrftools-compatible ISMRM-RD raw data file. Rather than generating relaxation parameter maps via a pattern-matching module, partial volume maps for white matter, grey matter, and CSF are generated directly from the reconstructed time series images using a pseudoinverse approach [6]. Percentage maps, as well as a dictionary-space visualization of the pseudoinverse results, are returned and displayed at the right.