dke-questions > Error when running DKE: svd
Showing 1-6 of 6 posts
Display:
Results per page:
Jun 13, 2018  04:06 PM | Michael De Biasio
Error when running DKE: svd
Hi,

When running DKE, I get the following error:

Start date and time: June 13, 2018 11:49:41
Diffusional Kurtosis Estimator (DKE) version 2.6.0
Reading input images... complete
Filtering input images... complete.
{Error using svd
Input to SVD must not contain NaN or Inf.

Error in pinv (line 29)
Error in dke_estimate (line 251)
Error in dke (line 182)
}
MATLAB:svd:matrixWithNaNInf


What is the meaning of SVD? What could cause an error like this?

I am using input NIFTI Images with their associated gradient tables. The DKEParameters file used used is attached.

Any help would be greatly appreciated!
Attachment: DKEParameters.dat
Jun 13, 2018  04:06 PM | Hunter Moss
RE: Error when running DKE: svd
Hi Michael,

SVD is singular value decomposition. Most likely there is NaN's within the volumes, possibly outside the brain, somewhere. You can check in MATLAB if this is the case and then just make all voxels where it is NaN = 0. 

Hope this helps.

-Hunter
Jun 14, 2018  12:06 PM | Michael De Biasio
RE: Error when running DKE: svd
Hi Henry,

Thank you for your suggestion. However, I have checked the image files, and there are neither NaN or Inf values in the image volumes. Are there any other reasons why I could be getting this error?

Thanks,

Michael
Jun 15, 2018  06:06 PM | David Lewis - Medical University of South Carolina
RE: Error when running DKE: svd
Hi Michael,

Do you have any 0 vectors in your gradient vector files? The vectors in your gradient vector files should correspond to nonzero b-values.

The gradient vectors are normalized by the program after being read from file. If any of the lines in a gradient vector file are all 0 values, the calculations will produce NaN values in the matrix that is input to SVD.

Hope this helps,
Dave
Jun 15, 2018  07:06 PM | Michael De Biasio
RE: Error when running DKE: svd
Hi Dave,

Thank you! I completely forgot about deleting b0's from the gradient table since I had needed them for all of my pre-processing steps. It's running smoothly now.

Thanks,
Michael
Jun 15, 2018  07:06 PM | David Lewis - Medical University of South Carolina
RE: Error when running DKE: svd
Great to hear that it's working now!

Dave