LDicomContextGroup::Find

Summary

Returns a pointer to the Context Group in the Context Group Table that has the specified Context Identifier (CID).

Syntax

#include "ltdic.h"

static pDICOMCONTEXTGROUP LDicomContextGroup::Find(pszContextID)

Parameters

L_TCHAR * pszContextID

Character string that contains a Context Identifier (CID). For a list of the Context Identifiers of the Context Groups maintained internally, refer to Context Identifier Values. The function Returns a pointer to the DICOMCONTEXTGROUP structure that specifies the Context Group in the Context Group Table for the specified Context ID.

Returns

Value Meaning
!NULL Pointer to a DICOMCONTEXTGROUP structure that specifies the Context Group in the Context Group Table for the specified Context ID.
NULL None of the Context Groups in the Context Group Table has the specified Context ID.

Comments

A Context Group is identified by its Context Identifier (CID). For a list of the Context Identifiers of the Context Groups maintained internally, refer to Context Identifier Values.

NOTE: Only the Context Groups in the Context Group Table are searched by the function. To add Context Groups to the table, call the LDicomContextGroup::Load and LDicomContextGroup::Insert functions.

To search for a specific Coded Concept in a Context Group, call the LDicomContextGroup::FindCodedConcept function.

Required DLLs and Libraries

Platforms

Win32, x64

See Also

Functions

Topics

Example

L_INT LDicomContextGroup_FindExample() 
{ 
   L_INT nRet; 
   LDicomContextGroup::Reset (); 
   nRet = LDicomContextGroup::Load (); 
   if(nRet != DICOM_SUCCESS) 
      return nRet; 
 
   pDICOMCONTEXTGROUP pGroup;  
   pDICOMCODEDCONCEPT pConcept;  
 
   // Look for a Context Group 
   pGroup = LDicomContextGroup::Find(CID_6019);  
   if (!pGroup)  
   { 
      return -1;  
   } 
 
   // Look for a Coded Concept in the Context Group 
   pConcept = LDicomContextGroup::FindCodedConcept(pGroup, TEXT("SRT"), TEXT("F-01781")); 
 
   if (!pConcept)  
   { 
      return -1;  
   } 
 
   // Set the Code Meaning of the Coded Concept (French translation)  
   if (!LDicomContextGroup::SetCodeMeaning(pConcept, TEXT("Situé à 1 heure"))) 
   { 
      return - 1;  
   } 
 
   // Refer to the example of LDicomContextGroup::GetContextGroup for 
   // the function DisplayCodedConcept 
   DisplayCodedConcept(pConcept, FALSE); 
 
   // Delete the Coded Concept 
   LDicomContextGroup::DeleteCodedConcept(pConcept);  
 
   // Add a (testing) Coded Concept to the Context Group 
   pConcept = LDicomContextGroup::InsertCodedConcept(pGroup,  
                                                     TEXT("CSD"), 
                                                     NULL,  
                                                     TEXT("CV"), 
                                                     TEXT("CM")); 
   if (!pConcept)  
   { 
      return -1; 
   } 
 
   DisplayCodedConcept(pConcept, FALSE);  
 
   // Restore the Context Group (discard all the changes made to the Group)  
   LDicomContextGroup::Default(pGroup);  
   // Refer to the example of LDicomContextGroup::GetFirstCodedConcept for 
   // the function EnumCodedConcepts 
   EnumCodedConcepts(pGroup);  
 
   // Delete the Context Group 
   LDicomContextGroup::Delete(pGroup);  
 
   return nRet; 
} 
Help Version 23.0.2024.7.1
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DICOM C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.