pydicom.sr.Collection

class pydicom.sr.Collection(name: str)[source]

Interface for a collection of concepts, such as SNOMED-CT, or a DICOM CID.

Added in version 3.0.

__init__(name: str) None[source]

Create a new collection.

Parameters:

name (str) – The name of the collection, should either be a key in the sr._concepts_dict.concepts dict or a CID name for a CID in sr._cid_dict.cid_concepts such as "CID1234".

Methods

__init__(name)

Create a new collection.

dir(*filters)

Return an sorted list of concept keywords based on a partial match.

trait_names()

Return a list of valid names for auto-completion code.

Attributes

concepts

codes}

is_cid

Return True if the collection is one of the DICOM CIDs

name

Return the name of the collection.

repr_format

scheme_designator

Return the scheme designator for the collection.

property concepts: dict[str, Code]

codes}

Type:

Return a dict of {SR identifiers

dir(*filters: str) list[str][source]

Return an sorted list of concept keywords based on a partial match.

Parameters:

filters (str) – Zero or more string arguments to the function. Used for case-insensitive match to any part of the SR keyword.

Returns:

The matching keywords. If no filters are used then all keywords are returned.

Return type:

list of str

property is_cid: bool

Return True if the collection is one of the DICOM CIDs

property name: str

Return the name of the collection.

property scheme_designator: str

Return the scheme designator for the collection.

trait_names() list[str][source]

Return a list of valid names for auto-completion code.

Used in IPython, so that data element names can be found and offered for autocompletion on the IPython command line.