ImageGear Professional v18.2 > API Reference Guide > MD Component API Reference > MD Component Functions Reference > Data Set Element List Functions > MED_ElemList_DE_insert |
This function inserts a Data Element into the Element List.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI MED_ElemList_DE_insert( HIGMEDELEMLIST hIGMedElemList, AT_DCM_TAG Tag, AT_DCM_VR vr, LPVOID lpData, DWORD size_of_data ); |
Name | Type | Description |
hIGMedElemList | HIGMEDELEMLIST | HIGMEDELEMLIST handle to the Data Element List object. |
Tag | AT_DCM_TAG | AT_DCM_TAG tag to be inserted. The Tag must be supplied as a 32-bit value in which the first 16 bits (WORD) represent the Group Number and the second 16 bits represent the Element Number. |
vr | AT_DCM_VR | Set to the VR (Value Representation) of the Data Element to be inserted. See enumIGMedVR for possible VR values. |
lpData | LPVOID | A far VOID pointer to the data that you would like to insert. |
size_of_data | DWORD | Set this DWORD variable to the size of the data in lpData. |
Returns the number of ImageGear errors that occurred during the function call.
This function does not process image pixels.
Copy Code
|
|
---|---|
HIGMEDELEMLIST ds;
MED_ElemList_DE_insert(ds, DCM_TAG_PhotometricInterpretation, MED_DCM_VR_CS, "MONOCHROME2", 11);
|
Your new Data Element will be placed into the Element List sorted by its Tag value on the same level as that of the Current Data Element. If the DE already exists, the new one overwrites it. Specifying a Group Length DE does not cause an error, but simply is ignored. Your data will be padded to an even length if necessary.