pub struct DataElementProcessor { /* private fields */ }
Expand description
A processor for DICOM data elements that applies anonymization rules based on the given configuration
This processor uses a Config
to determine how to transform individual DICOM elements
according to defined anonymization actions like hashing, replacing, or emptying tag values,
or completely removing tags.
Limitation: only top-level DICOM tags are processed for now, not tags nested inside sequences. This may change in the future.
Implementations§
Trait Implementations§
Source§impl Clone for DataElementProcessor
impl Clone for DataElementProcessor
Source§fn clone(&self) -> DataElementProcessor
fn clone(&self) -> DataElementProcessor
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DataElementProcessor
impl Debug for DataElementProcessor
Source§impl PartialEq for DataElementProcessor
impl PartialEq for DataElementProcessor
Source§impl Processor for DataElementProcessor
impl Processor for DataElementProcessor
Source§fn process_element<'a>(
&'a self,
obj: &DefaultDicomObject,
elem: &'a InMemElement,
) -> Result<Option<Cow<'a, InMemElement>>>
fn process_element<'a>( &'a self, obj: &DefaultDicomObject, elem: &'a InMemElement, ) -> Result<Option<Cow<'a, InMemElement>>>
Process a DICOM data element according to the configured anonymization rules
Takes a DICOM object and one of its elements, applies the appropriate anonymization action based on the configuration, and returns the result.
§Arguments
obj
- Reference to the DICOM object containing the elementelem
- Reference to the element to be processed
§Returns
Returns a Result
containing:
Some(Cow<InMemElement>)
- The processed element, either borrowed or ownedNone
- If the element should be removedErr
- If there was an error processing the element
impl StructuralPartialEq for DataElementProcessor
Auto Trait Implementations§
impl Freeze for DataElementProcessor
impl RefUnwindSafe for DataElementProcessor
impl Send for DataElementProcessor
impl Sync for DataElementProcessor
impl Unpin for DataElementProcessor
impl UnwindSafe for DataElementProcessor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more