L_DicomGetFirstContextGroup

Summary

Returns a pointer to the first Context Group in the Context Group Table.

Syntax

#include "ltdic.h"

L_LTDIC_API pDICOMCONTEXTGROUP L_DicomGetFirstContextGroup()

Returns

Value Meaning
!NULL Pointer to a DICOMCONTEXTGROUP structure that specifies the first Context Group in the Context Group Table.
NULL The Context Group Table is empty.

Comments

To add Context Groups to the Context Group Table, use the L_DicomLoadContextGroup and L_DicomInsertContextGroup functions.

Along with this function, the following functions can be used to maneuver through the Context Groups in the Context Group Table:

You can also use the L_DicomGetCountContextGroup and L_DicomFindIndexContextGroup functions to enumerate the Context Groups in the table.

To investigate the Coded Concepts of a Context Group, use the following functions:

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

Example

L_INT DicomGetFirstContextGroupExample(L_VOID) 
{ 
   pDICOMCONTEXTGROUP pGroup;  
   L_TCHAR szMsg[256];  
   L_INT nRet;  
 
   L_DicomResetContextGroup(); 
 
   // Load all the Context Groups 
   L_DicomLoadContextGroup(NULL);  
 
   // Enumerate them (3 possible ways)  
#if 1 
 
   // One possible way to enumerate the Context Groups 
   pGroup = L_DicomGetFirstContextGroup(); 
   while (pGroup)  
   { 
      wsprintf(szMsg, TEXT("%s\n%s\n\nEnumerate Coded Concepts?"),  
               pGroup->pszContextIdentifier,  
               pGroup->pszName);  
 
      nRet = MessageBox(NULL, szMsg, TEXT("Context Group"), MB_YESNOCANCEL);  
      if (nRet == IDYES)  
      { 
         // Refer to the example of L_DicomGetFirstCodedConcept 
         // for the function DicomGetFirstCodedConceptExample 
         nRet = DicomGetFirstCodedConceptExample(pGroup);  
         if (nRet != SUCCESS) 
            break; 
      } 
      else if (nRet == IDCANCEL) 
      { 
         break; 
      } 
 
      pGroup = L_DicomGetNextContextGroup(pGroup); 
   } 
 
#elif 0 
 
   // Another way to enumerate the Context Groups 
   uGroupsCount = L_DicomGetCountContextGroup (); 
   for (i = 0; i < uGroupsCount; i++) 
   { 
      pGroup = L_DicomFindIndexContextGroup(i);  
 
      wsprintf(szMsg, TEXT("%s\n%s\n\nEnumerate Coded Concepts?"),  
               pGroup->pszContextIdentifier,  
               pGroup->pszName);  
       
      nRet = MessageBox(NULL, szMsg, TEXT("Context Group"), MB_YESNOCANCEL);  
      if (nRet == IDYES)  
      { 
         nRet = DicomGetFirstCodedConceptExample(pGroup);  
         if (nRet != SUCCESS) 
            break; 
      } 
      else if (nRet == IDCANCEL)  
      { 
         break;  
      } 
   } 
 
#elif 0 
 
   // A third way to enumerate the Context Groups 
   pGroup = L_DicomGetLastContextGroup(); 
   while (pGroup)  
   { 
      wsprintf(szMsg, TEXT("%s\n%s\n\nEnumerate Coded Concepts?"),  
               pGroup->pszContextIdentifier,  
               pGroup->pszName);  
       
      nRet = MessageBox(NULL, szMsg, TEXT("Context Group"), MB_YESNOCANCEL);  
      if (nRet == IDYES)  
      { 
         nRet = DicomGetFirstCodedConceptExample(pGroup);  
         if (nRet != SUCCESS) 
            break; 
      } 
      else if (nRet == IDCANCEL)  
      { 
         break;  
      } 
 
      pGroup = L_DicomGetPrevContextGroup(pGroup);  
   } 
#endif 
 
   return DICOM_SUCCESS; 
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DICOM C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.