Skip to content
mmilch01Public

About

Facemasking algorithm to de-identify high resolution MRI of the human head. Software description: https://nrg.wustl.edu/software/face-masking/

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

Summary

Facemasking algorithm to de-identify high resolution MRI of the human head. Earlier versions are here.

Installing as a local tool

Environment requirements:

  1. 64-bit Linux
  2. FSL 5 or 6 on path
  3. MATLAB R2016 or later on path, or MATLAB Runtime (MCR) v.9.4 installed locally.
  4. ImageMagick convert, bc, which, zip and unzip on path
  5. (Optional) HD BET tool: https://github.com/NeuroAI-HD/HD-BET

Installation: copy the contents of nrg-improc to a local directory and make sure it's on path. For an MCR installation, also copy the contents of 'mcr/for_redistribution_files_only' directory (that would be your deployed application directory).

Installing as a Docker container

Make sure the up to date version of Docker is installed and Docker daemon is running.
sudo docker pull mmilch01/facemasking:1.21

Installing in XNAT Container Service

Use the supplied command.json to configure the command.

Running

For a full list of options, run mask_face without parameters. If you wish to use HDBET to mask out the brain, GPU is recommended.

  1. As a standalone application with MATLAB on path:
    mask_face <dicom_series_dir> [options]
  2. As a deployed MCR application (currently not supported):
    mask_face_nomatlab <dicom_series_dir> -mcr_home <Matlab runtime environment v 9.4 installation dir> -deployed_home <deployed app dir copied from mcr/for_redistribution_files_only> <dicom_series_dir> [options]
  3. As a Docker container:
    **sudo docker run** -u $(id -u ${USER}):$(id -g ${USER}) -v `pwd`:/docker_mount --rm xnat/facemasking:1.21 mask_face_nomatlab <dicom_series_dir> options]
    To add GPU support to run HDBET, use --gpus <gpu_id|all> option with docker run command.

Interpreting output

  1. A mosaic of the facemasked image is saved under maskface/<original_dicom_dir_name>_normfilter.png
  2. A 3D surface rendering of facemasked image is saved under maskface/<original_dicom_dir_name>_normfilter_surf.png
  3. Facemasked image in Analyze 7.5 format is saved under maskface/<original_dicom_dir_name>_masked_nii_orig.img
  4. MATLAB output logs are saved under maskface/*.out
  5. Defaced DICOM's are saved under DICOM_DEFACED dir.

References

  1. Milchenko, Mikhail, and Daniel Marcus. Obscuring Surface Anatomy in Volumetric Imaging Data. Neuroinformatics, 2012. https://doi.org/10.1007/s12021-012-9160-3.

About

Facemasking algorithm to de-identify high resolution MRI of the human head. Software description: https://nrg.wustl.edu/software/face-masking/

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages