PennLINC / qsiprep

Preprocessing of diffusion MRI
http://qsiprep.readthedocs.io
BSD 3-Clause "New" or "Revised" License
141 stars 58 forks source link

TOPUP distortion correction field is flipped for my LPS oriented dwi data #793

Open jhauneuro opened 4 months ago

jhauneuro commented 4 months ago

Summary

Qsiprep flips the PE direction of my TOPUP distortion correction field. This issue has been reported and fixed for fmriprep here: FIX: Revise the TOPUP workflow and related utilities #278. Could this fix also be applied to qsiprep?

Additional details

What were you trying to do?

Preprocess my dwi data.

What did you expect to happen?

Successfully preprocess my dwi data and correct for image distortions.

What actually happened?

The dwi output are not corrected for susceptibility distortions because the distortion correction field is flipped (shows opposite contrast to correct distortion field for the data).

Reproducing the bug

I ran the following command:

docker run -ti --rm --gpus all \
    -v /usr/local/freesurfer/7.4.1/license.txt:/opt/freesurfer/license.txt:ro \
    -v $bids_dir:/data:ro \
    -v $eddy_config_file:/sngl/eddy/eddy_config.json:ro \
    -v $out_dir:/out \
    -v $out_dir:/scratch \
    pennbbl/qsiprep:latest /data /out participant \
    --eddy-config /sngl/eddy/eddy_config.json \
    --output-resolution $res --pepolar-method TOPUP \
    --distortion-group-merge average \
    --bids-database-dir $bids_dir \
    -w /scratch --omp-nthreads 1 --nthreads 1 --participant_label $subjID
jhauneuro commented 4 months ago

Correction: My dwi image was LPS+. When I reoriented the data to LAS+ and reran qsiprep the distortion correction is applied correctly.

mattcieslak commented 4 months ago

Thanks for reporting @jhauneuro. How do you typically convert your data from dicom? Are you not using dcm2niix?

jhauneuro commented 3 months ago

@mattcieslak I normally use dcm2niix for conversion to nifti. This particular dataset uses a GE research sequence that requires a different conversion process of reconstructing the images from the raw k-space data (P-files). Because of this I am using in-house recon scripts provided by the imaging center (CFMRI/UCSD) where we are collecting these data. dcm2niix fails on the dicoms (it looks like it doesn't integrate the multiband data well).