AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
January 10, 2023 03:12PM
Hi,

I tried using dcm2niix_afni to convert my GE DTI blip up / blip down dicom data to NIFTI format. In doing so, I realized that the .bval files that were created did not seem accurate. Every shell had the maximum bval of 1100 except for the first one, which was zero. I think this may be due to a problem with the GE Dicom headers. I found that a previous user in my group extracted the information about bvalues using a cdiflist file. Seeing that AFNI has a function called `convert_cdiflist_to_grads.py` to extract the gradients from this cdiflist file, I ran this command:

convert_cdiflist_to_grads.py -cdiflist cdiflist45 -bval_max 1100 -prefix test

My file called cdiflist45 looks like this:

45
0.00    0.00    0.00 
0.426    0.00    0.00 
0.19    0.381    0.00	
0.19    0.117    0.363 
0.00    0.00    0.00 
0.674    0.00    0.00 
0.301    0.603    0.00 
0.301    0.185    0.574 
1.00      0.00    0.00 
0.166 0.986 0.00	
-0.110 0.664 0.740 
0.901 -0.419 -0.110 
-0.169-0.601 0.781 
-0.815 -0.386 0.433 
0.656 0.366 0.660 
0.582 0.800 0.143 
0.900 0.259 0.350 
0.693 -0.698 0.178 
0.357 -0.924 -0.140 
0.543 -0.488 -0.683 
-0.525 -0.396 0.753 
-0.639 0.689 0.341 
-0.330 -0.013 -0.944 
0.00    0.00    0.00 
0.191    -0.308    -0.224 
0.19    -0.308    0.224 
-0.191    -0.118    0.362 
0.302    -0.487    -0.354 
0.301    -0.488    0.355 
-0.303    -0.187    0.573 
-0.524 -0.783 0.335 
0.609 -0.065 -0.791 
0.220 -0.233 -0.947 
-0.004 -0.910 -0.415 
-0.511 0.627 -0.589 
0.414 0.737 0.535 
-0.679 0.139 -0.721 
0.884 -0.296 0.362 
0.262 0.432 0.863 
0.088 0.185 -0.979 
0.294 -0.907 0.302 
0.887 -0.089 -0.453 
0.257 -0.443 0.859 
0.086 0.867 -0.491 
0.863 0.504 -0.025

When I run this, I receive this error:

++ ver : 0.1 (libver : 0.3)
** ERROR: Cannot have a ragged cdiflist

Do you know how I can fix this issue? Is there a way to use dcm2niix_afni so that I don't need the cdiflist45 file or is this the current workaround?

Thanks!
Price
Subject Author Posted

Convert_cdiflist_to_grads.py Problem

witherscp January 10, 2023 03:12PM

Re: Convert_cdiflist_to_grads.py Problem

ptaylor January 10, 2023 04:58PM

Re: Convert_cdiflist_to_grads.py Problem

witherscp January 10, 2023 05:31PM

Re: Convert_cdiflist_to_grads.py Problem

ptaylor January 10, 2023 06:19PM