ISMRMRD Converter

MRecon includes a converter which can be used to convert Philips raw data to the ISMRMRD format (International Society for Magnetic Resonance in Medicine Raw Data). The converter is implemented as a class with a Perform method that is responsible for performing the conversion.

Note

The ISMRMRD converter is open source and can be found in: <MRecon_installation_directory>/src/ISMRMRDConverter.m. However it depends on MRecon to read the Philips raw data; MRecon itself is closed-source.

Prerequisites

The official ISMRMRD MATLAB package must be installed and added to the MATLAB path before using the converter. The package provides the ismrmrd.Dataset, ismrmrd.Acquisition, and ismrmrd.xml interfaces that the converter relies on.

Additionally, the raw data must have been acquired with the ReconFrame patch installed on the scanner. The converter will raise an error if the patch parameters are absent from the raw data file.

Basic Usage

Create an instance of the converter class by passing the path to the Philips raw-data file to the constructor, then call Perform with the desired output path:

>> converter = ISMRMRDConverter('raw_data.raw');
>> converter.Perform('/my_Data/output.h5');

Calling the constructor without arguments opens a file-selection dialog:

>> converter = ISMRMRDConverter();

Configuration Properties

Before calling Perform, the following public properties can be set to control the conversion:

Property

Default

Description

BlockSizeMB

100

Size in megabytes of each chunk when reading imaging data (type 1). Reduce this value for systems with limited memory.

Anonymize

true

When true, patient name, ID, and birthdate are omitted from the ISMRMRD header. Set to false to include identifying information.

Overwrite

true

When true, an existing output file is deleted and recreated. Set to false to raise an error if the output file already exists.

Example:

>> converter = ISMRMRDConverter('raw_data.raw');
>> converter.Anonymize = false;
>> converter.BlockSizeMB = 50;
>> converter.Perform('/my_Data/output.h5');

Perform Options

Perform(output_file) accepts the following optional name-value pair arguments:

image_types — An array of integers specifying which data types to include in the ISMRMRD file. If omitted, all types present in the raw data are included. The available types are:

Value

Description

1

Imaging data (standard k-space profiles)

2

Rejected profiles (flagged ACQ_IS_DUMMYSCAN_DATA + ACQ_USER1)

3

Calibration / phase-correction profiles (flagged ACQ_IS_PHASECORR_DATA)

4

Junk profiles (flagged ACQ_IS_DUMMYSCAN_DATA)

5

Noise measurements (flagged ACQ_IS_NOISE_MEASUREMENT)

FRC (type 6) and trajectory (type 7) data are always written when present, regardless of the image_types filter.

goal_pars — A logical value (true/false) indicating whether to include the scanner’s goal parameters as userParameters in the ISMRMRD header. Default is false.

par_filter — A cell array of strings used as prefix filters for the goal parameters. Only parameters whose names start with one of the provided strings are included. Has no effect when goal_pars is false.

Examples

Convert a Philips raw-data file to ISMRMRD using the default settings:

>> converter = ISMRMRDConverter('raw_data.raw');
>> converter.Perform('/my_Data/output.h5');

Only export the imaging data (type 1):

>> converter = ISMRMRDConverter('raw_data.raw');
>> converter.Perform('/my_Data/output.h5', 'image_types', 1);

Include all goal parameters whose names start with 'EX_':

>> converter = ISMRMRDConverter('raw_data.raw');
>> converter.Perform('/my_Data/output.h5', 'goal_pars', true, 'par_filter', {'EX_'});