ImageGear for C and C++ on Windows v20.5 - Updated
MED_ElemList_curr_data_get
API Reference Guide > MD Component API Reference > MD Component Functions Reference > Data Set Element List Functions > MED_ElemList_curr_data_get

This function returns the data (Value Field) of the Current Data Element in its native form.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI MED_ElemList_curr_data_get(
        HIGMEDELEMLIST hIGMedElemList, 
        LPVOID lpData, 
        DWORD size_of_data, 
        LPDWORD lpSize_of_data
);

Arguments:

Name Type Description
hIGMedElemList HIGMEDELEMLIST HIGMEDELEMLIST handle to the Data Element List object.
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.
lpSize_of_data LPDWORD Actual number of bytes copied to lpData (NULL if do not care). This will always be equal to or smaller than size_of_lpData. If lpSize_of_data is less than the VL of the current Data Element then lpData does not contain all the data because lpData does not point to enough memory to hold the entire object.

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. To get the VR and the VL (Value Length), you can use one of the MED_ElemList_move_...() functions or MED_ElemList_curr_info_get(). Each time you move the Current Data Element with a _move_...() function, the VR and VL of the new Current Data Element are returned to you.

To retrieve the data as a string use MED_ElemList_curr_data_get_string().

Some VRs depend on the byte order of your operating system (Big Endian or Little Endian ) and the Transfer Syntax of the DICOM file. Examples of such VRs are: WORD, LONG, FLOAT, DOUBLE, etc. The Data Field values will be returned to you already adjusted to the proper format and no byte-swapping is needed.

Is this page helpful?
Yes No
Thanks for your feedback.