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 cannot differentiate between non-normalized MRI data and normalized MRI data #69

Closed
uriartel opened this issue Sep 17, 2019 · 3 comments

Comments

@uriartel
Copy link

uriartel commented Sep 17, 2019

I'm attempting to convert dicoms to niftis using the dcm2bids command.

In the config.json file, I added a custom label to ensure that only normalized data is being converted to niftis.

{
            "dataType": "anat",
            "modalityLabel": "T1w",
            "customLabels": "rec-normalized",
            "criteria": {
                "SeriesDescription": "T1w_MPR_vNav",
                "ImageType": [
                    "NORM"
                ]
            }
        },

If the subject only has one run of normalized data but multiple non-normalized T1 runs, the dcm2bids command will still convert all T1's into niftis regardless of the custom label. This issue occurs both for the T1's and the T2's.

Other than manually deleting all non-normalized data, is there way to exclude them in the config.json file to prevent this error from occuring?

Here is the original format, and I want to exclude the ORIGINAL, PRIMARY, M, and ND categories.

Thanks in advance!

{
            "dataType": "anat",
            "modalityLabel": "T1w",
            "criteria": {
                "SeriesDescription": "T1w_MPR_vNav",
                "ImageType": [
                    "ORIGINAL",
                    "PRIMARY",
                    "M",
                    "ND",
                    "NORM"
                ]
            }
        },
@dlevitas
Copy link

Hi @uriartel,

I've also run into protocols with non-normalized T1w images. For me, I use SideCarFilename instead of SeriesDescription, since both the regular T1w and non-nromalized T1w tend to have the same series description in the protocol. Here's an example from a portion of a configuration file (dcm2bids version 2.1.4):

{
         "dataType": "anat",
         "modalityLabel": "T1w",
         "criteria": {
            "SidecarFilename": "003*"
         }
      },

In this protocol example, a localizer was run first, followed by the T1w scan. So in terms of SideCarFilename the localizer was "001*", the non-normlized T1w was "002*", and the regular T1w was "003*". Since I didn't want to convert the localizer and non-normalized T1w, those were left out of the configuration file.

Hopefully this provides some assistance.

@IvanAlvarez
Copy link

Hi,

In case anyone else lands on this page looking for help, I found another solution for distinguishing between normalised and non-normalised data. The problem with @dlevitas solution is that it relies on the sidecar filenames being in a consistent and predictable order. In their example, 002 corresponding to the non-normalised data and 003 corresponding to the normalised data.

In SIEMENS sequences, the ImageType field contains the field "NORM" when the image is normalised. So, when I specify my .json configuration file, I use:

{
        "dataType": "func",
        "modalityLabel": "bold",
        "criteria": {
            "SeriesDescription": "<some_relevant_series_descriptor>",
            "ImageType": ["ORIGINAL", "PRIMARY", "M", "ND", "NORM", "MOSAIC"]
            },
}

Where the contents of ImageType matches the normalised images, but not the non-normalised images, which read:

"ImageType": ["ORIGINAL", "PRIMARY", "M", "ND", "MOSAIC"]

@arnaudbore
Copy link
Contributor

Dear @IvanAlvarez.
Glad @dlevitas was able to help you with this.
Thank you @dlevitas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants