FindLastElement Example for Delphi
var
nRet: Integer;
begin
//Find the last image element and display it
LEADDicomDS1.EnableMethodErrors:= True;
//move to last element in Data Set
LEADDicomDS1.MoveLastElement(False);
nRet:= LEADDicomDS1.FindLastElement (TAG_PIXEL_DATA, False);
//find each image
while (nRet = 0) do
begin
LEADDicomDS1.GetBitmapValue (0, 0, ORDER_RGB, 0);
LEADRasterView1.Raster.Bitmap:= LEADDicomDS1.Bitmap;
LEADDicomDS1.Bitmap:= 0;
LEADDicomDS1.FindTag (LEADDicomDS1.DefaultInterface.Get_CurrentElement ().Tag);
ShowMessage('Element: ' + LEADDicomDS1.DefaultInterface.Get_CurrentTag().Name);
nRet:= LEADDicomDS1.FindPrevElement(False);
end;
ShowMessage('No More Images');
end;