diff --git a/_images/index_41_0.png b/_images/index_44_0.png similarity index 100% rename from _images/index_41_0.png rename to _images/index_44_0.png diff --git a/_images/index_47_0.png b/_images/index_50_0.png similarity index 100% rename from _images/index_47_0.png rename to _images/index_50_0.png diff --git a/index.html b/index.html index db126ee..31e0454 100644 --- a/index.html +++ b/index.html @@ -221,7 +221,7 @@

Figure 1. Overview of the RF shimming procedure.

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 . Such inhomogeneity is particularly problematic for imaging the small, deep anatomical structures of[Collins et al., 2005, Ibrahim et al., 2001, Röschmann, 1987, Yang et al., 2002] 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.

+

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 [Collins et al., 2005, Ibrahim et al., 2001, Röschmann, 1987, Yang 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

@@ -534,10 +534,13 @@

5     |     Process anat/T2starw (GRE)# Data storage for statistics data_stats = [] +# Data storage for Plotly +data_plotly = {} + # Iterate over each subject and create a subplot for i, subject in enumerate(subjects): ax = axes[i] - + data_plotly[subject]={} for shim_mode in shim_modes: # Initialize list to collect data for this shim method method_data = [] @@ -568,14 +571,19 @@

5     |     Process anat/T2starw (GRE)# If there's data for this shim method, plot it and compute stats if method_data: + data_plotly[subject][shim_mode]=method_data + # Plotting each file's data separately for resampled_data in method_data: ax.plot(x_grid, resampled_data, label=f"{shim_mode}", linewidth=line_width) + # Compute stats on the non-resampled data (to avoid interpolation errors) mean_data = np.mean(data_sc_csf_ratio) sd_data = np.std(data_sc_csf_ratio) data_stats.append([subject, shim_mode, mean_data, sd_data]) + else: + data_plotly[subject][shim_mode]=None # Set x-ticks and labels for the bottom subplot if i == n_rows - 1: # Check if it's the last subplot @@ -610,6 +618,186 @@

5     |     Process anat/T2starw (GRE)

+
+
+
# PYTHON CODE
+# Module imports
+
+# Base python
+import os
+from os import path
+from pathlib import Path
+
+# Graphical
+
+import plotly.graph_objs as go
+from IPython.display import display, HTML
+from plotly import __version__
+from plotly.offline import init_notebook_mode, iplot, plot
+config={
+    'showLink': False,
+    'displayModeBar': False,
+    'toImageButtonOptions': {
+                'format': 'png', # one of png, svg, jpeg, webp
+                'filename': 'custom_image',
+                'height': 2500,
+                'width': 500,
+                'scale': 2 # Multiply title/legend/axis/canvas sizes by this factor
+            }
+    }
+
+init_notebook_mode(connected=True)
+
+from plotly.subplots import make_subplots
+import plotly.graph_objects as go
+
+import seaborn as sns
+
+# Set the color palette
+pal=sns.color_palette("Set2")
+
+# Imports
+import warnings
+warnings.filterwarnings("ignore")
+
+## Setup for plots
+fig = make_subplots(rows=5, cols=1,subplot_titles=(
+    'sub-01',
+    'sub-02',
+    'sub-03',
+    'sub-04',
+    'sub-05'))
+
+datasets={}
+data = []
+
+for subject in subjects:
+    datasets[subject]={}
+    for shim_mode in shim_modes:
+        datasets[subject][shim_mode]={}
+        data=go.Line(
+            x=x_grid,
+            y=data_plotly[subject][shim_mode][0],
+            )
+        
+        datasets[subject][shim_mode]=data
+
+index = 1
+# For z-ordering   
+for subject in subjects:
+    for shim_mode in shim_modes:
+        fig.add_trace(
+            datasets[subject][shim_mode],
+            row=index, col=1
+        )
+    index+=1
+
+
+index = 1
+for subject in subjects:
+    fig.update_xaxes(
+        type="linear",
+        autorange=True,
+        title='<b>Vertebral Levels</b>',
+        showgrid=True,
+        gridcolor='rgb(169,169,169)',
+        tickvals=label_positions,
+        ticktext=vertebral_levels,
+        title_font_family="Times New Roman",
+        title_font_size = 20,
+        linecolor='black',
+        linewidth=2,
+        row=index, col=1
+        )
+    fig.update_yaxes(
+        type="linear",
+        title={
+            'text':'<b>CSF/Cord T<sub>2</sub><sup>*</sup>w signal ratio</b>',
+            'standoff':0
+            },
+        showgrid=True,
+        gridcolor='rgb(169,169,169)',
+        title_font_family="Times New Roman",
+        title_font_size = 20,
+        linecolor='black',
+        linewidth=2,
+        row=index, col=1
+        )
+    index+=1
+
+fig.update_layout(height=2000, width=500)
+
+#iplot(fig, filename = 'figure4a', config = config)
+plot(fig, filename = 'figure1a.html', config = config)
+display(HTML('figure1a.html'))
+
+
+
+
+
+
/opt/hostedtoolcache/Python/3.8.18/x64/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.
+
+
+
+ + +
+
+ +
+
+
+
+
label_positions
+
+
+
+
+
array([0.07088123, 0.21264368, 0.3467433 , 0.46934866, 0.59386973,
+       0.74137931, 0.91187739])
+
+
+
+
+
+
+
vertebral_levels
+
+
+
+
+
['C3', 'C4', 'C5', 'C6', 'C7', 'T1', 'T2']
+
+
+
+

Perform statistics

-_images/index_41_0.png +_images/index_44_0.png

Perform statistics

@@ -1134,7 +1322,7 @@

6     |     Process fmap/TFL (flip angle maps)
-_images/index_47_0.png +_images/index_50_0.png