Inserts a new item in the IOD Structure.
#include "Ltdic.h"
static pDICOMIOD LDicomIOD::Insert(pNeighbor, bChild, nCode, pszName, nType, nUsage, pszDescription)
Pointer to a DICOMIOD structure that contains an item in the IOD Structure. The inserted item will be inserted as a neighbor to this item, or as a child, depending on the value of bChild.
Flag that indicates where to insert the item. Possible values are:
Value | Meaning |
---|---|
TRUE | The new item will be inserted as the last child of pNeighbor. |
FALSE | The new item will be inserted as the last sibling of pNeighbor. |
Code value that indicates which Information Object Definition you are inserting. The information object may be a Class, a Module or a Tag. For lists of default values, refer to Data Element Tag Constants, IOD Class Constants, and IOD Module Constants.
Character string that contains the name of the inserted item.
The type of Information Object Definition you are working with. Possible values are:
Value | Meaning |
---|---|
IOD_TYPE_CLASS | [0x00] Class type Information Object Definition. |
IOD_TYPE_MODULE | [0x01] Module type Information Object Definition. |
IOD_TYPE_ELEMENT | [0x02] Element type Information Object Definition. |
Value that indicates whether the Information Object is mandatory, conditional or optional, and the type of usage. For a list of possible values, refer to IOD Usage Constants. For more information on mandatory, conditional and optional usage, refer to An Overview of Dicom or the DICOM Spec.
Character string that contains a description of the inserted Information Object Definition.
Value | Meaning |
---|---|
!NULL | A pointer to a DICOMIOD structure containing the newly inserted item. |
NULL | Not enough memory to insert the item. |
The illustrations below show how items are added to the IOD Structure (internally maintained as a tree), based on the value of bChild.
For the sake of these illustrations, the order of siblings is top to bottom. Therefore, since added items become the last sibling or the last child, these are drawn at the bottom of the appropriate group of items.
In this illustration, pNeighbor points to Item 1 and bChild is False. The new item is added as the last sibling of Item 1.
In this illustration, pNeighbor points to Item 1 and bChild is True. The new item is added as the last child of Item 1.
Win32, x64
This example inserts a new class in the IOD table.
L_INT LDicomIOD_InsertExample()
{
pDICOMIOD pClass;
pDICOMIOD pModule;
pDICOMIOD pElement;
/* Inserts a new class */
pClass = LDicomIOD::Insert(NULL, FALSE, 7000, TEXT("New Class"), IOD_TYPE_CLASS, 0, TEXT(""));
/* Inserts a module in the class */
pModule = LDicomIOD::Insert(pClass, TRUE, 7000, TEXT("AAA Module"), IOD_TYPE_MODULE,
IOD_USAGE_M, TEXT("This is a module"));
/* Inserts an element in the module */
pElement = LDicomIOD::Insert(pModule, TRUE, TAG_CONTENT_DATE, TEXT("XXX Element"), IOD_TYPE_MODULE,
IOD_USAGE_1, TEXT("This is an element"));
/* Inserts an element in the module */
pElement = LDicomIOD::Insert(pModule, TRUE, TAG_INSTITUTION_NAME, TEXT("YYY Element"),
IOD_TYPE_MODULE, IOD_USAGE_3, TEXT("This is an element"));
return DICOM_SUCCESS;
}
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