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 |
|---|---|---|
|
|
Size in megabytes of each chunk when reading imaging data (type 1). Reduce this value for systems with limited memory. |
|
|
When |
|
|
When |
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
1Imaging data (standard k-space profiles)
2Rejected profiles (flagged
ACQ_IS_DUMMYSCAN_DATA+ACQ_USER1)
3Calibration / phase-correction profiles (flagged
ACQ_IS_PHASECORR_DATA)
4Junk profiles (flagged
ACQ_IS_DUMMYSCAN_DATA)
5Noise measurements (flagged
ACQ_IS_NOISE_MEASUREMENT)FRC (type 6) and trajectory (type 7) data are always written when present, regardless of the
image_typesfilter.goal_pars — A logical value (
true/false) indicating whether to include the scanner’s goal parameters asuserParametersin the ISMRMRD header. Default isfalse.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_parsisfalse.
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_'});