dicom_core

Module ops

Source
Expand description

Module for the attribute operations API.

This allows consumers to specify and implement operations on DICOM objects as part of a larger process, such as anonymization or transcoding.

The most important type here is AttributeOp, which indicates which attribute is affected (AttributeSelector), and the operation to apply (AttributeAction). All DICOM object types supporting this API implement the ApplyOp trait.

§Example

Given a DICOM object (opened using dicom_object), construct an AttributeOp and apply it using apply.

use dicom_core::ops::*;
use dicom_object::open_file;

let mut obj = open_file("1/2/0003.dcm")?;
// hide patient name
obj.apply(AttributeOp::new(
    Tag(0x0010, 0x0010),
    AttributeAction::SetStr("Patient^Anonymous".into()),
))?;

Structs§

Enums§

Traits§

  • Trait for applying DICOM attribute operations.