In the BIDS structure rev_b0 needs the suffix _epi and not fmap. See here
Make sure that you’ve got the PhaseEncodingDirection tag in you dwi (json file) as well as in you’re rev_b0 (json file). You can use the option “sidecarChanges” in your config file for dcm2bids to add the information in the json file if it’s not there by default. You need a reverse phase encoding direction between (rev_b0 and dwi) in order to use topup.
As @abore noted, the BIDS file must specify the PhaseEncodingDirection. If your BIDS sidecar lists PhaseEncodingAxis instead of PhaseEncodingDirection, it means that dcm2niix was unable to to determine the polarity of the phase encoding. If your system is from Siemens, PhaseEncodingDirection should be detected. If your system is from GE, you may need to upgrade to the latest release of dcm2niix to detect PhaseEncodingDirection. If your system is from Philips, the DICOM images do not provide information to determine the polarity (I would suggest you lobby your Philips Research Collaboration Manager to report this information in future software releases).
Thank you both for your answers! Yes, I do have PhaseEncodingDirection in the json for both DTI and rev_b0. However, it’s j- for both of them. I’m not too familiar with topup. Should I do something to the rev_b0 sequence?
To be specific, I’m not sure about the “rev” part. The scan is described as “The main magnetic field (i.e. B0) was spatially mapped using a double-echo, gradient-recalled echo (GRE) sequence. Both magnitude and phase images were selected for image reconstruction since it is the phase signal which contains information about the magnetic field”. I’m using the output of dcm2niix in the phase scan (not the magnitude), so do I need to somehow reverse the image (rev_), and make it j+? I actually get two different .nii + sidecar when I convert that scan, each with a single 3D volume, but both j-.
Somewhat unrelated, the actual DTI sequence was acquired in 2 separate runs, such that the bvecs of run1 and run2, together, form a sphere. Should I (manually?) concatenate the two sessions + bval + bvec prior to running TractoFlow, such that all DTI properties are estimated using both runs at once (e.g. instead of two separate, incomplete, FA maps)?
From what you describe I think this a not a rev_b0 especially because the phase encoding direction is the same as the DWI protocol. Also, usually a rev_b0 does not come with mag and phase. You acquisition looks like fieldmaps. You can see a description here here. Tractoflow is not able to use this kind of images.
About your DWI protocol: make sure the phase encoding directions are the same and then yes you’ll have to concatenate these two acquisitions before running tractoflow. You can use the docker hub (scilpy:latest) here and use the command line scil_concatenate_dwi.py to concatenate your dwis.
I have a follow up question about how our DWI data needs to be organized in BIDS format for use with Tractoflow.
If I understand correctly, there should be one DWI run with one particular phase encoded direction (mine is LR/i-/x-) along with bvec and bval files for the run. Then, for susceptibility dist correction, I need one reverse phase encoded (RL/i/x) B0 image.
In the past, I typically pulled out the single B0 image from a RL phase encoded run (which is the first image in that run) to use in FSL correction routines.
Here are my current BIDS /sub-X/ses-01/dwi directory contents
From what I can see, you acquired a full RL/LR. We are currently working on a new version that will be able to take advantage of this kind of acquisition. In the meantime, if you want to make it work you will have to simplify your BIDS organisation. Choose either a RL or LR acquisition put it in the dwi folder then take one of the rev_b0 (the opposite Phase Encoding Direction) and put it in a fmap folder but call it sub-S6581DHW_ses-01_acq-dir91RL_epi.nii.gz. Finally, the json file of this fmap should have a field called “IntendedFor” with the path of the corresponding dwi.
When running tractoflow, the bids arg should point to main bids folder not the subject one.
Hope it helps.
Don’t hesitate if you need more help
For anyone else with this issue, here is what I did
I deleted the following files
sub-S6581DHW_ses-01_acq-dir91RL_dwi.bval
sub-S6581DHW_ses-01_acq-dir91RL_dwi.bvec
sub-S6581DHW_ses-01_acq-dir91RL_dwi.nii.gz
Then I move the following file to /fmap
sub-S6581DHW_ses-01_acq-dir91RL_dwi.json
and renamed it as
sub-S6581DHW_ses-01_acq-dir91RL_epi.json
and added the following text to the bottom of that json file, just before the last curly brace