dicom-anonymization
This repository provides a library and binary for anonymizing (or de-identifying) DICOM files.
[!WARNING] This is a work in progress. Some major things may still change and not all things may work as expected yet until version 0.5.
The project prioritizes performance, reliability, safety and ease of use.
Limitations
Only top-level DICOM tags are processed for now, not tags nested inside sequences. This may change in the future.
Building
Usage
See documentation on docs.rs.
Library
Using default configuration
use File;
use Anonymizer;
let file = open?;
let anonymizer = default;
let result = anonymizer.anonymize?;
let output_file = create?;
result.write?;
Using custom configuration
use File;
use tags;
use Anonymizer;
use ;
use ConfigBuilder;
use DataElementProcessor;
// default configuration can be customized/overridden
let config = default
.uid_root
.remove_private_tags
.tag_action
.tag_action
.tag_action
.tag_action
.tag_action
.tag_action
.tag_action
.tag_action
.build;
let processor = new;
let anonymizer = new;
let file = open?;
let result = anonymizer.anonymize?;
let mut output = Vec new;
result.write?;
Building configuration from scratch
use tags;
use Action;
use ConfigBuilder;
let config_from_scratch = new
.uid_root
.remove_private_tags
.tag_action
// ...more config rules...
.build;
Binary
)
)
)
Example
Contributing
We welcome contributions from the community. If you are interested in contributing to the project, please read CONTRIBUTING.md.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.