Skip to content

Commit a636ccf

Browse files
author
Documenter.jl
committed
build based on b255cf7
1 parent b35acbc commit a636ccf

29 files changed

+72
-74
lines changed

dev/.documenter-siteinfo.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-09T06:25:32","documenter_version":"1.7.0"}}
1+
{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-12T15:39:49","documenter_version":"1.7.0"}}

dev/api/index.html

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<!DOCTYPE html>
2+
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>API · SEQ_BRUKER_a_MP2RAGE_CS_360.jl</title><meta name="title" content="API · SEQ_BRUKER_a_MP2RAGE_CS_360.jl"/><meta property="og:title" content="API · SEQ_BRUKER_a_MP2RAGE_CS_360.jl"/><meta property="twitter:title" content="API · SEQ_BRUKER_a_MP2RAGE_CS_360.jl"/><meta name="description" content="Documentation for SEQ_BRUKER_a_MP2RAGE_CS_360.jl."/><meta property="og:description" content="Documentation for SEQ_BRUKER_a_MP2RAGE_CS_360.jl."/><meta property="twitter:description" content="Documentation for SEQ_BRUKER_a_MP2RAGE_CS_360.jl."/><meta property="og:url" content="https://CRMSB.github.io/SEQ_BRUKER_a_MP2RAGE_CS_360.jl/api/"/><meta property="twitter:url" content="https://CRMSB.github.io/SEQ_BRUKER_a_MP2RAGE_CS_360.jl/api/"/><link rel="canonical" href="https://CRMSB.github.io/SEQ_BRUKER_a_MP2RAGE_CS_360.jl/api/"/><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../search_index.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-mocha.css" data-theme-name="catppuccin-mocha"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-macchiato.css" data-theme-name="catppuccin-macchiato"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-frappe.css" data-theme-name="catppuccin-frappe"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-latte.css" data-theme-name="catppuccin-latte"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="../">SEQ_BRUKER_a_MP2RAGE_CS_360.jl</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><span class="tocitem">Examples</span><ul><li><a class="tocitem" href="../generated/examples/simple_reco/">Simple reconstruction</a></li><li><a class="tocitem" href="../generated/examples/advanced_reco/">Compressed-sensing reconstruction</a></li></ul></li><li class="is-active"><a class="tocitem" href>API</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>API</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>API</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/CRMSB/SEQ_BRUKER_a_MP2RAGE_CS_360" title="View the repository on GitHub"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">GitHub</span></a><a class="docs-navbar-link" href="https://github.com/CRMSB/SEQ_BRUKER_a_MP2RAGE_CS_360/blob/main/docs/src/api.md" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="SEQ_BRUKER_a_MP2RAGE_CS_360.RawAcquisitionData_MP2RAGE-Tuple{MRIFiles.BrukerFile}" href="#SEQ_BRUKER_a_MP2RAGE_CS_360.RawAcquisitionData_MP2RAGE-Tuple{MRIFiles.BrukerFile}"><code>SEQ_BRUKER_a_MP2RAGE_CS_360.RawAcquisitionData_MP2RAGE</code></a> — <span class="docstring-category">Method</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">RawAcquisitionData_MP2RAGE(b::BrukerFile)</code></pre><p>Convert a Bruker dataset acquired with the a_MP2RAGE_CS_360 sequence into a <code>RawAcquisitionData</code> object compatible with the MRIReco functions.</p><p>Input : - b::BrukerFile</p><p>Output : - raw::RawAcquisitionData</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CRMSB/SEQ_BRUKER_a_MP2RAGE_CS_360/blob/b255cf7461a207e9dad428898868dd1f886ef80e/src/bruker_sequence.jl#L3-L14">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="SEQ_BRUKER_a_MP2RAGE_CS_360.params_from_seq-Tuple{MRIFiles.BrukerFile}" href="#SEQ_BRUKER_a_MP2RAGE_CS_360.params_from_seq-Tuple{MRIFiles.BrukerFile}"><code>SEQ_BRUKER_a_MP2RAGE_CS_360.params_from_seq</code></a> — <span class="docstring-category">Method</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">params_from_seq(b::BrukerFile)</code></pre><p>Extracts MP2RAGE sequence parameters from a Bruker file and returns them in a <code>ParamsMP2RAGE</code> structure.</p><p><strong>Arguments</strong></p><ul><li><code>b::BrukerFile</code>: Bruker file containing sequence parameter information.</li></ul><p><strong>Returns</strong></p><p>A <code>ParamsMP2RAGE</code> structure containing key sequence timings and settings for MP2RAGE reconstruction.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CRMSB/SEQ_BRUKER_a_MP2RAGE_CS_360/blob/b255cf7461a207e9dad428898868dd1f886ef80e/src/reconstruction.jl#L86-L96">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="SEQ_BRUKER_a_MP2RAGE_CS_360.write_bids_MP2RAGE" href="#SEQ_BRUKER_a_MP2RAGE_CS_360.write_bids_MP2RAGE"><code>SEQ_BRUKER_a_MP2RAGE_CS_360.write_bids_MP2RAGE</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs"> write_bids_MP2RAGE(d::Dict,subname::AbstractString,folder=&quot;&quot;)</code></pre><p>This function writes data from a dictionary (<code>d</code>) in BIDS (Brain Imaging Data Structure) format for MP2RAGE acquisitions.</p><p><strong>Arguments:</strong></p><ul><li><p><code>d</code> (Dict): A dictionary containing the data to be written. Expected key-value pairs:</p><ul><li><code>im_reco</code> (Array): 5D array containing the reconstructed images (x,y,z,NR,TI)</li><li><code>MP2RAGE</code> (Array): Combined MP2RAGE image data. (x,y,z,NR)</li><li><code>T1map</code> (Array): Calculated T1 map from MP2RAGE images. (x,y,z,NR)</li><li><code>params_prot</code> (Dict): Protocol parameters extracted from the Bruker file.</li><li><code>params_MP2RAGE</code> (Struct): Dictionary containing MP2RAGE specific parameters.</li></ul></li><li><p><code>subname</code> (AbstractString): The name of the subject.</p></li><li><p><code>folder</code> (AbstractString, optional): The folder where the BIDS data will be written. Defaults to the current directory.</p></li></ul><p><strong>Functionality:</strong></p><ol><li>Creates a directory structure for the anatomical data under <code>folder/subname/anat</code>.</li><li>Defines a list of file paths for different image types associated with MP2RAGE acquisitions.</li><li>Extracts relevant data from the dictionary <code>d</code> for each image type.</li><li>Creates NIfTI volumes (<code>NIVolume</code>) with the extracted data and specified voxel size from <code>d[&quot;params_prot&quot;]</code>.</li><li>Writes each NIfTI volume to a compressed file (<code>.nii.gz</code>) in the corresponding directory.</li><li>Extracts acquisition parameters from <code>d</code>.</li><li>Creates a dictionary (<code>JSON_dict</code>) containing these parameters in BIDS format:<ul><li><code>InversionTime</code>: List of inversion times (TI1, TI2) in seconds.</li><li><code>RepetitionTimeExcitation</code>: Repetition time (TR) in seconds.</li><li><code>RepetitionTimePreparation</code>: MP2RAGE specific repetition time (MP2RAGE_TR) in seconds.</li><li><code>NumberShots</code>: Echo train length (ETL).</li><li><code>FlipAngle</code>: List of flip angles (alpha1, alpha2) in degrees.</li><li><code>MagneticFieldStrength</code>: Magnetic field strength in Tesla.</li><li><code>Units</code>: Units for the data (set to &quot;arbitrary&quot; in this case).</li></ul></li><li>Writes the JSON dictionary to a file named <code>MP2RAGE.json</code> in the <code>folder/subname</code> directory.</li></ol><p><strong>Note:</strong> This function assumes the dictionary <code>d</code> contains the necessary data in the specified format. </p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CRMSB/SEQ_BRUKER_a_MP2RAGE_CS_360/blob/b255cf7461a207e9dad428898868dd1f886ef80e/src/BIDS.jl#L3-L39">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../generated/examples/advanced_reco/">« Compressed-sensing reconstruction</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Tuesday 12 November 2024 15:39">Tuesday 12 November 2024</span>. Using Julia version 1.11.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

dev/generated/examples/advanced_reco.ipynb

+19-22
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,28 @@
4141
],
4242
"metadata": {}
4343
},
44+
{
45+
"outputs": [],
46+
"cell_type": "code",
47+
"source": [
48+
"using SEQ_BRUKER_a_MP2RAGE_CS_360.MRIReco\n",
49+
"using SEQ_BRUKER_a_MP2RAGE_CS_360.MRIReco.RegularizedLeastSquares"
50+
],
51+
"metadata": {},
52+
"execution_count": null
53+
},
4454
{
4555
"cell_type": "markdown",
4656
"source": [
47-
"## Loading Package"
57+
"## Download the datasets\n",
58+
"if you run the literate example offline change the following line by : `MP2_artifacts = artifact\"MP2RAGE_data\""
4859
],
4960
"metadata": {}
5061
},
5162
{
5263
"outputs": [],
5364
"cell_type": "code",
5465
"source": [
55-
"using LazyArtifacts # loading data\n",
56-
"using SEQ_BRUKER_a_MP2RAGE_CS_360\n",
57-
"using CairoMakie # plotting\n",
58-
"\n",
5966
"datadir = Main.MP2_artifacts\n",
6067
"@info \"The test data is located at $datadir.\""
6168
],
@@ -86,16 +93,6 @@
8693
],
8794
"metadata": {}
8895
},
89-
{
90-
"outputs": [],
91-
"cell_type": "code",
92-
"source": [
93-
"using SEQ_BRUKER_a_MP2RAGE_CS_360.MRIReco\n",
94-
"using SEQ_BRUKER_a_MP2RAGE_CS_360.MRIReco.RegularizedLeastSquares"
95-
],
96-
"metadata": {},
97-
"execution_count": null
98-
},
9996
{
10097
"cell_type": "markdown",
10198
"source": [
@@ -121,7 +118,7 @@
121118
{
122119
"cell_type": "markdown",
123120
"source": [
124-
"for comparison purpose let's perform the undersampled reconstruction (without the paramCS keyword)"
121+
"for comparison purposes let's perform the undersampled reconstruction (without the paramCS keyword)"
125122
],
126123
"metadata": {}
127124
},
@@ -148,17 +145,17 @@
148145
"begin\n",
149146
" f = Figure(size=(500,400))\n",
150147
" ax=Axis(f[1,1],title=\"TI₁ undersampled\")\n",
151-
" h=heatmap!(ax,abs.(d_under[\"im_reco\"][:,:,60,1,1,1]),colormap=:grays)\n",
148+
" h=heatmap!(ax,abs.(d_under[\"im_reco\"][:,:,60,1,1]),colormap=:grays)\n",
152149
"\n",
153150
" ax=Axis(f[1,2],title=\"TI₁ CS\")\n",
154-
" h=heatmap!(ax,abs.(d[\"im_reco\"][:,:,60,1,1,1]),colormap=:grays)\n",
151+
" h=heatmap!(ax,abs.(d[\"im_reco\"][:,:,60,1,1]),colormap=:grays)\n",
155152
"\n",
156153
"\n",
157-
" ax=Axis(f[2,1],title=\"UNIT1 undersampled\")\n",
158-
" h=heatmap!(ax,d_under[\"T1map\"][:,:,60,1,1],colorrange = (500,2000))\n",
154+
" ax=Axis(f[2,1],title=\"T₁ map undersampled\")\n",
155+
" h=heatmap!(ax,d_under[\"T1map\"][:,:,60,1],colorrange = (500,2000))\n",
159156
"\n",
160-
" ax=Axis(f[2,2],title=\"UNIT1 CS\")\n",
161-
" h=heatmap!(ax,d[\"T1map\"][:,:,60,1,1],colorrange = (500,2000))\n",
157+
" ax=Axis(f[2,2],title=\"T₁ map CS\")\n",
158+
" h=heatmap!(ax,d[\"T1map\"][:,:,60,1],colorrange = (500,2000))\n",
162159
"\n",
163160
" for ax in f.content # hide decoration befor adding colorbar\n",
164161
" hidedecorations!(ax)\n",
Loading
Binary file not shown.

0 commit comments

Comments
 (0)