BIRN Deidentification and Upload Pipeline

Author: Silvester Czanner (see also: SilvesterNotes)


  1. Overview of anonymizing and defacing code
  2. Limitations of the code
  3. Contents in distribution
  4. Setting up local environment variables for use
  5. Use instructions
  6. Support and contacts

1. Overview of anonymizing and defacing code

Goal
To anonymize and deface the dicom files

We provide a script (birnd_up) that reads a dicom image files, anonymizes the dicom headers and defaces dicom image volumes.

2. Limitations of the code

3. Contents of distribution

The whole distribution package contains 6 subdirectories:

4. Setting up local environment variables

You need to set up the following two variables:

Setup the environment variable BIRND_UP_DIR to the BIRND-UP directory. For example:

Setup the variable MATLAB to the path of your matlab executable file For example:

With these environments you can define aliases to run the scripts:

And then just run the scripts by typing:

5. How to use it

USAGE

birnd_up [options] -i <indir> -o <outdir> -subjid <subjID>

  • -i indir

    : input directory <dcmdir>

    -o outdir

    : output directory

    -study studydir

    : study directory

    -subjid subject_ID

    : subject ID

    -radius radius

    : radius in [mm], default 5

    -radius distance_from_brain

    : Default is 7mm, but if a bit of brain is being stripped, it can be increased, or if too much is face is left, it can be decreased.

    -result_check

    : create tif images from defaced volume

    -version

    : print version string

    -help

    : show the usage text

  • Examples:

     set DATA1=/your_path/data1 
     set DATA2=/your_path/data2 
     set OUTPUT_DIR=/your_path/defaced_dicoms 

    ./birnd_up -i $DATA1 $DATA2 -o $OUTPUT_DIR -subjid test_subj

    Defaced dicom files will be in:

    $DATA1 --> $OUTPUT_DIR/test_subj/scan_1

    $DATA2 --> $OUTPUT_DIR/test_subj/scan_2

    ./birnd_up -i $DATA1 $DATA2 -o $OUTPUT_DIR -subjid test_subj -study1 visit1

    Defaced dicom files will be in:

    $DATA1 --> $OUTPUT_DIR/test_subj/visit1/scan_1

    $DATA2 --> $OUTPUT_DIR/test_subj/visit1/scan_2

    ./birnd_up -i $DATA1 $DATA2 -o $OUTPUT_DIR -subjid test_subj -study1 visit1 -result_check

    Defaced dicom files will be in:

    $DATA1 --> $OUTPUT_DIR/test_subj/visit1/scan_1

    $DATA2 --> $OUTPUT_DIR/test_subj/visit1/scan_2

    TIF images from defaced data will be in:

    $DATA1 --> $OUTPUT_DIR/test_subj/visit1/scan_1_tif

    $DATA2 --> $OUTPUT_DIR/test_subj/visit1/scan_2_tif

    6. Support and contacts

    Support is very limited but we will do our best to try to answer your questions. Please email your constructive comments to: Silvester Czanner (czanner@nmr.mgh.harvard.edu) Karl Helmer (helmer@nmr.mgh.harvard.edu)

    More information about the BIRND-UP distribution is on: http://www.na-mic.org/Wiki/index.php/MBIRN:BIRNDUP:Distribution

    BIRND-UP (last edited 2008-04-29 11:46:13 by localhost)