This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Dicom; | |
using Dicom.Imaging; | |
using Dicom.Imaging.Codec; | |
using Dicom.IO.Buffer; | |
using Ghostscript.NET; | |
using Ghostscript.NET.Rasterizer; | |
using System; | |
using System.Collections.Generic; | |
using System.Drawing; | |
using System.Drawing.Imaging; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Encapsulate( Patient patient, Study study, Institution institution, string directory, string filename, byte[] pdf ) | |
{ | |
var name = new DicomPersonName( DicomTag.PatientName, patient.LastName, patient.FirstName, | |
patient.MiddleName, patient.NamePrefix, patient.NameSuffix ); | |
var studyUID = new DicomUID( study.InstanceUID, "Study Instance UID", DicomUidType.SOPInstance ); | |
var company = Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyCompanyAttribute>().Company; | |
var product = Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyProductAttribute>().Product; | |
DicomDataset[] refItems = study.Series | |
.SelectMany( s => s.Datasets ) |