Open
Description
At least for tractograms in TRK (Trackvis) format, in the case of a large number of streamlines (>1 million), loading streamlines with dipy.io.streamline.load_tractogram() is extremely slow and requires an unusual amount of memory. Example: for a tractogram of 10 million streamlines, loading takes:
- 15 minutes and approximately 10Gb of RAM with Nibabel
- 1 minute and approximately 5Gb of RAM with our custom, numpy-based, TRK loader (https://github.com/emanuele/load_trk.git)
- 6 seconds and 3.5Gb of RAM if we previously save the tractogram as a numpy array (numpy.save()) and then load it with numpy.load(). But in this case, the streamlines must be resampled to a fixed number of points.