Skip to content

Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure

License

Notifications You must be signed in to change notification settings

NathanKlineInstitute/Dcm2Bids

 
 

Repository files navigation

dcm2bids

Your friendly DICOM converter to work with Stern's Data

How-To

Making Configration files

  • Run dcm2bids_scaffold
  • Run and change source_of_the_data as neededdcm2bids_helper -d source_of_the_data/
    • Example: dcm2bids_helper -d HOMe38_2022-03-30_113246/BOLD_AP_IAT_Run1_003/
    • Example: dcm2niix -b y -ba y -z y -f '%3s_%f_%d_%r' -o ./tmp_dcm2bids HOMe06_2021-10-26_140836/BOLD_AP_IAT_Run1_003/
  • Run mkdir code
  • Run nano code/dcm2bids_config.json
  • Copy and change FOLDER_NAME as needed
{  
  "descriptions": [ {
      "dataType": "func",
      "modalityLabel": "bold",
      "customLabels": "task-rest",
      "criteria": {
        "SeriesDescription": "FOLDER_NAME*",
      "sidecarChanges": {
        "TaskName": "rest"
      }
      }
    }
  ]
}

  • Example:
"descriptions": [
 {
   "dataType": "func",
   "modalityLabel": "bold",
   "customLabels": "task-rest",
   "criteria": { "SeriesDescription": "BOLD_AP_IAT_Run1_003*", "sidecarChanges": {"TaskName": "rest"}}
 }
]
}
  • Run and change source_of_the_data as needed dcm2bids -d source_of_the_data/ -p PARTICIPANT_ID -s SESSION_ID -c code/dcm2bids_config.json
    • Example: dcm2bids_helper -d HOMe38_2022-03-30_113246/BOLD_AP_IAT_Run1_003/

Logs are saved here tmp_dcm2bids/log/sub-<label>_<datetime>.log for any problems


Result

Screen Shot 2022-06-16 at 3 16 36 PM


Documentation badge DOI Last update badge

Test status badge Code coverage badge Code style: black

PyPI version badge Anaconda-Server Badge Docker container badge

License badge


dcm2bids reorganises NIfTI files using dcm2niix into the Brain Imaging Data Structure (BIDS).

Scope

dcm2bids is a community-centered project. It aims to be a friendly, easy-to-use tool to convert your dicoms. Our main goal is to make the dicom to BIDS conversion as effortless as possible. Even if in the near future more advanced features will be added, we'll keep the focus on your day to day use case without complicating anything. That's the promise of the dcm2bids project.

Documentation

Please take a look at the documentation to:

Issues and Questions

We work hard to make sure dcm2bids is robust and we welcome comments and questions to make sure it meets your use case! Here's our preferred workflow:

  • If you have a usage question 🙋, we encourage you to post your question on Neurostars with dcm2bids as an optional tag. The tag is really important because Neurostars will notify the dcm2bids team only if the tag is present. Neurostars is a question and answer forum for neuroscience researchers, infrastructure providers and software developers, and free to access.
    Before posting your question, you may want to first browse through questions that were tagged with the dcm2bids tag. If your question persists, feel free to comment on previous questions or ask your own question.

  • If you think you've found a bug 🐛, please open an issue on our repository. To do this, you'll need a GitHub account. See our contributing guide for more details.

About

Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 94.6%
  • HTML 4.3%
  • Dockerfile 1.1%