Reference#

Warning

This reference guide presents the dbdicom version 0.3 API. This replaces the v0.2 API which is no longer supported and will be phased out.

This reference manual details functions, modules, and objects included in dbdicom, describing what they are and what they do. All operations are available via a functional and an object-oriented API.

The functional API is slightly more compact and easier to use but also a little slower as the index file of the database is read and written at each operation.

For interactive use or when many operations are performed in rapid succession, such as in a loop, the object-oriented API may be preferable.

Functional API#

Summarize the database#

print(path)

Print the contents of the DICOM folder

summary(path)

Return a summary of the contents of the database.

Retrieve information entities#

patients(path[, name, contains, isin])

Return a list of patients in the DICOM folder.

studies(entity[, name, contains, isin])

Return a list of studies in the DICOM folder.

series(entity[, name, contains, isin])

Return a list of series in the DICOM folder.

Edit information entities#

copy(from_entity, to_entity)

Copy a DICOM entity (patient, study or series)

delete(entity)

Delete a DICOM entity

move(from_entity, to_entity)

Move a DICOM entity

Read and write DICOM series#

volume(series[, dims])

Read a vreg.Volume3D from a DICOM series

write_volume(vol, series[, ref])

Write a vreg.Volume3D to a DICOM series

pixel_data(series[, dims, include])

Read the pixel data from a DICOM series

unique(pars, entity)

Return a list of unique values for a DICOM entity

Import/export to other formats#

to_nifti(series, file[, dims])

Save a DICOM series in nifti format.

from_nifti(file, series[, ref])

Create a DICOM series from a nifti file.

Object oriented API#

DataBaseDicom(path)

Class to read and write a DICOM folder.