#include "ltdic.h"
L_LTDIC_API pDICOMCONTEXTGROUP L_DicomInsertContextGroup(pszContextIdentifier, pszName, bExtensible, pContextGroupVersion, uFlags)
Adds a new Context Group to the Context Group Table.
Character string that contains the Context Identifier (0008,010F) of the new Context Group.
Character string that contains the name of the new Context Group.
Value that specifies whether the new Context Group is Extensible. Possible values are:
Value | Meaning |
---|---|
TRUE | The new Context Group is Extensible. |
FALSE | The new Context Group is Non-extensible. |
Pointer to a VALUEDATETIME structure that specifies the Context Group Version (0008,0106) of the new Context Group.
Flags that control the behavior of this function. This can be set to 0 or:
Value | Meaning |
---|---|
DICOM_CONTEXTGROUP_DISALLOW_DUPLICATES | [0x01] The function should fail if a Context Group with the same specified Context Identifier already exists in the Context Group Table. |
Value | Meaning |
---|---|
!NULL | Pointer to a DICOMCONTEXTGROUP structure that specifies the newly inserted Context Group. |
NULL | The function failed to allocate memory. |
Please note that if the Context Identifier, Name, and Context Group Version of the new Context Group are not specified, the function fails and returns NULL.
A Context Group can be added to the Context Group Table either by loading it from the internal table maintained by LEADTOOLS or by inserting it directly into the Context Group Table. Use the L_DicomInsertContextGroup function to insert a new Context Group to the Context Group Table. Use the L_DicomLoadContextGroup function to load Context Groups from the internal table.
To add Coded Concepts to a Context Group in the Context Group Table, use the L_DicomInsertCodedConcept function.
Required DLLs and Libraries
Win32, x64, Linux.
L_INT DicomInsertContextGroupExample(L_VOID)
{
pDICOMCONTEXTGROUP pGroup;
L_INT nRet;
VALUEDATETIME Version = { 2004, 3, 22, 0, 0, 0, 0, 0 };
// Insert a (testing) Context Group
pGroup = L_DicomInsertContextGroup (TEXT("CID XXXX"),
TEXT("New Context Group"),
TRUE,
&Version,
0);
if (!pGroup)
return DICOM_ERROR_NULL_PTR;
// Fill the Context Group with some (testing) Coded Concepts
L_DicomInsertCodedConcept (pGroup, TEXT("CSD1"), NULL, TEXT("CV1"), TEXT("CM1"),
NULL, NULL, 0);
L_DicomInsertCodedConcept (pGroup, TEXT("CSD2"), NULL, TEXT("CV2"), TEXT("CM2"),
NULL, NULL, 0);
L_DicomInsertCodedConcept (pGroup, TEXT("CSD3"), NULL, TEXT("CV3"), TEXT("CM3"),
NULL, NULL, 0);
// Refer to the example of L_DicomGetFirstCodedConcept for
// the function DicomGetFirstCodedConceptExample
nRet = 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