You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a bug in the uncompress function where more points_to_idx may be returned than there are points in the streamline.
Here is an example script to test
importosfromscilpy.io.streamlinesimportload_tractogramfromscilpy.tractograms.uncompressimportuncompress# Tests should be run locally so that you have the testing data loaded in your home directoryhome=os.path.expanduser('~')
sft=load_tractogram(f'{home}/.scilpy/filtering/bundle_all_1mm.trk', 'same')
sft.to_vox()
sft.to_corner()
indices, points_to_idx=uncompress(sft.streamlines, return_mapping=True)
streamline_lengths, mapping_lengths= [len(s) forsinsft.streamlines], [len(m) forminpoints_to_idx]
fors,minzip(streamline_lengths, mapping_lengths):
asserts==m, (s,m)
Should give you an error.
AssertionError: (130, 131)
The text was updated successfully, but these errors were encountered:
There is a bug in the
uncompress
function where morepoints_to_idx
may be returned than there are points in the streamline.Here is an example script to test
Should give you an error.
AssertionError: (130, 131)
The text was updated successfully, but these errors were encountered: