Pseudonymisation Tool

usage: pymedphys experimental dicom anonymise [-h] [-o OUTPUT_PATH] [-d] [-f]
                                              [-c]
                                              [-k [KEYWORD [KEYWORD ...]]]
                                              [-p] [-u | -i] [--pseudo]
                                              input_path

Positional Arguments

input_path

Input file or directory path. If a directory is supplied, all DICOM files within the directory and its subdirectories will be anonymised

Named Arguments

-o, --output_path

Output file or directory path.

-d, --delete_original_files

Use this flag to delete the original, non-anonymised files in the processed directory. Each original file will only be deleted if anonymisation completed successfully for that file.

Default: False

-f, --preserve_filenames

Use this flag to preserve the original filenames in the anonymised DICOM filenames. Note that ‘_Anonymised.dcm’ will still be appended. Use with caution, since DICOM filenames may contain identifying information

Default: False

-c, --clear_values

Use this flag to simply clear the values of all of the identifying elements in the anonymised DICOM files, as opposed to replacing them with ‘dummy’ values.

Default: False

-k, --keywords_to_leave_unchanged

A space-separated list of DICOM keywords (e.g. ‘PatientName’) to exclude from anonymisation and error checking.

-p, --keep_private_tags

Use this flag to preserve private tags in the anonymised DICOM files.

Default: False

-u, --delete_unknown_tags

Use this flag to delete any unrecognised tags from the anonymised DICOM files.

Default: False

-i, --ignore_unknown_tags

Use this flag to ignore any unrecognised tags in the anonymised DICOM files.

Default: False

--pseudo

Use this flag to activate the use of pseudonymisation of the identifying elements in the DICOM files, as opposed to replacing them with ‘dummy’ values. The pseudonymised values are SHA3_256 hashed if text or UIDs, shifted if dates, and jittered if an age. UIDs retain consistency so that entire sets of data will retain their referential integrity. Patient Identifiers stay consistent but are not reversible, and are unlikely to collide with other patient identifiers

Default: False

Comments