ImageGear for C and C++ on Windows v19.0
MED_ElemList_DE_insert

This function inserts a Data Element into the Element List.

Declaration:

 
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
);

Arguments:

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.

Return Value:

Returns the number of ImageGear errors that occurred during the function call.

Supported Raster Image Formats:

This function does not process image pixels.

Example:

 
Copy Code
HIGMEDELEMLIST ds;
MED_ElemList_DE_insert(ds, DCM_TAG_PhotometricInterpretation, MED_DCM_VR_CS, "MONOCHROME2", 11);

Remarks:

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.

 

 


©2017. Accusoft Corporation. All Rights Reserved.

Send Feedback