Dcm2bids filter out scans that do not have specific string in a specific json field

I am using dcm2bids for creating a bids folder. I have a few scans that have been retro reconstructed. I need to separate retro reconstructed scans. In the json of these scan is the field “ImageComments” I can see that the retro reconstructed scans have the string SENSE1+ in it which is the feature we were testing. In the configuration json that is given to dcm2bids, how do I tell it to exclude scans with SENSE1+ in the “ImageComments” field?

I am using dcm2bids 3.2.0

Hi @MRIDude and welcome to neurostars!

As far as I know there is not an exclude string option in dcm2bids. Without seeing json examples from your dataset I cannot tell you exactly what you need to do. But you can make criteria that will search for these strings (e.g., *SENSE1+*) so they do not get matched with your other strings. Of course, the other items in your config will need to be specific enough such that they will not pick up on the *SENSE1+* items. Just be careful about not including too many wildcards in that case.

Best,
Steven

Hi @MRIDude ,

If you can share with us the two jsons files, we could help you find a way to distinguish the two acquisitions.

Best,
Arnaud

I already reviewed the jsons there are only two fields that are different. ImageComments field is the only reliable field. So I reviewed documentations for dcm2bids. I should be able to use bash pattern recognition. So I tried !(*SENSE1+*). This does not work. I even tried this pattern registration technique on the bash command like and it worked fine. Could this be a potential bug in dcm2bids?