Returns a pointer to the next item in the Data Set with a specific tag.
#include "Ltdic.h"
L_LTDIC_API pDICOMELEMENT L_DicomFindNextDescendant(hDS, pParent, pElement, bNextLevelOnly)
A DICOM handle.
Pointer to a parent DICOMELEMENT structure within the Data Set.
Pointer to a child DICOMELEMENT structure of pParent.
Flag that indicates how the Data Set will be evaluated. Possible values are:
Value | Meaning |
---|---|
TRUE | Search for items in the next level only. |
FALSE | Search for items recursively in all of the next levels. |
Value | Meaning |
---|---|
!NULL | A pointer to a DICOMELEMENT structure that contains the next item in the Data Set having the specified tag. |
NULL | No item with the specified tag was found. |
NOTE: Call L_DicomFindFirstDescendant before calling L_DicomFindNextDescendant. L_DicomFindNextDescendant does not specify a tag to use when searching. However, the tag that was used in the last call to L_DicomFindFirstDescendant is used by default when searching.
This function finds the next descendant of the pElement that has a DICOM tag equivalent to the nTag argument (L_DicomFindFirstDescendant), where the entire search is rooted at the Parent element (i.e. pParent).
The diagram below represents DICOM elements stored in a DICOM dataset.
Behavior when bNextLevelOnly is TRUE:
Returns the next element on the next level of pParent with that has a tag equivalent to the nTag argument used in the previous call to L_DicomFindFirstDescendant. Elements included in the search include child elements in the next level only, starting with the element pointed to by pElement. .
Example 1
bNextLevelOnly TRUE
pParent points to element 1
pElement points to element 8
Searches elements 11, 12 and returns the first element that matches the nTag argument used in the previous call to L_DicomFindFirstDescendant.
Example 2
bNextLevelOnly TRUE
pParent points to element 2
pElement points to element 3
Searches elements 4, 7 and returns the first element that matches the nTag argument used in the previous call to L_DicomFindFirstDescendant.
Example 3
bNextLevelOnly TRUE
pParent pointing to element 4
pElement points to element 5
Searches eSearches element 6 only, and returns element 6 if it has a tag of the nTag ent used in the previous call to L_DicomFindFirstDescendant.
Example 4
bNextLevelOnly TRUE
pParent pointing to element 1
pElement points to element 12
Returns NULL.
Behavior when bNextLevelOnly is FALSE:
Returns the next item that has a tag equivalent to the nTag argument used in the previous call to L_DicomFindFirstDescendant ( a pre-order search algorithm rooted at pParent.)
Example 5
bNextLevelOnly FALSE
pParent pointing to element 1
pElement points to element 4
Searches elements 5, 6, 7, 8, 9, 10, 11, 12 and returns the first element that matches the nTag argument used in the previous call to L_DicomFindFirstDescendant.
Example 6
bNextLevelOnly FALSE
pParent pointing to element 2
pElement points to element 4
Searches elements 5, 6, 7 and returns the first element that matches the nTag argument used in the previous call to L_DicomFindFirstDescendant.
Example 7
bNextLevelOnly FALSE
pParent pointing to element 4
pElement points to element 5
Searches eSearches element 6 only, and returns element 6 if is has a tag of nTag argument used in the previous call to L_DicomFindFirstDescendant
The following functions will also help you find elements in the Data Set with a specific tag:
The following functions will help you find specific modules in the Data Set:
Win32, x64, Linux.
For an example, refer to L_DicomFindFirstDescendant.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document