chop-dbhi / dicom-anon

Python DICOM Anonymizer
BSD 2-Clause "Simplified" License
66 stars 22 forks source link

Add --do_not_clean option to ONLY do the --force_replace and --exclude_series_descs actions #30

Open r3m0chop opened 4 years ago

r3m0chop commented 4 years ago

Add option of:

    parser.add_argument('-d', '--do_not_clean', action='store_true', default=False, help='Do NOT apply general tag value cleaning;'
                                                                                   'instead only do any specified --force_replace & --exclude_series_descs')

to bypass the normal DICOM tag value cleaning de-identification operations for which dicom_anon was primarily written.

To be used when --force_replace and --exclude_series_descs are needed, but the de-identification is being performed elsewhere (e.g., in GCP's Healthcare API) and any other pre-de-identification is for whatever reason undesired. Allows the dicom_anon framework to still be fully leveraged for these two new --force_replace and --exclude_series_descs options without creating an entirely new tool.