dbdicom.Record.remove#
- Record.remove()[source]#
Remove a record from the database.
Example
Create a new study in an empty database, then remove it again:
>>> database = db.database() >>> study = database.new_study(StudyDescription='Demo Study') >>> database.print() ---------- DATABASE -------------- Location: In memory Patient New Patient Study Demo Study [None] ----------------------------------
>>> study.remove() >>> database.print() ---------- DATABASE -------------- Location: In memory Patient New Patient ----------------------------------
A record that has been removed from the database can no longer be accessed. Any attempt to do so will raise an error:
>>> print(study.label()) ValueError: This record has been removed from the database and can no longer be accessed.