ImageGear for C and C++ on Linux v19.10 - Updated
MED_DCM_DS_curr_remove
API Reference Guide > MD Component API Reference > MD Component Functions Reference > Data Set Functions > MED_DCM_DS_curr_remove

This function removes the Current Data Element from the Data Set.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI MED_DCM_DS_curr_remove (
       HIGEAR hIGear, 
       LPBOOL lpRemoved
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle to the image.
lpRemoved LPBOOL A far pointer to a BOOL, which returns TRUE if the Current Data Element was removed; and will return FALSE if there are no more removable DEs in the Data Set or if the Current Data Element could not be removed.

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 new Current Data Element will be the Data Element following the one that was just removed, unless you have deleted the last DE, in which case the CDE will be the "new" last DE.

If the Data Set is empty (there are no removable DEs remaining) lpRemoved will return FALSE. The critical DEs cannot be removed. Non-removable DEs also include Sequence and Item Delimiters.