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
hash_fn- The hash function used for all operations requiring hashinguid_root- TheUidRootto use as prefix when generating new UIDs during de-identificationremove_private_tags- Policy determining whether to keep or remove private DICOM tagsremove_curves- Policy determining whether to keep or remove curve data (groups0x5000-0x50FF)remove_overlays- Policy determining whether to keep or remove overlay data (groups0x6000-0x60FF)tag_actions- Mapping of specific DICOM tags to their corresponding de-identification actions
Implementations§
Source§impl Config
impl Config
pub fn get_hash_fn(&self) -> HashFn
pub fn get_uid_root(&self) -> &Option<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::Nonebut 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§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 UnsafeUnpin 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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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