pydicom.datadict.add_dict_entries

pydicom.datadict.add_dict_entries(new_entries_dict: Dict[int, Tuple[str, str, str, str, str]]) None[source]

Update the DICOM dictionary with new non-private entries.

Parameters:

new_entries_dict (dict) – dict of form: {tag: (VR, VM, description, is_retired, keyword), ...} where parameters are as described in add_dict_entry().

Raises:

ValueError – If one of the entries is a private tag.

See also

add_dict_entry

Add a single entry to the dictionary.

Examples

>>> from pydicom import Dataset
>>> new_dict_items = {
...        0x10021001: ('UL', '1', "Test One", '', 'TestOne'),
...        0x10021002: ('DS', '3', "Test Two", '', 'TestTwo'),
... }
>>> add_dict_entries(new_dict_items)
>>> ds = Dataset()
>>> ds.TestOne = 'test'
>>> ds.TestTwo = ['1', '2', '3']