#include "ltdic.h"
static pDICOMCONTEXTGROUP LDicomContextGroup::Find(pszContextID)
Returns a pointer to the Context Group in the Context Group Table that has the specified Context Identifier (CID).
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.
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. |
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
Win32, x64
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 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