ImageGear Professional > API Reference Guide > MD Component API Reference > MD Component Functions Reference > Data Set Functions > MED_DCM_DS_move_next |
This function moves the Current Data Element to the next Data Element in the Data Set.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI MED_DCM_DS_move_next( const HIGEAR hIGear, const AT_MODE level_op, LPAT_DCM_TAG lpTag; LPAT_DCM_VR lpVR, LPAT_DCM_VL lpVL, LPWORD lpLevel, LPDWORD lpICount, LPLONG lpNumRemaining ); |
Name | Type | Description |
hIGear | const HIGEAR | HIGEAR handle to the image. |
level_op | const AT_MODE |
A variable of type AT_MODE that tells the function how to move when it comes to an SQ. SQs are like indented outline items, allowing for hierarchies of Data Elements. Set this to one of the following constants:
|
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. |
lpNumRemaining | LPLONG | A far pointer to a LONG that returns the number of DE remaining until the end is reached. If the returned value is 0, you are now at last DE, if the returned value is -1, you have attempted to move past the last DE. |
Returns the number of ImageGear errors that occurred during the function call.
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. |
Copy Code
|
|
---|---|
AT_ERRCOUNT nErrcount; HIGEAR hIGear; BOOL IsLast; AT_DCM_TAG lpTag; AT_DCM_VR lpVR; AT_DCM_VL lpVL; DWORD lpICount; DWORD size_of_lpData; IsLast = FALSE: MED_DCM_DS_move_first(hIGear, &lpTag, &lpVR, &lpVL, &lpICount); /* iterate through all Data Elements returning the Tag, VR, VL and item count of each one. End the loop when lpIsLast == TRUE */ while (IsLast == FALSE) { MED_DCM_DS_curr_data_get(hIGear, lpData, size_of_lpData); MED_DCM_DS_move_next(hIGear, &lpTag, &lpVR, &lpVL, &lpICount, &lpIsLast); |
The value of lpNumRemaining tells you whether the Tag has now become the last Tag in the list.
The level_op setting determines whether the Current Data Element can move from level to level, or it has to stay on the same level.