Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

BIDS conversion

Run this notebook

Author: Thuy Dao

Date: 23 Nov 2024

License:

MIT License

Note: If this notebook uses neuroimaging tools from Neurocontainers, those tools retain their original licenses. Please see Neurodesk citation guidelines for details.

Citation and Resources:

Tools included in this notebook

dcm2niix:

  • Li, X., Morgan, P. S., Ashburner, J., Smith, J., & Rorden, C. (2016). The first step for neuroimaging data analysis: DICOM to NIfTI conversion. Journal of Neuroscience Methods, 264, 47–56. Li et al. (2016)

BIDScoin:

  • Zwiers MP, Moia S and Oostenveld R (2022) BIDScoin: A User-Friendly Application to Convert Source Data to Brain Imaging Data Structure. Front. Neuroinform. 15:770608. doi: Zwiers et al. (2022)

HeuDiConv:

  • Yaroslav O. Halchenko, Mathias Goncalves, Satrajit Ghosh, Pablo Velasco, Matteo Visconti di Oleggio Castello, Taylor Salo, John T. Wodder II, Michael Hanke, Patrick Sadil, Krzysztof Jacek Gorgolewski, Horea-Ioan Ioanas, Chris Rorden, Timothy J. Hendrickson, Michael Dayan, Sean Dae Houlihan, James Kent, Ted Strauss, John Lee, Isaac To, … David N. Kennedy. (2024). HeuDiConv — flexible DICOM conversion into structured directory layouts (v1.3.1). Zenodo. Yaroslav O. Halchenko et al. (2024)

Dataset

This example uses a phantom dataset generated by the University of Arizona on their Siemens Skyra 3T with Syngo MR VE11c software on 2018_02_08.

BIDS conversion

  1. In this interactive example notebook, we first download DICOM data using datalad.

  2. Next we will convert DICOMS into the BIDS data structure using:

    • 2.1. dcm2niix which converts data to NIfTi and then manually organizes the folder.

    • 2.2. heudiconv to automate the conversion and organization with a provided heuristic file.

    • 2.3. bidscoin to automate the conversion and organization with the bidseditor interface (optionally using --automated to disable user interaction).

1. Data preparation

Download DICOM data from Datalad.

[INFO] Attempting a clone into /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example 
[INFO] Attempting to clone from https://datasets.datalad.org/repronim/heudiconv-reproin-example to /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example 
[INFO] Attempting to clone from https://datasets.datalad.org/repronim/heudiconv-reproin-example/.git to /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example 
[INFO] Start enumerating objects 
[INFO] Start counting objects 
[INFO] Start compressing objects 
[INFO] Start receiving objects 
[INFO] Start resolving deltas 
[INFO] Completed clone attempts for Dataset(/home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example) 
Fetching long content....

We will be working from a directory called REPROIN. Under the REPROIN directory is the dicom subdirectory: Under the subject number 001 the session Patterson_Coben - 1 is nested. Each dicom sequence folder is nested under the session:

heudiconv-reproin-example/REPROIN/
└── dicom
    └── 001
        └── Patterson_Coben - 1
            ├── Localizers_4
            ├── anatT1w_acqMPRAGE_6
            ├── dwi_dirAP_9
            ├── fmap_acq4mm_7
            ├── fmap_acq4mm_8
            ├── fmap_dirPA_15
            └── func_taskrest_16

11 directories, 0 files

2. Convert DICOMS to BIDS-formatted NIfTI

2.1. Using dcm2niix (manual workflow)

dcm2niix converts neuroimaging data from the DICOM format to the NIfTI format and generates a BIDS JSON format sidecar which includes relevant information. However, users need to manually organize these files into a bids-compliant subject directory.

2.1.1. Convert DICOM to NIfTI

Chris Rorden's dcm2niiX version v1.0.20240202  (JP2:OpenJPEG) (JP-LS:CharLS) GCC8.4.0 x86-64 (64-bit Linux)
usage: dcm2niix [options] <in_folder>
 Options :
  -1..-9 : gz compression level (1=fastest..9=smallest, default 6)
  -a : adjacent DICOMs (images from same series always in same folder) for faster conversion (n/y, default n)
  -b : BIDS sidecar (y/n/o [o=only: no NIfTI], default y)
   -ba : anonymize BIDS (y/n, default y)
  -c : comment stored in NIfTI aux_file (up to 24 characters e.g. '-c VIP', empty to anonymize e.g. 0020,4000 e.g. '-c ""')
  -d : directory search depth. Convert DICOMs in sub-folders of in_folder? (0..9, default 5)
  -e : export as NRRD (y) or MGH (o) or JSON/JNIfTI (j) or BJNIfTI (b) instead of NIfTI (y/n/o/j/b, default n)
  -f : filename (%a=antenna (coil) name, %b=basename, %c=comments, %d=description, %e=echo number, %f=folder name, %g=accession number, %i=ID of patient, %j=seriesInstanceUID, %k=studyInstanceUID, %m=manufacturer, %n=name of patient, %o=mediaObjectInstanceUID, %p=protocol, %r=instance number, %s=series number, %t=time, %u=acquisition number, %v=vendor, %x=study ID; %z=sequence name; default '%f_%p_%t_%s')
  -g : generate defaults file (y/n/o/i [o=only: reset and write defaults; i=ignore: reset defaults], default n)
  -h : show help
  -i : ignore derived, localizer and 2D images (y/n, default n)
  -l : losslessly scale 16-bit integers to use dynamic range (y/n/o [yes=scale, no=no, but uint16->int16, o=original], default o)
  -m : merge 2D slices from same series regardless of echo, exposure, etc. (n/y or 0/1/2, default 2) [no, yes, auto]
  -n : only convert this series CRC number - can be used up to 16 times (default convert all)
  -o : output directory (omit to save to input folder)
  -p : Philips precise float (not display) scaling (y/n, default y)
  -q : only search directory for DICOMs (y/l/n, default y) [y=show number of DICOMs found, l=additionally list DICOMs found, n=no]
  -r : rename instead of convert DICOMs (y/n, default n)
  -s : single file mode, do not convert other images in folder (y/n, default n)
  -u : up-to-date check
  -v : verbose (n/y or 0/1/2, default 0) [no, yes, logorrheic]
  -w : write behavior for name conflicts (0,1,2, default 2: 0=skip duplicates, 1=overwrite, 2=add suffix)
  -x : crop 3D acquisitions (y/n/i, default n, use 'i'gnore to neither crop nor rotate 3D acquistions)
  -z : gz compress images (y/o/i/n/3, default n) [y=pigz, o=optimal pigz, i=internal:zlib, n=no, 3=no,3D]
  --big-endian : byte order (y/n/o, default o) [y=big-end, n=little-end, o=optimal/native]
  --progress : Slicer format progress information (y/n, default n)
  --ignore_trigger_times : disregard values in 0018,1060 and 0020,9153
  --terse : omit filename post-fixes (can cause overwrites)
  --version : report version
  --xml : Slicer format features
 Defaults file : /home/jovyan/.dcm2nii.ini
 Examples :
  dcm2niix /Users/chris/dir
  dcm2niix -c "my comment" /Users/chris/dir
  dcm2niix -o /users/cr/outdir/ -z y ~/dicomdir
  dcm2niix -f %p_%s -b y -ba n ~/dicomdir
  dcm2niix -f mystudy%s ~/dicomdir
  dcm2niix -o "~/dir with spaces/dir" ~/dicomdir
