Skip to content

kspaceKelvin/Gadgetron-SNR-MRD-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

SNR Scaled Reconstruction with Gadgetron

The Gadgetron implements a Signal-to-Noise Ratio (SNR) scaled reconstruction as described by Kellman P et al in Image reconstruction in SNR units: A general method for SNR measurement.

Input Data

This workflow takes as raw k-space data as input and outputs GRAPPA reconstructed images, corresponding g-factor maps, and SNR scaled images. Noise data (generally in the form of dependent data) is required for correct SNR scaling.

Supported Configurations

The default_measurement_dependencies.xml config is used to process the noise dependencies necessary for SNR scaling. The SNR-scaled reconstruction itself in Gadgetron uses the Generic_Cartesian_Grappa_SNR.xml config.

Running the app

A Gadgetron image can be downloaded from Docker Hub at https://hub.docker.com/u/gadgetron. In a command prompt on a system with Docker installed, download the Docker image:

docker pull ghcr.io/gadgetron/gadgetron/gadgetron_ubuntu_rt_nocuda

Start the Docker image and share port 9002:

docker run --rm -p 9002:9002 ghcr.io/gadgetron/gadgetron/gadgetron_ubuntu_rt_nocuda

In another window, use an MRD client such as the one provided from the python-ismrmrd-server or the gadgetron_ismrmrd_client:

Run the client and send the noise data to the server for processing:

gadgetron_ismrmrd_client -c default_measurement_dependencies.xml -g dataset_1 -f rawdata.mrd

Run the client and send the imaging k-space data to the server for SNR scaled reconstruction:

gadgetron_ismrmrd_client -c Generic_Cartesian_Grappa_SNR.xml -g dataset_2 -o recon.mrd -f rawdata.mrd

The output file (e.g. recon.mrd) contains 3 groups of images:

  • image_1 contains GRAPPA reconstructed images
  • image_20 contains the g-factor maps, scaled up by a factor of 100
  • image_300 contains the SNR scaled images, scaled up by a factor of 10

Converting Data From Siemens Raw Data

Siemens "twix" raw data can be converted into MRD format using the siemens_to_ismrmrd converter. Run the converter with the following options: siemens_to_ismrmrd -Z -M --skipSyncData -f twix.dat where:

  • -Z converts all (i.e. including dependent data) datasets from a multi-raid twix .dat file.
  • -M stores these multiple datasets into a single MRD file with multiple group named dataset_1, dataset_2, etc. The last dataset is the primary measurement data and the earlier datasets are dependent data (e.g. containing noise measurements)
  • --skipSyncData is required for datasets from software version XA31 and above.

Note that the Gadgetron requires that the patientID field be present and not empty for noise dependency data to be properly stored. The following Python code can be used to populate the patientID with a dummy value if needed:

import ismrmrd
dset = ismrmrd.Dataset('dataset.mrd', 'dataset_1', False)

xml_header = dset.read_xml_header()
metadata = ismrmrd.xsd.CreateFromDocument(xml_header.decode("utf-8"))

if metadata.subjectInformation is None:
    metadata.subjectInformation = ismrmrd.xsd.subjectInformationType()

metadata.subjectInformation.patientID = 'dummy'

dset.write_xml_header(bytes(metadata.toXML(), 'utf-8'))
dset.close()

About

SNR Scaled Reconstruction with Gadgetron

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published