dicom-anonymization
This repository provides a library and binary for anonymizing (or de-identifying) DICOM files.
[!WARNING] This is a work in progress. Some things may still change and not all things may work as expected yet.
The project prioritizes performance, reliability, safety and ease of use.
Building
Usage
See documentation on docs.rs.
Python
See the Python bindings README.md.
Library
Installation
To add the library to your project, do this:
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 Action;
use ConfigBuilder;
use DefaultProcessor;
// 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
Installation
To install the dcmanon binary, do this:
Usage
anonymize
)
)
)
Example
config create
)
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.