vistalab / vistasoft

VISTASOFT is the main software repository of the VISTA lab at Stanford University.
http://vistalab.stanford.edu
148 stars 141 forks source link

Error using nearpoints: First arg must be a real 3xM array. #355

Open yanbin-niu opened 2 years ago

yanbin-niu commented 2 years ago

Hi,

Hope all is well!

I am trying to use AFQ on the tractography generated by Mrtrix. I am stuck in an issue that I do not understand well:

Error using nearpoints First arg must be a real 3xM array.

Error in dtiIntersectFibersWithRoi (line 156) [~, bestSqDist{ii}] = nearpoints(fc', roiCoords{ii}');

Error in dtiSplitInterhemisphericFibers (line 67) [fgToChop,contentiousFibers, keep] = dtiIntersectFibersWithRoi([], {'and'}, [], roi, fg);

Error in AFQ_SegmentFiberGroups (line 206) fg = dtiSplitInterhemisphericFibers(fg, dt, -10);

The size(fc') is 3x854991991, and size(roiCoords{ii}') is 3x2590. So, I am clueless on why they are not a 3*M array. Please pardon me if this question is very basic.

Any thoughts/advice would be much appreciated! Thank you!!

Best, Yanbin

yanbin-niu commented 2 years ago

It seems that the nearpoints need inputs to be double, and the problem should be solved here (convert the single to double for inputs).