DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Public Member Functions | Private Member Functions | Private Attributes | List of all members
DcmDataDictionary Class Reference

this class implements a loadable DICOM Data Dictionary More...

## Public Member Functions
| DcmDataDictionary (OFBool loadBuiltin, OFBool loadExternal)
| constructor More...
| ~DcmDataDictionary ()
| destructor
OFBool | isDictionaryLoaded () const
| checks if a data dictionary is loaded (excluding the skeleton dictionary) More...
int | numberOfNormalTagEntries () const
| returns the number of normal (non-repeating) tag entries
int | numberOfRepeatingTagEntries () const
| returns the number of repeating groups tag entries
int | numberOfEntries () const
| returns the number of dictionary entries that were loaded either from file or from a built-in dictionary or both.
int | numberOfSkeletonEntries () const
| returns the number of skeleton entries. More...
OFBool | reloadDictionaries (OFBool loadBuiltin, OFBool loadExternal)
| reload data dictionaries. More...
OFBool | loadDictionary (const char *fileName, OFBool errorIfAbsent=OFTrue)
| load a particular dictionary from file. More...
const DcmDictEntry * | findEntry (const DcmTagKey &key, const char *privCreator) const
| dictionary lookup for the given tag key and private creator identifier. More...
const DcmDictEntry * | findEntry (const char *name) const
| dictionary lookup for the given attribute name. More...
void | clear ()
| deletes all dictionary entries
void | addEntry (DcmDictEntry *entry)
| adds an entry to the dictionary. More...
DcmHashDictIterator | normalBegin ()
| returns an iterator to the start of the normal (non-repeating) dictionary
DcmHashDictIterator | normalEnd ()
| returns an iterator to the end of the normal (non-repeating) dictionary
DcmDictEntryListIterator | repeatingBegin ()
| returns an iterator to the start of the repeating groups data dictionary
DcmDictEntryListIterator | repeatingEnd ()
| returns an iterator to the end of the repeating groups data dictionary

## Private Member Functions
DcmDataDictionary & | operator= (const DcmDataDictionary &)
| private undefined assignment operator
| DcmDataDictionary (const DcmDataDictionary &)
| private undefined copy constructor
OFBool | loadExternalDictionaries ()
| loads external dictionaries defined via environment variables More...
void | loadBuiltinDictionary ()
| loads a builtin (compiled) data dictionary. More...
OFBool | loadSkeletonDictionary ()
| loads the skeleton dictionary (the bare minimum needed to run) More...
const DcmDictEntry * | findEntry (const DcmDictEntry &entry) const
| looks up the given directory entry in the two dictionaries. More...
void | deleteEntry (const DcmDictEntry &entry)
| deletes the given entry from either dictionary More...

## Private Attributes
DcmHashDict | hashDict
| dictionary of normal tags
DcmDictEntryList | repDict
| dictionary of repeating groups tags
int | skeletonCount
| the number of skeleton entries
OFBool | dictionaryLoaded
| is a dictionary loaded (more than skeleton)

## Detailed Description

this class implements a loadable DICOM Data Dictionary

## Constructor & Destructor Documentation

## ◆ DcmDataDictionary()

DcmDataDictionary::DcmDataDictionary | ( | OFBool | loadBuiltin,
|  | OFBool | loadExternal
| ) |  |

constructor

Parameters

  loadBuiltin | flag indicating if a built-in data dictionary (if any) should be loaded.
  loadExternal | flag indicating if an external data dictionary should be read from file.

## Member Function Documentation

## ◆ addEntry()

void DcmDataDictionary::addEntry | ( | DcmDictEntry * | entry | ) |

adds an entry to the dictionary.

Must be allocated via new. The entry becomes the property of the dictionary and will be deallocated (via delete) upon clear() or dictionary destruction. If an equivalent entry already exists it will be replaced by the new entry and the old entry deallocated (via delete).

Parameters

  entry | pointer to new entry

## ◆ deleteEntry()

void DcmDataDictionary::deleteEntry | ( | const DcmDictEntry & | entry | ) |
| private

deletes the given entry from either dictionary

Parameters

  entry | the entry to delete

## ◆ findEntry() [1/3]

const DcmDictEntry* DcmDataDictionary::findEntry | ( | const char * | name | ) | const

dictionary lookup for the given attribute name.

First, the normal tags data dictionary is searched. If not found, the repeating groups data dictionary is searched. Mainly considers standard attributes. Private attributes are also searched, but without their associated private creator identifier.

Parameters

  name | attribute name to search for

## ◆ findEntry() [2/3]

const DcmDictEntry* DcmDataDictionary::findEntry | ( | const DcmDictEntry & | entry | ) | const
| private

looks up the given directory entry in the two dictionaries.

Parameters

  entry | the entry to look up

Returns
  pointer to entry if found, NULL otherwise

## ◆ findEntry() [3/3]

const DcmDictEntry* DcmDataDictionary::findEntry | ( | const DcmTagKey & | key,
|  | const char * | privCreator
| ) |  | const

dictionary lookup for the given tag key and private creator identifier.

First, the normal tags data dictionary is searched. If not found, the repeating groups data dictionary is searched.

Parameters

  key | tag key to search for
  privCreator | private creator identifier, may be NULL

## ◆ isDictionaryLoaded()

OFBool DcmDataDictionary::isDictionaryLoaded | ( |  | ) | const
| inline

checks if a data dictionary is loaded (excluding the skeleton dictionary)

Returns
  true if loaded, false if no dictionary is present

## ◆ loadBuiltinDictionary()

void DcmDataDictionary::loadBuiltinDictionary | ( |  | ) |
| private

loads a builtin (compiled) data dictionary.

Depending on which code is in use, this function may not do anything.

## ◆ loadDictionary()

OFBool DcmDataDictionary::loadDictionary | ( | const char * | fileName,
|  | OFBool | errorIfAbsent = `OFTrue`
| ) |  |

load a particular dictionary from file.

Parameters

  fileName | filename
  errorIfAbsent | causes the method to return false if the file cannot be opened

Returns
  false if the file contains a parse error or if the file could not be opened and errorIfAbsent was set, true otherwise.

## ◆ loadExternalDictionaries()

OFBool DcmDataDictionary::loadExternalDictionaries | ( |  | ) |
| private

loads external dictionaries defined via environment variables

Returns
  true if successful

## ◆ loadSkeletonDictionary()

OFBool DcmDataDictionary::loadSkeletonDictionary | ( |  | ) |
| private

loads the skeleton dictionary (the bare minimum needed to run)

Returns
  true if successful

## ◆ numberOfSkeletonEntries()

int DcmDataDictionary::numberOfSkeletonEntries | ( |  | ) | const
| inline

returns the number of skeleton entries.

The skeleton is a collection of dictionary entries which are always present, even if neither internal nor external dictionary have been loaded. It contains very basic things like item delimitation and sequence delimitation.

## ◆ reloadDictionaries()

OFBool DcmDataDictionary::reloadDictionaries | ( | OFBool | loadBuiltin,
|  | OFBool | loadExternal
| ) |  |

reload data dictionaries.

First, all dictionary entries are deleted.

Parameters

  loadBuiltin | flag indicating if a built-in data dictionary (if any) should be loaded.
  loadExternal | flag indicating if an external data dictionary should be read from file.

Returns
  true if reload was successful, false if an error occurred

The documentation for this class was generated from the following file:

- dcmdata/include/dcmtk/dcmdata/dcdict.h

Generated on Mon Dec 15 2025 for DCMTK Version 3.7.0 by Doxygen 1.9.1