Redacted tag values are completely removed.
Set up the de-identification function
Adjust the de-identification function found here to suit your needs.De-identifying
The Python code below is used to add criteria and call the de-identification function.De-identify without blocking your script
deidentify_dicom_files() waits until the de-identification job finishes. To start a job and collect the results later, use deidentify_dicom_files_start(), which returns a job UUID, and pass that UUID to deidentify_dicom_files_get_result(). Both methods take the same arguments as the script above.
Setting evaluation criteria
Evaluation criteria are conditions that determine whether a file will be de-identified or not. Criteria can take many forms, but will always return either ‘true’ or ‘false’.All strings and inputs into the criteria functions are case-insensitive.
- “SaveDeidentifiedDicomConditionNotSubstr” will return ‘true’ if the first argument (PRIMARY in the example above), is not contained in the second argument (ImageType in the example above). In plain English, the example above checks whether the file’s ImageType doesn’t contain the word ‘Primary’, and returns ‘true’ if this condition is fulfilled.
- “SaveDeidentifiedDicomConditionIn” will return ‘true’ if the first argument ([“ct”,“pt”,“nm”,“mr”,“mg”,“pt”] in the example above) is contained in the second argument Modality. In plain English, the example above checks whether any of the strings contained in the list are contained within the file’s Modality. If any one of them is, the function returns ‘true’.
Output
This section will explain the output of the de-identification function. Click the dropdown below to see a sample output file Sample JSON
Sample JSON