Example output filename: 'myFolder_MPRAGE_19770703150928_1.nii'
Chris Rorden's dcm2niiX version v1.0.20240202  (JP2:OpenJPEG) (JP-LS:CharLS) GCC8.4.0 x86-64 (64-bit Linux)
Found 791 DICOM file(s)
Slices not stacked: orientation varies (vNav or localizer?) [0.0964069 0.780133 0.618141 0.0553476 0.615871 -0.7859] != [-0.522168 0.736033 0.430808 0.0695744 0.540223 -0.838641]
Convert 2 DICOM as ./dcm2niix_bids/dicom_anat-scout_20190208142838_3_i00001 (162x162x2x1)
Convert 1 DICOM as ./dcm2niix_bids/dicom_anat-scout_20190208142838_3_i00004 (162x162x1x1)
Convert 1 DICOM as ./dcm2niix_bids/dicom_anat-scout_20190208142838_3_i00002 (162x162x1x1)
Convert 1 DICOM as ./dcm2niix_bids/dicom_anat-scout_20190208142838_3_i00003 (162x162x1x1)
Convert 128 DICOM as ./dcm2niix_bids/dicom_anat-scout_20190208142838_1 (160x160x128x1)
Convert 128 DICOM as ./dcm2niix_bids/dicom_anat-scout_20190208142838_2 (160x160x128x1)
Convert 4 DICOM as ./dcm2niix_bids/dicom_func_task-rest_20190208142838_16 (64x64x44x4)
Convert 132 DICOM as ./dcm2niix_bids/dicom_fmap_dir-PA_20190208142838_15 (122x122x66x2)
Convert 1 DICOM as ./dcm2niix_bids/dicom_anat-scout_20190208142838_4_i00002 (162x162x1x1)
Convert 1 DICOM as ./dcm2niix_bids/dicom_anat-scout_20190208142838_4_i00003 (162x162x1x1)
Convert 1 DICOM as ./dcm2niix_bids/dicom_anat-scout_20190208142838_4_i00001 (162x162x1x1)
Convert 16 DICOM as ./dcm2niix_bids/dicom_dwi_dir-AP_20190208142838_9 (122x122x66x16)
Slices not stacked: echo varies (TE 4.92, 7.38; echo 1, 2). Use 'merge 2D slices' option to force stacking
Convert 44 DICOM as ./dcm2niix_bids/dicom_fmap_acq-4mm_20190208142838_7_e1 (64x64x44x1)
Convert 44 DICOM as ./dcm2niix_bids/dicom_fmap_acq-4mm_20190208142838_7_e2 (64x64x44x1)
Convert 240 DICOM as ./dcm2niix_bids/dicom_anat-T1w_acq-MPRAGE_20190208142838_6 (224x224x240x1)
Convert 1 DICOM as ./dcm2niix_bids/dicom_anat-scout_20190208142838_5_i00003 (162x162x1x1)
Convert 1 DICOM as ./dcm2niix_bids/dicom_anat-scout_20190208142838_5_i00001 (162x162x1x1)
Convert 1 DICOM as ./dcm2niix_bids/dicom_anat-scout_20190208142838_5_i00002 (162x162x1x1)
Convert 44 DICOM as ./dcm2niix_bids/dicom_fmap_acq-4mm_20190208142838_8_e2_ph (64x64x44x1)
Conversion required 0.836320 seconds (0.832512 for core code).

2.1.2. Organize data into BIDS structure

./dcm2niix_bids/
├── anat
│   ├── dicom_anat-T1w_acq-MPRAGE_20190208142838_6.json
│   ├── dicom_anat-T1w_acq-MPRAGE_20190208142838_6.nii
│   ├── dicom_anat-scout_20190208142838_1.json
│   ├── dicom_anat-scout_20190208142838_1.nii
│   ├── dicom_anat-scout_20190208142838_2.json
│   ├── dicom_anat-scout_20190208142838_2.nii
│   ├── dicom_anat-scout_20190208142838_3_i00001.json
│   ├── dicom_anat-scout_20190208142838_3_i00001.nii
│   ├── dicom_anat-scout_20190208142838_3_i00002.json
│   ├── dicom_anat-scout_20190208142838_3_i00002.nii
│   ├── dicom_anat-scout_20190208142838_3_i00003.json
│   ├── dicom_anat-scout_20190208142838_3_i00003.nii
│   ├── dicom_anat-scout_20190208142838_3_i00004.json
│   ├── dicom_anat-scout_20190208142838_3_i00004.nii
│   ├── dicom_anat-scout_20190208142838_4_i00001.json
│   ├── dicom_anat-scout_20190208142838_4_i00001.nii
│   ├── dicom_anat-scout_20190208142838_4_i00002.json
│   ├── dicom_anat-scout_20190208142838_4_i00002.nii
│   ├── dicom_anat-scout_20190208142838_4_i00003.json
│   ├── dicom_anat-scout_20190208142838_4_i00003.nii
│   ├── dicom_anat-scout_20190208142838_5_i00001.json
│   ├── dicom_anat-scout_20190208142838_5_i00001.nii
│   ├── dicom_anat-scout_20190208142838_5_i00002.json
│   ├── dicom_anat-scout_20190208142838_5_i00002.nii
│   ├── dicom_anat-scout_20190208142838_5_i00003.json
│   └── dicom_anat-scout_20190208142838_5_i00003.nii
├── dwi
│   ├── dicom_dwi_dir-AP_20190208142838_9.bval
│   ├── dicom_dwi_dir-AP_20190208142838_9.bvec
│   ├── dicom_dwi_dir-AP_20190208142838_9.json
│   └── dicom_dwi_dir-AP_20190208142838_9.nii
├── fmap
│   ├── dicom_fmap_acq-4mm_20190208142838_7_e1.json
│   ├── dicom_fmap_acq-4mm_20190208142838_7_e1.nii
│   ├── dicom_fmap_acq-4mm_20190208142838_7_e2.json
│   ├── dicom_fmap_acq-4mm_20190208142838_7_e2.nii
│   ├── dicom_fmap_acq-4mm_20190208142838_8_e2_ph.json
│   ├── dicom_fmap_acq-4mm_20190208142838_8_e2_ph.nii
│   ├── dicom_fmap_dir-PA_20190208142838_15.bval
│   ├── dicom_fmap_dir-PA_20190208142838_15.bvec
│   ├── dicom_fmap_dir-PA_20190208142838_15.json
│   └── dicom_fmap_dir-PA_20190208142838_15.nii
└── func
    ├── dicom_func_task-rest_20190208142838_16.json
    └── dicom_func_task-rest_20190208142838_16.nii

