SEQ_BRUKER_a_MP2RAGE_CS_360.RawAcquisitionData_MP2RAGEMethod
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
SEQ_BRUKER_a_MP2RAGE_CS_360.params_from_seqMethod
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
SEQ_BRUKER_a_MP2RAGE_CS_360.write_bids_MP2RAGEFunction
  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:

  1. Creates a directory structure for the anatomical data under folder/subname/anat.
  2. Defines a list of file paths for different image types associated with MP2RAGE acquisitions.
  3. Extracts relevant data from the dictionary d for each image type.
  4. Creates NIfTI volumes (NIVolume) with the extracted data and specified voxel size from d["params_prot"].
  5. Writes each NIfTI volume to a compressed file (.nii.gz) in the corresponding directory.
  6. Extracts acquisition parameters from d.
  7. 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).
  8. 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