dbdicom.Record.copy#

Record.copy(**kwargs)[source]#

Return a copy of the record under the same parent.

Parameters:

kwargs (optional) – Any valid DICOM (tag, value) pair can be assigned up front as properties of the copy.

Returns:

copy of the same type.

Return type:

Record

Example

Create a new DICOM study and build two copies in the same patient, assigning a new study description on the fly:

>>> study = db.study(StudyDescription='Original', StudyDate='20001231')
>>> copy1 = study.copy(StudyDescription='Copy 1')
>>> copy2 = study.copy(StudyDescription='Copy 2')
>>> study.parent().print()
---------- PATIENT -------------
Patient New Patient
    Study Copy 1 [20001231]
    Study Copy 2 [20001231]
    Study Original [20001231]
--------------------------------