dbdicom.Record.new_sibling#
- Record.new_sibling(suffix: str | None = None, **kwargs)[source]#
Create a new sibling of the record under the same parent.
- Parameters:
kwargs – Any valid DICOM (tag, value) pair to assign to the new sibling.
- Raises:
RuntimeError – when called on a Record of type Database. New records can only be created within an existing database.
Example
Create a sibling series under the same study:
>>> rstate = db.series(SeriesDescription='Resting state') >>> ftap = rstate.new_sibling(SeriesDescription='Finger tap') >>> rstate.parent().print() ---------- STUDY --------------- Study New Study [None] Series 001 [Resting state] Nr of instances: 0 Series 002 [Finger tap] Nr of instances: 0 --------------------------------