Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS DICOM C++ Class Library Help

LDicomContextGroup::Find

Show in webframe

#include "ltdic.h"

static pDICOMCONTEXTGROUP LDicomContextGroup::Find(pszContextID)

L_TCHAR * pszContextID;

/* Context ID */

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

Parameter

Description

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

!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.

Notice that only the Context Groups in the Context Group Table are searched by the function. To add Context Groups to the table, use the LDicomContextGroup::Load and LDicomContextGroup::Insert functions.

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

Required DLLs and Libraries

LTDIC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

Platforms

Win32, x64

See Also

Functions:

LDicomContextGroup::Load, LDicomContextGroup::Insert, LDicomContextGroup::GetFirst, LDicomContextGroup::GetFirstCodedConcept, LDicomContextGroup::FindCodedConcept, Class Members

Topics:

Working with Context Groups

 

How to Disable the Automatic Loading of the default DICOM Context Group Table

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;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.