heudiconv
heudiconv copied to clipboard
docker nipy/heudiconv:latest -> subprocess exited with code 2
Halo,
I am following: https://reproducibility.stanford.edu/bids-tutorial-series-part-2a/#heuman1
My dicoms from a Siemens Prisma fit scanner are in this folder: /media/SamSSD/QA_temp/Dicom/sub-01/ses-001/SCANS/3/DICOM 660 Dicom files of one scan session: 01305_20220726-.MR.Kopf_NIC_QA.1.1.2022.07.27.10.53.59.00.17625128.dcm ... 01305_20220726-.SR.Kopf_NIC_QA.99.6.2022.07.27.10.53.59.00.17625205.dcm
Just fyi - those are from the following sequences:
localizer boldB_restSMS_1-1_KS-t-a-1-6-1-8-20202000-32-987 boldB_restSMS_1-1_KS-t-a-1-6-1-8-24242400-38-869 ep2d_bold_rsfMRT_Phantom T1wC_standard_1-1_KS-s-a-1-1-2-88-0909093D-2-2400
I successfully ran steps 1, 2 and 3 of the manual above.
For step 4 my command looks like this:
sudo docker run --rm -it -v /media/SamSSD/QA_temp:/base nipy/heudiconv:latest -d /base/Dicom/sub-{subject}/ses-{session}/SCANS//DICOM/.dcm -o /base/Nifti/ -f /base/Nifti/code/heuristic.py -s 01 -ss 001 -c dcm2niix -b --overwrite
My heuristic.py file in /media/SamSSD/QA_temp/Nifti/code/ looks like this:
import os
def create_key(template, outtype=('nii.gz',), annotation_classes=None): if template is None or not template: raise ValueError('Template must be a valid format string') return template, outtype, annotation_classes
def infotodict(seqinfo): """Heuristic evaluator for determining which runs belong where
allowed template fields - follow python string module:
item: index within category
subject: participant id
seqitem: run number during scanning
subindex: sub index within group
"""
data = create_key('run{item:03d}')
info = {data: []}
last_run = len(seqinfo)
for s in seqinfo:
"""
The namedtuple `s` contains the following fields:
* total_files_till_now
* example_dcm_file
* series_id
* dcm_dir_name
* unspecified2
* unspecified3
* dim1
* dim2
* dim3
* dim4
* TR
* TE
* protocol_name
* is_motion_corrected
* is_derived
* patient_id
* study_description
* referring_physician_name
* series_description
* image_type
"""
info[data].append(s.series_id)
return info
The bash output is long, so I put it below.
After the erroe I find the following output in the folder /media/SamSSD/QA_temp/Nifti$ ls -1v: code run002.json run002.nii.gz run003.json run003.nii.gz run004.json run004.nii.gz run005.json run005.nii.gz run006.json run006.nii.gz run0011.json run0011.nii.gz run0012.json run0012.nii.gz
Thank you so much for your efforts!
Marco
Bash output:
user@user-X9DAi:/media/SamSSD/QA_temp$ sudo docker run --rm -it -v /media/SamSSD/QA_temp:/base nipy/heudiconv:latest -d /base/Dicom/sub-{subject}/ses-{session}/SCANS//DICOM/.dcm -o /base/Nifti/ -f /base/Nifti/code/heuristic.py -s 01 -ss 001 -c dcm2niix -b --overwrite INFO: Running heudiconv version 0.11.3+d20220512 latest 0.11.3 INFO: Need to process 1 study sessions INFO: PROCESSING STARTS: {'subject': '01', 'outdir': '/base/Nifti/', 'session': '001'} INFO: Processing 660 dicoms INFO: Analyzing 660 dicoms INFO: Generated sequence info for 7 studies with 660 entries total INFO: Doing conversion using dcm2niix INFO: Converting /base/Nifti/run001 (2 DICOMs) -> /base/Nifti . Converter: dcm2niix . Output types: ('nii.gz',) 220728-10:22:25,598 nipype.utils WARNING: A newer version (1.8.3) of nipy/nipype is available. You are using 1.8.0 WARNING: A newer version (1.8.3) of nipy/nipype is available. You are using 1.8.0 220728-10:22:25,601 nipype.workflow INFO: [Node] Setting-up "convert" in "/tmp/dcm2niixi0ofe5ph/convert". INFO: [Node] Setting-up "convert" in "/tmp/dcm2niixi0ofe5ph/convert". 220728-10:22:25,608 nipype.workflow INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix> INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix> 220728-10:22:25,721 nipype.interface INFO: stdout 2022-07-28T10:22:25.721250:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux) INFO: stdout 2022-07-28T10:22:25.721250:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux) 220728-10:22:25,721 nipype.interface INFO: stdout 2022-07-28T10:22:25.721250:Found 2 DICOM file(s) INFO: stdout 2022-07-28T10:22:25.721250:Found 2 DICOM file(s) 220728-10:22:25,721 nipype.interface INFO: stdout 2022-07-28T10:22:25.721250:slice orientation varies (localizer?) [0 1 0 0 0 -1] != [1 0 0 0 0 -1] INFO: stdout 2022-07-28T10:22:25.721250:slice orientation varies (localizer?) [0 1 0 0 0 -1] != [1 0 0 0 0 -1] 220728-10:22:25,721 nipype.interface INFO: stdout 2022-07-28T10:22:25.721250:Warning: Slice timing appears corrupted (range 0..6990, TR=7.5 ms) INFO: stdout 2022-07-28T10:22:25.721250:Warning: Slice timing appears corrupted (range 0..6990, TR=7.5 ms) 220728-10:22:25,722 nipype.interface INFO: stdout 2022-07-28T10:22:25.721250:Warning: Siemens XA DICOM inadequate for robust conversion (issue 236) INFO: stdout 2022-07-28T10:22:25.721250:Warning: Siemens XA DICOM inadequate for robust conversion (issue 236) 220728-10:22:25,722 nipype.interface INFO: stdout 2022-07-28T10:22:25.721250:Convert 1 DICOM as /base/Nifti/run001_heudiconv441 (512x512x2x1) INFO: stdout 2022-07-28T10:22:25.721250:Convert 1 DICOM as /base/Nifti/run001_heudiconv441 (512x512x2x1) 220728-10:22:25,805 nipype.interface INFO: stdout 2022-07-28T10:22:25.804953:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run001_heudiconv441.nii" INFO: stdout 2022-07-28T10:22:25.804953:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run001_heudiconv441.nii" 220728-10:22:25,805 nipype.interface INFO: stdout 2022-07-28T10:22:25.804953:Warning: Siemens XA DICOM inadequate for robust conversion (issue 236) INFO: stdout 2022-07-28T10:22:25.804953:Warning: Siemens XA DICOM inadequate for robust conversion (issue 236) 220728-10:22:25,805 nipype.interface INFO: stdout 2022-07-28T10:22:25.804953:Convert 1 DICOM as /base/Nifti/run001_heudiconv441a (512x512x1x1) INFO: stdout 2022-07-28T10:22:25.804953:Convert 1 DICOM as /base/Nifti/run001_heudiconv441a (512x512x1x1) 220728-10:22:25,825 nipype.interface INFO: stdout 2022-07-28T10:22:25.825291:Warning: Check that 2D images are not mirrored. INFO: stdout 2022-07-28T10:22:25.825291:Warning: Check that 2D images are not mirrored. 220728-10:22:25,825 nipype.interface INFO: stdout 2022-07-28T10:22:25.825291:Compress: "/usr/bin/pigz" -n -f -6 "/base/Nifti/run001_heudiconv441a.nii" INFO: stdout 2022-07-28T10:22:25.825291:Compress: "/usr/bin/pigz" -n -f -6 "/base/Nifti/run001_heudiconv441a.nii" 220728-10:22:25,825 nipype.interface INFO: stdout 2022-07-28T10:22:25.825291:Conversion required 0.115806 seconds (0.015515 for core code). INFO: stdout 2022-07-28T10:22:25.825291:Conversion required 0.115806 seconds (0.015515 for core code). 220728-10:22:25,856 nipype.workflow INFO: [Node] Finished "convert", elapsed time 0.181912s. INFO: [Node] Finished "convert", elapsed time 0.181912s. WARNING: Failed to get date/time for the content: 'FileDataset' object has no attribute 'AcquisitionDate' WARNING: Failed to detect fulfilled BIDS layout. No scans.tsv file(s) will be produced for /base/Nifti/run0011.json, /base/Nifti/run0012.json WARNING: Failed to find task field in /base/Nifti/run0011.json. WARNING: Failed to find task field in /base/Nifti/run0012.json. WARNING: For now not embedding BIDS and info generated .nii.gz itself since sequence produced multiple files INFO: Converting /base/Nifti/run002 (150 DICOMs) -> /base/Nifti . Converter: dcm2niix . Output types: ('nii.gz',) 220728-10:22:25,892 nipype.workflow INFO: [Node] Setting-up "convert" in "/tmp/dcm2niix1eyyw3oj/convert". INFO: [Node] Setting-up "convert" in "/tmp/dcm2niix1eyyw3oj/convert". 220728-10:22:25,967 nipype.workflow INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix> INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix> 220728-10:22:26,215 nipype.interface INFO: stdout 2022-07-28T10:22:26.214951:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux) INFO: stdout 2022-07-28T10:22:26.214951:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux) 220728-10:22:26,215 nipype.interface INFO: stdout 2022-07-28T10:22:26.214951:Found 150 DICOM file(s) INFO: stdout 2022-07-28T10:22:26.214951:Found 150 DICOM file(s) 220728-10:22:26,215 nipype.interface INFO: stdout 2022-07-28T10:22:26.214951:Warning: Siemens XA exported as classic not enhanced DICOM (issue 236) INFO: stdout 2022-07-28T10:22:26.214951:Warning: Siemens XA exported as classic not enhanced DICOM (issue 236) 220728-10:22:26,215 nipype.interface INFO: stdout 2022-07-28T10:22:26.214951:Convert 150 DICOM as /base/Nifti/run002_heudiconv009 (64x64x34x150) INFO: stdout 2022-07-28T10:22:26.214951:Convert 150 DICOM as /base/Nifti/run002_heudiconv009 (64x64x34x150) 220728-10:22:26,611 nipype.interface INFO: stdout 2022-07-28T10:22:26.611109:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run002_heudiconv009.nii" INFO: stdout 2022-07-28T10:22:26.611109:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run002_heudiconv009.nii" 220728-10:22:26,611 nipype.interface INFO: stdout 2022-07-28T10:22:26.611109:Conversion required 0.609759 seconds (0.262371 for core code). INFO: stdout 2022-07-28T10:22:26.611109:Conversion required 0.609759 seconds (0.262371 for core code). 220728-10:22:26,642 nipype.workflow INFO: [Node] Finished "convert", elapsed time 0.674067s. INFO: [Node] Finished "convert", elapsed time 0.674067s. WARNING: Failed to get date/time for the content: 'FileDataset' object has no attribute 'AcquisitionDate' WARNING: Failed to detect fulfilled BIDS layout. No scans.tsv file(s) will be produced for /base/Nifti/run002.json WARNING: Failed to find task field in /base/Nifti/run002.json. 220728-10:22:26,751 nipype.workflow INFO: [Node] Setting-up "embedder" in "/tmp/embedmeta4kqyn7n2/embedder". INFO: [Node] Setting-up "embedder" in "/tmp/embedmeta4kqyn7n2/embedder". 220728-10:22:26,766 nipype.workflow INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function> INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function> 220728-10:22:27,502 nipype.workflow INFO: [Node] Finished "embedder", elapsed time 0.732021s. INFO: [Node] Finished "embedder", elapsed time 0.732021s. 220728-10:22:27,502 nipype.workflow WARNING: Storing result file without outputs WARNING: Storing result file without outputs 220728-10:22:27,504 nipype.workflow WARNING: [Node] Error on "embedder" (/tmp/embedmeta4kqyn7n2/embedder) WARNING: [Node] Error on "embedder" (/tmp/embedmeta4kqyn7n2/embedder) ERROR: Embedding failed: Exception raised while executing Node embedder.
Traceback (most recent call last):
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 398, in run
runtime = self._run_interface(runtime)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
out = function_handle(**args)
File "
INFO: Post-treating /base/Nifti/run002.json file INFO: Converting /base/Nifti/run003 (250 DICOMs) -> /base/Nifti . Converter: dcm2niix . Output types: ('nii.gz',) 220728-10:22:27,519 nipype.workflow INFO: [Node] Setting-up "convert" in "/tmp/dcm2niix5jvtjdxv/convert". INFO: [Node] Setting-up "convert" in "/tmp/dcm2niix5jvtjdxv/convert". 220728-10:22:27,621 nipype.workflow INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix> INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix> 220728-10:22:28,296 nipype.interface INFO: stdout 2022-07-28T10:22:28.296722:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux) INFO: stdout 2022-07-28T10:22:28.296722:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux) 220728-10:22:28,297 nipype.interface INFO: stdout 2022-07-28T10:22:28.296722:Found 250 DICOM file(s) INFO: stdout 2022-07-28T10:22:28.296722:Found 250 DICOM file(s) 220728-10:22:28,297 nipype.interface INFO: stdout 2022-07-28T10:22:28.296722:Warning: Siemens XA exported as classic not enhanced DICOM (issue 236) INFO: stdout 2022-07-28T10:22:28.296722:Warning: Siemens XA exported as classic not enhanced DICOM (issue 236) 220728-10:22:28,297 nipype.interface INFO: stdout 2022-07-28T10:22:28.296722:Convert 250 DICOM as /base/Nifti/run003_heudiconv656 (96x96x72x250) INFO: stdout 2022-07-28T10:22:28.296722:Convert 250 DICOM as /base/Nifti/run003_heudiconv656 (96x96x72x250) 220728-10:22:30,492 nipype.interface INFO: stdout 2022-07-28T10:22:30.492121:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run003_heudiconv656.nii" INFO: stdout 2022-07-28T10:22:30.492121:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run003_heudiconv656.nii" 220728-10:22:30,492 nipype.interface INFO: stdout 2022-07-28T10:22:30.492121:Conversion required 2.843921 seconds (0.972939 for core code). INFO: stdout 2022-07-28T10:22:30.492121:Conversion required 2.843921 seconds (0.972939 for core code). 220728-10:22:30,526 nipype.workflow INFO: [Node] Finished "convert", elapsed time 2.903875s. INFO: [Node] Finished "convert", elapsed time 2.903875s. WARNING: Failed to get date/time for the content: 'FileDataset' object has no attribute 'AcquisitionDate' WARNING: Failed to detect fulfilled BIDS layout. No scans.tsv file(s) will be produced for /base/Nifti/run003.json WARNING: Failed to find task field in /base/Nifti/run003.json. 220728-10:22:30,717 nipype.workflow INFO: [Node] Setting-up "embedder" in "/tmp/embedmetabnzc_gr7/embedder". INFO: [Node] Setting-up "embedder" in "/tmp/embedmetabnzc_gr7/embedder". 220728-10:22:30,745 nipype.workflow INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function> INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function> 220728-10:22:32,168 nipype.workflow INFO: [Node] Finished "embedder", elapsed time 1.417462s. INFO: [Node] Finished "embedder", elapsed time 1.417462s. 220728-10:22:32,168 nipype.workflow WARNING: Storing result file without outputs WARNING: Storing result file without outputs 220728-10:22:32,169 nipype.workflow WARNING: [Node] Error on "embedder" (/tmp/embedmetabnzc_gr7/embedder) WARNING: [Node] Error on "embedder" (/tmp/embedmetabnzc_gr7/embedder) ERROR: Embedding failed: Exception raised while executing Node embedder.
Traceback (most recent call last):
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 398, in run
runtime = self._run_interface(runtime)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
out = function_handle(**args)
File "
INFO: Post-treating /base/Nifti/run003.json file INFO: Converting /base/Nifti/run004 (250 DICOMs) -> /base/Nifti . Converter: dcm2niix . Output types: ('nii.gz',) 220728-10:22:32,182 nipype.workflow INFO: [Node] Setting-up "convert" in "/tmp/dcm2niix3ggtfwkq/convert". INFO: [Node] Setting-up "convert" in "/tmp/dcm2niix3ggtfwkq/convert". 220728-10:22:32,284 nipype.workflow INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix> INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix> 220728-10:22:32,776 nipype.interface INFO: stdout 2022-07-28T10:22:32.776504:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux) INFO: stdout 2022-07-28T10:22:32.776504:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux) 220728-10:22:32,776 nipype.interface INFO: stdout 2022-07-28T10:22:32.776504:Found 250 DICOM file(s) INFO: stdout 2022-07-28T10:22:32.776504:Found 250 DICOM file(s) 220728-10:22:32,777 nipype.interface INFO: stdout 2022-07-28T10:22:32.776504:Warning: Siemens XA exported as classic not enhanced DICOM (issue 236) INFO: stdout 2022-07-28T10:22:32.776504:Warning: Siemens XA exported as classic not enhanced DICOM (issue 236) 220728-10:22:32,777 nipype.interface INFO: stdout 2022-07-28T10:22:32.776504:Convert 250 DICOM as /base/Nifti/run004_heudiconv725 (88x88x60x250) INFO: stdout 2022-07-28T10:22:32.776504:Convert 250 DICOM as /base/Nifti/run004_heudiconv725 (88x88x60x250) 220728-10:22:34,416 nipype.interface INFO: stdout 2022-07-28T10:22:34.415986:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run004_heudiconv725.nii" INFO: stdout 2022-07-28T10:22:34.415986:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run004_heudiconv725.nii" 220728-10:22:34,416 nipype.interface INFO: stdout 2022-07-28T10:22:34.415986:Conversion required 2.102351 seconds (0.775011 for core code). INFO: stdout 2022-07-28T10:22:34.415986:Conversion required 2.102351 seconds (0.775011 for core code). 220728-10:22:34,451 nipype.workflow INFO: [Node] Finished "convert", elapsed time 2.16637s. INFO: [Node] Finished "convert", elapsed time 2.16637s. WARNING: Failed to get date/time for the content: 'FileDataset' object has no attribute 'AcquisitionDate' WARNING: Failed to detect fulfilled BIDS layout. No scans.tsv file(s) will be produced for /base/Nifti/run004.json WARNING: Failed to find task field in /base/Nifti/run004.json. 220728-10:22:34,617 nipype.workflow INFO: [Node] Setting-up "embedder" in "/tmp/embedmeta7qi24fez/embedder". INFO: [Node] Setting-up "embedder" in "/tmp/embedmeta7qi24fez/embedder". 220728-10:22:34,639 nipype.workflow INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function> INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function> 220728-10:22:35,857 nipype.workflow INFO: [Node] Finished "embedder", elapsed time 1.2140360000000001s. INFO: [Node] Finished "embedder", elapsed time 1.2140360000000001s. 220728-10:22:35,857 nipype.workflow WARNING: Storing result file without outputs WARNING: Storing result file without outputs 220728-10:22:35,858 nipype.workflow WARNING: [Node] Error on "embedder" (/tmp/embedmeta7qi24fez/embedder) WARNING: [Node] Error on "embedder" (/tmp/embedmeta7qi24fez/embedder) ERROR: Embedding failed: Exception raised while executing Node embedder.
Traceback (most recent call last):
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 398, in run
runtime = self._run_interface(runtime)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
out = function_handle(**args)
File "
INFO: Post-treating /base/Nifti/run004.json file INFO: Converting /base/Nifti/run005 (1 DICOMs) -> /base/Nifti . Converter: dcm2niix . Output types: ('nii.gz',) 220728-10:22:35,861 nipype.workflow INFO: [Node] Setting-up "convert" in "/tmp/dcm2niixm420xvfw/convert". INFO: [Node] Setting-up "convert" in "/tmp/dcm2niixm420xvfw/convert". 220728-10:22:35,864 nipype.workflow INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix> INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix> 220728-10:22:35,997 nipype.interface INFO: stdout 2022-07-28T10:22:35.996833:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux) INFO: stdout 2022-07-28T10:22:35.996833:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux) 220728-10:22:35,997 nipype.interface INFO: stdout 2022-07-28T10:22:35.996833:Found 1 DICOM file(s) INFO: stdout 2022-07-28T10:22:35.996833:Found 1 DICOM file(s) 220728-10:22:35,997 nipype.interface INFO: stdout 2022-07-28T10:22:35.996833:Warning: Siemens XA DICOM inadequate for robust conversion (issue 236) INFO: stdout 2022-07-28T10:22:35.996833:Warning: Siemens XA DICOM inadequate for robust conversion (issue 236) 220728-10:22:35,997 nipype.interface INFO: stdout 2022-07-28T10:22:35.996833:Convert 1 DICOM as /base/Nifti/run005_heudiconv956 (320x320x240x1) INFO: stdout 2022-07-28T10:22:35.996833:Convert 1 DICOM as /base/Nifti/run005_heudiconv956 (320x320x240x1) 220728-10:22:36,667 nipype.interface INFO: stdout 2022-07-28T10:22:36.667109:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run005_heudiconv956.nii" INFO: stdout 2022-07-28T10:22:36.667109:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run005_heudiconv956.nii" 220728-10:22:36,667 nipype.interface INFO: stdout 2022-07-28T10:22:36.667109:Conversion required 0.770769 seconds (0.381106 for core code). INFO: stdout 2022-07-28T10:22:36.667109:Conversion required 0.770769 seconds (0.381106 for core code). 220728-10:22:36,698 nipype.workflow INFO: [Node] Finished "convert", elapsed time 0.832814s. INFO: [Node] Finished "convert", elapsed time 0.832814s. WARNING: Failed to get date/time for the content: 'FileDataset' object has no attribute 'AcquisitionDate' WARNING: Failed to detect fulfilled BIDS layout. No scans.tsv file(s) will be produced for /base/Nifti/run005.json WARNING: Failed to find task field in /base/Nifti/run005.json. 220728-10:22:37,232 nipype.workflow INFO: [Node] Setting-up "embedder" in "/tmp/embedmetaupo12nbg/embedder". INFO: [Node] Setting-up "embedder" in "/tmp/embedmetaupo12nbg/embedder". 220728-10:22:37,236 nipype.workflow INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function> INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function> 220728-10:22:39,567 nipype.workflow INFO: [Node] Finished "embedder", elapsed time 2.318675s. INFO: [Node] Finished "embedder", elapsed time 2.318675s. 220728-10:22:39,567 nipype.workflow WARNING: Storing result file without outputs WARNING: Storing result file without outputs 220728-10:22:39,568 nipype.workflow WARNING: [Node] Error on "embedder" (/tmp/embedmetaupo12nbg/embedder) WARNING: [Node] Error on "embedder" (/tmp/embedmetaupo12nbg/embedder) ERROR: Embedding failed: Exception raised while executing Node embedder.
Traceback (most recent call last):
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 398, in run
runtime = self._run_interface(runtime)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
out = function_handle(**args)
File "
INFO: Post-treating /base/Nifti/run005.json file INFO: Converting /base/Nifti/run006 (1 DICOMs) -> /base/Nifti . Converter: dcm2niix . Output types: ('nii.gz',) 220728-10:22:39,570 nipype.workflow INFO: [Node] Setting-up "convert" in "/tmp/dcm2niixq8sq0v63/convert". INFO: [Node] Setting-up "convert" in "/tmp/dcm2niixq8sq0v63/convert". 220728-10:22:39,573 nipype.workflow INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix> INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix> 220728-10:22:39,681 nipype.interface INFO: stdout 2022-07-28T10:22:39.680883:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux) INFO: stdout 2022-07-28T10:22:39.680883:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux) 220728-10:22:39,681 nipype.interface INFO: stdout 2022-07-28T10:22:39.680883:Found 1 DICOM file(s) INFO: stdout 2022-07-28T10:22:39.680883:Found 1 DICOM file(s) 220728-10:22:39,681 nipype.interface INFO: stdout 2022-07-28T10:22:39.680883:Warning: Siemens XA DICOM inadequate for robust conversion (issue 236) INFO: stdout 2022-07-28T10:22:39.680883:Warning: Siemens XA DICOM inadequate for robust conversion (issue 236) 220728-10:22:39,681 nipype.interface INFO: stdout 2022-07-28T10:22:39.680883:Convert 1 DICOM as /base/Nifti/run006_heudiconv410 (320x320x240x1) INFO: stdout 2022-07-28T10:22:39.680883:Convert 1 DICOM as /base/Nifti/run006_heudiconv410 (320x320x240x1) 220728-10:22:40,259 nipype.interface INFO: stdout 2022-07-28T10:22:40.259312:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run006_heudiconv410.nii" INFO: stdout 2022-07-28T10:22:40.259312:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run006_heudiconv410.nii" 220728-10:22:40,259 nipype.interface INFO: stdout 2022-07-28T10:22:40.259312:Conversion required 0.659529 seconds (0.307386 for core code). INFO: stdout 2022-07-28T10:22:40.259312:Conversion required 0.659529 seconds (0.307386 for core code). 220728-10:22:40,290 nipype.workflow INFO: [Node] Finished "convert", elapsed time 0.715959s. INFO: [Node] Finished "convert", elapsed time 0.715959s. WARNING: Failed to get date/time for the content: 'FileDataset' object has no attribute 'AcquisitionDate' WARNING: Failed to detect fulfilled BIDS layout. No scans.tsv file(s) will be produced for /base/Nifti/run006.json WARNING: Failed to find task field in /base/Nifti/run006.json. 220728-10:22:40,828 nipype.workflow INFO: [Node] Setting-up "embedder" in "/tmp/embedmetaqn1dvznt/embedder". INFO: [Node] Setting-up "embedder" in "/tmp/embedmetaqn1dvznt/embedder". 220728-10:22:40,832 nipype.workflow INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function> INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function> 220728-10:22:43,165 nipype.workflow INFO: [Node] Finished "embedder", elapsed time 2.321952s. INFO: [Node] Finished "embedder", elapsed time 2.321952s. 220728-10:22:43,166 nipype.workflow WARNING: Storing result file without outputs WARNING: Storing result file without outputs 220728-10:22:43,167 nipype.workflow WARNING: [Node] Error on "embedder" (/tmp/embedmetaqn1dvznt/embedder) WARNING: [Node] Error on "embedder" (/tmp/embedmetaqn1dvznt/embedder) ERROR: Embedding failed: Exception raised while executing Node embedder.
Traceback (most recent call last):
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 398, in run
runtime = self._run_interface(runtime)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
out = function_handle(**args)
File "
INFO: Post-treating /base/Nifti/run006.json file
INFO: Converting /base/Nifti/run007 (6 DICOMs) -> /base/Nifti . Converter: dcm2niix . Output types: ('nii.gz',)
220728-10:22:43,170 nipype.workflow INFO:
[Node] Setting-up "convert" in "/tmp/dcm2niix14f44cdb/convert".
INFO: [Node] Setting-up "convert" in "/tmp/dcm2niix14f44cdb/convert".
220728-10:22:43,175 nipype.workflow INFO:
[Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
220728-10:22:43,208 nipype.interface INFO:
stdout 2022-07-28T10:22:43.208850:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux)
INFO: stdout 2022-07-28T10:22:43.208850:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux)
220728-10:22:43,209 nipype.interface INFO:
stdout 2022-07-28T10:22:43.208850:Found 6 DICOM file(s)
INFO: stdout 2022-07-28T10:22:43.208850:Found 6 DICOM file(s)
220728-10:22:43,209 nipype.interface INFO:
stdout 2022-07-28T10:22:43.208850:No valid DICOM images were found
INFO: stdout 2022-07-28T10:22:43.208850:No valid DICOM images were found
220728-10:22:43,237 nipype.workflow INFO:
[Node] Finished "convert", elapsed time 0.061974s.
INFO: [Node] Finished "convert", elapsed time 0.061974s.
220728-10:22:43,239 nipype.workflow WARNING:
[Node] Error on "convert" (/tmp/dcm2niix14f44cdb/convert)
WARNING: [Node] Error on "convert" (/tmp/dcm2niix14f44cdb/convert)
Traceback (most recent call last):
File "/opt/miniconda-latest/bin/heudiconv", line 33, in
RuntimeError: subprocess exited with code 2.
Platform details:
Choose one:
- [ ] Local environment
- [ nipy/heudiconv:latest] Container
- Heudiconv version: 0.11.3+d20220512
Hi @marcomeixner,
Can you please try to run:
sudo docker run --rm -it -v /media/SamSSD/QA_temp:/base nipy/heudiconv:latest -d /base/Dicom/sub-{subject}/ses-{session}/SCANS/3/DICOM/*.dcm -o /base/Nifti/ -f /base/Nifti/code/heuristic.py -s 01 -ss 001 -c dcm2niix -b --overwrite
or, if the folder name between SCANS
and DICOM
in the path might differ from subject to subject:
sudo docker run --rm -it -v /media/SamSSD/QA_temp:/base nipy/heudiconv:latest -d /base/Dicom/sub-{subject}/ses-{session}/SCANS/*/DICOM/*.dcm -o /base/Nifti/ -f /base/Nifti/code/heuristic.py -s 01 -ss 001 -c dcm2niix -b --overwrite
Thank you for your quick reply. My answer comes late due to my summer holidays..
Also, sorry for the obvious error in my bash command above.
Weirdly, both of your suggestions lead to the same error code 2 as before - see below.
Thanks a lot and have a nice weekend!
long dump of execution with all gory details and more exceptions logged -- click to expand
user@user-X9DAi:~$ sudo docker run --rm -it -v /media/SamSSD/QA_temp:/base nipy/heudiconv:latest -d /base/Dicom/sub-{subject}/ses-{session}/SCANS/3/DICOM/*.dcm -o /base/Nifti/ -f /base/Nifti/code/heuristic.py -s 01 -ss 001 -c dcm2niix -b --overwrite
WARNING: Could not check for version updates: Connection to server could not be made
INFO: Running heudiconv version 0.11.3+d20220512 latest Unknown
INFO: Need to process 1 study sessions
INFO: PROCESSING STARTS: {'subject': '01', 'outdir': '/base/Nifti/', 'session': '001'}
INFO: Processing 660 dicoms
INFO: Reloading existing filegroup.json because /base/Nifti/.heudiconv/01/ses-001/info/01_ses-001.edit.txt exists
INFO: Doing conversion using dcm2niix
INFO: Converting /base/Nifti/run001 (2 DICOMs) -> /base/Nifti . Converter: dcm2niix . Output types: ('nii.gz',)
220826-10:36:38,472 nipype.workflow INFO:
[Node] Setting-up "convert" in "/tmp/dcm2niix_15weckd/convert".
INFO: [Node] Setting-up "convert" in "/tmp/dcm2niix_15weckd/convert".
220826-10:36:38,481 nipype.workflow INFO:
[Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
220826-10:36:43,588 nipype.interface INFO:
stdout 2022-08-26T10:36:43.588386:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux)
INFO: stdout 2022-08-26T10:36:43.588386:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux)
220826-10:36:43,588 nipype.interface INFO:
stdout 2022-08-26T10:36:43.588386:Found 2 DICOM file(s)
INFO: stdout 2022-08-26T10:36:43.588386:Found 2 DICOM file(s)
220826-10:36:43,588 nipype.interface INFO:
stdout 2022-08-26T10:36:43.588386:slice orientation varies (localizer?) [0 1 0 0 0 -1] != [1 0 0 0 0 -1]
INFO: stdout 2022-08-26T10:36:43.588386:slice orientation varies (localizer?) [0 1 0 0 0 -1] != [1 0 0 0 0 -1]
220826-10:36:43,589 nipype.interface INFO:
stdout 2022-08-26T10:36:43.588386:Warning: Slice timing appears corrupted (range 0..6990, TR=7.5 ms)
INFO: stdout 2022-08-26T10:36:43.588386:Warning: Slice timing appears corrupted (range 0..6990, TR=7.5 ms)
220826-10:36:43,589 nipype.interface INFO:
stdout 2022-08-26T10:36:43.588386:Warning: Siemens XA DICOM inadequate for robust conversion (issue 236)
INFO: stdout 2022-08-26T10:36:43.588386:Warning: Siemens XA DICOM inadequate for robust conversion (issue 236)
220826-10:36:43,589 nipype.interface INFO:
stdout 2022-08-26T10:36:43.588386:Convert 1 DICOM as /base/Nifti/run001_heudiconv930 (512x512x2x1)
INFO: stdout 2022-08-26T10:36:43.588386:Convert 1 DICOM as /base/Nifti/run001_heudiconv930 (512x512x2x1)
220826-10:36:43,673 nipype.interface INFO:
stdout 2022-08-26T10:36:43.672989:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run001_heudiconv930.nii"
INFO: stdout 2022-08-26T10:36:43.672989:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run001_heudiconv930.nii"
220826-10:36:43,673 nipype.interface INFO:
stdout 2022-08-26T10:36:43.672989:Warning: Siemens XA DICOM inadequate for robust conversion (issue 236)
INFO: stdout 2022-08-26T10:36:43.672989:Warning: Siemens XA DICOM inadequate for robust conversion (issue 236)
220826-10:36:43,673 nipype.interface INFO:
stdout 2022-08-26T10:36:43.672989:Convert 1 DICOM as /base/Nifti/run001_heudiconv930a (512x512x1x1)
INFO: stdout 2022-08-26T10:36:43.672989:Convert 1 DICOM as /base/Nifti/run001_heudiconv930a (512x512x1x1)
220826-10:36:43,691 nipype.interface INFO:
stdout 2022-08-26T10:36:43.691151:Warning: Check that 2D images are not mirrored.
INFO: stdout 2022-08-26T10:36:43.691151:Warning: Check that 2D images are not mirrored.
220826-10:36:43,691 nipype.interface INFO:
stdout 2022-08-26T10:36:43.691151:Compress: "/usr/bin/pigz" -n -f -6 "/base/Nifti/run001_heudiconv930a.nii"
INFO: stdout 2022-08-26T10:36:43.691151:Compress: "/usr/bin/pigz" -n -f -6 "/base/Nifti/run001_heudiconv930a.nii"
220826-10:36:43,691 nipype.interface INFO:
stdout 2022-08-26T10:36:43.691151:Conversion required 0.110924 seconds (0.012031 for core code).
INFO: stdout 2022-08-26T10:36:43.691151:Conversion required 0.110924 seconds (0.012031 for core code).
220826-10:36:43,716 nipype.workflow INFO:
[Node] Finished "convert", elapsed time 0.166646s.
INFO: [Node] Finished "convert", elapsed time 0.166646s.
WARNING: Failed to get date/time for the content: 'FileDataset' object has no attribute 'AcquisitionDate'
WARNING: Failed to detect fulfilled BIDS layout. No scans.tsv file(s) will be produced for /base/Nifti/run0011.json, /base/Nifti/run0012.json
WARNING: Failed to find task field in /base/Nifti/run0011.json.
WARNING: Failed to find task field in /base/Nifti/run0012.json.
WARNING: For now not embedding BIDS and info generated .nii.gz itself since sequence produced multiple files
INFO: Converting /base/Nifti/run002 (150 DICOMs) -> /base/Nifti . Converter: dcm2niix . Output types: ('nii.gz',)
220826-10:36:48,764 nipype.workflow INFO:
[Node] Setting-up "convert" in "/tmp/dcm2niixcy078yof/convert".
INFO: [Node] Setting-up "convert" in "/tmp/dcm2niixcy078yof/convert".
220826-10:36:48,842 nipype.workflow INFO:
[Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
220826-10:36:49,72 nipype.interface INFO:
stdout 2022-08-26T10:36:49.071837:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux)
INFO: stdout 2022-08-26T10:36:49.071837:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux)
220826-10:36:49,72 nipype.interface INFO:
stdout 2022-08-26T10:36:49.071837:Found 150 DICOM file(s)
INFO: stdout 2022-08-26T10:36:49.071837:Found 150 DICOM file(s)
220826-10:36:49,72 nipype.interface INFO:
stdout 2022-08-26T10:36:49.071837:Warning: Siemens XA exported as classic not enhanced DICOM (issue 236)
INFO: stdout 2022-08-26T10:36:49.071837:Warning: Siemens XA exported as classic not enhanced DICOM (issue 236)
220826-10:36:49,72 nipype.interface INFO:
stdout 2022-08-26T10:36:49.071837:Convert 150 DICOM as /base/Nifti/run002_heudiconv298 (64x64x34x150)
INFO: stdout 2022-08-26T10:36:49.071837:Convert 150 DICOM as /base/Nifti/run002_heudiconv298 (64x64x34x150)
220826-10:36:49,473 nipype.interface INFO:
stdout 2022-08-26T10:36:49.473546:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run002_heudiconv298.nii"
INFO: stdout 2022-08-26T10:36:49.473546:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run002_heudiconv298.nii"
220826-10:36:49,473 nipype.interface INFO:
stdout 2022-08-26T10:36:49.473546:Conversion required 0.602422 seconds (0.247698 for core code).
INFO: stdout 2022-08-26T10:36:49.473546:Conversion required 0.602422 seconds (0.247698 for core code).
220826-10:36:49,496 nipype.workflow INFO:
[Node] Finished "convert", elapsed time 0.652678s.
INFO: [Node] Finished "convert", elapsed time 0.652678s.
WARNING: Failed to get date/time for the content: 'FileDataset' object has no attribute 'AcquisitionDate'
WARNING: Failed to detect fulfilled BIDS layout. No scans.tsv file(s) will be produced for /base/Nifti/run002.json
WARNING: Failed to find task field in /base/Nifti/run002.json.
220826-10:36:54,619 nipype.workflow INFO:
[Node] Setting-up "embedder" in "/tmp/embedmetaj5o5avau/embedder".
INFO: [Node] Setting-up "embedder" in "/tmp/embedmetaj5o5avau/embedder".
220826-10:36:54,638 nipype.workflow INFO:
[Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
220826-10:36:55,547 nipype.workflow INFO:
[Node] Finished "embedder", elapsed time 0.905233s.
INFO: [Node] Finished "embedder", elapsed time 0.905233s.
220826-10:36:55,548 nipype.workflow WARNING:
Storing result file without outputs
WARNING: Storing result file without outputs
220826-10:36:55,549 nipype.workflow WARNING:
[Node] Error on "embedder" (/tmp/embedmetaj5o5avau/embedder)
WARNING: [Node] Error on "embedder" (/tmp/embedmetaj5o5avau/embedder)
ERROR: Embedding failed: Exception raised while executing Node embedder.
Traceback (most recent call last):
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 398, in run
runtime = self._run_interface(runtime)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
out = function_handle(**args)
File "<string>", line 28, in embed_dicom_and_nifti_metadata
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmstack.py", line 1223, in parse_and_stack
warn_on_except)
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmstack.py", line 1147, in parse_and_group
if not np.allclose(c_val, close_list[c_idx], atol=5e-5):
File "<__array_function__ internals>", line 6, in allclose
File "/opt/miniconda-latest/lib/python3.7/site-packages/numpy/core/numeric.py", line 2256, in allclose
res = all(isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan))
File "<__array_function__ internals>", line 6, in isclose
File "/opt/miniconda-latest/lib/python3.7/site-packages/numpy/core/numeric.py", line 2362, in isclose
xfin = isfinite(x)
TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
INFO: Post-treating /base/Nifti/run002.json file
INFO: Converting /base/Nifti/run003 (250 DICOMs) -> /base/Nifti . Converter: dcm2niix . Output types: ('nii.gz',)
220826-10:37:00,581 nipype.workflow INFO:
[Node] Setting-up "convert" in "/tmp/dcm2niixkc0ijfdq/convert".
INFO: [Node] Setting-up "convert" in "/tmp/dcm2niixkc0ijfdq/convert".
220826-10:37:00,709 nipype.workflow INFO:
[Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
220826-10:37:01,491 nipype.interface INFO:
stdout 2022-08-26T10:37:01.490903:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux)
INFO: stdout 2022-08-26T10:37:01.490903:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux)
220826-10:37:01,491 nipype.interface INFO:
stdout 2022-08-26T10:37:01.490903:Found 250 DICOM file(s)
INFO: stdout 2022-08-26T10:37:01.490903:Found 250 DICOM file(s)
220826-10:37:01,491 nipype.interface INFO:
stdout 2022-08-26T10:37:01.490903:Warning: Siemens XA exported as classic not enhanced DICOM (issue 236)
INFO: stdout 2022-08-26T10:37:01.490903:Warning: Siemens XA exported as classic not enhanced DICOM (issue 236)
220826-10:37:01,491 nipype.interface INFO:
stdout 2022-08-26T10:37:01.490903:Convert 250 DICOM as /base/Nifti/run003_heudiconv681 (96x96x72x250)
INFO: stdout 2022-08-26T10:37:01.490903:Convert 250 DICOM as /base/Nifti/run003_heudiconv681 (96x96x72x250)
220826-10:37:03,765 nipype.interface INFO:
stdout 2022-08-26T10:37:03.764957:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run003_heudiconv681.nii"
INFO: stdout 2022-08-26T10:37:03.764957:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run003_heudiconv681.nii"
220826-10:37:03,765 nipype.interface INFO:
stdout 2022-08-26T10:37:03.764957:Conversion required 3.028852 seconds (1.145580 for core code).
INFO: stdout 2022-08-26T10:37:03.764957:Conversion required 3.028852 seconds (1.145580 for core code).
220826-10:37:03,789 nipype.workflow INFO:
[Node] Finished "convert", elapsed time 3.079566s.
INFO: [Node] Finished "convert", elapsed time 3.079566s.
WARNING: Failed to get date/time for the content: 'FileDataset' object has no attribute 'AcquisitionDate'
WARNING: Failed to detect fulfilled BIDS layout. No scans.tsv file(s) will be produced for /base/Nifti/run003.json
WARNING: Failed to find task field in /base/Nifti/run003.json.
220826-10:37:09,0 nipype.workflow INFO:
[Node] Setting-up "embedder" in "/tmp/embedmeta7vshkgup/embedder".
INFO: [Node] Setting-up "embedder" in "/tmp/embedmeta7vshkgup/embedder".
220826-10:37:09,28 nipype.workflow INFO:
[Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
220826-10:37:10,532 nipype.workflow INFO:
[Node] Finished "embedder", elapsed time 1.499774s.
INFO: [Node] Finished "embedder", elapsed time 1.499774s.
220826-10:37:10,532 nipype.workflow WARNING:
Storing result file without outputs
WARNING: Storing result file without outputs
220826-10:37:10,534 nipype.workflow WARNING:
[Node] Error on "embedder" (/tmp/embedmeta7vshkgup/embedder)
WARNING: [Node] Error on "embedder" (/tmp/embedmeta7vshkgup/embedder)
ERROR: Embedding failed: Exception raised while executing Node embedder.
Traceback (most recent call last):
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 398, in run
runtime = self._run_interface(runtime)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
out = function_handle(**args)
File "<string>", line 28, in embed_dicom_and_nifti_metadata
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmstack.py", line 1223, in parse_and_stack
warn_on_except)
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmstack.py", line 1147, in parse_and_group
if not np.allclose(c_val, close_list[c_idx], atol=5e-5):
File "<__array_function__ internals>", line 6, in allclose
File "/opt/miniconda-latest/lib/python3.7/site-packages/numpy/core/numeric.py", line 2256, in allclose
res = all(isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan))
File "<__array_function__ internals>", line 6, in isclose
File "/opt/miniconda-latest/lib/python3.7/site-packages/numpy/core/numeric.py", line 2362, in isclose
xfin = isfinite(x)
TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
INFO: Post-treating /base/Nifti/run003.json file
INFO: Converting /base/Nifti/run004 (250 DICOMs) -> /base/Nifti . Converter: dcm2niix . Output types: ('nii.gz',)
220826-10:37:15,562 nipype.workflow INFO:
[Node] Setting-up "convert" in "/tmp/dcm2niix00bwqs5w/convert".
INFO: [Node] Setting-up "convert" in "/tmp/dcm2niix00bwqs5w/convert".
220826-10:37:15,713 nipype.workflow INFO:
[Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
220826-10:37:16,300 nipype.interface INFO:
stdout 2022-08-26T10:37:16.300700:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux)
INFO: stdout 2022-08-26T10:37:16.300700:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux)
220826-10:37:16,301 nipype.interface INFO:
stdout 2022-08-26T10:37:16.300700:Found 250 DICOM file(s)
INFO: stdout 2022-08-26T10:37:16.300700:Found 250 DICOM file(s)
220826-10:37:16,301 nipype.interface INFO:
stdout 2022-08-26T10:37:16.300700:Warning: Siemens XA exported as classic not enhanced DICOM (issue 236)
INFO: stdout 2022-08-26T10:37:16.300700:Warning: Siemens XA exported as classic not enhanced DICOM (issue 236)
220826-10:37:16,301 nipype.interface INFO:
stdout 2022-08-26T10:37:16.300700:Convert 250 DICOM as /base/Nifti/run004_heudiconv648 (88x88x60x250)
INFO: stdout 2022-08-26T10:37:16.300700:Convert 250 DICOM as /base/Nifti/run004_heudiconv648 (88x88x60x250)
220826-10:37:17,858 nipype.interface INFO:
stdout 2022-08-26T10:37:17.858812:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run004_heudiconv648.nii"
INFO: stdout 2022-08-26T10:37:17.858812:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run004_heudiconv648.nii"
220826-10:37:17,859 nipype.interface INFO:
stdout 2022-08-26T10:37:17.858812:Conversion required 2.112416 seconds (0.787218 for core code).
INFO: stdout 2022-08-26T10:37:17.858812:Conversion required 2.112416 seconds (0.787218 for core code).
220826-10:37:17,887 nipype.workflow INFO:
[Node] Finished "convert", elapsed time 2.172682s.
INFO: [Node] Finished "convert", elapsed time 2.172682s.
WARNING: Failed to get date/time for the content: 'FileDataset' object has no attribute 'AcquisitionDate'
WARNING: Failed to detect fulfilled BIDS layout. No scans.tsv file(s) will be produced for /base/Nifti/run004.json
WARNING: Failed to find task field in /base/Nifti/run004.json.
220826-10:37:23,60 nipype.workflow INFO:
[Node] Setting-up "embedder" in "/tmp/embedmetazmtxer1v/embedder".
INFO: [Node] Setting-up "embedder" in "/tmp/embedmetazmtxer1v/embedder".
220826-10:37:23,93 nipype.workflow INFO:
[Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
220826-10:37:24,284 nipype.workflow INFO:
[Node] Finished "embedder", elapsed time 1.188186s.
INFO: [Node] Finished "embedder", elapsed time 1.188186s.
220826-10:37:24,284 nipype.workflow WARNING:
Storing result file without outputs
WARNING: Storing result file without outputs
220826-10:37:24,286 nipype.workflow WARNING:
[Node] Error on "embedder" (/tmp/embedmetazmtxer1v/embedder)
WARNING: [Node] Error on "embedder" (/tmp/embedmetazmtxer1v/embedder)
ERROR: Embedding failed: Exception raised while executing Node embedder.
Traceback (most recent call last):
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 398, in run
runtime = self._run_interface(runtime)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
out = function_handle(**args)
File "<string>", line 28, in embed_dicom_and_nifti_metadata
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmstack.py", line 1223, in parse_and_stack
warn_on_except)
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmstack.py", line 1147, in parse_and_group
if not np.allclose(c_val, close_list[c_idx], atol=5e-5):
File "<__array_function__ internals>", line 6, in allclose
File "/opt/miniconda-latest/lib/python3.7/site-packages/numpy/core/numeric.py", line 2256, in allclose
res = all(isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan))
File "<__array_function__ internals>", line 6, in isclose
File "/opt/miniconda-latest/lib/python3.7/site-packages/numpy/core/numeric.py", line 2362, in isclose
xfin = isfinite(x)
TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
INFO: Post-treating /base/Nifti/run004.json file
INFO: Converting /base/Nifti/run005 (1 DICOMs) -> /base/Nifti . Converter: dcm2niix . Output types: ('nii.gz',)
220826-10:37:29,302 nipype.workflow INFO:
[Node] Setting-up "convert" in "/tmp/dcm2niixhcq_4u8_/convert".
INFO: [Node] Setting-up "convert" in "/tmp/dcm2niixhcq_4u8_/convert".
220826-10:37:29,311 nipype.workflow INFO:
[Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
220826-10:37:29,446 nipype.interface INFO:
stdout 2022-08-26T10:37:29.446415:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux)
INFO: stdout 2022-08-26T10:37:29.446415:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux)
220826-10:37:29,446 nipype.interface INFO:
stdout 2022-08-26T10:37:29.446415:Found 1 DICOM file(s)
INFO: stdout 2022-08-26T10:37:29.446415:Found 1 DICOM file(s)
220826-10:37:29,447 nipype.interface INFO:
stdout 2022-08-26T10:37:29.446415:Warning: Siemens XA DICOM inadequate for robust conversion (issue 236)
INFO: stdout 2022-08-26T10:37:29.446415:Warning: Siemens XA DICOM inadequate for robust conversion (issue 236)
220826-10:37:29,447 nipype.interface INFO:
stdout 2022-08-26T10:37:29.446415:Convert 1 DICOM as /base/Nifti/run005_heudiconv728 (320x320x240x1)
INFO: stdout 2022-08-26T10:37:29.446415:Convert 1 DICOM as /base/Nifti/run005_heudiconv728 (320x320x240x1)
220826-10:37:30,173 nipype.interface INFO:
stdout 2022-08-26T10:37:30.173431:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run005_heudiconv728.nii"
INFO: stdout 2022-08-26T10:37:30.173431:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run005_heudiconv728.nii"
220826-10:37:30,173 nipype.interface INFO:
stdout 2022-08-26T10:37:30.173431:Conversion required 0.834560 seconds (0.444138 for core code).
INFO: stdout 2022-08-26T10:37:30.173431:Conversion required 0.834560 seconds (0.444138 for core code).
220826-10:37:30,200 nipype.workflow INFO:
[Node] Finished "convert", elapsed time 0.887961s.
INFO: [Node] Finished "convert", elapsed time 0.887961s.
WARNING: Failed to get date/time for the content: 'FileDataset' object has no attribute 'AcquisitionDate'
WARNING: Failed to detect fulfilled BIDS layout. No scans.tsv file(s) will be produced for /base/Nifti/run005.json
WARNING: Failed to find task field in /base/Nifti/run005.json.
220826-10:37:35,739 nipype.workflow INFO:
[Node] Setting-up "embedder" in "/tmp/embedmeta1jxo14rw/embedder".
INFO: [Node] Setting-up "embedder" in "/tmp/embedmeta1jxo14rw/embedder".
220826-10:37:35,749 nipype.workflow INFO:
[Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
220826-10:37:38,56 nipype.workflow INFO:
[Node] Finished "embedder", elapsed time 2.295001s.
INFO: [Node] Finished "embedder", elapsed time 2.295001s.
220826-10:37:38,56 nipype.workflow WARNING:
Storing result file without outputs
WARNING: Storing result file without outputs
220826-10:37:38,58 nipype.workflow WARNING:
[Node] Error on "embedder" (/tmp/embedmeta1jxo14rw/embedder)
WARNING: [Node] Error on "embedder" (/tmp/embedmeta1jxo14rw/embedder)
ERROR: Embedding failed: Exception raised while executing Node embedder.
Traceback (most recent call last):
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 398, in run
runtime = self._run_interface(runtime)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
out = function_handle(**args)
File "<string>", line 28, in embed_dicom_and_nifti_metadata
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmstack.py", line 1226, in parse_and_stack
results[key] = stack_group(group, warn_on_except, **stack_args)
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmstack.py", line 1180, in stack_group
result.add_dcm(dcm, meta)
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmstack.py", line 605, in add_dcm
nii_wrp = NiftiWrapper.from_dicom_wrapper(dw, meta)
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmmeta.py", line 1561, in from_dicom_wrapper
result = klass(nii_img, make_empty=True)
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmmeta.py", line 1280, in __init__
self.meta_ext.check_valid()
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmmeta.py", line 307, in check_valid
'classification %s' % classes[0])
dcmstack.dcmmeta.InvalidExtensionError: The extension is not valid: Missing required base classification time
INFO: Post-treating /base/Nifti/run005.json file
INFO: Converting /base/Nifti/run006 (1 DICOMs) -> /base/Nifti . Converter: dcm2niix . Output types: ('nii.gz',)
220826-10:37:43,75 nipype.workflow INFO:
[Node] Setting-up "convert" in "/tmp/dcm2niix7ad9vbhn/convert".
INFO: [Node] Setting-up "convert" in "/tmp/dcm2niix7ad9vbhn/convert".
220826-10:37:43,84 nipype.workflow INFO:
[Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
220826-10:37:43,220 nipype.interface INFO:
stdout 2022-08-26T10:37:43.220730:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux)
INFO: stdout 2022-08-26T10:37:43.220730:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux)
220826-10:37:43,221 nipype.interface INFO:
stdout 2022-08-26T10:37:43.220730:Found 1 DICOM file(s)
INFO: stdout 2022-08-26T10:37:43.220730:Found 1 DICOM file(s)
220826-10:37:43,221 nipype.interface INFO:
stdout 2022-08-26T10:37:43.220730:Warning: Siemens XA DICOM inadequate for robust conversion (issue 236)
INFO: stdout 2022-08-26T10:37:43.220730:Warning: Siemens XA DICOM inadequate for robust conversion (issue 236)
220826-10:37:43,221 nipype.interface INFO:
stdout 2022-08-26T10:37:43.220730:Convert 1 DICOM as /base/Nifti/run006_heudiconv583 (320x320x240x1)
INFO: stdout 2022-08-26T10:37:43.220730:Convert 1 DICOM as /base/Nifti/run006_heudiconv583 (320x320x240x1)
220826-10:37:43,937 nipype.interface INFO:
stdout 2022-08-26T10:37:43.937257:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run006_heudiconv583.nii"
INFO: stdout 2022-08-26T10:37:43.937257:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "/base/Nifti/run006_heudiconv583.nii"
220826-10:37:43,937 nipype.interface INFO:
stdout 2022-08-26T10:37:43.937257:Conversion required 0.818812 seconds (0.427060 for core code).
INFO: stdout 2022-08-26T10:37:43.937257:Conversion required 0.818812 seconds (0.427060 for core code).
220826-10:37:43,965 nipype.workflow INFO:
[Node] Finished "convert", elapsed time 0.880408s.
INFO: [Node] Finished "convert", elapsed time 0.880408s.
WARNING: Failed to get date/time for the content: 'FileDataset' object has no attribute 'AcquisitionDate'
WARNING: Failed to detect fulfilled BIDS layout. No scans.tsv file(s) will be produced for /base/Nifti/run006.json
WARNING: Failed to find task field in /base/Nifti/run006.json.
220826-10:37:49,523 nipype.workflow INFO:
[Node] Setting-up "embedder" in "/tmp/embedmeta438zem2z/embedder".
INFO: [Node] Setting-up "embedder" in "/tmp/embedmeta438zem2z/embedder".
220826-10:37:49,532 nipype.workflow INFO:
[Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
INFO: [Node] Executing "embedder" <nipype.interfaces.utility.wrappers.Function>
220826-10:37:52,204 nipype.workflow INFO:
[Node] Finished "embedder", elapsed time 2.660348s.
INFO: [Node] Finished "embedder", elapsed time 2.660348s.
220826-10:37:52,204 nipype.workflow WARNING:
Storing result file without outputs
WARNING: Storing result file without outputs
220826-10:37:52,205 nipype.workflow WARNING:
[Node] Error on "embedder" (/tmp/embedmeta438zem2z/embedder)
WARNING: [Node] Error on "embedder" (/tmp/embedmeta438zem2z/embedder)
ERROR: Embedding failed: Exception raised while executing Node embedder.
Traceback (most recent call last):
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 398, in run
runtime = self._run_interface(runtime)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
out = function_handle(**args)
File "<string>", line 28, in embed_dicom_and_nifti_metadata
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmstack.py", line 1226, in parse_and_stack
results[key] = stack_group(group, warn_on_except, **stack_args)
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmstack.py", line 1180, in stack_group
result.add_dcm(dcm, meta)
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmstack.py", line 605, in add_dcm
nii_wrp = NiftiWrapper.from_dicom_wrapper(dw, meta)
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmmeta.py", line 1561, in from_dicom_wrapper
result = klass(nii_img, make_empty=True)
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmmeta.py", line 1280, in __init__
self.meta_ext.check_valid()
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmmeta.py", line 307, in check_valid
'classification %s' % classes[0])
dcmstack.dcmmeta.InvalidExtensionError: The extension is not valid: Missing required base classification time
INFO: Post-treating /base/Nifti/run006.json file
INFO: Converting /base/Nifti/run007 (6 DICOMs) -> /base/Nifti . Converter: dcm2niix . Output types: ('nii.gz',)
220826-10:37:57,223 nipype.workflow INFO:
[Node] Setting-up "convert" in "/tmp/dcm2niixubhc82sd/convert".
INFO: [Node] Setting-up "convert" in "/tmp/dcm2niixubhc82sd/convert".
220826-10:37:57,232 nipype.workflow INFO:
[Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
INFO: [Node] Executing "convert" <nipype.interfaces.dcm2nii.Dcm2niix>
220826-10:37:57,275 nipype.interface INFO:
stdout 2022-08-26T10:37:57.275838:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux)
INFO: stdout 2022-08-26T10:37:57.275838:Chris Rorden's dcm2niiX version v1.0.20211006 GCC10.2.1 x86-64 (64-bit Linux)
220826-10:37:57,276 nipype.interface INFO:
stdout 2022-08-26T10:37:57.275838:Found 6 DICOM file(s)
INFO: stdout 2022-08-26T10:37:57.275838:Found 6 DICOM file(s)
220826-10:37:57,276 nipype.interface INFO:
stdout 2022-08-26T10:37:57.275838:No valid DICOM images were found
INFO: stdout 2022-08-26T10:37:57.275838:No valid DICOM images were found
220826-10:37:57,304 nipype.workflow INFO:
[Node] Finished "convert", elapsed time 0.070445s.
INFO: [Node] Finished "convert", elapsed time 0.070445s.
220826-10:37:57,305 nipype.workflow WARNING:
[Node] Error on "convert" (/tmp/dcm2niixubhc82sd/convert)
WARNING: [Node] Error on "convert" (/tmp/dcm2niixubhc82sd/convert)
Traceback (most recent call last):
File "/opt/miniconda-latest/bin/heudiconv", line 33, in <module>
sys.exit(load_entry_point('heudiconv', 'console_scripts', 'heudiconv')())
File "/src/heudiconv/heudiconv/cli/run.py", line 24, in main
workflow(**kwargs)
File "/src/heudiconv/heudiconv/main.py", line 393, in workflow
grouping=grouping,)
File "/src/heudiconv/heudiconv/convert.py", line 217, in prep_conversion
dcmconfig=dcmconfig,)
File "/src/heudiconv/heudiconv/convert.py", line 532, in convert
bids_options, tmpdir, dcmconfig)
File "/src/heudiconv/heudiconv/convert.py", line 711, in nipype_convert
eg = convertnode.run()
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 524, in run
result = self._run_interface(execute=True)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 642, in _run_interface
return self._run_command(execute)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 751, in _run_command
f"Exception raised while executing Node {self.name}.\n\n{result.runtime.traceback}"
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node convert.
RuntimeError: subprocess exited with code 2.
PS edited by @yarikoptic to collapse details above.
The first error I spotted in above (now collapsed by default output) was
ERROR: Embedding failed: Exception raised while executing Node embedder.
Traceback (most recent call last):
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 398, in run
runtime = self._run_interface(runtime)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
out = function_handle(**args)
File "<string>", line 28, in embed_dicom_and_nifti_metadata
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmstack.py", line 1223, in parse_and_stack
warn_on_except)
File "/opt/miniconda-latest/lib/python3.7/site-packages/dcmstack/dcmstack.py", line 1147, in parse_and_group
if not np.allclose(c_val, close_list[c_idx], atol=5e-5):
File "<__array_function__ internals>", line 6, in allclose
File "/opt/miniconda-latest/lib/python3.7/site-packages/numpy/core/numeric.py", line 2256, in allclose
res = all(isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan))
File "<__array_function__ internals>", line 6, in isclose
File "/opt/miniconda-latest/lib/python3.7/site-packages/numpy/core/numeric.py", line 2362, in isclose
xfin = isfinite(x)
TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
so it is something interesting about this DICOMs which lead dcmstack to puke on them. Those dicoms aren't anywhere public right? You might be lucky to "avoid" it if you add --minmeta
option to your call.
Also when adding --minmeta I get the same error.
Might it be that I am applying heudiconv to phantom data?
You can find the data here: https://cloudstore.zih.tu-dresden.de/index.php/s/2NMeFqp3z4Hq46W
ok, for --minmeta
mode -- filed https://github.com/nipy/heudiconv/issues/588 . It is due to 6 DICOMs (didn't look inside what are they about, but likely not imaging data):
01305_20220726-.SR.Kopf_NIC_QA.99.1.2022.07.27.10.53.59.00.17625150.dcm
01305_20220726-.SR.Kopf_NIC_QA.99.3.2022.07.27.10.53.59.00.17625161.dcm
01305_20220726-.SR.Kopf_NIC_QA.99.3.2022.07.27.10.53.59.00.17625172.dcm
01305_20220726-.SR.Kopf_NIC_QA.99.4.2022.07.27.10.53.59.00.17625183.dcm
01305_20220726-.SR.Kopf_NIC_QA.99.5.2022.07.27.10.53.59.00.17625194.dcm
01305_20220726-.SR.Kopf_NIC_QA.99.6.2022.07.27.10.53.59.00.17625205.dcm
remove them and rerun with --minmeta
(after removing prior nifti/
output folder) and I get
(git-annex)lena:~/proj/heudiconv/dicoms/gh-582[master]
$> ls nifti
CHANGES dataset_description.json participants.tsv run0011.nii.gz run0012.nii.gz run002.nii.gz run003.nii.gz run004.nii.gz run005.nii.gz run006.nii.gz
README participants.json run0011.json run0012.json run002.json run003.json run004.json run005.json run006.json scans.json
As for other errors in non--minmeta mode:
- needs a release https://github.com/moloney/dcmstack/issues/75 to release RF for
.get_affine
->affine
- ... there is probably more, I will file/add here if not run out of time etc.
Yes, I get the same output, thank you!
But how do I now get to the BIDS folder structure?
Running the command without --minmeta does not seem to do the trick:
sudo docker run --rm -it -v /media/SamSSD/QA_temp:/base nipy/heudiconv:latest -d /base/Dicom/sub-{subject}/ses-{session}/SCANS/3/DICOM/*.dcm -o /base/Nifti/ -f /base/Nifti/code/heuristic.py -s 01 -ss 001 -c dcm2niix -b --overwrite
Again, thanks a lot!
But how do I now get to the BIDS folder structure?
it is for your heuristic to establish! look at other heuristics for examples https://github.com/nipy/heudiconv/tree/master/heudiconv/heuristics . A possible alternative is to remap into reproin convention and use reproin heuristic, see e.g. https://github.com/ReproNim/reproin/issues/18#issuecomment-834598084