raamana / visualqc

VisualQC : assistive tool to ease the quality control workflow of neuroimaging data.
https://raamana.github.io/visualqc/
Apache License 2.0
73 stars 13 forks source link

No b=0 volumes detected for low diffusion files #79

Open araikes opened 1 year ago

araikes commented 1 year ago

Description

Building on #78, visualqc_diffusion expects b=0 images to genuinely be annotated that way in the bval file. However, this may not always be the case (e.g., precise reporting from the b-matrix, preclinical imaging). This then throws an error that there are no b=0 files.

A better approach would be to set a tolerance for what to consider a b=0 image. DIPY handles this rather gracefully with read_bvals_bvecs and gradient_table.

What I Did

(qctools) [adamraikes@gpu20 app_apoe]$ visualqc_diffusion -b nifti_datalad -o visualqc -old

Diffusion MRI module
Time stamp : 2023-10-26 12:11:07

version info: visualqc 0.6.7.dev5+gdfbe142
numpy 1.26.1 / scipy 1.11.3 / matplotlib 3.8.0
python 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:40:32) [GCC 12.3.0]
platform Linux-3.10.0-1160.102.1.el7.x86_64-x86_64-with-glibc2.17
#1 SMP Tue Oct 17 15:42:21 UTC 2023

    Linux distribution: {'NAME': 'CentOS Linux', 'ID': 'centos', 'PRETTY_NAME': 'CentOS Linux 7 (Core)', 'VERSION': '7 (Core)', 'ID_LIKE': 'rhel fedora', 'VERSION_ID': '7', 'ANSI_COLOR': '0;31', 'CPE_NAME': 'cpe:/o:centos:centos:7', 'HOME_URL': 'https://www.centos.org/', 'BUG_REPORT_URL': 'https://bugs.centos.org/', 'CENTOS_MANTISBT_PROJECT': 'CentOS-7', 'CENTOS_MANTISBT_PROJECT_VERSION': '7', 'REDHAT_SUPPORT_PRODUCT': 'centos', 'REDHAT_SUPPORT_PRODUCT_VERSION': '7'}
Input folder: /xdisk/adamraikes/app_apoe/nifti_datalad
Output folder: /xdisk/adamraikes/app_apoe/visualqc
outlier detection: disabled, as requested.

Restoring ratings from previous session(s), if they exist ..
To be reviewed : 45

There are no b=0 volumes for MD5E-s75029873--44e2ef85f3fe332c6930ec58a34658a0.nii.gz! Skipping it..
Skipping current subject ..
raamana commented 1 year ago

thanks Adam - what's your specific suggestion with

A better approach would be to set a tolerance for what to consider a b=0 image. DIPY handles this rather gracefully with read_bvals_bvecs and gradient_table.

consider the first volume with b<100 to be the effective b=0 volume? or call it the minimal b volume? :)

araikes commented 11 months ago

Hi @raamana,

Thought I responded to this but apparently didn't. I'd use "effective b=0." I think that's probably more technically correct. With such a low diffusion weighting, it's effectually 0 (for analytic intents and purposes).

raamana commented 11 months ago

Right. Let me know if want me help you walk through the codebase e.g., reg #80