Dukungan untuk Gambar DICOM

Contents
[ ]

Standar DICOM dikembangkan oleh Asosiasi Produsen Listrik Nasional. Format ini mencakup fungsi untuk membuat, menyimpan, mentransfer, dan mencetak bingkai gambar individu, serangkaian bingkai, informasi pasien, penelitian, peralatan, institusi, dan tenaga medis yang melakukan pemeriksaan, dan sebagainya.

Cuplikan kode berikut juga bekerja dengan pustaka Aspose.PDF.Drawing.

Aspose.PDF for .NET mendukung fungsionalitas untuk menambahkan gambar DICOM ke dokumen PDF. Cuplikan kode berikut menunjukkan cara menggunakan fungsionalitas ini.

// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void AddDicomImageToPDF()
{
    // The path to the documents directory
    var dataDir = RunExamples.GetDataDir_AsposePdf_Images();

    // Create PDF document
    using (var document = new Aspose.Pdf.Document())
    {
        // Add page
        var page = document.Pages.Add();

        // Create an image instance and set its properties
        var image = new Aspose.Pdf.Image
        {
            FileType = Aspose.Pdf.ImageFileType.Dicom,
            ImageStream = new FileStream(dataDir + "DicomImage.dcm", FileMode.Open, FileAccess.Read)
        };

        // Add image to the first page
        page.Paragraphs.Add(image);

        // Save PDF document
        document.Save(dataDir + "PdfWithDicomImage_out.pdf");
    }
}