ImageGear for C and C++ on Linux - Updated
MED_DCM_DS_curr_data_set
API Reference Guide > MD Component API Reference > MD Component Functions Reference > Data Set Functions > MED_DCM_DS_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_DCM_DS_curr_data_set(
       HIGEAR hIGear, 
       const LPVOID lpData, 
       const DWORD size_of_data
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle of the image.
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 const 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.

The image must have a DICOM DataSet attached to it. Use MED_DCM_DS_exists to check whether the image contains a DataSet.

Remarks:

The Data must be of the correct data type to match the Value Representation (VR) of the Current DE. You can use MED_DCM_DS_curr_info_get()to find out the VR of the Current DE, and you can use one of the MED_DCM_DS_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.