Working with Tags

The tag of a data element consists of an ordered pair of 16-bit values that represent a Group number and an Element number. The tag indicates the type of information stored in the value field of the data element. There are a number of tags that are standard for the DICOM file format. In addition to the standard tags, user-defined tags may also be added.

LEADTOOLS maintains a table (or list) internally of all available tags, standard and user defined. In this documentation the table of available value representations will be referred to as the Data Element Tag Table. Also provided in this documentation is a table of the default values for the standard tags. To see these default values, refer to the Default Data Element Tag Table.

LEADTOOLS provides a number of functions for maneuvering through and modifying the Data Element Tag Table. All functions pertaining to the Data Element Tag Table are in the class LDicomTag.

For maneuvering through the Data Element Tag Table, LEADTOOLS provides the following functions:

LDicomTag::GetFirst

LDicomTag::GetLast

LDicomTag::GetPrev

LDicomTag::GetNext

LDicomTag::GetCount

To find specific items, based on either the tag or an index into the table, use LDicomTag::Find and LDicomTag::FindIndex.

To insert new items in the Data Element Tag Table, call LDicomTag::Insert.

You can delete individual items from the table using LDicomTag::Delete, or you can delete all items from the table, using LDicomTag::Reset.

To change the name of an item already in the table, call LDicomTag::SetName.

To determine whether you have a valid pointer to an Data Element Tag item, call LDicomTag::Exists.

Finally, to reset the Data Element Tag Table to the default values, use LDicomTag::Default.

For a list of macros available for use, refer to DICOM Macros.

For more information on tags, refer to An Overview of the DICOM File Format or the DICOM Standard.