5 directories, 42 files

2.2. Using HeuDiConv (automated workflow)

Typical use of heudiconv will require the creation and editing of your heuristics file.

But heudiconv also comes with existing heuristics which can be used as is, like convertall or ReproIn could be immediately reused and represent two ends of the spectrum in heuristics:

  • convertall is very simple and does not automate anything – it is for a user to modify filenames in the prepared conversion table, and then rerun with -c dcm2niix

  • reproin can be used fully automated, if original sequences were named according to its ReproIn convention.

WARNING: Could not check for version updates: 500 Server Error: Internal Server Error for url: https://rig.mit.edu/et/projects/nipy/heudiconv
INFO: Running heudiconv version 1.3.1 latest Unknown
INFO: Analyzing 791 dicoms
INFO: Filtering out 0 dicoms based on their filename
INFO: Generated sequence info for 1 studies with 11 entries total
INFO: Processing sequence infos to deduce study/session
INFO: Study session for StudySessionInfo(locator='Patterson/Coben', session=None, subject='001')
INFO: Need to process 1 study sessions
INFO: PROCESSING STARTS: {'subject': '001', 'outdir': '/home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben', 'session': None}
INFO: Processing 11 pre-sorted seqinfo entries
INFO: Processing 11 seqinfo entries
WARNING: Deduced datatype to be dwi from DICOM, but got fmap out of fmap_dir-PA
WARNING: Detected 4 duplicated run(s) for template {bids_subject_session_dir}/anat/{bids_subject_session_prefix}_scout: ['1-anat-scout', '2-anat-scout', '3-anat-scout', '4-anat-scout']
INFO: Doing conversion using dcm2niix
INFO: Converting /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/anat/sub-001_scout (3 DICOMs) -> /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/anat . Converter: dcm2niix . Output types: ('dicom',)
INFO: Converting /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/anat/sub-001_acq-MPRAGE_T1w (240 DICOMs) -> /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/anat . Converter: dcm2niix . Output types: ('nii.gz', 'dicom')
260409-04:37:28,819 nipype.workflow INFO:
	 [Node] Setting-up "convert" in "/tmp/dcm2niix_jxb3za5/convert".
