BIDS formatting of pepolar field maps for dwi

Hello,

In our dataset we have a full dwi sequence with three b0 with the same phase encoding gradient direction. In addition, there is a separate sequence with only the b0:s with opposite polarity of the phase encoding gradient. The intent is to combine the separate sequence with the b0:s in the main sequence for calculating fieldmaps.
What is the best way of documenting this in BIDS? Should I duplicate the b0:s to a separate file in /fmap in order to have both AP and PA represented there or would e.g. qsiprep understand how to handle a case with only AP in /fmap and PA implicit in the data?

The best way, IMO, is to use the B0FieldIdentifier field in all of these images’ JSON sidecars, whether they are in dwi/ or fmap/. Then add B0FieldSource to any files you want to correct with that field estimate. Note, this can be any alphanumeric string; the idea is just to use the same value to identify related images. And an image can be have both fields, if you want to use it to calculate a field and then correct it with that field.

At least, sdcflows implements B0FieldIdentifier/B0FieldSource. @tsalo or @mattcieslak would know if qsiprep does.

Hi @JSP, QSIPrep will automatically extract the b0 to run SDC with your fmap, so no need to create an extra b0 image. I know QSIPrep honors the IntendedFor method of associating fmaps-to-epis, not sure about B0FieldSource.

Thank you @Steven @effigies !

I will try with B0FieldIdentifier/Source then.
Is a bval file needed in the /fmap folder or is it just assumed that all frames in that file are b0?

No bval/bvec files are needed (or BIDS valid) in fmap folder.

There is a pretty common case where Siemens scanners won’t let you scan b=0-only images, so often you’ll end up with some b>0 images in your _epi files in fmap. We put in an issue a couple years ago to allow .bval and .bvec in fmap/, but this never moved forward. So for some time we would add **/fmap/*.bval and **/fmap/*.bvec to .bidsignore and QSIPrep would look for them outside of PyBIDS and use them to find b=0 images. Since version 0.12 QSIPrep has been using the “Best b=0” method for figuring out which images to send to topup. The b>0 images will never end up being picked as the “best b=0” due to their differences in contrast to the other b=0s. But if all the data in fmap/*_epi is terrible you may end up with a b>0 and bad topup results anyways.

QSIPrep doesn’t make use of the B0FieldIdentifier yet. I’d like to add it but in practice very few BIDS datasets actually use this feature.

more relevant, if you have an IntendedFor in your epi fmap pointing to the reverse PE dwi, QSIPrep will extract b=0s from your dwi and run topup with them. No need to extract any images from the dwi

I see. Actually, the same limitation applies to GE scanners. I ended up just storing the B0 frames from the AP sequence in /fmap. Is there any disadvantage of doing that?

it will function the same, you’ll just have slightly misleading text in your html report. The methods boilerplate will still be correct, but there is a section that describes the distortion groups and how they were supplied to topup. It normally tells you the original image and the timepoint within the image that each volume came from, so the original timepoint in your dwi image won’t be reported.