Why does BIDS require b0 weighted images to have bvec and bval files? (Aren't they supposed to be standalone images?)

If I understand correctly, b0 weighted images (i.e. diffusion images taken with the b parameter set to 0) should not have .bvec or .bval files. (Because b is 0, there is effectively no diffusion weighting and so it doesn’t make sense to have any .bvec/.bval files.)

(Please let me know if there are errors in my understanding above)

Assuming my understanding is correct, is there a way to make BIDS recognize certain .nii files as being b0 images? At the moment, the BIDS validator is giving an error about how the .nii files representing my b0 scans do not have corresponding .bvec and .bval files…

I suspect the BIDS format does this for consistency. Are you planning to use these images for spatial undistortion or are you hoping to concatenate them with b-weighted images?

For a series with all B=0 volumes, one can infer that the bval file would be filled with zeros. My dcm2niix will only create bval/bvec files if there are some non-zero bvalues in the series. The reason is that my software does not know your intention - without these values it is unclear that this is a diffusion sequence (e.g. it might be a spin-echo sequence used for undistortion of a gradient-echo fMRI/resting state run).

As an aside, be very cautious when setting up a B=0 series that is designed to match other series where B>0. Scanners often will do a lot of automatic optimizations that are limited by the maximum B-value. Therefore, a series that only includes B=0 images may end up different than an identical B=0 acquired with other b-values. This explains the UK Biobank Protocol PDF: the series diff_PA_MPopt_MB3_3b0_lowflip includes a few B=2000 volumes, even though the intention is to acquire a B=0 series with reversed phase encoding polarity for undistorting diff_AP_MPopt_MB3_50b1000_50b2000_8b0_lowflip.

It might be useful to provide some more context:

  1. Did you program a DWI sequence with only b0 and no b weighted images? If so what’s the use case for such sequences?
  2. Or perhaps you split the b0 images from b weighted images? If so what was the use case for doing that? (BIDS assumes such splits would not be necessary to organize raw data)

Regular b weighted images were also captured. For example, there is a file in the directory named sub-subjAC_ses-AC1OCT202016Day1_run-1_dwi.nii.gz, and two files in the directory accordingly named sub-subjAC_ses-AC1OCT202016Day1_run-1_dwi.bval and sub-subjAC_ses-AC1OCT202016Day1_run-1_dwi.bvec.

On the other hand, there’s a file named sub-subjAC_ses-AC1OCT202016Day1_acq-B0s_run-1_dwi.nii.gz, but there are no files named sub-subjAC_ses-AC1OCT202016Day1_acq-B0s_run-1_dwi.bval or sub-subjAC_ses-AC1OCT202016Day1_acq-B0s_run-1_dwi.bvec. The BIDS validator takes issue with this, even though a b0 weighted scan does not need .bval/.bvec files.

I personally didn’t split anything. I simply read the protocol names in the dicominfo file outputted by heudiconv and inferred there were separate scans for capturing the regular b weighted images and the b0 images.

I reasoned that the protocol name “DTI_60slices_30dir_2mmiso REF AP” must mean scans with b!=0, where as the protocol name “DTI b0 1 AP” must mean scans with b=0.

Scans with the former protocol name got “dwi” in their filename, where as those with the latter protocol name got “acq-B0s” in their filename (as seen in my examples in part 1).

Is this how it works, or is this totally nonsensical?

I’m just getting into DWI so sorry if I misinterpreted your questions. Maybe I’m not understanding the scanning process correctly. Any help is much appreciated!

Thank you for the help! Sorry if the following questions are overly basic, I’m rather new to this business.


The main thing I had in mind for the b0 images was using them to correct for eddy currents and head motion. Do those fall under “spatial undistortion”?

My understanding is that fieldmaps are used to correct inhomogeneities in the magnetic field. There are things called B0 fieldmaps, but these not specific to DWI and are different than b0 images which are DTI images taken with b=0. I think the capitalization b is used to distinguish these two ideas. (Please correct me if any of this is incorrect.)

I’m not sure which type of b0/B0 file the post you linked is talking about, but it seems to me that DTI images with b=0 should not be in the fmap folder because they are not fieldmaps?


Also, I didn’t realize that one could “concatenate” b0 images with b-weighted images. What is the purpose of doing that?

I believe in my case, separate scans were carried out to record b-weighted images and b=0 images, which would naturally result in them being separate series. Is this not how it usually works? (You could see my reply below if I’m being unclear, it has a bit more detail)

And since the b0 scans were separate, it seems that I will have to investigate the danger involving optimizations you pointed out near the end, right?


Thank you again for the help!

So just to double check “DTI_60slices_30dir_2mmiso REF AP” doesn’t have any b=0 images at all?

You are correct, B0 refers to the static magnetic field of the MRI scanner. A B0 fieldmap is often used to undistort gradient echo EPI data using FSL’s FUGUE.

Diffusion b=0 images are spin echo sequences where the gradients are not applied, and is effectively a T2-weighted EPI image. A typical diffusion series includes at least one b=0 image and a large number of volumes where the gradients are applied (e.g. b=1000, b=2000) with different vectors. The b=0 image is crucial for calculating a lot of diffusion parameters (e.g. MD, ADC, etc). Some users also acquire a second diffusion series where the phase encoding polarity is reversed. These have spatial distortions of equal magnitude but opposite direction, so you use these to undistort your images with TOPUP.

In general, TOPUP is used for diffusion sequences, as they are spin echo sequences. Gradient echo modalities (fMRI, resting state) can either use a B0 fieldmap with FUGUE or acquire a pair of spin echo sequences for undistortion with TOPUP.

Virtually every diffusion sequence includes at least one b=0 volume. It is usually a good idea to have a few of them in each series, to improve the SNR of the values that use it (MD, ADC, etc).

Can you tell us a little bit about your data? I am wondering if this was acquired on a Siemens XA10 or XA11 system (Vida or Sola). If so, is it possible the data was accidentally exported as classic rather than enhanced DICOM? This would explain the why different b-values are saved as different series. The easy solution is to export your data as enhanced DICOM. I would strongly advise heeding Siemens warning: we highly recommend that the Enhanced DICOM format be used. This is because this format retains far more information in the header.

Honestly, I’m not sure how to check. In the end, I only ended up with two sets of .nii+.bval+.bvec files (so 6 files in total) that fell under the “DTI_60slices_30dir_2mmiso REF AP” category.

How can I check whether b=0 images are included in one of these two sets? (What should I look for? A row of 0s in the .bval file perhaps?)

Unfortunately it doesn’t seem like the explanation in your last paragraph applies, as my scanner was a “3-Tesla Siemans TIM MAGNETOM Trio MRI scanner”.

To confirm, it is not normal for b=0 images to be saved as their own .nii files (unless I used one of the two scanners you mentioned and exported as classic DICOM)?

If so, I maybe I can simply ignore/delete that .nii file with no corresponding .bvec/.bval files, because the b=0 images I’m looking for probably exist in the other .nii files that do properly have corresponding .bvec/.bval files?

(It is still mystifying that there would be a protocol named “DTI b0 1 AP” when b0 images are never collected by themselves, but if I can safely ignore it then I’m willing to.)


The other relevant information about the scan would be that two sets of whole-brain diffusion-weighted volumes (30 directions, b = 1000 s mm-2, 65 slices, voxel size = 2 x 2 x 2 mm3, TR = 9.3 s, TE = 94 ms) plus 6 volumes without diffusion-weighting (b = 0 s mm-2) were collected.

To double check, this thread you linked regarding spatial undistortion was referring to B0 fieldmaps and not b=0 diffusion images, right?


Also, I’m really glad you mentioned that sometimes a second diffusion series where the phase encoding polarity is reversed is also sometimes collected, because I now realize that that’s exactly what happened in my case. I was trying make sense of the AP and PA naming scheme I encountered, and reading up on the phase encoding polarity business made it click.

Yes - look for “0” in bval files. See https://bids-specification.readthedocs.io/en/stable/04-modality-specific-files/01-magnetic-resonance-imaging-data.html#diffusion-imaging-data

On a Siemens Trio, the first volume in a diffusion set is always b=0. Typically, b=0 volumes are acquired in the same series as b-weighted images, but a user can also acquire a series with only b=0 volumes. It is generally a good idea to embed your b=0 images in the same series as the b-weighted images, as this ensures the scanner does not optimize other parameters. However, this requires the user to install a custom gradient table - the default Siemens gradient tables only include a single b=0 volume (the first one). An example might be a clinical user who does not have the research license required to install custom gradient tables. In this case, the user might specify a b-weighted series as well as a b=0 series to boost the SNR of the b=0 data. Another reason for a b=0 series is acquisition of a polarity reversed series for TOPUP/eddy.

@nateConnors can you upload one of the BIDS JSON files from the mysterious images? I wonder if they are derived rather than original raw images. You can usually see this by looking for the term DERIVED in the ImageType tag:

"ImageType": ["ORIGINAL", "PRIMARY", "DIFFUSION", "NONE", "ND", "MOSAIC"],

The DICOM format demands that derived images are saved as a separate series from the raw data. On the Siemens Trio console the user can specify to save derived data (Trace, MD, ColFA) on the Diffusion tab in the MRI console. While a Trace or MD image might look a bit like a b=0 volume, they are derived from all of the b-weighted volumes.

If your images are derived, you want to discard them (with dcm2niix you can use -i y to ignore derived data). For future data, set the console to not generate the derived images. You will be able to create much nicer derived images after you preprocess your data (denoise, deGibbs, eddy, TOPUP).

If the images are not derived, but rather a unique set of b=0 volumes, I would suggest concatenating them (e.g. fslmerge for images, and zero pad bvec/bval files). Additional b=0 images will improve your SNR for several derived diffusion parameters (ADC, MD, MK, etc). While b=0 volumes have inherently higher SNR than the b-weighted images, these are the denominator for several of these derived parameters, so an accurate measure helps (e.g. averaging four b=0 volumes will improve the b=0 SNR by a factor of two relative to a single measurement).

You may want to look at the PowerPoint file and DTI tutorials for my Image to Inference class.

Sorry for the late response, I just wanted to give you my sincere thanks. You have single-handedly progressed my understanding of DTI by a considerable amount - I really appreciate it. I finally understand what’s going on with my separate b0 files and where the mistakes in my data were. I think I’ve successfully concatenated the b0 files to the main DTI series using fslmerge/manual padding (they were indeed a unique set of b=0 volumes and weren’t some derived series).

Also, if only I had found your class earlier! There’s a lot of information there, I’ve started going through the resources and it’s already helped a lot.

Thanks again for everything!