Unclear whether both AP and PA images are used + DTI metrics don't look correct

Hi @Guillaumeth

I ran Tractoflow on a BIDS compliant dataset where each subject has an AP and a PA acquired scan. I started looking through the files that end up in the DTI metrics subfolder, and the results look quite wrong. I’m wondering whether the JSON file Tractoflow automatically creates has not been filled out properly, specifically with regard to whether the rev_b0 field should actually be filled out. Here’s an example for one subject:

        "DWIPhaseEncodingDir": "y",
        "TotalReadoutTime": 0.087376,
        "bval": "/data/DNU/liza/data/XXY/Nifti/sub-NDARINV8XENUGU9/ses-v01/dwi/sub-NDARINV8XENUGU9_ses-v01_acq-AP_dwi.bval",
        "bvec": "/data/DNU/liza/data/XXY/Nifti/sub-NDARINV8XENUGU9/ses-v01/dwi/sub-NDARINV8XENUGU9_ses-v01_acq-AP_dwi.bvec",
        "dwi": "/data/DNU/liza/data/XXY/Nifti/sub-NDARINV8XENUGU9/ses-v01/dwi/sub-NDARINV8XENUGU9_ses-v01_acq-AP_dwi.nii.gz",
        "rev_b0": "",
        "run": 0,
        "session": "v01",
        "subject": "NDARINV8XENUGU9",
        "t1": "/data/DNU/liza/data/XXY/Nifti/sub-NDARINV8XENUGU9/ses-v01/anat/sub-NDARINV8XENUGU9_ses-v01_T1w.nii.gz"
    },
    {
        "DWIPhaseEncodingDir": "y-",
        "TotalReadoutTime": 0.087376,
        "bval": "/data/DNU/liza/data/XXY/Nifti/sub-NDARINV8XENUGU9/ses-v01/dwi/sub-NDARINV8XENUGU9_ses-v01_acq-PA_dwi.bval",
        "bvec": "/data/DNU/liza/data/XXY/Nifti/sub-NDARINV8XENUGU9/ses-v01/dwi/sub-NDARINV8XENUGU9_ses-v01_acq-PA_dwi.bvec",
        "dwi": "/data/DNU/liza/data/XXY/Nifti/sub-NDARINV8XENUGU9/ses-v01/dwi/sub-NDARINV8XENUGU9_ses-v01_acq-PA_dwi.nii.gz",
        "rev_b0": "",
        "run": 0,
        "session": "v01",
        "subject": "NDARINV8XENUGU9",
        "t1": "/data/DNU/liza/data/XXY/Nifti/sub-NDARINV8XENUGU9/ses-v01/anat/sub-NDARINV8XENUGU9_ses-v01_T1w.nii.gz"
    },

This is what the RBG scan looks like for one subject:

I’d really appreciate any help!!

Edit: I have since tried rerunning Tractoflow for one subject where I manually created the rev_b0 image (concatenated b0 from both AP and PA scans and pointed to it in the JSON file. However, I only kept the dictionary corresponding to the AP scan, and the results look about the same as before.

Dear Liza,
Tractoflow doesn’t not work properly with a full scheme of gradients AP/PA as rev_b0. For the rev_b0 you only need to point to a b0 PA image (if your DWI is AP). It can be an image with multiple b0s PA also.

Hope my explanations are clear. Let me know if this fix your issue.

Have a good day and happy new year.

Hi @abore,

Thanks for the message! In that case, would I only need the following for each subject and not the two dictionary entries (one for the ‘y’ phase encoding dir and one for the ‘y-’ phase encoding dir)?

{ "DWIPhaseEncodingDir": "y",
        "TotalReadoutTime": 0.087376,
        "bval": "/data/DNU/liza/data/XXY/Nifti/sub-NDARINV8XENUGU9/ses-v01/dwi/sub-NDARINV8XENUGU9_ses-v01_acq-AP_dwi.bval",
        "bvec": "/data/DNU/liza/data/XXY/Nifti/sub-NDARINV8XENUGU9/ses-v01/dwi/sub-NDARINV8XENUGU9_ses-v01_acq-AP_dwi.bvec",
        "dwi": "/data/DNU/liza/data/XXY/Nifti/sub-NDARINV8XENUGU9/ses-v01/dwi/sub-NDARINV8XENUGU9_ses-v01_acq-AP_dwi.nii.gz",
        "rev_b0": just the b0 PA image (extracted from the full PA image) ,
        "run": 0,
        "session": "v01",
        "subject": "NDARINV8XENUGU9",
        "t1": "/data/DNU/liza/data/XXY/Nifti/sub-NDARINV8XENUGU9/ses-v01/anat/sub-NDARINV8XENUGU9_ses-v01_T1w.nii.gz"
    }

Hi @Liza_Levitis

Yes, just extract your b0 PA and put the path in the json file. After that, instead of using --bids argument, use --bids_config with the path of your json file modified.

Guillaume