# DCM2NIIX crash with MorphoSource data

**URL:** <https://discourse.slicer.org/t/dcm2niix-crash-with-morphosource-data/28607>\
**Category:** Support\
**Created:** [March 28, 2023, 12:45am UTC](https://discourse.slicer.org/t/dcm2niix-crash-with-morphosource-data/28607 "2023-03-28T00:45:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 28, 2023, 12:45am UTC](https://discourse.slicer.org/t/dcm2niix-crash-with-morphosource-data/28607/1 "2023-03-28T00:45:38Z")

</div>

There is an ill-formed dicom at MorphoSource that I am trying to import into Slicer for a tutorial.  
[https://www.morphosource.org/concern/media/000004391?locale=en](https://www.morphosource.org/concern/media/000004391?locale=en)

DicomPatcher didn’t finish in a reasonable amount of time, and created hundreds of folders with single dcm images in it. I am now trying the DCM2NIIX extension, which runs for a while and then it gives the error message below. Any ideas? It is a fairly large dataset (at about 4.7GB), but I can open in Fiji and save it as NRRD.  
@Chris_Rorden

```auto
running: ['C:/Users/murat/AppData/Local/NA-MIC/Slicer 5.2.2/NA-MIC/Extensions-31382/SlicerDcm2nii/lib/Slicer-5.2/qt-scripted-modules\\Resources\\bin\\dcm2niix', '-1', '-d', '0', '-f', 'tmp74up7mnh', '-o', 'C:/Users/murat/AppData/Local/Temp/Slicer/ __SlicerTemp__ 2023-03-27_17+40+20.311', '-e', 'y', '-z', 'y', 'C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312']
dcm2nii arguments:
['C:/Users/murat/AppData/Local/NA-MIC/Slicer 5.2.2/NA-MIC/Extensions-31382/SlicerDcm2nii/lib/Slicer-5.2/qt-scripted-modules\\Resources\\bin\\dcm2niix', '-1', '-d', '0', '-f', 'tmp74up7mnh', '-o', 'C:/Users/murat/AppData/Local/Temp/Slicer/ __SlicerTemp__ 2023-03-27_17+40+20.311', '-e', 'y', '-z', 'y', 'C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312']

dcm2nii results:
b"Compression will be faster with C:\\Users\\murat\\AppData\\Local\\NA-MIC\\Slicer 5.2.2\\NA-MIC\\Extensions-31382\\SlicerDcm2nii\\lib\\Slicer-5.2\\qt-scripted-modules\\Resources\\bin\\pigz.exe in the same folder as the executable\r\nChris Rorden's dcm2niiX version v1.0.20230210 (JP2:OpenJPEG) (JP-LS:CharLS) MSC1930 (64-bit Windows)\r\nFound 1286 DICOM file(s)\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120000.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120001.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120002.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120003.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120004.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120005.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120006.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120007.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120008.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120009.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120010.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120011.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120012.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120013.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120014.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120015.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120016.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120017.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120018.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120019.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120020.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120021.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120022.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120023.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120024.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120025.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120026.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120027.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120028.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120029.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120030.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120031.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120032.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120033.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120034.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120035.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120036.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120037.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120038.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120039.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120040.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120041.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120042.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120043.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120044.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120045.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120046.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120047.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120048.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120049.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120050.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120051.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120052.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120053.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120054.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120055.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120056.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120057.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120058.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120059.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120060.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120061.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120062.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120063.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120064.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120065.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120066.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120067.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120068.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120069.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120070.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120071.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120072.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120073.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120074.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120075.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120076.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120077.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120078.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120079.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120080.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120081.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120082.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120083.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120084.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153120085.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries 

```

I deleted a thousands of lines with he same message, as discourse didn’t allow me to paste whole log.

```auto
2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153121282.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153121283.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153121284.dcm\r\nWarning: Instance number (0020,0013) not found: C:/Users/murat/Downloads/morphosource_media-2023-03-27-20_18_56/Media 000004391 - Element Unspecified CTImageSeries Etc/Pan_troglodytes_15312-000004391/Pan_troglodytes_15312\\new_Pan_153121285.dcm\r\nWarning: Empty protocol name(s) (0018,1030)\r\nWarning: PatientOrient (0018,5100) not specified (issue 642).\r\nWarning: Unable to determine manufacturer (0008,0070), so conversion is not tuned for vendor.\r\nWarning: Interslice distance varies in this volume (incompatible with NIfTI format).\r\nSlice re-ordering resolved inter-slice distance variability.\r\nWarning: Missing images? Expected 1286 images, but instance number (0020,0013) ranges from 1736236142 to 880970184\r\nConvert 1286 DICOM as C:/Users/murat/AppData/Local/Temp/Slicer/ __SlicerTemp__ 2023-03-27_17+40+20.311\\tmp74up7mnh (1119x1845x1286x1)\r\nWarning: Saving huge image uncompressed (many GZip tools have 2 Gb limit).\r\nConversion required 23.014999 seconds.\r\n"

Traceback (most recent call last):
  File "C:/Users/murat/AppData/Local/NA-MIC/Slicer 5.2.2/NA-MIC/Extensions-31382/SlicerDcm2nii/lib/Slicer-5.2/qt-scripted-modules/Dcm2niixGUI.py", line 104, in onApplyButton
    result,error = logic.run(self.inputDirectorySelector.currentPath)
  File "C:/Users/murat/AppData/Local/NA-MIC/Slicer 5.2.2/NA-MIC/Extensions-31382/SlicerDcm2nii/lib/Slicer-5.2/qt-scripted-modules/Dcm2niixGUI.py", line 152, in run
    res = slicer.util.loadVolume( outputFileName, properties={"name": os.path.basename(str(inputDirectory))} )
  File "C:\Users\murat\AppData\Local\NA-MIC\Slicer 5.2.2\bin\Python\slicer\util.py", line 941, in loadVolume
    return loadNodeFromFile(filename, filetype, properties, returnNode)
  File "C:\Users\murat\AppData\Local\NA-MIC\Slicer 5.2.2\bin\Python\slicer\util.py", line 701, in loadNodeFromFile
    raise RuntimeError(errorMessage)
RuntimeError: Failed to load node from file: C:\Users\murat\AppData\Local\Temp\Slicer\ __SlicerTemp__ 2023-03-27_17+40+20.311\tmp74up7mnh.nhdr
Error: Loading C:\Users\murat\AppData\Local\Temp\Slicer\ __SlicerTemp__ 2023-03-27_17+40+20.311\tmp74up7mnh.nhdr - load failed.

```

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 28, 2023, 4:27am UTC](https://discourse.slicer.org/t/dcm2niix-crash-with-morphosource-data/28607/2 "2023-03-28T04:27:53Z")

</div>

When you attempt to import the images this error is logged: `Failed to insert file into database (required fields missing)`. It means that one or more required fields (patientsName, patientID, studyInstanceUID, seriesInstanceUID) are missing.

I used the DICOM patcher with only the `Generate missing patient/study/series IDs` option enabled. After that the series imported and loaded into Slicer correctly.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/c/6c28770ca70570f853ef3a0eaf5e58a4049c5e78.jpeg)

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 28, 2023, 4:39am UTC](https://discourse.slicer.org/t/dcm2niix-crash-with-morphosource-data/28607/3 "2023-03-28T04:39:54Z")

</div>

> [@lassoan](#):
>
> I used the DICOM patcher with only the `Generate missing patient/study/series IDs` option enabled. After that the series imported and loaded into Slicer correctly.

I can confirm that, that worked and I managed to import the dicom series. However, when I load it into Slicer via the DICOM module, there was a warning about image spacing (see below). It created a transform and effectively doubled the number of slices in the Z plane.

```auto
Warning in DICOM plugin Scalar Volume when examining loadable 1: Unnamed Series: Images are not equally spaced (a difference of 0.104995 vs 0 in spacings was detected). Slicer will apply a transform to this series trying to regularize the volume. Please use caution.

```

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/8/b86c9c36f695219dcf93903a7b3ea964ed059935.png)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 28, 2023, 4:42am UTC](https://discourse.slicer.org/t/dcm2niix-crash-with-morphosource-data/28607/4 "2023-03-28T04:42:10Z")

</div>

I did not get any error like that. It seems that you somehow duplicated the files. The series consists of 1287 files.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 28, 2023, 4:52am UTC](https://discourse.slicer.org/t/dcm2niix-crash-with-morphosource-data/28607/5 "2023-03-28T04:52:15Z")

</div>

You are right! I didn’t noticed it created a new subfolder from my previous attempt, hence duplicated the files. All is good now!
