Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dcm2bids goes crazy if --participant contains - or _ #212

Closed
SamGuay opened this issue Jun 21, 2023 · 0 comments · Fixed by #215
Closed

dcm2bids goes crazy if --participant contains - or _ #212

SamGuay opened this issue Jun 21, 2023 · 0 comments · Fixed by #215
Labels

Comments

@SamGuay
Copy link
Member

SamGuay commented Jun 21, 2023

I think we should add a safety check before app.run() since atm a properly named directory will exist in tmp_dcm2bids/ (eg tmp_dcm2bids/sub-will_break but as per BIDS specs it the participant label should only be made of alphanumeric values.

label - An alphanumeric value, possibly prefixed with arbitrary number of 0s for consistent indentation, [...]. Note that labels MUST not collide when casing is ignored (see Case collision intolerance)..

In addition, dcm2bids doesn't handle it properly as shown below

dcm2bids -c dcm2bids_config_source.json -p will_break -d sourcedata/CD004 --auto_extract
_entities
INFO:dcm2bids.dcm2bids_gen:--- dcm2bids start ---
INFO:dcm2bids.dcm2bids_gen:OS:version: Linux-5.15.0-73-generic-x86_64-with-glibc2.31
INFO:dcm2bids.dcm2bids_gen:python:version: 3.11.3 (main, Apr 19 2023, 23:54:32) [GCC 11.2.0]
INFO:dcm2bids.dcm2bids_gen:dcm2bids:version: 3.0.dev
INFO:dcm2bids.dcm2bids_gen:dcm2niix:version: v1.0.20230411
INFO:dcm2bids.dcm2bids_gen:participant: sub-will_break
[...]
WARNING:dcm2bids.acquisition:There was more than one suffix found (['break', 'epi']). This is not BIDS compliant. Make sure you know what you are doing.
WARNING:dcm2bids.acquisition:✅ Filename was reordered according to BIDS entity table order:
                from:   sub-will_break_dir-PA_epi
                to:     sub-will_dir-PA_break_epi
@SamGuay SamGuay added the bug label Jun 21, 2023
@SamGuay SamGuay changed the title dcm2bids goes crazy if --participant containts - or _ dcm2bids goes crazy if --participant contains - or _ Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant