pub struct Config { /* private fields */ }
Expand description
Configuration for DICOM de-identification.
This struct contains all the settings that control how DICOM objects will be de-identified, including UID handling, tag-specific actions, and policies for special tag groups.
§Fields
uid_root
- TheUidRoot
to use as prefix when generating new UIDs during de-identificationtag_actions
- Mapping of specific DICOM tags to their corresponding de-identification actionsprivate_tags
- Policy determining whether to keep or remove private DICOM tagscurves
- Policy determining whether to keep or remove curve data (groups0x5000-0x50FF
)overlays
- Policy determining whether to keep or remove overlay data (groups0x6000-0x60FF
)
Implementations§
Source§impl Config
impl Config
pub fn get_uid_root(&self) -> &UidRoot
Sourcepub fn get_action(&self, tag: &Tag) -> &Action
pub fn get_action(&self, tag: &Tag) -> &Action
Returns the appropriate Action
to take for a given DICOM tag.
This function determines what action should be taken for a specific tag during de-identification by checking:
- If the tag has an explicit action defined in
tag_actions
- Whether the tag should be removed based on the configuration for tag groups (i.e. private tags, curves, overlays)
§Priority Rules
- If the tag has an explicit action configured of
Action::None
but should be removed based on point 2., returnsAction::Remove
- If the tag has any other explicit action configured, returns that action
- If the tag has no explicit action configured but should be removed based on point 2., returns
Action::Remove
- If the tag has no explicit action configured and shouldn’t be removed based on point 2., returns
Action::Keep
§Arguments
tag
- Reference to the DICOM tag to get the action for
§Returns
A reference to the appropriate Action
to take for the given tag
Trait Implementations§
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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