ImageEn, unit iexBitmaps

TIEDicomTags.FindNestedTag

TIEDicomTags.FindNestedTag


Declaration

function FindNestedTag(Group, Element: Word; out Index: integer; StartFrom: TIEDicomTags = nil): TIEDicomTags; overload;
function FindNestedTag(Group, Element: Word; out Index: integer; StartFrom: TObjectList): TIEDicomTags; overload;


Description

Returns the index of tag identified by Group and Element. It searches for the tag within nested tags.

You can view a list of tags at: Dicom Tag List


Examples

// Display a value for a nested tag
var
  Index: integer;
  Tags: TIEDicomTags;
begin
  ImageEnView1.IO.LoadFromFile('input.dcm');
  Tags := imageenview1.IO.Params.DICOM_Tags.FindNestedTag($18, $1042, Index);
  if Index > -1 then
    ShowMessage( Tags.GetTagString(Index) );
end;

// Update the value of a nested tag
ImageEnView1.IO.LoadFromFile('D:\tags1.dcm');
Tags := imageenview1.IO.Params.DICOM_Tags.FindNestedTag($0040, $1001, Index);
if Index > -1 then
  Tags.SetTagString( Tags.GetTag( Index ).Group, Tags.GetTag( Index ).Element, 'NEW VALUE' );