LDicomContextGroup::GetFirst

Summary

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

Syntax

#include "ltdic.h"

static pDICOMCONTEXTGROUP LDicomContextGroup::GetFirst()

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

Use the LDicomContextGroup::Load and LDicomContextGroup::Insert functions to add Context Groups to the Context Group Table.

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

LDicomContextGroup::GetLast

LDicomContextGroup::GetNext

LDicomContextGroup::GetPrev

You can also use the LDicomContextGroup::GetCount and LDicomContextGroup::FindIndex functions to enumerate the Context Groups in the table.

The Coded Concepts of a Context Group can be investigated using the following functions:

LDicomContextGroup::GetFirstCodedConcept

LDicomContextGroup::GetLastCodedConcept

LDicomContextGroup::GetNextCodedConcept

LDicomContextGroup::GetPrevCodedConcept

LDicomContextGroup::GetCountCodedConcept

LDicomContextGroup::FindIndexCodedConcept

Required DLLs and Libraries

Platforms

Win32, x64

See Also

Functions

Topics

Example

L_INT LDicomContextGroup_GetFirstExample() 
{ 
   L_INT nRet; 
   LDicomContextGroup::Reset (); 
 
   // Load all the Context Groups 
   nRet = LDicomContextGroup::Load (); 
   if(nRet != DICOM_SUCCESS) 
      return nRet; 
 
   pDICOMCONTEXTGROUP pGroup;  
   L_TCHAR szMsg[256];  
 
   // Enumerate them (3 possible ways)  
#if 1 
 
   // One possible way to enumerate the Context Groups 
   pGroup = LDicomContextGroup::GetFirst(); 
   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 LDicomContextGroup::GetFirstCodedConcept 
         // for the function EnumCodedConcepts 
         EnumCodedConcepts(pGroup);  
      } 
      else if (nRet == IDCANCEL)  
      { 
         break;  
      } 
 
      pGroup = LDicomContextGroup::GetNext(pGroup);  
   } 
 
#elif 0 
 
   // Another way to enumerate the Context Groups 
   L_UINT32 uGroupsCount = LDicomContextGroup::GetCount(); 
   for (L_UINT32 i = 0; i < uGroupsCount; i++) 
   { 
      pGroup = LDicomContextGroup::FindIndex(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)  
      { 
         EnumCodedConcepts(pGroup);  
      } 
      else if (nRet == IDCANCEL)  
      { 
         break;  
      } 
   } 
 
#elif 0 
 
   // A third way to enumerate the Context Groups 
   pGroup = LDicomContextGroup::GetLast(); 
   while (pGroup)  
   { 
      wsprintf(szMsg, TEXT("%s\n%s\n\nEnumerate Coded Concepts?"),  
               pGroup->pszContextIdentifier,  
               pGroup->pszName);  
       
      nRet = ::MessageBox(NULL, szMsg, "Context Group", MB_YESNOCANCEL);  
      if (nRet == IDYES)  
      { 
         EnumCodedConcepts(pGroup);  
      } 
      else if (nRet == IDCANCEL)  
      { 
         break;  
      } 
 
      pGroup = LDicomContextGroup::GetPrev(pGroup);  
   } 
 
#endif 
 
   return DICOM_SUCCESS; 
} 
Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 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.