Skip to content

Example: De-identify DICOM ​

The following code reads a data set from a DICOM P10 file, de-identifies it, then prints it to stdout. De-identification is only available in the Rust implementation.

rs
use dcmfx::core::*;
use dcmfx::deidentify::*;
use dcmfx::p10::*;

const INPUT_FILE: &str = "./example.dcm";

pub fn main() {
    let mut ds = DataSet::read_p10_file(INPUT_FILE, None).unwrap();

    ds.deidentify(&Deidentifier::new()).unwrap();
    ds.print();
}

View on GitHub