ImageEn, unit imageenio

TImageEnIO.LoadFromFileDICOM

TImageEnIO.LoadFromFileDICOM


Declaration

function LoadFromFileDICOM(const FileName: WideString): Boolean;


Description

Loads an image from a DICOM file. This method is necessary for DICOM files that don't have an extension or a valid DICOM header, but you know to be DICOM format.

FileName is the file name including extension.
 Result will be false if the file is not DICOM format (and Aborting will be true). Loading errors due to a file not being available will raise an exception.

Notes:
- You can abort loading by setting Aborting to true
- DICOM parameters are stored in DICOM_Tags


Demo

Demo  Demos\InputOutput\Dicom\Dicom.dpr


Example

ImageEnView1.IO.LoadFromFileDICOM('heart.dcm');

Load the second image of a multiple image DICOM
ImageEnView1.IO.Params.ImageIndex := 1;
ImageEnView1.IO.LoadFromFileDICOM('D:\MyImage.dcm');