INFO: [Node] Setting-up "convert" in "/tmp/dcm2niix_jxb3za5/convert".
260409-04:37:29,10 nipype.workflow INFO:
	 [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
260409-04:37:29,444 nipype.interface INFO:
	 stdout 2026-04-09T04:37:29.444099:Chris Rorden's dcm2niiX version v1.0.20220720  (JP2:OpenJPEG) (JP-LS:CharLS) GCC10.2.1 x86-64 (64-bit Linux)
INFO: stdout 2026-04-09T04:37:29.444099:Chris Rorden's dcm2niiX version v1.0.20220720  (JP2:OpenJPEG) (JP-LS:CharLS) GCC10.2.1 x86-64 (64-bit Linux)
260409-04:37:29,444 nipype.interface INFO:
	 stdout 2026-04-09T04:37:29.444099:Found 240 DICOM file(s)
INFO: stdout 2026-04-09T04:37:29.444099:Found 240 DICOM file(s)
260409-04:37:29,444 nipype.interface INFO:
	 stdout 2026-04-09T04:37:29.444099:Convert 240 DICOM as /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/anat/sub-001_acq-MPRAGE_T1w_heudiconv002 (224x224x240x1)
INFO: stdout 2026-04-09T04:37:29.444099:Convert 240 DICOM as /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/anat/sub-001_acq-MPRAGE_T1w_heudiconv002 (224x224x240x1)
260409-04:37:29,850 nipype.interface INFO:
	 stdout 2026-04-09T04:37:29.850823:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/anat/sub-001_acq-MPRAGE_T1w_heudiconv002.nii"
INFO: stdout 2026-04-09T04:37:29.850823:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/anat/sub-001_acq-MPRAGE_T1w_heudiconv002.nii"
260409-04:37:29,851 nipype.interface INFO:
	 stdout 2026-04-09T04:37:29.850823:Conversion required 0.551541 seconds (0.287091 for core code).
INFO: stdout 2026-04-09T04:37:29.850823:Conversion required 0.551541 seconds (0.287091 for core code).
260409-04:37:29,892 nipype.workflow INFO:
	 [Node] Finished "convert", elapsed time 0.644353s.
INFO: [Node] Finished "convert", elapsed time 0.644353s.
260409-04:37:54,939 nipype.workflow INFO:
	 [Node] Setting-up "embedder" in "/tmp/embedmetauna_sf6_/embedder".
INFO: [Node] Setting-up "embedder" in "/tmp/embedmetauna_sf6_/embedder".
260409-04:37:54,957 nipype.workflow INFO:
	 [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
260409-04:38:00,30 nipype.workflow INFO:
	 [Node] Finished "embedder", elapsed time 5.072673s.
INFO: [Node] Finished "embedder", elapsed time 5.072673s.
INFO: Post-treating /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/anat/sub-001_acq-MPRAGE_T1w.json file
INFO: Converting /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_acq-4mm_magnitude (88 DICOMs) -> /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap . Converter: dcm2niix . Output types: ('nii.gz', 'dicom')
260409-04:38:00,66 nipype.workflow INFO:
	 [Node] Setting-up "convert" in "/tmp/dcm2niixeiqjd6if/convert".
INFO: [Node] Setting-up "convert" in "/tmp/dcm2niixeiqjd6if/convert".
260409-04:38:00,98 nipype.workflow INFO:
	 [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
260409-04:38:00,219 nipype.interface INFO:
	 stdout 2026-04-09T04:38:00.218949:Chris Rorden's dcm2niiX version v1.0.20220720  (JP2:OpenJPEG) (JP-LS:CharLS) GCC10.2.1 x86-64 (64-bit Linux)
INFO: stdout 2026-04-09T04:38:00.218949:Chris Rorden's dcm2niiX version v1.0.20220720  (JP2:OpenJPEG) (JP-LS:CharLS) GCC10.2.1 x86-64 (64-bit Linux)
260409-04:38:00,219 nipype.interface INFO:
	 stdout 2026-04-09T04:38:00.218949:Found 88 DICOM file(s)
INFO: stdout 2026-04-09T04:38:00.218949:Found 88 DICOM file(s)
260409-04:38:00,219 nipype.interface INFO:
	 stdout 2026-04-09T04:38:00.218949:Slices not stacked: echo varies (TE 4.92, 7.38; echo 1, 2). Use 'merge 2D slices' option to force stacking
INFO: stdout 2026-04-09T04:38:00.218949:Slices not stacked: echo varies (TE 4.92, 7.38; echo 1, 2). Use 'merge 2D slices' option to force stacking
260409-04:38:00,219 nipype.interface INFO:
	 stdout 2026-04-09T04:38:00.218949:Convert 44 DICOM as /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_acq-4mm_magnitude_heudiconv212_e1 (64x64x44x1)
INFO: stdout 2026-04-09T04:38:00.218949:Convert 44 DICOM as /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_acq-4mm_magnitude_heudiconv212_e1 (64x64x44x1)
260409-04:38:00,258 nipype.interface INFO:
	 stdout 2026-04-09T04:38:00.258241:Compress: "/usr/bin/pigz" -n -f -6 "/home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_acq-4mm_magnitude_heudiconv212_e1.nii"
INFO: stdout 2026-04-09T04:38:00.258241:Compress: "/usr/bin/pigz" -n -f -6 "/home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_acq-4mm_magnitude_heudiconv212_e1.nii"
260409-04:38:00,258 nipype.interface INFO:
	 stdout 2026-04-09T04:38:00.258241:Convert 44 DICOM as /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_acq-4mm_magnitude_heudiconv212_e2 (64x64x44x1)
INFO: stdout 2026-04-09T04:38:00.258241:Convert 44 DICOM as /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_acq-4mm_magnitude_heudiconv212_e2 (64x64x44x1)
260409-04:38:00,288 nipype.interface INFO:
	 stdout 2026-04-09T04:38:00.288569:Compress: "/usr/bin/pigz" -n -f -6 "/home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_acq-4mm_magnitude_heudiconv212_e2.nii"
INFO: stdout 2026-04-09T04:38:00.288569:Compress: "/usr/bin/pigz" -n -f -6 "/home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_acq-4mm_magnitude_heudiconv212_e2.nii"
260409-04:38:00,288 nipype.interface INFO:
	 stdout 2026-04-09T04:38:00.288569:Conversion required 0.114119 seconds (0.050745 for core code).
INFO: stdout 2026-04-09T04:38:00.288569:Conversion required 0.114119 seconds (0.050745 for core code).
260409-04:38:00,338 nipype.workflow INFO:
	 [Node] Finished "convert", elapsed time 0.238545s.
INFO: [Node] Finished "convert", elapsed time 0.238545s.
WARNING: For now not embedding BIDS and info generated .nii.gz itself since sequence produced multiple files
INFO: Converting /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_acq-4mm_phasediff (44 DICOMs) -> /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap . Converter: dcm2niix . Output types: ('nii.gz', 'dicom')
260409-04:38:01,77 nipype.workflow INFO:
	 [Node] Setting-up "convert" in "/tmp/dcm2niixsszbzg92/convert".
INFO: [Node] Setting-up "convert" in "/tmp/dcm2niixsszbzg92/convert".
260409-04:38:01,95 nipype.workflow INFO:
	 [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
260409-04:38:01,193 nipype.interface INFO:
	 stdout 2026-04-09T04:38:01.193160:Chris Rorden's dcm2niiX version v1.0.20220720  (JP2:OpenJPEG) (JP-LS:CharLS) GCC10.2.1 x86-64 (64-bit Linux)
INFO: stdout 2026-04-09T04:38:01.193160:Chris Rorden's dcm2niiX version v1.0.20220720  (JP2:OpenJPEG) (JP-LS:CharLS) GCC10.2.1 x86-64 (64-bit Linux)
260409-04:38:01,193 nipype.interface INFO:
	 stdout 2026-04-09T04:38:01.193160:Found 44 DICOM file(s)
INFO: stdout 2026-04-09T04:38:01.193160:Found 44 DICOM file(s)
260409-04:38:01,193 nipype.interface INFO:
	 stdout 2026-04-09T04:38:01.193160:Convert 44 DICOM as /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_acq-4mm_phasediff_heudiconv632_e2_ph (64x64x44x1)
INFO: stdout 2026-04-09T04:38:01.193160:Convert 44 DICOM as /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_acq-4mm_phasediff_heudiconv632_e2_ph (64x64x44x1)
260409-04:38:01,223 nipype.interface INFO:
	 stdout 2026-04-09T04:38:01.223310:Compress: "/usr/bin/pigz" -n -f -6 "/home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_acq-4mm_phasediff_heudiconv632_e2_ph.nii"
INFO: stdout 2026-04-09T04:38:01.223310:Compress: "/usr/bin/pigz" -n -f -6 "/home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_acq-4mm_phasediff_heudiconv632_e2_ph.nii"
260409-04:38:01,223 nipype.interface INFO:
	 stdout 2026-04-09T04:38:01.223310:Conversion required 0.064891 seconds (0.035796 for core code).
INFO: stdout 2026-04-09T04:38:01.223310:Conversion required 0.064891 seconds (0.035796 for core code).
260409-04:38:01,262 nipype.workflow INFO:
	 [Node] Finished "convert", elapsed time 0.165683s.
INFO: [Node] Finished "convert", elapsed time 0.165683s.
260409-04:38:01,993 nipype.workflow INFO:
	 [Node] Setting-up "embedder" in "/tmp/embedmeta802dx400/embedder".
INFO: [Node] Setting-up "embedder" in "/tmp/embedmeta802dx400/embedder".
260409-04:38:02,4 nipype.workflow INFO:
	 [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
260409-04:38:03,319 nipype.workflow INFO:
	 [Node] Finished "embedder", elapsed time 1.3135970000000001s.
INFO: [Node] Finished "embedder", elapsed time 1.3135970000000001s.
INFO: Post-treating /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_acq-4mm_phasediff.json file
INFO: Converting /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/dwi/sub-001_dir-AP_dwi (16 DICOMs) -> /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/dwi . Converter: dcm2niix . Output types: ('nii.gz', 'dicom')
260409-04:38:03,334 nipype.workflow INFO:
	 [Node] Setting-up "convert" in "/tmp/dcm2niixr7b9ctif/convert".
INFO: [Node] Setting-up "convert" in "/tmp/dcm2niixr7b9ctif/convert".
260409-04:38:03,341 nipype.workflow INFO:
	 [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
260409-04:38:03,478 nipype.interface INFO:
	 stdout 2026-04-09T04:38:03.478519:Chris Rorden's dcm2niiX version v1.0.20220720  (JP2:OpenJPEG) (JP-LS:CharLS) GCC10.2.1 x86-64 (64-bit Linux)
INFO: stdout 2026-04-09T04:38:03.478519:Chris Rorden's dcm2niiX version v1.0.20220720  (JP2:OpenJPEG) (JP-LS:CharLS) GCC10.2.1 x86-64 (64-bit Linux)
260409-04:38:03,479 nipype.interface INFO:
	 stdout 2026-04-09T04:38:03.478519:Found 16 DICOM file(s)
INFO: stdout 2026-04-09T04:38:03.478519:Found 16 DICOM file(s)
260409-04:38:03,479 nipype.interface INFO:
	 stdout 2026-04-09T04:38:03.478519:Convert 16 DICOM as /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/dwi/sub-001_dir-AP_dwi_heudiconv176 (122x122x66x16)
INFO: stdout 2026-04-09T04:38:03.478519:Convert 16 DICOM as /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/dwi/sub-001_dir-AP_dwi_heudiconv176 (122x122x66x16)
260409-04:38:03,841 nipype.interface INFO:
	 stdout 2026-04-09T04:38:03.840834:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/dwi/sub-001_dir-AP_dwi_heudiconv176.nii"
INFO: stdout 2026-04-09T04:38:03.840834:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/dwi/sub-001_dir-AP_dwi_heudiconv176.nii"
260409-04:38:03,841 nipype.interface INFO:
	 stdout 2026-04-09T04:38:03.840834:Conversion required 0.430945 seconds (0.115364 for core code).
INFO: stdout 2026-04-09T04:38:03.840834:Conversion required 0.430945 seconds (0.115364 for core code).
260409-04:38:03,875 nipype.workflow INFO:
	 [Node] Finished "convert", elapsed time 0.533391s.
INFO: [Node] Finished "convert", elapsed time 0.533391s.
260409-04:38:23,797 nipype.workflow INFO:
	 [Node] Setting-up "embedder" in "/tmp/embedmeta19wjflbb/embedder".
INFO: [Node] Setting-up "embedder" in "/tmp/embedmeta19wjflbb/embedder".
260409-04:38:23,801 nipype.workflow INFO:
	 [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
260409-04:38:24,556 nipype.workflow INFO:
	 [Node] Finished "embedder", elapsed time 0.7545s.
INFO: [Node] Finished "embedder", elapsed time 0.7545s.
INFO: Post-treating /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/dwi/sub-001_dir-AP_dwi.json file
INFO: Converting /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_dir-PA_epi (132 DICOMs) -> /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap . Converter: dcm2niix . Output types: ('nii.gz', 'dicom')
260409-04:38:24,576 nipype.workflow INFO:
	 [Node] Setting-up "convert" in "/tmp/dcm2niix1kijvg4o/convert".
INFO: [Node] Setting-up "convert" in "/tmp/dcm2niix1kijvg4o/convert".
260409-04:38:24,623 nipype.workflow INFO:
	 [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
260409-04:38:24,773 nipype.interface INFO:
	 stdout 2026-04-09T04:38:24.773104:Chris Rorden's dcm2niiX version v1.0.20220720  (JP2:OpenJPEG) (JP-LS:CharLS) GCC10.2.1 x86-64 (64-bit Linux)
INFO: stdout 2026-04-09T04:38:24.773104:Chris Rorden's dcm2niiX version v1.0.20220720  (JP2:OpenJPEG) (JP-LS:CharLS) GCC10.2.1 x86-64 (64-bit Linux)
260409-04:38:24,773 nipype.interface INFO:
	 stdout 2026-04-09T04:38:24.773104:Found 132 DICOM file(s)
INFO: stdout 2026-04-09T04:38:24.773104:Found 132 DICOM file(s)
260409-04:38:24,773 nipype.interface INFO:
	 stdout 2026-04-09T04:38:24.773104:Convert 132 DICOM as /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_dir-PA_epi_heudiconv888 (122x122x66x2)
INFO: stdout 2026-04-09T04:38:24.773104:Convert 132 DICOM as /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_dir-PA_epi_heudiconv888 (122x122x66x2)
260409-04:38:24,953 nipype.interface INFO:
	 stdout 2026-04-09T04:38:24.953736:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_dir-PA_epi_heudiconv888.nii"
INFO: stdout 2026-04-09T04:38:24.953736:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_dir-PA_epi_heudiconv888.nii"
260409-04:38:24,954 nipype.interface INFO:
	 stdout 2026-04-09T04:38:24.953736:Conversion required 0.264009 seconds (0.089512 for core code).
INFO: stdout 2026-04-09T04:38:24.953736:Conversion required 0.264009 seconds (0.089512 for core code).
260409-04:38:24,987 nipype.workflow INFO:
	 [Node] Finished "convert", elapsed time 0.362832s.
INFO: [Node] Finished "convert", elapsed time 0.362832s.
260409-04:38:27,752 nipype.workflow INFO:
	 [Node] Setting-up "embedder" in "/tmp/embedmetaak1691_m/embedder".
INFO: [Node] Setting-up "embedder" in "/tmp/embedmetaak1691_m/embedder".
260409-04:38:27,762 nipype.workflow INFO:
	 [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
260409-04:38:32,3 nipype.workflow INFO:
	 [Node] Finished "embedder", elapsed time 4.240726s.
INFO: [Node] Finished "embedder", elapsed time 4.240726s.
INFO: Post-treating /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/fmap/sub-001_dir-PA_epi.json file
INFO: Converting /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/func/sub-001_task-rest_bold (4 DICOMs) -> /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/func . Converter: dcm2niix . Output types: ('nii.gz', 'dicom')
260409-04:38:32,32 nipype.workflow INFO:
	 [Node] Setting-up "convert" in "/tmp/dcm2niixses1nsbd/convert".
INFO: [Node] Setting-up "convert" in "/tmp/dcm2niixses1nsbd/convert".
260409-04:38:32,36 nipype.workflow INFO:
	 [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
260409-04:38:32,123 nipype.interface INFO:
	 stdout 2026-04-09T04:38:32.123679:Chris Rorden's dcm2niiX version v1.0.20220720  (JP2:OpenJPEG) (JP-LS:CharLS) GCC10.2.1 x86-64 (64-bit Linux)
INFO: stdout 2026-04-09T04:38:32.123679:Chris Rorden's dcm2niiX version v1.0.20220720  (JP2:OpenJPEG) (JP-LS:CharLS) GCC10.2.1 x86-64 (64-bit Linux)
260409-04:38:32,124 nipype.interface INFO:
	 stdout 2026-04-09T04:38:32.123679:Found 4 DICOM file(s)
INFO: stdout 2026-04-09T04:38:32.123679:Found 4 DICOM file(s)
260409-04:38:32,124 nipype.interface INFO:
	 stdout 2026-04-09T04:38:32.123679:Convert 4 DICOM as /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/func/sub-001_task-rest_bold_heudiconv727 (64x64x44x4)
INFO: stdout 2026-04-09T04:38:32.123679:Convert 4 DICOM as /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/func/sub-001_task-rest_bold_heudiconv727 (64x64x44x4)
260409-04:38:32,289 nipype.interface INFO:
	 stdout 2026-04-09T04:38:32.289087:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/func/sub-001_task-rest_bold_heudiconv727.nii"
INFO: stdout 2026-04-09T04:38:32.289087:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/func/sub-001_task-rest_bold_heudiconv727.nii"
260409-04:38:32,289 nipype.interface INFO:
	 stdout 2026-04-09T04:38:32.289087:Conversion required 0.177054 seconds (0.015175 for core code).
INFO: stdout 2026-04-09T04:38:32.289087:Conversion required 0.177054 seconds (0.015175 for core code).
260409-04:38:32,328 nipype.workflow INFO:
	 [Node] Finished "convert", elapsed time 0.291104s.
INFO: [Node] Finished "convert", elapsed time 0.291104s.
260409-04:38:32,767 nipype.workflow INFO:
	 [Node] Setting-up "embedder" in "/tmp/embedmeta8rpppb0x/embedder".
INFO: [Node] Setting-up "embedder" in "/tmp/embedmeta8rpppb0x/embedder".
260409-04:38:32,773 nipype.workflow INFO:
	 [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
260409-04:38:33,20 nipype.workflow INFO:
	 [Node] Finished "embedder", elapsed time 0.245852s.
INFO: [Node] Finished "embedder", elapsed time 0.245852s.
INFO: Post-treating /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/func/sub-001_task-rest_bold.json file
INFO: Converting /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/anat/sub-001_scout__dup-01 (128 DICOMs) -> /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/anat . Converter: dcm2niix . Output types: ('dicom',)
INFO: Converting /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/anat/sub-001_scout__dup-02 (128 DICOMs) -> /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/anat . Converter: dcm2niix . Output types: ('dicom',)
INFO: Converting /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/anat/sub-001_scout__dup-03 (5 DICOMs) -> /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/anat . Converter: dcm2niix . Output types: ('dicom',)
INFO: Converting /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/anat/sub-001_scout__dup-04 (3 DICOMs) -> /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001/anat . Converter: dcm2niix . Output types: ('dicom',)
INFO: Adding "IntendedFor" to the fieldmaps in /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben/sub-001.
INFO: Populating template files under /home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben
INFO: PROCESSING DONE: {'subject': '001', 'outdir': '/home/jovyan/workspace/books/examples/workflows/heudiconv_reproin_bids/Patterson/Coben', 'session': None}

2.3. Using bidscoin (automated workflow)

BIDScoin requires the source data repository to be organized according to a subject/[session]/data structure where data folder can be structured in DICOM series layout, DICOMDIR layout, flat DICOM layout. Refer to this doc for more details.

To perform BIDS conversion, run:

  • (1a) bidsmapper command

  • once bidsmapper finishes, it automatically launches (1b) the bidseditor. Note: The --automated flag skips the manual editing step with bidseditor

  • (2) bidscoiner command

image.png
INFO | 
INFO | -------------- START BIDSmapper ------------
INFO | >>> bidsmapper sourcefolder=/home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom bidsfolder=/home/jovyan/workspace/books/examples/workflows/bidscoin_bids bidsmap=bidsmap.yaml template=/home/jovyan/.bidscoin/4.3.3+qt5/templates/bidsmap_dccn.yaml plugins=[] subprefix=00 sesprefix=Patterson_Coben store=False force=False
INFO | No existing bidsmap file found: /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/code/bidscoin/bidsmap.yaml
INFO | Reading: /home/jovyan/.bidscoin/4.3.3+qt5/templates/bidsmap_dccn.yaml
INFO | generated new fontManager
INFO | Checking the bidsmap run-items:
SUCCESS | All datatypes and options in the template bidsmap are valid
INFO | Mapping: /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1 (subject 1/1)
VERBOSE | Executing plugin: dcm2niix2bids -> /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1
INFO | Discovered 'exclude' DICOM sample: /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/Localizers_4/IM-0012-0001-0001.dcm
INFO | Discovered 'anat' DICOM sample: /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/anatT1w_acqMPRAGE_6/IM-0001-0001.dcm
INFO | Discovered 'dwi' DICOM sample: /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/dwi_dirAP_9/IM-0004-0001.dcm
INFO | Discovered 'fmap' DICOM sample: /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/fmap_acq4mm_7/IM-0002-0001-0001.dcm
INFO | Discovered 'fmap' DICOM sample: /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/fmap_acq4mm_8/IM-0003-0001.dcm
INFO | Discovered 'fmap' DICOM sample: /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/fmap_dirPA_15/IM-0010-0001.dcm
INFO | Discovered 'func' DICOM sample: /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/func_taskrest_16/IM-0011-0001.dcm
INFO | Checking the bidsmap run-items:
SUCCESS | All run-items in the bidsmap are valid
INFO | bids-validator 1.14.6 test results (* = in .bidsignore):
INFO | False:	exclude/sub-DICOM_task-anatscoutMPRcor_acq-anatscout_echo-1_GR.*
SUCCESS | All generated bidsnames are BIDS-valid
INFO | Writing bidsmap to: /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/code/bidscoin/bidsmap.yaml
INFO | -------------- FINISHED! -------------------
INFO | 
SUCCESS | No BIDScoin errors or warnings were reported
INFO | 
INFO | For the complete log see: /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/code/bidscoin/bidsmapper.log
NB: That folder may contain privacy sensitive information, e.g. pathnames in logfiles and provenance data samples
INFO | 
INFO | -------------- START BIDScoiner 4.3.3+qt5: BIDS 1.9.0 ------------
INFO | >>> bidscoiner sourcefolder=/home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom bidsfolder=/home/jovyan/workspace/books/examples/workflows/bidscoin_bids participant=None force=False bidsmap=bidsmap.yaml
INFO | Creating dataset description file: /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/dataset_description.json
INFO | Creating a template README file (adjust it to your needs): /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/README
INFO | Reading: /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/code/bidscoin/bidsmap.yaml
INFO | Checking the bidsmap run-items:
SUCCESS | All run-items in the bidsmap are valid
INFO | ------------------- Subject 1/1 -------------------
INFO | >>> Coining datasources in: /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1
VERBOSE | Executing plugin: dcm2niix2bids
INFO | --> Leaving out: /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/Localizers_4
INFO | --> Coining: /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/anatT1w_acqMPRAGE_6
VERBOSE | Command:
dcm2niix -b y -z y -i n -l n -f "sub-1_ses-1_acq-anatT1wacqMPRAGE_T1w" -o "/home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/anat" "/home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/anatT1w_acqMPRAGE_6"
VERBOSE | Output:
Chris Rorden's dcm2niiX version v1.0.20240202  (JP2:OpenJPEG) (JP-LS:CharLS) GCC12.2.0 x86-64 (64-bit Linux)
Found 240 DICOM file(s)
Convert 240 DICOM as /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/anat/sub-1_ses-1_acq-anatT1wacqMPRAGE_T1w (224x224x240x1)
Conversion required 1.846604 seconds (1.836889 for core code).

INFO | --> Coining: /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/dwi_dirAP_9
VERBOSE | Command:
dcm2niix -b y -z y -i n -l n -f "sub-1_ses-1_acq-dwidirAP_dir-AP_dwi" -o "/home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/dwi" "/home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/dwi_dirAP_9"
VERBOSE | Output:
Chris Rorden's dcm2niiX version v1.0.20240202  (JP2:OpenJPEG) (JP-LS:CharLS) GCC12.2.0 x86-64 (64-bit Linux)
Found 16 DICOM file(s)
Convert 16 DICOM as /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/dwi/sub-1_ses-1_acq-dwidirAP_dir-AP_dwi (122x122x66x16)
Conversion required 1.926221 seconds (1.926142 for core code).

INFO | --> Coining: /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/fmap_acq4mm_7
VERBOSE | Command:
dcm2niix -b y -z y -i n -l n -f "sub-1_ses-1_acq-fmapacq4mm_magnitude1" -o "/home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap" "/home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/fmap_acq4mm_7"
VERBOSE | Output:
Chris Rorden's dcm2niiX version v1.0.20240202  (JP2:OpenJPEG) (JP-LS:CharLS) GCC12.2.0 x86-64 (64-bit Linux)
Found 88 DICOM file(s)
Slices not stacked: echo varies (TE 4.92, 7.38; echo 1, 2). Use 'merge 2D slices' option to force stacking
Convert 44 DICOM as /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapacq4mm_magnitude1_e1 (64x64x44x1)
Convert 44 DICOM as /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapacq4mm_magnitude1_e2 (64x64x44x1)
Conversion required 0.091415 seconds (0.091384 for core code).

VERBOSE | Found dcm2niix ['e1'] postfixes, renaming
/home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapacq4mm_magnitude1_e1.nii.gz ->
/home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapacq4mm_magnitude1.nii.gz
VERBOSE | Found dcm2niix ['e2'] postfixes, renaming
/home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapacq4mm_magnitude1_e2.nii.gz ->
/home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapacq4mm_magnitude2.nii.gz
INFO | --> Coining: /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/fmap_acq4mm_8
VERBOSE | Command:
dcm2niix -b y -z y -i n -l n -f "sub-1_ses-1_acq-fmapacq4mm_phasediff" -o "/home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap" "/home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/fmap_acq4mm_8"
VERBOSE | Output:
Chris Rorden's dcm2niiX version v1.0.20240202  (JP2:OpenJPEG) (JP-LS:CharLS) GCC12.2.0 x86-64 (64-bit Linux)
Found 44 DICOM file(s)
Convert 44 DICOM as /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapacq4mm_phasediff_e2_ph (64x64x44x1)
Conversion required 0.050924 seconds (0.050816 for core code).

VERBOSE | Found dcm2niix ['e2', 'ph'] postfixes, renaming
/home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapacq4mm_phasediff_e2_ph.nii.gz ->
/home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapacq4mm_phasediff.nii.gz
INFO | --> Coining: /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/fmap_dirPA_15
VERBOSE | Command:
dcm2niix -b y -z y -i n -l n -f "sub-1_ses-1_acq-fmapdirPA_fieldmap" -o "/home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap" "/home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/fmap_dirPA_15"
VERBOSE | Output:
Chris Rorden's dcm2niiX version v1.0.20240202  (JP2:OpenJPEG) (JP-LS:CharLS) GCC12.2.0 x86-64 (64-bit Linux)
Found 132 DICOM file(s)
Convert 132 DICOM as /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapdirPA_fieldmap (122x122x66x2)
Conversion required 0.385543 seconds (0.385370 for core code).

INFO | --> Coining: /home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/func_taskrest_16
VERBOSE | Command:
dcm2niix -b y -z y -i n -l n -f "sub-1_ses-1_task-functaskrest_dir-AP_bold" -o "/home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/func" "/home/jovyan/workspace/books/examples/workflows/heudiconv-reproin-example/REPROIN/dicom/001/Patterson_Coben - 1/func_taskrest_16"
VERBOSE | Output:
Chris Rorden's dcm2niiX version v1.0.20240202  (JP2:OpenJPEG) (JP-LS:CharLS) GCC12.2.0 x86-64 (64-bit Linux)
Found 4 DICOM file(s)
Convert 4 DICOM as /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/func/sub-1_ses-1_task-functaskrest_dir-AP_bold (64x64x44x4)
Conversion required 0.112795 seconds (0.112047 for core code).

VERBOSE | Writing acquisition time data to: /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/sub-1_ses-1_scans.tsv
VERBOSE | Writing sub-1 subject data to: /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/participants.tsv
VERBOSE | Writing subject meta data to: /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/participants.json
WARNING | Empty IntendedFor/B0FieldSource/B0FieldIdentifier fieldmap values in /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapacq4mm_magnitude1.json (i.e. the fieldmap may not be used)
WARNING | Empty IntendedFor/B0FieldSource/B0FieldIdentifier fieldmap values in /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapacq4mm_magnitude2.json (i.e. the fieldmap may not be used)
WARNING | Empty IntendedFor/B0FieldSource/B0FieldIdentifier fieldmap values in /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapacq4mm_phasediff.json (i.e. the fieldmap may not be used)
WARNING | Empty IntendedFor/B0FieldSource/B0FieldIdentifier fieldmap values in /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapdirPA_fieldmap.json (i.e. the fieldmap may not be used)
INFO | -------------- FINISHED! ------------
INFO | 
INFO | The following BIDScoin errors and warnings were reported:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2026-04-09 04:39:17 - WARNING | Empty IntendedFor/B0FieldSource/B0FieldIdentifier fieldmap values in /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapacq4mm_magnitude1.json (i.e. the fieldmap may not be used)
2026-04-09 04:39:17 - WARNING | Empty IntendedFor/B0FieldSource/B0FieldIdentifier fieldmap values in /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapacq4mm_magnitude2.json (i.e. the fieldmap may not be used)
2026-04-09 04:39:17 - WARNING | Empty IntendedFor/B0FieldSource/B0FieldIdentifier fieldmap values in /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapacq4mm_phasediff.json (i.e. the fieldmap may not be used)
2026-04-09 04:39:17 - WARNING | Empty IntendedFor/B0FieldSource/B0FieldIdentifier fieldmap values in /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/sub-1/ses-1/fmap/sub-1_ses-1_acq-fmapdirPA_fieldmap.json (i.e. the fieldmap may not be used)
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

INFO | For the complete log see: /home/jovyan/workspace/books/examples/workflows/bidscoin_bids/code/bidscoin/bidscoiner.log
NB: That folder may contain privacy sensitive information, e.g. pathnames in logfiles and provenance data samples
Creating BIDScoin configuration:
-> /home/jovyan/.bidscoin/4.3.3+qt5/config.toml
-> /home/jovyan/.bidscoin/4.3.3+qt5/templates/bidsmap_dccn.yaml
-> /home/jovyan/.bidscoin/4.3.3+qt5/templates/bidsmap_bids2bids.yaml
-> /home/jovyan/.bidscoin/4.3.3+qt5/templates/bidsmap_sst.yaml
-> /home/jovyan/.bidscoin/4.3.3+qt5/templates/schema.json
./bidscoin_bids/
├── README
├── code
│   └── bidscoin
│       ├── bidscoiner.errors
│       ├── bidscoiner.log
│       ├── bidscoiner.tsv
│       ├── bidsmap.yaml
│       ├── bidsmapper.errors
│       └── bidsmapper.log
├── dataset_description.json
├── participants.json
├── participants.tsv
└── sub-1
    └── ses-1
        ├── anat
        │   ├── sub-1_ses-1_acq-anatT1wacqMPRAGE_T1w.json
        │   └── sub-1_ses-1_acq-anatT1wacqMPRAGE_T1w.nii.gz
        ├── dwi
        │   ├── sub-1_ses-1_acq-dwidirAP_dir-AP_dwi.bval
        │   ├── sub-1_ses-1_acq-dwidirAP_dir-AP_dwi.bvec
        │   ├── sub-1_ses-1_acq-dwidirAP_dir-AP_dwi.json
        │   └── sub-1_ses-1_acq-dwidirAP_dir-AP_dwi.nii.gz
        ├── fmap
        │   ├── sub-1_ses-1_acq-fmapacq4mm_magnitude1.json
        │   ├── sub-1_ses-1_acq-fmapacq4mm_magnitude1.nii.gz
        │   ├── sub-1_ses-1_acq-fmapacq4mm_magnitude2.json
        │   ├── sub-1_ses-1_acq-fmapacq4mm_magnitude2.nii.gz
        │   ├── sub-1_ses-1_acq-fmapacq4mm_phasediff.json
        │   ├── sub-1_ses-1_acq-fmapacq4mm_phasediff.nii.gz
        │   ├── sub-1_ses-1_acq-fmapdirPA_fieldmap.bval
        │   ├── sub-1_ses-1_acq-fmapdirPA_fieldmap.bvec
        │   ├── sub-1_ses-1_acq-fmapdirPA_fieldmap.json
        │   └── sub-1_ses-1_acq-fmapdirPA_fieldmap.nii.gz
        ├── func
        │   ├── sub-1_ses-1_task-functaskrest_dir-AP_bold.json
        │   └── sub-1_ses-1_task-functaskrest_dir-AP_bold.nii.gz
        └── sub-1_ses-1_scans.tsv

9 directories, 29 files

Dependencies in Jupyter/Python

  • Using the package watermark to document system environment and software versions used in this notebook, alongside the Neurodesktop version extracted from the JUPYTER_IMAGE or NEURODESKTOP_VERSION environment variables.

Last updated: 2026-04-09T04:39:19.081820+00:00

Python implementation: CPython
Python version       : 3.13.9
IPython version      : 9.7.0

Compiler    : GCC 14.3.0
OS          : Linux
Release     : 5.15.0-171-generic
Machine     : x86_64
Processor   : x86_64
CPU cores   : 32
Architecture: 64bit


Neurodesktop version: 2025-12-20
References
  1. Li, X., Morgan, P. S., Ashburner, J., Smith, J., & Rorden, C. (2016). The first step for neuroimaging data analysis: DICOM to NIfTI conversion. Journal of Neuroscience Methods, 264, 47–56. 10.1016/j.jneumeth.2016.03.001
  2. Zwiers, M. P., Moia, S., & Oostenveld, R. (2022). BIDScoin: A User-Friendly Application to Convert Source Data to Brain Imaging Data Structure. Frontiers in Neuroinformatics, 15. 10.3389/fninf.2021.770608
  3. Yaroslav O. Halchenko, Mathias Goncalves, Satrajit Ghosh, Pablo Velasco, Matteo Visconti di Oleggio Castello, Taylor Salo, John T. Wodder II, Michael Hanke, Patrick Sadil, Krzysztof Jacek Gorgolewski, Horea-Ioan Ioanas, Chris Rorden, Timothy J. Hendrickson, Michael Dayan, Sean Dae Houlihan, James Kent, Ted Strauss, John Lee, Isaac To, … David N. Kennedy. (2024). HeuDiConv — flexible DICOM conversion into structured directory layouts. Zenodo. 10.5281/ZENODO.13994097