% ./run_mri_reface_docker.sh Downloads/mri-reface-tests/A091105/A091105-9100496/12-03-1959-NA-Baseline-MR-95551/4.000000-SAGITTAL-T1-08287 Downloads/mri-reface-tests/A091105/A091105-9100496/12-03-1959-NA-Baseline-MR-95551/4.000000-SAGITTAL-T1-08287/defaced
chmod: Invalid file mode: =777
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
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 42 DICOM file(s)
Convert 42 DICOM as /tmp/tmp.ULg7wYfEU5/4.000000-SAGITTAL-T1-08287_NECK_SURVEY_19591203112804_4 (512x512x42x1)
Conversion required 0.110695 seconds (0.058548 for core code).
'/tmp/tmp.ULg7wYfEU5/4.000000-SAGITTAL-T1-08287_NECK_SURVEY_19591203112804_4.nii' -> '/var/folders/19/4p5m1b9j5k9f7qybvc64fbb454krph/T/tmp.YH7q6yQuuH/outputs/4.000000-SAGITTAL-T1-08287_NECK_SURVEY_19591203112804_4.nii'
A fatal error has occurred while initializing libraries
Error: mclmcr initialization failed
Traceback (most recent call last):
  File "/usr/bin/mlrtapp/ADIR_nii2dicom", line 72, in <module>
    status = 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 77, in nii2dicom
    nii = nib.load(niifile)
  File "/usr/local/lib/python2.7/dist-packages/nibabel/loadsave.py", line 42, in load
    raise FileNotFoundError("No such file or no access: '%s'" % filename)
nibabel.py3k.FileNotFoundError: No such file or no access: '/var/folders/19/4p5m1b9j5k9f7qybvc64fbb454krph/T/tmp.YH7q6yQuuH/outputs/4.000000-SAGITTAL-T1-08287_NECK_SURVEY_19591203112804_4_deFaced.nii'
DICOM file directory is empty.
De-faced DICOM was written to /var/folders/19/4p5m1b9j5k9f7qybvc64fbb454krph/T/tmp.YH7q6yQuuH/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.

% ./run_mri_reface_docker.sh Downloads/mri-reface-tests/CPTAC-HNSCC/C3L-08026/10-31-2018-NA-CPTAC-66558/32.000000-WBMRACCAIPIHiResWCOMPOSED-59808 Downloads/mri-reface-tests/CPTAC-HNSCC/C3L-08026/10-31-2018-NA-CPTAC-66558/32.000000-WBMRACCAIPIHiResWCOMPOSED-59808/defaced
chmod: Invalid file mode: =777
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
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 352 DICOM file(s)
Slices stacked despite coil variation 'BP2;BP1,2;SP5,6' vs 'BP1,2;NEP;SP1,2' (use '-m o' to turn off merging)
Warning: Instance Number (0020,0013) order is not spatial.
Warning: Interslice distance varies in this volume (incompatible with NIfTI format).
Convert 352 DICOM as /tmp/tmp.ytCPiM7jlS/32.000000-WBMRACCAIPIHiResWCOMPOSED-59808_WB_MRAC_CAIPI_HiRes_W_COMPOSED_20181031124148_32_cBP2_BP1,2_SP5,6 (384x312x352x1)
Warning: Unable to rotate 3D volume: slices not equidistant: 3.01001 != 1.41248
Conversion required 1.933022 seconds (0.910877 for core code).
'/tmp/tmp.ytCPiM7jlS/32.000000-WBMRACCAIPIHiResWCOMPOSED-59808_WB_MRAC_CAIPI_HiRes_W_COMPOSED_20181031124148_32_cBP2_BP1,2_SP5,6_Eq_1.nii' -> '/var/folders/19/4p5m1b9j5k9f7qybvc64fbb454krph/T/tmp.YQeqQEFPQE/outputs/32.000000-WBMRACCAIPIHiResWCOMPOSED-59808_WB_MRAC_CAIPI_HiRes_W_COMPOSED_20181031124148_32_cBP2_BP1,2_SP5,6_Eq_1.nii'
A fatal error has occurred while initializing libraries
Error: mclmcr initialization failed
Traceback (most recent call last):
  File "/usr/bin/mlrtapp/ADIR_nii2dicom", line 72, in <module>
    status = 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 77, in nii2dicom
    nii = nib.load(niifile)
  File "/usr/local/lib/python2.7/dist-packages/nibabel/loadsave.py", line 42, in load
    raise FileNotFoundError("No such file or no access: '%s'" % filename)
nibabel.py3k.FileNotFoundError: No such file or no access: '/var/folders/19/4p5m1b9j5k9f7qybvc64fbb454krph/T/tmp.YQeqQEFPQE/outputs/32.000000-WBMRACCAIPIHiResWCOMPOSED-59808_WB_MRAC_CAIPI_HiRes_W_COMPOSED_20181031124148_32_cBP2_BP1,2_SP5,6_Eq_1_deFaced.nii'
DICOM file directory is empty.
'/tmp/tmp.ytCPiM7jlS/32.000000-WBMRACCAIPIHiResWCOMPOSED-59808_WB_MRAC_CAIPI_HiRes_W_COMPOSED_20181031124148_32_cBP2_BP1,2_SP5,6.nii' -> '/var/folders/19/4p5m1b9j5k9f7qybvc64fbb454krph/T/tmp.YQeqQEFPQE/outputs/32.000000-WBMRACCAIPIHiResWCOMPOSED-59808_WB_MRAC_CAIPI_HiRes_W_COMPOSED_20181031124148_32_cBP2_BP1,2_SP5,6.nii'
A fatal error has occurred while initializing libraries
Error: mclmcr initialization failed
Traceback (most recent call last):
  File "/usr/bin/mlrtapp/ADIR_nii2dicom", line 72, in <module>
    status = 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 77, in nii2dicom
    nii = nib.load(niifile)
  File "/usr/local/lib/python2.7/dist-packages/nibabel/loadsave.py", line 42, in load
    raise FileNotFoundError("No such file or no access: '%s'" % filename)
nibabel.py3k.FileNotFoundError: No such file or no access: '/var/folders/19/4p5m1b9j5k9f7qybvc64fbb454krph/T/tmp.YQeqQEFPQE/outputs/32.000000-WBMRACCAIPIHiResWCOMPOSED-59808_WB_MRAC_CAIPI_HiRes_W_COMPOSED_20181031124148_32_cBP2_BP1,2_SP5,6_deFaced.nii'
DICOM file directory is empty.
De-faced DICOM was written to /var/folders/19/4p5m1b9j5k9f7qybvc64fbb454krph/T/tmp.YQeqQEFPQE/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.