The DICOM Redactor Library is a Java library designed to redact sensitive data contained in DICOM tags. This is an offline library which does not communicate with Google Cloud.
The DICOM redactor library can be built using Gradle. Please refer to these instructions to build Gradle for your system.
To build the library and examples:
cd redactor
./gradlew build
cd redactor
./gradlew test
The library's redaction is primarily configured using protobuf. The configuration is similar to the DicomConfig for the deidentify operation in Google's Cloud Healthcare API (although the predefined filter profiles differ).
The user can configure which tags to redact/remove in one of 3 ways:
- keep_list - a list of DICOM tags to keep untouched. Other tags are removed.
- remove_list - a list of DICOM tags to remove. Other tags are kept untouched.
- filter_profile - a predefined profile that will keep and remove particular tags.
See the full configuration proto for more info.
To view the sepcific tags removed for a certain profile, see the relevant textproto.
Regardless of the configuration, several UIDs will always be regenerated: SOPInstanceUID, StudyInstanceUID, SeriesInstanceUID, and MediaStorageSOPInstanceUID. By default, these will be regenerated using the UUID Derived UID method. Optionally, when constucting a redactor, the user can specify their own prefix to use for the regenerated UIDs.
A command line utility for redacting tags using the library has been included. To run:
cd redactor
./gradlew examples:tag_remover:run --args='-i in.dcm -o out.dcm -t PatientName'