open-discussion > DTIPrep is not recognizing B0 Images
Showing 1-11 of 11 posts
Jun 9, 2020 07:06 PM | Steven Meisler - Harvard University / MIT
DTIPrep is not recognizing B0 Images
Hello DTIPrep team,
I am working with DWI data that have multiple b-vals (0, 1000, 1500, 3000). However, for whatever reason (I did not collect the data), each entry in the bval text file is slightly off from the standard number. For example, at some of the entries where 3000 should be, 3010 is there instead. This was also true for the baseline scans, where there were 5s instead of 0s. As one may expect, when I ran these data under DTIPrep (1.2.4, Linux, also tested 1.2.9) with the default protocol, I received an error: FAIL:Single b-value DWI without a b0/baseline. I presume this is because there were 5s in place of 0s in the bvals. In addition, I also receive the following error: DWI data error. Not all the gradient directions have same repetition. GradientNumber= XX 1 != 7. Something else peculiar with the output, however, is that every QCed b-value for any slice that survived correction was 3010, regardless of the slice's original bvalue.
I made a script to change every 5 to a 0 in the bvals, but even then, I see that DTIPrep still chooses to ignore these b0 images, and the problems listed above persist. Hopefully these problems are related. Please let me know if you would need any additional information to help diagnose the problem.
Thanks,
Steven
I am working with DWI data that have multiple b-vals (0, 1000, 1500, 3000). However, for whatever reason (I did not collect the data), each entry in the bval text file is slightly off from the standard number. For example, at some of the entries where 3000 should be, 3010 is there instead. This was also true for the baseline scans, where there were 5s instead of 0s. As one may expect, when I ran these data under DTIPrep (1.2.4, Linux, also tested 1.2.9) with the default protocol, I received an error: FAIL:Single b-value DWI without a b0/baseline. I presume this is because there were 5s in place of 0s in the bvals. In addition, I also receive the following error: DWI data error. Not all the gradient directions have same repetition. GradientNumber= XX 1 != 7. Something else peculiar with the output, however, is that every QCed b-value for any slice that survived correction was 3010, regardless of the slice's original bvalue.
I made a script to change every 5 to a 0 in the bvals, but even then, I see that DTIPrep still chooses to ignore these b0 images, and the problems listed above persist. Hopefully these problems are related. Please let me know if you would need any additional information to help diagnose the problem.
Thanks,
Steven
Jun 11, 2020 08:06 PM | Martin Styner
RE: DTIPrep is not recognizing B0 Images
Originally posted by Steven Meisler:
yes, we are aware that DTIPrep does not recognize low b-values as baselines. The plan is for the next version to have a threshold parameter to identify baseline. At the moment, manually setting/hacking these to 0 is the best workaround.
The other error, you should be able to safely disregard.
Wrt the output QC data: how did you assess the b-value from the output file (as only the max b-value is explicitly stored in NRRD, the other b-values are computed as a ratio to the max b-value via the 2-norm of the gradient direction)? Did it look very different in the input DWI file?
Best
Martin
Hello DTIPrep team,
I am working with DWI data that have multiple b-vals (0, 1000, 1500, 3000). However, for whatever reason (I did not collect the data), each entry in the bval text file is slightly off from the standard number. For example, at some of the entries where 3000 should be, 3010 is there instead. This was also true for the baseline scans, where there were 5s instead of 0s. As one may expect, when I ran these data under DTIPrep (1.2.4, Linux, also tested 1.2.9) with the default protocol, I received an error: FAIL:Single b-value DWI without a b0/baseline. I presume this is because there were 5s in place of 0s in the bvals. In addition, I also receive the following error: DWI data error. Not all the gradient directions have same repetition. GradientNumber= XX 1 != 7. Something else peculiar with the output, however, is that every QCed b-value for any slice that survived correction was 3010, regardless of the slice's original bvalue.
I made a script to change every 5 to a 0 in the bvals, but even then, I see that DTIPrep still chooses to ignore these b0 images, and the problems listed above persist. Hopefully these problems are related. Please let me know if you would need any additional information to help diagnose the problem.
Thanks,
Steven
Hi StevenI am working with DWI data that have multiple b-vals (0, 1000, 1500, 3000). However, for whatever reason (I did not collect the data), each entry in the bval text file is slightly off from the standard number. For example, at some of the entries where 3000 should be, 3010 is there instead. This was also true for the baseline scans, where there were 5s instead of 0s. As one may expect, when I ran these data under DTIPrep (1.2.4, Linux, also tested 1.2.9) with the default protocol, I received an error: FAIL:Single b-value DWI without a b0/baseline. I presume this is because there were 5s in place of 0s in the bvals. In addition, I also receive the following error: DWI data error. Not all the gradient directions have same repetition. GradientNumber= XX 1 != 7. Something else peculiar with the output, however, is that every QCed b-value for any slice that survived correction was 3010, regardless of the slice's original bvalue.
I made a script to change every 5 to a 0 in the bvals, but even then, I see that DTIPrep still chooses to ignore these b0 images, and the problems listed above persist. Hopefully these problems are related. Please let me know if you would need any additional information to help diagnose the problem.
Thanks,
Steven
yes, we are aware that DTIPrep does not recognize low b-values as baselines. The plan is for the next version to have a threshold parameter to identify baseline. At the moment, manually setting/hacking these to 0 is the best workaround.
The other error, you should be able to safely disregard.
Wrt the output QC data: how did you assess the b-value from the output file (as only the max b-value is explicitly stored in NRRD, the other b-values are computed as a ratio to the max b-value via the 2-norm of the gradient direction)? Did it look very different in the input DWI file?
Best
Martin
Jun 15, 2020 03:06 PM | Steven Meisler - Harvard University / MIT
RE: DTIPrep is not recognizing B0 Images
Hi Martin,
Thank you for your response. I assessed the QCed b-values by converting the output NRRD to FSL with DWIConvert. I was unaware only the max b-value is stored in the NRRD, which would explain the homogeneity in the b-value outputs. Given that I would like to use the QCed data as inputs to a different program to perform tractography, which requires a .nii.gz input w/ bval and bvec txt files, does DTIPrep have a method of returning all b-values (not only the max value)? I suppose a workaround would be to parse the QC report to extract the indices of slices that survive QC, and then index the original bvalue txt file accordingly.
Also, for some reason after manually setting the baseline b-values to 0, DTIPrep still did not recognize them as baseline. I only changed the .txt file; would any manipulation need to be done to the .nii as well?
Thanks,
Steven
Thank you for your response. I assessed the QCed b-values by converting the output NRRD to FSL with DWIConvert. I was unaware only the max b-value is stored in the NRRD, which would explain the homogeneity in the b-value outputs. Given that I would like to use the QCed data as inputs to a different program to perform tractography, which requires a .nii.gz input w/ bval and bvec txt files, does DTIPrep have a method of returning all b-values (not only the max value)? I suppose a workaround would be to parse the QC report to extract the indices of slices that survive QC, and then index the original bvalue txt file accordingly.
Also, for some reason after manually setting the baseline b-values to 0, DTIPrep still did not recognize them as baseline. I only changed the .txt file; would any manipulation need to be done to the .nii as well?
Thanks,
Steven
Jun 16, 2020 01:06 AM | Martin Styner
RE: DTIPrep is not recognizing B0 Images
Hi Steven
Sorry, I was imprecise. All the b-values are still there, in the NRRD header, they are just not mentioned explicitly (only a reference b-value is listed, and that is usually the maximum b-value, though it strictly does not need to be the max b-value), but encoded with the magnitude/norm of the b-vecors. A great explanation of the encoding of b-values and b-vectors in NRRD headers can be found here:
https://www.na-mic.org/wiki/NAMIC_Wiki:D...
If you want explicit b-values, one possibility is also to convert the NRRD file back to NIFTI using DWIConvert (it can convert back to/from NRDD & NIFTI). Just type DWIConvert --help and you should get a sufficient help information to know how to do that.
Re setting baseline b-values to 0, just to ensure I fully understand: what you did is a) set b-values to 0 in the NIFTI b-val file, b) convert NIFTI to NRRD via DWIConvert (and providing that edited b-val file to DWIConvert as one of the input options) and then looking at the header of the NRRD file. It's quite possible that you need to also edit the b-vec file and set the gradient vector for the baselines to 0,0,0 for this to work.
Martin
Originally posted by Steven Meisler:
Sorry, I was imprecise. All the b-values are still there, in the NRRD header, they are just not mentioned explicitly (only a reference b-value is listed, and that is usually the maximum b-value, though it strictly does not need to be the max b-value), but encoded with the magnitude/norm of the b-vecors. A great explanation of the encoding of b-values and b-vectors in NRRD headers can be found here:
https://www.na-mic.org/wiki/NAMIC_Wiki:D...
If you want explicit b-values, one possibility is also to convert the NRRD file back to NIFTI using DWIConvert (it can convert back to/from NRDD & NIFTI). Just type DWIConvert --help and you should get a sufficient help information to know how to do that.
Re setting baseline b-values to 0, just to ensure I fully understand: what you did is a) set b-values to 0 in the NIFTI b-val file, b) convert NIFTI to NRRD via DWIConvert (and providing that edited b-val file to DWIConvert as one of the input options) and then looking at the header of the NRRD file. It's quite possible that you need to also edit the b-vec file and set the gradient vector for the baselines to 0,0,0 for this to work.
Martin
Originally posted by Steven Meisler:
Hi Martin,
Thank you for your response. I assessed the QCed b-values by converting the output NRRD to FSL with DWIConvert. I was unaware only the max b-value is stored in the NRRD, which would explain the homogeneity in the b-value outputs. Given that I would like to use the QCed data as inputs to a different program to perform tractography, which requires a .nii.gz input w/ bval and bvec txt files, does DTIPrep have a method of returning all b-values (not only the max value)? I suppose a workaround would be to parse the QC report to extract the indices of slices that survive QC, and then index the original bvalue txt file accordingly.
Also, for some reason after manually setting the baseline b-values to 0, DTIPrep still did not recognize them as baseline. I only changed the .txt file; would any manipulation need to be done to the .nii as well?
Thanks,
Steven
Thank you for your response. I assessed the QCed b-values by converting the output NRRD to FSL with DWIConvert. I was unaware only the max b-value is stored in the NRRD, which would explain the homogeneity in the b-value outputs. Given that I would like to use the QCed data as inputs to a different program to perform tractography, which requires a .nii.gz input w/ bval and bvec txt files, does DTIPrep have a method of returning all b-values (not only the max value)? I suppose a workaround would be to parse the QC report to extract the indices of slices that survive QC, and then index the original bvalue txt file accordingly.
Also, for some reason after manually setting the baseline b-values to 0, DTIPrep still did not recognize them as baseline. I only changed the .txt file; would any manipulation need to be done to the .nii as well?
Thanks,
Steven
Jun 25, 2020 07:06 PM | Steven Meisler - Harvard University / MIT
RE: DTIPrep is not recognizing B0 Images
Hi Martin,
Sorry for late reply; manually changing the bvecs (in addition to the bvals which I was already doing) to 0 seemed to have worked for DTIPrep to recognize baseline scans! When I convert the QCed NRRD back to NIFTI using DWIConvert, I still see that the each bval from the output of DWIConvert always hover around the maximum bvalue (differs by no more than 0.02).
Best,
Steven
Sorry for late reply; manually changing the bvecs (in addition to the bvals which I was already doing) to 0 seemed to have worked for DTIPrep to recognize baseline scans! When I convert the QCed NRRD back to NIFTI using DWIConvert, I still see that the each bval from the output of DWIConvert always hover around the maximum bvalue (differs by no more than 0.02).
Best,
Steven
Jun 25, 2020 08:06 PM | Martin Styner
RE: DTIPrep is not recognizing B0 Images
mmm, there seems to be an issue with
DWIConvert. Which version of DWIConvert are you using? Maybe using
a newer version (e.g. from Slicer 4.10) may work?
Martin
Originally posted by Steven Meisler:
Martin
Originally posted by Steven Meisler:
Hi Martin,
Sorry for late reply; manually changing the bvecs (in addition to the bvals which I was already doing) to 0 seemed to have worked for DTIPrep to recognize baseline scans! When I convert the QCed NRRD back to NIFTI using DWIConvert, I still see that the each bval from the output of DWIConvert always hover around the maximum bvalue (differs by no more than 0.02).
Best,
Steven
Sorry for late reply; manually changing the bvecs (in addition to the bvals which I was already doing) to 0 seemed to have worked for DTIPrep to recognize baseline scans! When I convert the QCed NRRD back to NIFTI using DWIConvert, I still see that the each bval from the output of DWIConvert always hover around the maximum bvalue (differs by no more than 0.02).
Best,
Steven
Jun 26, 2020 06:06 PM | Steven Meisler - Harvard University / MIT
RE: DTIPrep is not recognizing B0 Images
I am using DWIConvert version 1.0.0 as packaged with DTIPrep 1.2.4,
I will try to use a more recent version and get back to you.
Jun 26, 2020 06:06 PM | Martin Styner
RE: DTIPrep is not recognizing B0 Images
Yeah, that's super old and is know to have issues with NIFTI-NRRD
conversion (we use v4.6 right now), so that would explain it.
Martin
Martin
Jun 29, 2020 06:06 PM | Steven Meisler - Harvard University / MIT
RE: DTIPrep is not recognizing B0 Images
I have been struggling with installing Slicer and using its
command-line DWIConvert tool on my HPC. Does it come with DTIPrep
after 1.2.4?
Jul 1, 2020 07:07 PM | Steven Meisler - Harvard University / MIT
RE: DTIPrep is not recognizing B0 Images
I found an older version of slicer that had a more recent version
of DWIConvert; that did the trick thanks!
Jul 1, 2020 08:07 PM | Martin Styner
RE: DTIPrep is not recognizing B0 Images
Originally posted by Steven Meisler:
Martin
I found an older version of slicer that had a
more recent version of DWIConvert; that did the trick thanks!
Just in case, I added a separate
download for a statically linked version of DWIConvert (v 4.6) to
the downloads section.Martin