How to extract .bval and .bvec from DTI DICOM file

Hello Neurostars members,

Facing problem while extracting .bval and .bvec from DTI DICOM file. Two different methods are followed but still unable to do it.

Method 1:
Dimension of DTI DICOM file is 128x128x80x34. There are a total of 2720 .dcm files (DICOM). The DICOM tag used to filter .bval is “(0018, 9087) Diffusion b-value” and .bvec is “(0018, 9089) Diffusion Gradient Orientation”. When we extracted these values there are 2720 .bval and 2720x3 .bvec values.
To generate fiber tracts we need 34 values saved in .bval file and 34x3 values saved in .bvec file.

Could you please help us to get .bval and .bvec values so that we can generate fiber tracts.

Method 2:
Tried using dcm2niix to extract .bval and .bvec values from DTI DICOM files using following code line.

!dcm2niix -z y -f myMRI%s -o "./New" "./DTI_HIGH_1000"

This command didn’t generate .bvec and .bval files but gave following warning.

Warning: GEIIS violates the DICOM standard. Inspect results and admonish your vendor.

Kindly help to generate .bval and .bvec files from DTI DICOM file.

Thank you so much.

Best regards,
Sunita

I can not provide much more feedback without seeing the data - if possible you can share them with my institutional email. It is worth knowing that the answer depends on your vendor. Since your data does have the public tag 0018,9089 it should be possible to convert these to FSL/BIDS format bvec files. There are two important concerns. The first concern is that the DICOM tags report data in world space, while the FSL/BIDS format requires these to be in image space, so if your images are angulated relative to the scanner bore you will need to rotate the vectors accordingly. Also, be aware that the FSL/BIDS format assumes the NIfTI images have a negative determinant and will swap the first dimension (columns) on disk to ensure this. Therefore, if your NIfTI data has a positive determinant you will want to swap the first component of your bvec file.

I would check you are using the latest generation of dcm2niix (v1.0.20240202). It appears to think that your images were touched by an old GEIIS PACS system which added a image icon that did not conform to the DICOM standard. The issue here is that when subsequent servers touch these, or tools try to anonymize these, the resulting DICOMs can become corrupted in strange ways. The best thing to do is check the provenance of your images, and get a copy before they have been touched by the GEIIS PACS. If this is not archival data, make sure your GEIIS PACS system is upgraded to meet DICOM conformance.

1 Like

Dear Chris,

Please check your institute email. I have shared the DTI file.
Please help in extracting bval, bvec and nii.gz file.

Thank you so much.
Sunita

Hi Chris,

Awaiting your reply.
Kindly please look into the data.
You have expertise in this field and I am pretty much sure that this problem is trivial for you.
Thanks in advance for your help.

Best regards,
Sunita

For future reference, I provided a response on Github