open-discussion > RE: Trying Docker version
Jun 6, 2023  07:06 PM | Christopher Schwarz - Mayo Clinic
RE: Trying Docker version

Dianne,


I was able to download your dicom and reproduce your error. I get the same error when I simply run dcm2niix on the dicom, then ADIR_nii2dicom on the nii with the original dicom. So, the error isn't in the de-facing at all but just in converting from dicom->nii and nii->dicom with these particular inputs. We'll debug from here and get back to you soon. 


Chris


 


$ dcm2niix -o dcm2niix ./MRIS/dicom/219/itbs/T1_mprage_1mm_13


Chris Rorden's dcm2niiX version v1.0.20221013  (JP2:OpenJPEG) GCC4.8.5 x86-64 (64-bit Linux)
Found 176 DICOM file(s)
Convert 176 DICOM as dcm2niix/T1_mprage_1mm_13_T1_mprage_1mm_20180706110327_13a (256x256x176x1)
Conversion required 1.046187 seconds (0.340000 for core code).


$ ADIR_nii2dicom dcm2niix/T1_mprage_1mm_13_T1_mprage_1mm_20180706110327_13.nii dcm2niix/nii2dicom ./MRIS/dicom/219/itbs/T1_mprage_1mm_13
Traceback (most recent call last):
  File "/bin/ADIR_nii2dicom", line 72, in <module>
    nii2dicom(args['<nii>'], args['<outDir>'], args['<originalDicomDir>'],verbose=args.get('--verbose',False),sliceDim=int(args.get('--sliceDim')),modality_default=str(args.get('--modality')),manufacturer_default=str(args.get('--manufacturer')),photometric_default=str(args.get('--photometric')),dry_run=args.get('--dry-run',False),uid_root=str(args.get('--UID_ROOT')),seriesNUM_select=args.get('--seriesNUM_select',None),seriesUID_select=args.get('--seriesUID_select',None))
  File "ADIR_nii2dicom.py", line 110, in nii2dicom
    dicom_0 = dicom.dcmread(gzip.open(dcmfiles[0],mode='rb')) if(dcmfiles[0][-3:] == '.gz') else dicom.dcmread(dcmfiles[0])
IndexError: list index out of range


 

Threaded View

TitleAuthorDate
Dianne Patterson May 24, 2023
Sun Sar Dec 9, 2024
Christopher Schwarz Dec 9, 2024
Christopher Schwarz May 30, 2023
Dianne Patterson May 31, 2023
Dianne Patterson May 29, 2023
Dianne Patterson May 25, 2023
Christopher Schwarz May 26, 2023
Dianne Patterson May 28, 2023
RE: Trying Docker version
Christopher Schwarz Jun 6, 2023
Dianne Patterson Jun 6, 2023
Christopher Schwarz Jun 7, 2023
Dianne Patterson Jun 9, 2023
Christopher Schwarz Jun 13, 2023
Adam Raikes Nov 2, 2023
Christopher Schwarz Nov 17, 2023
Christopher Schwarz May 25, 2023
Christopher Schwarz May 24, 2023