Support for DICOM Images
Contents
[
Hide
]
The DICOM standard was developed by the National Electrical Manufacturers Association. This format covers the functions of creating, storing, transferring, and printing individual image frames, series of frames, patient information, research, equipment, institutions, medical personnel performing the examination, and the like.
The following code snippet also work with Aspose.PDF.Drawing library.
Aspose.PDF for .NET supports functionality to add DICOM images to PDF documents. The following code snippet shows how to use this functionality.
// For complete examples and data files, please go to https://github.com/aspose-pdf/Aspose.PDF-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_AsposePdf_Images();
using (Document document = new Document())
{
document.Pages.Add();
Aspose.Pdf.Image image = new Aspose.Pdf.Image();
image.FileType = ImageFileType.Dicom;
image.ImageStream = new FileStream(dataDir + "0002.dcm", FileMode.Open, FileAccess.Read);
document.Pages[1].Paragraphs.Add(image);
// Save output as PDF format
document.Save(dataDir + "PdfWithDicomImage_out.pdf");
}