Code: 1 - NOT_INCLUDED while converting dicom to BIDS

Hello, bids experts,

I’m a novice to this BIDS format data structure. I’m trying to prepare data to run fmriprep. So, stuck in converting from DICOM to BIDS format. I have used mricroGL’s ‘dcm2niix’ to convert from DICOM to BIDS. The ‘dcm2niix’ doesn’t provide the participants .tsv and .json files.

The converted filenames are

‘t1_mprage_sag_2.nii.gz’ --> renamed as ‘sub-01_t1_mprage_sag_2.nii.gz’
‘ep2d_pace_Rest_2000TR_3.nii.gz’ --> renamed as ‘sub-03_ep2d_pace_Rest_2000TR_3.nii.gz’

The BIDS-validator output given below from the terminal:

bids-validator ‘/home/naren123/Desktop/trial-BIDS’
1: [ERR] Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a “.bidsignore” file in your dataset (see for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder. (code: 1 - NOT_INCLUDED)
Evidence: sub-02_t1_mprage_sag_2.json
Evidence: sub-02_t1_mprage_sag_2.nii.gz
Evidence: sub-02_ep2d_diff_mddw_20_16.bval
Evidence: sub-02_ep2d_diff_mddw_20_16.bvec
Evidence: sub-02_ep2d_diff_mddw_20_16.json
Evidence: sub-02_ep2d_diff_mddw_20_16.nii.gz
Evidence: sub-02_ep2d_pace_Rest_2000TR_3.json
Evidence: sub-02_ep2d_pace_Rest_2000TR_3.nii.gz
Evidence: sub-03_t1_mprage_sag_2.json
Evidence: sub-03_t1_mprage_sag_2.nii.gz
… and 6 more files having this issue (Use --verbose to see them all).

Please visit for existing conversations about this issue.

2: [ERR] Sub label contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec. (code: 62 - SUBJECT_VALUE_CONTAINS_ILLEGAL_CHARACTER)
		Evidence: sub name contains illegal character:/sub-02/anat/sub-02_t1_mprage_sag_2.json
		Evidence: sub name contains illegal character:/sub-02/dwi/sub-02_ep2d_diff_mddw_20_16.bval
		Evidence: sub name contains illegal character:/sub-02/dwi/sub-02_ep2d_diff_mddw_20_16.json
		Evidence: sub name contains illegal character:/sub-02/func/sub-02_ep2d_pace_Rest_2000TR_3.json
		Evidence: sub name contains illegal character:/sub-03/anat/sub-03_t1_mprage_sag_2.json
		Evidence: sub name contains illegal character:/sub-03/dwi/sub-03_ep2d_diff_mddw_20_16.bval
		Evidence: sub name contains illegal character:/sub-03/dwi/sub-03_ep2d_diff_mddw_20_16.json
		Evidence: sub name contains illegal character:/sub-03/func/sub-03_ep2d_pace_Rest_2000TR_3.json

Please visit for existing conversations about this issue.

3: [ERR] No BIDS compatible data found for at least one subject. (code: 67 - NO_VALID_DATA_FOUND_FOR_SUBJECT)

Please visit for existing conversations about this issue.

1: [WARN] The recommended file /README is missing. See Section 03 (Modality agnostic files) of the BIDS specification. (code: 101 - README_FILE_MISSING)

Please visit for existing conversations about this issue.

2: [WARN] The Authors field of dataset_description.json should contain an array of fields - with one author per field. This was triggered based on the presence of only one author field. Please ignore if all contributors are already properly listed. (code: 102 - TOO_FEW_AUTHORS)

Please visit for existing conversations about this issue.

Any help would be appreciated.

With regards


It seems to me that the file names you’ve specified above aren’t strictly speaking BIDS-compatible.

  • sub-01_t1_mprage_sag_2.nii.gz: If this the the T1-weighted image, then the BIDS naming scheme requires sub-01<_additional identifiers>_T1w.nii.gz.
    • The remainder of the suffixes in your image name (mprage, sag, 2) aren’t compatible with the BIDS naming scheme.
    • If you only have one T1 per subject, I would recommend naming the image simply sub-01_T1w.nii.gz.
    • To provide more specific advice for the case of multiple T1 images per subject, we would have to know what sag and 2 denote. If 2 is a session number, for instance, BIDS requires sub-01_ses-02_T1w.nii.gz. If, on the other hand, it’s just the order that the image was acquired on the scanner, then it generally shouldn’t be in the file name and BIDS requires sub-01_T1w.nii.gz as above.
  • Note that the images should also be stored in a BIDS-compatible directory structure. Based on the evidence you’ve posted, this looks fine.
  • sub-03_ep2d_pace_Rest_2000TR_3.nii.gz: If this is the resting BOLD image, then the bids naming scheme requires sub-03<_additional identifiers>_task-rest_bold.nii.gz. Again, we’d need more information about what 3 denotes in order to provide more specific advice.
  • Similarly, your diffusion data should be named as sub-02<_additional identifiers>_dwi.nii.gz, sub-02<_additional identifiers>_dwi.bvec, and sub-02<_additional identifiers>_dwi.bval.

Let us know if there’s anything else that we can help with or additional details that we can provide. Further information and tutorials are available in the BIDS starter kit and the BIDS specification.

1 Like

To be clear, dcm2niix does not create the participants .tsv and .json files - these are not explicitly described by the DICOM images you are converting. Rather, dcm2niix creates the a BIDS compatible JSON file for each sequence. The links section of the dcm2niix website describes several tools that extend dcm2niix to generate BIDS datasets. I would also suggest you check that you are using the most recent version of MRIcroGL (1.2.20190410) as the graphical interface for dcm2niix has been improved.

1 Like

Thank you Chris and Rastko for your useful suggestions.

With your help it worked :slight_smile: