forked from UNFmontreal/Dcm2Bids
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Multiple "OR" criteria for a description #3
Comments
Hi Pablo,
If you have a relatively small number of alternatives it may be easiest to
just duplicate the entry for each description case. The json will contain a
lot of redundant information but the output will be what you want.
The problem with allowing eg a list to specify multiple alternatives is
that sometimes the field you're matching is already a list, and in that
case you want to test if the json list is identical to the sidecar list. So
there is a potential ambiguity there that I'd like to avoid.
Allowing multiple 'in' fields might be better, but I guess I'd worry about
how they should be combined (is it AND or OR). Might be worth thinking more
about if the hacky solution up top isn't workable for you.
Johan
…On 31 Oct 2017 20:10, "pvelasco" ***@***.***> wrote:
Hi Johan,
I would like to have the tool accept more than one criteria to do the
classification. For example, based on the example/config.json file, a run
will be classified as T1w if the string "T1W_3D" appears in the
"SeriesDescription". However, many times, the T1w file contains "MPRAGE"
instead. Is it possible to have a config.json file that will work for both
scenarios?
I tried changing the criteria for the T1w to something like:
{
"dataType": "anat",
"suffix": "T1w",
"criteria": {
"in": {"SeriesDescription": [ "T1W_3D" ,
"T1w" ,
"MPRAGE" ,
"MP-RAGE"
]
}
}
},
but when I run the code, it doesn't match the criteria.
I also tried:
{
"dataType": "anat",
"suffix": "T1w",
"criteria": [
{
"in": {"SeriesDescription": "T1W_3D"}
},
{
"in": {"SeriesDescription": "T1w"}
}
]
},
But, again, it doesn't match.
I assume the code in sidecarparser will need to be changed, but how to do
that in a way that it still respect the case in which you have to match
several criteria at the same time (like match the series description AND
the echotime)?
Thanks!
-Pablo
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABfNs-t1OMiH6LXw5uqgVKhDZXxi52Fpks5sx36dgaJpZM4QNWey>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Johan,
I would like to have the tool accept more than one criteria to do the classification. For example, based on the example/config.json file, a run will be classified as T1w if the string "T1W_3D" appears in the "SeriesDescription". However, many times, the T1w file contains "MPRAGE" instead. Is it possible to have a config.json file that will work for both scenarios?
I tried changing the criteria for the T1w to something like:
but when I run the code, it doesn't match the criteria.
I also tried:
But, again, it doesn't match.
I assume the code in sidecarparser will need to be changed, but how to do that in a way that it still respect the case in which you have to match several criteria at the same time (like match the series description AND the echotime)?
Thanks!
-Pablo
The text was updated successfully, but these errors were encountered: