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

Unnecessary memory expansion? #318

Open DanNBullock opened 5 years ago

DanNBullock commented 5 years ago

https://github.com/vistalab/vistasoft/blob/8c402f91ff54a44b0fb532f31550952021ca5f58/fileFilters/mrtrix/dtiImportFibersMrtrix.m#L103

Hypothetically speaking, if the streamline coordinates of the input fg are not in double precision float, doesn't this double the ram usage without any associated gain in precision?

Indeed, at this point (https://github.com/vistalab/vistasoft/blob/8c402f91ff54a44b0fb532f31550952021ca5f58/fileFilters/mrtrix/dtiImportFibersMrtrix.m#L79) its actually single point precision, so it seems that this is necessarily the case.

Also, even in cases where the input is in double point precision, is that level of precision actually useful given the diffusion resolutions we are typically working with?

Is this line necessary?

soichih commented 5 years ago

I've tested some algorithms (encode, LiFE) using fg without converting to double. The results were within expected stochasticity. We need to test it with more algorithms but so far it seems that we don't need to convert to double.