ImageEn, unit iexMetaHelpers

TStringGridHelper.ReadGridFromDicom

TStringGridHelper.ReadGridFromDicom


Declaration

function ReadGridFromDicom(IOParams : TIOParams; TagInclude: TIEDicomInclude) : Boolean; overload;
function ReadGridFromDicom(const sFilename : string; TagInclude: TIEDicomInclude) : Boolean; overload;


Description

Fill a TStringGrid with the Dicom properties of the current image, or one loaded from file.
Two columns will be added with the left one containing property descriptions (using IEGetDicomTagDescription) and the right one containing Dicom values (using GetTagString). If the grid has a fixed row it will be given a heading of "Name" and "Value".
TagInclude allows you to filter the types of tags returned.
Result is true if the file has any Dicom fields.

Note: You may wish to call InitializeGrid before ReadGridFromDicom to automatically assign the optimal layout to the grid.


Examples

// Display the Dicom properties of the current image (all types)
MyDicomGridView.ReadGridFromDicom( ImageEnView1.IO.Params, [ diProprietary, diDeprecated, diChildTags, diUnknown ] );

// Display of Dicom properties of a file (excluding deprecated and unknown tags)
MyDicomGridView.ReadGridFromDicom( 'C:\MyImage.jpeg', [ diProprietary, diChildTags ] );