BIDS structure to detect rev_b0

Hello TractoFlow team,

I’m having problems getting TractoFlow to recognize the rev_b0 image in my BIDs structure. I ran dcm2bids with the following config:

{
    "descriptions": [
        {
            "dataType": "anat",
            "modalityLabel": "T1w",
            "criteria": {
                "SeriesDescription": "*MPRAGE*"
            }
        },
        {
            "dataType": "dwi",
            "modalityLabel": "dwi",
            "criteria": {
                "SeriesDescription": "*DTI*"
            }
        },
        {
            "dataType": "func",
            "modalityLabel": "bold",
            "customLabels": "task-rest",
            "criteria": {
                "SeriesDescription": "*restbold*"
            }
        },
        {
            "dataType": "fmap",
            "modalityLabel": "fmap",
            "customLabels": "phase",
            "criteria": {
                "SidecarFilename": "*B0map*ph*"
            },
            "IntendedFor": 1
        }
    ]
}

And I see this in the directory structure:

sub-600009963128/anat:
sub-600009963128_T1w.json  sub-600009963128_T1w.nii.gz

sub-600009963128/dwi:
sub-600009963128_run-01_dwi.bval  sub-600009963128_run-01_dwi.json    sub-600009963128_run-02_dwi.bval  sub-600009963128_run-02_dwi.json
sub-600009963128_run-01_dwi.bvec  sub-600009963128_run-01_dwi.nii.gz  sub-600009963128_run-02_dwi.bvec  sub-600009963128_run-02_dwi.nii.gz

sub-600009963128/fmap:
sub-600009963128_phase_run-01_fmap.json  sub-600009963128_phase_run-01_fmap.nii.gz  sub-600009963128_phase_run-02_fmap.json  sub-600009963128_phase_run-02_fmap.nii.gz

sub-600009963128/func:
sub-600009963128_task-rest_bold.json  sub-600009963128_task-rest_bold.nii.gz

However, topup is not running. Does it expect some pre0defined file name to find the corresponding rev_b0s?

Thanks!

Dear @gsudre,

Thank you for using Tractoflow.

A couple of things:

  1. In the BIDS structure rev_b0 needs the suffix _epi and not fmap. See here
  2. 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.

Give it a try and don’t hesitate to ask for help.

Best,
Arnaud

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)?

Thanks again,

Gustavo

Hi @gsudre,

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.

Hope it helps
Best,
Arnaud

Yes, that’s quite helpful. Thanks Arnaud!

MANAGED BY INCF