deid.dicom.actions package

Submodules

deid.dicom.actions.jitter module

deid.dicom.actions.jitter.jitter_timestamp(field, value)[source]

Jitter a timestamp “field” by number of days specified by “value”

The value can be positive or negative. This function is grandfathered into deid custom funcs, as it existed before they did. Since a custom func requires an item, we have a wrapper above to support this use case.

Parameters:
  • field (the field with the timestamp) –
  • value (number of days to jitter by. Jitter bug!) –
deid.dicom.actions.jitter.jitter_timestamp_func(item, value, field, **kwargs)[source]

A wrapper to jitter_timestamp so it works as a custom function.

deid.dicom.actions.uids module

deid.dicom.actions.uids.basic_uuid(item, value, field, **kwargs)[source]

A basic function to replace a field with a uuid.uuid4() string

deid.dicom.actions.uids.dicom_uuid(item, value, field, dicom, **kwargs)[source]

Generate a dicom uid that better conforms to the dicom standard.

deid.dicom.actions.uids.pydicom_uuid(item, value, field, **kwargs)[source]

Use pydicom to generate the UID. Optional kwargs include:

prefix (str): provide a custom prefix stable_remapping (bool): if true, use the orignal value for entropy. This ensures stability across different runs that use the same UID.

The prefix must match ‘^(0|[1-9][0-9]*)(.(0|[1-9][0-9]*))*.$’

deid.dicom.actions.uids.suffix_uuid(item, value, field, **kwargs)[source]

Return the same field, with a uuid suffix.

Provided in docs: https://pydicom.github.io/deid/examples/func-replace/

Module contents