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
A user reported that when using the downloaded RBx atlas and some custom target (test) dataset, the ae_bundle_streamlines.py script failed with the following output:
Namespace(anatomy_file='/root/tractolearn_data/rbx_atlas_v10.json',
atlas_path='/root/tractolearn_data/atlas/pop_average', batch_loading=None,
common_space_reference='/testdata/subj01/T1.nii.gz',
common_space_tractogram='/testdata/subj02/tracts100k.trk', device='cpu',
model='/root/tractolearn_data/best_model_contrastive_tractoinferno_hcp.pt',
num_neighbors=1, original_reference=None,
original_tractogram=None, output='test', overwrite=True,
thresholds_file='/root/tractolearn_data/thresholds_contrastive_tractoinferno_hcp.json', verbose=False)
INFO:root:Loading atlas files ...
0%|
| 0/52 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/usr/local/bin/ae_bundle_streamlines", line 8, in <module>
sys.exit(ae_bundle_streamlines.main())
File "/tractolearn/scripts/ae_bundle_streamlines.py", line 397, in main
assert (
AssertionError: [!] Threshold: fornix_group not in threshold file
The issue stems from the fact that when looping over the atlas path files in the script, there is a fornix_group.trk that is being found in the /atlas/pop_average RBx path, and such tractogram does not correspond to any entry in the JSON anatomy config file (or any other config file provided in zenodo actually). The RBx atlas path contains some "*_group.trk" files that are the concatenation of some other files, and we are not interested in considering those in tractolearn, at least within the context of the provided data in zenodo.
Thus, we should
Make sure that all config files involved in a process contain all the bundles indicated in the anatomy file. It could be a pre-check utils method that can be re-used across scripts.
As we are expecting for exact filename matches with the anatomy config file, we could filter any other file present in a given folder and, inform the user about the presence of other files in the atlas folder that do not correspond to the bundle names in the anatomy config files. Requiring that the folder only contains the bundles of interest and failing otherwise may be another option; however, since the contents of a given path may come from another process unrelated to tractolearn it may not be desirable to force users to remove such files from the path.
The text was updated successfully, but these errors were encountered:
@jhlegarreta Yes, we should filter config and track group from RBx atlas that are not in our config
e.g. all config_group.json, all track group, we also need to remove CG sub part and replace it by the whole CG
This could be done when loading files based on 1 master config
@jhlegarreta Yes, we should filter config and track group from RBx atlas that are not in our config
e.g. all config_group.json, all track group, we also need to remove CG sub part and replace it by the whole CG
This could be done when loading files based on 1 master config
A user reported that when using the downloaded RBx atlas and some custom target (test) dataset, the
ae_bundle_streamlines.py
script failed with the following output:The issue stems from the fact that when looping over the atlas path files in the script, there is a
fornix_group.trk
that is being found in the/atlas/pop_average
RBx path, and such tractogram does not correspond to any entry in the JSON anatomy config file (or any other config file provided in zenodo actually). The RBx atlas path contains some "*_group.trk" files that are the concatenation of some other files, and we are not interested in considering those intractolearn
, at least within the context of the provided data in zenodo.Thus, we should
tractolearn
it may not be desirable to force users to remove such files from the path.The text was updated successfully, but these errors were encountered: