Working with Context Groups
The use of Coded Concepts in DICOM facilitates unambiguous communication of concepts or terms. The Coded Concepts are incorporated in IODs using the Code Sequence Attributes; this is described in PS 3.3 of the DICOM Standard.
A set of related Coded Concepts forms a Context Group. The Context Groups defined by the DICOM Content Mapping Resource (DCMR), which is specified by PS 3.16 of the DICOM Standard, are maintained by LEADTOOLS in an internal table. For a listing of the Context Identifiers (CIDs) of these Context Groups, along with their names, refer to Context Identifiers. We will refer to this table as the Context Group Table.
LEADTOOLS provides a number of methods and properties for working with a table of Context Groups. All of these methods and properties are named as xxxContextGroup, xxxContextGroupxxx, xxxCodedConcept, or xxxCodedConceptxxx.
The CurrentContextGroup property of the ILEADDicomDS Interface specifies the currently selected Context Group in the Context Group Table, the DicomContextGroup object. LEADTOOLS provides the IDicomContextGroup dual interface for specifying Context Groups. For more information on the properties available through this interface, refer to Working with the DicomContextGroup Object.
Initially, the Context Group Table is empty. You can add Context Groups to the table using either of two methods:
By loading from the internal table into the Context Group Table. This can be done using the LoadContextGroup method.
By inserting directly to the Context Group Table using the InsertContextGroup method.
You can use the following methods to maneuver through the Context Groups in the Context Group Table:
You can also use the GetContextGroupCount method and the FindIndexContextGroup method to enumerate the Context Groups in the Context Group Table.
Use the FindContextGroup method to search the Context Group Table for the Context Group with a particular Context ID.
Use the DeleteContextGroup method to remove individual Context Groups from the Context Group Table. You can also use the ResetContextGroup method to remove all the Context Groups at once.
The CurrentCodedConcept property of the ILEADDicomDS Interface specifies the currently selected Coded Concept in the Context Group Table, the DicomCodedConcept object. LEADTOOLS provides the IDicomCodedConcept dual interface for specifying Coded Concepts. For more information on the properties available through this interface, refer to Working with the DicomCodedConcept Object.
Use the following methods to investigate the Coded Concepts of a Context Group:
Use the FindCodedConcept method to search a Context Group in the Context Group Table for the Coded Concept with specific Coding Scheme Designator and Code Value.
After you add a Context Group to the Context Group Table you can modify the Code Meanings of its Coded Concepts, add new Coded Concepts to the Context Group, and delete existing Coded Concepts from the Context Group by using the following methods:
SetCodedConceptCodeMeaning method
If a Context Group in the Context Group Table has a corresponding Context Group in the internal table maintained by LEADTOOLS, you can use the DefaultContextGroup method to discard any changes made to the Context Group in the Context Group Table.
Most of these methods work in conjunction with the CurrentContextGroup property and/or the CurrentCodedConcept property.