-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BF: Ensure bvec/bval files are only created for dwi output #491
Conversation
`dcm2niix` produces *.bvec/*.bval files whenever it extracts an image collected with a DW sequence. However, BIDS only accepts those files in the `dwi` folders.
It fails CI because the version it installs from Neurodebian is still |
…of dcm2niix failed that test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to be safe than sorry and check if bval is really 0. If not - issue a warning and not remove. That should also then alert bids validator, and user would need to investigate why they have those files (and why it wasn't 0 bval)
Specify the reason of the deletion of `.bvec` and `.bval` files for non `dwi` output. Co-authored-by: Yaroslav Halchenko <debian@onerussian.com>
Codecov Report
@@ Coverage Diff @@
## master #491 +/- ##
==========================================
+ Coverage 76.45% 76.79% +0.34%
==========================================
Files 39 40 +1
Lines 3045 3090 +45
==========================================
+ Hits 2328 2373 +45
Misses 717 717
Continue to review full report at Codecov.
|
That sounds sensible. I will work on it. |
Merge nipy#492 into bvecs_just_for_dwi branch
Print out a warning if they are saved in destination folder if it is not `dwi`
Also, set a variable with the message, for future checks in unit test
Now it checks that there is a warning that `*.bvec` and `*.bval` files are present in a non-`dwi` folder
@yarikoptic, |
No. I would not use a diffusion-weighted image (b non zero) for |
Great, thank you @pvelasco ! |
Currently,
.bvec
/.bval
files are copied into the output folder whenever they are present in thedcm2niix
output.dcm2niix
(v1.0.20201102) creates those files whenever it detects a diffusion sequence and the images are not derived (rordenlab/dcm2niix#352 (comment)). So, with the currentheudiconv
, if you extract an image collected with a diffusion sequence, but with b-value = 0 as afmap
(pepolar
modality), it will copy the.bvec
/.bval
files to thefmap
folder. However, this doesn't conform to BIDS format, which only allows for.bvec
/.bval
for data in thedwi
folder. Consequently, BIDS-validator (v1.5.10) gives an error:This PR makes sure we only copy the
.bvec
/.bval
if the destination folder for an image isdwi
. It also adds a unit test, and the necessary dicom file and heuristics.