diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json
index 92ea1d2..08cf718 100644
--- a/dev/.documenter-siteinfo.json
+++ b/dev/.documenter-siteinfo.json
@@ -1 +1 @@
-{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-12-02T13:00:15","documenter_version":"1.8.0"}}
\ No newline at end of file
+{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-12-02T16:14:59","documenter_version":"1.8.0"}}
\ No newline at end of file
diff --git a/dev/api/index.html b/dev/api/index.html
index f796939..8584be3 100644
--- a/dev/api/index.html
+++ b/dev/api/index.html
@@ -1,2 +1,2 @@
-
API · SEQ_BRUKER_a_MP2RAGE_CS_360.jl RawAcquisitionData_MP2RAGE(b::BrukerFile)
Convert a Bruker dataset acquired with the a_MP2RAGE_CS_360 sequence into a RawAcquisitionData
object compatible with the MRIReco functions.
Input : - b::BrukerFile
Output : - raw::RawAcquisitionData
source params_from_seq(b::BrukerFile)
Extracts MP2RAGE sequence parameters from a Bruker file and returns them in a ParamsMP2RAGE
structure.
Arguments
b::BrukerFile
: Bruker file containing sequence parameter information.Returns
A ParamsMP2RAGE
structure containing key sequence timings and settings for MP2RAGE reconstruction.
source write_bids_MP2RAGE(d::Dict,subname::AbstractString,folder="")
This function writes data from a dictionary (d
) in BIDS (Brain Imaging Data Structure) format for MP2RAGE acquisitions.
Arguments:
d
(Dict): A dictionary containing the data to be written. Expected key-value pairs:
im_reco
(Array): 5D array containing the reconstructed images (x,y,z,NR,TI)MP2RAGE
(Array): Combined MP2RAGE image data. (x,y,z,NR)T1map
(Array): Calculated T1 map from MP2RAGE images. (x,y,z,NR)params_prot
(Dict): Protocol parameters extracted from the Bruker file.params_MP2RAGE
(Struct): Dictionary containing MP2RAGE specific parameters.subname
(AbstractString): The name of the subject.
folder
(AbstractString, optional): The folder where the BIDS data will be written. Defaults to the current directory.
Functionality:
Creates a directory structure for the anatomical data under folder/subname/anat
. Defines a list of file paths for different image types associated with MP2RAGE acquisitions. Extracts relevant data from the dictionary d
for each image type. Creates NIfTI volumes (NIVolume
) with the extracted data and specified voxel size from d["params_prot"]
. Writes each NIfTI volume to a compressed file (.nii.gz
) in the corresponding directory. Extracts acquisition parameters from d
. Creates a dictionary (JSON_dict
) containing these parameters in BIDS format:InversionTime
: List of inversion times (TI1, TI2) in seconds.RepetitionTimeExcitation
: Repetition time (TR) in seconds.RepetitionTimePreparation
: MP2RAGE specific repetition time (MP2RAGE_TR) in seconds.NumberShots
: Echo train length (ETL).FlipAngle
: List of flip angles (alpha1, alpha2) in degrees.MagneticFieldStrength
: Magnetic field strength in Tesla.Units
: Units for the data (set to "arbitrary" in this case). Writes the JSON dictionary to a file named MP2RAGE.json
in the folder/subname
directory. Note: This function assumes the dictionary d
contains the necessary data in the specified format.
source
Theme
Automatic (OS) documenter-light documenter-dark catppuccin-latte catppuccin-frappe catppuccin-macchiato catppuccin-mocha
This document was generated with Documenter.jl version 1.8.0 on Monday 2 December 2024 . Using Julia version 1.11.1.
+API · SEQ_BRUKER_a_MP2RAGE_CS_360.jl RawAcquisitionData_MP2RAGE(b::BrukerFile)
Convert a Bruker dataset acquired with the a_MP2RAGE_CS_360 sequence into a RawAcquisitionData
object compatible with the MRIReco functions.
Input : - b::BrukerFile
Output : - raw::RawAcquisitionData
source params_from_seq(b::BrukerFile)
Extracts MP2RAGE sequence parameters from a Bruker file and returns them in a ParamsMP2RAGE
structure.
Arguments
b::BrukerFile
: Bruker file containing sequence parameter information.Returns
A ParamsMP2RAGE
structure containing key sequence timings and settings for MP2RAGE reconstruction.
source write_bids_MP2RAGE(d::Dict,subname::AbstractString,folder="")
This function writes data from a dictionary (d
) in BIDS (Brain Imaging Data Structure) format for MP2RAGE acquisitions.
Arguments:
d
(Dict): A dictionary containing the data to be written. Expected key-value pairs:
im_reco
(Array): 5D array containing the reconstructed images (x,y,z,NR,TI)MP2RAGE
(Array): Combined MP2RAGE image data. (x,y,z,NR)T1map
(Array): Calculated T1 map from MP2RAGE images. (x,y,z,NR)params_prot
(Dict): Protocol parameters extracted from the Bruker file.params_MP2RAGE
(Struct): Dictionary containing MP2RAGE specific parameters.subname
(AbstractString): The name of the subject.
folder
(AbstractString, optional): The folder where the BIDS data will be written. Defaults to the current directory.
Functionality:
Creates a directory structure for the anatomical data under folder/subname/anat
. Defines a list of file paths for different image types associated with MP2RAGE acquisitions. Extracts relevant data from the dictionary d
for each image type. Creates NIfTI volumes (NIVolume
) with the extracted data and specified voxel size from d["params_prot"]
. Writes each NIfTI volume to a compressed file (.nii.gz
) in the corresponding directory. Extracts acquisition parameters from d
. Creates a dictionary (JSON_dict
) containing these parameters in BIDS format:InversionTime
: List of inversion times (TI1, TI2) in seconds.RepetitionTimeExcitation
: Repetition time (TR) in seconds.RepetitionTimePreparation
: MP2RAGE specific repetition time (MP2RAGE_TR) in seconds.NumberShots
: Echo train length (ETL).FlipAngle
: List of flip angles (alpha1, alpha2) in degrees.MagneticFieldStrength
: Magnetic field strength in Tesla.Units
: Units for the data (set to "arbitrary" in this case). Writes the JSON dictionary to a file named MP2RAGE.json
in the folder/subname
directory. Note: This function assumes the dictionary d
contains the necessary data in the specified format.
source
Theme
Automatic (OS) documenter-light documenter-dark catppuccin-latte catppuccin-frappe catppuccin-macchiato catppuccin-mocha
This document was generated with Documenter.jl version 1.8.0 on Monday 2 December 2024 . Using Julia version 1.11.1.
diff --git a/dev/generated/examples/advanced_reco/72f1c151.png b/dev/generated/examples/advanced_reco/72f1c151.png
new file mode 100644
index 0000000..7b1ec56
Binary files /dev/null and b/dev/generated/examples/advanced_reco/72f1c151.png differ
diff --git a/dev/generated/examples/advanced_reco/eca99084.png b/dev/generated/examples/advanced_reco/eca99084.png
deleted file mode 100644
index a8f6e87..0000000
Binary files a/dev/generated/examples/advanced_reco/eca99084.png and /dev/null differ
diff --git a/dev/generated/examples/advanced_reco/index.html b/dev/generated/examples/advanced_reco/index.html
index e8ab6f4..10ec559 100644
--- a/dev/generated/examples/advanced_reco/index.html
+++ b/dev/generated/examples/advanced_reco/index.html
@@ -13,17 +13,17 @@
"LUT" => Float32[93.0 0.5; 94.0 0.5; … ; 5287.0 -0.5; 5288.0 -0.5]
"params_reco" => Dict{Symbol, Any}(:iterations=>30, :solver=>FISTA, :reg=>…
"params_MP2RAGE" => ParamsMP2RAGE(800.0, 2284.1, 7.0, 5000.0, 128, 7.0, 7.0)
- "im_reco" => ComplexF32[20.8242+0.387125im 10.105+14.7264im … 68.1592-…
- "T1map" => Float32[2702.0 2283.0 … 1309.0 1517.0; 2302.0 1177.0 … 10…
+ "im_reco" => ComplexF32[20.6719+0.527998im 10.2103+14.8792im … 68.1409…
+ "T1map" => Float32[2686.0 2301.0 … 1311.0 1511.0; 2327.0 1187.0 … 10…
"params_prot" => BrukerFile: /home/runner/.julia/artifacts/04cd4c29bb9e2ae…
- "MP2RAGE" => Float32[-0.377357 -0.291027 … 0.0974735 -0.00846032; -0.2…for comparison purposes let's perform the undersampled reconstruction (without the paramCS keyword)
d_under = reconstruction_MP2RAGE(path_bruker; mean_NR=true)
Dict{Any, Any} with 7 entries:
+ "MP2RAGE" => Float32[-0.374886 -0.295793 … 0.0963395 -0.00548892; -0.3…
for comparison purposes let's perform the undersampled reconstruction (without the paramCS keyword)
d_under = reconstruction_MP2RAGE(path_bruker; mean_NR=true)
Dict{Any, Any} with 7 entries:
"LUT" => Float32[93.0 0.5; 94.0 0.5; … ; 5287.0 -0.5; 5288.0 -0.5]
"params_reco" => Dict{Any, Any}(:iterations=>1, :reconSize=>(128, 128, 96)…
"params_MP2RAGE" => ParamsMP2RAGE(800.0, 2284.1, 7.0, 5000.0, 128, 7.0, 7.0)
- "im_reco" => ComplexF32[61.3559+125.33im 14.4777+115.613im … 53.6951-5…
- "T1map" => Float32[2458.0 2484.0 … 1006.0 1792.0; 1926.0 1697.0 … 12…
+ "im_reco" => ComplexF32[61.5519+126.668im 14.7966+115.13im … 53.1283-5…
+ "T1map" => Float32[2463.0 2481.0 … 1006.0 1777.0; 1924.0 1701.0 … 12…
"params_prot" => BrukerFile: /home/runner/.julia/artifacts/04cd4c29bb9e2ae…
- "MP2RAGE" => Float32[-0.331966 -0.337323 … 0.2601 -0.131011; -0.181981…
We can check the results
begin
+ "MP2RAGE" => Float32[-0.333003 -0.336819 … 0.260251 -0.124936; -0.1811…
We can check the results
begin
f = Figure(size=(500,400))
ax=Axis(f[1,1],title="TI₁ undersampled")
h=heatmap!(ax,abs.(d_under["im_reco"][:,:,60,1,1]),colormap=:grays)
@@ -44,6 +44,6 @@
Colorbar(f[2,3],h,label = "T₁ [ms]", flip_vertical_label=true)
f
-end
Results can be written following most of the qBIDS format recommandation
subject_name = "sub_01_cs"
+end
Results can be written following most of the qBIDS format recommandation
subject_name = "sub_01_cs"
dir_path = "" # directory path where the files will be create
-write_bids_MP2RAGE(d,subject_name,dir_path)
This page was generated using Literate.jl .
Theme
Automatic (OS) documenter-light documenter-dark catppuccin-latte catppuccin-frappe catppuccin-macchiato catppuccin-mocha
This document was generated with Documenter.jl version 1.8.0 on Monday 2 December 2024 . Using Julia version 1.11.1.