#include "ltdic.h"
L_LTDIC_API pDICOMCONTEXTGROUP L_DicomFindContextGroup(pszContextID)
Returns a pointer to the Context Group, in the Context Group Table, with the Context Identifier (CID) specified.
Character string that contains a Context Identifier (CID). The function returns a pointer to the DICOMCONTEXTGROUP structure that specifies the Context Group in the Context Group Table which has this Context ID.
Value | Meaning |
---|---|
!NULL | Pointer to a DICOMCONTEXTGROUP structure that specifies the Context Group, in the Context Group Table, with the specified Context ID. |
NULL | None of the Context Groups in the Context Group Table has the specified Context ID. |
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: use the L_DicomLoadContextGroup and L_DicomInsertContextGroup functions to add Context Groups to the Context Group Table.
To search for a specific Coded Concept in a Context Group, use the L_DicomFindCodedConcept function.
Required DLLs and Libraries
Win32, x64, Linux.
L_INT DicomFindContextGroupExample(L_VOID)
{
pDICOMCONTEXTGROUP pGroup;
pDICOMCODEDCONCEPT pConcept;
L_UINT16 nRet;
L_DicomResetContextGroup();
nRet = L_DicomLoadContextGroup(NULL);
if (nRet != DICOM_SUCCESS)
return nRet;
// Look for a Context Group
pGroup = L_DicomFindContextGroup(CID_6019);
if (!pGroup)
return DICOM_ERROR_NULL_PTR;
// Look for a Coded Concept in the Context Group
pConcept = L_DicomFindCodedConcept(pGroup, TEXT("SRT"), TEXT("F-01781"));
if (!pConcept)
return DICOM_ERROR_NULL_PTR;
// Set the Code Meaning of the Coded Concept (French translation)
if (!L_DicomSetCodedConceptCodeMeaning (pConcept, TEXT("Situé à 1 heure")))
return FAILURE - 1;
// Refer to the example of L_DicomGetCodedConceptGroup for
// the function DicomGetCodedConceptGroupExample
nRet = (L_UINT16) DicomGetCodedConceptGroupExample(pConcept, FALSE);
if (nRet != SUCCESS)
return nRet;
// Delete the Coded Concept
L_DicomDeleteCodedConcept (pConcept);
// Add a (testing) Coded Concept to the Context Group
pConcept = L_DicomInsertCodedConcept (pGroup, TEXT("CSD"), NULL, TEXT("CV"), TEXT("CM"),
NULL, NULL, 0);
if (!pConcept)
return DICOM_ERROR_NULL_PTR;
nRet = (L_UINT16) DicomGetCodedConceptGroupExample(pConcept, FALSE);
if (nRet != SUCCESS)
return nRet;
// Restore the Context Group (discard all the changes made to the Group)
if (!L_DicomDefaultContextGroup (pGroup))
return FAILURE - 1;
// Refer to the example of L_DicomGetFirstCodedConcept for
// the function DicomGetFirstCodedConceptExample
nRet = (L_UINT16) DicomGetFirstCodedConceptExample(pGroup);
// Delete the Context Group
L_DicomDeleteContextGroup (pGroup);
return nRet;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document