TImageEnIO.SaveToFileDicom
Declaration
procedure SaveToFileDicom(const FileName: WideString);
Description
Save the current image to a file in Dicom medical imaging format.
FileName is the file name including extension.
Note:
◼If an internal save error is encountered
Aborting will return true. Saving issues due to insufficient write permissions and disk write failures will raise an exception.
◼To abort while saving set
Aborting to true
| Demos\InputOutput\Dicom\Dicom.dpr |
// Save uncompressed DICOM
ImageEnView1.IO.Params.DICOM_Compression := iedcUncompressed;
ImageEnView1.IO.SaveToFileDICOM( 'C:\image.dicom' );
// Save DICOM with lossy JPEG compression
ImageEnView1.IO.Params.DICOM_Compression := iedcJPEG;
ImageEnView1.IO.Params.DICOM_JPEGQuality := 75;
ImageEnView1.IO.SaveToFileDICOM( 'C:\image.dicom' );
// Save DICOM with lossy JPEG2000 compression
ImageEnView1.IO.Params.DICOM_Compression := iedcJPEG2000;
ImageEnView1.IO.Params.DICOM_J2000Rate := 0.10;
ImageEnView1.IO.SaveToFileDICOM( 'C:\image.dicom' );
// Save DICOM with lossless JPEG2000 compression
ImageEnView1.IO.Params.DICOM_Compression := iedcLosslessJPEG2000;
ImageEnView1.IO.SaveToFileDICOM( 'C:\image.dicom' );