GetElementLevel Example for Delphi
var
x, uLevel: Cardinal;
begin
{ Navigate the Data Set: a List, not: a Tree }
{ Move to the 20th element, and then find that element's level in the Tree }
LEADDicom1.EnableMethodErrors := true;
try
begin
{ move to first element in Data Set }
LEADDicom1.MoveFirstElement(false);
{ move to the 20th element }
For x := 2 To 20 do
LEADDicom1.MoveNextElement(false);
LEADDicom1.FindTag( LEADDicom1.CurrentElement.Tag);
uLevel := LEADDicom1.GetElementLevel();
ShowMessage('Element: ' + LEADDicom1.CurrentTag.Name + ' at level ' + IntToStr(uLevel));
end;
except
ShowMessage('Error Number: ' + IntToStr(LEADDicom1.Error));
end;
end;