Skip to article content
Rebuilt preprint

Analysis code for the paper "RF shimming in the cervical spinal cord at 7T"

Summary

Data was collected from five participants between two 7T sites with a custom 8Tx/20Rx parallel transmission (pTx) coil. We explored two RF shimming approaches from an MRI vendor and four from an open-source toolbox, showcasing their ability to enhance transmit field and signal homogeneity along the cervical spinal cord.

The results indicate significant improvements in B1+ efficiency and cerebrospinal fluid / spinal cord signal ratio across various RF shimming conditions compared to the vendor based methods.

The study’s findings highlight the potential of RF shimming to advance 7T MRI’s clinical utility for central nervous system imaging by enabling more homogenous and efficient spinal cord imaging. Additionally, the research incorporates a reproducible Jupyter Notebook, enhancing the study’s transparency and facilitating peer verification. By also making the data openly accessible on OpenNeuro, we ensure that the scientific community can further explore, validate, and build upon our findings, contributing to the collective advancement in high-resolution imaging techniques.

Figure 1. Overview of the RF shimming procedure. The top panel shows the RF coil used for the experiments, alongside the Tx coil geometry and the electromagnetic simulation results (on Gustav model) yielding the CP mode used for this coil. The bottom panel shows the RF shimming procedure (with approximate duration). First, GRE and tfl_rfmap scans are acquired (4min30s). Second, these images are transferred via ethernet socket from the MRI console onto a separate laptop running Shimming Toolbox and SCT (əs). Third, the spinal cord is automatically segmented to produce a mask that is resampled into the space of the individual coil magnitude and phase images of the tfl_rfmap scan (~5s). Fourth, the RF shim weights are calculated according to the defined constraints for each shim scenario (1min total).

Statement of Need

Advancing the development of 7T MRI for spinal cord imaging is crucial for the enhanced diagnosis and monitoring of various neurodegenerative diseases Kearney et al., 2015 and traumas David et al., 2019. However, a significant challenge at this field strength is the transmit field inhomogeneity Ibrahim et al., 2001Collins et al., 2005Röschmann, 1987Yang et al., 2002. Such inhomogeneity is particularly problematic for imaging the small, deep anatomical structures of the cervical spinal cord , as it can cause uneven signal intensity and elevate the local specific absorption ratio, compromising image quality. This multi-site study explores several radiofrequency (RF) shimming techniques in the cervical spinal cord at 7T.

1| Data

The data can be downloaded from: https://openneuro.org/datasets/ds004906

The structure of the input dataset is as follows (JSON sidecars are not listed for clarity):

toggle - Unknown Directive
~~~
ds004906
├── CHANGES
├── README
├── dataset_description.json
├── participants.json
├── participants.tsv
├── sub-01
│   ├── anat
│   │   ├── sub-01_acq-CP_T1w.nii.gz
│   │   ├── sub-01_acq-CP_T2starw.nii.gz
│   │   ├── sub-01_acq-CoV_T1w.nii.gz
│   │   ├── sub-01_acq-CoV_T2starw.nii.gz
│   │   ├── sub-01_acq-SAReff_T2starw.nii.gz
│   │   ├── sub-01_acq-patient_T2starw.nii.gz
│   │   ├── sub-01_acq-phase_T2starw.nii.gz
│   │   ├── sub-01_acq-target_T2starw.nii.gz
│   │   ├── sub-01_acq-volume_T2starw.nii.gz
│   └── fmap
│       ├── sub-01_acq-anatCP_TB1TFL.nii.gz
│       ├── sub-01_acq-anatCoV_TB1TFL.nii.gz
│       ├── sub-01_acq-anatSAReff_TB1TFL.nii.gz
│       ├── sub-01_acq-anatpatient_TB1TFL.nii.gz
│       ├── sub-01_acq-anatphase_TB1TFL.nii.gz
│       ├── sub-01_acq-anattarget_TB1TFL.nii.gz
│       ├── sub-01_acq-anatvolume_TB1TFL.nii.gz
│       ├── sub-01_acq-fampCP_TB1TFL.nii.gz
│       ├── sub-01_acq-fampCoV_TB1TFL.nii.gz
│       ├── sub-01_acq-fampSAReff_TB1TFL.nii.gz
│       ├── sub-01_acq-famppatient_TB1TFL.nii.gz
│       ├── sub-01_acq-fampphase_TB1TFL.nii.gz
│       ├── sub-01_acq-famptarget_TB1TFL.nii.gz
│       └── sub-01_acq-fampvolume_TB1TFL.nii.gz
├── sub-02
├── sub-03
├── sub-04
└── sub-05
~~~

2| Overview of processing pipeline

During the data acquisition stage, RF shimming was done using the Shimming Toolbox D'Astous et al., 2023 during the acquisition stage.

The post-processing pipeline uses the Spinal Cord Toolbox De Leener et al., 2017.

For each subject:

Slow processes are indicated with the emoji ⏳

3| Requirements


# Install SCT ⏳

!git clone --depth 1 https://github.com/spinalcordtoolbox/spinalcordtoolbox.git
!yes | spinalcordtoolbox/install_sct
os.environ['PATH'] += f":/content/spinalcordtoolbox/bin"
git clone https://github.com/shimming-toolbox/rf-shimming-7t.git
cd rf-shimming-7t
git checkout main
pip install -r binder/requirements.txt
cd content
repo2data -r ../binder/data_requirement.json

4| Environment setup

In a Python shell:

Import the necessary modules.

Define variables.

5| Process anat/T2starw (GRE)

