SEQ_BRUKER_a_MP2RAGE_CS_360.RawAcquisitionData_MP2RAGESEQ_BRUKER_a_MP2RAGE_CS_360.params_from_seqSEQ_BRUKER_a_MP2RAGE_CS_360.write_bids_MP2RAGE
SEQ_BRUKER_a_MP2RAGE_CS_360.RawAcquisitionData_MP2RAGE — MethodRawAcquisitionData_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
SEQ_BRUKER_a_MP2RAGE_CS_360.params_from_seq — Methodparams_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.
SEQ_BRUKER_a_MP2RAGE_CS_360.write_bids_MP2RAGE — Function 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
dfor each image type. - Creates NIfTI volumes (
NIVolume) with the extracted data and specified voxel size fromd["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.jsonin thefolder/subnamedirectory.
Note: This function assumes the dictionary d contains the necessary data in the specified format.