Skip to content

Python script to convert dicom slices into a nifti file

Notifications You must be signed in to change notification settings

gabridele/mri_bidsify

Repository files navigation

Code allowing to convert dicom files into nifti files and arranging them according to the BIDS format. This is basically a wrapper around the singularity image dcm2bids. Scripts are tailored to be run on a SLURM high performing computer.

How to run:

  • open config.sh file and set your variables. These paths will be used in the main script.

  • then run: $ sbatch bidsify.sh

    • alternatively, $ bash bidsify.sh works too, by running the job locally and not in a remote node

Note: You should create a config.json file, as outlined in the dcm2bids documentation, and located it in your dataset directory ($input_dir in config.sh) Requirements:

In case some dicom acquisitions are made slice by slice, you will be notified by the script that some subjects acquisitions don't match the number of scans you defined. In that case a txt file with the filepaths will be produced. That txt file can be used as a flag with the python script.

About

Python script to convert dicom slices into a nifti file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published