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

This function moves the Current Data Element to the Data Element in the Data Set indicated by index, which represents a particular index in the array of Data Elements that make up the Data Set.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI MED_DCM_DS_move_index(
        const HIGEAR hIGear, 
        const DWORD index, 
        LPAT_DCM_TAG lpTag, 
        LPAT_DCM_VR lpVR, 
        LPAT_DCM_VL lpVL, 
        LPDWORD lpLevel, 
        LPDWORD lpICount
);

Arguments:

Name Type Description
hIGear const HIGEAR The HIGEAR handle to the image.
index const DWORD Set to a DWORD that indicates the index that you would like to become the new Current Data Element.
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 LPDWORD 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 function also returns the Tag's VR (Value Representation), its Tag value, the number of bytes in the Tag's data, and the Item Count. The index refers to which element in the Data Element array should be used. The first Data Element will always have an index of 0, and the last Data Element will always have an index of (Total # of DEs - 1). Use MED_DCM_DS_info_get() to find out the total # of Data Elements associated with an image's Data Set.

This function pays no attention to Levels. It only returns the level of the Current Data Element.