ImageGear for C and C++ on Linux v18.8 - Updated
MED_DCM_DS_move_ascend
API Reference Guide > MD Component API Reference > MD Component Functions Reference > Data Set Functions > MED_DCM_DS_move_ascend

This function moves the Current Data Element up one level.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI MED_DCM_DS_move_ascend(
        HIGEAR hIGear, 
        LPAT_DCM_TAG lpTag, 
        LPAT_DCM_VR lpVR, 
        LPAT_DCM_VL lpVL, 
        LPWORD lpLevel, 
        LPDWORD lpICount
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle to the image.
lpTag LPAT_DCM_TAG A far pointer that returns a 32-bit value of type AT_DCM_TAG indicating the numerical value of the Tag of the Current Data Element; set this to NULL if you do not need this information. The numerical values of the DICOM Tags are defined in enumIGMedTag enumeration.
lpVR LPAT_DCM_VR A far pointer which returns the new current VR (Value Representation). Set to NULL if you don't need this information. See enumIGMedVR for possible VR values.
lpVL LPAT_DCM_VL A far pointer which returns the length of the Data Field, in bytes.
lpLevel LPWORD A far pointer to a WORD which returns the level in the hierarchy of the new Current Data Element; set to NULL, if you do not need this information.
lpICount LPDWORD Returns the Item Count of the data; set to NULL if you don't need this information.

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:

This is only applicable if the Current Data Element is positioned within an SQ Data Element or within an Item Data Element.

If the Current Data Element is positioned anywhere in an SQ, the Current Data Element ascends to the SQ. If within an Item, the new Current DE becomes the Item DE. Only one level is ascended per call.

If the Current DE is at the top level (0), no action is taken.

If this function is successful, the lpLevel decreases in value by 1. Zero refers to the top level. As the number gets larger, the Data Element is deeper into the hierarchy. Data Elements (as well as SQs and Item Delimiters) are always stored in even-numbered levels; odd-numbered levels contain Items and SQ Delimiters.