Dcm2bids configuration file with multiple SeriesDescription in similar sequence (e.g. T1w)

Hi Neuro-starts,
In attempts to bidsdify a public dataset (e.g. PPMI), I realize that the SeriesDescription field could be different for specific sequences (in this example, T1w), which I would like to BIDS-organize it like …/*/anat/*T1w.nii.gz :

(dcm2bids) $ for DIR in $(ls -1d ./*/1/*/ ) ; do AA=$(find ${DIR}/ -maxdepth 1 -name "*.dcm" | tail -1) ; echo $AA ; dcmdump $AA | grep SeriesDescription ; done

.
.
.
./101026/1/I1498714//PPMI_101026_MR_3D-T1-weighted_SAGITAL_br_raw_20210930191033267_124_S1068250_I1498714.dcm
(0008,103e) LO [3D-T1-weighted_SAGITAL]
.
.
.
./101179/1/I1493072//PPMI_101179_MR_3D_T1-weighted_br_raw_20210916223305322_1_S1063545_I1493072.dcm
(0008,103e) LO [3D T1-weighted] 

I am having issues specifying a way to correctly define multiple SeriesDescription patterns in the conf. file. Is this even possible? If so, I would appreciate any guidance.

This example will work only for the first pattern:

{
    "descriptions":[
        {
        "dataType": "anat",
        "modalityLabel": "T1w",
        "criteria": {
            "SeriesDescription": "3D-T1-weighted_SAGITAL"
            }
        },
}

However, when I tried to add multiple SeriesDescription patterns as a list:

{
    "descriptions":[
        {
        "dataType": "anat",
        "modalityLabel": "T1w",
        "criteria": {
            "SeriesDescription": ["3D-T1-weighted_SAGITAL", "3D T1-weighted"]
            }
        },
}

Or as a nested elements [most likely wrong]:

 {
        "descriptions":[
            {
            "dataType": "anat",
            "modalityLabel": "T1w",
            "criteria": {
                "SeriesDescription": "3D-T1-weighted_SAGITAL",
                "SeriesDescription:  "3D T1-weighted"
                }
            },
    }

I don’t get the pattern recognized. I considered looking at other parameters (e.g. InversionTime, EchoTime, …) yet there is more variability within.

Any helpful suggestions will be appreciated. I also found https://github.com/rmarkello/ppmitobids yet the information there is deprecated and not working accordingly.

Regards,
Rodrigo

Hi @rperea -

Every unique series description needs to be separately defined even if they all belong to the same sequence.

In your example above, your config file would look like this

 {
        "descriptions": [
            {
            "dataType": "anat",
            "modalityLabel": "T1w",
            "criteria": {
                "SeriesDescription": "3D-T1-weighted_SAGITAL",
                }
},
{
            "dataType": "anat",
            "modalityLabel": "T1w",
            "criteria": {
                "SeriesDescription": "3D T1-weighted",
                }
} 
] 
}

You can also use a wildcard, so something like 3D*T1* for example.

I wish that the wild character `*` works but haven’t had any luck with it, unless bidsdify was updated since my last attempt?
Have you tried it/worked for you?

Thanks,
Rodrigo

Yes, wildcards have worked for me in dcm2bids and you can see they even use wildcards in the tutorial. 2. Tutorial - Dcm2Bids . What happens when you try with wildcards?