dbdicom.Record.restore#

Record.restore()[source]#

Restore the record to the last changed state.

Warning

Restoring is irreversible! Any edits made to the record since the last time it was saved will be lost.

See also

save()

Create a new patient and change the name:

>>> patient = db.patient(PatientName='James Bond')
>>> patient.PatientName = 'Scarface'
>>> print(patient.PatientName)
Scarface

Calling restore will undo the changes:

>>> patient.restore()
>>> print(patient.PatientName)
James Bond