BIDS, FMRIPREP: specify phase encoding direction with respect to qform orientation in nifti header?

I want to use fieldmap correction in fmriprep but I am unsure how to correctly specify phase encoding direction in the .json files for fMRI data according to BIDS. We are working on a Philipps Scanner and according to our MR-physicist the phase encoding direction for our sequence is Anterior-Posterior. When I check the nifti-file header (using fslhd), the second axis is indicated as “qform_yorient: Posterior-to-Anterior” (same for sform_yorient). Does this mean that I have to indicate the phase encoding direction as “j-” ?

Thanks for your help.

Official BIDS specification for phase encoding direction: “Possible values: "i", "j", "k", "i-", "j-", "k-". The letters i, j, k correspond to the first, second and third axis of the data in the NIFTI file. The polarity of the phase encoding is assumed to go from zero index to maximum index unless - sign is present (then the order is reversed - starting from the highest index instead of zero)”

First you need to check the qform and sform codes. If qform is non-zero and sform is zero, then yes, going by qform_yorient should work, and "j-" would be correct. If sform is non-zero, then it takes precedence over the qform, and you need to verify which axis is A/P, what polarity it is, and adjust accordingly.

Do you have the original DICOMs? Because dcm2niix should do all of this for you, and you can use heudiconv to name your files as you convert.

Thanks for clarification. In my case, qform and sform code are both set to 1 and sform_yorient is also Posterior-Anterior. So “j-” is correct.
I do not have access to the DICOMs, only the parrec files. Therfore I have to specify phase encoding direction manually.

This is a limitation of Philips images (both DICOM and proprietary PAR/REC formats). The BIDS JSON sidecars created by dcm2niix are impoverished for Philips data due to missing information. This reflects a limitation of the source images, not the conversion software. I urge Philips users to lobby their Philips Research Collaboration Managers to provide richer meta-data.

Due to this limitation, at best dcm2niix will create a sidecar field named PhaseEncodingAxis for Philips images:

"PhaseEncodingAxis": "j",

This suggests that the PhaseEncodingDirection is either j or j-, but the polarity is not specified. Since spin-echo EPI undistortion sequences leverage two series with reversed polarity, you can simply guess, and label one as having a PhaseEncodingDirection of j and the other as j-, and TOPUP will find out how to unwrap them (if you applytopup to other scans, use the corresponding PhaseEncodingDirection).

If dcm2niix does not populate the PhaseEncodingAxis or PhaseEncodingDirection fields and the data was acquired as Axial slices, the i (column) direction corresponds to Left/Right and the j (rows) to Anterior/Posterior.

In contrast, if you have DICOM data from a GE or Siemens scanner, dcm2niix will be able to determine the PhaseEncodingDirection :

	"PhaseEncodingDirection": "j-"