Run segmentation on GRE scan

Copy CSF masks from the derivatives folder.

For more details about how these masks were created, see: shimming-toolbox/rf-shimming-7t#67.

Crop GRE scan for faster processing and better registration results

Label vertebrae on GRE scan

Register *_T2starw to CoV_T2starw ⏳

Extract the signal intensity on the GRE scan within the spinal cord between levels C3 and T2 (included), which correspond to the region where RF shimming was prescribed.

Prepare data for figure of CSF/SC signal ratio from T2starw scan

<Figure size 720x2160 with 5 Axes>

Perform statistics

6| Process fmap/TFL (flip angle maps)

Register TFL flip angle maps to the GRE scan ⏳

Warping spinal cord segmentation and vertebral level to each flip angle map

Convert the flip angle maps to B1+ efficiency maps [nT/V] (inspired by code from Kyle Gilbert).

The approach consists in calculating the B1+ efficiency using a 1ms, pi-pulse at the acquisition voltage, then scale the efficiency by the ratio of the measured flip angle to the requested flip angle in the pulse sequence.

Extract B1+ value along the spinal cord between levels C3 and T2 (included)

Prepare data for figure of B1+ values along the spinal cord across shim methods

<Figure size 720x2160 with 5 Axes>

Perform statistics

7| Paper figures

Prepare RF shimming mask for figure

Create figure of B1+ maps

<Figure size 576x432 with 9 Axes>

Figure 4:B1+ efficiency for one participant (sub-05) across all seven RF shimming conditions. The top left panel shows the tfl_b1map magnitude image with an overlay of the mask that was used to perform RF shimming. Text inserts show the mean (in nT/V) and CoV (in %) of B1+ efficiency along the spinal cord between C3 and T2.

Loading...
/srv/conda/envs/notebook/lib/python3.8/site-packages/plotly/graph_objs/_deprecations.py:378: DeprecationWarning:

plotly.graph_objs.Line is deprecated.
Please replace it with one of the following more specific types
  - plotly.graph_objs.scatter.Line
  - plotly.graph_objs.layout.shape.Line
  - etc.


'/home/jovyan/clean/data/rf-shimming-7t/ds004906/derivatives/results/figure3.html'
Loading...

Figure 6:B1+ efficiency (A) and CSF/Cord signal ratio from the GRE scan (B) across subjects and across different RF shimming conditions. Data were measured in the spinal cord from C3 to T2 vertebral levels. To match the x-ticks across subjects, the C2-C3 and the T2-T3 intervertebral discs of each subject were aligned with that of the PAM50 template De Leener et al., 2018, and the curves were linearly scaled.

8References

References
  1. Kearney, H., Miller, D. H., & Ciccarelli, O. (2015). Spinal cord MRI in multiple sclerosis–diagnostic, prognostic and clinical value. Nat. Rev. Neurol., 11(6), 327–338. 10.1038/nrneurol.2015.80
  2. David, G., Mohammadi, S., Martin, A. R., Cohen-Adad, J., Weiskopf, N., Thompson, A., & Freund, P. (2019). Traumatic and nontraumatic spinal cord injury: pathological insights from neuroimaging. Nat. Rev. Neurol., 15(12), 718–731. 10.1038/s41582-019-0270-5
  3. Ibrahim, T. S., Lee, R., Abduljalil, A. M., Baertlein, B. A., & Robitaille, P.-M. L. (2001). Dielectric resonances and B1 field inhomogeneity in UHFMRI: computational analysis and experimental findings. Magnetic Resonance Imaging, 19(2), 219–226. 10.1016/S0730-725X(01)00300-9
  4. Collins, C. M., Liu, W., Schreiber, W., Yang, Q. X., & Smith, M. B. (2005). Central brightening due to constructive interference with, without, and despite dielectric resonance. J. Magn. Reson. Imaging, 21(2), 192–196. 10.1002/jmri.20245
  5. Röschmann, P. (1987). Radiofrequency penetration and absorption in the human body: limitations to high-field whole-body nuclear magnetic resonance imaging. Med. Phys., 14(6), 922–931. 10.1118/1.595995
  6. Yang, Q. X., Wang, J., Zhang, X., Collins, C. M., Smith, M. B., Liu, H., Zhu, X.-H., Vaughan, J. T., Ugurbil, K., & Chen, W. (2002). Analysis of wave behavior in lossy dielectric samples at high field. Magn. Reson. Med., 47(5), 982–989. 10.1002/mrm.10137
  7. D’Astous, A., Cereza, G., Papp, D., Gilbert, K. M., Stockmann, J. P., Alonso-Ortiz, E., & Cohen-Adad, J. (2023). Shimming toolbox: An open-source software toolbox for B0 and B1 shimming in MRI. Magnetic Resonance in Medicine, 89(4), 1401–1417. 10.1002/mrm.29528
  8. De Leener, B., Lévy, S., Dupont, S. M., Fonov, V. S., Stikov, N., Collins, D. L., Callot, V., & Cohen-Adad, J. (2017). SCT: Spinal Cord Toolbox, an open-source software for processing spinal cord {MRI} data. NeuroImage, 145, Part A, 24–43. 10.1016/j.neuroimage.2016.10.009
  9. De Leener, B., Fonov, V. S., Collins, D. L., Callot, V., Stikov, N., & Cohen-Adad, J. (2018). PAM50: Unbiased multimodal template of the brainstem and spinal cord aligned with the ICBM152 space. NeuroImage, 165, 170–179. 10.1016/j.neuroimage.2017.10.041