ImageGear for C and C++ on Windows v19.6 - Updated
MED_ElemList_curr_data_set
API Reference Guide > MD Component API Reference > MD Component Functions Reference > Data Set Element List Functions > MED_ElemList_curr_data_set

This function allows you to overwrite the Value Field (data) of the Current Data Element by copying the data from your buffer to the HDS table.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI MED_ElemList_curr_data_set(
        HIGMEDELEMLIST hIGMedElemList, 
        const LPVOID lpData, 
        DWORD size_of_data
);

Arguments:

Name Type Description
hIGMedElemList HIGMEDELEMLIST HIGMEDELEMLIST handle to the Data Element List object.
lpData const LPVOID A far pointer of type VOID. Set this to the data you would like stored into the Data Field of the Current Data Element.
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.

Remarks:

The Data must be of the correct data type to match the Value Representation (VR) of the Current DE. You can use MED_ElemList_curr_info_get()to find out the VR of the Current DE, and you can use one of the _move_...() functions to set the Current Data Element.

If the Data Value can accept multiple Data Elements, the data values should be set as a single block of memory. To query the Value Multiplicity (VM) use MED_DCM_util_tag_info_get().

The length of a DICOM Data Field must always be an even number. If you set the size_of_lpData to an odd number of bytes, ImageGear will pad it (and your data) to make it an even-numbered length.

An error is set if the data type does not match the VR of the Current DE.