open-discussion > RE: Trying Docker version
May 29, 2023  03:05 AM | Dianne Patterson
RE: Trying Docker version

I tried the dicom processing on an Ubuntu 22.04.2 machine (in case some subtle difference in the Mac's implementation of Bash or docker was responsible).  However, I see the same problem: The dcm directory is created but empty:



[dema:219 () 1139] $ /data/mri_reface/code/mri_reface_docker/run_mri_reface_docker.sh  T1_mprage_1mm_13 out -imType T1
You provided a directory for an input, rather than a nii file. We will assume it contains DICOM for a single series. Using the -imType flag is highly recommended with this workflow.
Running dcm2niix to convert to nii
Chris Rorden's dcm2niiX version v1.0.20230411  (JP2:OpenJPEG) (JP-LS:CharLS) GCC8.4.0 x86-64 (64-bit Linux)
Found 176 DICOM file(s)
Convert 176 DICOM as /tmp/tmp.8EJP90LOFN/T1_mprage_1mm_13_T1_mprage_1mm_20180706110327_13 (256x256x176x1)
Conversion required 0.087747 seconds (0.087351 for core code).
'/tmp/tmp.8EJP90LOFN/T1_mprage_1mm_13_T1_mprage_1mm_20180706110327_13.nii' -> '/var/tmp/tmp.f8OpIJxbk0/outputs/T1_mprage_1mm_13_T1_mprage_1mm_20180706110327_13.nii'
-------------------------------------------------------
Running mri_reface, version 0.3.2
By: Christopher G. Schwarz schwarz.christopher@mayo.edu
Temp directory: /tmp/tp23bd9256_ce04_40d4_a0bf_29a3a0d86f6c
Target file: /tmp/tmp.8EJP90LOFN/T1_mprage_1mm_13_T1_mprage_1mm_20180706110327_13.nii
Output directory: /var/tmp/tmp.f8OpIJxbk0/outputs
Target image type: T1
Template: /root/.mcrCache9.12/mri_re0/mri_reface/images/MCALT_FaceTemplate_T1.nii
Face atlas: /root/.mcrCache9.12/mri_re0/mri_reface/images/MCALT_FaceMask.nii


Calculating affine parameters to template. This will take some time.
Using face-optimized affine.
Estimating warp to template using ANTS. This will take a while.
Transforming images to input space using antsApplyTransforms
Finding face regions using the atlas
Matching intensities of warped-template to input (DBC)
Adding Rician noise to template to match noise levels in input image, with multiplier 1
Estimated noise PSF: 0
Noise in target image norm region: 6.187167 (2.791533%)
Noise in template image norm region: 2.160575 (0.974810%)
Noise to add: 5.797668 (2.615798%)
Noise in target image air: 0.440074 (16.009274%)
Noise in template image air: 0.027489 (1.000019%)
Noise to add in air: 0.439215 (210.910828%))
Replacing face
Replacing air
Saving outputs
Saved: T1_mprage_1mm_13_T1_mprage_1mm_20180706110327_13_deFaced.nii
Generating renders for QC use
Saved: T1_mprage_1mm_13_T1_mprage_1mm_20180706110327_13.png
Saved: T1_mprage_1mm_13_T1_mprage_1mm_20180706110327_13_deFaced.png
ADIR_ReFace finished in: 9.0485 minutes
Traceback (most recent call last):
  File "/usr/bin/mlrtapp/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 "/usr/bin/mlrtapp/image_handling/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
DICOM file directory is empty.
De-faced DICOM was written to /var/tmp/tmp.f8OpIJxbk0/outputs/dcm. This DICOM metadata is NOT otherwise de-identified. Only de-facing was performed. If you need the meta-data de-identified also, you should run it through your preferred DICOM de-identification software.
[dema:219 () 1140] $



 

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
RE: Trying Docker version
Dianne Patterson May 29, 2023
Dianne Patterson May 25, 2023
Christopher Schwarz May 26, 2023
Dianne Patterson May 28, 2023
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