Clarification of fieldmaps from dcm2niix for BIDS


I have browsed a couple similar posts to this issue, but would appreciate some clarification based on my data. I am using dcm2niix to convert various fieldmaps to later reorganize into BIDS. The input data are 2 fieldmaps (Siemens fm2d2r).

FieldMap # 1 input: 84 .ima files
FieldMap # 1 output from dcm2niix: 2 .nii.gz, 2 .json. The files contain _e1 and _e2

FieldMap # 2 input: 42 .ima files
FieldMap #2 output from dcm2niix: 1 .nii.gz and 1 .json file. The files contain _e2_ph

My understanding is that _e1 and _e2 are different echo times (‘magnitude’ in BIDS format?). However, I am uncertain what e2_ph corresponds to in the BIDS format. Is e2_ph considered a ‘phasediff’, and if so does this fieldmap data align with BIDS example 8.9.1 (v1.0.2) which states “Phase difference image and at least one magnitude image”?

Thank you for the help.

I would suggest you look at my fieldmap page. The scanner console can be set to save complex data (the “real” and “imaginary” components) or the reconstructed “magnitude” and “phase” images. Siemens scanners can be set to save one phase difference image and two magnitude images (one for each echo time). I suspect this is what you have. With the exception of field maps we are usually only interested in the “magnitude” image.

dcm2niix uses file name post-fixes to avoid overwriting images and describe the data:

  • “_ph” appended for phase images.
  • “_real” appended for real data.
  • “_imaginary” appended for imaginary data.
  • Magnitude images are the default, so they warrant no special post-fix.
  • _e1, _e2 report echo number for multi-echo data.

You can looks at the BIDS file for your “_e1” and “_e2” images to determine the echo time used.

The files you get from a field map scan are entirely dependent on what you instruct the scanner to save at the time of acquisition - for example on my fieldmap web page I link to an ADNI participant where real/complex data was acquired during one session and magnitude/phase on another. I am going to guess that your data came from a Siemens scanner (you can verify in the BIDS file) and the console was set to save a difference phase map. If this is the case, you should be all set to run Fsl_prepare_fieldmap.

Thank you @Chris_Rorden, your explanation and fieldmap page were very helpful.

For my FieldMap sequence (Siemens fm2d2r) the above explanation suggests that I have two magnitutes (e1,e2) and one phase (_e2_ph). This is similar to the BIDS example 8.9.1. However, I have 2 other sets of fieldmaps as well. Does anyone have any ideas on how to incorporate all of these into BIDS? Based on dcm2niix I will have 9 fieldmaps from the 6 acquired sequences.

The other two sequences are SpinEchoFieldMaps (AP,PA) for task-based, and tfl_b1maps for structural. I am just confused on how to properly incorporate all of these with the BIDS naming.


For the spin echo files the direction is encoded in the file name, so these should be able to live side by side with the two magnitudes and one phasediff file:

Mainline BIDS specification doesn’t cover B1 maps, so for now the bids-validator will not recognize them. It is being proposed as an extension to the standard, but it may be some time before the validator will handle them:

1 Like

I think we decided to use only the “FieldMap” sequences (output: 2 magnitude images, 1 phase image). However, the phase (e2_ph) image only has one echo time, so I’m not sure how this can be considered a ‘phasediff’ fmap according to BIDS. The echo time is the same as the 2nd magnitude image (e2). Any ideas?

I have the same problem when converting dicom to bids,could you please tell me how you solve it finally?THX :grinning:

Assuming your scanner is from Siemens, and you have two magnitude images (one for each of the echo) but only a single phase map, it seems exceedingly likely that the phase map is a difference map. The only other option is that someone deleted the DICOMs for the second phase map. You can check on the scanner console or the sequence PDFs to check what was requested. Unfortunately, I do not think the Siemens DICOMs provide a way to determine for sure, so dcm2niix does the best with the information it has available. As ever, there is no replacement for visual inspection.

For comparison, here is an example of a Siemens field map where two magnitude images are saved and a single difference map.

I do think if you are using a recent version of dcm2niix, it will report the EchoTime1 and EchoTime2 tag for the phase difference maps but only the EchoTime for the raw phase maps. However, I have not acquired a field map where the raw phase maps are stored, so I can not confirm this hypothesis…

	"EchoTime": 0.00765,
	"EchoTime1": 0.00519,
	"EchoTime2": 0.00765,