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

This function sets the data item of the current multi valued Data Element.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI MED_ElemList_curr_data_item_set(
        HIGMEDELEMLIST hIGMedElemList,
        INT item_index,
        LPVOID lpData, 
        DWORD size_of_data
);

Arguments:

Name Type Description
hIGMedElemList HIGMEDELEMLIST HIGMEDELEMLIST handle to the Data Element List object.
item_index INT Index of Data Item in Data Element.
lpData LPVOID A far pointer to a VOID buffer into which the data will be copied.
size_of_lpData DWORD Size of above buffer, 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:

Each Data Element can be of one of many different data types (int, word, bytes, float, double, string, etc.) You must know the VR (Value Representation) of the data in order to use this data.

This function allows you to overwrite the data item of the current multi valued Data Element, by copying the data from your buffer to the HDS table. 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_data_item_get()to find out the VR of the Current DE.

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.