dbdicom.series#

dbdicom.series(dtype='mri', in_study: Study | None = None, in_database: Database | None = None, **kwargs) Series[source]#

Create an empty DICOM series.

Parameters:
  • dtype (str, optional) – The type of the series to create. Defaults to ‘mri’.

  • in_study (Study, optional) – If provided, the series is created in this study. Defaults to None.

  • in_database (Database, optional) – If provided, the series is created in this database. Defaults to None.

  • kwargs – Any valid DICOM (tag, value) pair to set properties of the new patient

Returns:

DICOM series with defaults for all attributes.

Return type:

Series

Raises:

ValueError – if a dtype is requested that is currently not yet implemented

Example

Create an empty series in memory.

>>> series = db.series()
>>> series.print()
---------- SERIES --------------
Series 001 [New Series]
    Nr of instances: 0
--------------------------------

Note since no patient and study records are provided, a default hierarchy is created automatically:

>>> series.database().print()
---------- DATABASE --------------
Location:  In memory
Patient New Patient
    Study New Study [None]
        Series 001 [New Series]
            Nr of instances: 0
----------------------------------