LEADTOOLS For .NET Class Library Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.28
Working with Basic Directory Key Elements

DICOM Dir Data Sets may contain special Data Elements called key elements. A key element is a Data Element that also contains special information about other key elements in the Data Set and their relative location within the Data Set.

Key elements all have the DicomTagType.Item tag and they must be one of the following types:

"PATIENT"

Patient key element

"STUDY"

Study key element

"SERIES"

Series key element

"IMAGE"

Image key element

"OVERLAY"

Overlay key element

"MODALITY LUT"

Modality-LUT key element

"VOI LUT"

VOI-LUT key element

"CURVE"

Curve key element

"TOPIC"

Topic key element

"VISIT"

Visit key element

"RESULTS"

Results key element

"INTERPRETATION"

Interpretation key element

"STUDY COMPONENT"

Study Component key element

"PRINT QUEUE"

Print Queue key element

"FILM SESSION"

Film session key element

"FILM BOX"

Film box key element

"IMAGE BOX"

Image box key element

"PRIVATE"

Private key element

LEADTOOLS maintains the DICOM Dir Data Set as a tree; however, all key elements are stored at the same level of the tree. The specialized information included in a key element maintains information on key element children, non-key element children, parent key elements, and the logical relationships between the elements.

LEADTOOLS provides special methods for searching the DICOM Dir Data Set, maneuvering through the Data Set, inserting and deleting key elements, and manipulating key elements. To work with key elements, you should create a Data Set of type DicomClassType.BasicDirectory.

For maneuvering through the DICOM Dir Data Set, use the following:

DicomDataSet.GetRootKey

DicomDataSet.GetParentKey

DicomDataSet.GetChildKey

DicomDataSet.GetFirstKey

DicomDataSet.GetLastKey

DicomDataSet.GetPreviousKey

DicomDataSet.GetNextKey

LEADTOOLS provides the following methods for searching the DICOM Dir Data Set:

DicomDataSet.FindFirstKey

DicomDataSet.FindLastKey

DicomDataSet.FindPreviousKey

DicomDataSet.FindNextKey

To insert new key elements, use DicomDataSet.InsertKey.

To delete key elements, use DicomDataSet.DeleteKey.

To determine the type of a specific key element, use DicomDataSet.GetKeyValue.

These methods work the same way as the corresponding DicomDataSet.xxxElement methods. Please note however, that it is important that you use DicomDataSet.DeleteKey when deleting a key element. Trying to delete a key element using DicomDataSet.DeleteElement will remove the specified key element and any information about any related key elements, but it will not remove the child key elements.